@zuplo/cli 1.64.0 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +26 -3
- package/dist/cmds/convert.js +4 -1
- package/dist/cmds/delete.js +4 -1
- package/dist/cmds/deploy.js +4 -1
- package/dist/cmds/dev.js +4 -1
- package/dist/cmds/editor.js +4 -1
- package/dist/cmds/link.js +4 -1
- package/dist/cmds/list.js +4 -1
- package/dist/cmds/login.js +4 -1
- package/dist/cmds/project/index.js +4 -1
- package/dist/cmds/project/update.js +4 -1
- package/dist/cmds/test.js +4 -1
- package/dist/cmds/tunnel/create.js +4 -1
- package/dist/cmds/tunnel/delete.js +4 -1
- package/dist/cmds/tunnel/describe.js +4 -1
- package/dist/cmds/tunnel/index.js +4 -1
- package/dist/cmds/tunnel/list.js +4 -1
- package/dist/cmds/tunnel/rotate-token.js +4 -1
- package/dist/cmds/tunnel/services/describe.js +4 -1
- package/dist/cmds/tunnel/services/index.js +4 -1
- package/dist/cmds/tunnel/services/update.js +4 -1
- package/dist/cmds/variable/create.js +4 -1
- package/dist/cmds/variable/index.js +4 -1
- package/dist/cmds/variable/update.js +4 -1
- package/dist/common/alias.js +4 -1
- package/dist/common/api/lib.js +4 -1
- package/dist/common/constants.js +6 -1
- package/dist/common/deno-utils/locator.js +4 -1
- package/dist/common/handler.js +4 -1
- package/dist/common/logger.js +11 -2
- package/dist/common/middleware/user-configuration.js +4 -1
- package/dist/common/models.js +4 -1
- package/dist/common/output.js +15 -4
- package/dist/common/settings.js +4 -1
- package/dist/common/upgraders/lib.js +4 -1
- package/dist/common/upgraders/package-json-upgrader.js +4 -1
- package/dist/common/upgraders/vscode-settings-json-upgrader.js +4 -1
- package/dist/common/validators/file-system-validator.js +4 -1
- package/dist/common/validators/lib.js +4 -1
- package/dist/common/validators/login-state-validator.js +4 -1
- package/dist/common/validators/project-name-validator.js +4 -1
- package/dist/common/xdg/lib.js +4 -1
- package/dist/convert/engine.js +4 -1
- package/dist/convert/handler.js +4 -1
- package/dist/convert/routes.generated.js +4 -1
- package/dist/delete/handler.js +4 -1
- package/dist/delete/poll-deployment.js +4 -1
- package/dist/deploy/archive.js +4 -1
- package/dist/deploy/file-upload.js +4 -1
- package/dist/deploy/handler.js +4 -1
- package/dist/deploy/poll-deployment.js +4 -1
- package/dist/dev/handler.js +4 -1
- package/dist/editor/assets/index-03352ce7.js +4 -0
- package/dist/editor/handler.js +4 -1
- package/dist/editor/server/cors-plugin.js +4 -1
- package/dist/editor/server/server.js +4 -1
- package/dist/editor/server/xfs.js +4 -1
- package/dist/link/handler.js +4 -1
- package/dist/link/populate.js +4 -1
- package/dist/list/handler.js +4 -1
- package/dist/login/handler.js +4 -1
- package/dist/login/server.js +4 -1
- package/dist/project/update/handler.js +4 -1
- package/dist/test/esbuild-config.js +4 -1
- package/dist/test/esbuild-plugins/deno-test-prep-plugin.js +4 -1
- package/dist/test/handler.js +4 -1
- package/dist/test/invoke-test.js +4 -1
- package/dist/tunnel/create/handler.js +4 -1
- package/dist/tunnel/delete/handler.js +4 -1
- package/dist/tunnel/delete/poll-teardown-operation.js +4 -1
- package/dist/tunnel/describe/handler.js +4 -1
- package/dist/tunnel/list/handler.js +4 -1
- package/dist/tunnel/models.js +4 -1
- package/dist/tunnel/rotate-token/handler.js +4 -1
- package/dist/tunnel/services/describe/handler.js +4 -1
- package/dist/tunnel/services/update/handler.js +4 -1
- package/dist/tunnel/services/update/poll-provisioning-operations.js +4 -1
- package/dist/variable/create/handler.js +4 -1
- package/dist/variable/models.js +4 -1
- package/dist/variable/update/handler.js +4 -1
- package/package.json +5 -2
package/dist/common/xdg/lib.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2c285e5-b732-5278-9a18-fe43bd5937d7")}catch(e){}}();
|
|
1
3
|
import { homedir } from "node:os";
|
|
2
4
|
import path from "node:path";
|
|
3
5
|
import { ZUPLO_CLI_XDG_FOLDER_NAME } from "../constants.js";
|
|
@@ -15,4 +17,5 @@ export const XDG_STATE_HOME = defineDirectoryWithFallback("XDG_DATA_HOME", ".loc
|
|
|
15
17
|
export const ZUPLO_XDG_CONFIG_HOME = path.join(XDG_CONFIG_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
|
|
16
18
|
export const ZUPLO_XDG_DATA_HOME = path.join(XDG_DATA_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
|
|
17
19
|
export const ZUPLO_XDG_STATE_HOME = path.join(XDG_STATE_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
|
|
18
|
-
//# sourceMappingURL=lib.js.map
|
|
20
|
+
//# sourceMappingURL=lib.js.map
|
|
21
|
+
//# debugId=f2c285e5-b732-5278-9a18-fe43bd5937d7
|
package/dist/convert/engine.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="552cb5a7-6e6b-5822-8c9b-8f28decd2765")}catch(e){}}();
|
|
1
3
|
import { join } from "node:path";
|
|
2
4
|
export function convertRoutes(routesConfig) {
|
|
3
5
|
const base = generateBaseOpenAPIConfig();
|
|
@@ -70,4 +72,5 @@ function fullPath(path, context) {
|
|
|
70
72
|
const versionPrefix = context.versions.filter((v) => v.name === path.version)[0].pathPrefix;
|
|
71
73
|
return join(versionPrefix, path.path);
|
|
72
74
|
}
|
|
73
|
-
//# sourceMappingURL=engine.js.map
|
|
75
|
+
//# sourceMappingURL=engine.js.map
|
|
76
|
+
//# debugId=552cb5a7-6e6b-5822-8c9b-8f28decd2765
|
package/dist/convert/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="db6c1425-6761-5670-845d-9666688009f3")}catch(e){}}();
|
|
1
3
|
import { writeFileSync } from "node:fs";
|
|
2
4
|
import { readFile } from "node:fs/promises";
|
|
3
5
|
import { join, relative } from "node:path";
|
|
@@ -33,4 +35,5 @@ export async function convert(argv) {
|
|
|
33
35
|
printCriticalFailureToConsoleAndExit(err);
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
|
-
//# sourceMappingURL=handler.js.map
|
|
38
|
+
//# sourceMappingURL=handler.js.map
|
|
39
|
+
//# debugId=db6c1425-6761-5670-845d-9666688009f3
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="35e679d7-a1d9-5f0c-a4f2-4c90d01b90f4")}catch(e){}}();
|
|
1
3
|
export {};
|
|
2
|
-
//# sourceMappingURL=routes.generated.js.map
|
|
4
|
+
//# sourceMappingURL=routes.generated.js.map
|
|
5
|
+
//# debugId=35e679d7-a1d9-5f0c-a4f2-4c90d01b90f4
|
package/dist/delete/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b8523451-9c30-5fca-8643-b3e3505d0c52")}catch(e){}}();
|
|
1
3
|
import { logger } from "../common/logger.js";
|
|
2
4
|
import { printCriticalFailureToConsoleAndExit, printResultToConsoleAndExitGracefully, } from "../common/output.js";
|
|
3
5
|
import settings from "../common/settings.js";
|
|
@@ -58,4 +60,5 @@ export async function deleteZup(argv) {
|
|
|
58
60
|
printCriticalFailureToConsoleAndExit("Error: Failed to enqueue the deletion request. Try again later.");
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
|
-
//# sourceMappingURL=handler.js.map
|
|
63
|
+
//# sourceMappingURL=handler.js.map
|
|
64
|
+
//# debugId=b8523451-9c30-5fca-8643-b3e3505d0c52
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="102b0f71-4dcb-58c1-bcbc-12e041500ae2")}catch(e){}}();
|
|
1
3
|
import { printDiagnosticsToConsole } from "../common/output.js";
|
|
2
4
|
import settings from "../common/settings.js";
|
|
3
5
|
function wait(duration = settings.POLL_INTERVAL) {
|
|
@@ -17,4 +19,5 @@ export async function pingDeployment(argv) {
|
|
|
17
19
|
}
|
|
18
20
|
return false;
|
|
19
21
|
}
|
|
20
|
-
//# sourceMappingURL=poll-deployment.js.map
|
|
22
|
+
//# sourceMappingURL=poll-deployment.js.map
|
|
23
|
+
//# debugId=102b0f71-4dcb-58c1-bcbc-12e041500ae2
|
package/dist/deploy/archive.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="401ea435-fc40-5640-97e4-e6aa5cc1f299")}catch(e){}}();
|
|
1
3
|
import ignore from "ignore";
|
|
2
4
|
import minimatch from "minimatch";
|
|
3
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, } from "node:fs";
|
|
@@ -99,4 +101,5 @@ async function writeGeneratedMetadata(dir, metadata) {
|
|
|
99
101
|
flag: "w",
|
|
100
102
|
});
|
|
101
103
|
}
|
|
102
|
-
//# sourceMappingURL=archive.js.map
|
|
104
|
+
//# sourceMappingURL=archive.js.map
|
|
105
|
+
//# debugId=401ea435-fc40-5640-97e4-e6aa5cc1f299
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d63a44e0-41f1-5993-a4ea-ca09e5369aeb")}catch(e){}}();
|
|
1
3
|
import { readFileSync, statSync } from "node:fs";
|
|
2
4
|
export async function upload(tarballPath, url) {
|
|
3
5
|
const stats = statSync(tarballPath);
|
|
@@ -11,4 +13,5 @@ export async function upload(tarballPath, url) {
|
|
|
11
13
|
body: bufferContent,
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
|
-
//# sourceMappingURL=file-upload.js.map
|
|
16
|
+
//# sourceMappingURL=file-upload.js.map
|
|
17
|
+
//# debugId=d63a44e0-41f1-5993-a4ea-ca09e5369aeb
|
package/dist/deploy/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="29782eb6-6bf4-54b4-bbb6-e458e9f440d7")}catch(e){}}();
|
|
1
3
|
import { parse } from "path";
|
|
2
4
|
import { logger } from "../common/logger.js";
|
|
3
5
|
import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../common/output.js";
|
|
@@ -46,4 +48,5 @@ export async function deploy(argv) {
|
|
|
46
48
|
printCriticalFailureToConsoleAndExit("Error: Failed to determine where to upload your files. Try again later.");
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
//# sourceMappingURL=handler.js.map
|
|
51
|
+
//# sourceMappingURL=handler.js.map
|
|
52
|
+
//# debugId=29782eb6-6bf4-54b4-bbb6-e458e9f440d7
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f2ecbc67-f14f-5d30-ae29-12cb0afa2f7a")}catch(e){}}();
|
|
1
3
|
import { logger } from "../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole } from "../common/output.js";
|
|
3
5
|
import settings from "../common/settings.js";
|
|
@@ -59,4 +61,5 @@ export async function pollDeployment(argv, fileId, account, project) {
|
|
|
59
61
|
}
|
|
60
62
|
return {};
|
|
61
63
|
}
|
|
62
|
-
//# sourceMappingURL=poll-deployment.js.map
|
|
64
|
+
//# sourceMappingURL=poll-deployment.js.map
|
|
65
|
+
//# debugId=f2ecbc67-f14f-5d30-ae29-12cb0afa2f7a
|
package/dist/dev/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8a21242d-f296-5f9a-97b5-820fc6f7704b")}catch(e){}}();
|
|
1
3
|
import * as dotenv from "dotenv";
|
|
2
4
|
import { cpSync, existsSync } from "node:fs";
|
|
3
5
|
import { readFile } from "node:fs/promises";
|
|
@@ -31,4 +33,5 @@ export async function dev(argv) {
|
|
|
31
33
|
},
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
|
-
//# sourceMappingURL=handler.js.map
|
|
36
|
+
//# sourceMappingURL=handler.js.map
|
|
37
|
+
//# debugId=8a21242d-f296-5f9a-97b5-820fc6f7704b
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="16294ea7-2efd-57c9-ad06-eb087d07014e")}catch(e){}}();
|
|
1
3
|
var rS=Object.defineProperty;var oS=(e,t,n)=>t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>(oS(e,typeof t!="symbol"?t+"":t,n),n),Nc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Z=(e,t,n)=>(Nc(e,t,"read from private field"),n?n.call(e):t.get(e)),bt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ge=(e,t,n,r)=>(Nc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var yo=(e,t,n)=>(Nc(e,t,"access private method"),n);function iS(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cy={exports:{}},au={},Ty={exports:{}},ye={};/**
|
|
2
4
|
* @license React
|
|
3
5
|
* react.production.min.js
|
|
@@ -159,3 +161,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
159
161
|
-ms-user-select: none;
|
|
160
162
|
overflow-anchor: none;
|
|
161
163
|
`}},a=[r,n,o,i];return{always:ki(a,"always"),resting:ki(a,"resting"),dragging:ki(a,"dragging"),dropAnimating:ki(a,"dropAnimating"),userCancel:ki(a,"userCancel")}},Vt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,Ed=function(){var t=document.querySelector("head");return t||V(!1),t},vy=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function C_(e,t){var n=Me(function(){return A_(e)},[e]),r=v.useRef(null),o=v.useRef(null),i=ie(it(function(d){var p=o.current;p||V(!1),p.textContent=d}),[]),a=ie(function(d){var p=r.current;p||V(!1),p.textContent=d},[]);Vt(function(){!r.current&&!o.current||V(!1);var d=vy(t),p=vy(t);return r.current=d,o.current=p,d.setAttribute(ii+"-always",e),p.setAttribute(ii+"-dynamic",e),Ed().appendChild(d),Ed().appendChild(p),a(n.always),i(n.resting),function(){var f=function(I){var w=I.current;w||V(!1),Ed().removeChild(w),I.current=null};f(r),f(o)}},[t,a,i,n.always,n.resting,e]);var l=ie(function(){return i(n.dragging)},[i,n.dragging]),s=ie(function(d){if(d==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),u=ie(function(){o.current&&i(n.resting)},[i,n.resting]),c=Me(function(){return{dragging:l,dropping:s,resting:u}},[l,s,u]);return c}var Rx=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Mc(e){return e instanceof Rx(e).HTMLElement}function T_(e,t){var n="["+ai.contextId+'="'+e+'"]',r=nx(document.querySelectorAll(n));if(!r.length)return null;var o=kr(r,function(i){return i.getAttribute(ai.draggableId)===t});return!o||!Mc(o)?null:o}function E_(e){var t=v.useRef({}),n=v.useRef(null),r=v.useRef(null),o=v.useRef(!1),i=ie(function(p,f){var g={id:p,focus:f};return t.current[p]=g,function(){var w=t.current,y=w[p];y!==g&&delete w[p]}},[]),a=ie(function(p){var f=T_(e,p);f&&f!==document.activeElement&&f.focus()},[e]),l=ie(function(p,f){n.current===p&&(n.current=f)},[]),s=ie(function(){r.current||o.current&&(r.current=requestAnimationFrame(function(){r.current=null;var p=n.current;p&&a(p)}))},[a]),u=ie(function(p){n.current=null;var f=document.activeElement;f&&f.getAttribute(ai.draggableId)===p&&(n.current=p)},[]);Vt(function(){return o.current=!0,function(){o.current=!1;var p=r.current;p&&cancelAnimationFrame(p)}},[]);var c=Me(function(){return{register:i,tryRecordFocus:u,tryRestoreFocusRecorded:s,tryShiftRecord:l}},[i,u,s,l]);return c}function j_(){var e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){var f=t.indexOf(d);f!==-1&&t.splice(f,1)}}function r(d){t.length&&t.forEach(function(p){return p(d)})}function o(d){return e.draggables[d]||null}function i(d){var p=o(d);return p||V(!1),p}var a={register:function(p){e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:function(p,f){var g=e.draggables[f.descriptor.id];g&&g.uniqueId===p.uniqueId&&(delete e.draggables[f.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var f=p.descriptor.id,g=o(f);g&&p.uniqueId===g.uniqueId&&(delete e.draggables[f],r({type:"REMOVAL",value:p}))},getById:i,findById:o,exists:function(p){return!!o(p)},getAllByType:function(p){return Ks(e.draggables).filter(function(f){return f.descriptor.type===p})}};function l(d){return e.droppables[d]||null}function s(d){var p=l(d);return p||V(!1),p}var u={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var f=l(p.descriptor.id);f&&p.uniqueId===f.uniqueId&&delete e.droppables[p.descriptor.id]},getById:s,findById:l,exists:function(p){return!!l(p)},getAllByType:function(p){return Ks(e.droppables).filter(function(f){return f.descriptor.type===p})}};function c(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:u,subscribe:n,clean:c}}function P_(){var e=Me(j_,[]);return v.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var gg=O.createContext(null),tu=function(){var e=document.body;return e||V(!1),e},L_={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},R_=function(t){return"rbd-announcement-"+t};function O_(e){var t=Me(function(){return R_(e)},[e]),n=v.useRef(null);v.useEffect(function(){var i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),ae(i.style,L_),tu().appendChild(i),function(){setTimeout(function(){var s=tu();s.contains(i)&&s.removeChild(i),i===n.current&&(n.current=null)})}},[t]);var r=ie(function(o){var i=n.current;if(i){i.textContent=o;return}},[]);return r}var k_=0,z_={separator:"::"};function hg(e,t){return t===void 0&&(t=z_),Me(function(){return""+e+t.separator+k_++},[t.separator,e])}function U_(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function B_(e){var t=e.contextId,n=e.text,r=hg("hidden-text",{separator:"-"}),o=Me(function(){return U_({contextId:t,uniqueId:r})},[r,t]);return v.useEffect(function(){var a=document.createElement("div");return a.id=o,a.textContent=n,a.style.display="none",tu().appendChild(a),function(){var s=tu();s.contains(a)&&s.removeChild(a)}},[o,n]),o}var wc=O.createContext(null);function Ox(e){var t=v.useRef(e);return v.useEffect(function(){t.current=e}),t}function __(){var e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&V(!1);var l={abandon:a};return e=l,l}function o(){e||V(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}var $_=9,F_=13,vg=27,kx=32,H_=33,W_=34,G_=35,Z_=36,V_=37,Y_=38,Q_=39,J_=40,Zl,X_=(Zl={},Zl[F_]=!0,Zl[$_]=!0,Zl),zx=function(e){X_[e.keyCode]&&e.preventDefault()},bc=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=kr(t,function(r){return"on"+r in document});return n||e}(),Ux=0,yy=5;function q_(e,t){return Math.abs(t.x-e.x)>=yy||Math.abs(t.y-e.y)>=yy}var Iy={type:"IDLE"};function K_(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(a){var l=a.button,s=a.clientX,u=a.clientY;if(l===Ux){var c={x:s,y:u},d=r();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(c);return}d.type!=="PENDING"&&V(!1);var p=d.point;if(q_(p,c)){a.preventDefault();var f=d.actions.fluidLift(c);o({type:"DRAGGING",actions:f})}}}},{eventName:"mouseup",fn:function(a){var l=r();if(l.type!=="DRAGGING"){t();return}a.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(a){r().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var l=r();if(l.type==="PENDING"){t();return}if(a.keyCode===vg){a.preventDefault(),t();return}zx(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var l=r();if(l.type==="IDLE"&&V(!1),l.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:bc,fn:t}]}function e5(e){var t=v.useRef(Iy),n=v.useRef(br),r=Me(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===Ux&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var p=e.findClosestDraggableId(d);if(p){var f=e.tryGetLock(p,a,{sourceEvent:d});if(f){d.preventDefault();var g={x:d.clientX,y:d.clientY};n.current(),u(f,g)}}}}}},[e]),o=Me(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var p=e.findClosestDraggableId(d);if(p){var f=e.findOptionsForDraggable(p);f&&(f.shouldRespectForcePress||e.canGetLock(p)&&d.preventDefault())}}}}},[e]),i=ie(function(){var d={passive:!1,capture:!0};n.current=sn(window,[o,r],d)},[o,r]),a=ie(function(){var c=t.current;c.type!=="IDLE"&&(t.current=Iy,n.current(),i())},[i]),l=ie(function(){var c=t.current;a(),c.type==="DRAGGING"&&c.actions.cancel({shouldBlockNextClick:!0}),c.type==="PENDING"&&c.actions.abort()},[a]),s=ie(function(){var d={capture:!0,passive:!1},p=K_({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(g){t.current=g}});n.current=sn(window,p,d)},[l,a]),u=ie(function(d,p){t.current.type!=="IDLE"&&V(!1),t.current={type:"PENDING",point:p,actions:d},s()},[s]);Vt(function(){return i(),function(){n.current()}},[i])}var wo;function t5(){}var n5=(wo={},wo[W_]=!0,wo[H_]=!0,wo[Z_]=!0,wo[G_]=!0,wo);function r5(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===vg){i.preventDefault(),n();return}if(i.keyCode===kx){i.preventDefault(),r();return}if(i.keyCode===J_){i.preventDefault(),e.moveDown();return}if(i.keyCode===Y_){i.preventDefault(),e.moveUp();return}if(i.keyCode===Q_){i.preventDefault(),e.moveRight();return}if(i.keyCode===V_){i.preventDefault(),e.moveLeft();return}if(n5[i.keyCode]){i.preventDefault();return}zx(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:bc,fn:n}]}function o5(e){var t=v.useRef(t5),n=Me(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==kx)return;var a=e.findClosestDraggableId(i);if(!a)return;var l=e.tryGetLock(a,c,{sourceEvent:i});if(!l)return;i.preventDefault();var s=!0,u=l.snapLift();t.current();function c(){s||V(!1),s=!1,t.current(),r()}t.current=sn(window,r5(u,c),{capture:!0,passive:!1})}}},[e]),r=ie(function(){var i={passive:!1,capture:!0};t.current=sn(window,[n],i)},[n]);Vt(function(){return r(),function(){t.current()}},[r])}var jd={type:"IDLE"},i5=120,a5=.15;function l5(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.keyCode===vg&&o.preventDefault(),t()}},{eventName:bc,fn:t}]}function s5(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var a=r();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var l=i.touches[0],s=l.clientX,u=l.clientY,c={x:s,y:u};i.preventDefault(),a.actions.move(c)}},{eventName:"touchend",fn:function(i){var a=r();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(i){if(r().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var a=r();a.type==="IDLE"&&V(!1);var l=i.touches[0];if(l){var s=l.force>=a5;if(s){var u=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){u&&t();return}if(u){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:bc,fn:t}]}function u5(e){var t=v.useRef(jd),n=v.useRef(br),r=ie(function(){return t.current},[]),o=ie(function(f){t.current=f},[]),i=Me(function(){return{eventName:"touchstart",fn:function(f){if(!f.defaultPrevented){var g=e.findClosestDraggableId(f);if(g){var I=e.tryGetLock(g,l,{sourceEvent:f});if(I){var w=f.touches[0],y=w.clientX,h=w.clientY,M={x:y,y:h};n.current(),d(I,M)}}}}}},[e]),a=ie(function(){var f={capture:!0,passive:!1};n.current=sn(window,[i],f)},[i]),l=ie(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),o(jd),n.current(),a())},[a,o]),s=ie(function(){var p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),u=ie(function(){var f={capture:!0,passive:!1},g={cancel:s,completed:l,getPhase:r},I=sn(window,s5(g),f),w=sn(window,l5(g),f);n.current=function(){I(),w()}},[s,r,l]),c=ie(function(){var f=r();f.type!=="PENDING"&&V(!1);var g=f.actions.fluidLift(f.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[r,o]),d=ie(function(f,g){r().type!=="IDLE"&&V(!1);var I=setTimeout(c,i5);o({type:"PENDING",point:g,actions:f,longPressTimerId:I}),u()},[u,r,o,c]);Vt(function(){return a(),function(){n.current();var g=r();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(jd))}},[r,a,o]),Vt(function(){var f=sn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return f},[])}var c5={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Bx(e,t){if(t==null)return!1;var n=!!c5[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Bx(e,t.parentElement)}function d5(e,t){var n=t.target;return Mc(n)?Bx(e,n):!1}var p5=function(e){return Mn(e.getBoundingClientRect()).center};function f5(e){return e instanceof Rx(e).Element}var m5=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=kr(t,function(r){return r in Element.prototype});return n||e}();function _x(e,t){return e==null?null:e[m5](t)?e:_x(e.parentElement,t)}function g5(e,t){return e.closest?e.closest(t):_x(e,t)}function h5(e){return"["+ai.contextId+'="'+e+'"]'}function v5(e,t){var n=t.target;if(!f5(n))return null;var r=h5(e),o=g5(n,r);return!o||!Mc(o)?null:o}function y5(e,t){var n=v5(e,t);return n?n.getAttribute(ai.draggableId):null}function I5(e,t){var n="["+ef.contextId+'="'+e+'"]',r=nx(document.querySelectorAll(n)),o=kr(r,function(i){return i.getAttribute(ef.id)===t});return!o||!Mc(o)?null:o}function M5(e){e.preventDefault()}function Vl(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function $x(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!(!i||!i.options.isEnabled||!Ex(n.getState(),o))}function w5(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent,s=$x({lockAPI:t,store:r,registry:o,draggableId:i});if(!s)return null;var u=o.draggable.getById(i),c=I5(n,u.descriptor.id);if(!c||l&&!u.options.canDragInteractiveElements&&d5(c,l))return null;var d=t.claim(a||br),p="PRE_DRAG";function f(){return u.options.shouldRespectForcePress}function g(){return t.isActive(d)}function I(x,D){Vl({expected:x,phase:p,isLockActive:g,shouldWarn:!0})&&r.dispatch(D())}var w=I.bind(null,"DRAGGING");function y(x){function D(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(D(),p!=="PRE_DRAG"&&V(!1)),r.dispatch(mB(x.liftActionArgs)),p="DRAGGING";function j(L,R){if(R===void 0&&(R={shouldBlockNextClick:!1}),x.cleanup(),R.shouldBlockNextClick){var U=sn(window,[{eventName:"click",fn:M5,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(U)}D(),r.dispatch(xx({reason:L}))}return ae({isActive:function(){return Vl({expected:"DRAGGING",phase:p,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(R){return j("DROP",R)},cancel:function(R){return j("CANCEL",R)}},x.actions)}function h(x){var D=Pa(function(L){w(function(){return bx({client:L})})}),j=y({liftActionArgs:{id:i,clientSelection:x,movementMode:"FLUID"},cleanup:function(){return D.cancel()},actions:{move:D}});return ae({},j,{move:D})}function M(){var x={moveUp:function(){return w(xB)},moveRight:function(){return w(NB)},moveDown:function(){return w(SB)},moveLeft:function(){return w(DB)}};return y({liftActionArgs:{id:i,clientSelection:p5(c),movementMode:"SNAP"},cleanup:br,actions:x})}function b(){var x=Vl({expected:"PRE_DRAG",phase:p,isLockActive:g,shouldWarn:!0});x&&t.release()}var N={isActive:function(){return Vl({expected:"PRE_DRAG",phase:p,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:h,snapLift:M,abort:b};return N}var b5=[e5,o5,u5];function x5(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?b5:[],o||[]),l=v.useState(function(){return __()})[0],s=ie(function(h,M){h.isDragging&&!M.isDragging&&l.tryAbandon()},[l]);Vt(function(){var h=n.getState(),M=n.subscribe(function(){var b=n.getState();s(h,b),h=b});return M},[l,n,s]),Vt(function(){return l.tryAbandon},[l.tryAbandon]);for(var u=ie(function(y){return $x({lockAPI:l,registry:r,store:n,draggableId:y})},[l,r,n]),c=ie(function(y,h,M){return w5({lockAPI:l,registry:r,contextId:t,store:n,draggableId:y,forceSensorStop:h,sourceEvent:M&&M.sourceEvent?M.sourceEvent:null})},[t,l,r,n]),d=ie(function(y){return y5(t,y)},[t]),p=ie(function(y){var h=r.draggable.findById(y);return h?h.options:null},[r.draggable]),f=ie(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(lg()))},[l,n]),g=ie(l.isClaimed,[l]),I=Me(function(){return{canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:g}},[u,c,d,p,f,g]),w=0;w<a.length;w++)a[w](I)}var S5=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function zi(e){return e.current||V(!1),e.current}function N5(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,a=v.useRef(null),l=Ox(e),s=ie(function(){return S5(l.current)},[l]),u=O_(t),c=B_({contextId:t,text:i}),d=C_(t,o),p=ie(function(L){zi(a).dispatch(L)},[]),f=Me(function(){return Fv({publishWhileDragging:hB,updateDroppableScroll:yB,updateDroppableIsEnabled:IB,updateDroppableIsCombineEnabled:MB,collectionStarting:vB},p)},[p]),g=P_(),I=Me(function(){return a_(g,f)},[g,f]),w=Me(function(){return x_(ae({scrollWindow:l_,scrollDroppable:I.scrollDroppable},Fv({move:bx},p)))},[I.scrollDroppable,p]),y=E_(t),h=Me(function(){return n_({announce:u,autoScroller:w,dimensionMarshal:I,focusMarshal:y,getResponders:s,styleMarshal:d})},[u,w,I,y,s,d]);a.current=h;var M=ie(function(){var L=zi(a),R=L.getState();R.phase!=="IDLE"&&L.dispatch(lg())},[]),b=ie(function(){var L=zi(a).getState();return L.isDragging||L.phase==="DROP_ANIMATING"},[]),N=Me(function(){return{isDragging:b,tryAbort:M}},[b,M]);n(N);var x=ie(function(L){return Ex(zi(a).getState(),L)},[]),D=ie(function(){return Fr(zi(a).getState())},[]),j=Me(function(){return{marshal:I,focus:y,contextId:t,canLift:x,isMovementAllowed:D,dragHandleUsageInstructionsId:c,registry:g}},[t,I,c,y,x,D,g]);return x5({contextId:t,store:h,registry:g,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(function(){return M},[M]),O.createElement(wc.Provider,{value:j},O.createElement(Zz,{context:gg,store:h},e.children))}var D5=0;function A5(){return Me(function(){return""+D5++},[])}function C5(e){var t=A5(),n=e.dragHandleUsageInstructions||ds.dragHandleUsageInstructions;return O.createElement(oU,null,function(r){return O.createElement(N5,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var Fx=function(t){return function(n){return t===n}},T5=Fx("scroll"),E5=Fx("auto"),My=function(t,n){return n(t.overflowX)||n(t.overflowY)},j5=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return My(r,T5)||My(r,E5)},P5=function(){return!1},L5=function e(t){return t==null?null:t===document.body?P5()?t:null:t===document.documentElement?null:j5(t)?t:e(t.parentElement)},tf=function(e){return{x:e.scrollLeft,y:e.scrollTop}},R5=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},O5=function(e){var t=L5(e),n=R5(e);return{closestScrollable:t,isFixedOnPage:n}},k5=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,l=e.page,s=e.closest,u=function(){if(!s)return null;var f=s.scrollSize,g=s.client,I=Ax({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:g.paddingBox.height,width:g.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:g,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:I,diff:{value:at,displacement:at}}}}(),c=i==="vertical"?ng:lx,d=oi({page:l,withPlaceholder:null,axis:c,frame:u}),p={descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:c,isEnabled:n,client:a,page:l,frame:u,subject:d};return p},z5=function(t,n){var r=Xb(t);if(!n||t!==n)return r;var o=r.paddingBox.top-n.scrollTop,i=r.paddingBox.left-n.scrollLeft,a=o+n.scrollHeight,l=i+n.scrollWidth,s={top:o,right:l,bottom:a,left:i},u=Xm(s,r.border),c=qm({borderBox:u,margin:r.margin,border:r.border,padding:r.padding});return c},U5=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,u=r.closestScrollable,c=z5(t,u),d=Js(c,o),p=function(){if(!u)return null;var g=Xb(u),I={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:g,page:Js(g,o),scroll:tf(u),scrollSize:I,shouldClipSubject:s}}(),f=k5({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:i,client:c,page:d,closest:p});return f},B5={passive:!1},_5={passive:!0},wy=function(e){return e.shouldPublishImmediately?B5:_5};function nu(e){var t=v.useContext(e);return t||V(!1),t}var Yl=function(t){return t&&t.env.closestScrollable||null};function $5(e){var t=v.useRef(null),n=nu(wc),r=hg("droppable"),o=n.registry,i=n.marshal,a=Ox(e),l=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),s=v.useRef(l),u=Me(function(){return it(function(b,N){t.current||V(!1);var x={x:b,y:N};i.updateDroppableScroll(l.id,x)})},[l.id,i]),c=ie(function(){var b=t.current;return!b||!b.env.closestScrollable?at:tf(b.env.closestScrollable)},[]),d=ie(function(){var b=c();u(b.x,b.y)},[c,u]),p=Me(function(){return Pa(d)},[d]),f=ie(function(){var b=t.current,N=Yl(b);b&&N||V(!1);var x=b.scrollOptions;if(x.shouldPublishImmediately){d();return}p()},[p,d]),g=ie(function(b,N){t.current&&V(!1);var x=a.current,D=x.getDroppableRef();D||V(!1);var j=O5(D),L={ref:D,descriptor:l,env:j,scrollOptions:N};t.current=L;var R=U5({ref:D,descriptor:l,env:j,windowScroll:b,direction:x.direction,isDropDisabled:x.isDropDisabled,isCombineEnabled:x.isCombineEnabled,shouldClipSubject:!x.ignoreContainerClipping}),U=j.closestScrollable;return U&&(U.setAttribute(hy.contextId,n.contextId),U.addEventListener("scroll",f,wy(L.scrollOptions))),R},[n.contextId,l,f,a]),I=ie(function(){var b=t.current,N=Yl(b);return b&&N||V(!1),tf(N)},[]),w=ie(function(){var b=t.current;b||V(!1);var N=Yl(b);t.current=null,N&&(p.cancel(),N.removeAttribute(hy.contextId),N.removeEventListener("scroll",f,wy(b.scrollOptions)))},[f,p]),y=ie(function(b){var N=t.current;N||V(!1);var x=Yl(N);x||V(!1),x.scrollTop+=b.y,x.scrollLeft+=b.x},[]),h=Me(function(){return{getDimensionAndWatchScroll:g,getScrollWhileDragging:I,dragStopped:w,scroll:y}},[w,g,I,y]),M=Me(function(){return{uniqueId:r,descriptor:l,callbacks:h}},[h,l,r]);Vt(function(){return s.current=M.descriptor,o.droppable.register(M),function(){t.current&&w(),o.droppable.unregister(M)}},[h,l,w,M,i,o.droppable]),Vt(function(){t.current&&i.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Vt(function(){t.current&&i.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function Pd(){}var by={width:0,height:0,margin:cU},F5=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,o=t.animate;return n||o==="close"?by:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},H5=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,o=t.animate,i=F5({isAnimatingOpenOnMount:n,placeholder:r,animate:o});return{display:r.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:o!=="none"?sa.placeholder:null}};function W5(e){var t=v.useRef(null),n=ie(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,o=e.onTransitionEnd,i=e.onClose,a=e.contextId,l=v.useState(e.animate==="open"),s=l[0],u=l[1];v.useEffect(function(){return s?r!=="open"?(n(),u(!1),Pd):t.current?Pd:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):Pd},[r,s,n]);var c=ie(function(p){p.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),d=H5({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return O.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})}var G5=O.memo(W5),yg=O.createContext(null),Z5=function(e){Eb(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(o,i){return o.shouldAnimate?o.on?{isVisible:!0,data:o.on,animate:"open"}:i.isVisible?{isVisible:!0,data:i.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!o.on,data:o.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var o={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(o)},t}(O.PureComponent),xy={dragging:5e3,dropAnimating:4500},V5=function(t,n){return n?sa.drop(n.duration):t?sa.snap:sa.fluid},Y5=function(t,n){return t?n?ka.opacity.drop:ka.opacity.combining:null},Q5=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function J5(e){var t=e.dimension,n=t.client,r=e.offset,o=e.combineWith,i=e.dropping,a=!!o,l=Q5(e),s=!!i,u=s?qp.drop(r,a):qp.moveTo(r),c={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:V5(l,i),transform:u,opacity:Y5(a,s),zIndex:s?xy.dropAnimating:xy.dragging,pointerEvents:"none"};return c}function X5(e){return{transform:qp.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function q5(e){return e.type==="DRAGGING"?J5(e):X5(e)}function K5(e,t,n){n===void 0&&(n=at);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Jb(o,r),a=Js(i,n),l={client:i,tagName:t.tagName.toLowerCase(),display:r.display},s={x:i.marginBox.width,y:i.marginBox.height},u={descriptor:e,placeholder:l,displaceBy:s,client:i,page:a};return u}function e$(e){var t=hg("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,s=Me(function(){return{canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:l}},[i,l,a]),u=ie(function(f){var g=o();return g||V(!1),K5(n,g,f)},[n,o]),c=Me(function(){return{uniqueId:t,descriptor:n,options:s,getDimension:u}},[n,u,s,t]),d=v.useRef(c),p=v.useRef(!0);Vt(function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}},[r.draggable]),Vt(function(){if(p.current){p.current=!1;return}var f=d.current;d.current=c,r.draggable.update(c,f)},[c,r.draggable])}function t$(e){e.preventDefault()}function n$(e){var t=v.useRef(null),n=ie(function(L){t.current=L},[]),r=ie(function(){return t.current},[]),o=nu(wc),i=o.contextId,a=o.dragHandleUsageInstructionsId,l=o.registry,s=nu(yg),u=s.type,c=s.droppableId,d=Me(function(){return{id:e.draggableId,index:e.index,type:u,droppableId:c}},[e.draggableId,e.index,u,c]),p=e.children,f=e.draggableId,g=e.isEnabled,I=e.shouldRespectForcePress,w=e.canDragInteractiveElements,y=e.isClone,h=e.mapped,M=e.dropAnimationFinished;if(!y){var b=Me(function(){return{descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:w,shouldRespectForcePress:I,isEnabled:g}},[d,l,r,w,I,g]);e$(b)}var N=Me(function(){return g?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:t$}:null},[i,a,f,g]),x=ie(function(L){h.type==="DRAGGING"&&h.dropping&&L.propertyName==="transform"&&M()},[M,h]),D=Me(function(){var L=q5(h),R=h.type==="DRAGGING"&&h.dropping?x:null,U={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":f,style:L,onTransitionEnd:R},dragHandleProps:N};return U},[i,N,f,h,x,n]),j=Me(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return p(D,h.snapshot,j)}var Hx=function(e,t){return e===t},Wx=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},r$=function(t){return t.combine?t.combine.draggableId:null},o$=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function i$(){var e=it(function(o,i){return{x:o,y:i}}),t=it(function(o,i,a,l,s){return{isDragging:!0,isClone:i,isDropAnimating:!!s,dropAnimation:s,mode:o,draggingOver:a,combineWith:l,combineTargetFor:null}}),n=it(function(o,i,a,l,s,u,c){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:s,combineWith:u,mode:i,offset:o,dimension:a,forceShouldAnimate:c,snapshot:t(i,l,s,u,null)}}}),r=function(i,a){if(i.isDragging){if(i.critical.draggable.id!==a.draggableId)return null;var l=i.current.client.offset,s=i.dimensions.draggables[a.draggableId],u=Zt(i.impact),c=o$(i.impact),d=i.forceShouldAnimate;return n(e(l.x,l.y),i.movementMode,s,a.isClone,u,c,d)}if(i.phase==="DROP_ANIMATING"){var p=i.completed;if(p.result.draggableId!==a.draggableId)return null;var f=a.isClone,g=i.dimensions.draggables[a.draggableId],I=p.result,w=I.mode,y=Wx(I),h=r$(I),M=i.dropDuration,b={duration:M,curve:ug.drop,moveTo:i.newHomeClientOffset,opacity:h?ka.opacity.drop:null,scale:h?ka.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:g,dropping:b,draggingOver:y,combineWith:h,mode:w,forceShouldAnimate:null,snapshot:t(w,f,y,h,b)}}}return null};return r}function Gx(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var a$={mapped:{type:"SECONDARY",offset:at,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Gx(null)}};function l$(){var e=it(function(a,l){return{x:a,y:l}}),t=it(Gx),n=it(function(a,l,s){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:l,shouldAnimateDisplacement:s,snapshot:t(l)}}}),r=function(l){return l?n(at,l,!0):null},o=function(l,s,u,c){var d=u.displaced.visible[l],p=!!(c.inVirtualList&&c.effected[l]),f=vc(u),g=f&&f.draggableId===l?s:null;if(!d){if(!p)return r(g);if(u.displaced.invisible[l])return null;var I=mi(c.displacedBy.point),w=e(I.x,I.y);return n(w,g,!0)}if(p)return r(g);var y=u.displacedBy.point,h=e(y.x,y.y);return n(h,g,d.shouldAnimate)},i=function(l,s){if(l.isDragging)return l.critical.draggable.id===s.draggableId?null:o(s.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var u=l.completed;return u.result.draggableId===s.draggableId?null:o(s.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null};return i}var s$=function(){var t=i$(),n=l$(),r=function(i,a){return t(i,a)||n(i,a)||a$};return r},u$={dropAnimationFinished:Sx},c$=Yb(s$,u$,null,{context:gg,pure:!0,areStatePropsEqual:Hx})(n$);function Zx(e){var t=nu(yg),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:O.createElement(c$,e)}function d$(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return O.createElement(Zx,ae({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function p$(e){var t=v.useContext(wc);t||V(!1);var n=t.contextId,r=t.isMovementAllowed,o=v.useRef(null),i=v.useRef(null),a=e.children,l=e.droppableId,s=e.type,u=e.mode,c=e.direction,d=e.ignoreContainerClipping,p=e.isDropDisabled,f=e.isCombineEnabled,g=e.snapshot,I=e.useClone,w=e.updateViewportMaxScroll,y=e.getContainerForClone,h=ie(function(){return o.current},[]),M=ie(function(U){o.current=U},[]);ie(function(){return i.current},[]);var b=ie(function(U){i.current=U},[]),N=ie(function(){r()&&w({maxScroll:Tx()})},[r,w]);$5({droppableId:l,type:s,mode:u,direction:c,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:d,getDroppableRef:h});var x=O.createElement(Z5,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(U){var ee=U.onClose,W=U.data,q=U.animate;return O.createElement(G5,{placeholder:W,onClose:ee,innerRef:b,animate:q,contextId:n,onTransitionEnd:N})}),D=Me(function(){return{innerRef:M,placeholder:x,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}},[n,l,x,M]),j=I?I.dragging.draggableId:null,L=Me(function(){return{droppableId:l,type:s,isUsingCloneFor:j}},[l,j,s]);function R(){if(!I)return null;var U=I.dragging,ee=I.render,W=O.createElement(Zx,{draggableId:U.draggableId,index:U.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(q,Y){return ee(q,Y,U)});return $0.createPortal(W,y())}return O.createElement(yg.Provider,{value:L},a(D,g),R())}var Ld=function(t,n){return t===n.droppable.type},Sy=function(t,n){return n.draggables[t.draggable.id]},f$=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ae({},t,{shouldAnimatePlaceholder:!1}),r=it(function(a){return{draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}}}),o=it(function(a,l,s,u,c,d){var p=c.descriptor.id,f=c.descriptor.droppableId===a;if(f){var g=d?{render:d,dragging:r(c.descriptor)}:null,I={isDraggingOver:s,draggingOverWith:s?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:I,useClone:g}}if(!l)return n;if(!u)return t;var w={isDraggingOver:s,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:w,useClone:null}}),i=function(l,s){var u=s.droppableId,c=s.type,d=!s.isDropDisabled,p=s.renderClone;if(l.isDragging){var f=l.critical;if(!Ld(c,f))return n;var g=Sy(f,l.dimensions),I=Zt(l.impact)===u;return o(u,d,I,I,g,p)}if(l.phase==="DROP_ANIMATING"){var w=l.completed;if(!Ld(c,w.critical))return n;var y=Sy(w.critical,l.dimensions);return o(u,d,Wx(w.result)===u,Zt(w.impact)===u,y,p)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var h=l.completed;if(!Ld(c,h.critical))return n;var M=Zt(h.impact)===u,b=!!(h.impact.at&&h.impact.at.type==="COMBINE"),N=h.critical.droppable.id===u;return M?b?t:n:N?t:n}return n};return i},m$={updateViewportMaxScroll:bB};function g$(){return document.body||V(!1),document.body}var h$={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:g$},Vx=Yb(f$,m$,null,{context:gg,pure:!0,areStatePropsEqual:Hx})(p$);Vx.defaultProps=h$;const v$=3,y$=({onClick:e,stackType:t,policyManager:n})=>{var s;const[r,o]=v.useState(!1),i=()=>{o(!r)},a=((s=n.policiesUsageInfo)==null?void 0:s.filter(u=>Ro(u.policyType)===t).sort((u,c)=>c.operations.length-u.operations.length))??[];let l=a;return r||(l=a.slice(0,v$)),l.length===0?null:m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md pb-2",children:"EXISTING POLICIES"}),m.jsx("div",{className:"grid grid-cols-3 gap-2 h-fit max-h-40 overflow-y-auto",children:l.map(u=>{const c=il(u.policyType),d=()=>e(u,u.policyType),p=u.operations.length;return m.jsxs("button",{type:"button",onClick:d,className:"flex flex-col items-center justify-content-center h-16 border border-gray-300 shadow-sm rounded bg-gray-50 hover:bg-gray-200 p-3",children:[m.jsxs("div",{className:"h-full flex flex-row items-center justify-content-center",children:[m.jsx("img",{className:"w-6 h-6 mr-2",src:c==null?void 0:c.icon,alt:u.policyType}),m.jsx("div",{className:"text-md font-semibold truncate w-64",children:u.name})]}),m.jsx("p",{className:"w-full text-sm text-gray-400",children:`Used in ${p} ${p>1?"routes":"route"}`})]},u.name)})}),a.length>l.length&&!r&&m.jsx("div",{className:"pt-2",children:m.jsx("button",{onClick:i,type:"button",className:"border border-gray-300 shadow-sm rounded-md bg-gray-50 hover:bg-gray-200 w-full self-center px-3 py-1",children:"See All"})})]})},I$=({onClick:e,id:t,name:n,icon:r})=>{const o=()=>e(t);return m.jsxs("button",{type:"button","data-test":t,className:"h-32 border border-gray-300 shadow-sm flex flex-col items-center justify-content-center rounded bg-gray-50 hover:bg-gray-200 p-3",onClick:o,children:[m.jsx("div",{className:"m-3",children:m.jsx("img",{className:"w-12 h-12",src:r,alt:n})}),m.jsx("div",{className:"font-bold",children:n})]})},M$=({onClick:e,stackType:t})=>{const[n,r]=v.useState(),o=l=>{r(l.currentTarget.value)},i=v.useRef(null);v.useEffect(()=>{var l;(l=i.current)==null||l.focus()},[]);const a=Cb().filter(l=>!l.isDeprecated).filter(l=>n?l.name.toLowerCase().includes(n.toLowerCase()):!0).filter(l=>l.id.endsWith(`-${t}`)).sort((l,s)=>l.name<s.name?1:l.name>s.name?-1:0).sort(l=>l.isPaidAddOn||l.isPreview?1:-1);return m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md",children:"ADD A NEW POLICY"}),m.jsxs("div",{className:"mt-2 relative rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:m.jsx(H0,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),m.jsx("input",{ref:i,defaultValue:n,className:"focus:ring-indigo-500 focus:border-indigo-500 block w-full h-8 pl-10 sm:text-sm border border-gray-300 shadow-sm rounded",placeholder:"Search for a Policy",onChange:o})]}),m.jsx("div",{className:"h-55vh overflow-y-auto",children:m.jsx("div",{className:"mt-2 pb-10 grid grid-cols-3 gap-2 h-fit max-h-55vh",children:a.map(l=>m.jsx(I$,{onClick:e,...l},l.id))})})]})};function w$({stackType:e,shouldHideExistingPolicies:t=!1,policyManager:n,onPolicySelected:r,onExistingPolicySelected:o}){const i=l=>{r(l)},a=l=>{o(l)};return m.jsxs("div",{className:"flex flex-col w-full pl-8 pr-6 mt-2",children:[t?null:m.jsx("div",{className:"pb-4",children:m.jsx(y$,{onClick:a,policyManager:n,stackType:e})}),m.jsx("div",{className:"mt-2",children:m.jsx(M$,{onClick:i,stackType:e})})]})}const b$=({fakePolicyUrl:e,designConfig:t,onCancel:n})=>{const r=()=>{window.open(e,"_blank")};return m.jsxs("div",{className:"flex flex-col w-[600px] gap-y-4",children:[m.jsx("div",{className:"pt-4 pl-8 text-lg text-gray-500",children:t.name}),m.jsx("div",{className:"w-full",children:t.exampleHtml?m.jsx(Hm,{documentationSrc:t.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[ao.COMING_SOON.icon,m.jsx("div",{children:ao.COMING_SOON.defaultTitle})]})}),m.jsxs("div",{className:"flex w-full gap-x-4 justify-end pr-6 pb-4",children:[m.jsx(Hn,{label:"Cancel",buttonType:qo.WHITE,classNames:"w-24 justify-center",onClick:n,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(Hn,{label:"Open Guide",classNames:"w-36 justify-center",onClick:r,dataTestId:"policy-picker-footer-request-access-btn"})]})]})},x$="There's already a policy with this name",S$="Policy name can't be empty",N$=({policyID:e,operation:t,onComplete:n,onCancel:r,policyManager:o})=>{const i=o.getPolicyListEnforced(),a=il(e),l=!!(a!=null&&a.isPreview)||!!(a!=null&&a.isPaidAddOn),[s,u]=v.useState(Lz(i,e)),[c,d]=v.useState(null),[p,f]=v.useState(null),g=v.useRef();if(v.useEffect(()=>{(N=>{if(!N){d(S$);return}if(i.find(D=>D.name===N)){d(x$);return}d(null)})(s)},[s,i]),!a)return null;if(a.fakePolicyUrl)return m.jsx(b$,{fakePolicyUrl:a.fakePolicyUrl,designConfig:a,onCancel:r});const I=(b,N)=>{const x={handler:N,name:s,policyType:b};o.createPolicy(x,t?[t]:void 0)},w=()=>{var N;const b=(N=g.current)==null?void 0:N.getValue();if(!(!e||!b))try{const x=JSON.parse(b);I(e,x),n()}catch(x){f(x.message)}},y=b=>{u(Tb(b.toLowerCase()))};function h(b){g.current=b}const M=!!c;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(Db,{name:s,onChangeName:y,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:c,disabled:l})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Vs,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(Sb,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:fe("h-60",{"border-2 border-red-500":!!p}),width:"100%",language:"json",onMount:h,defaultValue:JSON.stringify(a.defaultHandler,void 0,NM)}),p?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:p}):null]}),m.jsx(Vs,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Hm,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[ao.COMING_SOON.icon,m.jsx("div",{children:ao.COMING_SOON.defaultTitle})]})})]}),m.jsx(Nb,{onConfirm:w,onCancel:r,isDisabled:M,mustRequestAccess:l})]})},D$=e=>{switch(e){case"policy-picker":return"Choose Policy";case"policy-access-requested":return"Access Requested";case"policy-configurator":return"Create Policy"}},A$=({isOpen:e,setIsOpen:t,stackType:n,operation:r,shouldHideExistingPolicies:o=!1,policyManager:i})=>{const[a,l]=v.useState("policy-picker"),[s,u]=v.useState(),c=()=>{t(!1)},d=w=>{u(w),l("policy-configurator")},p=r?{filePath:r.additionalOperationContext.oasFilePath,path:r.additionalOperationContext.path,method:r.additionalOperationContext.method}:void 0,f=w=>{if(r==null||p==null)throw new Error("Operation config not found to add policy to");i.applyPolicy(w.name,[p]),c()};let g,I=!1;if(s&&a==="policy-configurator"){const w=il(s);g=w!=null&&w.isPaidAddOn?"Paid Add On":w!=null&&w.isPreview&&!w.fakePolicyUrl?"Private Preview":void 0,I=(w==null?void 0:w.fakePolicyUrl)!=null}return m.jsxs(gb,{title:D$(a),isOpen:e,badgeTitle:g,setIsOpen:t,matchWidth:I,children:[a==="policy-picker"?m.jsx(w$,{stackType:n,shouldHideExistingPolicies:o,policyManager:i,onPolicySelected:d,onExistingPolicySelected:f}):null,a==="policy-configurator"&&s!=null?m.jsx(N$,{policyID:s,operation:p,onComplete:c,onCancel:c,policyManager:i}):null]})},Ny=({policies:e,stackType:t,operation:n})=>{const r=nc(),o={filePath:n.additionalOperationContext.oasFilePath,path:n.additionalOperationContext.path,method:n.additionalOperationContext.method},[i,a]=Da(()=>m.jsx(A$,{isOpen:!0,setIsOpen:a,stackType:t,operation:n,policyManager:r}),[t,n,r]),l=u=>{const c=e[u];r.removePolicy(c,t,[o])},s=u=>{u.destination&&u.destination.index!==u.source.index&&r.movePolicy(e,u.source.index,u.destination.index,t,o)};return m.jsx(C5,{onDragEnd:s,children:m.jsxs("div",{className:"flex flex-col w-full max-w-full items-center gap-y-2 px-3",children:[m.jsx(Vx,{droppableId:"list",children:u=>m.jsxs("div",{className:"w-full max-w-full xl:w-fit flex flex-col items-stretch",ref:u.innerRef,...u.droppableProps,children:[e.map((c,d)=>m.jsx(d$,{draggableId:`${c}-${d}`,index:d,isDragDisabled:!1,children:p=>m.jsx("div",{className:"flex w-full max-w-full py-2",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:m.jsx(kz,{isReadOnly:!1,index:d,policy:c,stackType:t,onDelete:l})})},`${c}-${d}`)),u.placeholder]})}),m.jsx("div",{className:"flex flex-row justify-center",children:m.jsx(Hn,{dataTestId:`add-${t}-policy`,buttonType:qo.GRAY,onClick:()=>{i()},label:"Add Policy",icon:m.jsx(dA,{className:"w-5 h-auto text-gray-500"}),iconAlignment:"left"})})]})})},Dy=({children:e,direction:t})=>m.jsxs("div",{className:"grid h-full w-full max-w-full",children:[m.jsxs("div",{className:"w-full max-w-full flex flex-col items-center col-start-1 row-start-1",children:[t==="up"?m.jsx("div",{className:"flex-none pl-[0.06rem]",children:m.jsx("img",{src:"/icons/arrow_head_up.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{}),m.jsx("div",{className:"flex-grow",children:m.jsx("img",{className:"h-full w-3",src:"/icons/arrow_line.svg",alt:"arrow-line"})}),t==="down"?m.jsx("div",{className:"flex-none",children:m.jsx("img",{src:"/icons/arrow_head_down.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{})]}),m.jsx("div",{className:"w-full max-w-full min-w-0 col-start-1 row-start-1 pt-4 pb-6",children:e})]}),C$=({children:e,isPoliciesExpanded:t,onPoliciesExpandedChange:n,inboundPolicies:r,outboundPolicies:o,operation:i})=>m.jsxs("div",{className:"w-full 2xl:col-span-12 flex flex-col justify-start",children:[m.jsx("div",{className:fe("rounded-t absolute h-12 right-0 ",{"bg-gray-100":t}),children:" "}),m.jsx("button",{type:"button","data-test":"policy-designer-expand-collapse",onClick:()=>{n()},className:fe("text-sm flex text-center px-3 py-2 z-5 w-full text-black bg-gray-100 hover:bg-gray-200",t?"rounded-t":"rounded"),children:m.jsxs("span",{className:"inline-flex items-center text-lg",children:[t?m.jsx(bu,{className:"w-5 h-auto"}):m.jsx(GD,{className:"w-5 h-auto"})," Policies"]})}),t?m.jsxs("div",{className:"flex flex-col pb-4 bg-gray-100 rounded-b",children:[m.jsx("div",{className:"flex flex-col",children:m.jsxs("div",{className:"grid grid-cols-2 pb-4",children:[m.jsxs("div",{className:"flex flex-col items-center h-auto",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Request"}),m.jsx(Dy,{direction:"down",children:m.jsx(Ny,{operation:i,policies:r,stackType:"inbound"})})]}),m.jsxs("div",{className:"flex-grow flex flex-col",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Response"}),m.jsx(Dy,{direction:"up",children:m.jsx(Ny,{operation:i,policies:o,stackType:"outbound"})})]})]})}),e]}):null]});function T$({operationData:e}){return e?m.jsx("div",{className:"w-full h-fit flex flex-col",children:m.jsx(E$,{operationData:e})}):m.jsx("div",{className:"m-auto flex text-center",children:m.jsxs("h1",{className:"text-gray-400 text-xl mb-5",children:["No operation selected ",m.jsx("br",{}),"Select an operation to start editing"]})})}const E$=({operationData:e})=>{var F,ne,P,z,_,G;const t=$m().get("path");if(!t)throw new Error("Open API file path not found in URL");const n=G4(t),{path:r,method:o}=e.additionalOperationContext,{additionalOperationContext:i,...a}=e,l=Fm(),s=nc(),u="",[c,d]=v.useState(),[p,f]=v.useState(),[g,I]=v.useState(),[w,y]=v.useState(!1),h=(P=(ne=(F=l.openApiData)==null?void 0:F.servers)==null?void 0:ne.at(0))==null?void 0:P.url,M=a[pr]??ru(h??Ca),b=a[Fh]===!0;v.useEffect(()=>{d(void 0),f(void 0)},[e.operationId]);const N=()=>{y(!w)},x=S=>{const C={...S},T={...M,handler:C};l.updateOperation({path:r,method:o,newOperationObject:{...a,[pr]:T}}),d(void 0)},D=S=>{l.updateOperation({path:r,method:o,newOperationObject:{...a,summary:S}}),d(void 0)},j=S=>{l.updateOperation({path:r,method:o,newOperationObject:{...a,[Fh]:S}})},L=S=>{let{newPath:C}=S;const{newMethod:T}=S;g!=null&&C==null&&(C=g);try{l.updateOperation({path:r,newPath:C,method:o,newMethod:T,newOperationObject:a}),f(void 0),d(void 0),I(void 0)}catch(k){k instanceof Error&&(C!=null&&(I(C),f(k.message)),T!=null&&d(k.message))}},R=S=>{if(S===r){f(void 0),d(void 0),I(void 0);return}const C=S.startsWith("/")?S:"/"+S;L({newPath:C})},U=({value:S})=>{const C=S;if(C===o){d(void 0);return}L({newMethod:C})},ee=S=>{const C={...M,corsPolicy:S};l.updateOperation({path:r,method:o,newOperationObject:{...a,[pr]:C}}),d(void 0)},W=S=>{const C={...e.additionalOperationContext.pathZuploConfig,pathMode:S},k=l.getOpenApiDataEnforced().paths;if(!k)throw new Error("Property 'paths' is undefined");const B=k[r];if(!B)throw new Error(`Path Item '${r}' is undefined`);l.updatePathItem(r,{...B,[xM]:C}),d(void 0)},q=()=>{n(Ja.modified)},Y=m.jsx("div",{className:`${w?"mx-4":""}`,children:m.jsx(KE,{isOpenApi:!0,routeHandler:(e[pr]??ru(h??Ca)).handler,onRequestHandlerChange:x})});return m.jsxs("div",{className:"m-2 p-3 pt-3 rounded","data-test":"route-handling-section",children:[m.jsxs("div",{className:"flex items-center mb-4",children:[m.jsx("span",{className:"pr-3 text-lg font-medium text-gray-900 whitespace-nowrap flex-none",children:"Request Handling"}),m.jsx("div",{className:"border-t border-gray-300 flex-grow"})]}),m.jsxs("div",{className:"flex flex-col gap-y-3 pb-4",children:[m.jsx(EE,{initialSummary:a.summary,span:4,onSummaryChange:D,onFieldModified:q}),m.jsxs("div",{className:"flex flex-col",children:[m.jsx(TE,{initialPath:r,method:o,summary:e.summary,span:6,pathMode:(z=e.additionalOperationContext.pathZuploConfig)==null?void 0:z.pathMode,hasError:p!=null,onPathChange:R,onPathModeChange:W,operationData:e,onFieldModified:q}),p?m.jsx("p",{"data-test":"path-error",className:"text-sm text-red-600 pt-1 ml-10",children:p}):null]}),m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-start gap-x-3 xl:gap-x-8 w-full items-center flex-wrap gap-y-3 lg:gap-y-0 lg:flex-nowrap",children:[m.jsx(CE,{selectedMethod:o,onSelectionChanged:U,versionPathPrefix:u,span:4}),m.jsx(NE,{selectedCorsPolicy:M.corsPolicy,corsPolicies:s.corsPolicyList??[],span:3,onCORSSelectionChanged:ee}),m.jsx(DE,{shouldExcludeFromDocs:b,span:3,onSelectionChanged:j})]}),c?m.jsx("p",{"data-test":"method-error",className:"text-sm text-red-600 pt-1 w-full",children:c}):null]}),m.jsx(C$,{inboundPolicies:((_=M.policies)==null?void 0:_.inbound)??[],outboundPolicies:((G=M.policies)==null?void 0:G.outbound)??[],operation:e,isPoliciesExpanded:w,onPoliciesExpandedChange:N,children:w?Y:null})]}),w?null:m.jsx("div",{className:"w-full col-span-12",children:Y})]})};let Ql;const j$=new Uint8Array(16);function P$(){if(!Ql&&(Ql=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ql))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ql(j$)}const ct=[];for(let e=0;e<256;++e)ct.push((e+256).toString(16).slice(1));function L$(e,t=0){return(ct[e[t+0]]+ct[e[t+1]]+ct[e[t+2]]+ct[e[t+3]]+"-"+ct[e[t+4]]+ct[e[t+5]]+"-"+ct[e[t+6]]+ct[e[t+7]]+"-"+ct[e[t+8]]+ct[e[t+9]]+"-"+ct[e[t+10]]+ct[e[t+11]]+ct[e[t+12]]+ct[e[t+13]]+ct[e[t+14]]+ct[e[t+15]]).toLowerCase()}const R$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ay={randomUUID:R$};function O$(e,t,n){if(Ay.randomUUID&&!t&&!e)return Ay.randomUUID();e=e||{};const r=e.random||(e.rng||P$)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return L$(r)}const k$="Document Order",z$=["Document Order","Path","Summary"],Rd="Untagged";function U$(e){return{summary:"New Route",description:"Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do `eiusmod tempor` incididunt ut labore et dolore magna aliqua.",[pr]:ru(e),operationId:O$()}}function ru(e){return{corsPolicy:"none",handler:{export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:e}},policies:{inbound:[]}}}const B$=()=>{var ne;const[e,t]=v.useState(),[n,r]=v.useState([]),[o,i]=v.useState(),[a,l]=v.useState(void 0),[s,u]=v.useState(k$),[c,d]=v.useState(void 0),p=Fm(),[f,g]=v.useState(),[I,w]=v.useState(),[y,h]=Da(()=>{if(o==null)throw new Error("Invalid state, operationToDelete should not be undefined");const P=()=>{try{j(o.path,o.method)}catch(_){_ instanceof Error&&(d(_.message),M())}i(void 0),h()},z=()=>{i(void 0),h()};return m.jsx(Op,{hideModal:h,alertType:"DELETE",bodyText:"Are you sure you want to delete this operation?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:P,onSecondaryButtonClick:z,primaryButtonTestID:"confirm-delete-btn"})},[o,i]),[M,b]=Da(()=>{const P=()=>{d(void 0),b()};return m.jsx(Op,{alertType:"ERROR",bodyText:c??"",onPrimaryButtonClick:()=>{},onSecondaryButtonClick:P,primaryButtonText:"Edit file directly",secondaryButtonText:"Cancel",hideModal:P,title:"Error"})},[c]);if(!p.openApiData)throw new Error("Invalid State - no OpenApiData");const N=(ne=p.openApiData.tags)==null?void 0:ne.map(P=>({value:P.name,label:P.name,shouldSupportOnly:!0}));N==null||N.push({value:Rd,label:Rd,shouldSupportOnly:!0});const x=n.reduce((P,z)=>(P.set(z,!0),P),new Map),D=p.operationArray,j=(P,z)=>{p.deleteOperation(P,z)},L=()=>{var C,T,k,B;const P=(k=(T=(C=p.openApiData)==null?void 0:C.servers)==null?void 0:T.at(0))==null?void 0:k.url,z=U$(P??Ca),G=`/path-${((B=p.operationArray)==null?void 0:B.length)??0}`,S=An.OpenAPIV3.HttpMethods.GET;try{p.addOperation(G,S,z)}catch(oe){oe instanceof Error&&(d(oe.message),M())}l(z.operationId)},R=(P,z,_)=>{i({path:P,method:z,operationId:_}),y()},U=P=>{t(P)},ee=P=>{r(P)},W=P=>{u(P.value)},q=P=>{var _;if(!e||e==="")return!0;const z=e.toLowerCase();return P.additionalOperationContext.path.includes(z)||((_=P.summary)==null?void 0:_.toLowerCase().includes(z))},Y=P=>{if(n.length===0)return!0;const z=P.tags;return z?z.some(_=>x.has(_)):n.includes(Rd)},F=(P,z)=>{var _;switch(s){case"Document Order":return 0;case"Path":return P.additionalOperationContext.path.localeCompare(z.additionalOperationContext.path);case"Summary":return!P.summary&&!z.summary?0:!P.summary&&z.summary?1:P.summary&&!z.summary?-1:((_=P.summary)==null?void 0:_.localeCompare(z.summary??""))??0}};return!D||D.length===0&&(!e||e.trim().length===0)?m.jsx(yE,{addRoute:L}):m.jsx(m.Fragment,{children:m.jsxs("div",{className:"mx-2 grid grid-cols-3 h-full flex-grow",children:[m.jsxs("div",{className:"flex flex-col justify-start col-span-1 h-full py-6",children:[m.jsx("div",{className:"flex w-full mr-3 pb-5",children:m.jsx(wE,{onSearch:U})}),m.jsxs("div",{className:"flex flex-wrap w-full justify-between gap-x-4 gap-y-2 mr-3 pb-5",children:[m.jsx(Lr,{labelPrefixElement:m.jsx("span",{className:"hidden 2xl:inline mr-1",children:"Sort:"}),selected:{label:s,value:s},onChange:W,options:z$.map(P=>({label:P,value:P}))}),m.jsx(sE,{filterPrefixClassName:"hidden 2xl:inline",filterName:n.length===1?"Tag":"Tags",activeFilters:n,options:N??[],onFilterChange:ee,isDisabled:!N})]}),m.jsx("div",{className:"relative max-h-[calc(100vh-250px)] overflow-auto w-full mb-2",children:D.filter(q).filter(Y).sort(F).map(({additionalOperationContext:P,...z})=>{const _=z.operationId===a,G=_&&f?f:P.path,S=_&&I?I:z.summary;return m.jsx("div",{className:"flex w-full items-center",children:m.jsx(ME,{path:G,method:P.method,summary:S,operationId:z.operationId,isSelected:z.operationId===a,onOperationSelected:C=>{l(C),g(""),w("")},onDelete:R})},z.operationId)})}),m.jsx("div",{className:"flex justify-center",children:m.jsxs("button",{type:"button",onClick:L,className:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500","data-test":"add-route-btn",children:[m.jsx(mA,{className:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),m.jsx("span",{children:"Add Route"})]})})]}),m.jsx("div",{className:"col-span-2 flex flex-col",children:m.jsx(pm.Provider,{value:{setPath:g,setSummary:w},children:m.jsx(T$,{operationData:D.find(P=>P.operationId===a)})})})]})})},_$=({url:e,surfaceResponse:t})=>{const n=$m().get("path"),[r,o]=v.useState(!1),i=Fm(),a=nc();i.openApiData;const l=async()=>{try{if(!n)throw new Error("You must pick a file before saving");o(!0);const s=await fetch(`${e}/save-open-api-updates`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify([{filePath:n,content:i.openApiData},{filePath:a.policyListFileModel.path,content:a.policyListFileModel.content?JSON.parse(a.policyListFileModel.content):a.policyListFileModel.content}])}),u=await s.json();if(t(u.message,s.status===200?"success":"error"),s.status===200)return}catch(s){t(`Error: ${s.message}`,"error")}finally{o(!1)}};return m.jsx("div",{className:"mt-5",children:m.jsx("div",{className:"inline-block ml-3",children:r?m.jsx(Lu,{className:"w-4 h-4 mr-4 float-right"}):m.jsx("button",{type:"button",onClick:()=>l(),className:"inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500 bg-zuplo-pink hover:bg-zuplo-pink-hover",disabled:r,children:"Save Changes"})})})},$$=({url:e,handleErrors:t})=>{const[n,r]=v.useState(null),[o,i]=v.useState([]),a=[],[l,s]=hk(),[u,c]=v.useState(!0),d=f=>{const g=f.value;r(f),p("path",g)},p=(f,g)=>{let I=new URLSearchParams(l);I.set(f,g),s(I)};return v.useEffect(()=>{o&&o.length>0&&(r({label:o[0],value:o[0]}),p("path",o[0]))},[o]),v.useEffect(()=>{async function f(){try{c(!0);const g=await fetch(`${e}/open-api-files`,{method:"GET"});if(g.status!==200){const w=await g.json();t(w.message);return}const I=await g.json();i(I),c(!1)}catch(g){t(g.message)}finally{c(!1)}}f()},[e]),o.forEach(f=>{a.push({label:f,value:f})}),m.jsx("div",{className:"mt-5 justify-end pl-3 pr-6",children:m.jsx("div",{className:"inline-block w-1/5 ",children:m.jsx(Lr,{testId:"file-selector",placeholder:"Select Open API file",options:a,selected:n,onChange:d,className:"inline-block w-full text-base max-w-sm md:max-w-xs mr-4 h-[42px] text-slate-600",classNameOptions:"w-full",isLoadingData:u})})})},F$=({message:e,type:t,className:n})=>m.jsx(m.Fragment,{children:m.jsx(Pn,{show:e!=="",enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:fe("col-span-12 rounded-md p-5",{"bg-pink-100":t==="error","bg-green-100 ":t==="success"},n),children:m.jsx("span",{className:"text-sm text-gray-500",children:e})})}),H$=5e3;function W$(){const[e,t]=v.useState(null),n=i=>{t({message:i,type:"error"})},r=(i,a)=>{t({message:i,type:a}),setTimeout(()=>{t(null)},H$)},o="http://localhost:5500";return m.jsx(gk,{children:m.jsxs(LD,{children:[m.jsxs("div",{className:"flex flex-row text-slate-500 rounded-md w-auto gap-5 mt-5",children:[m.jsx("div",{className:"inline-block w-1/5",children:m.jsx($$,{url:o,handleErrors:n})}),m.jsx("div",{className:"text-left inline-block w-3/5",children:e!==null&&m.jsx(F$,{message:e.message,type:e.type})})]}),m.jsx(W2,{children:m.jsx(vk,{url:o,handleErrors:n,children:m.jsx(wk,{children:m.jsxs(m.Fragment,{children:[m.jsx(_$,{url:o,surfaceResponse:r}),m.jsx(B$,{})]})})})})]})})}Od.createRoot(document.getElementById("root")).render(m.jsx(O.StrictMode,{children:m.jsx(W$,{})}));
|
|
164
|
+
|
|
165
|
+
//# debugId=16294ea7-2efd-57c9-ad06-eb087d07014e
|
package/dist/editor/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6f4d4f6-ecc1-5d01-8753-da4a088d3ee1")}catch(e){}}();
|
|
1
3
|
import { ApiServer } from "./server/server.js";
|
|
2
4
|
export async function editor(argv) {
|
|
3
5
|
const workingDir = argv.dir || null;
|
|
@@ -6,4 +8,5 @@ export async function editor(argv) {
|
|
|
6
8
|
process.on("SIGINT", server.close);
|
|
7
9
|
server.start().catch(console.error);
|
|
8
10
|
}
|
|
9
|
-
//# sourceMappingURL=handler.js.map
|
|
11
|
+
//# sourceMappingURL=handler.js.map
|
|
12
|
+
//# debugId=d6f4d4f6-ecc1-5d01-8753-da4a088d3ee1
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2c771966-b118-5f81-8fe4-56b64755a2f5")}catch(e){}}();
|
|
1
3
|
import fp from 'fastify-plugin';
|
|
2
4
|
import cors from '@fastify/cors';
|
|
3
5
|
export const corsPlugin = fp(async function (fastify, opts) {
|
|
@@ -13,4 +15,5 @@ export const corsPlugin = fp(async function (fastify, opts) {
|
|
|
13
15
|
};
|
|
14
16
|
});
|
|
15
17
|
});
|
|
16
|
-
//# sourceMappingURL=cors-plugin.js.map
|
|
18
|
+
//# sourceMappingURL=cors-plugin.js.map
|
|
19
|
+
//# debugId=2c771966-b118-5f81-8fe4-56b64755a2f5
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ace8b450-e2bc-518f-970e-095a96600d98")}catch(e){}}();
|
|
1
3
|
import fastifyStatic from "@fastify/static";
|
|
2
4
|
import Fastify from "fastify";
|
|
3
5
|
import fs, { readdir } from "node:fs/promises";
|
|
@@ -132,4 +134,5 @@ export class ApiServer {
|
|
|
132
134
|
process.exit();
|
|
133
135
|
};
|
|
134
136
|
}
|
|
135
|
-
//# sourceMappingURL=server.js.map
|
|
137
|
+
//# sourceMappingURL=server.js.map
|
|
138
|
+
//# debugId=ace8b450-e2bc-518f-970e-095a96600d98
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="789e8c6e-c34f-5e44-8883-e3cc42dff578")}catch(e){}}();
|
|
1
3
|
import fs from 'node:fs/promises';
|
|
2
4
|
export async function fileExists(fsPath) {
|
|
3
5
|
try {
|
|
@@ -17,4 +19,5 @@ export async function dirExists(fsPath) {
|
|
|
17
19
|
return false;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
|
-
//# sourceMappingURL=xfs.js.map
|
|
22
|
+
//# sourceMappingURL=xfs.js.map
|
|
23
|
+
//# debugId=789e8c6e-c34f-5e44-8883-e3cc42dff578
|
package/dist/link/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1756fcaa-462b-539b-8d19-4d1e9afe8e3c")}catch(e){}}();
|
|
1
3
|
import { select } from "@inquirer/prompts";
|
|
2
4
|
import { readFile } from "node:fs/promises";
|
|
3
5
|
import { join } from "node:path";
|
|
@@ -77,4 +79,5 @@ export async function link(argv) {
|
|
|
77
79
|
Successfully linked your local directory to the ${project} project in the ${account} account.
|
|
78
80
|
.env.zuplo and zuplo.jsonc have been updated with the new values.`);
|
|
79
81
|
}
|
|
80
|
-
//# sourceMappingURL=handler.js.map
|
|
82
|
+
//# sourceMappingURL=handler.js.map
|
|
83
|
+
//# debugId=1756fcaa-462b-539b-8d19-4d1e9afe8e3c
|
package/dist/link/populate.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4ba6780-1db5-59a6-af4e-76cebc9e9a1e")}catch(e){}}();
|
|
1
3
|
import { applyEdits, modify } from "jsonc-parser";
|
|
2
4
|
import { existsSync } from "node:fs";
|
|
3
5
|
import { readFile, writeFile } from "node:fs/promises";
|
|
@@ -63,4 +65,5 @@ export async function pullSystemConfig(dir, options) {
|
|
|
63
65
|
.replaceAll("_", "-")}-working-copy`;
|
|
64
66
|
await writeFile(zuploPreferredConfigFile, content);
|
|
65
67
|
}
|
|
66
|
-
//# sourceMappingURL=populate.js.map
|
|
68
|
+
//# sourceMappingURL=populate.js.map
|
|
69
|
+
//# debugId=a4ba6780-1db5-59a6-af4e-76cebc9e9a1e
|
package/dist/list/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fdfd24e0-3e32-58bd-b655-a720aeaf96f1")}catch(e){}}();
|
|
1
3
|
import { logger } from "../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../common/output.js";
|
|
3
5
|
import settings from "../common/settings.js";
|
|
@@ -22,4 +24,5 @@ export async function list(argv) {
|
|
|
22
24
|
printDiagnosticsToConsole("Error: Failed to list deployed zups. Try again later.");
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
//# sourceMappingURL=handler.js.map
|
|
27
|
+
//# sourceMappingURL=handler.js.map
|
|
28
|
+
//# debugId=fdfd24e0-3e32-58bd-b655-a720aeaf96f1
|
package/dist/login/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6a4f5064-630d-52ee-863e-8a21094f6df5")}catch(e){}}();
|
|
1
3
|
import crypto from "node:crypto";
|
|
2
4
|
import { existsSync, mkdirSync } from "node:fs";
|
|
3
5
|
import { writeFile } from "node:fs/promises";
|
|
@@ -72,4 +74,5 @@ export async function login(args) {
|
|
|
72
74
|
}
|
|
73
75
|
printResultToConsoleAndExitGracefully("Successfully authenticated.");
|
|
74
76
|
}
|
|
75
|
-
//# sourceMappingURL=handler.js.map
|
|
77
|
+
//# sourceMappingURL=handler.js.map
|
|
78
|
+
//# debugId=6a4f5064-630d-52ee-863e-8a21094f6df5
|
package/dist/login/server.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4d6d7b07-64ef-5d67-9bf3-c0ce8338758f")}catch(e){}}();
|
|
1
3
|
import http from "http";
|
|
2
4
|
import opn from "open";
|
|
3
5
|
import { printCriticalFailureToConsoleAndExit } from "../common/output.js";
|
|
@@ -32,4 +34,5 @@ export async function browserAuth(authorizationUrl) {
|
|
|
32
34
|
server.close();
|
|
33
35
|
return params;
|
|
34
36
|
}
|
|
35
|
-
//# sourceMappingURL=server.js.map
|
|
37
|
+
//# sourceMappingURL=server.js.map
|
|
38
|
+
//# debugId=4d6d7b07-64ef-5d67-9bf3-c0ce8338758f
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b06a2506-c7df-54cc-805a-49ae467e40af")}catch(e){}}();
|
|
1
3
|
import { confirm } from "@inquirer/prompts";
|
|
2
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
3
5
|
import { PackageJsonUpgrader } from "../../common/upgraders/package-json-upgrader.js";
|
|
@@ -23,4 +25,5 @@ export async function update(argv) {
|
|
|
23
25
|
printResultToConsoleAndExitGracefully("Update completed");
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
|
-
//# sourceMappingURL=handler.js.map
|
|
28
|
+
//# sourceMappingURL=handler.js.map
|
|
29
|
+
//# debugId=b06a2506-c7df-54cc-805a-49ae467e40af
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="83d43197-be5e-5d4b-8a4a-0972a6339917")}catch(e){}}();
|
|
1
3
|
import { TEST_OUT_FOLDER } from "../common/constants.js";
|
|
2
4
|
import { denoTestPrepPlugin } from "./esbuild-plugins/deno-test-prep-plugin.js";
|
|
3
5
|
export function generateBuildOptionsForTest(argv) {
|
|
@@ -17,4 +19,5 @@ export function generateBuildOptionsForTest(argv) {
|
|
|
17
19
|
],
|
|
18
20
|
};
|
|
19
21
|
}
|
|
20
|
-
//# sourceMappingURL=esbuild-config.js.map
|
|
22
|
+
//# sourceMappingURL=esbuild-config.js.map
|
|
23
|
+
//# debugId=83d43197-be5e-5d4b-8a4a-0972a6339917
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d99da9ce-3bab-5cdb-b8a7-edfe098a9ff1")}catch(e){}}();
|
|
1
3
|
export function denoTestPrepPlugin(argv, options) {
|
|
2
4
|
const aliases = Object.keys(options);
|
|
3
5
|
const re = new RegExp(`^(${aliases.map((x) => escapeRegExp(x)).join("|")})$`);
|
|
@@ -93,4 +95,5 @@ function generateTestContents(argv) {
|
|
|
93
95
|
|
|
94
96
|
`;
|
|
95
97
|
}
|
|
96
|
-
//# sourceMappingURL=deno-test-prep-plugin.js.map
|
|
98
|
+
//# sourceMappingURL=deno-test-prep-plugin.js.map
|
|
99
|
+
//# debugId=d99da9ce-3bab-5cdb-b8a7-edfe098a9ff1
|
package/dist/test/handler.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aca6c312-c3e9-57ed-928a-8fe7fd3e5dde")}catch(e){}}();
|
|
1
3
|
import fg from "fast-glob";
|
|
2
4
|
import { promisify } from "node:util";
|
|
3
5
|
import rimraf from "rimraf";
|
|
@@ -24,4 +26,5 @@ export async function test(argv) {
|
|
|
24
26
|
process.exit(exitCode);
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
//# sourceMappingURL=handler.js.map
|
|
29
|
+
//# sourceMappingURL=handler.js.map
|
|
30
|
+
//# debugId=aca6c312-c3e9-57ed-928a-8fe7fd3e5dde
|
package/dist/test/invoke-test.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="47367187-aa4c-5f3c-b7cd-a8a57cc30bc9")}catch(e){}}();
|
|
1
3
|
import { execa } from "execa";
|
|
2
4
|
import { TEST_OUT_FOLDER } from "../common/constants.js";
|
|
3
5
|
import { locateDenoExecutable, MissingDenoExecutableError, } from "../common/deno-utils/locator.js";
|
|
@@ -32,4 +34,5 @@ export async function runTests(argv) {
|
|
|
32
34
|
throw new MissingDenoExecutableError();
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
|
-
//# sourceMappingURL=invoke-test.js.map
|
|
37
|
+
//# sourceMappingURL=invoke-test.js.map
|
|
38
|
+
//# debugId=47367187-aa4c-5f3c-b7cd-a8a57cc30bc9
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="db490b85-f57d-50ba-8f3a-00fa84724d9f")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
3
5
|
import settings from "../../common/settings.js";
|
|
@@ -24,4 +26,5 @@ export async function create(argv) {
|
|
|
24
26
|
printDiagnosticsToConsole("Error: Failed to create tunnel for your account. Check the arguments.");
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
//# sourceMappingURL=handler.js.map
|
|
29
|
+
//# sourceMappingURL=handler.js.map
|
|
30
|
+
//# debugId=db490b85-f57d-50ba-8f3a-00fa84724d9f
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3dbfae8e-75c2-56e5-9f02-34053a6aa35d")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../common/logger.js";
|
|
2
4
|
import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
3
5
|
import settings from "../../common/settings.js";
|
|
@@ -35,4 +37,5 @@ export async function deleteTunnel(argv) {
|
|
|
35
37
|
printDiagnosticsToConsole("Error: Failed to delete the tunnel for your account. Check the arguments.");
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
|
-
//# sourceMappingURL=handler.js.map
|
|
40
|
+
//# sourceMappingURL=handler.js.map
|
|
41
|
+
//# debugId=3dbfae8e-75c2-56e5-9f02-34053a6aa35d
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a3b7326d-95c8-51d5-a4dd-6233db93bce9")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole } from "../../common/output.js";
|
|
3
5
|
import settings from "../../common/settings.js";
|
|
@@ -34,4 +36,5 @@ export async function pollTeardownOperation(args) {
|
|
|
34
36
|
}
|
|
35
37
|
throw new Error("Unexpected error while polling for teardown operation status");
|
|
36
38
|
}
|
|
37
|
-
//# sourceMappingURL=poll-teardown-operation.js.map
|
|
39
|
+
//# sourceMappingURL=poll-teardown-operation.js.map
|
|
40
|
+
//# debugId=a3b7326d-95c8-51d5-a4dd-6233db93bce9
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d64d8573-9cc3-5b7e-bac6-d6fa4f2c2b01")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
3
5
|
import settings from "../../common/settings.js";
|
|
@@ -22,4 +24,5 @@ export async function describe(argv) {
|
|
|
22
24
|
printDiagnosticsToConsole("Error: Failed to describe tunnel for your account. Check the arguments.");
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
//# sourceMappingURL=handler.js.map
|
|
27
|
+
//# sourceMappingURL=handler.js.map
|
|
28
|
+
//# debugId=d64d8573-9cc3-5b7e-bac6-d6fa4f2c2b01
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d265e30b-ff1a-53f0-99eb-d375cad4154b")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
3
5
|
import settings from "../../common/settings.js";
|
|
@@ -31,4 +33,5 @@ export async function list(argv) {
|
|
|
31
33
|
printDiagnosticsToConsole("Error: Failed to list tunnels for your account. Try again later.");
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
|
-
//# sourceMappingURL=handler.js.map
|
|
36
|
+
//# sourceMappingURL=handler.js.map
|
|
37
|
+
//# debugId=d265e30b-ff1a-53f0-99eb-d375cad4154b
|
package/dist/tunnel/models.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2cba59b0-5d9c-564b-be3c-3b65c091d0b5")}catch(e){}}();
|
|
1
3
|
export {};
|
|
2
|
-
//# sourceMappingURL=models.js.map
|
|
4
|
+
//# sourceMappingURL=models.js.map
|
|
5
|
+
//# debugId=2cba59b0-5d9c-564b-be3c-3b65c091d0b5
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c6e4b9e-4128-5fe9-a57e-56c8f9ddd3e1")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
3
5
|
import settings from "../../common/settings.js";
|
|
@@ -22,4 +24,5 @@ export async function rotateToken(argv) {
|
|
|
22
24
|
printDiagnosticsToConsole("Error: Failed to rotate token for tunnel. Check the arguments.");
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
//# sourceMappingURL=handler.js.map
|
|
27
|
+
//# sourceMappingURL=handler.js.map
|
|
28
|
+
//# debugId=9c6e4b9e-4128-5fe9-a57e-56c8f9ddd3e1
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d0b6aa19-5aae-5f66-acfb-c8014cfd09fc")}catch(e){}}();
|
|
1
3
|
import { logger } from "../../../common/logger.js";
|
|
2
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../../common/output.js";
|
|
3
5
|
import settings from "../../../common/settings.js";
|
|
@@ -22,4 +24,5 @@ export async function describe(argv) {
|
|
|
22
24
|
printDiagnosticsToConsole("Error: Failed to describe the services for your tunnel. Check the arguments.");
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
//# sourceMappingURL=handler.js.map
|
|
27
|
+
//# sourceMappingURL=handler.js.map
|
|
28
|
+
//# debugId=d0b6aa19-5aae-5f66-acfb-c8014cfd09fc
|