@samyx/preview-stacks-ui 0.16.0 → 0.17.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/assets/{ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js → ActionButton.vue_vue_type_script_setup_true_lang-CgvjRc04.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js.map → ActionButton.vue_vue_type_script_setup_true_lang-CgvjRc04.js.map} +1 -1
- package/dist/assets/{AxesTab-BZZXKEC0.js → AxesTab-WenhB_vu.js} +2 -2
- package/dist/assets/{AxesTab-BZZXKEC0.js.map → AxesTab-WenhB_vu.js.map} +1 -1
- package/dist/assets/{ConfigTab-CFbS48D0.js → ConfigTab-CglWduAQ.js} +2 -2
- package/dist/assets/{ConfigTab-CFbS48D0.js.map → ConfigTab-CglWduAQ.js.map} +1 -1
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-lQT53Lug.js +2 -0
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-lQT53Lug.js.map +1 -0
- package/dist/assets/DangerTab-BpHYOqUf.js +2 -0
- package/dist/assets/DangerTab-BpHYOqUf.js.map +1 -0
- package/dist/assets/{DashboardView-CFwb63EX.js → DashboardView-BjWlGE5y.js} +2 -2
- package/dist/assets/{DashboardView-CFwb63EX.js.map → DashboardView-BjWlGE5y.js.map} +1 -1
- package/dist/assets/DeploymentDetailView-DUNBCl-U.js +2 -0
- package/dist/assets/DeploymentDetailView-DUNBCl-U.js.map +1 -0
- package/dist/assets/{DeploymentsView-BX4GOb2A.js → DeploymentsView-BSxvMk7b.js} +2 -2
- package/dist/assets/{DeploymentsView-BX4GOb2A.js.map → DeploymentsView-BSxvMk7b.js.map} +1 -1
- package/dist/assets/{EquivalentCommand-w1nGowVi.js → EquivalentCommand-CutqDImz.js} +2 -2
- package/dist/assets/{EquivalentCommand-w1nGowVi.js.map → EquivalentCommand-CutqDImz.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js → ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-Dc9KYyvl.js.map} +1 -1
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js → HelpModal.vue_vue_type_script_setup_true_lang-k07tJ3j4.js} +2 -2
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-TcgJr2CB.js.map → HelpModal.vue_vue_type_script_setup_true_lang-k07tJ3j4.js.map} +1 -1
- package/dist/assets/{JobDetailView-ow1_d8lc.js → JobDetailView-IZyvsmEF.js} +2 -2
- package/dist/assets/{JobDetailView-ow1_d8lc.js.map → JobDetailView-IZyvsmEF.js.map} +1 -1
- package/dist/assets/JobsView-CsQt3bA6.js +2 -0
- package/dist/assets/JobsView-CsQt3bA6.js.map +1 -0
- package/dist/assets/{LoginView-1ZpxP8a9.js → LoginView-P5dPUZTJ.js} +2 -2
- package/dist/assets/{LoginView-1ZpxP8a9.js.map → LoginView-P5dPUZTJ.js.map} +1 -1
- package/dist/assets/{LogsTab-Bgev0F7g.js → LogsTab-BLUVS00E.js} +2 -2
- package/dist/assets/{LogsTab-Bgev0F7g.js.map → LogsTab-BLUVS00E.js.map} +1 -1
- package/dist/assets/{NotFoundView-BhCKBrlY.js → NotFoundView-D24ZsYHH.js} +2 -2
- package/dist/assets/{NotFoundView-BhCKBrlY.js.map → NotFoundView-D24ZsYHH.js.map} +1 -1
- package/dist/assets/{NotifiersView-DN9UiqDs.js → NotifiersView-C7MuDZxA.js} +2 -2
- package/dist/assets/{NotifiersView-DN9UiqDs.js.map → NotifiersView-C7MuDZxA.js.map} +1 -1
- package/dist/assets/OverviewTab-TSZ_zuK2.js +2 -0
- package/dist/assets/OverviewTab-TSZ_zuK2.js.map +1 -0
- package/dist/assets/{RegistriesView-CPyfKKWJ.js → RegistriesView-DnZS4ahO.js} +2 -2
- package/dist/assets/{RegistriesView-CPyfKKWJ.js.map → RegistriesView-DnZS4ahO.js.map} +1 -1
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js → RelativeTime.vue_vue_type_script_setup_true_lang-CggmQ7kH.js} +2 -2
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-CggmQ7kH.js.map} +1 -1
- package/dist/assets/{RequiresTab-CjNRorI5.js → RequiresTab-wrhDeq3R.js} +2 -2
- package/dist/assets/{RequiresTab-CjNRorI5.js.map → RequiresTab-wrhDeq3R.js.map} +1 -1
- package/dist/assets/{RoutingView-Br16pPwF.js → RoutingView-k7P_0Fiy.js} +3 -3
- package/dist/assets/{RoutingView-Br16pPwF.js.map → RoutingView-k7P_0Fiy.js.map} +1 -1
- package/dist/assets/{RuntimeTab-BssqRUYz.js → RuntimeTab-DyqlQuW3.js} +2 -2
- package/dist/assets/{RuntimeTab-BssqRUYz.js.map → RuntimeTab-DyqlQuW3.js.map} +1 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js +2 -0
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-iF5ZAUNJ.js.map} +1 -1
- package/dist/assets/SettingsView-DGOOHUmS.js +2 -0
- package/dist/assets/SettingsView-DGOOHUmS.js.map +1 -0
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js → SkeletonList.vue_vue_type_script_setup_true_lang-4-wv5VUT.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-4-wv5VUT.js.map} +1 -1
- package/dist/assets/{SpecDetailView-P6Kk7cwx.js → SpecDetailView-UlkXrNPX.js} +2 -2
- package/dist/assets/{SpecDetailView-P6Kk7cwx.js.map → SpecDetailView-UlkXrNPX.js.map} +1 -1
- package/dist/assets/{SpecsView-DogEWlyZ.js → SpecsView-ClJTm56i.js} +2 -2
- package/dist/assets/{SpecsView-DogEWlyZ.js.map → SpecsView-ClJTm56i.js.map} +1 -1
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js → StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js.map → StateBadge.vue_vue_type_script_setup_true_lang-41WL5KQB.js.map} +1 -1
- package/dist/assets/SubmitView-DEuu72dN.js +45 -0
- package/dist/assets/SubmitView-DEuu72dN.js.map +1 -0
- package/dist/assets/{Teleport-0BmaJsBF.js → Teleport-BrqLogTs.js} +3 -3
- package/dist/assets/{Teleport-0BmaJsBF.js.map → Teleport-BrqLogTs.js.map} +1 -1
- package/dist/assets/{TerminalTab-DndloIiD.js → TerminalTab-Danh15pL.js} +2 -2
- package/dist/assets/{TerminalTab-DndloIiD.js.map → TerminalTab-Danh15pL.js.map} +1 -1
- package/dist/assets/{UsersView-KHRd16sV.js → UsersView-CAmIqdDQ.js} +2 -2
- package/dist/assets/{UsersView-KHRd16sV.js.map → UsersView-CAmIqdDQ.js.map} +1 -1
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js → VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js.map → VarEditor.vue_vue_type_script_setup_true_lang-Cv1cEZ4H.js.map} +1 -1
- package/dist/assets/index-CixluYeb.css +1 -0
- package/dist/assets/index-Cuxev-ia.js +134 -0
- package/dist/assets/index-Cuxev-ia.js.map +1 -0
- package/dist/assets/{useDeployment-DplTFu7s.js → useDeployment-B9V5NDTm.js} +2 -2
- package/dist/assets/{useDeployment-DplTFu7s.js.map → useDeployment-B9V5NDTm.js.map} +1 -1
- package/dist/index.html +5 -2
- package/package.json +1 -1
- package/dist/assets/DangerTab-Nyebdr6k.js +0 -2
- package/dist/assets/DangerTab-Nyebdr6k.js.map +0 -1
- package/dist/assets/DeploymentDetailView-DKCUbiGG.js +0 -2
- package/dist/assets/DeploymentDetailView-DKCUbiGG.js.map +0 -1
- package/dist/assets/JobsView-Boi9Cmdc.js +0 -2
- package/dist/assets/JobsView-Boi9Cmdc.js.map +0 -1
- package/dist/assets/OverviewTab-DzZG0moV.js +0 -2
- package/dist/assets/OverviewTab-DzZG0moV.js.map +0 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js +0 -2
- package/dist/assets/SettingsView-Cqsv0chw.js +0 -2
- package/dist/assets/SettingsView-Cqsv0chw.js.map +0 -1
- package/dist/assets/SubmitView-CufYXtWD.js +0 -45
- package/dist/assets/SubmitView-CufYXtWD.js.map +0 -1
- package/dist/assets/index-BnwKLRM7.css +0 -1
- package/dist/assets/index-D8OAewba.js +0 -134
- package/dist/assets/index-D8OAewba.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useDeployment-
|
|
1
|
+
import{S as n,C as i,A as d,B as l,J as p,U as c}from"./index-Cuxev-ia.js";import{w as u,r as y}from"./useVars-VN9gYdR6.js";const e=n({id:"",detail:null,error:"",loading:!1,vars:[]}),f=i(()=>p(e.vars)),k=i(()=>c(e.id)),b=i(()=>{var a;return((a=e.detail)==null?void 0:a.kind)==="shared"}),h=i(()=>{var a;return(((a=e.detail)==null?void 0:a.axes)??[]).filter(s=>!s.verifiable).map(s=>s.name)});async function t(){const a=e.id;e.loading=!0;const s=await d.get(`/api/deployments/${encodeURIComponent(a)}${f.value}`);if(e.id!==a)return;if(e.loading=!1,!s.ok){e.detail=null,e.error=l(s,`GET /api/deployments/${a}`);return}e.error="";const r=s.body;e.detail={id:r.id??a,kind:r.kind==="shared"?"shared":"isolated",createdAt:r.createdAt,updatedAt:r.updatedAt,stack:typeof r.stack=="string"?r.stack:"",busy:r.busy??null,compose:r.compose?{file:r.compose.file??"?",profiles:r.compose.profiles??[],overlays:r.compose.overlays??[]}:null,requires:Array.isArray(r.requires)?r.requires:[],axes:(Array.isArray(r.axes)?r.axes:[]).map(o=>({name:o.name,hooks:Array.isArray(o.hooks)?o.hooks:[],verifiable:o.verifiable??(Array.isArray(o.hooks)&&o.hooks.includes("assert_gone"))})),env:Array.isArray(r.env)?r.env:[]}}function g(a){e.id===a&&(e.detail||e.error)||(e.id=a,e.detail=null,e.error="",e.vars=y(a),t())}function m(){u(e.id,e.vars)}function x(){m(),t()}export{x as a,e as d,b as i,g as o,m as p,k as r,h as u,f as v};
|
|
2
|
+
//# sourceMappingURL=useDeployment-B9V5NDTm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeployment-
|
|
1
|
+
{"version":3,"file":"useDeployment-B9V5NDTm.js","sources":["../../src/composables/useDeployment.ts"],"sourcesContent":["/**\n * The deployment currently open in the detail view.\n *\n * A module singleton rather than provide/inject, because the six tabs are CHILD ROUTES: they are\n * siblings of each other and are mounted and unmounted independently, so passing the loaded\n * deployment down as a prop would mean re-fetching it on every tab change. Switching tabs must not\n * re-fetch or blank the panel — only opening a DIFFERENT deployment does.\n *\n * `vars` here are REQUEST-TIME variables, sent as `?query` on every route that resolves this\n * deployment. See `useVars.ts` for why they matter and what they can get wrong.\n */\n\nimport { computed, reactive } from 'vue';\nimport { api, problem, query } from '../api/client';\nimport type { Deployment, VarPair } from '../api/types';\nimport { readVars, writeVars } from './useVars';\nimport { rowFor } from './useControlPlane';\n\nexport const dep = reactive({\n id: '',\n detail: null as Deployment | null,\n /** The resolve failure, verbatim. It is a 400 that NAMES the missing variable. */\n error: '',\n loading: false,\n vars: [] as VarPair[],\n});\n\nexport const varsQuery = computed(() => query(dep.vars));\n\n/** The list row, which is the only place the server exposes stored `vars` and `specName` today. */\nexport const row = computed(() => rowFor(dep.id));\n\nexport const isShared = computed(() => dep.detail?.kind === 'shared');\n\nexport const unverifiableAxes = computed(() =>\n (dep.detail?.axes ?? []).filter((a) => !a.verifiable).map((a) => a.name),\n);\n\nexport async function loadDetail(): Promise<void> {\n const id = dep.id;\n dep.loading = true;\n const r = await api.get<Deployment>(`/api/deployments/${encodeURIComponent(id)}${varsQuery.value}`);\n // Navigated to another deployment while this was in flight: drop the answer rather than render\n // one deployment's spec under another's id.\n if (dep.id !== id) return;\n dep.loading = false;\n\n if (!r.ok) {\n dep.detail = null;\n dep.error = problem(r, `GET /api/deployments/${id}`);\n return;\n }\n dep.error = '';\n const b = r.body;\n dep.detail = {\n id: b.id ?? id,\n kind: b.kind === 'shared' ? 'shared' : 'isolated',\n createdAt: b.createdAt,\n updatedAt: b.updatedAt,\n stack: typeof b.stack === 'string' ? b.stack : '',\n busy: b.busy ?? null,\n compose: b.compose\n ? {\n file: b.compose.file ?? '?',\n profiles: b.compose.profiles ?? [],\n overlays: b.compose.overlays ?? [],\n }\n : null,\n requires: Array.isArray(b.requires) ? b.requires : [],\n axes: (Array.isArray(b.axes) ? b.axes : []).map((a) => ({\n name: a.name,\n hooks: Array.isArray(a.hooks) ? a.hooks : [],\n // Derive it if an older build omits the field. Defaulting to `false` would claim an axis is\n // unverifiable when it may define a perfectly good `assert_gone`.\n verifiable: a.verifiable ?? (Array.isArray(a.hooks) && a.hooks.includes('assert_gone')),\n })),\n env: Array.isArray(b.env) ? b.env : [],\n };\n}\n\n/** Point the singleton at a deployment. Resets everything a stale id could leak into the new one. */\nexport function openDeployment(id: string): void {\n if (dep.id === id && (dep.detail || dep.error)) return; // a tab change, not a navigation\n dep.id = id;\n dep.detail = null;\n dep.error = '';\n dep.vars = readVars(id);\n void loadDetail();\n}\n\nexport function persistVars(): void {\n writeVars(dep.id, dep.vars);\n}\n\nexport function applyVars(): void {\n persistVars();\n void loadDetail();\n}\n"],"names":["dep","reactive","varsQuery","computed","query","row","rowFor","isShared","_a","unverifiableAxes","a","loadDetail","id","r","api","problem","b","openDeployment","readVars","persistVars","writeVars","applyVars"],"mappings":"4HAkBO,MAAMA,EAAMC,EAAS,CAC1B,GAAI,GACJ,OAAQ,KAER,MAAO,GACP,QAAS,GACT,KAAM,CAAA,CACR,CAAC,EAEYC,EAAYC,EAAS,IAAMC,EAAMJ,EAAI,IAAI,CAAC,EAG1CK,EAAMF,EAAS,IAAMG,EAAON,EAAI,EAAE,CAAC,EAEnCO,EAAWJ,EAAS,IAAA,OAAM,QAAAK,EAAAR,EAAI,SAAJ,YAAAQ,EAAY,QAAS,SAAQ,EAEvDC,EAAmBN,EAAS,IAAA,OACtC,SAAAK,EAAAR,EAAI,SAAJ,YAAAQ,EAAY,OAAQ,CAAA,GAAI,OAAQE,GAAM,CAACA,EAAE,UAAU,EAAE,IAAKA,GAAMA,EAAE,IAAI,EACzE,EAEA,eAAsBC,GAA4B,CAChD,MAAMC,EAAKZ,EAAI,GACfA,EAAI,QAAU,GACd,MAAMa,EAAI,MAAMC,EAAI,IAAgB,oBAAoB,mBAAmBF,CAAE,CAAC,GAAGV,EAAU,KAAK,EAAE,EAGlG,GAAIF,EAAI,KAAOY,EAAI,OAGnB,GAFAZ,EAAI,QAAU,GAEV,CAACa,EAAE,GAAI,CACTb,EAAI,OAAS,KACbA,EAAI,MAAQe,EAAQF,EAAG,wBAAwBD,CAAE,EAAE,EACnD,MACF,CACAZ,EAAI,MAAQ,GACZ,MAAMgB,EAAIH,EAAE,KACZb,EAAI,OAAS,CACX,GAAIgB,EAAE,IAAMJ,EACZ,KAAMI,EAAE,OAAS,SAAW,SAAW,WACvC,UAAWA,EAAE,UACb,UAAWA,EAAE,UACb,MAAO,OAAOA,EAAE,OAAU,SAAWA,EAAE,MAAQ,GAC/C,KAAMA,EAAE,MAAQ,KAChB,QAASA,EAAE,QACP,CACE,KAAMA,EAAE,QAAQ,MAAQ,IACxB,SAAUA,EAAE,QAAQ,UAAY,CAAA,EAChC,SAAUA,EAAE,QAAQ,UAAY,CAAA,CAAC,EAEnC,KACJ,SAAU,MAAM,QAAQA,EAAE,QAAQ,EAAIA,EAAE,SAAW,CAAA,EACnD,MAAO,MAAM,QAAQA,EAAE,IAAI,EAAIA,EAAE,KAAO,CAAA,GAAI,IAAKN,IAAO,CACtD,KAAMA,EAAE,KACR,MAAO,MAAM,QAAQA,EAAE,KAAK,EAAIA,EAAE,MAAQ,CAAA,EAG1C,WAAYA,EAAE,aAAe,MAAM,QAAQA,EAAE,KAAK,GAAKA,EAAE,MAAM,SAAS,aAAa,EAAA,EACrF,EACF,IAAK,MAAM,QAAQM,EAAE,GAAG,EAAIA,EAAE,IAAM,CAAA,CAAC,CAEzC,CAGO,SAASC,EAAeL,EAAkB,CAC3CZ,EAAI,KAAOY,IAAOZ,EAAI,QAAUA,EAAI,SACxCA,EAAI,GAAKY,EACTZ,EAAI,OAAS,KACbA,EAAI,MAAQ,GACZA,EAAI,KAAOkB,EAASN,CAAE,EACjBD,EAAA,EACP,CAEO,SAASQ,GAAoB,CAClCC,EAAUpB,EAAI,GAAIA,EAAI,IAAI,CAC5B,CAEO,SAASqB,GAAkB,CAChCF,EAAA,EACKR,EAAA,CACP"}
|
package/dist/index.html
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<!-- An operations console for one host. Nothing here should ever be indexed. -->
|
|
7
7
|
<meta name="robots" content="noindex, nofollow" />
|
|
8
|
+
<!-- Matches --bg per scheme, so the browser chrome (tab bar, overscroll) agrees with the page. -->
|
|
9
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0e1116" />
|
|
10
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f5f6f8" />
|
|
8
11
|
<title>pstack</title>
|
|
9
12
|
<script>
|
|
10
13
|
/**
|
|
@@ -24,8 +27,8 @@
|
|
|
24
27
|
/* private mode: fall through to the OS preference */
|
|
25
28
|
}
|
|
26
29
|
</script>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
28
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
30
|
+
<script type="module" crossorigin src="/assets/index-Cuxev-ia.js"></script>
|
|
31
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CixluYeb.css">
|
|
29
32
|
</head>
|
|
30
33
|
<body>
|
|
31
34
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as J,c as r,E as Y,a as o,t as y,f as t,e as f,w as v,j as P,o as a,u as d,F as M,g as w,_ as L,i as S,G as O,v as Z,x as Q,r as b,C as j,A as V,N as F,O as W,B as z,P as _,k as ee,y as te,Q as oe}from"./index-D8OAewba.js";import{d as i,i as $,v as G}from"./useDeployment-DplTFu7s.js";import{a as C}from"./useFormat-CKJxQp_i.js";import{_ as R}from"./ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js";import{_ as ne}from"./ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js";import"./useVars-VN9gYdR6.js";const se={class:"raw",style:{color:"var(--fg-dim)","max-height":"200px"}},ie={key:0},ae={key:1},le={key:2},re={key:3},de={key:4},ue=J({__name:"ConflictNote",props:{conflict:{},jobId:{}},setup(m){return(I,s)=>{const p=P("RouterLink");return a(),r("div",{class:Y(["banner",m.conflict.kind==="shared"?"leaked":"info"]),role:"alert"},[s[5]||(s[5]=o("b",null,"Refused — nothing was started.",-1)),o("pre",se,y(m.conflict.text),1),m.conflict.kind==="shared"?(a(),r("p",ie,[...s[0]||(s[0]=[t(" Type the stack name in the confirmation field above and press ",-1),o("code",null,"down",-1),t(" again. ",-1)])])):m.conflict.kind==="containers"?(a(),r("p",ae,[...s[1]||(s[1]=[t(" Run ",-1),o("code",null,"down",-1),t(" first. Forgetting the record now would orphan those containers beyond the control plane's view: nothing left would know their stack name, their axes, or how to tear them down. ",-1)])])):m.conflict.kind==="referenced"?(a(),r("p",le,[s[2]||(s[2]=t(" These deployments still use this spec: ",-1)),o("strong",null,y(m.conflict.deployments.join(", ")),1),s[3]||(s[3]=t(". Deleting it would leave them with no way to be torn down. ",-1))])):m.jobId?(a(),r("p",re,[f(p,{to:`/jobs/${encodeURIComponent(m.jobId)}`},{default:v(()=>[...s[4]||(s[4]=[t("Follow the running job →",-1)])]),_:1},8,["to"])])):(a(),r("p",de,"Nothing was retried. Wait for the current work to finish, then try again."))],2)}}}),fe={class:"panel"},ve={key:0,class:"mute"},me={key:0,class:"banner warn"},pe={class:"row"},ye={key:1,class:"hint"},we={class:"hint"},be={class:"row",style:{"margin-top":"var(--s3)"}},ke={class:"check"},ce={key:2,class:"hint"},he={key:3,class:"banner leaked"},ge={class:"field",style:{"margin-top":"var(--s3)","max-width":"380px"}},$e=["for"],Ce=["id","placeholder"],xe={key:0,class:"s-failed"},Te={class:"panel"},je={key:0,class:"mute"},Re={class:"dim"},Ie={class:"row",style:{"margin-top":"var(--s3)"}},Ue={class:"check"},De=J({__name:"DangerTab",setup(m){const I=ee(),s=b(""),p=b(""),k=b(null),U=b(""),x=b(!0),c=b(""),h=b(!1),H=j(()=>{const n=i.vars.filter(e=>e.k).map(e=>e.k);return n.length?`Sending ${n.join(", ")} with every action.`:"Using the variables saved with this deployment."}),T=j(()=>{var n;return!!((n=i.detail)!=null&&n.stack)&&c.value===i.detail.stack}),K=j(()=>{var n;return((n=te.health)==null?void 0:n.authEnforced)===!0&&!oe.token}),g=j(()=>{var n;return((n=i.detail)==null?void 0:n.busy)===!0});function N(n){if(!i.detail)return"The spec has not resolved — the server cannot compute the stack name.";if(g.value)return`A job is already in flight for ${i.detail.stack}.`;if(n==="down"&&$.value&&!T.value)return`Type the stack name "${i.detail.stack}" below to confirm a shared teardown.`}async function A(n){if(!i.detail)return;s.value=n,p.value="",k.value=null;const e=n==="down"?{verify:x.value,force:$.value&&T.value}:{},u=await V.post(`/api/deployments/${encodeURIComponent(i.id)}/${n}${G.value}`,e);if(s.value="",u.status===202){const l=u.body.job;if(l!=null&&l.id){F("info",`${C(n)} started on ${l.stack}`,{to:`/jobs/${encodeURIComponent(l.id)}`,toLabel:"Follow"}),W(),I.push(`/jobs/${encodeURIComponent(l.id)}`);return}p.value="The action was accepted, but the response carried nothing to follow.";return}if(u.status===409)return D(u.body);p.value=z(u,C(n).toLowerCase()),F("error",`${C(n)} was refused.`)}async function X(){if(!h.value)return;s.value="forget",p.value="",k.value=null;const n=await V.del(`/api/deployments/${encodeURIComponent(i.id)}${G.value}`);if(s.value="",n.ok){F("ok",`Forgot ${i.id}. Nothing was torn down.`),W(),I.push("/deployments");return}if(n.status===409)return D(n.body);p.value=z(n,"forget this deployment")}async function D(n){var B;const e=_(n);k.value=e,U.value="",e.kind==="shared"&&(c.value="");const u=e.stack||((B=i.detail)==null?void 0:B.stack);if(e.kind!=="other"||!u)return;const E=((await V.get("/api/jobs")).body.jobs??[]).find(q=>q.state==="running"&&q.stack===u);E&&(U.value=E.id)}return(n,e)=>{const u=P("RouterLink");return a(),r("div",null,[o("section",fe,[e[30]||(e[30]=o("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Lifecycle",-1)),d(i).detail?(a(),r(M,{key:1},[K.value?(a(),r("div",me,[e[12]||(e[12]=o("b",null,"No access token set.",-1)),o("p",null,[e[10]||(e[10]=t(" Every action below will be refused. Add your token under ",-1)),f(u,{to:"/settings"},{default:v(()=>[...e[9]||(e[9]=[t("Settings",-1)])]),_:1}),e[11]||(e[11]=t(". ",-1))])])):w("",!0),o("div",pe,[f(R,{variant:"primary",pending:s.value==="up",disabled:!!s.value||g.value,title:N("up"),onClick:e[0]||(e[0]=l=>A("up"))},{default:v(()=>[t(y(d(C)("up")),1)]),_:1},8,["pending","disabled","title"]),f(R,{pending:s.value==="verify",disabled:!!s.value||g.value,title:N("verify"),onClick:e[1]||(e[1]=l=>A("verify"))},{default:v(()=>[t(y(d(C)("verify")),1)]),_:1},8,["pending","disabled","title"]),f(R,{variant:"danger",pending:s.value==="down",disabled:!!s.value||g.value||d($)&&!T.value,title:N("down"),onClick:e[2]||(e[2]=l=>A("down"))},{default:v(()=>[t(y(d($)?"Tear down (force)":"Tear down"),1)]),_:1},8,["pending","disabled","title"]),e[14]||(e[14]=o("span",{class:"grow"},null,-1)),f(u,{to:`/submit/${encodeURIComponent(d(i).id)}`},{default:v(()=>[...e[13]||(e[13]=[t("Edit spec & compose →",-1)])]),_:1},8,["to"])]),g.value?(a(),r("p",ye,[e[16]||(e[16]=t(" Something is already running on ",-1)),o("b",null,y(d(i).detail.stack),1),e[17]||(e[17]=t(". ",-1)),f(L,{label:"why actions wait"},{default:v(()=>[...e[15]||(e[15]=[t(" One action at a time per stack, and they are not queued. A teardown racing a deploy over the same database would corrupt it, so the second request is refused rather than delayed. ",-1)])]),_:1})])):w("",!0),o("p",we,[t(y(H.value)+" ",1),f(u,{to:`/deployments/${encodeURIComponent(d(i).id)}/config`},{default:v(()=>[...e[18]||(e[18]=[t("change",-1)])]),_:1},8,["to"])]),o("div",be,[o("label",ke,[S(o("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>x.value=l),type:"checkbox"},null,512),[[O,x.value]]),e[19]||(e[19]=t(" Check for leftovers afterwards ",-1))])]),x.value?w("",!0):(a(),r("p",ce,[...e[20]||(e[20]=[t(" Nothing will check that teardown actually finished. A teardown that silently half-worked is the exact failure this tool exists to catch — run ",-1),o("b",null,"Verify",-1),t(" yourself afterwards. ",-1)])])),d($)?(a(),r("div",he,[e[29]||(e[29]=o("b",null,"Shared — read this before tearing down.",-1)),o("p",null,[e[22]||(e[22]=t(" Tearing this down ",-1)),e[23]||(e[23]=o("b",null,"deletes its stored data",-1)),e[24]||(e[24]=t(": the TLS certificates, the shared database or queue, admin credentials. Nothing here recreates them, so ",-1)),e[25]||(e[25]=o("b",null,"every preview on this host breaks",-1)),e[26]||(e[26]=t(" until someone rebuilds it by hand. The button is the same one that is routine on a single preview. ",-1)),f(L,{label:"what tearing down runs"},{default:v(()=>[...e[21]||(e[21]=[o("code",null,"docker compose down -v",-1),t(" — the ",-1),o("code",null,"-v",-1),t(" is what removes the volumes. ",-1)])]),_:1})]),o("div",ge,[o("label",{for:`confirm-${d(i).id}`},[e[27]||(e[27]=t(" Type the stack name ",-1)),o("b",null,y(d(i).detail.stack),1),e[28]||(e[28]=t(" to confirm ",-1))],8,$e),S(o("input",{id:`confirm-${d(i).id}`,"onUpdate:modelValue":e[4]||(e[4]=l=>c.value=l),type:"text",placeholder:d(i).detail.stack,spellcheck:"false",autocomplete:"off"},null,8,Ce),[[Z,c.value,void 0,{trim:!0}]])]),c.value&&!T.value?(a(),r("p",xe," That does not match, so tearing down stays disabled. ")):w("",!0)])):w("",!0),p.value?(a(),Q(ne,{key:4,text:p.value,title:"The action was refused."},null,8,["text"])):w("",!0),k.value?(a(),Q(ue,{key:5,conflict:k.value,"job-id":U.value},null,8,["conflict","job-id"])):w("",!0)],64)):(a(),r("p",ve,[e[7]||(e[7]=t(" Actions are unavailable until this deployment's variables are filled in — without them its stack has no name to act on. Set them under ",-1)),f(u,{to:`/deployments/${encodeURIComponent(d(i).id)}/config`},{default:v(()=>[...e[6]||(e[6]=[t(" Config & variables ",-1)])]),_:1},8,["to"]),e[8]||(e[8]=t("first. ",-1))]))]),o("section",Te,[e[39]||(e[39]=o("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Forget this deployment",-1)),d(i).detail?(a(),r(M,{key:1},[o("p",Re,[e[32]||(e[32]=t(" This removes the ",-1)),e[33]||(e[33]=o("em",null,"record only",-1)),e[34]||(e[34]=t(" — ",-1)),e[35]||(e[35]=o("b",null,"it never tears anything down",-1)),e[36]||(e[36]=t(". Afterwards nothing here knows how to remove whatever this deployment created. ",-1)),f(L,{label:"when forgetting is refused"},{default:v(()=>[...e[31]||(e[31]=[t(" Refused while any container for this stack still exists — and refused just as firmly when docker cannot be reached, because “cannot confirm” is not evidence of absence. What is deleted is the stored spec, compose file and metadata. ",-1)])]),_:1})]),o("div",Ie,[o("label",Ue,[S(o("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>h.value=l),type:"checkbox"},null,512),[[O,h.value]]),e[37]||(e[37]=t(" I have torn this down and want the record removed ",-1))]),f(R,{variant:"danger",pending:s.value==="forget",disabled:!h.value||!!s.value,title:h.value?void 0:"Confirm you have torn this down first.",onClick:X},{default:v(()=>[...e[38]||(e[38]=[t(" Forget ",-1)])]),_:1},8,["pending","disabled","title"])])],64)):(a(),r("p",je," Unavailable until the variables are filled in: this stack's containers are counted before the record can be forgotten, and that needs its name. "))])])}}});export{De as default};
|
|
2
|
-
//# sourceMappingURL=DangerTab-Nyebdr6k.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DangerTab-Nyebdr6k.js","sources":["../../src/components/ConflictNote.vue","../../src/views/tabs/DangerTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A 409, explained.\n *\n * \"409\" on this API always means the same thing about consequences — **refused, and nothing was\n * started** — but four different things about the cause, and guessing wrong sends the operator\n * down the wrong path. The classification is done on payload SHAPE in `client.ts`, never on the\n * message text, and the server's own message is always printed verbatim underneath.\n *\n * Note what is deliberately NOT distinguished: \"a job is in flight\" and \"docker did not answer\"\n * are shape-identical, so this renders neither claim — it prints the message and offers a link to\n * a running job only when one demonstrably exists.\n */\nimport type { Conflict } from '../api/client';\n\ndefineProps<{ conflict: Conflict; jobId?: string }>();\n</script>\n\n<template>\n <div class=\"banner\" :class=\"conflict.kind === 'shared' ? 'leaked' : 'info'\" role=\"alert\">\n <b>Refused — nothing was started.</b>\n <pre class=\"raw\" style=\"color: var(--fg-dim); max-height: 200px\">{{ conflict.text }}</pre>\n\n <p v-if=\"conflict.kind === 'shared'\">\n Type the stack name in the confirmation field above and press <code>down</code> again.\n </p>\n <p v-else-if=\"conflict.kind === 'containers'\">\n Run <code>down</code> first. Forgetting the record now would orphan those containers beyond\n the control plane's view: nothing left would know their stack name, their axes, or how to\n tear them down.\n </p>\n <p v-else-if=\"conflict.kind === 'referenced'\">\n These deployments still use this spec: <strong>{{ conflict.deployments.join(', ') }}</strong>.\n Deleting it would leave them with no way to be torn down.\n </p>\n <p v-else-if=\"jobId\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(jobId)}`\">Follow the running job →</RouterLink>\n </p>\n <p v-else>Nothing was retried. Wait for the current work to finish, then try again.</p>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Lifecycle actions, and forgetting the record. Everything on this page destroys something.\n *\n * The two guards that matter:\n *\n * 1. TYPED CONFIRMATION FOR A SHARED `down`. A checkbox is one stray click; typing a name is a\n * decision. The typed string is the resolved STACK NAME — not the deployment id — because the\n * stack is the actual blast target, it is what the server's own 409 refusal names, and it is\n * what `compose down -v` will be pointed at. The server holds the authoritative guard\n * (`down()` refuses without `force`, and the API answers 409 before starting a job), so this\n * is defence in depth, not the only barrier.\n *\n * 2. FORGETTING IS NOT TEARING DOWN. `DELETE` removes the record and never touches a container.\n * The server refuses with 409 while any container exists — and refuses just as firmly when\n * docker did not answer, because \"cannot confirm\" is not evidence of absence.\n */\nimport { computed, ref } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { api, classifyConflict, problem, type Conflict } from '../../api/client';\nimport type { ActionResponse, ConflictBody, JobsResponse } from '../../api/types';\nimport { dep, isShared, varsQuery } from '../../composables/useDeployment';\nimport { loadDeployments, state } from '../../composables/useControlPlane';\nimport { settings } from '../../composables/useSettings';\nimport { toast } from '../../composables/useToasts';\nimport { actionLabel } from '../../composables/useFormat';\nimport ActionButton from '../../components/ActionButton.vue';\nimport ConflictNote from '../../components/ConflictNote.vue';\nimport InfoHint from '../../components/InfoHint.vue';\nimport ErrorNote from '../../components/ErrorNote.vue';\n\nconst router = useRouter();\n\nconst pending = ref<'' | 'up' | 'verify' | 'down' | 'forget'>('');\nconst actionError = ref('');\nconst conflict = ref<Conflict | null>(null);\nconst conflictJobId = ref('');\nconst downVerify = ref(true);\nconst forceTyped = ref('');\nconst forgetArmed = ref(false);\n\n/**\n * The variables these actions will send, as prose. Which variables are set decides which stack is\n * touched, so the NAMES are worth stating — the URL-encoded query string they become is not.\n */\nconst varsSummary = computed(() => {\n const names = dep.vars.filter((v) => v.k).map((v) => v.k);\n // NOT \"no variables\": with none set here the server resolves the ones stored with the deployment,\n // and claiming otherwise would have an operator hunting for variables that are already in place.\n return names.length\n ? `Sending ${names.join(', ')} with every action.`\n : 'Using the variables saved with this deployment.';\n});\n\n/** Exact match against the resolved stack name. Nothing looser — no trim-insensitive, no prefix. */\nconst forceArmed = computed(\n () => !!dep.detail?.stack && forceTyped.value === dep.detail.stack,\n);\n\nconst tokenMissing = computed(() => state.health?.authEnforced === true && !settings.token);\nconst busy = computed(() => dep.detail?.busy === true);\n\n/** A disabled control must say why. This is the text that answers it. */\nfunction whyDisabled(action: 'up' | 'verify' | 'down'): string | undefined {\n if (!dep.detail) return 'The spec has not resolved — the server cannot compute the stack name.';\n if (busy.value) return `A job is already in flight for ${dep.detail.stack}.`;\n if (action === 'down' && isShared.value && !forceArmed.value) {\n return `Type the stack name \"${dep.detail.stack}\" below to confirm a shared teardown.`;\n }\n return undefined;\n}\n\nasync function act(action: 'up' | 'verify' | 'down'): Promise<void> {\n if (!dep.detail) return;\n pending.value = action;\n actionError.value = '';\n conflict.value = null;\n\n const body =\n action === 'down'\n ? // `force` is only ever true for a shared deployment whose stack name was typed out in full.\n { verify: downVerify.value, force: isShared.value && forceArmed.value }\n : {};\n\n const r = await api.post<ActionResponse & ConflictBody>(\n `/api/deployments/${encodeURIComponent(dep.id)}/${action}${varsQuery.value}`,\n body,\n );\n pending.value = '';\n\n if (r.status === 202) {\n const job = r.body.job;\n if (job?.id) {\n toast('info', `${actionLabel(action)} started on ${job.stack}`, {\n to: `/jobs/${encodeURIComponent(job.id)}`,\n toLabel: 'Follow',\n });\n void loadDeployments();\n void router.push(`/jobs/${encodeURIComponent(job.id)}`);\n return;\n }\n actionError.value = 'The action was accepted, but the response carried nothing to follow.';\n return;\n }\n if (r.status === 409) return onConflict(r.body);\n\n actionError.value = problem(r, actionLabel(action).toLowerCase());\n toast('error', `${actionLabel(action)} was refused.`);\n}\n\nasync function forget(): Promise<void> {\n if (!forgetArmed.value) return;\n pending.value = 'forget';\n actionError.value = '';\n conflict.value = null;\n\n const r = await api.del<ConflictBody>(\n `/api/deployments/${encodeURIComponent(dep.id)}${varsQuery.value}`,\n );\n pending.value = '';\n\n if (r.ok) {\n toast('ok', `Forgot ${dep.id}. Nothing was torn down.`);\n void loadDeployments();\n void router.push('/deployments');\n return;\n }\n if (r.status === 409) return onConflict(r.body);\n actionError.value = problem(r, 'forget this deployment');\n}\n\n/**\n * Classify on payload SHAPE (in `client.ts`), never on message text — then look for a running job\n * ONLY to offer a link. \"A job is in flight\" and \"docker did not answer\" are shape-identical, so\n * neither is claimed; the server's message is printed verbatim either way. Never retry.\n */\nasync function onConflict(body: ConflictBody): Promise<void> {\n const c = classifyConflict(body);\n conflict.value = c;\n conflictJobId.value = '';\n if (c.kind === 'shared') forceTyped.value = '';\n\n const stack = c.stack || dep.detail?.stack;\n if (c.kind !== 'other' || !stack) return;\n const jl = await api.get<JobsResponse>('/api/jobs');\n const live = (jl.body.jobs ?? []).find((j) => j.state === 'running' && j.stack === stack);\n if (live) conflictJobId.value = live.id;\n}\n</script>\n\n<template>\n <div>\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Lifecycle</h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">\n Actions are unavailable until this deployment's variables are filled in — without them its\n stack has no name to act on. Set them under\n <RouterLink :to=\"`/deployments/${encodeURIComponent(dep.id)}/config`\">\n Config & variables </RouterLink\n >first.\n </p>\n\n <template v-else>\n <div v-if=\"tokenMissing\" class=\"banner warn\">\n <b>No access token set.</b>\n <p>\n Every action below will be refused. Add your token under\n <RouterLink to=\"/settings\">Settings</RouterLink>.\n </p>\n </div>\n\n <div class=\"row\">\n <ActionButton\n variant=\"primary\"\n :pending=\"pending === 'up'\"\n :disabled=\"!!pending || busy\"\n :title=\"whyDisabled('up')\"\n @click=\"act('up')\"\n >\n {{ actionLabel('up') }}\n </ActionButton>\n <ActionButton\n :pending=\"pending === 'verify'\"\n :disabled=\"!!pending || busy\"\n :title=\"whyDisabled('verify')\"\n @click=\"act('verify')\"\n >\n {{ actionLabel('verify') }}\n </ActionButton>\n <ActionButton\n variant=\"danger\"\n :pending=\"pending === 'down'\"\n :disabled=\"!!pending || busy || (isShared && !forceArmed)\"\n :title=\"whyDisabled('down')\"\n @click=\"act('down')\"\n >\n {{ isShared ? 'Tear down (force)' : 'Tear down' }}\n </ActionButton>\n <span class=\"grow\" />\n <RouterLink :to=\"`/submit/${encodeURIComponent(dep.id)}`\">Edit spec & compose →</RouterLink>\n </div>\n\n <p v-if=\"busy\" class=\"hint\">\n Something is already running on <b>{{ dep.detail.stack }}</b>.\n <InfoHint label=\"why actions wait\">\n One action at a time per stack, and they are not queued. A teardown racing a deploy over\n the same database would corrupt it, so the second request is refused rather than delayed.\n </InfoHint>\n </p>\n <p class=\"hint\">\n {{ varsSummary }}\n <RouterLink :to=\"`/deployments/${encodeURIComponent(dep.id)}/config`\">change</RouterLink>\n </p>\n\n <div class=\"row\" style=\"margin-top: var(--s3)\">\n <label class=\"check\">\n <input v-model=\"downVerify\" type=\"checkbox\" />\n Check for leftovers afterwards\n </label>\n </div>\n <p v-if=\"!downVerify\" class=\"hint\">\n Nothing will check that teardown actually finished. A teardown that silently half-worked is\n the exact failure this tool exists to catch — run <b>Verify</b> yourself afterwards.\n </p>\n\n <!--\n Gate 1 of 2. The typed name is the point: a checkbox is one stray click, typing the stack\n name is a decision.\n -->\n <div v-if=\"isShared\" class=\"banner leaked\">\n <b>Shared — read this before tearing down.</b>\n <p>\n Tearing this down <b>deletes its stored data</b>: the TLS certificates, the shared\n database or queue, admin credentials. Nothing here recreates them, so\n <b>every preview on this host breaks</b> until someone rebuilds it by hand. The button is\n the same one that is routine on a single preview.\n <InfoHint label=\"what tearing down runs\">\n <code>docker compose down -v</code> — the <code>-v</code> is what removes the volumes.\n </InfoHint>\n </p>\n <div class=\"field\" style=\"margin-top: var(--s3); max-width: 380px\">\n <label :for=\"`confirm-${dep.id}`\">\n Type the stack name <b>{{ dep.detail.stack }}</b> to confirm\n </label>\n <input\n :id=\"`confirm-${dep.id}`\"\n v-model.trim=\"forceTyped\"\n type=\"text\"\n :placeholder=\"dep.detail.stack\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n </div>\n <p v-if=\"forceTyped && !forceArmed\" class=\"s-failed\">\n That does not match, so tearing down stays disabled.\n </p>\n </div>\n\n <ErrorNote v-if=\"actionError\" :text=\"actionError\" title=\"The action was refused.\" />\n <ConflictNote v-if=\"conflict\" :conflict=\"conflict\" :job-id=\"conflictJobId\" />\n </template>\n </section>\n\n <!-- ============================ forget ============================ -->\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Forget this deployment</h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">\n Unavailable until the variables are filled in: this stack's containers are counted before the\n record can be forgotten, and that needs its name.\n </p>\n <template v-else>\n <p class=\"dim\">\n This removes the <em>record only</em> — <b>it never tears anything down</b>. Afterwards\n nothing here knows how to remove whatever this deployment created.\n <InfoHint label=\"when forgetting is refused\">\n Refused while any container for this stack still exists — and refused just as firmly when\n docker cannot be reached, because “cannot confirm” is not evidence of absence. What is\n deleted is the stored spec, compose file and metadata.\n </InfoHint>\n </p>\n <div class=\"row\" style=\"margin-top: var(--s3)\">\n <label class=\"check\">\n <input v-model=\"forgetArmed\" type=\"checkbox\" />\n I have torn this down and want the record removed\n </label>\n <ActionButton\n variant=\"danger\"\n :pending=\"pending === 'forget'\"\n :disabled=\"!forgetArmed || !!pending\"\n :title=\"forgetArmed ? undefined : 'Confirm you have torn this down first.'\"\n @click=\"forget\"\n >\n Forget\n </ActionButton>\n </div>\n </template>\n </section>\n </div>\n</template>\n"],"names":["_createElementBlock","_normalizeClass","__props","_cache","_createElementVNode","_hoisted_1","_toDisplayString","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_createVNode","_component_RouterLink","_openBlock","router","useRouter","pending","ref","actionError","conflict","conflictJobId","downVerify","forceTyped","forgetArmed","varsSummary","computed","names","dep","v","forceArmed","_a","tokenMissing","state","settings","busy","whyDisabled","action","isShared","act","body","r","api","varsQuery","job","toast","actionLabel","loadDeployments","onConflict","problem","forget","c","classifyConflict","stack","live","j","_unref","_Fragment","ActionButton","InfoHint","_hoisted_6","_createTextVNode","_hoisted_7","_hoisted_8","$event","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_14","_createBlock","ErrorNote","ConflictNote","_hoisted_15","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_16"],"mappings":"wwBAmBEA,EAoBM,MAAA,CApBD,MAAKC,EAAA,CAAC,SAAiBC,EAAA,SAAS,OAAI,SAAA,SAAA,MAAA,CAAA,EAAmC,KAAK,OAAA,GAC/EC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,EAAqC,SAAlC,iCAA8B,EAAA,GACjCA,EAA0F,MAA1FC,GAA0FC,EAAtBJ,EAAA,SAAS,IAAI,EAAA,CAAA,EAExEA,EAAA,SAAS,OAAI,cAAtBF,EAEI,IAAAO,GAAA,CAAA,GAAAJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFiC,kEAC2B,EAAA,EAAAC,EAAiB,YAAX,OAAI,EAAA,IAAO,WACjF,EAAA,CAAA,MACcF,EAAA,SAAS,OAAI,kBAA3BF,EAII,IAAAQ,GAAA,CAAA,GAAAL,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAJ0C,QACxC,EAAA,EAAAC,EAAiB,YAAX,OAAI,EAAA,IAAO,oLAGvB,EAAA,CAAA,MACcF,EAAA,SAAS,OAAI,kBAA3BF,EAGI,IAAAS,GAAA,eAH0C,2CACL,EAAA,GAAAL,EAAsD,SAAA,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ArE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAoB,UAAhB,cAAW,EAAA,mBAAK,MAAG,EAAA,GAAAD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAC,EAAmC,SAAhC,+BAA4B,EAAA,mBAAI,mFAE3E,EAAA,GAAAO,EAIW+C,EAAA,CAJD,MAAM,8BAA4B,WAAC,IAI7C,CAAA,GAAAvD,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAJ6C,4OAI7C,EAAA,CAAA,aAEFC,EAcM,MAdNqE,GAcM,CAbJrE,EAGQ,QAHRsE,GAGQ,GAFNtE,EAA+C,QAAA,sCAA/BmB,EAAW,MAAAwC,GAAE,KAAK,UAAA,gBAAlBxC,EAAA,KAAW,CAAA,mBAAoB,sDAEjD,EAAA,EAAA,GACAZ,EAQe8C,EAAA,CAPb,QAAQ,SACP,QAASzC,EAAA,QAAO,SAChB,SAAQ,CAAGO,EAAA,OAAW,CAAA,CAAMP,EAAA,MAC5B,MAAOO,EAAA,MAAc,OAAS,yCAC9B,QAAO0B,CAAA,aACT,IAED,CAAA,GAAA9C,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA,yDA3BJH,EAGI,IAHJ2E,GAAmC,mJAGnC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as C,H as k,c as l,a as t,e as r,w as i,t as p,u as s,f as a,E as R,g as u,F as D,s as V,x as w,_,j as c,o,T as B,k as I,I as T}from"./index-D8OAewba.js";import{d as n,i as $,o as A}from"./useDeployment-DplTFu7s.js";import{_ as L}from"./ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js";import"./useVars-VN9gYdR6.js";const N={class:"page-head"},S={class:"mute",style:{"font-size":"var(--t-sm)"}},q={style:{"font-size":"var(--t-xl)"}},z={class:"sub"},U={key:0},E={key:1},F={key:2},j={key:1,class:"badge busy"},H={class:"tabs","aria-label":"Deployment sections"},O={key:1,class:"hint"},G={key:2,class:"hint",style:{"margin-bottom":"var(--s4)"}},Q=C({__name:"DeploymentDetailView",props:{id:{}},setup(y){const v=y,b=I(),h=[{to:"overview",label:"Overview"},{to:"runtime",label:"Containers & routes"},{to:"config",label:"Config & variables"},{to:"axes",label:"Axes"},{to:"requires",label:"Requires"},{to:"logs",label:"Logs"},{to:"terminal",label:"Terminal"},{to:"danger",label:"Danger"}];return k(()=>v.id,m=>A(m),{immediate:!0}),k(()=>n.error,m=>{m&&b.currentRoute.value.name==="d.overview"&&b.replace(`/deployments/${encodeURIComponent(v.id)}/config`)}),(m,e)=>{var g;const f=c("RouterLink"),x=c("RouterView");return o(),l("div",null,[t("div",N,[t("div",null,[t("div",S,[r(f,{to:"/deployments"},{default:i(()=>[...e[0]||(e[0]=[a("← deployments",-1)])]),_:1})]),t("h1",q,p(y.id),1),t("div",z,[s(n).detail?(o(),l("span",U,[e[1]||(e[1]=a(" stack ",-1)),t("b",null,p(s(n).detail.stack),1)])):s(n).error?(o(),l("span",E,"unresolved")):(o(),l("span",F,"loading…"))])]),e[3]||(e[3]=t("span",{class:"grow"},null,-1)),s(n).detail?(o(),l("span",{key:0,class:R(["badge",s(n).detail.kind])},p(s(n).detail.kind),3)):u("",!0),((g=s(n).detail)==null?void 0:g.busy)===!0?(o(),l("span",j,[...e[2]||(e[2]=[t("span",{class:"dot pulse"},null,-1),a("busy",-1)])])):u("",!0)]),t("nav",H,[(o(),l(D,null,V(h,d=>r(f,{key:d.to,to:`/deployments/${encodeURIComponent(y.id)}/${d.to}`},{default:i(()=>[a(p(d.label),1)]),_:2},1032,["to"])),64))]),s(n).error?(o(),w(L,{key:0,text:s(n).error,title:"Could not resolve this deployment."},null,8,["text"])):u("",!0),s(n).error?(o(),l("p",O,[e[5]||(e[5]=a(" If that message names a variable, add it under ",-1)),e[6]||(e[6]=t("b",null,"Config & variables",-1)),e[7]||(e[7]=a(" and press ",-1)),e[8]||(e[8]=t("b",null,"Apply & reload",-1)),e[9]||(e[9]=a(". ",-1)),r(_,{label:"why the rest of the page is unavailable"},{default:i(()=>[...e[4]||(e[4]=[a(" Until the spec resolves there is no stack name, and every action on this deployment needs one. ",-1)])]),_:1})])):u("",!0),s($)?(o(),l("p",G,[e[11]||(e[11]=a(" Shared with every preview on this host. ",-1)),r(_,{label:"what a shared deployment is"},{default:i(()=>[...e[10]||(e[10]=[a(" A host singleton that previews borrow — a database, a queue, a registry mirror. It declares no axes, and tearing it down needs an explicit confirmation, because doing so destroys state every other deployment depends on. ",-1)])]),_:1})])):u("",!0),r(x,null,{default:i(({Component:d})=>[r(B,{name:"view",mode:"out-in"},{default:i(()=>[(o(),w(T(d)))]),_:2},1024)]),_:1})])}}});export{Q as default};
|
|
2
|
-
//# sourceMappingURL=DeploymentDetailView-DKCUbiGG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentDetailView-DKCUbiGG.js","sources":["../../src/views/DeploymentDetailView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The detail shell: breadcrumb, tabs, and the resolve-failure banner that gates the rest.\n *\n * A deployment whose spec will not resolve is not a dead end — the fix (its variables) lives on\n * the Config tab, so this sends the operator there rather than leaving them in front of an error\n * with no control in reach. Everything else stays unavailable until it resolves, because the\n * server cannot name the stack without the variables, and every action needs the stack name.\n */\nimport { watch } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { dep, isShared, openDeployment } from '../composables/useDeployment';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\n\nconst props = defineProps<{ id: string }>();\nconst router = useRouter();\n\nconst TABS = [\n { to: 'overview', label: 'Overview' },\n // Second, not buried: \"the hostname does not work\" is the most common question, and this is the\n // only tab that can answer it.\n { to: 'runtime', label: 'Containers & routes' },\n { to: 'config', label: 'Config & variables' },\n { to: 'axes', label: 'Axes' },\n { to: 'requires', label: 'Requires' },\n { to: 'logs', label: 'Logs' },\n // After Logs: a shell is what you reach for when the logs did not answer it.\n { to: 'terminal', label: 'Terminal' },\n { to: 'danger', label: 'Danger' },\n] as const;\n\nwatch(() => props.id, (id) => openDeployment(id), { immediate: true });\n\n// Land the operator on the editor when the spec will not resolve — but only from the tab that has\n// nothing to show. Sending them away from Logs or Danger mid-read would be its own annoyance.\nwatch(\n () => dep.error,\n (err) => {\n if (err && router.currentRoute.value.name === 'd.overview') {\n void router.replace(`/deployments/${encodeURIComponent(props.id)}/config`);\n }\n },\n);\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RouterLink to=\"/deployments\">← deployments</RouterLink>\n </div>\n <h1 style=\"font-size: var(--t-xl)\">{{ id }}</h1>\n <div class=\"sub\">\n <span v-if=\"dep.detail\">\n stack <b>{{ dep.detail.stack }}</b>\n </span>\n <span v-else-if=\"dep.error\">unresolved</span>\n <span v-else>loading…</span>\n </div>\n </div>\n <span class=\"grow\" />\n <span v-if=\"dep.detail\" class=\"badge\" :class=\"dep.detail.kind\">{{ dep.detail.kind }}</span>\n <span v-if=\"dep.detail?.busy === true\" class=\"badge busy\"><span class=\"dot pulse\" />busy</span>\n </div>\n\n <nav class=\"tabs\" aria-label=\"Deployment sections\">\n <RouterLink\n v-for=\"t in TABS\"\n :key=\"t.to\"\n :to=\"`/deployments/${encodeURIComponent(id)}/${t.to}`\"\n >{{ t.label }}</RouterLink\n >\n </nav>\n\n <ErrorNote v-if=\"dep.error\" :text=\"dep.error\" title=\"Could not resolve this deployment.\">\n </ErrorNote>\n <p v-if=\"dep.error\" class=\"hint\">\n If that message names a variable, add it under <b>Config & variables</b> and press\n <b>Apply & reload</b>.\n <InfoHint label=\"why the rest of the page is unavailable\">\n Until the spec resolves there is no stack name, and every action on this deployment needs one.\n </InfoHint>\n </p>\n\n <p v-if=\"isShared\" class=\"hint\" style=\"margin-bottom: var(--s4)\">\n Shared with every preview on this host.\n <InfoHint label=\"what a shared deployment is\">\n A host singleton that previews borrow — a database, a queue, a registry mirror. It declares no\n axes, and tearing it down needs an explicit confirmation, because doing so destroys state\n every other deployment depends on.\n </InfoHint>\n </p>\n\n <RouterView v-slot=\"{ Component }\">\n <Transition name=\"view\" mode=\"out-in\">\n <component :is=\"Component\" />\n </Transition>\n </RouterView>\n </div>\n</template>\n"],"names":["props","__props","router","useRouter","TABS","watch","id","openDeployment","dep","err","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_component_RouterLink","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_unref","_hoisted_5","_openBlock","_hoisted_8","_hoisted_9","_Fragment","_renderList","t","_createTextVNode","_createBlock","ErrorNote","_hoisted_10","InfoHint","isShared","_hoisted_11","_component_RouterView","_withCtx","Component","_Transition","_resolveDynamicComponent"],"mappings":"+sBAeA,MAAMA,EAAQC,EACRC,EAASC,EAAA,EAETC,EAAO,CACX,CAAE,GAAI,WAAY,MAAO,UAAA,EAGzB,CAAE,GAAI,UAAW,MAAO,qBAAA,EACxB,CAAE,GAAI,SAAU,MAAO,oBAAA,EACvB,CAAE,GAAI,OAAQ,MAAO,MAAA,EACrB,CAAE,GAAI,WAAY,MAAO,UAAA,EACzB,CAAE,GAAI,OAAQ,MAAO,MAAA,EAErB,CAAE,GAAI,WAAY,MAAO,UAAA,EACzB,CAAE,GAAI,SAAU,MAAO,QAAA,CAAS,EAGlC,OAAAC,EAAM,IAAML,EAAM,GAAKM,GAAOC,EAAeD,CAAE,EAAG,CAAE,UAAW,GAAM,EAIrED,EACE,IAAMG,EAAI,MACTC,GAAQ,CACHA,GAAOP,EAAO,aAAa,MAAM,OAAS,cACvCA,EAAO,QAAQ,gBAAgB,mBAAmBF,EAAM,EAAE,CAAC,SAAS,CAE7E,CAAA,qEAKAU,EAqDM,MAAA,KAAA,CApDJC,EAiBM,MAjBNC,EAiBM,CAhBJD,EAYM,MAAA,KAAA,CAXJA,EAEM,MAFNE,EAEM,CADJC,EAAwDC,EAAA,CAA5C,GAAG,gBAAc,WAAC,IAAa,CAAA,GA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AA,EAAI,OAAbc,IAAAZ,EAMI,IANJqB,EAMI,eAN6B,mDACgB,EAAA,GAAAf,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAL,EAA6B,SAA1B,qBAAsB,EAAA,iBAAI,cAC5E,EAAA,GAAAK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAL,EAAyB,SAAtB,iBAAkB,EAAA,iBAAI,KACzB,EAAA,GAAAG,EAEWkB,EAAA,CAFD,MAAM,2CAAyC,WAAC,IAE1D,CAAA,GAAAhB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAF0D,mGAE1D,EAAA,CAAA,uBAGOI,EAAAa,CAAA,GAATX,IAAAZ,EAOI,IAPJwB,EAOI,iBAP6D,4CAE/D,EAAA,GAAApB,EAIWkB,EAAA,CAJD,MAAM,+BAA6B,WAAC,IAI9C,CAAA,GAAAhB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAJ8C,gOAI9C,EAAA,CAAA,uBAGFF,EAIaqB,EAAA,KAAA,CAHX,QAAAC,EAAA,CAEa,CAHO,UAAAC,KAAS,CAC7BvB,EAEawB,EAAA,CAFD,KAAK,OAAO,KAAK,QAAA,aAC3B,IAA6B,EAA7BhB,IAAAO,EAA6BU,EAAbF,CAAS,CAAA,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as k,c as l,a as t,i as y,v as g,e as n,u as o,y as r,t as i,x as w,F as m,s as x,f as p,g as C,r as f,C as V,o as a,D as L,w as b,j as N}from"./index-D8OAewba.js";import{a as $,t as A}from"./useFormat-CKJxQp_i.js";import{_ as R}from"./StateBadge.vue_vue_type_script_setup_true_lang-B5C48Wlo.js";import{_ as B}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{_ as F}from"./RelativeTime.vue_vue_type_script_setup_true_lang-mzHGsi43.js";import{_ as S}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./Teleport-0BmaJsBF.js";const U={class:"panel"},j={class:"phead"},q={class:"field",style:{flex:"1","min-width":"180px"}},z={class:"field"},D={key:0,class:"s-failed"},E={key:2,class:"cards"},T={class:"stagger"},I={"data-label":"state"},J={"data-label":"action"},M={class:"name","data-label":"stack"},H={class:"dim nowrap","data-label":"started"},O={class:"dim nowrap","data-label":"took"},G={class:"dim","data-label":"steps"},K={key:0},P={colspan:"6",class:"mute"},at=k({__name:"JobsView",setup(Q){const c=f(""),d=f("all"),_=V(()=>{const u=c.value.trim().toLowerCase();return r.jobs.filter(e=>d.value!=="all"&&e.state!==d.value?!1:u?e.stack.toLowerCase().includes(u)||e.action.includes(u):!0)});return(u,e)=>{const h=N("RouterLink");return a(),l("div",null,[e[6]||(e[6]=t("div",{class:"page-head"},[t("div",null,[t("h1",null,"Jobs"),t("div",{class:"sub"},"Most recent first, capped at the last 50.")])],-1)),t("section",U,[t("div",j,[t("div",q,[e[2]||(e[2]=t("label",{for:"jq",class:"mute",style:{"font-size":"var(--t-xs)"}},"Search — press /",-1)),y(t("input",{id:"jq","onUpdate:modelValue":e[0]||(e[0]=s=>c.value=s),"data-search":"",type:"search",placeholder:"stack or action",spellcheck:"false"},null,512),[[g,c.value]])]),t("div",z,[e[3]||(e[3]=t("label",{for:"js",class:"mute",style:{"font-size":"var(--t-xs)"}},"State",-1)),n(S,{modelValue:d.value,"onUpdate:modelValue":e[1]||(e[1]=s=>d.value=s),id:"js",label:"Filter jobs",options:[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"ok",label:"Ok"},{value:"leaked",label:"Leaked"},{value:"failed",label:"Failed"}]},null,8,["modelValue"])])]),e[5]||(e[5]=t("p",{class:"hint",style:{margin:"0 0 var(--s3)"}}," Held in memory. A server restart clears the history — a job record is the transcript of an attempt, not the truth about what exists. That truth lives in docker and in each axis's own probe. ",-1)),o(r).jobsError?(a(),l("p",D,i(o(r).jobsError),1)):o(r).jobsLoaded?(a(),l("table",E,[e[4]||(e[4]=t("thead",null,[t("tr",null,[t("th",null,"state"),t("th",null,"action"),t("th",null,"stack"),t("th",null,"started"),t("th",null,"took"),t("th",null,"steps")])],-1)),t("tbody",T,[(a(!0),l(m,null,x(_.value,(s,v)=>(a(),l("tr",{key:s.id,style:L({"--i":v})},[t("td",I,[n(h,{to:`/jobs/${encodeURIComponent(s.id)}`},{default:b(()=>[n(R,{state:s.state},null,8,["state"])]),_:2},1032,["to"])]),t("td",J,i(o($)(s.action)),1),t("td",M,[n(h,{to:`/jobs/${encodeURIComponent(s.id)}`},{default:b(()=>[p(i(s.stack),1)]),_:2},1032,["to"])]),t("td",H,[n(F,{at:s.startedAt},null,8,["at"])]),t("td",O,i(o(A)(s.startedAt,s.endedAt)),1),t("td",G,i(s.outcome?s.outcome.steps.length:"—"),1)],4))),128)),_.value.length?C("",!0):(a(),l("tr",K,[t("td",P,[o(r).jobs.length?(a(),l(m,{key:0},[p("Nothing matches this filter.")],64)):(a(),l(m,{key:1},[p("No jobs recorded.")],64))])]))])])):(a(),w(B,{key:1,rows:5}))])])}}});export{at as default};
|
|
2
|
-
//# sourceMappingURL=JobsView-Boi9Cmdc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JobsView-Boi9Cmdc.js","sources":["../../src/views/JobsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** Job history. Polled by the shell already, so this view only filters what is in memory. */\nimport { computed, ref } from 'vue';\nimport { state } from '../composables/useControlPlane';\nimport { actionLabel, took } from '../composables/useFormat';\nimport StateBadge from '../components/StateBadge.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\nimport type { JobState } from '../api/types';\n\nconst q = ref('');\nconst only = ref<'all' | JobState>('all');\n\nconst rows = computed(() => {\n const needle = q.value.trim().toLowerCase();\n return state.jobs.filter((j) => {\n if (only.value !== 'all' && j.state !== only.value) return false;\n if (!needle) return true;\n return j.stack.toLowerCase().includes(needle) || j.action.includes(needle);\n });\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Jobs</h1>\n <div class=\"sub\">Most recent first, capped at the last 50.</div>\n </div>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <div class=\"field\" style=\"flex: 1; min-width: 180px\">\n <label for=\"jq\" class=\"mute\" style=\"font-size: var(--t-xs)\">Search — press /</label>\n <input id=\"jq\" v-model=\"q\" data-search type=\"search\" placeholder=\"stack or action\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"js\" class=\"mute\" style=\"font-size: var(--t-xs)\">State</label>\n <SelectMenu v-model=\"only\" id=\"js\" label=\"Filter jobs\" :options=\"[{ value: 'all', label: 'All' }, { value: 'running', label: 'Running' }, { value: 'ok', label: 'Ok' }, { value: 'leaked', label: 'Leaked' }, { value: 'failed', label: 'Failed' }]\" />\n </div>\n </div>\n\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Held in memory. A server restart clears the history — a job record is the transcript of an\n attempt, not the truth about what exists. That truth lives in docker and in each axis's own\n probe.\n </p>\n\n <p v-if=\"state.jobsError\" class=\"s-failed\">{{ state.jobsError }}</p>\n <SkeletonList v-else-if=\"!state.jobsLoaded\" :rows=\"5\" />\n\n <table v-else class=\"cards\">\n <thead>\n <tr>\n <th>state</th>\n <th>action</th>\n <th>stack</th>\n <th>started</th>\n <th>took</th>\n <th>steps</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(j, i) in rows\" :key=\"j.id\" :style=\"{ '--i': i }\">\n <td data-label=\"state\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(j.id)}`\">\n <StateBadge :state=\"j.state\" />\n </RouterLink>\n </td>\n <td data-label=\"action\">{{ actionLabel(j.action) }}</td>\n <td class=\"name\" data-label=\"stack\">\n <RouterLink :to=\"`/jobs/${encodeURIComponent(j.id)}`\">{{ j.stack }}</RouterLink>\n </td>\n <td class=\"dim nowrap\" data-label=\"started\"><RelativeTime :at=\"j.startedAt\" /></td>\n <td class=\"dim nowrap\" data-label=\"took\">{{ took(j.startedAt, j.endedAt) }}</td>\n <td class=\"dim\" data-label=\"steps\">{{ j.outcome ? j.outcome.steps.length : '—' }}</td>\n </tr>\n <tr v-if=\"!rows.length\">\n <td colspan=\"6\" class=\"mute\">\n <template v-if=\"state.jobs.length\">Nothing matches this filter.</template>\n <template v-else>No jobs recorded.</template>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </div>\n</template>\n"],"names":["q","ref","only","rows","computed","needle","state","j","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_hoisted_3","$event","_hoisted_4","_createVNode","SelectMenu","_unref","_openBlock","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_Fragment","_renderList","i","_hoisted_8","_component_RouterLink","StateBadge","_hoisted_9","_hoisted_10","_createTextVNode","_hoisted_11","RelativeTime","_hoisted_12","took","_hoisted_13","_hoisted_14","_hoisted_15","_createBlock","SkeletonList"],"mappings":"giCAWA,MAAMA,EAAIC,EAAI,EAAE,EACVC,EAAOD,EAAsB,KAAK,EAElCE,EAAOC,EAAS,IAAM,CAC1B,MAAMC,EAASL,EAAE,MAAM,KAAA,EAAO,YAAA,EAC9B,OAAOM,EAAM,KAAK,OAAQC,GACpBL,EAAK,QAAU,OAASK,EAAE,QAAUL,EAAK,MAAc,GACtDG,EACEE,EAAE,MAAM,YAAA,EAAc,SAASF,CAAM,GAAKE,EAAE,OAAO,SAASF,CAAM,EADrD,EAErB,CACH,CAAC,mDAICG,EAgEM,MAAA,KAAA,aA/DJC,EAKM,MAAA,CALD,MAAM,aAAW,CACpBA,EAGM,MAAA,KAAA,CAFJA,EAAa,UAAT,MAAI,EACRA,EAAgE,MAAA,CAA3D,MAAM,KAAA,EAAM,2CAAyC,CAAA,SAI9DA,EAuDU,UAvDVC,EAuDU,CAtDRD,EASM,MATNE,EASM,CARJF,EAGM,MAHNG,EAGM,aAFJH,EAAoF,QAAA,CAA7E,IAAI,KAAK,MA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KD,EAAE,GAAK,eAAgBkB,EAAC,CAAA,GACvDhB,EAIK,KAJLiB,EAIK,CAHHX,EAEaY,EAAA,CAFA,GAAE,SAAW,mBAAmBpB,EAAE,EAAE,CAAA,EAAA,aAC/C,IAA+B,CAA/BQ,EAA+Ba,EAAA,CAAlB,MAAOrB,EAAE,KAAA,0CAG1BE,EAAwD,KAAxDoB,EAAwDT,EAA7BH,KAAYV,EAAE,MAAM,CAAA,EAAA,CAAA,EAC/CE,EAEK,KAFLqB,EAEK,CADHf,EAAgFY,EAAA,CAAnE,GAAE,SAAW,mBAAmBpB,EAAE,EAAE,CAAA,EAAA,aAAK,IAAa,CAAVwB,EAAAX,EAAAb,EAAE,KAAK,EAAA,CAAA,CAAA,uBAElEE,EAAmF,KAAnFuB,EAAmF,CAAvCjB,EAAkCkB,EAAA,CAAnB,GAAI1B,EAAE,SAAA,mBACjEE,EAAgF,KAAhFyB,EAAgFd,EAApCH,EAAAkB,CAAA,EAAK5B,EAAE,UAAWA,EAAE,OAAO,CAAA,EAAA,CAAA,EACvEE,EAAsF,KAAtF2B,EAAsFhB,EAAhDb,EAAE,QAAUA,EAAE,QAAQ,MAAM,OAAM,GAAA,EAAA,CAAA,CAAA,aAE/DJ,EAAA,MAAK,qBAAhBK,EAKK,KAAA6B,EAAA,CAJH5B,EAGK,KAHL6B,EAGK,CAFarB,EAAAX,CAAA,EAAM,KAAK,YAA3BE,EAA0Ee,EAAA,CAAA,IAAA,CAAA,EAAA,GAAvC,8BAA4B,CAAA,YAC/Df,EAA6Ce,EAAA,CAAA,IAAA,GAAA,GAA5B,mBAAiB,CAAA,sBA/B1CgB,EAAwDC,EAAA,OAAX,KAAM,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as o,r as _,i as x}from"./useDeployment-DplTFu7s.js";import{s as h}from"./useFormat-CKJxQp_i.js";import{_ as C}from"./SkeletonList.vue_vue_type_script_setup_true_lang-CIiWzcE5.js";import{d as T,c as a,a as e,u as t,x as m,w as p,g as r,f as l,e as b,_ as g,t as i,E as A,F as u,s as k,C as N,j as R,o as n}from"./index-D8OAewba.js";import"./useVars-VN9gYdR6.js";const $={class:"panel"},B={class:"phead"},z={key:1,class:"mute"},L={key:1,class:"mute"},S={key:2,class:"kvlist"},U={class:"k"},V={class:"v mono"},E={class:"v"},I={class:"mute",style:{"margin-left":"8px","font-size":"var(--t-sm)"}},j={key:0},q={class:"v"},D={class:"v mono"},F={key:1},H={class:"v"},P={key:0,class:"mute"},K={key:2},O={class:"k"},G={class:"v"},J={class:"mono"},M={class:"mute",style:{"font-size":"var(--t-sm)"}},Q={key:3},W={class:"v"},X={key:0,class:"mute"},Y={class:"v"},Z={class:"v"},ss={class:"v"},es={class:"v"},rs=T({__name:"OverviewTab",setup(ts){const w=N(()=>x.value?"a host singleton previews borrow — no axes, and down is guarded":"one tenant, created and destroyed constantly, expected to leave nothing behind");return(os,s)=>{var y,v,f;const c=R("RouterLink");return n(),a("section",$,[e("div",B,[s[2]||(s[2]=e("h2",{class:"section"},"Resolved spec",-1)),s[3]||(s[3]=e("span",{class:"grow"},null,-1)),t(o).detail?(n(),m(c,{key:0,to:`/submit?from=${encodeURIComponent(t(o).id)}`},{default:p(()=>[...s[0]||(s[0]=[l(" Duplicate ",-1)])]),_:1},8,["to"])):r("",!0),t(o).detail?(n(),a("span",z,"·")):r("",!0),t(o).detail?(n(),m(c,{key:2,to:`/submit/${encodeURIComponent(t(o).id)}`},{default:p(()=>[...s[1]||(s[1]=[l(" Edit spec & compose → ",-1)])]),_:1},8,["to"])):r("",!0)]),!t(o).detail&&!t(o).error?(n(),m(C,{key:0,rows:5})):t(o).detail?(n(),a("ul",S,[e("li",null,[e("span",U,[s[5]||(s[5]=l(" stack ",-1)),b(g,{label:"the difference between id and stack"},{default:p(()=>[...s[4]||(s[4]=[l(" The ",-1),e("b",null,"id",-1),l(" is what you named this deployment. The ",-1),e("b",null,"stack",-1),l(" is what its spec resolved to once the variables were filled in — the compose project name, the hostname label, and ",-1),e("code",null,"$STACK",-1),l(" inside every hook. ",-1)])]),_:1})]),e("span",V,i(t(o).detail.stack||"—"),1)]),e("li",null,[s[6]||(s[6]=e("span",{class:"k"},"kind",-1)),e("span",E,[e("span",{class:A(["badge",t(o).detail.kind])},i(t(o).detail.kind),3),e("span",I,i(w.value),1)])]),(y=t(_))!=null&&y.specName?(n(),a("li",j,[s[8]||(s[8]=e("span",{class:"k"},"spec",-1)),e("span",q,[e("b",null,i(t(_).specName),1),s[7]||(s[7]=e("span",{class:"mute",style:{"font-size":"var(--t-sm)"}}," — stored, and shared with any other deployment using it ",-1))])])):r("",!0),e("li",null,[s[9]||(s[9]=e("span",{class:"k"},"compose file",-1)),e("span",D,i(t(o).detail.compose?t(o).detail.compose.file:"— (no compose section)"),1)]),t(o).detail.compose?(n(),a("li",F,[s[10]||(s[10]=e("span",{class:"k"},"profiles",-1)),e("span",H,[(n(!0),a(u,null,k(t(o).detail.compose.profiles,d=>(n(),a("span",{key:d,class:"badge",style:{"margin-right":"4px"}},i(d),1))),128)),t(o).detail.compose.profiles.length?r("",!0):(n(),a("span",P," none — a bare up starts every service "))])])):r("",!0),(f=(v=t(o).detail.compose)==null?void 0:v.subdomains)!=null&&f.length?(n(),a("li",K,[e("span",O,[s[15]||(s[15]=l(" subdomains ",-1)),b(g,{label:"how wildcard subdomains work"},{default:p(()=>[s[14]||(s[14]=l(" Anything one label under these hosts reaches the same service the bare host does. An exact hostname you route yourself always wins over the wildcard. ",-1)),t(o).detail.compose.subdomains.some(d=>d.depth==="any")?(n(),a(u,{key:0},[s[11]||(s[11]=l(" A route marked ",-1)),s[12]||(s[12]=e("b",null,"any depth",-1)),s[13]||(s[13]=l(" works over HTTP only — no TLS certificate can cover more than one label. ",-1))],64)):r("",!0)]),_:1})]),e("span",G,[(n(!0),a(u,null,k(t(o).detail.compose.subdomains,d=>(n(),a("div",{key:d.profile},[e("span",J,"*."+i(d.host),1),e("span",M,[l(" → "+i(d.profile),1),d.depth==="any"?(n(),a(u,{key:0},[l(" · any depth, HTTP only")],64)):r("",!0)])]))),128))])])):r("",!0),t(o).detail.compose?(n(),a("li",Q,[s[16]||(s[16]=e("span",{class:"k"},"overlays",-1)),e("span",W,[(n(!0),a(u,null,k(t(o).detail.compose.overlays,d=>(n(),a("span",{key:d,class:"mono",style:{"margin-right":"8px"}},i(d),1))),128)),t(o).detail.compose.overlays.length?r("",!0):(n(),a("span",X,"none"))])])):r("",!0),e("li",null,[s[18]||(s[18]=e("span",{class:"k"},"axes",-1)),e("span",Y,[l(i(t(o).detail.axes.length)+" ",1),t(o).detail.axes.length?(n(),m(c,{key:0,to:`/deployments/${encodeURIComponent(t(o).id)}/axes`},{default:p(()=>[...s[17]||(s[17]=[l(" view → ",-1)])]),_:1},8,["to"])):r("",!0)])]),e("li",null,[s[19]||(s[19]=e("span",{class:"k"},"requires",-1)),e("span",Z,i(t(o).detail.requires.length),1)]),e("li",null,[s[20]||(s[20]=e("span",{class:"k"},"created",-1)),e("span",ss,i(t(h)(t(o).detail.createdAt)),1)]),e("li",null,[s[21]||(s[21]=e("span",{class:"k"},"updated",-1)),e("span",es,i(t(h)(t(o).detail.updatedAt)),1)])])):(n(),a("p",L,"Unavailable until the spec resolves."))])}}});export{rs as default};
|
|
2
|
-
//# sourceMappingURL=OverviewTab-DzZG0moV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OverviewTab-DzZG0moV.js","sources":["../../src/views/tabs/OverviewTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** The resolved spec, summarised. Read-only — everything that acts lives on Danger. */\nimport { computed } from 'vue';\nimport { dep, isShared, row } from '../../composables/useDeployment';\nimport { stamp } from '../../composables/useFormat';\nimport SkeletonList from '../../components/SkeletonList.vue';\nimport InfoHint from '../../components/InfoHint.vue';\n\nconst kindBlurb = computed(() =>\n isShared.value\n ? 'a host singleton previews borrow — no axes, and down is guarded'\n : 'one tenant, created and destroyed constantly, expected to leave nothing behind',\n);\n</script>\n\n<template>\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Resolved spec</h2>\n <span class=\"grow\" />\n <RouterLink v-if=\"dep.detail\" :to=\"`/submit?from=${encodeURIComponent(dep.id)}`\">\n Duplicate\n </RouterLink>\n <span v-if=\"dep.detail\" class=\"mute\">·</span>\n <RouterLink v-if=\"dep.detail\" :to=\"`/submit/${encodeURIComponent(dep.id)}`\">\n Edit spec & compose →\n </RouterLink>\n </div>\n\n <SkeletonList v-if=\"!dep.detail && !dep.error\" :rows=\"5\" />\n <p v-else-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n\n <template v-else>\n <ul class=\"kvlist\">\n <li>\n <span class=\"k\">\n stack\n <InfoHint label=\"the difference between id and stack\">\n The <b>id</b> is what you named this deployment. The <b>stack</b> is what its spec\n resolved to once the variables were filled in — the compose project name, the hostname\n label, and <code>$STACK</code> inside every hook.\n </InfoHint>\n </span>\n <span class=\"v mono\">{{ dep.detail.stack || '—' }}</span>\n </li>\n <li>\n <span class=\"k\">kind</span>\n <span class=\"v\">\n <span class=\"badge\" :class=\"dep.detail.kind\">{{ dep.detail.kind }}</span>\n <span class=\"mute\" style=\"margin-left: 8px; font-size: var(--t-sm)\">{{ kindBlurb }}</span>\n </span>\n </li>\n <li v-if=\"row?.specName\">\n <span class=\"k\">spec</span>\n <span class=\"v\">\n <b>{{ row.specName }}</b>\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n — stored, and shared with any other deployment using it\n </span>\n </span>\n </li>\n <li>\n <span class=\"k\">compose file</span>\n <span class=\"v mono\">\n {{ dep.detail.compose ? dep.detail.compose.file : '— (no compose section)' }}\n </span>\n </li>\n <li v-if=\"dep.detail.compose\">\n <span class=\"k\">profiles</span>\n <span class=\"v\">\n <span v-for=\"p in dep.detail.compose.profiles\" :key=\"p\" class=\"badge\" style=\"margin-right: 4px\">\n {{ p }}\n </span>\n <span v-if=\"!dep.detail.compose.profiles.length\" class=\"mute\">\n none — a bare up starts every service\n </span>\n </span>\n </li>\n <li v-if=\"dep.detail.compose?.subdomains?.length\">\n <span class=\"k\">\n subdomains\n <InfoHint label=\"how wildcard subdomains work\">\n Anything one label under these hosts reaches the same service the bare host does.\n An exact hostname you route yourself always wins over the wildcard.\n <template v-if=\"dep.detail.compose.subdomains.some((s) => s.depth === 'any')\">\n A route marked <b>any depth</b> works over HTTP only — no TLS certificate can cover\n more than one label.\n </template>\n </InfoHint>\n </span>\n <span class=\"v\">\n <div v-for=\"s in dep.detail.compose.subdomains\" :key=\"s.profile\">\n <span class=\"mono\">*.{{ s.host }}</span>\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n → {{ s.profile }}<template v-if=\"s.depth === 'any'\"> · any depth, HTTP only</template>\n </span>\n </div>\n </span>\n </li>\n <li v-if=\"dep.detail.compose\">\n <span class=\"k\">overlays</span>\n <span class=\"v\">\n <span v-for=\"o in dep.detail.compose.overlays\" :key=\"o\" class=\"mono\" style=\"margin-right: 8px\">{{ o }}</span>\n <span v-if=\"!dep.detail.compose.overlays.length\" class=\"mute\">none</span>\n </span>\n </li>\n <li>\n <span class=\"k\">axes</span>\n <span class=\"v\">\n {{ dep.detail.axes.length }}\n <RouterLink v-if=\"dep.detail.axes.length\" :to=\"`/deployments/${encodeURIComponent(dep.id)}/axes`\">\n view →\n </RouterLink>\n </span>\n </li>\n <li>\n <span class=\"k\">requires</span>\n <span class=\"v\">{{ dep.detail.requires.length }}</span>\n </li>\n <li><span class=\"k\">created</span><span class=\"v\">{{ stamp(dep.detail.createdAt) }}</span></li>\n <li><span class=\"k\">updated</span><span class=\"v\">{{ stamp(dep.detail.updatedAt) }}</span></li>\n </ul>\n </template>\n </section>\n</template>\n"],"names":["kindBlurb","computed","isShared","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_cache","_unref","dep","_createBlock","_component_RouterLink","_hoisted_3","SkeletonList","_hoisted_5","_hoisted_6","_createVNode","InfoHint","_hoisted_7","_toDisplayString","_hoisted_8","_hoisted_9","row","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_Fragment","_renderList","p","_hoisted_15","_hoisted_16","_hoisted_17","s","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","o","_hoisted_23","_hoisted_24","_createTextVNode","_hoisted_25","_hoisted_26","stamp","_hoisted_27","_hoisted_4"],"mappings":"46BAQA,MAAMA,EAAYC,EAAS,IACzBC,EAAS,MACL,kEACA,gFAAA,mDAKJ,OAAAC,EAAA,EAAAC,EA2GU,UA3GVC,EA2GU,CA1GRC,EAUM,MAVNC,EAUM,CATJC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAF,EAAsC,KAAA,CAAlC,MAAM,SAAA,EAAU,gBAAa,EAAA,eACjCA,EAAqB,OAAA,CAAf,MAAM,MAAA,EAAM,KAAA,EAAA,GACAG,EAAAC,CAAA,EAAI,YAAtBC,EAEaC,EAAA,OAFkB,GAAE,gBAAkB,mBAAmBH,EAAAC,CAAA,EAAI,EAAE,CAAA,EAAA,aAAK,IAEjF,CAAA,GAAAF,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFiF,cAEjF,EAAA,CAAA,8BACYC,EAAAC,CAAA,EAAI,YAAhBN,EAA6C,OAA7CS,EAAqC,GAAC,YACpBJ,EAAAC,CAAA,EAAI,YAAtBC,EAEaC,EAAA,OAFkB,GAAE,WAAa,mBAAmBH,EAAAC,CAAA,EAAI,EAAE,CAAA,EAAA,aAAK,IAE5E,CAAA,GAAAF,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAF4E,0BAE5E,EAAA,CAAA,gCAGmB,CAAAC,EAAAC,CAAA,EAAI,QAAM,CAAKD,EAAAC,CAAA,EAAI,WAAxCC,EAA2DG,EAAA,OAAX,KAAM,CAAA,IACvCL,EAAAC,CAAA,EAAI,QAGjBP,IAAAC,EAwFK,KAxFLW,EAwFK,CAvFHT,EAUK,KAAA,KAAA,CATHA,EAOO,OAP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A,GACxBA,EAAuD,OAAvDuC,EAAuDzB,EAApCX,EAAAC,CAAA,EAAI,OAAO,SAAS,MAAM,EAAA,CAAA,CAAA,GAE/CJ,EAA+F,KAAA,KAAA,CAA3FE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxDwC,GAAwD1B,EAArCX,EAAAsC,CAAA,EAAMtC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,GAC/EJ,EAA+F,KAAA,KAAA,CAA3FE,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAwD,OAAxD0C,GAAwD5B,EAArCX,EAAAsC,CAAA,EAAMtC,EAAAC,CAAA,EAAI,OAAO,SAAS,CAAA,EAAA,CAAA,CAAA,WA1FnFN,EAAgF,IAAhF6C,EAAwC,sCAAoC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ht=e=>{throw TypeError(e)};var fn=(e,t,n)=>t.has(e)||ht("Cannot "+n);var Ae=(e,t,n)=>(fn(e,t,"read from private field"),n?n.call(e):t.get(e)),gt=(e,t,n)=>t.has(e)?ht("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{j as Mt,k as pn,l as Ve,e as mn,r as hn,g as Vt,S as vt,P as Y,c as Ce,a as me,m as gn,u as yt,n as wt,i as vn,f as yn,F as wn,D as xn,o as xt,p as bn,h as Sn,b as Lt,q as Cn,T as _n}from"./Teleport-0BmaJsBF.js";import{r as E,C as q,a3 as Le,a4 as An,a5 as Pn,a6 as On,a7 as En,X as he,a8 as qn,d as k,a9 as bt,H as de,aa as Rn,ab as Tn,o as $,x as L,w as R,V,u as w,ac as Ft,ad as we,M as $n,ae as Bn,af as kn,c as J,e as N,W as ne,D as Nt,ag as In,U as it,g as Ee,s as zt,F as lt,a as xe,h as Oe,I as Dn,ah as Pe,a1 as Ht,Y as Wt,Z as jt,ai as Mn,f as Kt,aj as Vn,ak as Ln,t as Ge}from"./index-D8OAewba.js";function St(e){return typeof e=="string"?`'${e}'`:new Fn().serialize(e)}const Fn=(function(){var t;class e{constructor(){gt(this,t,new Map)}compare(o,r){const i=typeof o,l=typeof r;return i==="string"&&l==="string"?o.localeCompare(r):i==="number"&&l==="number"?o-r:String.prototype.localeCompare.call(this.serialize(o,!0),this.serialize(r,!0))}serialize(o,r){if(o===null)return"null";switch(typeof o){case"string":return r?o:`'${o}'`;case"bigint":return`${o}n`;case"object":return this.$object(o);case"function":return this.$function(o)}return String(o)}serializeObject(o){const r=Object.prototype.toString.call(o);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),o);const i=o.constructor,l=i===Object||i===void 0?"":i.name;if(l!==""&&globalThis[l]===i)return this.serializeBuiltInType(l,o);if(typeof o.toJSON=="function"){const s=o.toJSON();return l+(s!==null&&typeof s=="object"?this.$object(s):`(${this.serialize(s)})`)}return this.serializeObjectEntries(l,Object.entries(o))}serializeBuiltInType(o,r){const i=this["$"+o];if(i)return i.call(this,r);if(typeof(r==null?void 0:r.entries)=="function")return this.serializeObjectEntries(o,r.entries());throw new Error(`Cannot serialize ${o}`)}serializeObjectEntries(o,r){const i=Array.from(r).sort((s,a)=>this.compare(s[0],a[0]));let l=`${o}{`;for(let s=0;s<i.length;s++){const[a,u]=i[s];l+=`${this.serialize(a,!0)}:${this.serialize(u)}`,s<i.length-1&&(l+=",")}return l+"}"}$object(o){let r=Ae(this,t).get(o);return r===void 0&&(Ae(this,t).set(o,`#${Ae(this,t).size}`),r=this.serializeObject(o),Ae(this,t).set(o,r)),r}$function(o){const r=Function.prototype.toString.call(o);return r.slice(-15)==="[native code] }"?`${o.name||""}()[native]`:`${o.name}(${o.length})${r.replace(/\s*\n\s*/g,"")}`}$Array(o){let r="[";for(let i=0;i<o.length;i++)r+=this.serialize(o[i]),i<o.length-1&&(r+=",");return r+"]"}$Date(o){try{return`Date(${o.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(o){return`ArrayBuffer[${new Uint8Array(o).join(",")}]`}$Set(o){return`Set${this.$Array(Array.from(o).sort((r,i)=>this.compare(r,i)))}`}$Map(o){return this.serializeObjectEntries("Map",o.entries())}}t=new WeakMap;for(const n of["Error","RegExp","URL"])e.prototype["$"+n]=function(o){return`${n}(${o})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+n]=function(o){return`${n}[${o.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])e.prototype["$"+n]=function(o){return`${n}[${o.join("n,")}${o.length>0?"n":""}]`};return e})();function Nn(e,t){return e===t||St(e)===St(t)}function Ct(e,t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(t,e))}function zn(e){const t=Mt({dir:E("ltr")});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}let Ze=0;function Hn(){Le(e=>{if(!pn)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??_t()),document.body.insertAdjacentElement("beforeend",t[1]??_t()),Ze++,e(()=>{Ze===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),Ze--})})}function _t(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Wn(e){return q(()=>{var t;return An(e)?!!((t=Ve(e))!=null&&t.closest("form")):!0})}function st(e){const t=Pn(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((r,i)=>{const l=(t==null?void 0:t.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=En(e);return q(()=>{const r={},i=(t==null?void 0:t.vnode.props)??{};return Object.keys(i).forEach(l=>{r[On(l)]=i[l]}),Object.keys({...n,...r}).reduce((l,s)=>(o.value[s]!==void 0&&(l[s]=o.value[s]),l),{})})}function jn(e,t){const n=st(e),o=t?mn(t):{};return q(()=>({...n.value,...o}))}function Kn(e){const t=E(),n=q(()=>{var r;return((r=t.value)==null?void 0:r.width)??0}),o=q(()=>{var r;return((r=t.value)==null?void 0:r.height)??0});return he(()=>{const r=Ve(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let a,u;if("borderBoxSize"in s){const p=s.borderBoxSize,f=Array.isArray(p)?p[0]:p;a=f.inlineSize,u=f.blockSize}else a=r.offsetWidth,u=r.offsetHeight;t.value={width:a,height:u}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else t.value=void 0}),{width:n,height:o}}function Ut(e){const t=hn("",1e3);return{search:t,handleTypeaheadSearch:(r,i)=>{t.value=t.value+r;{const l=Vt(),s=i.map(d=>{var c,m;return{...d,textValue:((c=d.value)==null?void 0:c.textValue)??((m=d.ref.textContent)==null?void 0:m.trim())??""}}),a=s.find(d=>d.ref===l),u=s.map(d=>d.textValue),p=Yn(u,t.value,a==null?void 0:a.textValue),f=s.find(d=>d.textValue===p);return f&&f.ref.focus(),f==null?void 0:f.ref}},resetTypeahead:()=>{t.value=""}}}function Un(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Yn(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=Un(e,Math.max(i,0));r.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}function At(){const e=E(),t=q(()=>{var n,o;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(o=e.value)==null?void 0:o.$el.nextElementSibling:Ve(e)});return{primitiveElement:e,currentElement:t}}const Pt="data-reka-collection-item";function Te(e={}){const{key:t="",isProvider:n=!1}=e,o=`${t}CollectionProvider`;let r;if(n){const p=E(new Map);r={collectionRef:E(),itemMap:p},Tn(o,r)}else r=qn(o);const i=(p=!1)=>{const f=r.collectionRef.value;if(!f)return[];const d=Array.from(f.querySelectorAll(`[${Pt}]`)),m=Array.from(r.itemMap.value.values()).sort((y,x)=>d.indexOf(y.ref)-d.indexOf(x.ref));return p?m:m.filter(y=>y.ref.dataset.disabled!=="")},l=k({name:"CollectionSlot",inheritAttrs:!1,setup(p,{slots:f,attrs:d}){const{primitiveElement:c,currentElement:m}=At();return de(m,()=>{r.collectionRef.value=m.value}),()=>bt(vt,{ref:c,...d},f)}}),s=k({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(p,{slots:f,attrs:d}){const{primitiveElement:c,currentElement:m}=At();return Le(y=>{if(m.value){const x=Rn(m.value);r.itemMap.value.set(x,{ref:m.value,value:p.value}),y(()=>r.itemMap.value.delete(x))}}),()=>bt(vt,{...d,[Pt]:"",ref:c},f)}}),a=q(()=>Array.from(r.itemMap.value.values())),u=q(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:a,itemMapSize:u,CollectionSlot:l,CollectionItem:s}}var Xn=k({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,n)=>($(),L(w(Y),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:R(()=>[V(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Gn=Xn;const[Yt,Zn]=Ce("PopperRoot");var Jn=k({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return Zn({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>V(n.$slots,"default")}}),Qn=Jn,eo=k({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=me(),r=Yt();return Ft(()=>{r.onAnchorChange(t.reference??o.value)}),(i,l)=>($(),L(w(Y),{ref:w(n),as:i.as,"as-child":i.asChild},{default:R(()=>[V(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),to=eo;function no(e){return e!==null}function oo(e){return{name:"transformOrigin",options:e,fn(t){var x,_,g;const{placement:n,rects:o,middlewareData:r}=t,l=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=l?0:e.arrowWidth,a=l?0:e.arrowHeight,[u,p]=et(n),f={start:"0%",center:"50%",end:"100%"}[p],d=(((_=r.arrow)==null?void 0:_.x)??0)+s/2,c=(((g=r.arrow)==null?void 0:g.y)??0)+a/2;let m="",y="";return u==="bottom"?(m=l?f:`${d}px`,y=`${-a}px`):u==="top"?(m=l?f:`${d}px`,y=`${o.floating.height+a}px`):u==="right"?(m=`${-a}px`,y=l?f:`${c}px`):u==="left"&&(m=`${o.floating.width+a}px`,y=l?f:`${c}px`),{data:{x:m,y}}}}}function et(e){const[t,n="center"]=e.split("-");return[t,n]}const ro=["top","right","bottom","left"],ie=Math.min,Q=Math.max,ke=Math.round,Be=Math.floor,ee=e=>({x:e,y:e}),io={left:"right",right:"left",bottom:"top",top:"bottom"};function Xt(e,t,n){return Q(e,ie(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function le(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function at(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function U(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ct(e){return at(U(e))}function lo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=ct(e),i=ut(r);let l=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Ie(l)),[l,Ie(l)]}function so(e){const t=Ie(e);return[tt(e),t,tt(t)]}function tt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ot=["left","right"],Et=["right","left"],ao=["top","bottom"],uo=["bottom","top"];function co(e,t,n){switch(e){case"top":case"bottom":return n?t?Et:Ot:t?Ot:Et;case"left":case"right":return t?ao:uo;default:return[]}}function fo(e,t,n,o){const r=_e(e);let i=co(le(e),n==="start",o);return r&&(i=i.map(l=>l+"-"+r),t&&(i=i.concat(i.map(tt)))),i}function Ie(e){const t=le(e);return io[t]+e.slice(t.length)}function po(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function Gt(e){return typeof e!="number"?po(e):{top:e,right:e,bottom:e,left:e}}function De(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function qt(e,t,n){let{reference:o,floating:r}=e;const i=U(t),l=ct(t),s=ut(l),a=le(t),u=i==="y",p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[s]/2-r[s]/2;let c;switch(a){case"top":c={x:p,y:o.y-r.height};break;case"bottom":c={x:p,y:o.y+o.height};break;case"right":c={x:o.x+o.width,y:f};break;case"left":c={x:o.x-r.width,y:f};break;default:c={x:o.x,y:o.y}}const m=_e(t);return m&&(c[l]+=d*(m==="end"?1:-1)*(n&&u?-1:1)),c}async function mo(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:c=0}=te(t,e),m=Gt(c),x=s[d?f==="floating"?"reference":"floating":f],_=De(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:a})),g=f==="floating"?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),h=await(i.isElement==null?void 0:i.isElement(C))&&await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1},S=De(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:C,strategy:a}):g);return{top:(_.top-S.top+m.top)/h.y,bottom:(S.bottom-_.bottom+m.bottom)/h.y,left:(_.left-S.left+m.left)/h.x,right:(S.right-_.right+m.right)/h.x}}const ho=50,go=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:mo},a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:f}=qt(u,o,a),d=o,c=0;const m={};for(let y=0;y<i.length;y++){const x=i[y];if(!x)continue;const{name:_,fn:g}=x,{x:C,y:h,data:S,reset:v}=await g({x:p,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});p=C??p,f=h??f,m[_]={...m[_],...S},v&&c<ho&&(c++,typeof v=="object"&&(v.placement&&(d=v.placement),v.rects&&(u=v.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:r}):v.rects),{x:p,y:f}=qt(u,d,a)),y=-1)}return{x:p,y:f,placement:d,strategy:r,middlewareData:m}},vo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:p=0}=te(e,t)||{};if(u==null)return{};const f=Gt(p),d={x:n,y:o},c=ct(r),m=ut(c),y=await l.getDimensions(u),x=c==="y",_=x?"top":"left",g=x?"bottom":"right",C=x?"clientHeight":"clientWidth",h=i.reference[m]+i.reference[c]-d[c]-i.floating[m],S=d[c]-i.reference[c],v=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let b=v?v[C]:0;(!b||!await(l.isElement==null?void 0:l.isElement(v)))&&(b=s.floating[C]||i.floating[m]);const A=h/2-S/2,P=b/2-y[m]/2-1,O=ie(f[_],P),I=ie(f[g],P),T=b-y[m]-I,B=b/2-y[m]/2+A,D=Xt(O,B,T),z=!a.arrow&&_e(r)!=null&&B!==D&&i.reference[m]/2-(B<O?O:I)-y[m]/2<0,F=z?B<O?B-O:B-T:0;return{[c]:d[c]+F,data:{[c]:D,centerOffset:B-D-F,...z&&{alignmentOffset:F}},reset:z}}}),yo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=te(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=le(r),g=U(s),C=le(s)===s,h=await(a.isRTL==null?void 0:a.isRTL(u.floating)),S=d||(C||!y?[Ie(s)]:so(s)),v=m!=="none";!d&&v&&S.push(...fo(s,y,m,h));const b=[s,...S],A=await a.detectOverflow(t,x),P=[];let O=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&P.push(A[_]),f){const D=lo(r,l,h);P.push(A[D[0]],A[D[1]])}if(O=[...O,{placement:r,overflows:P}],!P.every(D=>D<=0)){var I,T;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,z=b[D];if(z&&(!(f==="alignment"?g!==U(z):!1)||O.every(M=>U(M.placement)===g?M.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:z}};let F=(T=O.filter(W=>W.overflows[0]<=0).sort((W,M)=>W.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!F)switch(c){case"bestFit":{var B;const W=(B=O.filter(M=>{if(v){const K=U(M.placement);return K===g||K==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(K=>K>0).reduce((K,ye)=>K+ye,0)]).sort((M,K)=>M[1]-K[1])[0])==null?void 0:B[0];W&&(F=W);break}case"initialPlacement":F=s;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function Rt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tt(e){return ro.some(t=>e[t]>=0)}const wo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=te(e,t);switch(r){case"referenceHidden":{const l=await o.detectOverflow(t,{...i,elementContext:"reference"}),s=Rt(l,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Tt(s)}}}case"escaped":{const l=await o.detectOverflow(t,{...i,altBoundary:!0}),s=Rt(l,n.floating);return{data:{escapedOffsets:s,escaped:Tt(s)}}}default:return{}}}}},Zt=new Set(["left","top"]);async function xo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),l=le(n),s=_e(n),a=U(n)==="y",u=Zt.has(l)?-1:1,p=i&&a?-1:1,f=te(t,e);let{mainAxis:d,crossAxis:c,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(c=s==="end"?m*-1:m),a?{x:c*p,y:d*u}:{x:d*u,y:c*p}}const bo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:s}=t,a=await xo(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:l}}}}},So=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:l=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:C,y:h}=g;return{x:C,y:h}}},...u}=te(e,t),p={x:n,y:o},f=await i.detectOverflow(t,u),d=U(r),c=at(d);let m=p[c],y=p[d];const x=(g,C)=>Xt(C+f[g==="y"?"top":"left"],C,C-f[g==="y"?"bottom":"right"]);l&&(m=x(c,m)),s&&(y=x(d,y));const _=a.fn({...t,[c]:m,[d]:y});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[c]:l,[d]:s}}}}}},Co=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:l,rects:s,middlewareData:a}=t,{offset:u=0,mainAxis:p=!0,crossAxis:f=!0}=te(e,t),d={x:r,y:i},c=U(l),m=at(c);let y=d[m],x=d[c];const _=te(u,t),g=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(p){const S=m==="y"?"height":"width",v=s.reference[m]-s.floating[S]+g.mainAxis,b=s.reference[m]+s.reference[S]-g.mainAxis;y<v?y=v:y>b&&(y=b)}if(f){var C,h;const S=m==="y"?"width":"height",v=Zt.has(le(l)),b=s.reference[c]-s.floating[S]+(v&&((C=a.offset)==null?void 0:C[c])||0)+(v?0:g.crossAxis),A=s.reference[c]+s.reference[S]+(v?0:((h=a.offset)==null?void 0:h[c])||0)-(v?g.crossAxis:0);x<b?x=b:x>A&&(x=A)}return{[m]:y,[c]:x}}}},_o=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:l=()=>{},...s}=te(e,t),a=await r.detectOverflow(t,s),u=le(n),p=_e(n),f=U(n)==="y",{width:d,height:c}=o.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const x=c-a.top-a.bottom,_=d-a.left-a.right,g=ie(c-a[m],x),C=ie(d-a[y],_),h=t.middlewareData.shift,S=!h;let v=g,b=C;h!=null&&h.enabled.x&&(b=_),h!=null&&h.enabled.y&&(v=x),S&&!p&&(f?b=d-2*Q(a.left,a.right):v=c-2*Q(a.top,a.bottom)),await l({...t,availableWidth:b,availableHeight:v});const A=await r.getDimensions(i.floating);return d!==A.width||c!==A.height?{reset:{rects:!0}}:{}}}};function Fe(){return typeof window<"u"}function ge(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oe(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return Fe()?e instanceof Node||e instanceof H(e).Node:!1}function X(e){return Fe()?e instanceof Element||e instanceof H(e).Element:!1}function se(e){return Fe()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function $t(e){return!Fe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function Ne(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Ao(e){return/^(table|td|th)$/.test(ge(e))}function ze(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Po=/transform|translate|scale|rotate|perspective|filter/,Oo=/paint|layout|strict|content/,ce=e=>!!e&&e!=="none";let Je;function ft(e){const t=X(e)?G(e):e;return ce(t.transform)||ce(t.translate)||ce(t.scale)||ce(t.rotate)||ce(t.perspective)||!pt()&&(ce(t.backdropFilter)||ce(t.filter))||Po.test(t.willChange||"")||Oo.test(t.contain||"")}function Eo(e){let t=fe(e);for(;se(t)&&!qe(t);){if(ft(t))return t;if(ze(t))return null;t=fe(t)}return null}function pt(){return Je==null&&(Je=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Je}function qe(e){return/^(html|body|#document)$/.test(ge(e))}function G(e){return H(e).getComputedStyle(e)}function He(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(ge(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$t(e)&&e.host||oe(e);return $t(t)?t.host:t}function Jt(e){const t=fe(e);return qe(t)?(e.ownerDocument||e).body:se(t)&&Ne(t)?t:Jt(t)}function Re(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Jt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=H(r);if(i){const s=nt(l);return t.concat(l,l.visualViewport||[],Ne(r)?r:[],s&&n?Re(s):[])}else return t.concat(r,Re(r,[],n))}function nt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(e){const t=G(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,s=ke(n)!==i||ke(o)!==l;return s&&(n=i,o=l),{width:n,height:o,$:s}}function mt(e){return X(e)?e:e.contextElement}function Se(e){const t=mt(e);if(!se(t))return ee(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Qt(t);let l=(i?ke(n.width):n.width)/o,s=(i?ke(n.height):n.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const qo=ee(0);function en(e){const t=H(e);return!pt()||!t.visualViewport?qo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ro(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===H(e)}function pe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=mt(e);let l=ee(1);t&&(o?X(o)&&(l=Se(o)):l=Se(e));const s=Ro(i,n,o)?en(i):ee(0);let a=(r.left+s.x)/l.x,u=(r.top+s.y)/l.y,p=r.width/l.x,f=r.height/l.y;if(i&&o){const d=H(i),c=X(o)?H(o):o;let m=d,y=nt(m);for(;y&&c!==m;){const x=Se(y),_=y.getBoundingClientRect(),g=G(y),C=_.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,h=_.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;a*=x.x,u*=x.y,p*=x.x,f*=x.y,a+=C,u+=h,m=H(y),y=nt(m)}}return De({width:p,height:f,x:a,y:u})}function We(e,t){const n=He(e).scrollLeft;return t?t.left+n:pe(oe(e)).left+n}function tn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-We(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function To(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=oe(o),s=t?ze(t.floating):!1;if(o===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},u=ee(1);const p=ee(0),f=se(o);if((f||!i)&&((ge(o)!=="body"||Ne(l))&&(a=He(o)),f)){const c=pe(o);u=Se(o),p.x=c.x+o.clientLeft,p.y=c.y+o.clientTop}const d=l&&!f&&!i?tn(l,a):ee(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+p.x+d.x,y:n.y*u.y-a.scrollTop*u.y+p.y+d.y}}function $o(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Bo(e){const t=He(e),n=e.ownerDocument.body,o=Q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+We(e);const l=-t.scrollTop;return G(n).direction==="rtl"&&(i+=Q(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:l}}const ko=25;function Io(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=H(e),i=oe(e),l=r.visualViewport;let s=i.clientWidth,a=i.clientHeight,u=0,p=0;if(l){const d=!pt()||t==="fixed";o?d||(u=-l.offsetLeft,p=-l.offsetTop):(s=l.width,a=l.height,d&&(u=l.offsetLeft,p=l.offsetTop))}if(We(i)<=0){const d=i.ownerDocument,c=d.body,m=getComputedStyle(c),y=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(i.clientWidth-c.clientWidth-y),_=getComputedStyle(i).scrollbarGutter==="stable both-edges"?x/2:x;_<=ko&&(s-=_)}return{width:s,height:a,x:u,y:p}}function Do(e,t){const n=pe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Se(e),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=r*i.x,u=o*i.y;return{width:l,height:s,x:a,y:u}}function Bt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Io(e,n,t);else if(t==="document")o=Bo(oe(e));else if(X(t))o=Do(t,n);else{const r=en(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return De(o)}function Mo(e,t){const n=t.get(e);if(n)return n;let o=Re(e,[],!1).filter(s=>X(s)&&ge(s)!=="body"),r=null;const i=G(e).position==="fixed";let l=i?fe(e):e;for(;X(l)&&!qe(l);){const s=G(l),a=ft(l),u=r?r.position:i?"fixed":"";!a&&(u==="fixed"||u==="absolute"&&s.position==="static")?o=o.filter(f=>f!==l):r=s,l=fe(l)}return t.set(e,o),o}function Vo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:Mo(t,this._c):[].concat(n),o],s=Bt(t,l[0],r);let a=s.top,u=s.right,p=s.bottom,f=s.left;for(let d=1;d<l.length;d++){const c=Bt(t,l[d],r);a=Q(c.top,a),u=ie(c.right,u),p=ie(c.bottom,p),f=Q(c.left,f)}return{width:u-f,height:p-a,x:f,y:a}}function Lo(e){const{width:t,height:n}=Qt(e);return{width:t,height:n}}function Fo(e,t,n){const o=se(t),r=oe(t),i=n==="fixed",l=pe(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=ee(0);if((o||!i)&&((ge(t)!=="body"||Ne(r))&&(s=He(t)),o)){const d=pe(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}!o&&r&&(a.x=We(r));const u=r&&!o&&!i?tn(r,s):ee(0),p=l.left+s.scrollLeft-a.x-u.x,f=l.top+s.scrollTop-a.y-u.y;return{x:p,y:f,width:l.width,height:l.height}}function Qe(e){return G(e).position==="static"}function kt(e,t){if(!se(e)||G(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function nn(e,t){const n=H(e);if(ze(e))return n;if(!se(e)){let r=fe(e);for(;r&&!qe(r);){if(X(r)&&!Qe(r))return r;r=fe(r)}return n}let o=kt(e,t);for(;o&&Ao(o)&&Qe(o);)o=kt(o,t);return o&&qe(o)&&Qe(o)&&!ft(o)?n:o||Eo(e)||n}const No=async function(e){const t=this.getOffsetParent||nn,n=this.getDimensions,o=await n(e.floating);return{reference:Fo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zo(e){return G(e).direction==="rtl"}const Ho={convertOffsetParentRelativeRectToViewportRelativeRect:To,getDocumentElement:oe,getClippingRect:Vo,getOffsetParent:nn,getElementRects:No,getClientRects:$o,getDimensions:Lo,getScale:Se,isElement:X,isRTL:zo};function on(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wo(e,t,n){let o=null,r;const i=oe(e);function l(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function s(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),l();const d=e.getBoundingClientRect(),{left:c,top:m,width:y,height:x}=d;if(p||t(),!y||!x)return;const _=Be(m),g=Be(i.clientWidth-(c+y)),C=Be(i.clientHeight-(m+x)),h=Be(c),v={rootMargin:-_+"px "+-g+"px "+-C+"px "+-h+"px",threshold:Q(0,ie(1,f))||1};let b=!0;function A(P){const O=P[0].intersectionRatio;if(!on(d,e.getBoundingClientRect()))return s();if(O!==f){if(!b)return s();O?s(!1,O):r=setTimeout(()=>{s(!1,1e-7)},1e3)}b=!1}try{o=new IntersectionObserver(A,{...v,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,v)}o.observe(e)}const a=H(e),u=()=>s(n);return a.addEventListener("resize",u),s(!0),()=>{a.removeEventListener("resize",u),l()}}function jo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,u=mt(e),p=r||i?[...u?Re(u):[],...t?Re(t):[]]:[];p.forEach(_=>{r&&_.addEventListener("scroll",n),i&&_.addEventListener("resize",n)});const f=u&&s?Wo(u,n,i):null;let d=-1,c=null;l&&(c=new ResizeObserver(_=>{let[g]=_;g&&g.target===u&&c&&t&&(c.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=c)==null||C.observe(t)})),n()}),u&&!a&&c.observe(u),t&&c.observe(t));let m,y=a?pe(e):null;a&&x();function x(){const _=pe(e);y&&!on(y,_)&&n(),y=_,m=requestAnimationFrame(x)}return n(),()=>{var _;p.forEach(g=>{r&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),f==null||f(),(_=c)==null||_.disconnect(),c=null,a&&cancelAnimationFrame(m)}}const Ko=bo,Uo=So,It=yo,Yo=_o,Xo=wo,Go=vo,Zo=Co,Jo=(e,t,n)=>{const o=new Map,r=n??{},i={...Ho,...r.platform,_c:o};return go(e,t,{...r,platform:i})};function Qo(e){return e!=null&&typeof e=="object"&&"$el"in e}function ot(e){if(Qo(e)){const t=e.$el;return dt(t)&&ge(t)==="#comment"?null:t}return e}function be(e){return typeof e=="function"?e():w(e)}function er(e){return{name:"arrow",options:e,fn(t){const n=ot(be(e.element));return n==null?{}:Go({element:n,padding:e.padding}).fn(t)}}}function rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dt(e,t){const n=rn(e);return Math.round(t*n)/n}function tr(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,r=q(()=>{var b;return(b=be(n.open))!=null?b:!0}),i=q(()=>be(n.middleware)),l=q(()=>{var b;return(b=be(n.placement))!=null?b:"bottom"}),s=q(()=>{var b;return(b=be(n.strategy))!=null?b:"absolute"}),a=q(()=>{var b;return(b=be(n.transform))!=null?b:!0}),u=q(()=>ot(e.value)),p=q(()=>ot(t.value)),f=E(0),d=E(0),c=E(s.value),m=E(l.value),y=$n({}),x=E(!1),_=q(()=>{const b={position:c.value,left:"0",top:"0"};if(!p.value)return b;const A=Dt(p.value,f.value),P=Dt(p.value,d.value);return a.value?{...b,transform:"translate("+A+"px, "+P+"px)",...rn(p.value)>=1.5&&{willChange:"transform"}}:{position:c.value,left:A+"px",top:P+"px"}});let g;function C(){if(u.value==null||p.value==null)return;const b=r.value;Jo(u.value,p.value,{middleware:i.value,placement:l.value,strategy:s.value}).then(A=>{f.value=A.x,d.value=A.y,c.value=A.strategy,m.value=A.placement,y.value=A.middlewareData,x.value=b!==!1})}function h(){typeof g=="function"&&(g(),g=void 0)}function S(){if(h(),o===void 0){C();return}if(u.value!=null&&p.value!=null){g=o(u.value,p.value,C);return}}function v(){r.value||(x.value=!1)}return de([i,l,s,r],C,{flush:"sync"}),de([u,p],S,{flush:"sync"}),de(r,v,{flush:"sync"}),Bn()&&kn(h),{x:we(f),y:we(d),strategy:we(c),placement:we(m),middlewareData:we(y),isPositioned:we(x),floatingStyles:_,update:C}}const nr={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Yr,or]=Ce("PopperContent");var rr=k({inheritAttrs:!1,__name:"PopperContent",props:In({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...nr}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,r=Yt(),{forwardRef:i,currentElement:l}=me(),s=E(),a=E(),{width:u,height:p}=Kn(a),f=q(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),d=q(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),c=q(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=q(()=>({padding:d.value,boundary:c.value.filter(no),altBoundary:c.value.length>0})),y=q(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),x=gn(()=>[Ko({mainAxis:n.sideOffset+p.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),n.avoidCollisions&&Uo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Zo():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),Yo({...m.value,apply:({elements:T,rects:B,availableWidth:D,availableHeight:z})=>{const{width:F,height:W}=B.reference,M=T.floating.style;M.setProperty("--reka-popper-available-width",`${D}px`),M.setProperty("--reka-popper-available-height",`${z}px`),M.setProperty("--reka-popper-anchor-width",`${F}px`),M.setProperty("--reka-popper-anchor-height",`${W}px`)}}),a.value&&er({element:a.value,padding:n.arrowPadding}),oo({arrowWidth:u.value,arrowHeight:p.value}),n.hideWhenDetached&&Xo({strategy:"referenceHidden",...m.value})]),_=q(()=>n.reference??r.anchor.value),{floatingStyles:g,placement:C,isPositioned:h,middlewareData:S}=tr(_,s,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...T)=>jo(...T,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:x}),v=q(()=>et(C.value)[0]),b=q(()=>et(C.value)[1]);Ft(()=>{h.value&&o("placed")});const A=q(()=>{var B;const T=((B=S.value.arrow)==null?void 0:B.centerOffset)!==0;return n.hideShiftedArrow&&T}),P=E("");Le(()=>{l.value&&(P.value=window.getComputedStyle(l.value).zIndex)});const O=q(()=>{var T;return((T=S.value.arrow)==null?void 0:T.x)??0}),I=q(()=>{var T;return((T=S.value.arrow)==null?void 0:T.y)??0});return or({placedSide:v,onArrowChange:T=>a.value=T,arrowX:O,arrowY:I,shouldHideArrow:A}),(T,B)=>{var D,z,F;return $(),J("div",{ref_key:"floatingRef",ref:s,"data-reka-popper-content-wrapper":"",style:Nt({...w(g),transform:w(h)?w(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:P.value,"--reka-popper-transform-origin":[(D=w(S).transformOrigin)==null?void 0:D.x,(z=w(S).transformOrigin)==null?void 0:z.y].join(" "),...((F=w(S).hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[N(w(Y),ne({ref:w(i)},T.$attrs,{"as-child":n.asChild,as:T.as,"data-side":v.value,"data-align":b.value,style:{animation:w(h)?void 0:"none"}}),{default:R(()=>[V(T.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),ir=rr;function lr(e){const t=Mt({nonce:E()});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.nonce)==null?void 0:n.value)})}const sr=[" ","Enter","ArrowUp","ArrowDown"],ar=[" ","Enter"],j=10;function Me(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(o=>rt(o,t,n)):rt(e,t,n)}function rt(e,t,n){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof n=="function"?n(e,t):typeof n=="string"?(e==null?void 0:e[n])===(t==null?void 0:t[n]):Nn(e,t)}function ur(e){return e==null||e===""||Array.isArray(e)&&e.length===0}const cr={key:0,value:""},[ve,ln]=Ce("SelectRoot");var dr=k({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const n=e,o=t,{required:r,disabled:i,multiple:l,dir:s}=it(n),a=yt(n,"modelValue",o,{defaultValue:n.defaultValue??(l.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),u=yt(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0}),p=E(),f=E(),d=E({x:0,y:0}),c=q(()=>{var h;return l.value&&Array.isArray(a.value)?((h=a.value)==null?void 0:h.length)===0:wt(a.value)});Te({isProvider:!0});const m=zn(s),y=Wn(p),x=E(new Set),_=q(()=>Array.from(x.value).map(h=>h.value).join(";"));function g(h){if(l.value){const S=Array.isArray(a.value)?[...a.value]:[],v=S.findIndex(b=>rt(b,h,n.by));v===-1?S.push(h):S.splice(v,1),a.value=[...S]}else a.value=h}function C(h){return Array.from(x.value).find(S=>Me(h,S.value,n.by))}return ln({triggerElement:p,onTriggerChange:h=>{p.value=h},valueElement:f,onValueElementChange:h=>{f.value=h},contentId:"",modelValue:a,onValueChange:g,by:n.by,open:u,multiple:l,required:r,onOpenChange:h=>{u.value=h},dir:m,triggerPointerDownPosRef:d,disabled:i,isEmptyModelValue:c,optionsSet:x,onOptionAdd:h=>{const S=C(h.value);S&&x.value.delete(S),x.value.add(h)},onOptionRemove:h=>{const S=C(h.value);S&&x.value.delete(S)}}),(h,S)=>($(),L(w(Qn),null,{default:R(()=>[V(h.$slots,"default",{modelValue:w(a),open:w(u)}),w(y)&&h.name?($(),L(mr,{key:_.value,"aria-hidden":"true",tabindex:"-1",multiple:w(l),required:w(r),name:h.name,autocomplete:h.autocomplete,disabled:w(i),value:w(a)},{default:R(()=>[w(wt)(w(a))?($(),J("option",cr)):Ee("v-if",!0),($(!0),J(lt,null,zt(Array.from(x.value),v=>($(),J("option",ne({key:v.value??""},{ref_for:!0},v),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ee("v-if",!0)]),_:3}))}}),fr=dr,pr=k({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,n=E(),o=ve();de(()=>t.value,(i,l)=>{const s=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==l&&u&&n.value){const p=new Event("change",{bubbles:!0});u.call(n.value,i),n.value.dispatchEvent(p)}});function r(i){o.onValueChange(i.target.value)}return(i,l)=>($(),L(w(Gn),{"as-child":""},{default:R(()=>[xe("select",ne({ref_key:"selectElement",ref:n},t,{onInput:r}),[V(i.$slots,"default")],16)]),_:3}))}}),mr=pr,hr=k({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:j},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const n=st(e);return(o,r)=>($(),L(w(ir),ne(w(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:R(()=>[V(o.$slots,"default")]),_:3},16))}}),gr=hr;const vr={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[je,sn]=Ce("SelectContent");var yr=k({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=ve();Hn(),vn(n.bodyLock);const{CollectionSlot:i,getItems:l}=Te(),s=E();yn(s);const{search:a,handleTypeaheadSearch:u}=Ut(),p=E(),f=E(),d=E(),c=E(!1),m=E(!1),y=E(!1);function x(){f.value&&s.value&&xt([f.value,s.value])}de(c,()=>{x()});const{onOpenChange:_,triggerPointerDownPosRef:g}=r;Le(v=>{if(!s.value)return;let b={x:0,y:0};const A=O=>{var I,T;b={x:Math.abs(Math.round(O.pageX)-(((I=g.value)==null?void 0:I.x)??0)),y:Math.abs(Math.round(O.pageY)-(((T=g.value)==null?void 0:T.y)??0))}},P=O=>{var I;O.pointerType!=="touch"&&(b.x<=10&&b.y<=10?O.preventDefault():(I=s.value)!=null&&I.contains(O.target)||_(!1),document.removeEventListener("pointermove",A),g.value=null)};g.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",P,{capture:!0,once:!0})),v(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",P,{capture:!0})})});function C(v){const b=v.ctrlKey||v.altKey||v.metaKey;if(v.key==="Tab"&&v.preventDefault(),!b&&v.key.length===1&&u(v.key,l()),["ArrowUp","ArrowDown","Home","End"].includes(v.key)){let P=[...l().map(O=>O.ref)];if(["ArrowUp","End"].includes(v.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(v.key)){const O=v.target,I=P.indexOf(O);P=P.slice(I+1)}setTimeout(()=>xt(P)),v.preventDefault()}}const h=q(()=>n.position==="popper"?n:{}),S=st(h.value);return sn({content:s,viewport:p,onViewportChange:v=>{p.value=v},itemRefCallback:(v,b,A)=>{const P=!m.value&&!A,O=Me(r.modelValue.value,b,r.by);if(r.multiple.value){if(y.value)return;(O||P)&&(f.value=v,O&&(y.value=!0))}else(O||P)&&(f.value=v);P&&(m.value=!0)},selectedItem:f,selectedItemText:d,onItemLeave:()=>{var v;(v=s.value)==null||v.focus()},itemTextRefCallback:(v,b,A)=>{const P=!m.value&&!A;(Me(r.modelValue.value,b,r.by)||P)&&(d.value=v)},focusSelectedItem:x,position:n.position,isPositioned:c,searchRef:a}),(v,b)=>($(),L(w(i),null,{default:R(()=>[N(w(wn),{"as-child":"",onMountAutoFocus:b[6]||(b[6]=Oe(()=>{},["prevent"])),onUnmountAutoFocus:b[7]||(b[7]=A=>{var P;o("closeAutoFocus",A),!A.defaultPrevented&&((P=w(r).triggerElement.value)==null||P.focus({preventScroll:!0}),A.preventDefault())})},{default:R(()=>[N(w(xn),{"as-child":"","disable-outside-pointer-events":v.disableOutsidePointerEvents,onFocusOutside:b[2]||(b[2]=Oe(()=>{},["prevent"])),onDismiss:b[3]||(b[3]=A=>w(r).onOpenChange(!1)),onEscapeKeyDown:b[4]||(b[4]=A=>o("escapeKeyDown",A)),onPointerDownOutside:b[5]||(b[5]=A=>o("pointerDownOutside",A))},{default:R(()=>[($(),L(Dn(v.position==="popper"?gr:Cr),ne({...v.$attrs,...w(S)},{id:w(r).contentId,ref:A=>{if(!A)return;const P=w(Ve)(A);P!=null&&P.hasAttribute("data-reka-popper-content-wrapper")?s.value=P.firstElementChild:s.value=P},role:"listbox","data-state":w(r).open.value?"open":"closed",dir:w(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:b[0]||(b[0]=Oe(()=>{},["prevent"])),onPlaced:b[1]||(b[1]=A=>c.value=!0),onKeydown:C}),{default:R(()=>[V(v.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),wr=yr;const[xr,br]=Ce("SelectItemAlignedPosition");var Sr=k({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const n=e,o=t,{getItems:r}=Te(),i=ve(),l=je(),s=E(!1),a=E(!0),u=E(),{forwardRef:p,currentElement:f}=me(),{viewport:d,selectedItem:c,selectedItemText:m,focusSelectedItem:y}=l;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&f.value&&(d!=null&&d.value)&&(c!=null&&c.value)&&(m!=null&&m.value)){const C=i.triggerElement.value.getBoundingClientRect(),h=f.value.getBoundingClientRect(),S=i.valueElement.value.getBoundingClientRect(),v=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Z=v.left-h.left,re=S.left-Z,ae=C.left-re,ue=C.width+ae,Ue=Math.max(ue,h.width),Ye=window.innerWidth-j,Xe=Ct(re,j,Math.max(j,Ye-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.left=`${Xe}px`}else{const Z=h.right-v.right,re=window.innerWidth-S.right-Z,ae=window.innerWidth-C.right-re,ue=C.width+ae,Ue=Math.max(ue,h.width),Ye=window.innerWidth-j,Xe=Ct(re,j,Math.max(j,Ye-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.right=`${Xe}px`}const b=r().map(Z=>Z.ref),A=window.innerHeight-j*2,P=d.value.scrollHeight,O=window.getComputedStyle(f.value),I=Number.parseInt(O.borderTopWidth,10),T=Number.parseInt(O.paddingTop,10),B=Number.parseInt(O.borderBottomWidth,10),D=Number.parseInt(O.paddingBottom,10),z=I+T+P+D+B,F=Math.min(c.value.offsetHeight*5,z),W=window.getComputedStyle(d.value),M=Number.parseInt(W.paddingTop,10),K=Number.parseInt(W.paddingBottom,10),ye=C.top+C.height/2-j,un=A-ye,Ke=c.value.offsetHeight/2,cn=c.value.offsetTop+Ke,$e=I+T+cn,dn=z-$e;if($e<=ye){const Z=c.value===b.at(-1);u.value.style.bottom="0px";const re=f.value.clientHeight-d.value.offsetTop-d.value.offsetHeight,ae=Math.max(un,Ke+(Z?K:0)+re+B),ue=$e+ae;u.value.style.height=`${ue}px`}else{const Z=c.value===b[0];u.value.style.top="0px";const ae=Math.max(ye,I+d.value.offsetTop+(Z?M:0)+Ke)+dn;u.value.style.height=`${ae}px`,d.value.scrollTop=$e-ye+d.value.offsetTop}u.value.style.margin=`${j}px 0`,u.value.style.minHeight=`${F}px`,u.value.style.maxHeight=`${A}px`,o("placed"),requestAnimationFrame(()=>s.value=!0)}}const _=E("");he(async()=>{await Pe(),x(),f.value&&(_.value=window.getComputedStyle(f.value).zIndex)});function g(C){C&&a.value===!0&&(x(),y==null||y(),a.value=!1)}return bn(i.triggerElement,()=>{x()}),br({contentWrapper:u,shouldExpandOnScrollRef:s,onScrollButtonChange:g}),(C,h)=>($(),J("div",{ref_key:"contentWrapperElement",ref:u,style:Nt({display:"flex",flexDirection:"column",position:"fixed",zIndex:_.value})},[N(w(Y),ne({ref:w(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:R(()=>[V(C.$slots,"default")]),_:3},16)],4))}}),Cr=Sr,_r=k({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return ln(e.context),sn(vr),(n,o)=>V(n.$slots,"default")}}),Ar=_r;const Pr={key:1};var Or=k({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=jn(n,t),i=ve(),l=E();he(()=>{l.value=new DocumentFragment});const s=E(),a=q(()=>n.forceMount||i.open.value),u=E(a.value);let p;function f(){p&&(clearTimeout(p),p=void 0)}return de(a,(d,c,m)=>{f(),p=setTimeout(()=>{u.value=a.value,p=void 0}),m(f)}),Ht(f),(d,c)=>{var m;return a.value||u.value||(m=s.value)!=null&&m.present?($(),L(w(Sn),{key:0,ref_key:"presenceRef",ref:s,present:a.value},{default:R(()=>[N(wr,Wt(jt({...w(r),...d.$attrs})),{default:R(()=>[V(d.$slots,"default")]),_:3},16)]),_:3},8,["present"])):l.value?($(),J("div",Pr,[($(),L(Mn,{to:l.value},[N(Ar,{context:w(i)},{default:R(()=>[V(d.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ee("v-if",!0)}}}),Er=Or;const[an,qr]=Ce("SelectItem");var Rr=k({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{disabled:r}=it(n),i=ve(),l=je(),{forwardRef:s,currentElement:a}=me(),{CollectionItem:u}=Te(),p=q(()=>{var h;return Me((h=i.modelValue)==null?void 0:h.value,n.value,i.by)}),f=E(!1),d=E(n.textValue??""),c=Lt(void 0,"reka-select-item-text"),m="select.select";async function y(h){if(h.defaultPrevented)return;const S={originalEvent:h,value:n.value};Cn(m,x,S)}async function x(h){await Pe(),o("select",h),!h.defaultPrevented&&(r.value||(i.onValueChange(n.value),i.multiple.value||i.onOpenChange(!1)))}async function _(h){var S,v;await Pe(),!h.defaultPrevented&&(r.value?(S=l.onItemLeave)==null||S.call(l):(v=h.currentTarget)==null||v.focus({preventScroll:!0}))}async function g(h){var S;await Pe(),!h.defaultPrevented&&h.currentTarget===Vt()&&((S=l.onItemLeave)==null||S.call(l))}async function C(h){var v;await Pe(),!(h.defaultPrevented||((v=l.searchRef)==null?void 0:v.value)!==""&&h.key===" ")&&(ar.includes(h.key)&&y(h),h.key===" "&&h.preventDefault())}if(n.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return he(()=>{a.value&&l.itemRefCallback(a.value,n.value,n.disabled)}),qr({value:n.value,disabled:r,textId:c,isSelected:p,onItemTextChange:h=>{d.value=((d.value||(h==null?void 0:h.textContent))??"").trim()}}),(h,S)=>($(),L(w(u),{value:{textValue:d.value}},{default:R(()=>[N(w(Y),{ref:w(s),role:"option","aria-labelledby":w(c),"data-highlighted":f.value?"":void 0,"aria-selected":p.value,"data-state":p.value?"checked":"unchecked","aria-disabled":w(r)||void 0,"data-disabled":w(r)?"":void 0,tabindex:w(r)?void 0:-1,as:h.as,"as-child":h.asChild,onFocus:S[0]||(S[0]=v=>f.value=!0),onBlur:S[1]||(S[1]=v=>f.value=!1),onPointerup:y,onPointerdown:S[2]||(S[2]=v=>{v.currentTarget.focus({preventScroll:!0})}),onTouchend:S[3]||(S[3]=Oe(()=>{},["prevent","stop"])),onPointermove:_,onPointerleave:g,onKeydown:C},{default:R(()=>[V(h.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),Tr=Rr,$r=k({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=an();return(o,r)=>w(n).isSelected.value?($(),L(w(Y),ne({key:0,"aria-hidden":"true"},t),{default:R(()=>[V(o.$slots,"default")]),_:3},16)):Ee("v-if",!0)}}),Br=$r,kr=k({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=ve(),o=je(),r=an(),{forwardRef:i,currentElement:l}=me(),s=q(()=>{var a,u;return{value:r.value,disabled:r.disabled.value,textContent:((a=l.value)==null?void 0:a.textContent)??((u=r.value)==null?void 0:u.toString())??""}});return he(()=>{l.value&&(r.onItemTextChange(l.value),o.itemTextRefCallback(l.value,r.value,r.disabled.value),n.onOptionAdd(s.value))}),Ht(()=>{n.onOptionRemove(s.value)}),(a,u)=>($(),L(w(Y),ne({id:w(r).textId,ref:w(i)},{...t,...a.$attrs}),{default:R(()=>[V(a.$slots,"default")]),_:3},16,["id"]))}}),Ir=kr,Dr=k({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,o)=>($(),L(w(_n),Wt(jt(t)),{default:R(()=>[V(n.$slots,"default")]),_:3},16))}}),Mr=Dr,Vr=k({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=ve(),{forwardRef:o,currentElement:r}=me(),i=q(()=>{var d;return((d=n.disabled)==null?void 0:d.value)||t.disabled});n.contentId||(n.contentId=Lt(void 0,"reka-select-content")),he(()=>{n.onTriggerChange(r.value)});const{getItems:l}=Te(),{search:s,handleTypeaheadSearch:a,resetTypeahead:u}=Ut();function p(){i.value||(n.onOpenChange(!0),u())}function f(d){p(),n.triggerPointerDownPosRef.value={x:Math.round(d.pageX),y:Math.round(d.pageY)}}return(d,c)=>($(),L(w(to),{"as-child":"",reference:d.reference},{default:R(()=>{var m,y,x,_;return[N(w(Y),{ref:w(o),role:"combobox",type:d.as==="button"?"button":void 0,"aria-controls":w(n).contentId,"aria-expanded":w(n).open.value||!1,"aria-required":(m=w(n).required)==null?void 0:m.value,"aria-autocomplete":"none",disabled:i.value,dir:(y=w(n))==null?void 0:y.dir.value,"data-state":(x=w(n))!=null&&x.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":w(ur)((_=w(n).modelValue)==null?void 0:_.value)?"":void 0,"as-child":d.asChild,as:d.as,onClick:c[0]||(c[0]=g=>{var C;(C=g==null?void 0:g.currentTarget)==null||C.focus()}),onPointerdown:c[1]||(c[1]=g=>{if(g.pointerType==="touch")return g.preventDefault();const C=g.target;C.hasPointerCapture(g.pointerId)&&C.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(f(g),g.preventDefault())}),onPointerup:c[2]||(c[2]=Oe(g=>{g.pointerType==="touch"&&f(g)},["prevent"])),onKeydown:c[3]||(c[3]=g=>{const C=w(s)!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&C&&g.key===" "||(w(a)(g.key,w(l)()),w(sr).includes(g.key)&&(p(),g.preventDefault()))})},{default:R(()=>[V(d.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),Lr=Vr,Fr=k({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:n}=it(t),o=lr(n),r=je(),i=r.position==="item-aligned"?xr():void 0,{forwardRef:l,currentElement:s}=me();he(()=>{r==null||r.onViewportChange(s.value)});const a=E(0);function u(p){const f=p.currentTarget,{shouldExpandOnScrollRef:d,contentWrapper:c}=i??{};if(d!=null&&d.value&&(c!=null&&c.value)){const m=Math.abs(a.value-f.scrollTop);if(m>0){const y=window.innerHeight-j*2,x=Number.parseFloat(c.value.style.minHeight),_=Number.parseFloat(c.value.style.height),g=Math.max(x,_);if(g<y){const C=g+m,h=Math.min(y,C),S=C-h;c.value.style.height=`${h}px`,c.value.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,c.value.style.justifyContent="flex-end")}}}a.value=f.scrollTop}return(p,f)=>($(),J(lt,null,[N(w(Y),ne({ref:w(l),"data-reka-select-viewport":"",role:"presentation"},{...p.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:R(()=>[V(p.$slots,"default")]),_:3},16),N(w(Y),{as:"style",nonce:w(o)},{default:R(()=>f[0]||(f[0]=[Kt(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),Nr=Fr;const zr={class:"selm-value"},Hr={key:0,class:"selm-hint"},Xr=k({__name:"SelectMenu",props:Ln({options:{},label:{},disabled:{type:Boolean},placeholder:{},id:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Vn(e,"modelValue");return(n,o)=>($(),L(w(fr),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=r=>t.value=r),disabled:e.disabled},{default:R(()=>[N(w(Lr),{id:e.id,class:"selm-trigger","aria-label":e.label},{default:R(()=>{var r;return[xe("span",zr,Ge(((r=e.options.find(i=>i.value===t.value))==null?void 0:r.label)??e.placeholder??"—"),1),o[1]||(o[1]=xe("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true",class:"selm-caret"},[xe("path",{d:"m6 9 6 6 6-6",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))]}),_:1},8,["id","aria-label"]),N(w(Mr),null,{default:R(()=>[N(w(Er),{class:"selm-list",position:"popper","side-offset":6},{default:R(()=>[N(w(Nr),null,{default:R(()=>[($(!0),J(lt,null,zt(e.options,r=>($(),L(w(Tr),{key:r.value,value:r.value,class:"selm-opt"},{default:R(()=>[N(w(Ir),null,{default:R(()=>[Kt(Ge(r.label),1)]),_:2},1024),r.hint?($(),J("span",Hr,Ge(r.hint),1)):Ee("",!0),N(w(Br),{class:"selm-tick"},{default:R(()=>[...o[2]||(o[2]=[xe("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},[xe("path",{d:"m5 13 4 4L19 7",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","disabled"]))}});export{Xr as _};
|
|
2
|
-
//# sourceMappingURL=SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as w,c as r,a as t,i as p,v as f,u as s,Q as o,f as n,e as d,w as v,_ as c,F as V,g as b,t as u,y as a,r as C,C as E,a2 as x,N as B,o as m}from"./index-D8OAewba.js";import{_ as k}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./Teleport-0BmaJsBF.js";const N={class:"panel"},T={class:"field"},U={class:"mute hint"},A={class:"field"},S={class:"mute hint"},_={class:"row",style:{gap:"8px","margin-top":"4px"}},D=["disabled"],F={key:0,class:"mute"},L={key:1,class:"bad"},R={class:"panel"},M={class:"field"},q={class:"field"},H=w({__name:"SettingsView",setup(I){const i=C(!1),y=E(()=>{var h;return((h=a.health)==null?void 0:h.authEnforced)??null});async function g(){i.value=!0;try{await x(),B(a.healthError?"error":"ok",a.healthError||"Control plane reachable")}finally{i.value=!1}}return(h,e)=>(m(),r("div",null,[e[16]||(e[16]=t("div",{class:"page-head"},[t("div",null,[t("h1",null,"Settings"),t("div",{class:"sub"},"Stored in this browser only. Nothing here is sent to the server.")])],-1)),t("section",N,[e[11]||(e[11]=t("h2",{class:"phead-title"},"Connection",-1)),t("div",T,[e[6]||(e[6]=t("label",{for:"apiBase"},"API base URL",-1)),p(t("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=l=>s(o).apiBase=l),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[f,s(o).apiBase,void 0,{trim:!0}]]),t("div",U,[e[5]||(e[5]=n(" Leave it empty unless you are pointing this page at another host. ",-1)),d(c,{label:"about the API base URL"},{default:v(()=>[...e[4]||(e[4]=[n(" Empty means same-origin, which is how the control stack serves this page — the browser never makes a cross-origin request, so there is no CORS to configure. Set an absolute URL only for a development session against a remote host. ",-1)])]),_:1})])]),t("div",A,[e[8]||(e[8]=t("label",{for:"token"},"Access token",-1)),p(t("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=l=>s(o).token=l),type:"password",autocomplete:"off",spellcheck:"false",placeholder:"paste the token from pstack init"},null,512),[[f,s(o).token,void 0,{trim:!0}]]),t("div",S,[e[7]||(e[7]=n(" Authenticates every request — signing in with an account does the same job, so set this only for token-based access (the machine token, or a personal token from your account). ",-1)),y.value===!1?(m(),r(V,{key:0},[n(" This server is not asking for one — it only accepts connections from this machine, so a token here is harmless but unnecessary. ")],64)):b("",!0)])]),t("div",_,[t("button",{class:"btn",disabled:i.value,onClick:g},u(i.value?"Checking…":"Test connection"),9,D),s(a).health?(m(),r("span",F,[n(" Connected to pstack "+u(s(a).health.version)+" ",1),d(c,{label:"where data is stored"},{default:v(()=>[e[9]||(e[9]=n(" Deployment records and stored specs live in ",-1)),t("code",null,u(s(a).health.dataDir),1),e[10]||(e[10]=n(" on the host. ",-1))]),_:1})])):s(a).healthError?(m(),r("span",L,u(s(a).healthError),1)):b("",!0)])]),t("section",R,[e[15]||(e[15]=t("h2",{class:"phead-title"},"Appearance",-1)),t("div",M,[e[12]||(e[12]=t("label",{for:"theme"},"Theme",-1)),d(k,{modelValue:s(o).theme,"onUpdate:modelValue":e[2]||(e[2]=l=>s(o).theme=l),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),t("div",q,[e[13]||(e[13]=t("label",{for:"motion"},"Motion",-1)),d(k,{modelValue:s(o).motion,"onUpdate:modelValue":e[3]||(e[3]=l=>s(o).motion=l),id:"motion",label:"Motion",options:[{value:"system",label:"Follow the system"},{value:"full",label:"Always animate"},{value:"none",label:"No animation"}]},null,8,["modelValue"]),e[14]||(e[14]=t("div",{class:"mute hint"}," “Follow the system” uses your device's reduce-motion setting. The other two override it, in either direction. ",-1))])])]))}});export{H as default};
|
|
2
|
-
//# sourceMappingURL=SettingsView-Cqsv0chw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsView-Cqsv0chw.js","sources":["../../src/views/SettingsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Settings: where the API is, how to authenticate to it, and how the app looks.\n *\n * Everything here is client-side and persisted to localStorage by `useSettings` — nothing is sent\n * to the server, and there is nothing to save. Bindings write through immediately.\n */\nimport { computed, ref } from 'vue';\nimport { settings } from '../composables/useSettings';\nimport { state, loadHealth } from '../composables/useControlPlane';\nimport { toast } from '../composables/useToasts';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst checking = ref(false);\n\n/**\n * The server tells us whether it enforces auth. When it does not, it is bound to loopback and a\n * token would be pointless — worth saying, so nobody hunts for one that was never issued.\n */\nconst authEnforced = computed(() => state.health?.authEnforced ?? null);\n\nasync function recheck(): Promise<void> {\n checking.value = true;\n try {\n await loadHealth();\n toast(state.healthError ? 'error' : 'ok', state.healthError || 'Control plane reachable');\n } finally {\n checking.value = false;\n }\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Settings</h1>\n <div class=\"sub\">Stored in this browser only. Nothing here is sent to the server.</div>\n </div>\n </div>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Connection</h2>\n\n <div class=\"field\">\n <label for=\"apiBase\">API base URL</label>\n <input\n id=\"apiBase\"\n v-model.trim=\"settings.apiBase\"\n type=\"url\"\n spellcheck=\"false\"\n placeholder=\"(same origin)\"\n />\n <div class=\"mute hint\">\n Leave it empty unless you are pointing this page at another host.\n <InfoHint label=\"about the API base URL\">\n Empty means same-origin, which is how the control stack serves this page — the browser\n never makes a cross-origin request, so there is no CORS to configure. Set an absolute\n URL only for a development session against a remote host.\n </InfoHint>\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"token\">Access token</label>\n <input\n id=\"token\"\n v-model.trim=\"settings.token\"\n type=\"password\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n placeholder=\"paste the token from pstack init\"\n />\n <div class=\"mute hint\">\n Authenticates every request — signing in with an account does the same job, so set this\n only for token-based access (the machine token, or a personal token from your account).\n <template v-if=\"authEnforced === false\">\n This server is not asking for one — it only accepts connections from this machine, so a\n token here is harmless but unnecessary.\n </template>\n </div>\n </div>\n\n <div class=\"row\" style=\"gap: 8px; margin-top: 4px\">\n <button class=\"btn\" :disabled=\"checking\" @click=\"recheck\">\n {{ checking ? 'Checking…' : 'Test connection' }}\n </button>\n <span v-if=\"state.health\" class=\"mute\">\n Connected to pstack {{ state.health.version }}\n <InfoHint label=\"where data is stored\">\n Deployment records and stored specs live in\n <code>{{ state.health.dataDir }}</code> on the host.\n </InfoHint>\n </span>\n <span v-else-if=\"state.healthError\" class=\"bad\">{{ state.healthError }}</span>\n </div>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Appearance</h2>\n\n <div class=\"field\">\n <label for=\"theme\">Theme</label>\n <SelectMenu\n v-model=\"settings.theme\" id=\"theme\"\n label=\"Theme\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'dark', label: 'Dark' },\n { value: 'light', label: 'Light' },\n ]\"\n />\n </div>\n\n <div class=\"field\">\n <label for=\"motion\">Motion</label>\n <SelectMenu\n v-model=\"settings.motion\" id=\"motion\"\n label=\"Motion\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'full', label: 'Always animate' },\n { value: 'none', label: 'No animation' },\n ]\"\n />\n <div class=\"mute hint\">\n “Follow the system” uses your device's reduce-motion setting. The other two override it,\n in either direction.\n </div>\n </div>\n </section>\n </div>\n</template>\n"],"names":["checking","ref","authEnforced","computed","_a","state","recheck","loadHealth","toast","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","$event","_unref","settings","_hoisted_3","_createVNode","InfoHint","_hoisted_4","_hoisted_5","_Fragment","_hoisted_6","_hoisted_7","_openBlock","_hoisted_8","_createTextVNode","_toDisplayString","_hoisted_9","_hoisted_10","_hoisted_11","Select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AA,EAAQ,QAAK,EAAA,GACxBQ,EAQIc,EAAA,CAPS,WAAAjB,EAAAC,CAAA,EAAS,MAAT,sBAAAJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAC,CAAA,EAAS,MAAKF,GAAE,GAAG,QAC5B,MAAM,QACL,QAAS,sGAIT,2BAIPJ,EAeM,MAfNuB,EAeM,CAdJrB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAkC,QAAA,CAA3B,IAAI,QAAA,EAAS,SAAM,EAAA,GAC1BQ,EAQIc,EAAA,CAPS,WAAAjB,EAAAC,CAAA,EAAS,OAAT,sBAAAJ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAC,CAAA,EAAS,OAAMF,GAAE,GAAG,SAC7B,MAAM,SACL,QAAS,sHAIT,yBAELF,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAGM,MAAA,CAHD,MAAM,aAAY,kHAGvB,EAAA,EAAA"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import{d as X,r as f,A as I,H as j,c as n,a as t,t as v,f as s,e as p,w as m,_ as V,F as R,g as y,E as G,i as A,v as N,$ as O,s as J,x as Q,C as T,j as Y,o as a,l as Z,O as _,N as ee,B as te,S as D}from"./index-D8OAewba.js";import{a as se,w as oe,p as F,r as le}from"./useVars-VN9gYdR6.js";import{_ as ae}from"./ActionButton.vue_vue_type_script_setup_true_lang-DjO5RzbR.js";import{_ as ne}from"./ErrorNote.vue_vue_type_script_setup_true_lang-D28UQmNR.js";import{_ as ie}from"./VarEditor.vue_vue_type_script_setup_true_lang-FaBOeld_.js";import{_ as re}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CLqZAezG.js";import"./Teleport-0BmaJsBF.js";const de={class:"page-head"},ue={class:"sub"},pe={class:"panel"},ve={class:"dim"},me={key:0,class:"banner warn"},ye={key:0},ce={key:1},fe={key:2},he={key:3},ke={key:2,class:"banner warn"},be={class:"row",style:{"margin-bottom":"var(--s4)"}},ge={class:"field",style:{"max-width":"280px"}},we={class:"mute",style:{"align-self":"end","padding-bottom":"10px"}},Se={key:3,class:"row",style:{"margin-bottom":"var(--s4)"}},xe={class:"check"},Ce={class:"check"},$e={class:"field",style:{"max-width":"340px"}},Ve={key:0,class:"hint"},Re={key:0},Ae={key:1},Te={key:2},Le={class:"field"},Ee={class:"field",style:{"margin-top":"var(--s3)"}},Ue={class:"hint"},Ie={class:"hint"},Ne={class:"row",style:{"margin-top":"var(--s5)"}},Pe={key:0,class:"s-ok"},We={key:6,class:"banner warn"},je={key:0},Oe=`version: 1
|
|
2
|
-
kind: isolated
|
|
3
|
-
|
|
4
|
-
# The stack identity: the compose project name, and $STACK inside every hook.
|
|
5
|
-
# \${PR} is interpolated ONCE, at resolve time, from the variables sent with the request.
|
|
6
|
-
stack: pr-\${PR}
|
|
7
|
-
|
|
8
|
-
env:
|
|
9
|
-
PREVIEW_DOMAIN: preview.example.com
|
|
10
|
-
|
|
11
|
-
compose:
|
|
12
|
-
file: compose.yml
|
|
13
|
-
# Every service sits behind a profile so a bare \`up\` starts nothing.
|
|
14
|
-
# \`down\` always enables ALL of them — otherwise the unselected profiles' network leaks.
|
|
15
|
-
profiles: [app]
|
|
16
|
-
|
|
17
|
-
requires:
|
|
18
|
-
- name: traefik-network
|
|
19
|
-
assert: docker network inspect traefik >/dev/null 2>&1
|
|
20
|
-
hint: run \`pstack init\` on the host first
|
|
21
|
-
|
|
22
|
-
axes:
|
|
23
|
-
# Hooks run from the deployment directory, which holds only spec.yml and compose.yml —
|
|
24
|
-
# so use inline shell or absolute paths, never ./hooks/foo.sh.
|
|
25
|
-
- name: scratch
|
|
26
|
-
up: mkdir -p /tmp/$STACK
|
|
27
|
-
assert_live: test -d /tmp/$STACK
|
|
28
|
-
down: rm -rf /tmp/$STACK
|
|
29
|
-
# assert_gone MUST FAIL CLOSED. A bare \`! <probe>\` reports "gone" whenever the probe fails
|
|
30
|
-
# for any reason — a missing CLI, an expired token — turning "I could not tell" into
|
|
31
|
-
# "it is gone", a false negative on the one thing this tool exists to catch.
|
|
32
|
-
assert_gone: |
|
|
33
|
-
test -d /tmp || exit 1
|
|
34
|
-
! test -d /tmp/$STACK
|
|
35
|
-
`,De=`services:
|
|
36
|
-
app:
|
|
37
|
-
image: nginx:alpine
|
|
38
|
-
profiles: [app]
|
|
39
|
-
labels:
|
|
40
|
-
- traefik.enable=true
|
|
41
|
-
`,Xe=X({__name:"SubmitView",props:{id:{}},setup(P){const L=P,l=f({id:L.id??"",spec:"",compose:""}),h=f([{k:"",v:""}]),k=f("inline"),w=f(""),S=f(!1),g=f(""),u=f(null),x=f([]),M=T(()=>[{value:"",label:"— choose —"},...x.value.map(o=>({value:o.name,label:o.name,hint:o.kind}))]);I.get("/api/specs").then(o=>{o.ok&&Array.isArray(o.body.specs)&&(x.value=o.body.specs)});const C=T(()=>x.value.find(o=>o.name===w.value)),E=T(()=>!!L.id),q=Z(),$=T(()=>{const o=q.query.from;return typeof o=="string"&&o?o:null}),c=f("idle"),b=f(null);async function W(o){c.value="loading",b.value=null;const e=await I.getAuthed(`/api/deployments/${encodeURIComponent(o)}/source`);if(e.status===404||!e.ok){c.value="failed";return}if(e.body.sourceWithheld){c.value="withheld",e.body.specName&&(b.value=e.body.specName);return}l.value.spec||(l.value.spec=e.body.spec??""),l.value.compose||(l.value.compose=e.body.compose??""),e.body.specName&&(b.value=e.body.specName),c.value="loaded"}j($,async o=>{var r;if(!o||L.id)return;g.value="",u.value=null,l.value.spec="",l.value.compose="";const e=(r=D(o))==null?void 0:r.vars;e&&(h.value=F(e)),await W(o),l.value.id=""},{immediate:!0}),j(()=>L.id,o=>{var d;if(g.value="",u.value=null,c.value="idle",b.value=null,!o)return;o!==l.value.id&&(l.value.spec="",l.value.compose=""),l.value.id=o;const e=(d=D(o))==null?void 0:d.vars,r=e?F(e):le(o);r.some(U=>U.k)&&(h.value=r),W(o)},{immediate:!0});const B=T(()=>!!l.value.id&&(k.value==="stored"?!!w.value:!!l.value.spec.trim())&&!S.value);async function K(){S.value=!0,g.value="",u.value=null;const o=l.value.id,e=se(h.value),r={vars:e,env:e};k.value==="stored"?r.specName=w.value:(r.spec=l.value.spec,l.value.compose.trim()&&(r.compose=l.value.compose));const d=await I.put(`/api/deployments/${encodeURIComponent(o)}`,r);if(S.value=!1,d.status===200||d.status===201){u.value={id:d.body.id??o,stack:d.body.stack??"?",created:d.status===201,stackSharedWith:d.body.stackSharedWith},oe(o,h.value),_(),ee("ok",`${d.status===201?"Created":"Replaced"} ${o} → ${u.value.stack}`,{to:`/deployments/${encodeURIComponent(o)}`,toLabel:"Open"});return}g.value=te(d,"save this deployment")}function z(){k.value="inline",l.value.spec=Oe,l.value.compose.trim()||(l.value.compose=De),l.value.id||(l.value.id="pr-123"),h.value.some(o=>o.k)||(h.value=[{k:"PR",v:"123"}])}return(o,e)=>{var d,U;const r=Y("RouterLink");return a(),n("div",null,[t("div",de,[t("div",null,[t("h1",null,v(E.value?"Edit a deployment":$.value?"Duplicate a deployment":"Submit a deployment"),1),t("div",ue,v(E.value?"Loaded from what is stored; saving replaces the record":$.value?`Copied from ${$.value} — give it a new id, then edit`:"Stores a spec so it can be deployed"),1)]),e[7]||(e[7]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost",onClick:z},"Load example spec")]),t("section",pe,[t("p",ve,[e[9]||(e[9]=s(" Nothing is saved until the spec is valid. ",-1)),p(V,{label:"what happens on a rejected submission"},{default:m(()=>[...e[8]||(e[8]=[s(" The spec is checked before anything is written, so a rejected submission leaves nothing behind — and a replace never destroys a good record over a typo. Whether the deployment is shared or isolated comes from the spec, not from this form. ",-1)])]),_:1})]),$.value&&!E.value?(a(),n("div",me,[e[22]||(e[22]=t("b",null,"Change the stack, not just the id.",-1)),t("p",null,[e[13]||(e[13]=s(" Two deployments that resolve to the same ",-1)),e[14]||(e[14]=t("code",null,"stack",-1)),e[15]||(e[15]=s(" drive the same compose project — ",-1)),e[16]||(e[16]=t("code",null,"down",-1)),e[17]||(e[17]=s(" on either stops the other's containers. If the stack interpolates a variable (",-1)),e[18]||(e[18]=t("code",null,"pr-${PR}",-1)),e[19]||(e[19]=s(") give it a different value below; if it is a literal, edit the ",-1)),e[20]||(e[20]=t("code",null,"stack:",-1)),e[21]||(e[21]=s(" line. ",-1)),c.value==="withheld"?(a(),n(R,{key:0},[e[11]||(e[11]=s(" The spec could not be copied without an access token — ",-1)),p(r,{to:"/settings"},{default:m(()=>[...e[10]||(e[10]=[s("add yours",-1)])]),_:1}),e[12]||(e[12]=s(". ",-1))],64)):y("",!0)])])):y("",!0),E.value?(a(),n("div",{key:1,class:G(["banner",c.value==="loaded"?"info":"warn"])},[t("b",null,"Replacing "+v(P.id)+".",1),c.value==="loading"?(a(),n("p",ye,"Loading what is stored…")):c.value==="loaded"?(a(),n("p",ce," Loaded from the stored record — edit it and save. Saving replaces the record outright, so anything you delete here stops being tracked while whatever it created keeps running. ")):c.value==="withheld"?(a(),n("p",fe,[e[24]||(e[24]=s(" The stored spec was not loaded: reading it needs an access token, because hooks routinely carry a credential inline. ",-1)),p(r,{to:"/settings"},{default:m(()=>[...e[23]||(e[23]=[s("Add your token",-1)])]),_:1}),e[25]||(e[25]=s(" to edit in place — otherwise paste the ",-1)),e[26]||(e[26]=t("b",null,"complete",-1)),e[27]||(e[27]=s(" spec, since anything you leave out stops being tracked. ",-1))])):(a(),n("p",he,[...e[28]||(e[28]=[s(" The stored spec could not be loaded, so this form is empty. Paste the ",-1),t("b",null,"complete",-1),s(" spec you want stored — anything you leave out stops being tracked while whatever it created keeps running. ",-1)])]))],2)):y("",!0),b.value?(a(),n("div",ke,[t("b",null,"This deployment tracks the stored spec “"+v(b.value)+"”.",1),t("p",null,[e[30]||(e[30]=s(" Saving here writes a private copy and stops it following that spec. To change every deployment using it, edit ",-1)),p(r,{to:`/specs/${encodeURIComponent(b.value)}`},{default:m(()=>[...e[29]||(e[29]=[s("the spec",-1)])]),_:1},8,["to"]),e[31]||(e[31]=s(" instead. ",-1))])])):y("",!0),t("div",be,[t("div",ge,[e[32]||(e[32]=t("label",{for:"did"},"Deployment id",-1)),A(t("input",{id:"did","onUpdate:modelValue":e[0]||(e[0]=i=>l.value.id=i),type:"text",placeholder:"pr-123",spellcheck:"false",autocomplete:"off"},null,512),[[N,l.value.id,void 0,{trim:!0}]])]),t("span",we,[e[34]||(e[34]=s(" Lower case ",-1)),p(V,{label:"allowed characters in a deployment id"},{default:m(()=>[...e[33]||(e[33]=[s(" Starts with a letter or digit, then letters, digits, dot, dash or underscore. Up to 64 characters — ",-1),t("code",null,"[a-z0-9][a-z0-9._-]{0,63}",-1),s(". ",-1)])]),_:1})])]),x.value.length?(a(),n("div",Se,[t("label",xe,[A(t("input",{"onUpdate:modelValue":e[1]||(e[1]=i=>k.value=i),type:"radio",value:"inline"},null,512),[[O,k.value]]),e[35]||(e[35]=s(" inline spec ",-1))]),t("label",Ce,[A(t("input",{"onUpdate:modelValue":e[2]||(e[2]=i=>k.value=i),type:"radio",value:"stored"},null,512),[[O,k.value]]),e[36]||(e[36]=s(" reference a stored spec ",-1))])])):y("",!0),k.value==="stored"&&x.value.length?(a(),n(R,{key:4},[t("div",$e,[e[37]||(e[37]=t("label",{for:"sn"},"Stored spec",-1)),p(re,{modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=i=>w.value=i),id:"sn",label:"Stored spec",options:M.value},null,8,["modelValue","options"])]),C.value?(a(),n("p",Ve,[C.value.description?(a(),n("span",Re,v(C.value.description)+" — ",1)):y("",!0),e[39]||(e[39]=s(" needs ",-1)),C.value.requiredVars.length?(a(),n("b",Ae,v(C.value.requiredVars.join(", ")),1)):(a(),n("span",Te,"no variables")),e[40]||(e[40]=s(". ",-1)),p(V,{label:"why variables are required"},{default:m(()=>[...e[38]||(e[38]=[s(" A missing variable is refused by name. It is never filled in with a blank, which would silently give every deployment the same stack name. ",-1)])]),_:1})])):y("",!0)],64)):(a(),n(R,{key:5},[t("div",Le,[e[41]||(e[41]=t("label",{for:"spec"},"spec.yml",-1)),A(t("textarea",{id:"spec","onUpdate:modelValue":e[4]||(e[4]=i=>l.value.spec=i),rows:"18",spellcheck:"false",placeholder:`version: 1
|
|
42
|
-
kind: isolated
|
|
43
|
-
stack: pr-\${PR}
|
|
44
|
-
axes: []`},null,512),[[N,l.value.spec]])]),t("div",Ee,[e[42]||(e[42]=t("label",{for:"compose"},[s("compose.yml "),t("span",{class:"mute"},"(optional)")],-1)),A(t("textarea",{id:"compose","onUpdate:modelValue":e[5]||(e[5]=i=>l.value.compose=i),rows:"8",spellcheck:"false",placeholder:"Written next to spec.yml, so a compose file named compose.yml resolves"},null,512),[[N,l.value.compose]])]),t("p",Ue,[e[44]||(e[44]=s(" Hooks must be inline shell or an absolute path. ",-1)),p(V,{label:"why a relative script path does not work"},{default:m(()=>[...e[43]||(e[43]=[s(" A deployment directory only ever holds ",-1),t("code",null,"spec.yml",-1),s(" and ",-1),t("code",null,"compose.yml",-1),s(", and hooks run from there — so ",-1),t("code",null,"up: ./hooks/db.sh",-1),s(" has nothing to find. ",-1)])]),_:1})])],64)),e[55]||(e[55]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Variables",-1)),p(ie,{modelValue:h.value,"onUpdate:modelValue":e[6]||(e[6]=i=>h.value=i)},null,8,["modelValue"]),t("p",Ie,[e[46]||(e[46]=s(" Saved with the deployment, so tearing it down later targets the same stack. ",-1)),p(V,{label:"how variables are remembered"},{default:m(()=>[...e[45]||(e[45]=[s(" They are stored on the server where it supports that, and in this browser either way — so the actions on the deployment page send exactly these values. ",-1)])]),_:1})]),t("div",Ne,[p(ae,{variant:"primary",pending:S.value,disabled:!B.value,onClick:K},{default:m(()=>[s(v(S.value?"submitting…":"Submit"),1)]),_:1},8,["pending","disabled"]),u.value?(a(),n("span",Pe,[s(v(u.value.created?"Created":"Replaced")+" — stack ",1),t("b",null,v(u.value.stack),1),p(r,{to:`/deployments/${encodeURIComponent(u.value.id)}`,style:{"margin-left":"8px"}},{default:m(()=>[...e[47]||(e[47]=[s(" open → ",-1)])]),_:1},8,["to"])])):y("",!0)]),(U=(d=u.value)==null?void 0:d.stackSharedWith)!=null&&U.length?(a(),n("div",We,[t("b",null,"Another deployment already resolves to stack “"+v(u.value.stack)+"”.",1),t("p",null,[(a(!0),n(R,null,J(u.value.stackSharedWith,(i,H)=>(a(),n(R,{key:i},[p(r,{to:`/deployments/${encodeURIComponent(i)}`},{default:m(()=>[s(v(i),1)]),_:2},1032,["to"]),H<u.value.stackSharedWith.length-1?(a(),n("span",je,", ")):y("",!0)],64))),128)),e[48]||(e[48]=s("— both records now drive the same compose project, so ",-1)),e[49]||(e[49]=t("code",null,"down",-1)),e[50]||(e[50]=s(" on either stops the other's containers and ",-1)),e[51]||(e[51]=t("code",null,"verify",-1)),e[52]||(e[52]=s(" on either reports the other's leaks. If that was not intended, change this one's ",-1)),e[53]||(e[53]=t("code",null,"stack",-1)),e[54]||(e[54]=s(" and save again. ",-1))])])):y("",!0),g.value?(a(),Q(ne,{key:7,text:g.value,title:"The server rejected this submission."},null,8,["text"])):y("",!0)])])}}});export{Xe as default};
|
|
45
|
-
//# sourceMappingURL=SubmitView-CufYXtWD.js.map
|