@activepieces/piece-jira-data-center 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/package.json +7 -15
  2. package/src/index.js +29 -64
  3. package/src/auth.d.ts +0 -7
  4. package/src/auth.d.ts.map +0 -1
  5. package/src/auth.js +0 -59
  6. package/src/auth.js.map +0 -1
  7. package/src/index.d.ts +0 -5
  8. package/src/index.d.ts.map +0 -1
  9. package/src/index.js.map +0 -1
  10. package/src/lib/actions/add-attachment-to-issue.d.ts +0 -21
  11. package/src/lib/actions/add-attachment-to-issue.d.ts.map +0 -1
  12. package/src/lib/actions/add-attachment-to-issue.js +0 -46
  13. package/src/lib/actions/add-attachment-to-issue.js.map +0 -1
  14. package/src/lib/actions/add-comment-to-issue.d.ts +0 -21
  15. package/src/lib/actions/add-comment-to-issue.d.ts.map +0 -1
  16. package/src/lib/actions/add-comment-to-issue.js +0 -43
  17. package/src/lib/actions/add-comment-to-issue.js.map +0 -1
  18. package/src/lib/actions/add-watcher-to-issue.d.ts +0 -20
  19. package/src/lib/actions/add-watcher-to-issue.d.ts.map +0 -1
  20. package/src/lib/actions/add-watcher-to-issue.js +0 -53
  21. package/src/lib/actions/add-watcher-to-issue.js.map +0 -1
  22. package/src/lib/actions/assign-issue.d.ts +0 -27
  23. package/src/lib/actions/assign-issue.d.ts.map +0 -1
  24. package/src/lib/actions/assign-issue.js +0 -44
  25. package/src/lib/actions/assign-issue.js.map +0 -1
  26. package/src/lib/actions/create-issue.d.ts +0 -24
  27. package/src/lib/actions/create-issue.d.ts.map +0 -1
  28. package/src/lib/actions/create-issue.js +0 -115
  29. package/src/lib/actions/create-issue.js.map +0 -1
  30. package/src/lib/actions/delete-issue-comment.d.ts +0 -24
  31. package/src/lib/actions/delete-issue-comment.d.ts.map +0 -1
  32. package/src/lib/actions/delete-issue-comment.js +0 -69
  33. package/src/lib/actions/delete-issue-comment.js.map +0 -1
  34. package/src/lib/actions/find-user.d.ts +0 -7
  35. package/src/lib/actions/find-user.d.ts.map +0 -1
  36. package/src/lib/actions/find-user.js +0 -42
  37. package/src/lib/actions/find-user.js.map +0 -1
  38. package/src/lib/actions/get-issue-attachment.d.ts +0 -7
  39. package/src/lib/actions/get-issue-attachment.d.ts.map +0 -1
  40. package/src/lib/actions/get-issue-attachment.js +0 -51
  41. package/src/lib/actions/get-issue-attachment.js.map +0 -1
  42. package/src/lib/actions/get-issue.d.ts +0 -23
  43. package/src/lib/actions/get-issue.d.ts.map +0 -1
  44. package/src/lib/actions/get-issue.js +0 -141
  45. package/src/lib/actions/get-issue.js.map +0 -1
  46. package/src/lib/actions/link-issues.d.ts +0 -27
  47. package/src/lib/actions/link-issues.d.ts.map +0 -1
  48. package/src/lib/actions/link-issues.js +0 -57
  49. package/src/lib/actions/link-issues.js.map +0 -1
  50. package/src/lib/actions/list-issue-comments.d.ts +0 -22
  51. package/src/lib/actions/list-issue-comments.d.ts.map +0 -1
  52. package/src/lib/actions/list-issue-comments.js +0 -64
  53. package/src/lib/actions/list-issue-comments.js.map +0 -1
  54. package/src/lib/actions/search-issues.d.ts +0 -8
  55. package/src/lib/actions/search-issues.d.ts.map +0 -1
  56. package/src/lib/actions/search-issues.js +0 -45
  57. package/src/lib/actions/search-issues.js.map +0 -1
  58. package/src/lib/actions/update-issue-comment.d.ts +0 -25
  59. package/src/lib/actions/update-issue-comment.d.ts.map +0 -1
  60. package/src/lib/actions/update-issue-comment.js +0 -76
  61. package/src/lib/actions/update-issue-comment.js.map +0 -1
  62. package/src/lib/actions/update-issue.d.ts +0 -24
  63. package/src/lib/actions/update-issue.d.ts.map +0 -1
  64. package/src/lib/actions/update-issue.js +0 -127
  65. package/src/lib/actions/update-issue.js.map +0 -1
  66. package/src/lib/common/index.d.ts +0 -74
  67. package/src/lib/common/index.d.ts.map +0 -1
  68. package/src/lib/common/index.js +0 -197
  69. package/src/lib/common/index.js.map +0 -1
  70. package/src/lib/common/props.d.ts +0 -80
  71. package/src/lib/common/props.d.ts.map +0 -1
  72. package/src/lib/common/props.js +0 -572
  73. package/src/lib/common/props.js.map +0 -1
  74. package/src/lib/common/types.d.ts +0 -23
  75. package/src/lib/common/types.d.ts.map +0 -1
  76. package/src/lib/common/types.js +0 -25
  77. package/src/lib/common/types.js.map +0 -1
  78. package/src/lib/triggers/new-issue.d.ts +0 -23
  79. package/src/lib/triggers/new-issue.d.ts.map +0 -1
  80. package/src/lib/triggers/new-issue.js +0 -64
  81. package/src/lib/triggers/new-issue.js.map +0 -1
  82. package/src/lib/triggers/updated-issue-status.d.ts +0 -23
  83. package/src/lib/triggers/updated-issue-status.d.ts.map +0 -1
  84. package/src/lib/triggers/updated-issue-status.js +0 -64
  85. package/src/lib/triggers/updated-issue-status.js.map +0 -1
  86. package/src/lib/triggers/updated-issue.d.ts +0 -23
  87. package/src/lib/triggers/updated-issue.d.ts.map +0 -1
  88. package/src/lib/triggers/updated-issue.js +0 -64
  89. package/src/lib/triggers/updated-issue.js.map +0 -1
package/package.json CHANGED
@@ -1,19 +1,11 @@
1
1
  {
2
2
  "name": "@activepieces/piece-jira-data-center",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "main": "./src/index.js",
5
- "types": "./src/index.d.ts",
6
- "dependencies": {
7
- "@activepieces/pieces-common": "0.12.3",
8
- "@activepieces/pieces-framework": "0.30.0",
9
- "@activepieces/shared": "0.87.1",
10
- "dayjs": "1.11.9",
11
- "form-data": "4.0.4",
12
- "zod": "4.3.6",
13
- "tslib": "2.6.2"
14
- },
15
- "scripts": {
16
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
17
- "lint": "eslint 'src/**/*.ts'"
18
- }
5
+ "dependencies": {},
6
+ "files": [
7
+ "src/index.js",
8
+ "package.json",
9
+ "src/i18n"
10
+ ]
19
11
  }
package/src/index.js CHANGED
@@ -1,64 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jiraDataCenter = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const shared_1 = require("@activepieces/shared");
8
- const auth_1 = require("./auth");
9
- const create_issue_1 = require("./lib/actions/create-issue");
10
- const search_issues_1 = require("./lib/actions/search-issues");
11
- const new_issue_1 = require("./lib/triggers/new-issue");
12
- const updated_issue_1 = require("./lib/triggers/updated-issue");
13
- const updated_issue_status_1 = require("./lib/triggers/updated-issue-status");
14
- const add_comment_to_issue_1 = require("./lib/actions/add-comment-to-issue");
15
- const add_attachment_to_issue_1 = require("./lib/actions/add-attachment-to-issue");
16
- const update_issue_comment_1 = require("./lib/actions/update-issue-comment");
17
- const delete_issue_comment_1 = require("./lib/actions/delete-issue-comment");
18
- const update_issue_1 = require("./lib/actions/update-issue");
19
- const assign_issue_1 = require("./lib/actions/assign-issue");
20
- const list_issue_comments_1 = require("./lib/actions/list-issue-comments");
21
- const find_user_1 = require("./lib/actions/find-user");
22
- const add_watcher_to_issue_1 = require("./lib/actions/add-watcher-to-issue");
23
- const link_issues_1 = require("./lib/actions/link-issues");
24
- const get_issue_attachment_1 = require("./lib/actions/get-issue-attachment");
25
- const get_issue_1 = require("./lib/actions/get-issue");
26
- exports.jiraDataCenter = (0, pieces_framework_1.createPiece)({
27
- displayName: 'Jira Data Center',
28
- description: 'Issue tracking and project management for Jira Data Center and Server',
29
- auth: auth_1.jiraDataCenterAuth,
30
- minimumSupportedRelease: '0.36.1',
31
- logoUrl: 'https://cdn.activepieces.com/pieces/jira.png',
32
- categories: [shared_1.PieceCategory.PRODUCTIVITY],
33
- authors: [],
34
- actions: [
35
- create_issue_1.createIssueAction,
36
- update_issue_1.updateIssueAction,
37
- get_issue_1.getIssueAction,
38
- find_user_1.findUserAction,
39
- search_issues_1.searchIssuesAction,
40
- assign_issue_1.assignIssueAction,
41
- add_attachment_to_issue_1.addAttachmentToIssueAction,
42
- get_issue_attachment_1.getIssueAttachmentAction,
43
- add_watcher_to_issue_1.addWatcherToIssueAction,
44
- add_comment_to_issue_1.addCommentToIssueAction,
45
- update_issue_comment_1.updateIssueCommentAction,
46
- link_issues_1.linkIssuesAction,
47
- list_issue_comments_1.listIssueCommentsAction,
48
- delete_issue_comment_1.deleteIssueCommentAction,
49
- (0, pieces_common_1.createCustomApiCallAction)({
50
- baseUrl: (auth) => {
51
- return auth ? `${auth.props.instanceUrl}/rest/api/2` : '';
52
- },
53
- auth: auth_1.jiraDataCenterAuth,
54
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
55
- const typedAuth = auth;
56
- return {
57
- Authorization: `Bearer ${typedAuth.props.personalAccessToken}`,
58
- };
59
- }),
60
- }),
61
- ],
62
- triggers: [new_issue_1.newIssue, updated_issue_1.updatedIssue, updated_issue_status_1.updatedIssueStatus],
63
- });
64
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Ju=Object.create;var Et=Object.defineProperty;var Ku=Object.getOwnPropertyDescriptor;var Xu=Object.getOwnPropertyNames;var Yu=Object.getPrototypeOf,Qu=Object.prototype.hasOwnProperty;var i=(e,t)=>Et(e,"name",{value:t,configurable:!0});var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ro=(e,t)=>{for(var r in t)Et(e,r,{get:t[r],enumerable:!0})},no=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xu(t))!Qu.call(e,o)&&o!==r&&Et(e,o,{get:()=>t[o],enumerable:!(n=Ku(t,o))||n.enumerable});return e};var Ae=(e,t,r)=>(r=e!=null?Ju(Yu(e)):{},no(t||!e||!e.__esModule?Et(r,"default",{value:e,enumerable:!0}):r,e)),ec=e=>no(Et({},"__esModule",{value:!0}),e);var Ii=w((bi,xr)=>{(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"),o=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",u="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${u})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${u})|(?:::)(?:${u})?)${t}\\.${t}\\.${t}\\.${t}(${s})?$`,"i")};function d(p,m){if(p.indexOf("::")!==p.lastIndexOf("::"))return null;let y=0,g=-1,x=(p.match(c.zoneIndex)||[])[0],_,B;for(x&&(x=x.substring(1),p=p.replace(/%.+$/,""));(g=p.indexOf(":",g+1))>=0;)y++;if(p.substr(0,2)==="::"&&y--,p.substr(-2,2)==="::"&&y--,y>m)return null;for(B=m-y,_=":";B--;)_+="0:";return p=p.replace("::",_),p[0]===":"&&(p=p.slice(1)),p[p.length-1]===":"&&(p=p.slice(0,-1)),m=function(){let ce=p.split(":"),ve=[];for(let we=0;we<ce.length;we++)ve.push(parseInt(ce[we],16));return ve}(),{parts:m,zoneId:x}}i(d,"expandIPv6");function f(p,m,y,g){if(p.length!==m.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,_;for(;g>0;){if(_=y-g,_<0&&(_=0),p[x]>>_!==m[x]>>_)return!1;g-=y,x+=1}return!0}i(f,"matchCIDR");function h(p){if(o.test(p))return parseInt(p,16);if(p[0]==="0"&&!isNaN(parseInt(p[1],10))){if(n.test(p))return parseInt(p,8);throw new Error(`ipaddr: cannot parse ${p} as octal`)}return parseInt(p,10)}i(h,"parseIntAuto");function I(p,m){for(;p.length<m;)p=`0${p}`;return p}i(I,"padPart");let P={};P.IPv4=function(){function p(m){if(m.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,g;for(y=0;y<m.length;y++)if(g=m[y],!(0<=g&&g<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=m}return i(p,"IPv4"),p.prototype.SpecialRanges={unspecified:[[new p([0,0,0,0]),8]],broadcast:[[new p([255,255,255,255]),32]],multicast:[[new p([224,0,0,0]),4]],linkLocal:[[new p([169,254,0,0]),16]],loopback:[[new p([127,0,0,0]),8]],carrierGradeNat:[[new p([100,64,0,0]),10]],private:[[new p([10,0,0,0]),8],[new p([172,16,0,0]),12],[new p([192,168,0,0]),16]],reserved:[[new p([192,0,0,0]),24],[new p([192,0,2,0]),24],[new p([192,88,99,0]),24],[new p([198,18,0,0]),15],[new p([198,51,100,0]),24],[new p([203,0,113,0]),24],[new p([240,0,0,0]),4]],as112:[[new p([192,175,48,0]),24],[new p([192,31,196,0]),24]],amt:[[new p([192,52,193,0]),24]]},p.prototype.kind=function(){return"ipv4"},p.prototype.match=function(m,y){let g;if(y===void 0&&(g=m,m=g[0],y=g[1]),m.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,m.octets,8,y)},p.prototype.prefixLengthFromSubnetMask=function(){let m=0,y=!1,g={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,_,B;for(x=3;x>=0;x-=1)if(_=this.octets[x],_ in g){if(B=g[_],y&&B!==0)return null;B!==8&&(y=!0),m+=B}else return null;return 32-m},p.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},p.prototype.toByteArray=function(){return this.octets.slice(0)},p.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},p.prototype.toNormalizedString=function(){return this.toString()},p.prototype.toString=function(){return this.octets.join(".")},p}(),P.IPv4.broadcastAddressFromCIDR=function(p){try{let m=this.parseCIDR(p),y=m[0].toByteArray(),g=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],_=0;for(;_<4;)x.push(parseInt(y[_],10)|parseInt(g[_],10)^255),_++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(p){return this.parser(p)!==null},P.IPv4.isValid=function(p){try{return new this(this.parser(p)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(p){try{return this.parseCIDR(p),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(p){return!!(P.IPv4.isValid(p)&&p.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(p){let m=p.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(p)||!m?!1:P.IPv4.isValidFourPartDecimal(m[1])},P.IPv4.networkAddressFromCIDR=function(p){let m,y,g,x,_;try{for(m=this.parseCIDR(p),g=m[0].toByteArray(),_=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],y=0;y<4;)x.push(parseInt(g[y],10)&parseInt(_[y],10)),y++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.parse=function(p){let m=this.parser(p);if(m===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(m)},P.IPv4.parseCIDR=function(p){let m;if(m=p.match(/^(.+)\/(\d+)$/)){let y=parseInt(m[2]);if(y>=0&&y<=32){let g=[this.parse(m[1]),y];return Object.defineProperty(g,"toString",{value:i(function(){return this.join("/")},"value")}),g}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(p){let m,y,g;if(m=p.match(r.fourOctet))return function(){let x=m.slice(1,6),_=[];for(let B=0;B<x.length;B++)y=x[B],_.push(h(y));return _}();if(m=p.match(r.longValue)){if(g=h(m[1]),g>4294967295||g<0)throw new Error("ipaddr: address outside defined range");return function(){let x=[],_;for(_=0;_<=24;_+=8)x.push(g>>_&255);return x}().reverse()}else return(m=p.match(r.twoOctet))?function(){let x=m.slice(1,4),_=[];if(g=h(x[1]),g>16777215||g<0)throw new Error("ipaddr: address outside defined range");return _.push(h(x[0])),_.push(g>>16&255),_.push(g>>8&255),_.push(g&255),_}():(m=p.match(r.threeOctet))?function(){let x=m.slice(1,5),_=[];if(g=h(x[2]),g>65535||g<0)throw new Error("ipaddr: address outside defined range");return _.push(h(x[0])),_.push(h(x[1])),_.push(g>>8&255),_.push(g&255),_}():null},P.IPv4.subnetMaskFromPrefixLength=function(p){if(p=parseInt(p),p<0||p>32)throw new Error("ipaddr: invalid IPv4 prefix length");let m=[0,0,0,0],y=0,g=Math.floor(p/8);for(;y<g;)m[y]=255,y++;return g<4&&(m[g]=Math.pow(2,p%8)-1<<8-p%8),new this(m)},P.IPv6=function(){function p(m,y){let g,x;if(m.length===16)for(this.parts=[],g=0;g<=14;g+=2)this.parts.push(m[g]<<8|m[g+1]);else if(m.length===8)this.parts=m;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(g=0;g<this.parts.length;g++)if(x=this.parts[g],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return i(p,"IPv6"),p.prototype.SpecialRanges={unspecified:[new p([0,0,0,0,0,0,0,0]),128],linkLocal:[new p([65152,0,0,0,0,0,0,0]),10],multicast:[new p([65280,0,0,0,0,0,0,0]),8],loopback:[new p([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new p([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new p([0,0,0,0,0,65535,0,0]),96],discard:[new p([256,0,0,0,0,0,0,0]),64],rfc6145:[new p([0,0,0,0,65535,0,0,0]),96],rfc6052:[new p([100,65435,0,0,0,0,0,0]),96],"6to4":[new p([8194,0,0,0,0,0,0,0]),16],teredo:[new p([8193,0,0,0,0,0,0,0]),32],benchmarking:[new p([8193,2,0,0,0,0,0,0]),48],amt:[new p([8193,3,0,0,0,0,0,0]),32],as112v6:[[new p([8193,4,274,0,0,0,0,0]),48],[new p([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new p([8193,16,0,0,0,0,0,0]),28],orchid2:[new p([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new p([8193,48,0,0,0,0,0,0]),28],reserved:[[new p([8193,0,0,0,0,0,0,0]),23],[new p([8193,3512,0,0,0,0,0,0]),32]]},p.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},p.prototype.kind=function(){return"ipv6"},p.prototype.match=function(m,y){let g;if(y===void 0&&(g=m,m=g[0],y=g[1]),m.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,m.parts,16,y)},p.prototype.prefixLengthFromSubnetMask=function(){let m=0,y=!1,g={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},x,_;for(let B=7;B>=0;B-=1)if(x=this.parts[B],x in g){if(_=g[x],y&&_!==0)return null;_!==16&&(y=!0),m+=_}else return null;return 128-m},p.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},p.prototype.toByteArray=function(){let m,y=[],g=this.parts;for(let x=0;x<g.length;x++)m=g[x],y.push(m>>8),y.push(m&255);return y},p.prototype.toFixedLengthString=function(){let m=function(){let g=[];for(let x=0;x<this.parts.length;x++)g.push(I(this.parts[x].toString(16),4));return g}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),m+y},p.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let m=this.parts.slice(-2),y=m[0],g=m[1];return new P.IPv4([y>>8,y&255,g>>8,g&255])},p.prototype.toNormalizedString=function(){let m=function(){let g=[];for(let x=0;x<this.parts.length;x++)g.push(this.parts[x].toString(16));return g}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),m+y},p.prototype.toRFC5952String=function(){let m=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),g=0,x=-1,_;for(;_=m.exec(y);)_[0].length>x&&(g=_.index,x=_[0].length);return x<0?y:`${y.substring(0,g)}::${y.substring(g+x)}`},p.prototype.toString=function(){return this.toRFC5952String()},p}(),P.IPv6.broadcastAddressFromCIDR=function(p){try{let m=this.parseCIDR(p),y=m[0].toByteArray(),g=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],_=0;for(;_<16;)x.push(parseInt(y[_],10)|parseInt(g[_],10)^255),_++;return new this(x)}catch(m){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${m})`)}},P.IPv6.isIPv6=function(p){return this.parser(p)!==null},P.IPv6.isValid=function(p){if(typeof p=="string"&&p.indexOf(":")===-1)return!1;try{let m=this.parser(p);return new this(m.parts,m.zoneId),!0}catch{return!1}},P.IPv6.isValidCIDR=function(p){if(typeof p=="string"&&p.indexOf(":")===-1)return!1;try{return this.parseCIDR(p),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(p){let m,y,g,x,_;try{for(m=this.parseCIDR(p),g=m[0].toByteArray(),_=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],y=0;y<16;)x.push(parseInt(g[y],10)&parseInt(_[y],10)),y++;return new this(x)}catch(B){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${B})`)}},P.IPv6.parse=function(p){let m=this.parser(p);if(m.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(m.parts,m.zoneId)},P.IPv6.parseCIDR=function(p){let m,y,g;if((y=p.match(/^(.+)\/(\d+)$/))&&(m=parseInt(y[2]),m>=0&&m<=128))return g=[this.parse(y[1]),m],Object.defineProperty(g,"toString",{value:i(function(){return this.join("/")},"value")}),g;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(p){let m,y,g,x,_,B;if(g=p.match(c.deprecatedTransitional))return this.parser(`::ffff:${g[1]}`);if(c.native.test(p))return d(p,8);if((g=p.match(c.transitional))&&(B=g[6]||"",m=g[1],g[1].endsWith("::")||(m=m.slice(0,-1)),m=d(m+B,6),m.parts)){for(_=[parseInt(g[2]),parseInt(g[3]),parseInt(g[4]),parseInt(g[5])],y=0;y<_.length;y++)if(x=_[y],!(0<=x&&x<=255))return null;return m.parts.push(_[0]<<8|_[1]),m.parts.push(_[2]<<8|_[3]),{parts:m.parts,zoneId:m.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(p){if(p=parseInt(p),p<0||p>128)throw new Error("ipaddr: invalid IPv6 prefix length");let m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,g=Math.floor(p/8);for(;y<g;)m[y]=255,y++;return g<16&&(m[g]=Math.pow(2,p%8)-1<<8-p%8),new this(m)},P.fromByteArray=function(p){let m=p.length;if(m===4)return new P.IPv4(p);if(m===16)return new P.IPv6(p);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(p){return P.IPv6.isValid(p)||P.IPv4.isValid(p)},P.isValidCIDR=function(p){return P.IPv6.isValidCIDR(p)||P.IPv4.isValidCIDR(p)},P.parse=function(p){if(P.IPv6.isValid(p))return P.IPv6.parse(p);if(P.IPv4.isValid(p))return P.IPv4.parse(p);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(p){try{return P.IPv6.parseCIDR(p)}catch{try{return P.IPv4.parseCIDR(p)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(p){let m=this.parse(p);return m.kind()==="ipv6"&&m.isIPv4MappedAddress()?m.toIPv4Address():m},P.subnetMatch=function(p,m,y){let g,x,_,B;y==null&&(y="unicast");for(x in m)if(Object.prototype.hasOwnProperty.call(m,x)){for(_=m[x],_[0]&&!(_[0]instanceof Array)&&(_=[_]),g=0;g<_.length;g++)if(B=_[g],p.kind()===B[0].kind()&&p.match.apply(p,B))return x}return y},typeof xr<"u"&&xr.exports?xr.exports=P:e.ipaddr=P})(bi)});var va=w((nz,ha)=>{var ya=require("stream").Stream,Al=require("util");ha.exports=ze;function ze(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(ze,"DelayedStream");Al.inherits(ze,ya);ze.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ze.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});ze.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ze.prototype.resume=function(){this._released||this.release(),this.source.resume()};ze.prototype.pause=function(){this.source.pause()};ze.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ze.prototype.pipe=function(){var e=ya.prototype.pipe.apply(this,arguments);return this.resume(),e};ze.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)};ze.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 ba=w((iz,_a)=>{var Sl=require("util"),Pa=require("stream").Stream,xa=va();_a.exports=ue;function ue(){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}i(ue,"CombinedStream");Sl.inherits(ue,Pa);ue.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};ue.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};ue.prototype.append=function(e){var t=ue.isStreamLike(e);if(t){if(!(e instanceof xa)){var r=xa.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};ue.prototype.pipe=function(e,t){return Pa.prototype.pipe.call(this,e,t),this.resume(),e};ue.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}};ue.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=ue.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ue.prototype._pipeNext=function(e){this._currentStream=e;var t=ue.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()};ue.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ue.prototype.write=function(e){this.emit("data",e)};ue.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ue.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")};ue.prototype.end=function(){this._reset(),this.emit("end")};ue.prototype.destroy=function(){this._reset(),this.emit("close")};ue.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ue.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};ue.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)};ue.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ta=w((sz,Ia)=>{"use strict";Ia.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 Aa=w(_e=>{"use strict";var Er=Ta(),zl=require("path").extname,$a=/^\s*([^;\s]*)(?:;|\s|$)/,wl=/^text\//i;_e.charset=Ea;_e.charsets={lookup:Ea};_e.contentType=kl;_e.extension=Ol;_e.extensions=Object.create(null);_e.lookup=Dl;_e.types=Object.create(null);Rl(_e.extensions,_e.types);function Ea(e){if(!e||typeof e!="string")return!1;var t=$a.exec(e),r=t&&Er[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&wl.test(t[1])?"UTF-8":!1}i(Ea,"charset");function kl(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?_e.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=_e.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(kl,"contentType");function Ol(e){if(!e||typeof e!="string")return!1;var t=$a.exec(e),r=t&&_e.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(Ol,"extension");function Dl(e){if(!e||typeof e!="string")return!1;var t=zl("x."+e).toLowerCase().substr(1);return t&&_e.types[t]||!1}i(Dl,"lookup");function Rl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Er).forEach(i(function(o){var s=Er[o],u=s.extensions;if(!(!u||!u.length)){e[o]=u;for(var c=0;c<u.length;c++){var d=u[c];if(t[d]){var f=r.indexOf(Er[t[d]].source),h=r.indexOf(s.source);if(t[d]!=="application/octet-stream"&&(f>h||f===h&&t[d].substr(0,12)==="application/"))continue}t[d]=o}}},"forEachMimeType"))}i(Rl,"populateMaps")});var za=w((pz,Sa)=>{Sa.exports=Nl;function Nl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(Nl,"defer")});var kn=w((dz,ka)=>{var wa=za();ka.exports=Cl;function Cl(e){var t=!1;return wa(function(){t=!0}),i(function(n,o){t?e(n,o):wa(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(Cl,"async")});var On=w((fz,Oa)=>{Oa.exports=Ul;function Ul(e){Object.keys(e.jobs).forEach(Ml.bind(e)),e.jobs={}}i(Ul,"abort");function Ml(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(Ml,"clean")});var Dn=w((yz,Ra)=>{var Da=kn(),jl=On();Ra.exports=Ll;function Ll(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=Fl(t,o,e[o],function(s,u){o in r.jobs&&(delete r.jobs[o],s?jl(r):r.results[o]=u,n(s,r.results))})}i(Ll,"iterate");function Fl(e,t,r,n){var o;return e.length==2?o=e(r,Da(n)):o=e(r,t,Da(n)),o}i(Fl,"runJob")});var Rn=w((vz,Na)=>{Na.exports=Bl;function Bl(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(o,s){return t(e[o],e[s])}),n}i(Bl,"state")});var Nn=w((Pz,Ca)=>{var Vl=On(),Zl=kn();Ca.exports=Hl;function Hl(e){Object.keys(this.jobs).length&&(this.index=this.size,Vl(this),Zl(e)(null,this.results))}i(Hl,"terminator")});var Ma=w((bz,Ua)=>{var ql=Dn(),Gl=Rn(),Wl=Nn();Ua.exports=Jl;function Jl(e,t,r){for(var n=Gl(e);n.index<(n.keyedList||e).length;)ql(e,t,n,function(o,s){if(o){r(o,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Wl.bind(n,r)}i(Jl,"parallel")});var Cn=w((Tz,Ar)=>{var ja=Dn(),Kl=Rn(),Xl=Nn();Ar.exports=Yl;Ar.exports.ascending=La;Ar.exports.descending=Ql;function Yl(e,t,r,n){var o=Kl(e,r);return ja(e,t,o,i(function s(u,c){if(u){n(u,c);return}if(o.index++,o.index<(o.keyedList||e).length){ja(e,t,o,s);return}n(null,o.results)},"iteratorHandler")),Xl.bind(o,n)}i(Yl,"serialOrdered");function La(e,t){return e<t?-1:e>t?1:0}i(La,"ascending");function Ql(e,t){return-1*La(e,t)}i(Ql,"descending")});var Ba=w((Ez,Fa)=>{var ed=Cn();Fa.exports=td;function td(e,t,r){return ed(e,t,null,r)}i(td,"serial")});var Za=w((Sz,Va)=>{Va.exports={parallel:Ma(),serial:Ba(),serialOrdered:Cn()}});var Un=w((zz,Ha)=>{"use strict";Ha.exports=Object});var Ga=w((wz,qa)=>{"use strict";qa.exports=Error});var Ja=w((kz,Wa)=>{"use strict";Wa.exports=EvalError});var Xa=w((Oz,Ka)=>{"use strict";Ka.exports=RangeError});var Qa=w((Dz,Ya)=>{"use strict";Ya.exports=ReferenceError});var ts=w((Rz,es)=>{"use strict";es.exports=SyntaxError});var Sr=w((Nz,rs)=>{"use strict";rs.exports=TypeError});var os=w((Cz,ns)=>{"use strict";ns.exports=URIError});var as=w((Uz,is)=>{"use strict";is.exports=Math.abs});var us=w((Mz,ss)=>{"use strict";ss.exports=Math.floor});var ps=w((jz,cs)=>{"use strict";cs.exports=Math.max});var ds=w((Lz,ls)=>{"use strict";ls.exports=Math.min});var fs=w((Fz,ms)=>{"use strict";ms.exports=Math.pow});var ys=w((Bz,gs)=>{"use strict";gs.exports=Math.round});var vs=w((Vz,hs)=>{"use strict";hs.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Ps=w((Hz,xs)=>{"use strict";var rd=vs();xs.exports=i(function(t){return rd(t)||t===0?t:t<0?-1:1},"sign")});var bs=w((Gz,_s)=>{"use strict";_s.exports=Object.getOwnPropertyDescriptor});var Mn=w((Wz,Is)=>{"use strict";var zr=bs();if(zr)try{zr([],"length")}catch{zr=null}Is.exports=zr});var $s=w((Jz,Ts)=>{"use strict";var wr=Object.defineProperty||!1;if(wr)try{wr({},"a",{value:1})}catch{wr=!1}Ts.exports=wr});var jn=w((Kz,Es)=>{"use strict";Es.exports=i(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 o=42;t[r]=o;for(var s 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 u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,r);if(c.value!==o||c.enumerable!==!0)return!1}return!0},"hasSymbols")});var zs=w((Yz,Ss)=>{"use strict";var As=typeof Symbol<"u"&&Symbol,nd=jn();Ss.exports=i(function(){return typeof As!="function"||typeof Symbol!="function"||typeof As("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:nd()},"hasNativeSymbols")});var Ln=w((ew,ws)=>{"use strict";ws.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Fn=w((tw,ks)=>{"use strict";var od=Un();ks.exports=od.getPrototypeOf||null});var Rs=w((rw,Ds)=>{"use strict";var id="Function.prototype.bind called on incompatible ",ad=Object.prototype.toString,sd=Math.max,ud="[object Function]",Os=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var s=0;s<r.length;s+=1)n[s+t.length]=r[s];return n},"concatty"),cd=i(function(t,r){for(var n=[],o=r||0,s=0;o<t.length;o+=1,s+=1)n[s]=t[o];return n},"slicy"),pd=i(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");Ds.exports=i(function(t){var r=this;if(typeof r!="function"||ad.apply(r)!==ud)throw new TypeError(id+r);for(var n=cd(arguments,1),o,s=i(function(){if(this instanceof o){var h=r.apply(this,Os(n,arguments));return Object(h)===h?h:this}return r.apply(t,Os(n,arguments))},"binder"),u=sd(0,r.length-n.length),c=[],d=0;d<u;d++)c[d]="$"+d;if(o=Function("binder","return function ("+pd(c,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var f=i(function(){},"Empty");f.prototype=r.prototype,o.prototype=new f,f.prototype=null}return o},"bind")});var vt=w((ow,Ns)=>{"use strict";var ld=Rs();Ns.exports=Function.prototype.bind||ld});var kr=w((iw,Cs)=>{"use strict";Cs.exports=Function.prototype.call});var Bn=w((aw,Us)=>{"use strict";Us.exports=Function.prototype.apply});var js=w((sw,Ms)=>{"use strict";Ms.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Fs=w((uw,Ls)=>{"use strict";var dd=vt(),md=Bn(),fd=kr(),gd=js();Ls.exports=gd||dd.call(fd,md)});var Vs=w((cw,Bs)=>{"use strict";var yd=vt(),hd=Sr(),vd=kr(),xd=Fs();Bs.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new hd("a function is required");return xd(yd,vd,t)},"callBindBasic")});var Js=w((lw,Ws)=>{"use strict";var Pd=Vs(),Zs=Mn(),qs;try{qs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Vn=!!qs&&Zs&&Zs(Object.prototype,"__proto__"),Gs=Object,Hs=Gs.getPrototypeOf;Ws.exports=Vn&&typeof Vn.get=="function"?Pd([Vn.get]):typeof Hs=="function"?i(function(t){return Hs(t==null?t:Gs(t))},"getDunder"):!1});var eu=w((mw,Qs)=>{"use strict";var Ks=Ln(),Xs=Fn(),Ys=Js();Qs.exports=Ks?i(function(t){return Ks(t)},"getProto"):Xs?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Xs(t)},"getProto"):Ys?i(function(t){return Ys(t)},"getProto"):null});var Zn=w((gw,tu)=>{"use strict";var _d=Function.prototype.call,bd=Object.prototype.hasOwnProperty,Id=vt();tu.exports=Id.call(_d,bd)});var uu=w((yw,su)=>{"use strict";var W,Td=Un(),$d=Ga(),Ed=Ja(),Ad=Xa(),Sd=Qa(),bt=ts(),_t=Sr(),zd=os(),wd=as(),kd=us(),Od=ps(),Dd=ds(),Rd=fs(),Nd=ys(),Cd=Ps(),iu=Function,Hn=i(function(e){try{return iu('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Gt=Mn(),Ud=$s(),qn=i(function(){throw new _t},"throwTypeError"),Md=Gt?function(){try{return arguments.callee,qn}catch{try{return Gt(arguments,"callee").get}catch{return qn}}}():qn,xt=zs()(),fe=eu(),jd=Fn(),Ld=Ln(),au=Bn(),Wt=kr(),Pt={},Fd=typeof Uint8Array>"u"||!fe?W:fe(Uint8Array),ot={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?W:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?W:ArrayBuffer,"%ArrayIteratorPrototype%":xt&&fe?fe([][Symbol.iterator]()):W,"%AsyncFromSyncIteratorPrototype%":W,"%AsyncFunction%":Pt,"%AsyncGenerator%":Pt,"%AsyncGeneratorFunction%":Pt,"%AsyncIteratorPrototype%":Pt,"%Atomics%":typeof Atomics>"u"?W:Atomics,"%BigInt%":typeof BigInt>"u"?W:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?W:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?W:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?W:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$d,"%eval%":eval,"%EvalError%":Ed,"%Float16Array%":typeof Float16Array>"u"?W:Float16Array,"%Float32Array%":typeof Float32Array>"u"?W:Float32Array,"%Float64Array%":typeof Float64Array>"u"?W:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?W:FinalizationRegistry,"%Function%":iu,"%GeneratorFunction%":Pt,"%Int8Array%":typeof Int8Array>"u"?W:Int8Array,"%Int16Array%":typeof Int16Array>"u"?W:Int16Array,"%Int32Array%":typeof Int32Array>"u"?W:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xt&&fe?fe(fe([][Symbol.iterator]())):W,"%JSON%":typeof JSON=="object"?JSON:W,"%Map%":typeof Map>"u"?W:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xt||!fe?W:fe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Td,"%Object.getOwnPropertyDescriptor%":Gt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?W:Promise,"%Proxy%":typeof Proxy>"u"?W:Proxy,"%RangeError%":Ad,"%ReferenceError%":Sd,"%Reflect%":typeof Reflect>"u"?W:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?W:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xt||!fe?W:fe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?W:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xt&&fe?fe(""[Symbol.iterator]()):W,"%Symbol%":xt?Symbol:W,"%SyntaxError%":bt,"%ThrowTypeError%":Md,"%TypedArray%":Fd,"%TypeError%":_t,"%Uint8Array%":typeof Uint8Array>"u"?W:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?W:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?W:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?W:Uint32Array,"%URIError%":zd,"%WeakMap%":typeof WeakMap>"u"?W:WeakMap,"%WeakRef%":typeof WeakRef>"u"?W:WeakRef,"%WeakSet%":typeof WeakSet>"u"?W:WeakSet,"%Function.prototype.call%":Wt,"%Function.prototype.apply%":au,"%Object.defineProperty%":Ud,"%Object.getPrototypeOf%":jd,"%Math.abs%":wd,"%Math.floor%":kd,"%Math.max%":Od,"%Math.min%":Dd,"%Math.pow%":Rd,"%Math.round%":Nd,"%Math.sign%":Cd,"%Reflect.getPrototypeOf%":Ld};if(fe)try{null.error}catch(e){ru=fe(fe(e)),ot["%Error.prototype%"]=ru}var ru,Bd=i(function e(t){var r;if(t==="%AsyncFunction%")r=Hn("async function () {}");else if(t==="%GeneratorFunction%")r=Hn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Hn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&fe&&(r=fe(o.prototype))}return ot[t]=r,r},"doEval"),nu={__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"]},Jt=vt(),Or=Zn(),Vd=Jt.call(Wt,Array.prototype.concat),Zd=Jt.call(au,Array.prototype.splice),ou=Jt.call(Wt,String.prototype.replace),Dr=Jt.call(Wt,String.prototype.slice),Hd=Jt.call(Wt,RegExp.prototype.exec),qd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gd=/\\(\\)?/g,Wd=i(function(t){var r=Dr(t,0,1),n=Dr(t,-1);if(r==="%"&&n!=="%")throw new bt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new bt("invalid intrinsic syntax, expected opening `%`");var o=[];return ou(t,qd,function(s,u,c,d){o[o.length]=c?ou(d,Gd,"$1"):u||s}),o},"stringToPath"),Jd=i(function(t,r){var n=t,o;if(Or(nu,n)&&(o=nu[n],n="%"+o[0]+"%"),Or(ot,n)){var s=ot[n];if(s===Pt&&(s=Bd(n)),typeof s>"u"&&!r)throw new _t("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:s}}throw new bt("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");su.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new _t("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new _t('"allowMissing" argument must be a boolean');if(Hd(/^%?[^%]*%?$/,t)===null)throw new bt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wd(t),o=n.length>0?n[0]:"",s=Jd("%"+o+"%",r),u=s.name,c=s.value,d=!1,f=s.alias;f&&(o=f[0],Zd(n,Vd([0,1],f)));for(var h=1,I=!0;h<n.length;h+=1){var P=n[h],p=Dr(P,0,1),m=Dr(P,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new bt("property names with quotes must have matching quotes");if((P==="constructor"||!I)&&(d=!0),o+="."+P,u="%"+o+"%",Or(ot,u))c=ot[u];else if(c!=null){if(!(P in c)){if(!r)throw new _t("base intrinsic for "+t+" exists, but the property is not available.");return}if(Gt&&h+1>=n.length){var y=Gt(c,P);I=!!y,I&&"get"in y&&!("originalValue"in y.get)?c=y.get:c=c[P]}else I=Or(c,P),c=c[P];I&&!d&&(ot[u]=c)}}return c},"GetIntrinsic")});var pu=w((vw,cu)=>{"use strict";var Kd=jn();cu.exports=i(function(){return Kd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var mu=w((Pw,du)=>{"use strict";var Xd=uu(),lu=Xd("%Object.defineProperty%",!0),Yd=pu()(),Qd=Zn(),em=Sr(),Rr=Yd?Symbol.toStringTag:null;du.exports=i(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new em("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Rr&&(n||!Qd(t,Rr))&&(lu?lu(t,Rr,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[Rr]=r)},"setToStringTag")});var gu=w((bw,fu)=>{"use strict";var tm=Function.prototype.call,rm=Object.prototype.hasOwnProperty,nm=vt();fu.exports=nm.call(tm,rm)});var hu=w((Iw,yu)=>{"use strict";yu.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Xn=w((Tw,xu)=>{"use strict";var Kn=ba(),om=require("util"),Gn=require("path"),im=require("http"),am=require("https"),sm=require("url").parse,um=require("fs"),cm=require("stream").Stream,pm=require("crypto"),Wn=Aa(),lm=Za(),dm=mu(),We=gu(),Jn=hu();function vu(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(vu,"escapeHeaderParam");function K(e){if(!(this instanceof K))return new K(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Kn.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(K,"FormData");om.inherits(K,Kn);K.LINE_BREAK=`\r
2
+ `;K.DEFAULT_CONTENT_TYPE="application/octet-stream";K.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Kn.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 o=this._multiPartHeader(e,t,r),s=this._multiPartFooter();n(o),n(t),n(s),this._trackLength(o,t,r)};K.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+K.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&We(t,"httpVersion"))&&!(t instanceof cm))&&(r.knownLength||this._valuesToMeasure.push(t))};K.prototype._lengthRetriever=function(e,t){We(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):um.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):We(e,"httpVersion")?t(null,Number(e.headers["content-length"])):We(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};K.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),s="",u={"Content-Disposition":["form-data",'name="'+vu(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&Jn(u,r.header);var c;for(var d in u)if(We(u,d)){if(c=u[d],c==null)continue;Array.isArray(c)||(c=[c]),c.length&&(s+=d+": "+c.join("; ")+K.LINE_BREAK)}return"--"+this.getBoundary()+K.LINE_BREAK+s+K.LINE_BREAK};K.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=Gn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=Gn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&We(e,"httpVersion")&&(r=Gn.basename(e.client._httpMessage.path||"")),r)return'filename="'+vu(r)+'"'};K.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=Wn.lookup(e.name)),!r&&e&&e.path&&(r=Wn.lookup(e.path)),!r&&e&&e.readable&&We(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Wn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=K.DEFAULT_CONTENT_TYPE),r};K.prototype._multiPartFooter=function(){return function(e){var t=K.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};K.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+K.LINE_BREAK};K.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)We(e,t)&&(r[t.toLowerCase()]=e[t]);return r};K.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};K.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};K.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(K.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};K.prototype._generateBoundary=function(){this._boundary="--------------------------"+pm.randomBytes(12).toString("hex")};K.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};K.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};K.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}lm.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};K.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=sm(e),n=Jn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=Jn(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=am.request(n):r=im.request(n),this.getLength(function(s,u){if(s&&s!=="Unknown stream"){this._error(s);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),t){var c,d=i(function(f,h){return r.removeListener("error",d),r.removeListener("response",c),t.call(this,f,h)},"callback");c=d.bind(this,null),r.on("error",d),r.on("response",c)}}.bind(this)),r};K.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};K.prototype.toString=function(){return"[object FormData]"};dm(K.prototype,"FormData");xu.exports=K});var Kt=w((Qn,eo)=>{(function(e,t){typeof Qn=="object"&&typeof eo<"u"?eo.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Qn,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",s="minute",u="hour",c="day",d="week",f="month",h="quarter",I="year",P="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i(function(j){var $=["th","st","nd","rd"],T=j%100;return"["+j+($[(T-20)%10]||$[T]||$[0])+"]"},"ordinal")},x=i(function(j,$,T){var S=String(j);return!S||S.length>=$?j:""+Array($+1-S.length).join(T)+j},"m"),_={s:x,z:i(function(j){var $=-j.utcOffset(),T=Math.abs($),S=Math.floor(T/60),E=T%60;return($<=0?"+":"-")+x(S,2,"0")+":"+x(E,2,"0")},"z"),m:i(function j($,T){if($.date()<T.date())return-j(T,$);var S=12*(T.year()-$.year())+(T.month()-$.month()),E=$.clone().add(S,f),V=T-E<0,Z=$.clone().add(S+(V?-1:1),f);return+(-(S+(T-E)/(V?E-Z:Z-E))||0)},"t"),a:i(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:i(function(j){return{M:f,y:I,w:d,d:c,D:P,h:u,m:s,s:o,ms:n,Q:h}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(j){return j===void 0},"u")},B="en",ce={};ce[B]=g;var ve=i(function(j){return j instanceof at},"p"),we=i(function j($,T,S){var E;if(!$)return B;if(typeof $=="string"){var V=$.toLowerCase();ce[V]&&(E=V),T&&(ce[V]=T,E=V);var Z=$.split("-");if(!E&&Z.length>1)return j(Z[0])}else{var te=$.name;ce[te]=$,E=te}return!S&&E&&(B=E),E||!S&&B},"t"),ee=i(function(j,$){if(ve(j))return j.clone();var T=typeof $=="object"?$:{};return T.date=j,T.args=arguments,new at(T)},"w"),G=_;G.l=we,G.i=ve,G.w=function(j,$){return ee(j,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var at=function(){function j(T){this.$L=we(T.locale,null,!0),this.parse(T)}i(j,"M");var $=j.prototype;return $.parse=function(T){this.$d=function(S){var E=S.date,V=S.utc;if(E===null)return new Date(NaN);if(G.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Z=E.match(m);if(Z){var te=Z[2]-1||0,pe=(Z[7]||"0").substring(0,3);return V?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,pe)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,pe)}}return new Date(E)}(T),this.$x=T.x||{},this.init()},$.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},$.$utils=function(){return G},$.isValid=function(){return this.$d.toString()!==p},$.isSame=function(T,S){var E=ee(T);return this.startOf(S)<=E&&E<=this.endOf(S)},$.isAfter=function(T,S){return ee(T)<this.startOf(S)},$.isBefore=function(T,S){return this.endOf(S)<ee(T)},$.$g=function(T,S,E){return G.u(T)?this[S]:this.set(E,T)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(T,S){var E=this,V=!!G.u(S)||S,Z=G.p(T),te=i(function(Ye,Pe){var Le=G.w(E.$u?Date.UTC(E.$y,Pe,Ye):new Date(E.$y,Pe,Ye),E);return V?Le:Le.endOf(c)},"l"),pe=i(function(Ye,Pe){return G.w(E.toDate()[Ye].apply(E.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(Pe)),E)},"$"),me=this.$W,ye=this.$M,$e=this.$D,st="set"+(this.$u?"UTC":"");switch(Z){case I:return V?te(1,0):te(31,11);case f:return V?te(1,ye):te(0,ye+1);case d:var Xe=this.$locale().weekStart||0,Tt=(me<Xe?me+7:me)-Xe;return te(V?$e-Tt:$e+(6-Tt),ye);case c:case P:return pe(st+"Hours",0);case u:return pe(st+"Minutes",1);case s:return pe(st+"Seconds",2);case o:return pe(st+"Milliseconds",3);default:return this.clone()}},$.endOf=function(T){return this.startOf(T,!1)},$.$set=function(T,S){var E,V=G.p(T),Z="set"+(this.$u?"UTC":""),te=(E={},E[c]=Z+"Date",E[P]=Z+"Date",E[f]=Z+"Month",E[I]=Z+"FullYear",E[u]=Z+"Hours",E[s]=Z+"Minutes",E[o]=Z+"Seconds",E[n]=Z+"Milliseconds",E)[V],pe=V===c?this.$D+(S-this.$W):S;if(V===f||V===I){var me=this.clone().set(P,1);me.$d[te](pe),me.init(),this.$d=me.set(P,Math.min(this.$D,me.daysInMonth())).$d}else te&&this.$d[te](pe);return this.init(),this},$.set=function(T,S){return this.clone().$set(T,S)},$.get=function(T){return this[G.p(T)]()},$.add=function(T,S){var E,V=this;T=Number(T);var Z=G.p(S),te=i(function(ye){var $e=ee(V);return G.w($e.date($e.date()+Math.round(ye*T)),V)},"y");if(Z===f)return this.set(f,this.$M+T);if(Z===I)return this.set(I,this.$y+T);if(Z===c)return te(1);if(Z===d)return te(7);var pe=(E={},E[s]=t,E[u]=r,E[o]=e,E)[Z]||1,me=this.$d.getTime()+T*pe;return G.w(me,this)},$.subtract=function(T,S){return this.add(-1*T,S)},$.format=function(T){var S=this,E=this.$locale();if(!this.isValid())return E.invalidDate||p;var V=T||"YYYY-MM-DDTHH:mm:ssZ",Z=G.z(this),te=this.$H,pe=this.$m,me=this.$M,ye=E.weekdays,$e=E.months,st=E.meridiem,Xe=i(function(Pe,Le,$t,Xt){return Pe&&(Pe[Le]||Pe(S,V))||$t[Le].slice(0,Xt)},"h"),Tt=i(function(Pe){return G.s(te%12||12,Pe,"0")},"d"),Ye=st||function(Pe,Le,$t){var Xt=Pe<12?"AM":"PM";return $t?Xt.toLowerCase():Xt};return V.replace(y,function(Pe,Le){return Le||function($t){switch($t){case"YY":return String(S.$y).slice(-2);case"YYYY":return G.s(S.$y,4,"0");case"M":return me+1;case"MM":return G.s(me+1,2,"0");case"MMM":return Xe(E.monthsShort,me,$e,3);case"MMMM":return Xe($e,me);case"D":return S.$D;case"DD":return G.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return Xe(E.weekdaysMin,S.$W,ye,2);case"ddd":return Xe(E.weekdaysShort,S.$W,ye,3);case"dddd":return ye[S.$W];case"H":return String(te);case"HH":return G.s(te,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return Ye(te,pe,!0);case"A":return Ye(te,pe,!1);case"m":return String(pe);case"mm":return G.s(pe,2,"0");case"s":return String(S.$s);case"ss":return G.s(S.$s,2,"0");case"SSS":return G.s(S.$ms,3,"0");case"Z":return Z}return null}(Pe)||Z.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(T,S,E){var V,Z=this,te=G.p(S),pe=ee(T),me=(pe.utcOffset()-this.utcOffset())*t,ye=this-pe,$e=i(function(){return G.m(Z,pe)},"D");switch(te){case I:V=$e()/12;break;case f:V=$e();break;case h:V=$e()/3;break;case d:V=(ye-me)/6048e5;break;case c:V=(ye-me)/864e5;break;case u:V=ye/r;break;case s:V=ye/t;break;case o:V=ye/e;break;default:V=ye}return E?V:G.a(V)},$.daysInMonth=function(){return this.endOf(f).$D},$.$locale=function(){return ce[this.$L]},$.locale=function(T,S){if(!T)return this.$L;var E=this.clone(),V=we(T,S,!0);return V&&(E.$L=V),E},$.clone=function(){return G.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},j}(),Ke=at.prototype;return ee.prototype=Ke,[["$ms",n],["$s",o],["$m",s],["$H",u],["$W",c],["$M",f],["$y",I],["$D",P]].forEach(function(j){Ke[j[1]]=function($){return this.$g($,j[0],j[1])}}),ee.extend=function(j,$){return j.$i||(j($,at,ee),j.$i=!0),ee},ee.locale=we,ee.isDayjs=ve,ee.unix=function(j){return ee(1e3*j)},ee.en=ce[B],ee.Ls=ce,ee.p={},ee})});var Sm={};ro(Sm,{jiraDataCenter:()=>Am});module.exports=ec(Sm);var tc=Object.freeze({status:"aborted"});function A(e,t,r){function n(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:u,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);let f=u.prototype,h=Object.keys(f);for(let I=0;I<h.length;I++){let P=h[I];P in c||(c[P]=f[P].bind(c))}}i(n,"init");let o=r?.Parent??Object;class s extends o{static{i(this,"Definition")}}Object.defineProperty(s,"name",{value:e});function u(c){var d;let f=r?.Parent?new s:this;n(f,c),(d=f._zod).deferred??(d.deferred=[]);for(let h of f._zod.deferred)h();return f}return i(u,"_"),Object.defineProperty(u,"init",{value:n}),Object.defineProperty(u,Symbol.hasInstance,{value:i(c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e),"value")}),Object.defineProperty(u,"name",{value:e}),u}i(A,"$constructor");var rc=Symbol("zod_brand"),ke=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Yt=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Hr={};function Re(e){return e&&Object.assign(Hr,e),Hr}i(Re,"config");function Gr(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}i(Gr,"getEnumValues");function io(e,t){return typeof t=="bigint"?t.toString():t}i(io,"jsonStringifyReplacer");function er(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(er,"cached");function ao(e){return e==null}i(ao,"nullish");function tr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(tr,"cleanRegex");var oo=Symbol("evaluating");function le(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==oo)return n===void 0&&(n=oo,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(le,"defineLazy");var Wr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function At(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(At,"isObject");var nc=er(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function so(e){if(At(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(At(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(so,"isPlainObject");var uo=new Set(["string","number","symbol"]);function ut(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ut,"escapeRegex");function rr(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}i(rr,"clone");function re(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>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:i(()=>t.error,"error")}:t}i(re,"normalizeParams");function co(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(co,"optionalKeys");var oc={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 ct(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}i(ct,"aborted");function Fe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Fe,"prefixIssues");function Qt(e){return typeof e=="string"?e:e?.message}i(Qt,"unwrapMessage");function Be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Qt(e.inst?._zod.def?.error?.(e))??Qt(t?.error?.(e))??Qt(r.customError?.(e))??Qt(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(Be,"finalizeIssue");function po(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(po,"getLengthableOrigin");function Jr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(Jr,"issue");var lo=i((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,io,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),mo=A("$ZodError",lo),St=A("$ZodError",lo,{Parent:Error});var ac=i(e=>(t,r,n,o)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},u=t._zod.run({value:r,issues:[]},s);if(u instanceof Promise)throw new ke;if(u.issues.length){let c=new(o?.Err??e)(u.issues.map(d=>Be(d,s,Re())));throw Wr(c,o?.callee),c}return u.value},"_parse"),nr=ac(St),sc=i(e=>async(t,r,n,o)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},s);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new(o?.Err??e)(u.issues.map(d=>Be(d,s,Re())));throw Wr(c,o?.callee),c}return u.value},"_parseAsync"),or=sc(St),uc=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ke;return s.issues.length?{success:!1,error:new(e??mo)(s.issues.map(u=>Be(u,o,Re())))}:{success:!0,data:s.value}},"_safeParse"),zt=uc(St),cc=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(u=>Be(u,o,Re())))}:{success:!0,data:s.value}},"_safeParseAsync"),Qe=cc(St);var pc="(?:(?:\\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])))",lc=new RegExp(`^${pc}$`);var fo=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),go=/^-?\d+n?$/;var Kr=/^-?\d+(?:\.\d+)?$/,yo=/^(?:true|false)$/i;var Ve=A("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ho={number:"number",bigint:"bigint",object:"date"},vo=A("$ZodCheckLessThan",(e,t)=>{Ve.init(e,t);let r=ho[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xo=A("$ZodCheckGreaterThan",(e,t)=>{Ve.init(e,t);let r=ho[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var Po=A("$ZodCheckMinLength",(e,t)=>{var r;Ve.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ao(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let u=po(o);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var Xr=A("$ZodCheckStringFormat",(e,t)=>{var r,n;Ve.init(e,t),e._zod.onattach.push(o=>{let s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),_o=A("$ZodCheckRegex",(e,t)=>{Xr.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 Io={major:4,minor:3,patch:6};var ae=A("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Io;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((u,c,d)=>{let f=ct(u),h;for(let I of c){if(I._zod.def.when){if(!I._zod.def.when(u))continue}else if(f)continue;let P=u.issues.length,p=I._zod.check(u);if(p instanceof Promise&&d?.async===!1)throw new ke;if(h||p instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await p,u.issues.length!==P&&(f||(f=ct(u,P)))});else{if(u.issues.length===P)continue;f||(f=ct(u,P))}}return h?h.then(()=>u):u},"runChecks"),s=i((u,c,d)=>{if(ct(u))return u.aborted=!0,u;let f=o(c,n,d);if(f instanceof Promise){if(d.async===!1)throw new ke;return f.then(h=>e._zod.parse(h,d))}return e._zod.parse(f,d)},"handleCanaryResult");e._zod.run=(u,c)=>{if(c.skipChecks)return e._zod.parse(u,c);if(c.direction==="backward"){let f=e._zod.parse({value:u.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(h=>s(h,u,c)):s(f,u,c)}let d=e._zod.parse(u,c);if(d instanceof Promise){if(c.async===!1)throw new ke;return d.then(f=>o(f,n,c))}return o(d,n,c)}}le(e,"~standard",()=>({validate:i(o=>{try{let s=zt(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Qe(e,o).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},"validate"),vendor:"zod",version:1}))}),sr=A("$ZodString",(e,t)=>{ae.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??fo(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}}),Yr=A("$ZodStringFormat",(e,t)=>{Xr.init(e,t),sr.init(e,t)});var So=A("$ZodURL",(e,t)=>{Yr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.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(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var zo=A("$ZodNumber",(e,t)=>{ae.init(e,t),e._zod.pattern=e._zod.bag.pattern??Kr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}});var Qr=A("$ZodBoolean",(e,t)=>{ae.init(e,t),e._zod.pattern=yo,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),wo=A("$ZodBigInt",(e,t)=>{ae.init(e,t),e._zod.pattern=go,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 ko=A("$ZodAny",(e,t)=>{ae.init(e,t),e._zod.parse=r=>r}),Oo=A("$ZodUnknown",(e,t)=>{ae.init(e,t),e._zod.parse=r=>r});var Do=A("$ZodVoid",(e,t)=>{ae.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Ro=A("$ZodDate",(e,t)=>{ae.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),r}});function To(e,t,r){e.issues.length&&t.issues.push(...Fe(r,e.issues)),t.value[r]=e.value}i(To,"handleArrayResult");var No=A("$ZodArray",(e,t)=>{ae.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let s=[];for(let u=0;u<o.length;u++){let c=o[u],d=t.element._zod.run({value:c,issues:[]},n);d instanceof Promise?s.push(d.then(f=>To(f,r,u))):To(d,r,u)}return s.length?Promise.all(s).then(()=>r):r}});function ar(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Fe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(ar,"handlePropertyResult");function dc(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=co(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(dc,"normalizeDef");function mc(e,t,r,n,o,s){let u=[],c=o.keySet,d=o.catchall._zod,f=d.def.type,h=d.optout==="optional";for(let I in t){if(c.has(I))continue;if(f==="never"){u.push(I);continue}let P=d.run({value:t[I],issues:[]},n);P instanceof Promise?e.push(P.then(p=>ar(p,r,I,t,h))):ar(P,r,I,t,h)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}i(mc,"handleCatchall");var Co=A("$ZodObject",(e,t)=>{if(ae.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let d={...c};return Object.defineProperty(t,"shape",{value:d}),d},"get")})}let n=er(()=>dc(t));le(e._zod,"propValues",()=>{let c=t.shape,d={};for(let f in c){let h=c[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let I of h.values)d[f].add(I)}}return d});let o=At,s=t.catchall,u;e._zod.parse=(c,d)=>{u??(u=n.value);let f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};let h=[],I=u.shape;for(let P of u.keys){let p=I[P],m=p._zod.optout==="optional",y=p._zod.run({value:f[P],issues:[]},d);y instanceof Promise?h.push(y.then(g=>ar(g,c,P,f,m))):ar(y,c,P,f,m)}return s?mc(h,f,c,d,n.value,e):h.length?Promise.all(h).then(()=>c):c}});function $o(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let o=e.filter(s=>!ct(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(u=>Be(u,n,Re())))}),t)}i($o,"handleUnionResults");var en=A("$ZodUnion",(e,t)=>{ae.init(e,t),le(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),le(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),le(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),le(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>tr(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let u=!1,c=[];for(let d of t.options){let f=d._zod.run({value:o.value,issues:[]},s);if(f instanceof Promise)c.push(f),u=!0;else{if(f.issues.length===0)return f;c.push(f)}}return u?Promise.all(c).then(d=>$o(d,o,e,s)):$o(c,o,e,s)}});var Uo=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,en.init(e,t);let r=e._zod.parse;le(e._zod,"propValues",()=>{let o={};for(let s of t.options){let u=s._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[c,d]of Object.entries(u)){o[c]||(o[c]=new Set);for(let f of d)o[c].add(f)}}return o});let n=er(()=>{let o=t.options,s=new Map;for(let u of o){let c=u._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let d of c){if(s.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);s.set(d,u)}}return s});e._zod.parse=(o,s)=>{let u=o.value;if(!At(u))return o.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),o;let c=n.value.get(u?.[t.discriminator]);return c?c._zod.run(o,s):t.unionFallback?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:u,path:[t.discriminator],inst:e}),o)}});var Mo=A("$ZodRecord",(e,t)=>{ae.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!so(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let s=[],u=t.keyType._zod.values;if(u){r.value={};let c=new Set;for(let f of u)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){c.add(typeof f=="number"?f.toString():f);let h=t.valueType._zod.run({value:o[f],issues:[]},n);h instanceof Promise?s.push(h.then(I=>{I.issues.length&&r.issues.push(...Fe(f,I.issues)),r.value[f]=I.value})):(h.issues.length&&r.issues.push(...Fe(f,h.issues)),r.value[f]=h.value)}let d;for(let f in o)c.has(f)||(d=d??[],d.push(f));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d})}else{r.value={};for(let c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let d=t.keyType._zod.run({value:c,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&Kr.test(c)&&d.issues.length){let I=t.keyType._zod.run({value:Number(c),issues:[]},n);if(I instanceof Promise)throw new Error("Async schemas not supported in object keys currently");I.issues.length===0&&(d=I)}if(d.issues.length){t.mode==="loose"?r.value[c]=o[c]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(I=>Be(I,n,Re())),input:c,path:[c],inst:e});continue}let h=t.valueType._zod.run({value:o[c],issues:[]},n);h instanceof Promise?s.push(h.then(I=>{I.issues.length&&r.issues.push(...Fe(c,I.issues)),r.value[d.value]=I.value})):(h.issues.length&&r.issues.push(...Fe(c,h.issues)),r.value[d.value]=h.value)}}return s.length?Promise.all(s).then(()=>r):r}});var jo=A("$ZodEnum",(e,t)=>{ae.init(e,t);let r=Gr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>uo.has(typeof o)).map(o=>typeof o=="string"?ut(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{let u=o.value;return n.has(u)||o.issues.push({code:"invalid_value",values:r,input:u,inst:e}),o}}),Lo=A("$ZodLiteral",(e,t)=>{if(ae.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"?ut(n):n?ut(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}});var Fo=A("$ZodTransform",(e,t)=>{ae.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Yt(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(u=>(r.value=u,r));if(o instanceof Promise)throw new ke;return r.value=o,r}});function Eo(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(Eo,"handleOptionalResult");var Bo=A("$ZodOptional",(e,t)=>{ae.init(e,t),e._zod.optin="optional",e._zod.optout="optional",le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),le(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Eo(s,r.value)):Eo(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Vo=A("$ZodNullable",(e,t)=>{ae.init(e,t),le(e._zod,"optin",()=>t.innerType._zod.optin),le(e._zod,"optout",()=>t.innerType._zod.optout),le(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tr(r.source)}|null)$`):void 0}),le(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 Zo=A("$ZodPipe",(e,t)=>{ae.init(e,t),le(e._zod,"values",()=>t.in._zod.values),le(e._zod,"optin",()=>t.in._zod.optin),le(e._zod,"optout",()=>t.out._zod.optout),le(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(u=>ir(u,t.in,n)):ir(s,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>ir(s,t.out,n)):ir(o,t.out,n)}});function ir(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(ir,"handlePipeResult");var Ho=A("$ZodCustom",(e,t)=>{Ve.init(e,t),ae.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Ao(s,r,n,e));Ao(o,r,n,e)}});function Ao(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Jr(o))}}i(Ao,"handleRefineResult");var Go,hc=Symbol("ZodOutput"),vc=Symbol("ZodInput"),tn=class{static{i(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 o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Wo(){return new tn}i(Wo,"registry");(Go=globalThis).__zod_globalRegistry??(Go.__zod_globalRegistry=Wo());var rn=globalThis.__zod_globalRegistry;function Jo(e,t){return new e({type:"string",...re(t)})}i(Jo,"_string");function Ko(e,t){return new e({type:"string",coerce:!0,...re(t)})}i(Ko,"_coercedString");function Xo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(t)})}i(Xo,"_url");function Yo(e,t){return new e({type:"number",checks:[],...re(t)})}i(Yo,"_number");function Qo(e,t){return new e({type:"number",coerce:!0,checks:[],...re(t)})}i(Qo,"_coercedNumber");function ei(e,t){return new e({type:"boolean",...re(t)})}i(ei,"_boolean");function ti(e,t){return new e({type:"boolean",coerce:!0,...re(t)})}i(ti,"_coercedBoolean");function ri(e,t){return new e({type:"bigint",coerce:!0,...re(t)})}i(ri,"_coercedBigint");function ni(e){return new e({type:"any"})}i(ni,"_any");function oi(e){return new e({type:"unknown"})}i(oi,"_unknown");function ii(e,t){return new e({type:"void",...re(t)})}i(ii,"_void");function ai(e,t){return new e({type:"date",coerce:!0,...re(t)})}i(ai,"_coercedDate");function ur(e,t){return new vo({check:"less_than",...re(t),value:e,inclusive:!0})}i(ur,"_lte");function cr(e,t){return new xo({check:"greater_than",...re(t),value:e,inclusive:!0})}i(cr,"_gte");function Se(e,t){return new Po({check:"min_length",...re(t),minimum:e})}i(Se,"_minLength");function Ze(e,t){return new _o({check:"string_format",format:"regex",...re(t),pattern:e})}i(Ze,"_regex");function si(e,t,r){let n=re(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(si,"_custom");var de=A("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ae.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>nr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>zt(e,r,n),e.parseAsync=async(r,n)=>or(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Qe(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)=>rr(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),lr=A("ZodMiniString",(e,t)=>{sr.init(e,t),de.init(e,t)});function a(e){return Jo(lr,e)}i(a,"string");var ui=A("ZodMiniStringFormat",(e,t)=>{Yr.init(e,t),lr.init(e,t)});var Sc=A("ZodMiniURL",(e,t)=>{So.init(e,t),ui.init(e,t)});function dr(e){return Xo(Sc,e)}i(dr,"url");var nn=A("ZodMiniNumber",(e,t)=>{zo.init(e,t),de.init(e,t)});function ge(e){return Yo(nn,e)}i(ge,"number");var on=A("ZodMiniBoolean",(e,t)=>{Qr.init(e,t),de.init(e,t)});function Q(e){return ei(on,e)}i(Q,"boolean");var ci=A("ZodMiniBigInt",(e,t)=>{wo.init(e,t),de.init(e,t)});var zc=A("ZodMiniAny",(e,t)=>{ko.init(e,t),de.init(e,t)});function kt(){return ni(zc)}i(kt,"any");var wc=A("ZodMiniUnknown",(e,t)=>{Oo.init(e,t),de.init(e,t)});function U(){return oi(wc)}i(U,"unknown");var kc=A("ZodMiniVoid",(e,t)=>{Do.init(e,t),de.init(e,t)});function pi(e){return ii(kc,e)}i(pi,"_void");var li=A("ZodMiniDate",(e,t)=>{Ro.init(e,t),de.init(e,t)});var Oc=A("ZodMiniArray",(e,t)=>{No.init(e,t),de.init(e,t)});function L(e,t){return new Oc({type:"array",element:e,...re(t)})}i(L,"array");var Dc=A("ZodMiniObject",(e,t)=>{Co.init(e,t),de.init(e,t),le(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...re(t)};return new Dc(r)}i(l,"object");var Rc=A("ZodMiniUnion",(e,t)=>{en.init(e,t),de.init(e,t)});function F(e,t){return new Rc({type:"union",options:e,...re(t)})}i(F,"union");var Nc=A("ZodMiniDiscriminatedUnion",(e,t)=>{Uo.init(e,t),de.init(e,t)});function pt(e,t,r){return new Nc({type:"union",options:t,discriminator:e,...re(r)})}i(pt,"discriminatedUnion");var Cc=A("ZodMiniRecord",(e,t)=>{Mo.init(e,t),de.init(e,t)});function M(e,t,r){return new Cc({type:"record",keyType:e,valueType:t,...re(r)})}i(M,"record");var Uc=A("ZodMiniEnum",(e,t)=>{jo.init(e,t),de.init(e,t),e.options=Object.values(t.entries)});function q(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Uc({type:"enum",entries:r,...re(t)})}i(q,"_enum");var Mc=A("ZodMiniLiteral",(e,t)=>{Lo.init(e,t),de.init(e,t)});function k(e,t){return new Mc({type:"literal",values:Array.isArray(e)?e:[e],...re(t)})}i(k,"literal");var jc=A("ZodMiniTransform",(e,t)=>{Fo.init(e,t),de.init(e,t)});function He(e){return new jc({type:"transform",transform:e})}i(He,"transform");var Lc=A("ZodMiniOptional",(e,t)=>{Bo.init(e,t),de.init(e,t)});function v(e){return new Lc({type:"optional",innerType:e})}i(v,"optional");var Fc=A("ZodMiniNullable",(e,t)=>{Vo.init(e,t),de.init(e,t)});function Ot(e){return new Fc({type:"nullable",innerType:e})}i(Ot,"nullable");var Bc=A("ZodMiniPipe",(e,t)=>{Zo.init(e,t),de.init(e,t)});function qe(e,t){return new Bc({type:"pipe",in:e,out:t})}i(qe,"pipe");var Vc=A("ZodMiniCustom",(e,t)=>{Ho.init(e,t),de.init(e,t)});function mr(e,t){return si(Vc,e??(()=>!0),t)}i(mr,"custom");var Dt={};ro(Dt,{bigint:()=>Wc,boolean:()=>Gc,date:()=>Jc,number:()=>qc,string:()=>Hc});function Hc(e){return Ko(lr,e)}i(Hc,"string");function qc(e){return Qo(nn,e)}i(qc,"number");function Gc(e){return ti(on,e)}i(Gc,"boolean");function Wc(e){return ri(ci,e)}i(Wc,"bigint");function Jc(e){return ai(li,e)}i(Jc,"date");var sn=l({retryOnFailure:l({defaultValue:v(Q()),hide:v(Q())}),continueOnFailure:l({defaultValue:v(Q()),hide:v(Q())})}),an=class{constructor(t,r,n,o,s,u,c,d,f,h,I){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=s;this.test=u;this.requireAuth=c;this.errorHandlingOptions=d;this.outputSchema=f;this.audience=h;this.aiMetadata=I}static{i(this,"IAction")}},Y=i(e=>new an(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 X=l({displayName:a(),description:v(a())}),H=i((e,t)=>l({type:k(t),required:Q(),defaultValue:v(kt())}),"TPropertyValue");var Ie=l({...X.shape,...H(a(),"SHORT_TEXT").shape}),Ne=l({...X.shape,...H(a(),"LONG_TEXT").shape});var mi=l({label:a(),value:U()}),fr=l({disabled:v(Q()),placeholder:v(a()),options:L(mi)});var Te=l({...X.shape,options:fr,...H(U(),"STATIC_DROPDOWN").shape}),Ce=l({...X.shape,options:fr,...H(L(U()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var un=l({...X.shape,...H(U(),"DROPDOWN").shape,refreshers:L(a())}),Rt=l({...X.shape,...H(L(U()),"MULTI_SELECT_DROPDOWN").shape,refreshers:L(a())});var Ue=l({...X.shape,...H(Q(),"CHECKBOX").shape});var Me=l({...X.shape,...H(ge(),"NUMBER").shape});var Nt=l({...X.shape,...H(U(),"FILE").shape});var Ct=l({...X.shape,...H(a(),"DATE_TIME").shape});var fi=M(a(),F([Ie,Ne,Te,Rt,Ce,Ue,Me,Nt,Ct])),Ut=l({...X.shape,properties:fi,...H(L(U()),"ARRAY").shape});var Mt=l({...X.shape,...H(F([M(a(),U())]),"JSON").shape});var gi=F([Ie,Te,Mt,Ut,Ce]),Xc=M(a(),gi),cn=l({refreshers:L(a()),...X.shape,...H(U(),"DYNAMIC").shape});var gr=l({...X.shape,...H(pi(),"MARKDOWN").shape});var jt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(jt||{}),lt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(lt||{}),dt=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(dt||{});var Lt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Lt||{}),pn="both_client_credentials_and_authorization_code";var Oe=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Oe||{}),Ft=(s=>(s.NONE="NONE",s.HEADER_PRESENT="HEADER_PRESENT",s.QUERY_PRESENT="QUERY_PRESENT",s.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",s.HEAD_REQUEST="HEAD_REQUEST",s))(Ft||{}),Yc=l({strategy:q(Ft),paramName:v(a())}),Bt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Bt||{});var yr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(yr||{}),yi=l({status:v(ge()),body:v(U()),headers:v(M(a(),a()))}),hi=l({type:k("DELAY"),resumeDateTime:a(),requestIdToReply:v(a()),handlerId:v(a()),streamStepProgress:v(q(yr))}),vi=l({type:k("WEBHOOK"),requestId:a(),requestIdToReply:v(a()),response:yi,handlerId:v(a()),streamStepProgress:v(q(yr))}),Qc=F([hi,vi]);var ep=l({body:U(),rawBody:v(U()),headers:M(a(),a()),queryParams:M(a(),a())});function J(e){return e==null}i(J,"isNil");function Vt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}i(Vt,"isEmpty");function hr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(hr,"assertNotNullOrUndefined");var ln=Ae(require("crypto"),1);var tp=128,et,mt,rp=i(e=>{!et||et.length<e?(et=Buffer.allocUnsafe(e*tp),ln.default.randomFillSync(et),mt=0):mt+e>et.length&&(ln.default.randomFillSync(et),mt=0),mt+=e},"fillPool"),np=i(e=>(rp(e|=0),et.subarray(mt-e,mt)),"random"),op=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(s=t)=>{let u="";for(;;){let c=r(o),d=o;for(;d--;)if(u+=e[c[d]&n]||"",u.length===s)return u}}},"customRandom"),Pi=i((e,t=21)=>op(e,t,np),"customAlphabet");var ip="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_i=21,cI=a().check(Ze(new RegExp(`^[0-9a-zA-Z]{${_i}}$`))),ap=Pi(ip,_i);var Ge=qe(He(e=>e instanceof Date?e.toISOString():e),a()),Ee={id:a(),created:Ge,updated:Ge},oe=i(e=>v(Ot(e)),"Nullable");function dn(e){return v(Ot(q(e)))}i(dn,"NullableEnum");var dI=qe(He(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),v(Q())),vr=i(e=>qe(He(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),v(L(e))),"OptionalArrayFromQuery");var gI=M(a(),U());var Zt=(h=>(h.OPENAI="openai",h.OPENROUTER="openrouter",h.ANTHROPIC="anthropic",h.AZURE="azure",h.GOOGLE="google",h.ACTIVEPIECES="activepieces",h.CLOUDFLARE_GATEWAY="cloudflare-gateway",h.CUSTOM="custom",h.BEDROCK="bedrock",h.MISTRAL="mistral",h))(Zt||{});var AI=a().check(Ze(/^#[0-9A-Fa-f]{6}$/));var zI=l({filename:a(),data:U(),type:k("file"),mimetype:v(a())});var sp=Ae(Ii());var CI=l({...Ee,name:a(),permissions:L(a()),platformId:oe(a()),type:a(),userCount:v(ge())});var Ti=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ti||{}),mn=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(mn||{}),fn=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(fn||{});var gn=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(gn||{});var yn=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(yn||{});var up=l({mode:q(Ti),value:U()}),cp=l({auth:v(a()),fields:M(a(),up)}),pp=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:v(cp)}),lp=l({type:k("PIECE"),toolName:a().check(Se(1)),pieceMetadata:pp}),dp=l({type:k("none")}),mp=l({type:k("access_token"),accessToken:a()}),fp=l({type:k("api_key"),apiKey:a(),apiKeyHeader:a()}),gp=l({type:k("headers"),headers:M(a(),a())}),yp=pt("type",[dp,mp,fp,gp]),$i=l({type:k("FLOW"),toolName:a().check(Se(1)),externalFlowId:a(),flowDisplayName:v(a())}),Ei=l({type:k("MCP"),toolName:a().check(Se(1)),serverUrl:dr(),protocol:q(fn),auth:yp}),Ai=l({type:k("KNOWLEDGE_BASE"),toolName:a().check(Se(1)),sourceType:q(mn),sourceId:a(),sourceName:a()}),hp=pt("type",[lp,$i,Ei,Ai]),vp=l({displayName:a(),description:v(a()),type:q(gn)}),Si=l({type:k("MARKDOWN"),markdown:a()}),ft={type:k("TOOL_CALL"),input:oe(M(a(),U())),output:v(U()),toolName:a(),status:q(yn),toolCallId:a(),startTime:a(),endTime:v(a())},cT=l(ft),zi=pt("toolCallType",[l({...ft,toolCallType:k("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...ft,toolCallType:k("FLOW"),displayName:a(),externalFlowId:a()}),l({...ft,toolCallType:k("MCP"),displayName:a(),serverUrl:a()}),l({...ft,toolCallType:k("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...ft,toolCallType:k("UNKNOWN"),displayName:a()})]),xp=F([Si,zi]);var hn=(r=>(r.IMAGE="image",r.TEXT="text",r))(hn||{}),je=l({apiKey:a()}),Pp=je,_p=l({apiKey:a(),apiKeyHash:a()}),bp=je,Ip=je,Tp=je,$p=je,Ep=je,Ap=je,Sp=je,wi=l({accessKeyId:a().check(Se(1)),secretAccessKey:a().check(Se(1))}),zp=l({}),wp=l({}),kp=l({}),Op=l({}),Dp=l({}),Rp=l({}),ki=l({modelId:a(),modelName:a(),modelType:q(hn)}),Oi=l({apiKeyHeader:a(),baseUrl:a(),models:L(ki),defaultHeaders:v(M(a(),a()))}),Di=l({accountId:a(),gatewayId:a(),models:L(ki),vertexProject:v(a()),vertexRegion:v(a())}),Ri=l({resourceName:a(),apiVersion:qe(He(e=>typeof e=="string"&&e.trim().length===0?void 0:e),v(a()))}),Ni=l({region:a().check(Se(1))}),Np=F([Pp,Tp,$p,Ep,Ap,Ip,bp,_p,wi,Sp]),Ci=F([Oi,Di,Ri,Ni,zp,kp,Op,Dp,wp,Rp]),Cp=l({id:a(),name:a(),type:q(hn)}),Up=l({id:a(),name:a(),provider:q(Zt),config:Ci,enabledForChat:Q()}),Mp=l({provider:q(Zt),config:Ci,auth:Np,platformId:a()});var mT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var jp=l({base64Url:a(),fileName:a(),extension:v(a())}),Lp=l({mimeType:a(),url:a(),fileName:v(a())}),vn=F([jp,Lp]);var Fp=F([l({type:k("file"),value:vn}),l({type:k("markdown"),value:a(),files:v(L(vn))})]),Bp=l({sessionId:a(),message:a(),files:v(L(a()))});var Mi=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Mi||{}),ji=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ji||{}),xn=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(xn||{});var Vp=F([l({...Ee,name:a(),externalId:a(),type:k("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:L(l({value:a()}))})}),l({...Ee,name:a(),externalId:a(),type:F([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:a(),projectId:a()})]),Zp=l({...Ee,name:a(),folderId:oe(a()),projectId:a(),externalId:a(),status:dn(ji),trigger:dn(Mi)}),Hp=l({...Ee,tableId:a(),projectId:a(),cells:M(a(),l({updated:a(),created:a(),value:U(),fieldName:a()}))}),qp=l({events:L(q(xn)),webhookUrl:a(),flowId:a()}),Gp=l({fields:L(l({id:a(),name:a()})),rows:L(M(a(),a())),name:a()}),Wp=l({projectId:a(),limit:v(Dt.number()),cursor:v(a()),name:v(a()),externalIds:vr(a()),folderId:v(a()),folderIds:vr(a())}),Jp=l({records:L(L(l({fieldId:a(),value:Fi()}))),tableId:a()}),Kp=l({cells:v(L(l({fieldId:a(),value:Fi()}))),tableId:a(),agentUpdate:v(Q())}),Li=pt("operator",[tt("eq"),tt("neq"),tt("gt"),tt("gte"),tt("lt"),tt("lte"),tt("co"),Ui("exists"),Ui("not_exists")]),Xp=l({tableId:a(),limit:v(Dt.number()),cursor:v(a()),filters:vr(Li)});function Fi(){return qe(He(e=>e==null?e:String(e)),Ot(a()))}i(Fi,"coerceToString");function tt(e){return l({fieldId:a(),operator:k(e),value:a()})}i(tt,"valueFilter");function Ui(e){return l({fieldId:a(),operator:k(e)})}i(Ui,"existenceFilter");var Yp=l({status:v(ge()),body:v(U()),headers:v(M(a(),a()))}),Qp=l({...Ee,deleted:oe(Ge),ownerId:a(),displayName:a(),platformId:a(),externalId:oe(a())});var Bi=l({name:a(),description:v(a()),type:a(),required:Q()}),el=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:L(Bi),returnsResponse:Q()})});var Vi="^[0-9]+\\.[0-9]+\\.[0-9]+$",OT=new RegExp(Vi),rl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",DT=a().check(Ze(new RegExp(Vi))),RT=a().check(Ze(new RegExp(rl))),nl=l({packageType:k("ARCHIVE"),pieceType:q(lt),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Zi=l({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Hi=l({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),NT=F([Zi,Hi]),CT=F([nl,Zi,Hi]),qi=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(qi||{}),ol=l({type:q(qi),cronExpression:a(),timezone:a()}),UT=l({...Ee,type:q(Oe),projectId:a(),flowId:a(),triggerName:a(),schedule:oe(ol),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:oe(a()),simulate:Q()}),Gi=(g=>(g.UNKNOWN="UNKNOWN",g.FLOW_RUN_LOG="FLOW_RUN_LOG",g.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",g.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",g.FLOW_STEP_FILE="FLOW_STEP_FILE",g.SAMPLE_DATA="SAMPLE_DATA",g.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",g.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",g.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",g.PROJECT_RELEASE="PROJECT_RELEASE",g.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",g.PLATFORM_ASSET="PLATFORM_ASSET",g.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",g.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",g.KNOWLEDGE_BASE="KNOWLEDGE_BASE",g.FLOW_BUNDLE="FLOW_BUNDLE",g))(Gi||{}),Wi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Wi||{}),Ji=(r=>(r.S3="S3",r.DB="DB",r))(Ji||{}),MT=l({...Ee,projectId:oe(a()),platformId:oe(a()),type:q(Gi),compression:q(Wi),data:v(U()),location:q(Ji),size:oe(ge()),fileName:oe(a()),s3Key:oe(a()),metadata:oe(M(a(),a()))}),Ki=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Ki||{}),Xi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Xi||{}),jT=l({id:a(),email:a(),firstName:a(),status:q(Xi),externalId:oe(a()),platformId:oe(a()),platformRole:q(Ki),lastName:a(),created:Ge,updated:Ge,lastActiveDate:oe(Ge),imageUrl:oe(a())});var _n=l({...X.shape,...H(M(a(),U()),"OBJECT").shape});var ea=l({...X.shape,...H(a(),"COLOR").shape});var bn=F([Ie,Ne,gr,Ue,Te,Ce,un,Rt,cn,Me,Ut,_n,Mt,Ct,Nt,ea]),b={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var De=l({displayName:a(),description:v(a())});var ta=l({username:a(),password:a()}),In=l({...De.shape,username:l({displayName:a(),description:v(a())}),password:l({displayName:a(),description:v(a())}),...H(ta,"BASIC_AUTH").shape});var ul=M(a(),F([Ie,Ne,Me,Ue,Te])),Tn=l({...De.shape,props:ul,...H(U(),"CUSTOM_AUTH").shape});var rt=l({...De.shape,...H(l({auth:a()}),"SECRET_TEXT").shape});var cl=M(a(),F([Ie,Ne,rt,Me,Ue,Te,Ce,gr])),ra=l({...De.shape,props:cl,...H(U(),"OIDC").shape});var $n=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))($n||{}),na=F([Ie,rt,Te]),oa=M(a(),na),pl=l({props:v(M(a(),na)),authUrl:a(),tokenUrl:a(),scope:L(a()),prompt:v(F([k("none"),k("consent"),k("login"),k("omit")])),pkce:v(Q()),pkceMethod:v(F([k("plain"),k("S256")])),authorizationMethod:v(q($n)),grantType:v(F([q(Lt),k(pn)])),extra:v(M(a(),a()))}),ia=l({access_token:a(),props:v(oa),data:M(a(),kt())}),En=l({...De.shape,...pl.shape,...H(ia,"OAUTH2").shape});var gt=F([In,Tn,ra,En,rt]),Ht="Connection",Pr={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 hE={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 ll=l({...X.shape,...H(U(),"CUSTOM").shape,code:a()});var dl=F([bn,gt]),An=M(a(),dl),UE=M(a(),bn);var aa=F([l({strategy:k("CRON"),cronExpression:a()}),l({strategy:k("NONE")})]),yt=class{constructor(t,r,n,o,s,u,c,d,f,h,I,P,p,m,y,g,x,_,B){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=s;this.type=u;this.handshakeConfiguration=c;this.onHandshake=d;this.renewConfiguration=f;this.onRenew=h;this.onEnable=I;this.onDisable=P;this.onStart=p;this.run=m;this.test=y;this.sampleData=g;this.testStrategy=x;this.outputSchema=_;this.aiMetadata=B}static{i(this,"ITrigger")}},ht=i(e=>{switch(e.type){case"WEBHOOK":return new yt(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 yt(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 yt(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 yt(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,J(e.sampleData)&&J(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var sa="2",_r="0.82.0";var Sn=class{constructor(t,r,n,o,s,u,c,d,f=_r,h,I=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=c;this.auth=d;this.minimumSupportedRelease=f;this.maximumSupportedRelease=h;this.description=I;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:sa}),"getContextInfo");(!ml(f)||fl(f,_r))&&(this.minimumSupportedRelease=_r),s.forEach(P=>this._actions[P.name]=P),u.forEach(P=>this._triggers[P.name]=P)}static{i(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}},ua=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new Sn(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function ml(e){return/^\d+\.\d+\.\d+$/.test(e)}i(ml,"isValidSimpleSemver");function fl(e,t){let[r,n,o]=e.split(".").map(Number),[s,u,c]=t.split(".").map(Number);return r!==s?r<s:n!==u?n<u:o<c}i(fl,"isSemverLessThan");var gl=v(M(a(),M(a(),a()))),ca=l({id:v(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:L(a()),platformId:v(a()),directoryPath:v(a()),auth:v(F([gt,L(gt)])),version:a(),categories:v(L(q(dt))),minimumSupportedRelease:v(a()),maximumSupportedRelease:v(a()),i18n:gl}),yl=q(["human","ai","both"]),pa=l({description:v(a()),idempotent:v(Q())}),la=l({name:a(),displayName:a(),description:a(),props:An,requireAuth:Q(),errorHandlingOptions:v(sn),outputSchema:v(mr()),audience:v(yl),aiMetadata:v(pa)}),da=l({name:a(),displayName:a(),description:a(),props:An,errorHandlingOptions:v(sn),type:q(Oe),sampleData:U(),handshakeConfiguration:v(mr()),renewConfiguration:v(aa),testStrategy:q(Bt),outputSchema:v(mr()),aiMetadata:v(pa)}),hl=l({...ca.shape,actions:M(a(),la),triggers:M(a(),da)}),vl=l({...ca.shape,actions:ge(),triggers:ge(),suggestedActions:v(L(da)),suggestedTriggers:v(L(la))}),ma=l({projectUsage:ge(),tags:v(L(a())),pieceType:q(lt),packageType:q(jt),platformId:v(a()),archiveId:v(a())}),UA=l({...hl.shape,...ma.shape}),MA=l({...vl.shape,...ma.shape}),jA=l({name:a(),version:a()});var xl=Ae(require("path")),Pl=Ae(require("fs/promises"));var br=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((s,u)=>{o.append(u,s)}),{urlWithoutQueryParams:n,queryParams:o}}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 Ir=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new zn,r=new wn){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},zn=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},wn=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var Tr=class extends Error{constructor(r,n){let o=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:s},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=s}static{i(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 $r=class extends br{static{i(this,"FetchHttpClient")}constructor(t="",r=new Ir){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),s=this.getHeaders(t),u=t.queryParams??{};for(let[B,ce]of Object.entries(u))o.append(B,ce);let c=o.toString(),d=c?`${n}?${c}`:n,f=t.responseType??"json",h=t.followRedirects??!0,I=t.retries??0,{body:P,extraHeaders:p,isStream:m}=_l(t.body,s),y=Il({...s,...p}),g=await bl(async()=>{let B=new AbortController,ce=t.timeout&&t.timeout>0?setTimeout(()=>B.abort(),t.timeout):void 0;try{let ve={method:t.method.toString(),headers:y,body:P,redirect:h?"follow":"manual",signal:B.signal};return m&&(ve.duplex="half"),r?.dispatcher!==void 0&&(ve.dispatcher=r.dispatcher),await fetch(d,ve)}finally{ce!==void 0&&clearTimeout(ce)}},I),x=h?300:400;if(g.status<200||g.status>=x){let B=await fa(g,f),ce=new Tr(t.body,{status:g.status,responseBody:B});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ce),ce}let _=await fa(g,f);return{status:g.status,headers:Tl(g.headers),body:_}}};function _l(e,t){return El(e)?{body:void 0,extraHeaders:{},isStream:!1}:$l(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}}i(_l,"serializeBody");async function fa(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}}}}i(fa,"parseResponseBody");async function bl(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await ga(n);continue}return o}catch(o){if(r=o,n<t){await ga(n);continue}throw o}throw r}i(bl,"sendWithRetries");function ga(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(ga,"backoff");function Il(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}i(Il,"normalizeHeaders");function Tl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(Tl,"toHttpHeaders");function $l(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i($l,"isNodeFormData");function El(e){return e==null}i(El,"isNil");var nt=new $r;var qt=(u=>(u.GET="GET",u.POST="POST",u.PATCH="PATCH",u.PUT="PUT",u.DELETE="DELETE",u.HEAD="HEAD",u))(qt||{});var mm=Ae(require("fs")),Pu=Ae(Xn());var fm={"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 gm(e){let t=e.split(";")[0].trim().toLowerCase();return fm[t]??""}i(gm,"contentTypeToExtension");var ym=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),hm=i((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 _u({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:s,props:u,extraProps:c,authLocation:d="headers"}){return Y({audience:"human",name:s||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:b.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:f})=>({url:b.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${hm(t,f)}/resource or /resource`,required:!0,defaultValue:f?t(f):"",...u?.url??{}})}),"props")}),method:b.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(qt).map(f=>({label:f,value:f}))},...u?.method??{}}),headers:b.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...u?.headers??{}}),queryParams:b.Object({displayName:"Query Parameters",required:!0,...u?.queryParams??{}}),body_type:b.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:b.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:f})=>{if(!f)return{};let h=f,I={};switch(h){case"none":break;case"json":I.data=b.Json({displayName:"JSON Body",required:!0,...u?.body??{}});break;case"raw":I.data=b.LongText({displayName:"Raw Body",required:!0});break;case"form_data":I.data=b.Array({displayName:"Form Data",required:!0,properties:{fieldName:b.ShortText({displayName:"Field Name",required:!0}),fieldType:b.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:b.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:b.File({displayName:"File Field Value",required:!1})}});break}return I},"props")}),response_is_binary:b.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:b.Checkbox({displayName:"No Error on Failure",required:!1,...u?.failsafe??{}}),timeout:b.Number({displayName:"Timeout (in seconds)",required:!1,...u?.timeout??{}}),followRedirects:b.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...c},run:i(async f=>{let{method:h,url:I,headers:P,queryParams:p,body:m,body_type:y,failsafe:g,timeout:x,response_is_binary:_,followRedirects:B}=f.propsValue;hr(h,"Method"),hr(I,"URL");let ce=J(r)?{}:await r(f.auth,f.propsValue),ve=I.url,we=ve.startsWith("http://")||ve.startsWith("https://")?ve:ym({baseUrl:t(f.auth),relativePath:ve}),ee={method:h,url:we,headers:{...P??{},...d==="headers"||!J(d)?ce:{}},queryParams:{...d==="queryParams"?ce:{},...p??{}},timeout:x?x*1e3:0,followRedirects:B};if(_&&(ee.responseType="arraybuffer"),m)if(y&&y!=="none"){let G=m.data;if(y==="form_data"){let at=G,Ke=new Pu.default;for(let{fieldName:j,fieldType:$,textFieldValue:T,fileFieldValue:S}of at)$==="text"&&!Vt(T)?Ke.append(j,T):$==="file"&&!Vt(S)&&Ke.append(j,S.data,{filename:S?.filename});ee.body=Ke,ee.headers={...ee.headers,...Ke.getHeaders()}}else ee.body=G}else y||(ee.body=m);try{let G=await nt.sendRequest(ee);return await vm(f.files,G.body,G.status,G.headers,_)}catch(G){if(g)return G.errorMessage();throw G}},"run")})}i(_u,"createCustomApiCallAction");var vm=i(async(e,t,r,n,o)=>{let s;if(o&&xm(t)){let u=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],c=gm(u??"")||"txt",d;t instanceof ArrayBuffer?d=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?d=t:d=Buffer.from(t),s=await e.write({fileName:`output.${c}`,data:d})}else s=t;return{status:r,headers:n,body:s}},"handleBinaryResponse"),xm=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var xe={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:s,server:u}){switch(e.strategy){case 0:{let c=await t.get("lastPoll");if(J(c))throw new Error("lastPoll doesn't exist in the store.");let d=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:c,server:u}),f=d.reduce((h,I)=>Math.max(h,I.epochMilliSeconds),c);return await t.put("lastPoll",f),d.filter(h=>h.epochMilliSeconds>c).map(h=>h.data)}case 1:{let c=await t.get("lastItem"),d=await e.items({store:t,auth:r,propsValue:n,lastItemId:c,files:s,server:u}),f=d.findIndex(P=>P.id===c),h=[];J(c)||f==-1?h=d??[]:h=d?.slice(0,f)??[],J(o)||(h=h.slice(-o));let I=h?.[0]?.id;return J(I)||await t.put("lastItem",I),h.map(P=>P.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let u=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;J(u)?await t.delete("lastItem"):await t.put("lastItem",u);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:o,server:s}){let u=[];switch(e.strategy){case 0:{u=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{u=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:s});break}}return Pm(u.map(c=>c.data))}};function Pm(e){return e.length<=5?e:e.slice(0,5)}i(Pm,"getFirstFiveOrAll");var Nr={async validateZod(e,t){let r=l(Object.entries(t).reduce((o,[s,u])=>({...o,[s]:u}),{})),n=await Qe(r,e);if(!n.success){let o=n.error.issues.reduce((s,u)=>({...s,[u.path.join(".")]:u.message}),{});throw new Error(JSON.stringify({errors:o},null,2))}}};async function ne(e){return nt.sendRequest({...e,url:`${e.auth.props.instanceUrl}/rest/api/2/${e.url}`,authentication:{type:"BEARER_TOKEN",token:e.auth.props.personalAccessToken}})}i(ne,"sendJiraRequest");async function Yn(e){return(await ne({url:"user/search",method:"GET",auth:e,queryParams:{maxResults:"1000",username:"."}})).body}i(Yn,"getUsers");async function bu(e){return await ie({auth:e,method:"GET",resourceUri:"/project"})}i(bu,"getProjects");async function Je({auth:e,jql:t,maxResults:r}){return(await ne({auth:e,url:"search",method:"POST",body:{jql:t,maxResults:r,fields:["*all"]}})).body?.issues??[]}i(Je,"searchIssuesByJql");async function ie({auth:e,method:t,resourceUri:r,query:n,body:o}){let s=`${e.props.instanceUrl}/rest/api/2`,u={};if(n)for(let[f,h]of Object.entries(n))h!=null&&(u[f]=String(h));let c={method:t,url:s+r,queryParams:u,body:o,authentication:{type:"BEARER_TOKEN",token:e.props.personalAccessToken}};return(await nt.sendRequest(c)).body}i(ie,"jiraApiCall");async function It({auth:e,method:t,resourceUri:r,query:n,body:o,propertyName:s}){let u=n?{...n}:{};u.startAt=0,u.maxResults=100;let c=[],d=!0;do{let f=await ie({auth:e,method:t,resourceUri:r,query:u,body:o});if(J(f[s]))break;Array.isArray(f[s])&&c.push(...f[s]),u.startAt=u.startAt+100,d=f.isLast===void 0?f.startAt+f.maxResults<f.total:!f.isLast}while(d);return c}i(It,"jiraPaginatedApiCall");var D=Pr.CustomAuth({description:`
4
+ To generate a Personal Access Token (PAT):
5
+ 1. Log in to your Jira Data Center instance.
6
+ 2. Click your **profile icon** (top-right) \u2192 **Profile**.
7
+ 3. Go to **Personal Access Tokens** \u2192 **Create token**.
8
+ 4. Set a name and expiry, then copy the generated token.
9
+ `,required:!0,props:{instanceUrl:b.ShortText({displayName:"Instance URL",description:"The URL of your Jira Data Center instance (e.g. https://jira.yourcompany.com)",required:!0}),personalAccessToken:Pr.SecretText({displayName:"Personal Access Token",description:"Your Jira Data Center Personal Access Token (PAT)",required:!0})},validate:i(async({auth:e})=>{try{return await Nr.validateZod(e,{instanceUrl:a().check(dr())}),await ne({auth:{type:"CUSTOM_AUTH",props:e},method:"GET",url:"myself"}),{valid:!0}}catch(t){return{valid:!1,error:t.response?.body?.message??"Invalid credentials"}}},"validate")});var to=Ae(Kt());function he(e){return b.Dropdown({auth:D,displayName:e?.displayName??"Project ID or Key",description:e?.description,required:e?.required??!0,refreshers:e?.refreshers??[],options:i(async({auth:t})=>t?{options:(await bu(t)).map(n=>({label:n.name,value:n.key}))}:{options:[]},"options")})}i(he,"getProjectIdDropdown");function be(e){return b.Dropdown({auth:D,displayName:e?.displayName??"Issue ID or Key",description:e?.description,required:e?.required??!0,refreshers:e?.refreshers??[],options:i(async({auth:t,projectId:r})=>{if(!t||!r)return{disabled:!0,options:[]};let n=0,o=!0,s=[];do{let c=(await ne({method:"POST",url:"search",auth:t,body:{fields:["summary"],jql:`project=${r}`,startAt:n,maxResults:100}})).body;s.push(...c.issues.map(d=>({label:`[${d.key}] ${d.fields.summary}`,value:d.id}))),n+=100,o=n<c.total}while(o);return{disabled:!1,options:s}},"options")})}i(be,"getIssueIdDropdown");function Cr(e){return b.Dropdown({auth:D,displayName:e?.displayName??"User",description:e?.description,required:e?.required??!0,refreshers:e?.refreshers??[],options:i(async({auth:t,projectId:r})=>{if(!t)return{options:[]};let n=t,o;return r?o=(await ne({url:"user/assignable/search",method:"GET",auth:n,queryParams:{project:r,maxResults:"1000"}})).body:o=await Yn(n),{options:o.map(s=>({label:s.displayName,value:s.name??s.key}))}},"options")})}i(Cr,"getUsersDropdown");var Iu=i((e,t=!0)=>b.Dropdown({auth:D,displayName:e,refreshers:["projectId"],required:t,options:i(async({auth:r,projectId:n})=>{if(!r||!n)return{disabled:!0,options:[],placeholder:"Please connect your account first"};let s=await It({auth:r,resourceUri:`/issue/createmeta/${n}/issuetypes`,propertyName:"values",method:"GET"}),u=[];for(let c of s)u.push({value:c.id,label:c.name});return{disabled:!1,options:u}},"options")}),"issueTypeIdProp"),Tu=i((e,t=!0)=>b.Dropdown({auth:D,displayName:e,refreshers:[],required:t,options:i(async({auth:r})=>{if(!r)return{disabled:!0,options:[],placeholder:"Please connect your account first"};let o=await ie({auth:r,resourceUri:"/issueLinkType",method:"GET"}),s=[];for(let u of o.issueLinkTypes)s.push({value:u.id,label:u.inward});return{disabled:!1,options:s}},"options")}),"issueLinkTypeIdProp"),it=i((e,t=!0)=>b.Dropdown({auth:D,displayName:e,refreshers:[],required:t,options:i(async({auth:r})=>{if(!r)return{disabled:!0,options:[],placeholder:"Please connect your account first"};let o=await It({auth:r,resourceUri:"/search",propertyName:"issues",query:{fields:"summary"},method:"GET"}),s=[];for(let u of o)s.push({value:u.id,label:u.key});return{disabled:!1,options:s}},"options")}),"issueIdOrKeyProp"),$u=i((e,t=!0)=>b.Dropdown({auth:D,displayName:e,refreshers:["issueId"],required:t,options:i(async({auth:r,issueId:n})=>{if(!r||!n)return{disabled:!0,options:[],placeholder:"Please connect your account first and select an issue."};let s=await ie({auth:r,method:"GET",resourceUri:`/issue/${n}/transitions`}),u=[];for(let c of s.transitions??[])u.push({value:c.id,label:c.name});return{disabled:!1,options:u}},"options")}),"issueStatusIdProp");async function bm(e){let t=await ie({auth:e,method:"GET",resourceUri:"/groups/picker"}),r=[];for(let n of t.groups)r.push({value:n.name,label:n.name});return r}i(bm,"fetchGroupsOptions");async function Im(e,t){let r;return t?r=(await ne({url:"user/assignable/search",method:"GET",auth:e,queryParams:{project:t,maxResults:"1000"}})).body:r=await Yn(e),r.map(o=>({label:o.displayName,value:o.name??o.key}))}i(Im,"fetchUsersOptions");async function Ur(e,t,r=!1,n){let o=t.schema.type==="array";switch(o?t.schema.items:t.schema.type){case"user":{let u=await Im(e,n);return o?b.StaticMultiSelectDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}}):b.StaticDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}})}case"group":{let u=await bm(e);return o?b.StaticMultiSelectDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}}):b.StaticDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}})}case"version":{let u=t.allowedValues?t.allowedValues.map(c=>({label:c.name,value:c.id})):[];return o?b.StaticMultiSelectDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}}):b.StaticDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}})}case"priority":{let u=t.allowedValues?t.allowedValues.map(c=>({label:c.name,value:c.id})):[];return b.StaticDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}})}case"component":{let u=t.allowedValues?t.allowedValues.map(c=>({label:c.name,value:c.id})):[];return o?b.StaticMultiSelectDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}}):b.StaticDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}})}case"option":{let u=t.allowedValues?t.allowedValues.map(c=>({label:c.value,value:c.id})):[];return o?b.StaticMultiSelectDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}}):b.StaticDropdown({displayName:t.name,required:r,options:{disabled:!1,options:u}})}case"string":return o?b.Array({displayName:t.name,required:r}):b.LongText({displayName:t.name,required:r});case"date":return b.DateTime({displayName:t.name,description:"Provide date in YYYY-MM-DD format.",required:r});case"datetime":return b.DateTime({displayName:t.name,required:r});case"number":return b.Number({displayName:t.name,required:r});case"project":return b.ShortText({displayName:t.name,required:r,description:"Provide project key."});case"issuelink":return b.ShortText({displayName:t.name,required:r,description:"Provide issue key."});default:return null}}i(Ur,"createPropertyDefinition");function Tm(e){try{if(Array.isArray(e))return e;let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}i(Tm,"parseArray");function Mr(e,t){let r={};for(let n of e){let o=n.key,s=t[o];if(!(J(s)||s===""))switch(n.schema.type){case"array":{let u=Tm(s);if(u.length===0)continue;r[o]=n.schema.items==="string"?u:u.map(c=>n.schema.items==="group"?{name:c}:{id:c});break}case"user":r[o]={name:s};break;case"version":case"option":case"priority":case"issuetype":case"component":r[o]={id:s};break;case"issuelink":r[o]={key:s};break;case"group":r[o]={name:s};break;case"date":r[o]=(0,to.default)(s).format("YYYY-MM-DD");break;case"datetime":r[o]=(0,to.default)(s).toISOString();break;case"number":r[o]=Number(s);break;case"project":r[o]={key:s};break;case"string":{r[o]=s;break}}}return r}i(Mr,"formatIssueFields");function jr(e,t){let r={},n=e.reduce((o,s)=>(o[s.key]=s.name,o),{});for(let[o,s]of Object.entries(t))r[o.startsWith("customfield_")?n[o]??o:o]=s;return r}i(jr,"transformCustomFields");var Lr=["userpicker","participants","multiuserpicker","multiversion","version","multigrouppicker","grouppicker","multicheckboxes","multiselect","datepicker","datetime","labels","float","textarea","radiobuttons","select","textfield","url","project"];function Eu(e){return e.map(t=>({...t,key:t.key??t.fieldId,fieldId:t.fieldId??t.key}))}i(Eu,"normalizeFields");async function $m(e,t,r){let n=await It({auth:e,method:"GET",resourceUri:`/issue/createmeta/${t}/issuetypes/${r}`,propertyName:"values"});return!n||!Array.isArray(n)?[]:Eu(n)}i($m,"getFields");var Au=Y({name:"create_issue",displayName:"Create Issue",description:"Creates a new issue in a project.",audience:"both",aiMetadata:{description:"Creates a new issue (ticket) in a Jira Data Center/Server project. Use when an agent needs to file a bug, task, story, or other work item; the field set is driven by the chosen project and issue type, so both a project and an issue-type ID are required. Not idempotent \u2014 each call creates a separate issue.",idempotent:!1},auth:D,props:{projectId:he(),issueTypeId:Iu("Issue Type"),issueFields:b.DynamicProperties({auth:D,displayName:"Fields",required:!0,refreshers:["projectId","issueTypeId"],props:i(async({auth:e,projectId:t,issueTypeId:r})=>{if(!e||!r||!t)return{};let n={},o=e,s=t,c=await $m(o,s,r);for(let d of c){if(d.schema.custom){let f=d.schema.custom.split(":")[1];if(!Lr.includes(f))continue}["project","issuetype","reporter"].includes(d.key)||(n[d.key]=await Ur(o,d,d.required,s))}return Object.fromEntries(Object.entries(n).filter(([d,f])=>f!==null))},"props")})},async run(e){let{projectId:t,issueTypeId:r}=e.propsValue,n=e.propsValue.issueFields??{};if(J(t)||J(r))throw new Error("Project ID and Issue Type ID are required");let o=await It({auth:e.auth,method:"GET",resourceUri:`/issue/createmeta/${t}/issuetypes/${r}`,propertyName:"values"}),s=Eu(o),u=Mr(s,n),c=await ie({auth:e.auth,method:"POST",resourceUri:"/issue",body:{fields:{issuetype:{id:r},project:{key:t},...u}}}),d=await ie({auth:e.auth,method:"GET",resourceUri:`/issue/${c.id}`}),f=jr(s,d.fields);return{...d,fields:f}}});var Su=Y({name:"search_issues",displayName:"Search Issues",description:"Search for issues with JQL",audience:"both",aiMetadata:{description:"Searches issues in Jira Data Center/Server using a JQL query and returns the matching issues (capped by Max Results, 1-100). Use when an agent needs to find or list issues by any criteria expressible in JQL \u2014 project, status, assignee, date, label, etc. Requires a valid JQL string. Read-only and idempotent.",idempotent:!0},auth:D,props:{jql:b.LongText({displayName:"JQL",description:"The JQL query to use in the search",defaultValue:"type = story and created > '2023-12-13 14:00'",required:!0}),maxResults:b.Number({displayName:"Max Results",defaultValue:50,required:!0})},run:i(async({auth:e,propsValue:t})=>{await Nr.validateZod(t,{maxResults:ge().check(cr(1),ur(100))});let{jql:r,maxResults:n}=t;return await Je({auth:e,jql:r,maxResults:n})},"run")});var wu=Ae(Kt());var Fr={strategy:0,items:i(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let{jql:n}=r,o=`${n?n+" AND ":""}created > '${(0,wu.default)(t).format("YYYY-MM-DD HH:mm")}'`;return(await Je({auth:e,jql:o,maxResults:50})).map(u=>({epochMilliSeconds:Date.parse(u.fields.created),data:u}))},"items")},ku=ht({name:"new_issue",displayName:"New Issue",description:"Triggers when a new issue is created",aiMetadata:{description:"Fires when a new issue is created in Jira Data Center/Server (polls for issues by creation time). An optional JQL filter narrows which issues are watched (e.g. a specific project or type); each newly created matching issue emits one event."},auth:D,type:"POLLING",props:{jql:b.LongText({displayName:"JQL",description:"Use to filter issues watched",required:!1})},sampleData:{},async onEnable(e){await xe.onEnable(Fr,e)},async onDisable(e){await xe.onDisable(Fr,e)},async run(e){return await xe.poll(Fr,e)},async test(e){return await xe.test(Fr,e)}});var Ou=Ae(Kt());var Br={strategy:0,items:i(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let{jql:n}=r,o=`${n?n+" AND ":""}updated > '${(0,Ou.default)(t).format("YYYY-MM-DD HH:mm")}'`;return(await Je({auth:e,jql:o,maxResults:50})).map(u=>({epochMilliSeconds:Date.parse(u.fields.updated),data:u}))},"items")},Du=ht({name:"updated_issue",displayName:"Updated Issue",description:"Triggers when an issue is updated",aiMetadata:{description:"Fires when an existing issue is updated in Jira Data Center/Server (polls by last-updated time, so any field change counts). An optional JQL filter narrows which issues are watched; each matching issue emits an event when its updated timestamp advances."},auth:D,type:"POLLING",props:{jql:b.LongText({displayName:"JQL",description:"Use to filter issues watched",required:!1})},sampleData:{},async onEnable(e){await xe.onEnable(Br,e)},async onDisable(e){await xe.onDisable(Br,e)},async run(e){return await xe.poll(Br,e)},async test(e){return await xe.test(Br,e)}});var Ru=Ae(Kt());var Vr={strategy:0,items:i(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let{jql:n}=r,o=`${n?n+" AND ":""}status CHANGED AFTER '${(0,Ru.default)(t).format("YYYY-MM-DD HH:mm")}'`;return(await Je({auth:e,jql:o,maxResults:50})).map(u=>({epochMilliSeconds:Date.parse(u.fields.updated),data:u}))},"items")},Nu=ht({name:"updated_issue_status",displayName:"Updated Issue Status",description:"Triggers when an issue status is updated",aiMetadata:{description:`Fires specifically when an issue's status (workflow state) changes in Jira Data Center/Server \u2014 narrower than Updated Issue, which fires on any field change. Uses JQL "status CHANGED" polling; an optional JQL filter further narrows which issues are watched.`},auth:D,type:"POLLING",props:{jql:b.LongText({displayName:"JQL",description:"Use to filter issues watched",required:!1})},sampleData:{},async onEnable(e){await xe.onEnable(Vr,e)},async onDisable(e){await xe.onDisable(Vr,e)},async run(e){return await xe.poll(Vr,e)},async test(e){return await xe.test(Vr,e)}});var Cu=Y({auth:D,name:"add_issue_comment",displayName:"Add Issue Comment",description:"Adds a comment to an issue.",audience:"both",aiMetadata:{description:"Posts a new comment on a Jira Data Center/Server issue. Use to add a note, update, or reply to an existing issue. Not idempotent \u2014 each call appends another comment.",idempotent:!1},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),comment:b.LongText({displayName:"Comment Body",required:!0})},async run(e){let{issueId:t,comment:r}=e.propsValue;return(await ne({method:"POST",url:`issue/${t}/comment`,auth:e.auth,body:{body:r}})).body}});var Uu=Ae(Xn());var Mu=Y({auth:D,name:"add_issue_attachment",displayName:"Add Attachment to Issue",description:"Adds an attachment to an issue.",audience:"both",aiMetadata:{description:"Uploads a file and attaches it to a Jira Data Center/Server issue. Use to add a document, image, or log to an existing issue. Not idempotent \u2014 each call adds another attachment, even if the same file was already attached.",idempotent:!1},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),attachment:b.File({displayName:"Attachment",required:!0})},async run(e){let{issueId:t,attachment:r}=e.propsValue,n=new Uu.default,o=Buffer.from(r.base64,"base64");return n.append("file",o,r.filename),(await ne({method:"POST",url:`issue/${t}/attachments`,auth:e.auth,headers:{"X-Atlassian-Token":"no-check",...n.getHeaders()},body:n})).body}});var ju=Y({auth:D,name:"update_issue_comment",displayName:"Update Issue Comment",description:"Updates a comment to a specific issue.",audience:"both",aiMetadata:{description:"Replaces the body of an existing comment on a Jira Data Center/Server issue, identified by issue and comment ID. Use to edit a previously posted comment rather than add a new one. Idempotent \u2014 re-running with the same body leaves the comment unchanged.",idempotent:!0},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),commentId:b.Dropdown({auth:D,displayName:"Comment ID",refreshers:["issueId"],required:!0,options:i(async({auth:e,issueId:t})=>!e||!t?{disabled:!0,placeholder:"Please connect your account and select issue.",options:[]}:{disabled:!1,options:(await ne({method:"GET",url:`issue/${t}/comment`,auth:e,queryParams:{orderBy:"-created"}})).body.comments.map(n=>({label:n.body?.substring(0,100)??n.id,value:n.id}))},"options")}),comment:b.LongText({displayName:"Comment Body",required:!0})},async run(e){let{issueId:t,comment:r,commentId:n}=e.propsValue;return(await ne({method:"PUT",url:`issue/${t}/comment/${n}`,auth:e.auth,body:{body:r}})).body}});var Lu=Y({auth:D,name:"delete_issue_comment",displayName:"Delete Issue Comment",description:"Deletes a comment on a specific issue.",audience:"both",aiMetadata:{description:"Permanently deletes a specific comment from a Jira Data Center/Server issue, identified by issue and comment ID. Use to remove a comment that was posted in error. Idempotent on its target \u2014 once the comment is gone, the end state is unchanged by repeating.",idempotent:!0},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),commentId:b.Dropdown({auth:D,displayName:"Comment ID",refreshers:["issueId"],required:!0,options:i(async({auth:e,issueId:t})=>!e||!t?{disabled:!0,placeholder:"Please connect your account and select issue.",options:[]}:{disabled:!1,options:(await ne({method:"GET",url:`issue/${t}/comment`,auth:e,queryParams:{orderBy:"-created"}})).body.comments.map(n=>({label:n.body?.substring(0,100)??n.id,value:n.id}))},"options")})},async run(e){let{issueId:t,commentId:r}=e.propsValue;return(await ne({method:"DELETE",url:`issue/${t}/comment/${r}`,auth:e.auth})).body}});async function Em(e,t){let r=await ie({auth:e,method:"GET",resourceUri:`/issue/${t}/editmeta`});return r.fields?Object.entries(r.fields).map(([n,o])=>({...o,key:n,fieldId:n})):[]}i(Em,"getFields");var Fu=Y({name:"update_issue",displayName:"Update Issue",description:"Updates an existing issue.",audience:"both",aiMetadata:{description:"Updates fields on an existing Jira Data Center/Server issue, identified by its ID or key. Can optionally transition the issue to a new status (workflow transition) in the same call when a status is supplied. Use to edit an already-created issue rather than create one. Repeating with the same field values converges on the same state, so it is effectively idempotent.",idempotent:!0},auth:D,props:{issueId:it("Issue ID or Key",!0),statusId:$u("Status",!1),issueFields:b.DynamicProperties({auth:D,displayName:"Fields",required:!0,refreshers:["issueId"],props:i(async({auth:e,issueId:t})=>{if(!e||!t)return{};let r={},n=e,s=await Em(n,t);for(let u of s){if(u.schema.custom){let c=u.schema.custom.split(":")[1];if(!Lr.includes(c))continue}u.key==="issuetype"?r[u.key]=b.StaticDropdown({displayName:u.name,required:!1,options:{disabled:!1,options:u.allowedValues?u.allowedValues.map(c=>({label:c.name,value:c.id})):[]}}):r[u.key]=await Ur(n,u,!1)}return Object.fromEntries(Object.entries(r).filter(([u,c])=>c!==null))},"props")})},async run(e){let{issueId:t,statusId:r}=e.propsValue,n=e.propsValue.issueFields??{};if(J(t))throw new Error("Issue ID is required");!J(r)&&r!==""&&await ie({auth:e.auth,method:"POST",resourceUri:`/issue/${t}/transitions`,body:{transition:{id:r}}});let o=await ie({auth:e.auth,method:"GET",resourceUri:`/issue/${t}/editmeta`}),s=Object.entries(o.fields??{}).map(([f,h])=>({...h,key:f,fieldId:f})),u=Mr(s,n);await ie({auth:e.auth,method:"PUT",resourceUri:`/issue/${t}`,body:{fields:u}});let c=await ie({auth:e.auth,method:"GET",resourceUri:`/issue/${t}`}),d=jr(s,c.fields);return{...c,fields:d}}});var Bu=Y({auth:D,name:"assign_issue",displayName:"Assign Issue",description:"Assigns an issue to a user.",audience:"both",aiMetadata:{description:"Sets the assignee of a Jira Data Center/Server issue to a chosen user. Use to (re)assign an issue to a specific person; the assignee is provided as a Jira username. Idempotent \u2014 assigning the same user repeatedly leaves the issue on that assignee.",idempotent:!0},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),assignee:Cr({displayName:"Assignee",refreshers:["projectId"],required:!0})},async run(e){let{issueId:t,assignee:r}=e.propsValue;return(await ne({method:"PUT",url:`issue/${t}/assignee`,auth:e.auth,body:{name:r}})).body}});var Vu=Y({auth:D,name:"list_issue_comments",displayName:"List Issue Comments",description:"Returns all comments for an issue.",audience:"both",aiMetadata:{description:"Returns the comments on a Jira Data Center/Server issue, ordered by creation date (ascending or descending) and capped by a limit. Use to read the discussion history of an issue. Read-only and idempotent.",idempotent:!0},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),orderBy:b.StaticDropdown({displayName:"Order By",required:!0,defaultValue:"-created",options:{disabled:!1,options:[{label:"Created (Descending)",value:"-created"},{label:"Created (Ascending)",value:"+created"}]}}),limit:b.Number({displayName:"Limit",description:"Maximum number of results",required:!0,defaultValue:10})},async run(e){let{issueId:t,orderBy:r,limit:n}=e.propsValue;return(await ne({method:"GET",url:`issue/${t}/comment`,auth:e.auth,queryParams:{orderBy:r,maxResults:n.toString()}})).body}});var Zu=Y({auth:D,name:"find-user",displayName:"Find User",description:"Finds an existing user.",audience:"both",aiMetadata:{description:"Searches Jira Data Center/Server users by a keyword (matched against username) and returns the matching accounts. Use to resolve a person to a Jira user before assigning an issue or adding a watcher. Read-only and idempotent.",idempotent:!0},props:{keyword:b.ShortText({displayName:"Keyword",required:!0})},async run(e){let t=await ie({auth:e.auth,method:"GET",resourceUri:"/user/search",query:{username:e.propsValue.keyword}});return{found:t.length>0,data:t}}});var Hu=Y({auth:D,name:"add-watcher-to-issue",displayName:"Add Watcher to Issue",description:"Adds a new watcher to an issue.",audience:"both",aiMetadata:{description:"Adds a user as a watcher on a Jira Data Center/Server issue so they receive notifications about it. Identify the issue by ID or key and the watcher by Jira username. Idempotent \u2014 adding an already-watching user does not create a duplicate.",idempotent:!0},props:{issueId:it("Issue ID or Key",!0),userId:Cr({displayName:"User",refreshers:[],required:!0})},async run(e){let{issueId:t,userId:r}=e.propsValue;if(J(t))throw new Error("Issue ID is required");if(J(r))throw new Error("User ID is required");try{return await ie({auth:e.auth,method:"POST",resourceUri:`/issue/${t}/watchers`,body:`"${r}"`}),{success:!0}}catch(n){return{success:!1,error:n.message}}}});var qu=Y({auth:D,name:"link-issues",displayName:"Link Issues",description:"Creates a link between two issues.",audience:"both",aiMetadata:{description:"Creates a typed link between two Jira Data Center/Server issues (e.g. blocks, relates to, duplicates), using a link-type ID and the two issue IDs/keys. Use to relate one issue to another. Not idempotent \u2014 repeating the call adds another link of that type.",idempotent:!1},props:{firstIssueId:it("First Issue",!0),issueLinkTypeId:Tu("Link Type",!0),secondIssueId:it("Second Issue",!0)},async run(e){let{firstIssueId:t,issueLinkTypeId:r,secondIssueId:n}=e.propsValue;if(J(t)||J(r)||J(n))throw new Error("First Issue, Link Type, and Second Issue are required");try{return await ie({method:"POST",resourceUri:"/issueLink",auth:e.auth,body:{type:{id:r},inwardIssue:{id:n},outwardIssue:{id:t}}}),{success:!0}}catch(o){return{success:!1,error:o.message}}}});var Gu=Y({auth:D,name:"get-issue-attachment",displayName:"Get Issue Attachment",description:"Retrieves an attachment from an issue.",audience:"both",aiMetadata:{description:"Downloads a single attachment from Jira Data Center/Server by its attachment ID, returning the attachment metadata and the file contents. Use when an agent already has an attachment ID (e.g. from reading an issue) and needs the actual file. Read-only and idempotent.",idempotent:!0},props:{attachmentId:b.ShortText({displayName:"Attachment ID",required:!0})},async run(e){let{attachmentId:t}=e.propsValue,r=await ie({method:"GET",resourceUri:`/attachment/${t}`,auth:e.auth}),{filename:n,content:o}=r,s=await nt.sendRequest({url:o,method:"GET",authentication:{type:"BEARER_TOKEN",token:e.auth.props.personalAccessToken},responseType:"arraybuffer",followRedirects:!0});return{...r,file:await e.files.write({fileName:n,data:Buffer.from(s.body)})}}});function Zr(e,t){let r={};for(let[n,o]of Object.entries(e)){let s=t?.[n];s?r[s]=o:r[n]=o}return r}i(Zr,"mapFieldNames");var Wu=Y({auth:D,name:"get_issue",displayName:"Get Issue",description:"Get issue data.",audience:"both",aiMetadata:{description:"Retrieves the full data for a single Jira Data Center/Server issue by ID or key. Use to read an issue's fields, status, comments, or changelog; optional expand selections (rendered fields, names, schema, transitions, edit-meta, changelog) and human-readable field/transition name mapping can enrich the result. Read-only and idempotent.",idempotent:!0},props:{projectId:he(),issueId:be({refreshers:["projectId"]}),expand:b.StaticMultiSelectDropdown({displayName:"Expand",description:"Include additional information about the issue in the response",required:!1,options:{options:[{label:"Rendered Fields",value:"renderedFields"},{label:"Names",value:"names"},{label:"Schema",value:"schema"},{label:"Transitions",value:"transitions"},{label:"Edit Meta",value:"editmeta"},{label:"Changelog",value:"changelog"}]}}),mapNames:b.Checkbox({displayName:"Map Field Names",description:`
10
+ Map human readable names to Fields, Rendered Fields, Schema and Edit Meta.
11
+ Notes:
12
+ - This would implicitly add "names" to the expand field
13
+ - If there are fields with the same name, they may be overridden
14
+ `.trim(),required:!0,defaultValue:!1}),mapTransitions:b.Checkbox({displayName:"Map Transition Names",description:`
15
+ Map human readable names to Transitions.
16
+ Notes:
17
+ - If there are transitions with the same name, they may be overridden
18
+ - This changes the original data structure from list to map
19
+ `.trim(),required:!0,defaultValue:!1})},async run(e){let{issueId:t,expand:r,mapNames:n,mapTransitions:o}=e.propsValue,s={},u=r;n&&(u=[...new Set(u).add("names")]),u&&(s.expand=u.join(","));let d=(await ne({method:"GET",url:`issue/${t}`,auth:e.auth,queryParams:s})).body;if(n){let f=d.names||{},h=Zr(d.fields,f);if(d.fields=h,d.renderedFields){let I=Zr(d.renderedFields,f);d.renderedFields=I}if(d.schema){let I=Zr(d.schema,f);d.schema=I}if(d.editmeta?.fields){let I=Zr(d.editmeta.fields,f);d.editmeta={...d.editmeta,fields:I}}}if(o&&d.transitions){let f=d.transitions.reduce((h,I)=>(h[I.name]=I,h),{});d.transitions=f}return d}});var Am=ua({displayName:"Jira Data Center",description:"Issue tracking and project management for Jira Data Center and Server",auth:D,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/jira.png",categories:["PRODUCTIVITY"],authors:[],actions:[Au,Fu,Wu,Zu,Su,Bu,Mu,Gu,Hu,Cu,ju,qu,Vu,Lu,_u({baseUrl:i(e=>e?`${e.props.instanceUrl}/rest/api/2`:"","baseUrl"),auth:D,authMapping:i(async e=>({Authorization:`Bearer ${e.props.personalAccessToken}`}),"authMapping")})],triggers:[ku,Du,Nu]});0&&(module.exports={jiraDataCenter});
20
+ /*! Bundled license information:
21
+
22
+ mime-types/index.js:
23
+ (*!
24
+ * mime-types
25
+ * Copyright(c) 2014 Jonathan Ong
26
+ * Copyright(c) 2015 Douglas Christopher Wilson
27
+ * MIT Licensed
28
+ *)
29
+ */
package/src/auth.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { AppConnectionValueForAuthProperty } from '@activepieces/pieces-framework';
2
- export declare const jiraDataCenterAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>;
6
- export type JiraDataCenterAuth = AppConnectionValueForAuthProperty<typeof jiraDataCenterAuth>;
7
- //# sourceMappingURL=auth.d.ts.map
package/src/auth.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iCAAiC,EAGjC,MAAM,gCAAgC,CAAC;AAOxC,eAAO,MAAM,kBAAkB;;;EA+C7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,iCAAiC,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
package/src/auth.js DELETED
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jiraDataCenterAuth = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const common_1 = require("./lib/common");
7
- const pieces_common_1 = require("@activepieces/pieces-common");
8
- const zod_1 = require("zod");
9
- const pieces_common_2 = require("@activepieces/pieces-common");
10
- const shared_1 = require("@activepieces/shared");
11
- exports.jiraDataCenterAuth = pieces_framework_1.PieceAuth.CustomAuth({
12
- description: `
13
- To generate a Personal Access Token (PAT):
14
- 1. Log in to your Jira Data Center instance.
15
- 2. Click your **profile icon** (top-right) → **Profile**.
16
- 3. Go to **Personal Access Tokens** → **Create token**.
17
- 4. Set a name and expiry, then copy the generated token.
18
- `,
19
- required: true,
20
- props: {
21
- instanceUrl: pieces_framework_1.Property.ShortText({
22
- displayName: 'Instance URL',
23
- description: 'The URL of your Jira Data Center instance (e.g. https://jira.yourcompany.com)',
24
- required: true,
25
- }),
26
- personalAccessToken: pieces_framework_1.PieceAuth.SecretText({
27
- displayName: 'Personal Access Token',
28
- description: 'Your Jira Data Center Personal Access Token (PAT)',
29
- required: true,
30
- }),
31
- },
32
- validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
33
- var _b, _c;
34
- try {
35
- yield pieces_common_2.propsValidation.validateZod(auth, {
36
- instanceUrl: zod_1.z.string().url(),
37
- });
38
- yield (0, common_1.sendJiraRequest)({
39
- auth: {
40
- type: shared_1.AppConnectionType.CUSTOM_AUTH,
41
- props: auth,
42
- },
43
- method: pieces_common_1.HttpMethod.GET,
44
- url: 'myself',
45
- });
46
- return {
47
- valid: true,
48
- };
49
- }
50
- catch (e) {
51
- const message = (_c = (_b = e.response) === null || _b === void 0 ? void 0 : _b.body) === null || _c === void 0 ? void 0 : _c.message;
52
- return {
53
- valid: false,
54
- error: message !== null && message !== void 0 ? message : 'Invalid credentials',
55
- };
56
- }
57
- }),
58
- });
59
- //# sourceMappingURL=auth.js.map
package/src/auth.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,yCAA+C;AAC/C,+DAAoE;AACpE,6BAAwB;AACxB,+DAA8D;AAC9D,iDAAyD;AAE5C,QAAA,kBAAkB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACtD,WAAW,EAAE;;;;;;KAMT;IACJ,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACN,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACV,+EAA+E;YAChF,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,mBAAmB,EAAE,4BAAS,CAAC,UAAU,CAAC;YACzC,WAAW,EAAE,uBAAuB;YACpC,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACxB,IAAI,CAAC;YACJ,MAAM,+BAAe,CAAC,WAAW,CAAC,IAAI,EAAE;gBACvC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;aAC7B,CAAC,CAAC;YAEH,MAAM,IAAA,wBAAe,EAAC;gBACrB,IAAI,EAAE;oBACL,IAAI,EAAE,0BAAiB,CAAC,WAAW;oBACnC,KAAK,EAAE,IAAI;iBACX;gBACD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,QAAQ;aACb,CAAC,CAAC;YACH,OAAO;gBACN,KAAK,EAAE,IAAI;aACX,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,MAAM,OAAO,GAAG,MAAC,MAAC,CAAe,CAAC,QAAQ,0CAAE,IAAY,0CAAE,OAAO,CAAC;YAClE,OAAO;gBACN,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,qBAAqB;aACvC,CAAC;QACH,CAAC;IACF,CAAC,CAAA;CACD,CAAC,CAAC"}
package/src/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare const jiraDataCenter: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- }>>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,cAAc;;;GAsCzB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAE7D,+DAAwE;AACxE,iDAAqD;AACrD,iCAAgE;AAChE,6DAA+D;AAC/D,+DAAiE;AACjE,wDAAoD;AACpD,gEAA4D;AAC5D,8EAAyE;AACzE,6EAA6E;AAC7E,mFAAmF;AACnF,6EAA8E;AAC9E,6EAA8E;AAC9E,6DAA+D;AAC/D,6DAA+D;AAC/D,2EAA4E;AAC5E,uDAAyD;AACzD,6EAA6E;AAC7E,2DAA6D;AAC7D,6EAA8E;AAC9E,uDAAyD;AAE5C,QAAA,cAAc,GAAG,IAAA,8BAAW,EAAC;IACzC,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,uEAAuE;IAEpF,IAAI,EAAE,yBAAkB;IACxB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,8CAA8C;IACvD,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,EAAE;IACX,OAAO,EAAE;QACR,gCAAiB;QACjB,gCAAiB;QACjB,0BAAc;QACd,0BAAc;QACd,kCAAkB;QAClB,gCAAiB;QACjB,oDAA0B;QAC1B,+CAAwB;QACxB,8CAAuB;QACvB,8CAAuB;QACvB,+CAAwB;QACxB,8BAAgB;QAChB,6CAAuB;QACvB,+CAAwB;QACxB,IAAA,yCAAyB,EAAC;YACzB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjB,OAAO,IAAI,CAAC,CAAC,CAAC,GAAI,IAA2B,CAAC,KAAK,CAAC,WAAW,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;YACnF,CAAC;YACD,IAAI,EAAE,yBAAkB;YACxB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC3B,MAAM,SAAS,GAAG,IAA0B,CAAC;gBAC7C,OAAO;oBACN,aAAa,EAAE,UAAU,SAAS,CAAC,KAAK,CAAC,mBAAmB,EAAE;iBAC9D,CAAC;YACH,CAAC,CAAA;SACD,CAAC;KACF;IACD,QAAQ,EAAE,CAAC,oBAAQ,EAAE,4BAAY,EAAE,yCAAkB,CAAC;CACtD,CAAC,CAAC"}