@samyx/preview-stacks-ui 0.22.0 → 0.25.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-D06apM-6.js → ActionButton.vue_vue_type_script_setup_true_lang-D5wrEmB2.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-D06apM-6.js.map → ActionButton.vue_vue_type_script_setup_true_lang-D5wrEmB2.js.map} +1 -1
- package/dist/assets/{AxesTab-CCB3wdSX.js → AxesTab-DPb0krkI.js} +2 -2
- package/dist/assets/{AxesTab-CCB3wdSX.js.map → AxesTab-DPb0krkI.js.map} +1 -1
- package/dist/assets/{ConfigTab-Cyqzeq3C.js → ConfigTab-DLhjDiis.js} +2 -2
- package/dist/assets/{ConfigTab-Cyqzeq3C.js.map → ConfigTab-DLhjDiis.js.map} +1 -1
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-HglPeTkY.js +2 -0
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-CtwJE2eJ.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-HglPeTkY.js.map} +1 -1
- package/dist/assets/{DangerTab-Cdr9luUy.js → DangerTab-BLDIlbN5.js} +2 -2
- package/dist/assets/{DangerTab-Cdr9luUy.js.map → DangerTab-BLDIlbN5.js.map} +1 -1
- package/dist/assets/DashboardView-DxZUkxRF.js +2 -0
- package/dist/assets/DashboardView-DxZUkxRF.js.map +1 -0
- package/dist/assets/DeploymentDetailView-CEg8sA5I.js +2 -0
- package/dist/assets/DeploymentDetailView-CEg8sA5I.js.map +1 -0
- package/dist/assets/DeploymentsView-BfhwFiiQ.js +2 -0
- package/dist/assets/DeploymentsView-BfhwFiiQ.js.map +1 -0
- package/dist/assets/{EquivalentCommand-NHzDrg5d.js → EquivalentCommand-C45BzkNz.js} +3 -3
- package/dist/assets/{EquivalentCommand-NHzDrg5d.js.map → EquivalentCommand-C45BzkNz.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js → ErrorNote.vue_vue_type_script_setup_true_lang-B3hfwyPR.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-B3hfwyPR.js.map} +1 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-BSOuxyyP.js +2 -0
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-DwwXY7EX.js.map → HelpModal.vue_vue_type_script_setup_true_lang-BSOuxyyP.js.map} +1 -1
- package/dist/assets/JobDetailView-HFOJln2b.js +2 -0
- package/dist/assets/{JobDetailView-BsCnnkPz.js.map → JobDetailView-HFOJln2b.js.map} +1 -1
- package/dist/assets/JobsView-dWw_uNGE.js +2 -0
- package/dist/assets/JobsView-dWw_uNGE.js.map +1 -0
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-7Ggcxz1R.js → LogViewer.vue_vue_type_script_setup_true_lang-5r84oNls.js} +3 -3
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-7Ggcxz1R.js.map → LogViewer.vue_vue_type_script_setup_true_lang-5r84oNls.js.map} +1 -1
- package/dist/assets/{LoginView-Bj7uMFvv.js → LoginView-0vIrAhlr.js} +2 -2
- package/dist/assets/{LoginView-Bj7uMFvv.js.map → LoginView-0vIrAhlr.js.map} +1 -1
- package/dist/assets/{LogsTab-DRp76oC1.js → LogsTab-CFlgBsW3.js} +4 -4
- package/dist/assets/{LogsTab-DRp76oC1.js.map → LogsTab-CFlgBsW3.js.map} +1 -1
- package/dist/assets/{NotFoundView-D-A8YFJw.js → NotFoundView-jZIc0wDm.js} +2 -2
- package/dist/assets/{NotFoundView-D-A8YFJw.js.map → NotFoundView-jZIc0wDm.js.map} +1 -1
- package/dist/assets/NotifiersView-DJu-c-a6.js +2 -0
- package/dist/assets/NotifiersView-DJu-c-a6.js.map +1 -0
- package/dist/assets/{OverviewTab-jE_kOZI7.js → OverviewTab-DlJt0MIg.js} +2 -2
- package/dist/assets/{OverviewTab-jE_kOZI7.js.map → OverviewTab-DlJt0MIg.js.map} +1 -1
- package/dist/assets/RefreshButton.vue_vue_type_script_setup_true_lang-CXCY3Vlc.js +2 -0
- package/dist/assets/RefreshButton.vue_vue_type_script_setup_true_lang-CXCY3Vlc.js.map +1 -0
- package/dist/assets/RegistriesView-BeiFx468.js +2 -0
- package/dist/assets/RegistriesView-BeiFx468.js.map +1 -0
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-mVrRpkV_.js → RelativeTime.vue_vue_type_script_setup_true_lang-BGissyps.js} +2 -2
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-mVrRpkV_.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-BGissyps.js.map} +1 -1
- package/dist/assets/{RequiresTab-BgGIZ1Tn.js → RequiresTab-Bb3_lYqC.js} +2 -2
- package/dist/assets/{RequiresTab-BgGIZ1Tn.js.map → RequiresTab-Bb3_lYqC.js.map} +1 -1
- package/dist/assets/RoutingView-y8L_ex2z.js +9 -0
- package/dist/assets/RoutingView-y8L_ex2z.js.map +1 -0
- package/dist/assets/RuntimeTab-DWZ5eFho.js +2 -0
- package/dist/assets/RuntimeTab-DWZ5eFho.js.map +1 -0
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-D8NGgBfa.js +2 -0
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-qGkx2MwW.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-D8NGgBfa.js.map} +1 -1
- package/dist/assets/SettingsView-C-xJVgVw.js +2 -0
- package/dist/assets/{SettingsView-Cu1Zkufg.js.map → SettingsView-C-xJVgVw.js.map} +1 -1
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js → SkeletonList.vue_vue_type_script_setup_true_lang-qMyLRAMp.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-qMyLRAMp.js.map} +1 -1
- package/dist/assets/{SpecDetailView-DIi21wo1.js → SpecDetailView-CGQZS7NU.js} +2 -2
- package/dist/assets/{SpecDetailView-DIi21wo1.js.map → SpecDetailView-CGQZS7NU.js.map} +1 -1
- package/dist/assets/SpecsView-D9mKql2j.js +2 -0
- package/dist/assets/SpecsView-D9mKql2j.js.map +1 -0
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-DANvveJ6.js → StateBadge.vue_vue_type_script_setup_true_lang-BgbZLzlL.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-DANvveJ6.js.map → StateBadge.vue_vue_type_script_setup_true_lang-BgbZLzlL.js.map} +1 -1
- package/dist/assets/{SubmitView-ZYGApCXE.js → SubmitView-DuGtFMgF.js} +5 -5
- package/dist/assets/{SubmitView-ZYGApCXE.js.map → SubmitView-DuGtFMgF.js.map} +1 -1
- package/dist/assets/Teleport-DfE2iP8c.js +4 -0
- package/dist/assets/{Teleport-d5PoAxFM.js.map → Teleport-DfE2iP8c.js.map} +1 -1
- package/dist/assets/{TerminalTab-DAZpn3jK.js → TerminalTab-D5ncE4Cv.js} +2 -2
- package/dist/assets/{TerminalTab-DAZpn3jK.js.map → TerminalTab-D5ncE4Cv.js.map} +1 -1
- package/dist/assets/UsersView-Be77zCYE.css +1 -0
- package/dist/assets/UsersView-BxU2ho4N.js +2 -0
- package/dist/assets/UsersView-BxU2ho4N.js.map +1 -0
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-D--Rd-Mv.js → VarEditor.vue_vue_type_script_setup_true_lang-SKwJUsNC.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-D--Rd-Mv.js.map → VarEditor.vue_vue_type_script_setup_true_lang-SKwJUsNC.js.map} +1 -1
- package/dist/assets/VariablesView-BnW2I-92.js +2 -0
- package/dist/assets/VariablesView-BnW2I-92.js.map +1 -0
- package/dist/assets/VariablesView-ByeOvDGJ.css +1 -0
- package/dist/assets/{index-DVCVnKbf.js → index-DVMQBHXF.js} +4 -4
- package/dist/assets/{index-DVCVnKbf.js.map → index-DVMQBHXF.js.map} +1 -1
- package/dist/assets/{index-Cyc_WOgY.css → index-lyuEu6lW.css} +1 -1
- package/dist/assets/{useDeployment-752fTjLE.js → useDeployment-DGzBsXE-.js} +2 -2
- package/dist/assets/{useDeployment-752fTjLE.js.map → useDeployment-DGzBsXE-.js.map} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-CtwJE2eJ.js +0 -2
- package/dist/assets/DashboardView-S4eiNX8X.js +0 -2
- package/dist/assets/DashboardView-S4eiNX8X.js.map +0 -1
- package/dist/assets/DeploymentDetailView-CD4RVr06.js +0 -2
- package/dist/assets/DeploymentDetailView-CD4RVr06.js.map +0 -1
- package/dist/assets/DeploymentsView-DIX7IA8g.js +0 -2
- package/dist/assets/DeploymentsView-DIX7IA8g.js.map +0 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-DwwXY7EX.js +0 -2
- package/dist/assets/JobDetailView-BsCnnkPz.js +0 -2
- package/dist/assets/JobsView-Bd_XHRkd.js +0 -2
- package/dist/assets/JobsView-Bd_XHRkd.js.map +0 -1
- package/dist/assets/NotifiersView-CChDRHSy.js +0 -2
- package/dist/assets/NotifiersView-CChDRHSy.js.map +0 -1
- package/dist/assets/RegistriesView-D3Nh0dbq.js +0 -2
- package/dist/assets/RegistriesView-D3Nh0dbq.js.map +0 -1
- package/dist/assets/RoutingView-D2StZawf.js +0 -9
- package/dist/assets/RoutingView-D2StZawf.js.map +0 -1
- package/dist/assets/RuntimeTab-B0D_MxFQ.js +0 -2
- package/dist/assets/RuntimeTab-B0D_MxFQ.js.map +0 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-qGkx2MwW.js +0 -2
- package/dist/assets/SettingsView-Cu1Zkufg.js +0 -2
- package/dist/assets/SpecsView-B49LI4Ut.js +0 -2
- package/dist/assets/SpecsView-B49LI4Ut.js.map +0 -1
- package/dist/assets/Teleport-d5PoAxFM.js +0 -4
- package/dist/assets/UsersView-BfQKf8Sf.js +0 -2
- package/dist/assets/UsersView-BfQKf8Sf.js.map +0 -1
- package/dist/assets/UsersView-DpZ_4vlY.css +0 -1
- package/dist/assets/VariablesView-Bej9ZZmS.js +0 -2
- package/dist/assets/VariablesView-Bej9ZZmS.js.map +0 -1
- package/dist/assets/VariablesView-Cnpkn8AM.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotifiersView-CChDRHSy.js","sources":["../../src/views/NotifiersView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Notifiers — where events on this host get sent.\n *\n * THE FORM IS SERVER-DRIVEN. The event list and the per-type fields come from `/api/notifiers/meta`,\n * so adding a Slack or Discord type on the server puts it in this picker with its own form and no\n * change here. That is the composability seam reaching the UI; hard-coding the fields would have\n * quietly made the seam a lie.\n *\n * THE SIGNING SECRET IS SHOWN ONCE. Same discipline as a personal token and a registry credential:\n * there is no read path on the server, so this page cannot offer a reveal — it can only show the\n * value at the moment of creation and say plainly that this is the only time.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { DeliveryRow, NotifierMeta, NotifierRow } from '../api/types';\nimport { sentence, stamp } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst notifiers = ref<NotifierRow[]>([]);\nconst meta = ref<NotifierMeta | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\nconst unsupported = ref(false);\n\n/** The freshly-minted secret, held only until the operator dismisses it. */\nconst revealed = ref<{ name: string; secret: string } | null>(null);\n\nconst form = ref({ name: '', type: 'webhook', events: [] as string[], config: {} as Record<string, string> });\nconst saving = ref(false);\nconst formError = ref('');\n\nconst openDeliveries = ref<number | null>(null);\nconst deliveries = ref<DeliveryRow[]>([]);\n\n/** Server-driven, so a new notifier type appears here with no change to this file. */\nconst typeOptions = computed(() => (meta.value?.types ?? []).map((x) => ({ value: x.kind, label: x.label })));\n\nconst chosenType = computed(() => meta.value?.types.find((t) => t.kind === form.value.type) ?? null);\n\n/**\n * `config` is one bag shared by every type, so switching the picker leaves the previous type's\n * fields behind — fill a webhook URL, switch to Slack, and the POST carries a stray `url` alongside\n * `webhookUrl`. Nothing downstream rejects it: `config` is stored whole and each type validates only\n * its OWN fields, so the dead value is persisted forever and shows up in the detail view. Clearing on\n * change costs one line; unknown-key rejection on the server would cost a migration path for every\n * future type.\n */\nwatch(\n () => form.value.type,\n () => {\n form.value.config = {};\n },\n);\nconst canSave = computed(\n () =>\n !saving.value &&\n !!form.value.name.trim() &&\n form.value.events.length > 0 &&\n (chosenType.value?.fields ?? []).every((f) => !f.required || !!form.value.config[f.key]?.trim()),\n);\n\nasync function load(): Promise<void> {\n const [list, m] = await Promise.all([\n api.get<{ notifiers: NotifierRow[] }>('/api/notifiers'),\n api.get<NotifierMeta>('/api/notifiers/meta'),\n ]);\n loaded.value = true;\n // A server built before this feature answers 404 — a capability difference, not an error.\n if (list.status === 404 || m.status === 404) {\n unsupported.value = true;\n return;\n }\n if (!list.ok) {\n listError.value = problem(list, 'load the notifiers');\n return;\n }\n listError.value = '';\n notifiers.value = list.body.notifiers ?? [];\n if (m.ok) meta.value = m.body;\n}\n\nvoid load();\n\nfunction toggleEvent(name: string): void {\n const at = form.value.events.indexOf(name);\n if (at === -1) form.value.events.push(name);\n else form.value.events.splice(at, 1);\n}\n\nasync function create(): Promise<void> {\n saving.value = true;\n formError.value = '';\n const r = await api.post<{ notifier: NotifierRow; secret: string | null }>('/api/notifiers', {\n name: form.value.name.trim(),\n type: form.value.type,\n events: form.value.events,\n config: form.value.config,\n });\n saving.value = false;\n if (!r.ok) {\n formError.value = problem(r, 'register this notifier');\n return;\n }\n // `null` for a type whose config already carries its credential — a Slack notifier must not be\n // handed 48 hex characters and told its receiver needs them.\n revealed.value = r.body.secret ? { name: r.body.notifier.name, secret: r.body.secret } : null;\n form.value = { name: '', type: form.value.type, events: [], config: {} };\n void load();\n}\n\nasync function setEnabled(n: NotifierRow, enabled: boolean): Promise<void> {\n const r = await api.patch<{ notifier: NotifierRow }>(`/api/notifiers/${n.id}`, { enabled });\n if (!r.ok) listError.value = problem(r, 'update this notifier');\n void load();\n}\n\nasync function remove(n: NotifierRow): Promise<void> {\n const r = await api.del(`/api/notifiers/${n.id}`);\n if (!r.ok) {\n listError.value = problem(r, 'delete this notifier');\n return;\n }\n if (openDeliveries.value === n.id) openDeliveries.value = null;\n toast('ok', `Removed ${n.name}.`);\n void load();\n}\n\nasync function test(n: NotifierRow): Promise<void> {\n const r = await api.post<{ result: { ok: boolean; status?: number; error?: string } }>(\n `/api/notifiers/${n.id}/test`,\n {},\n );\n if (!r.ok) {\n listError.value = problem(r, 'send a test delivery');\n return;\n }\n const res = r.body.result;\n // The endpoint's own answer, verbatim — \"it failed\" without the reason is the thing this page\n // exists to avoid.\n if (res.ok) toast('ok', `${n.name} accepted the test delivery.`);\n else toast('error', `${n.name}: ${res.error ?? `HTTP ${res.status}`}`);\n void load();\n}\n\nasync function showDeliveries(n: NotifierRow): Promise<void> {\n if (openDeliveries.value === n.id) {\n openDeliveries.value = null;\n return;\n }\n const r = await api.get<{ deliveries: DeliveryRow[] }>(`/api/notifiers/${n.id}/deliveries`);\n if (!r.ok) {\n listError.value = problem(r, 'load the delivery log');\n return;\n }\n deliveries.value = r.body.deliveries ?? [];\n openDeliveries.value = n.id;\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Notifiers</h1>\n <div class=\"sub\">\n Where events on this host get sent\n <InfoHint label=\"what a notifier is\">\n A registration that receives events — a teardown that leaked, a deployment created, a job\n that failed. Webhooks today; the server decides what other kinds exist, and this page\n renders whatever it offers.\n </InfoHint>\n </div>\n </div>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the notifiers.\" />\n\n <section v-if=\"unsupported\" class=\"panel\">\n <div class=\"banner plain\">\n <b>This server has no notifiers.</b>\n <p>It is an older build of pstack. Upgrade the host to register webhooks.</p>\n </div>\n </section>\n\n <template v-else>\n <!--\n Shown once, and the page says so. There is no read path on the server, so this is not a\n design choice that could be softened later — the value genuinely does not exist anywhere\n retrievable after this moment.\n -->\n <!-- Only a signing type ever produces one; see `signs` in notify.ts. -->\n <div v-if=\"revealed\" class=\"banner ok\">\n <b>Signing secret for “{{ revealed.name }}” — copy it now.</b>\n <p>\n This is the only time it is shown — the server keeps no way to show it again. Your\n receiver uses it to check that a delivery really came from here.\n <InfoHint label=\"how a receiver checks it\">\n Each delivery carries a signature header computed from this secret and the exact body\n sent. Recompute it on your side and compare; a mismatch means the delivery was not sent\n by this host, or was altered on the way.\n </InfoHint>\n </p>\n <pre class=\"code\">{{ revealed.secret }}</pre>\n <div class=\"row\">\n <button class=\"btn\" @click=\"revealed = null\">I have stored it</button>\n </div>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Registered</h2>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"2\" />\n <table v-else-if=\"notifiers.length\" class=\"cards\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Events</th>\n <th>Last delivery</th>\n <th></th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <template v-for=\"(n, i) in notifiers\" :key=\"n.id\">\n <tr :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"name\">\n {{ n.name }}\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <!-- Chat types keep the URL under `webhookUrl`, and the server masks it (it is\n the credential) — so this shows dots for those rows, which is correct. -->\n {{ sentence(n.type) }} · {{ String(n.config.url ?? n.config.webhookUrl ?? '') }}\n </div>\n </td>\n <td data-label=\"events\">\n <span v-if=\"n.events.includes('*')\" class=\"badge\">all events</span>\n <span v-else>{{ n.events.join(', ') }}</span>\n </td>\n <td data-label=\"last delivery\">\n <span v-if=\"!n.lastStatus\" class=\"mute\">never</span>\n <span v-else :class=\"n.lastStatus === 'ok' ? 's-ok' : 's-failed'\">\n {{ n.lastStatus }}\n </span>\n <div v-if=\"n.lastAt\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RelativeTime :at=\"n.lastAt\" />\n </div>\n </td>\n <td data-label=\"\">\n <div class=\"row\" style=\"justify-content: flex-end\">\n <span v-if=\"!n.enabled\" class=\"badge off\">disabled</span>\n <button class=\"ghost sm\" @click=\"showDeliveries(n)\">\n {{ openDeliveries === n.id ? 'Hide' : 'Deliveries' }}\n </button>\n <button class=\"ghost sm\" @click=\"test(n)\">Test</button>\n <button class=\"ghost sm\" @click=\"setEnabled(n, !n.enabled)\">\n {{ n.enabled ? 'Disable' : 'Enable' }}\n </button>\n <ActionButton variant=\"danger\" @click=\"remove(n)\">Remove</ActionButton>\n </div>\n </td>\n </tr>\n <tr v-if=\"openDeliveries === n.id\" :key=\"`d${n.id}`\">\n <td colspan=\"4\">\n <ul v-if=\"deliveries.length\" class=\"kvlist\">\n <li v-for=\"d in deliveries\" :key=\"d.id\">\n <span class=\"k\">\n <span :class=\"d.status === 'ok' ? 's-ok' : 's-failed'\">{{ sentence(d.status) }}</span>\n </span>\n <span class=\"v\">\n {{ d.event }}\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n · {{ stamp(d.createdAt) }} · {{ d.attempts }} attempt(s)<template\n v-if=\"d.responseCode\"\n >\n · HTTP {{ d.responseCode }}</template\n >\n </span>\n <div v-if=\"d.error\" class=\"s-failed\" style=\"font-size: var(--t-sm)\">\n {{ d.error }}\n </div>\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">Nothing delivered yet.</p>\n </td>\n </tr>\n </template>\n </tbody>\n </table>\n <p v-else class=\"mute\">\n Nothing registered. Events still happen — nobody is being told about them.\n </p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Add a notifier</h2>\n\n <div v-if=\"meta && meta.types.length > 1\" class=\"field\" style=\"max-width: 320px\">\n <label for=\"ty\">Type</label>\n <SelectMenu v-model=\"form.type\" id=\"ty\" label=\"Notifier type\" :options=\"typeOptions\" />\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"nn\">Name</label>\n <input id=\"nn\" v-model.trim=\"form.name\" type=\"text\" placeholder=\"ops-slack-bridge\" spellcheck=\"false\" />\n </div>\n\n <!-- Rendered from the server's field list — see the header. -->\n <div v-for=\"f in chosenType?.fields ?? []\" :key=\"f.key\" class=\"field\" style=\"max-width: 380px\">\n <label :for=\"`cfg-${f.key}`\">{{ f.label }}</label>\n <input\n :id=\"`cfg-${f.key}`\"\n v-model.trim=\"form.config[f.key]\"\n type=\"text\"\n :placeholder=\"f.placeholder\"\n spellcheck=\"false\"\n />\n </div>\n\n <h2 class=\"section\" style=\"margin: var(--s5) 0 var(--s3)\">\n Events\n <InfoHint label=\"which events to pick\">\n <b>All events</b> also covers events added in later versions — a specific list does not,\n and the failure mode of that is silence nobody can explain. <code>job.leaked</code> is the\n one worth alerting on: a teardown ran and something survived it.\n </InfoHint>\n </h2>\n <div class=\"row\">\n <label class=\"check\">\n <input\n type=\"checkbox\"\n :checked=\"form.events.includes('*')\"\n @change=\"toggleEvent('*')\"\n />\n All events\n </label>\n </div>\n <!-- A grid, not a wrapping row: eleven items of differing width wrapped into ragged lines\n with one stranded on its own, which reads as a layout accident. -->\n <div v-if=\"!form.events.includes('*')\" class=\"check-grid\">\n <label v-for=\"e in meta?.events ?? []\" :key=\"e\" class=\"check\">\n <input type=\"checkbox\" :checked=\"form.events.includes(e)\" @change=\"toggleEvent(e)\" />\n {{ e }}\n </label>\n </div>\n\n <ErrorNote v-if=\"formError\" :text=\"formError\" title=\"Could not register this notifier.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"create\">\n {{ saving ? 'Registering…' : 'Register' }}\n </ActionButton>\n </div>\n\n <p v-if=\"chosenType?.signs !== false\" class=\"hint\">\n Deliveries are signed with a secret shown once at registration, retried twice on failure,\n and logged here.\n <InfoHint label=\"how a receiver verifies a delivery\">\n Recompute <code>HMAC-SHA256(secret, `${timestamp}.${rawBody}`)</code> and compare against\n <code>X-Pstack-Signature</code>, using the <em>raw</em> body — re-serialising it changes\n the bytes. Reject anything whose <code>X-Pstack-Timestamp</code> is more than five minutes\n old, and dedupe on <code>X-Pstack-Delivery</code>: delivery is at-least-once, and that id\n is stable across retries.\n </InfoHint>\n </p>\n <p v-else class=\"hint\">\n The webhook URL is the credential — it is stored write-only and scrubbed from logs, and no\n signing secret is involved. Deliveries are retried twice on failure and logged here.\n </p>\n </section>\n </template>\n </div>\n</template>\n"],"names":["notifiers","ref","meta","loaded","listError","unsupported","revealed","form","saving","formError","openDeliveries","deliveries","typeOptions","computed","_a","x","chosenType","t","watch","canSave","f","load","list","m","api","problem","toggleEvent","name","at","create","r","setEnabled","n","enabled","remove","toast","test","res","showDeliveries","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","_Fragment","_hoisted_4","_toDisplayString","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_renderList","i","_hoisted_10","_hoisted_11","_unref","sentence","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_normalizeClass","_hoisted_16","_hoisted_17","RelativeTime","_hoisted_18","_hoisted_19","_hoisted_20","$event","_hoisted_21","_hoisted_22","_hoisted_23","ActionButton","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_createTextVNode","stamp","_hoisted_29","_hoisted_30","_hoisted_31","SkeletonList","_hoisted_32","_hoisted_33","SelectMenu","_hoisted_34","_hoisted_35","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_41","_b","e","_hoisted_43","_c","_hoisted_44","_hoisted_45"],"mappings":"g/DAyBA,MAAMA,EAAYC,EAAmB,EAAE,EACjCC,EAAOD,EAAyB,IAAI,EACpCE,EAASF,EAAI,EAAK,EAClBG,EAAYH,EAAI,EAAE,EAClBI,EAAcJ,EAAI,EAAK,EAGvBK,EAAWL,EAA6C,IAAI,EAE5DM,EAAON,EAAI,CAAE,KAAM,GAAI,KAAM,UAAW,OAAQ,CAAA,EAAgB,OAAQ,CAAA,EAA8B,EACtGO,EAASP,EAAI,EAAK,EAClBQ,EAAYR,EAAI,EAAE,EAElBS,EAAiBT,EAAmB,IAAI,EACxCU,EAAaV,EAAmB,EAAE,EAGlCW,EAAcC,EAAS,IAAA,OAAO,SAAAC,EAAAZ,EAAK,QAAL,YAAAY,EAAY,QAAS,CAAA,GAAI,IAAKC,IAAO,CAAE,MAAOA,EAAE,KAAM,MAAOA,EAAE,KAAA,EAAQ,EAAC,EAEtGC,EAAaH,EAAS,IAAA,OAAM,QAAAC,EAAAZ,EAAK,QAAL,YAAAY,EAAY,MAAM,KAAMG,GAAMA,EAAE,OAASV,EAAK,MAAM,QAAS,KAAI,EAUnGW,GACE,IAAMX,EAAK,MAAM,KACjB,IAAM,CACJA,EAAK,MAAM,OAAS,CAAA,CACtB,CAAA,EAEF,MAAMY,EAAUN,EACd,IAAA,OACE,OAACL,EAAO,OACR,CAAC,CAACD,EAAK,MAAM,KAAK,KAAA,GAClBA,EAAK,MAAM,OAAO,OAAS,MAC1BO,EAAAE,EAAW,QAAX,YAAAF,EAAkB,SAAU,CAAA,GAAI,MAAOM,GAAA,OAAM,OAACA,EAAE,UAAY,CAAC,GAACN,EAAAP,EAAK,MAAM,OAAOa,EAAE,GAAG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HgC,IAAK8D,EAAG,MAAM,OAAA,GACpD7D,EAAqF,QAAA,CAA9E,KAAK,WAAY,QAASjC,EAAA,MAAK,OAAO,SAAS8F,CAAC,EAAI,SAAM1B,GAAEjD,EAAY2E,CAAC,CAAA,cAAKhB,EAAA,MAClFgB,CAAC,EAAA,CAAA,CAAA,cAIS5F,EAAA,WAAjBqC,EAA0FC,EAAA,OAA7D,KAAMtC,EAAA,MAAW,MAAM,mCAAA,6BAEpD+B,EAIM,MAJN8D,GAIM,CAHJ1D,EAEemC,EAAA,CAFD,QAAQ,UAAW,QAASvE,EAAA,MAAS,UAAWW,EAAA,MAAU,QAAOU,CAAA,aAC7E,IAA0C,KAAvCrB,EAAA,MAAM,eAAA,UAAA,EAAA,CAAA,CAAA,sCAIJ+F,EAAAvF,EAAA,QAAA,YAAAuF,EAAY,SAAK,IAA1BvD,IAAAT,EAUI,IAVJiE,GAUI,iBAV+C,+GAGjD,EAAA,GAAA5D,EAMWC,EAAA,CAND,MAAM,sCAAoC,WAAC,IACzC,CAAA,GAAAH,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GADyC,cACzC,EAAA,EAAAF,EAA2D,YAArD,iDAA8C,EAAA,IAAO,wBACrE,EAAA,EAAAA,EAA+B,YAAzB,qBAAkB,EAAA,IAAO,eAAY,EAAA,EAAAA,EAAY,UAAR,MAAG,EAAA,IAAK,sEACtB,EAAA,EAAAA,EAA+B,YAAzB,qBAAkB,EAAA,IAAO,iDAC7C,EAAA,EAAAA,EAA8B,YAAxB,oBAAiB,EAAA,IAAO,sEAEnD,EAAA,CAAA,mBAEFD,EAGI,IAHJkE,GAAuB,mLAGvB,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as E,c as i,a as t,f as s,e as h,w as m,_ as D,x,g as d,t as u,F as H,s as P,i as _,v as C,u as U,R as S,r as a,C as O,A as $,B as A,o as n,N as R}from"./index-DVCVnKbf.js";import{_ as B}from"./ActionButton.vue_vue_type_script_setup_true_lang-D06apM-6.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js";import{_ as z}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js";import{_ as L}from"./HelpModal.vue_vue_type_script_setup_true_lang-DwwXY7EX.js";import"./Teleport-d5PoAxFM.js";const M={class:"page-head"},W={class:"sub"},q={key:1,class:"banner failed"},G={key:2,class:"banner warn"},J={class:"mono"},K={class:"panel"},Q={class:"phead"},X={key:0,class:"mute break",style:{"font-size":"var(--t-sm)"}},Y={class:"mute"},Z={key:1,class:"kvlist"},ee={class:"k break",style:{width:"220px"}},te={class:"v row"},se={key:0,class:"badge warn"},oe={key:2,class:"mute"},ne={class:"panel"},le={class:"dim"},ae={class:"field",style:{"max-width":"380px"}},ie={class:"field",style:{"max-width":"380px"}},re={class:"field",style:{"max-width":"380px"}},de={class:"row",style:{"margin-top":"var(--s4)"}},ue={key:0,class:"mute"},pe={class:"hint"},ve={class:"mono"},we=E({__name:"RegistriesView",setup(ce){const k=a([]),b=a([]),g=a(""),V=a(null),N=a(!1),p=a(""),r=a(""),v=a(""),c=a(""),f=a(!1),y=a(""),T=O(()=>!!S.token&&!f.value&&!!r.value&&!!v.value&&!!c.value);async function w(){const o=await $.get("/api/registries");if(N.value=!0,!o.ok){p.value=A(o,"load the registry credentials");return}p.value="",k.value=o.body.entries??[],b.value=o.body.helpers??[],g.value=o.body.dir??"",V.value=o.body.writable??!1}w();async function I(){f.value=!0,y.value="";const o=await $.put(`/api/registries/${encodeURIComponent(r.value)}`,{username:v.value,password:c.value});if(f.value=!1,!o.ok){y.value=A(o,"store this credential");return}c.value="";const e=o.body.registry;e&&e!==r.value?R("ok",`Stored for ${e} — Docker Hub's canonical key.`):R("ok",`Stored for ${e||r.value}. It applies to the next pull.`),r.value="",v.value="",w()}async function j(o){const e=await $.del(`/api/registries/${encodeURIComponent(o)}`);if(!e.ok){p.value=A(e,"forget this credential");return}R("ok",`Forgot ${o}.`),w()}return(o,e)=>(n(),i("div",null,[t("div",M,[t("div",null,[e[5]||(e[5]=t("h1",null,"Registries",-1)),t("div",W,[e[4]||(e[4]=s(" Credentials for pulling private images ",-1)),h(D,{label:"why a host login is not enough"},{default:m(()=>[...e[3]||(e[3]=[s(" A pull is authenticated by the docker ",-1),t("em",null,"client",-1),s(", not the daemon: it reads its own ",-1),t("code",null,"config.json",-1),s(" and hands the credential over. pstack's client runs inside the control container, so a ",-1),t("code",null,"docker login",-1),s(" on the host writes a file it cannot see — and the pull fails on a host that is logged in. ",-1)])]),_:1})])])]),p.value?(n(),x(F,{key:0,text:p.value,title:"Could not load the registry credentials."},null,8,["text"])):d("",!0),V.value===!1?(n(),i("div",q,[e[8]||(e[8]=t("b",null,"Credentials cannot be saved here yet.",-1)),t("p",null,[e[7]||(e[7]=s(" Re-run setup on the host — it is safe to repeat. ",-1)),h(L,{title:"Why this happens"},{default:m(()=>[...e[6]||(e[6]=[t("p",null," Saving a credential needs a writable directory that the control stack only started providing in version 0.7.0. A host set up before then does not have it, so this page can list credentials but not add one. ",-1),t("p",null," Re-running setup is safe to repeat and recreates the control containers with the directory in place. Nothing already stored is lost. ",-1)])]),_:1})])])):d("",!0),b.value.length?(n(),i("div",G,[e[11]||(e[11]=t("b",null,"This file uses a credential helper, which will not work here.",-1)),t("p",null,[e[9]||(e[9]=s(" Found: ",-1)),t("span",J,u(b.value.join(", ")),1),e[10]||(e[10]=s(". A helper keeps the secret outside the file — in an OS keychain, usually — and the helper binary does not exist in this container, so pulls from private registries will fail. Add the credential below instead, which stores it in the file. ",-1))])])):d("",!0),t("section",K,[t("div",Q,[e[12]||(e[12]=t("h2",{class:"section"},"Stored",-1)),e[13]||(e[13]=t("span",{class:"grow"},null,-1)),g.value?(n(),i("span",X,[t("span",Y,u(g.value),1)])):d("",!0)]),N.value?k.value.length?(n(),i("ul",Z,[(n(!0),i(H,null,P(k.value,l=>(n(),i("li",{key:l.registry},[t("span",ee,[t("b",null,u(l.registry),1)]),t("span",te,[t("span",null,u(l.username??"unknown user"),1),l.viaHelper?(n(),i("span",se,"via helper")):d("",!0),e[15]||(e[15]=t("span",{class:"grow"},null,-1)),h(B,{disabled:!U(S).token,variant:"danger",onClick:fe=>j(l.registry)},{default:m(()=>[...e[14]||(e[14]=[s(" Forget ",-1)])]),_:1},8,["disabled","onClick"])])]))),128))])):(n(),i("p",oe," Nothing stored. Public images need no credential — this is only for a private registry. ")):(n(),x(z,{key:0,rows:2}))]),t("section",ne,[e[26]||(e[26]=t("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},"Add a credential",-1)),t("p",le,[e[17]||(e[17]=s(" Applies to the ",-1)),e[18]||(e[18]=t("b",null,"next pull",-1)),e[19]||(e[19]=s(" — nothing needs restarting. ",-1)),h(D,{label:"why no restart is needed"},{default:m(()=>[...e[16]||(e[16]=[s(" The docker client re-reads ",-1),t("code",null,"config.json",-1),s(" on every invocation, so there is no cache to bust. Storing one now is enough for a deploy started a second later. ",-1)])]),_:1})]),t("div",ae,[e[20]||(e[20]=t("label",{for:"host"},"Registry",-1)),_(t("input",{id:"host","onUpdate:modelValue":e[0]||(e[0]=l=>r.value=l),type:"text",placeholder:"ghcr.io",spellcheck:"false",autocomplete:"off"},null,512),[[C,r.value,void 0,{trim:!0}]]),e[21]||(e[21]=t("div",{class:"mute hint"}," Docker Hub is stored under its canonical key. ",-1))]),t("div",ie,[e[22]||(e[22]=t("label",{for:"user"},"Username",-1)),_(t("input",{id:"user","onUpdate:modelValue":e[1]||(e[1]=l=>v.value=l),type:"text",spellcheck:"false",autocomplete:"off"},null,512),[[C,v.value,void 0,{trim:!0}]])]),t("div",re,[e[23]||(e[23]=t("label",{for:"pass"},"Password or token",-1)),_(t("input",{id:"pass","onUpdate:modelValue":e[2]||(e[2]=l=>c.value=l),type:"password",autocomplete:"off",spellcheck:"false"},null,512),[[C,c.value]]),e[24]||(e[24]=t("div",{class:"mute hint"}," Prefer a token scoped to reading packages. Stored on the host as reversible base64, exactly as Stored the same way a terminal login stores it — never sent back to this page. ",-1))]),y.value?(n(),x(F,{key:0,text:y.value,title:"Could not store this credential."},null,8,["text"])):d("",!0),t("div",de,[h(B,{variant:"primary",pending:f.value,disabled:!T.value,onClick:I},{default:m(()=>[s(u(f.value?"Storing…":"Store"),1)]),_:1},8,["pending","disabled"]),U(S).token?d("",!0):(n(),i("span",ue,"Storing needs an access token."))]),t("p",pe,[e[25]||(e[25]=s(" Or from the host, which writes the same file: ",-1)),t("span",ve,"docker login --config "+u(g.value||"<DATA_DIR>/control/docker")+" <registry>",1)])])]))}});export{we as default};
|
|
2
|
-
//# sourceMappingURL=RegistriesView-D3Nh0dbq.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RegistriesView-D3Nh0dbq.js","sources":["../../src/views/RegistriesView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Private registry credentials.\n *\n * WHY THIS PAGE EXISTS. An image pull is authenticated by the **client**, not the daemon: `docker pull`\n * reads its own `config.json` and hands the credential to the daemon. pstack shells out to compose from\n * inside the control container, so a `docker login` on the host writes a file that client cannot see —\n * and a private image fails with `pull access denied` on a host that is demonstrably logged in.\n *\n * WRITE-ONLY, DELIBERATELY. A `config.json` entry is `base64(\"user:password\")` — reversible, not\n * encrypted. So there is no read path for it anywhere in the API, and this page shows hostnames and\n * usernames only. No reveal control, because the plaintext was never sent here; the same reasoning as\n * the masked variables. Re-entering a credential replaces it.\n *\n * The credential applies to the **next pull** — the CLI re-reads the file on every invocation, so\n * nothing needs restarting and there is no cache to bust. That is the property that makes \"add creds on\n * demand\" work at all, and it is stated on the page because otherwise the natural assumption is that a\n * redeploy is needed.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { RegistriesResponse, RegistryEntry } from '../api/types';\nimport { settings } from '../composables/useSettings';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport HelpModal from '../components/HelpModal.vue';\n\nconst entries = ref<RegistryEntry[]>([]);\nconst helpers = ref<string[]>([]);\nconst dir = ref('');\nconst writable = ref<boolean | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\n\nconst host = ref('');\nconst username = ref('');\nconst password = ref('');\nconst saving = ref(false);\nconst formError = ref('');\n\nconst canSave = computed(\n () => !!settings.token && !saving.value && !!host.value && !!username.value && !!password.value,\n);\n\nasync function load(): Promise<void> {\n const r = await api.get<RegistriesResponse>('/api/registries');\n loaded.value = true;\n if (!r.ok) {\n listError.value = problem(r, 'load the registry credentials');\n return;\n }\n listError.value = '';\n entries.value = r.body.entries ?? [];\n helpers.value = r.body.helpers ?? [];\n dir.value = r.body.dir ?? '';\n writable.value = r.body.writable ?? false;\n}\n\nvoid load();\n\nasync function save(): Promise<void> {\n saving.value = true;\n formError.value = '';\n const r = await api.put<{ registry: string }>(\n `/api/registries/${encodeURIComponent(host.value)}`,\n { username: username.value, password: password.value },\n );\n saving.value = false;\n if (!r.ok) {\n formError.value = problem(r, 'store this credential');\n return;\n }\n // Cleared immediately: there is no reason for a password to stay in a form field after it is stored,\n // and the page cannot read it back to re-populate one.\n password.value = '';\n const stored = r.body.registry;\n if (stored && stored !== host.value) {\n // Docker Hub's canonical key differs from what anyone types; saying so avoids \"I stored it and it\n // still is not used\".\n toast('ok', `Stored for ${stored} — Docker Hub's canonical key.`);\n } else {\n toast('ok', `Stored for ${stored || host.value}. It applies to the next pull.`);\n }\n host.value = '';\n username.value = '';\n void load();\n}\n\nasync function forget(registry: string): Promise<void> {\n const r = await api.del(`/api/registries/${encodeURIComponent(registry)}`);\n if (!r.ok) {\n listError.value = problem(r, 'forget this credential');\n return;\n }\n toast('ok', `Forgot ${registry}.`);\n void load();\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Registries</h1>\n <div class=\"sub\">\n Credentials for pulling private images\n <InfoHint label=\"why a host login is not enough\">\n A pull is authenticated by the docker <em>client</em>, not the daemon: it reads its own\n <code>config.json</code> and hands the credential over. pstack's client runs inside the\n control container, so a <code>docker login</code> on the host writes a file it cannot see —\n and the pull fails on a host that is logged in.\n </InfoHint>\n </div>\n </div>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the registry credentials.\" />\n\n <div v-if=\"writable === false\" class=\"banner failed\">\n <b>Credentials cannot be saved here yet.</b>\n <p>\n Re-run setup on the host — it is safe to repeat.\n <HelpModal title=\"Why this happens\">\n <p>\n Saving a credential needs a writable directory that the control stack only started\n providing in version 0.7.0. A host set up before then does not have it, so this page can\n list credentials but not add one.\n </p>\n <p>\n Re-running setup is safe to repeat and recreates the control containers with the\n directory in place. Nothing already stored is lost.\n </p>\n </HelpModal>\n </p>\n </div>\n\n <!--\n The trap worth naming: a config.json copied from a laptop usually has credsStore and NO auths,\n because the secrets are in the OS keychain. Inside the container that helper does not exist, so\n every pull fails and an empty list looks like the reason.\n -->\n <div v-if=\"helpers.length\" class=\"banner warn\">\n <b>This file uses a credential helper, which will not work here.</b>\n <p>\n Found: <span class=\"mono\">{{ helpers.join(', ') }}</span>. A helper keeps the secret outside the\n file — in an OS keychain, usually — and the helper binary does not exist in this container, so\n pulls from private registries will fail. Add the credential below instead, which\n stores it in the file.\n </p>\n </div>\n\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Stored</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute break\" style=\"font-size: var(--t-sm)\"><span class=\"mute\">{{ dir }}</span></span>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"2\" />\n <ul v-else-if=\"entries.length\" class=\"kvlist\">\n <li v-for=\"e in entries\" :key=\"e.registry\">\n <span class=\"k break\" style=\"width: 220px\"><b>{{ e.registry }}</b></span>\n <span class=\"v row\">\n <span>{{ e.username ?? 'unknown user' }}</span>\n <span v-if=\"e.viaHelper\" class=\"badge warn\">via helper</span>\n <span class=\"grow\" />\n <ActionButton :disabled=\"!settings.token\" variant=\"danger\" @click=\"forget(e.registry)\">\n Forget\n </ActionButton>\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">\n Nothing stored. Public images need no credential — this is only for a private registry.\n </p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">Add a credential</h2>\n\n <p class=\"dim\">\n Applies to the <b>next pull</b> — nothing needs restarting.\n <InfoHint label=\"why no restart is needed\">\n The docker client re-reads <code>config.json</code> on every invocation, so there is no cache\n to bust. Storing one now is enough for a deploy started a second later.\n </InfoHint>\n </p>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"host\">Registry</label>\n <input\n id=\"host\"\n v-model.trim=\"host\"\n type=\"text\"\n placeholder=\"ghcr.io\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n <div class=\"mute hint\">\n Docker Hub is stored under its canonical key.\n </div>\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"user\">Username</label>\n <input id=\"user\" v-model.trim=\"username\" type=\"text\" spellcheck=\"false\" autocomplete=\"off\" />\n </div>\n\n <div class=\"field\" style=\"max-width: 380px\">\n <label for=\"pass\">Password or token</label>\n <input id=\"pass\" v-model=\"password\" type=\"password\" autocomplete=\"off\" spellcheck=\"false\" />\n <div class=\"mute hint\">\n Prefer a token scoped to reading packages. Stored on the host as reversible base64, exactly as\n Stored the same way a terminal login stores it — never sent back to this page.\n </div>\n </div>\n\n <ErrorNote v-if=\"formError\" :text=\"formError\" title=\"Could not store this credential.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"save\">\n {{ saving ? 'Storing…' : 'Store' }}\n </ActionButton>\n <span v-if=\"!settings.token\" class=\"mute\">Storing needs an access token.</span>\n </div>\n\n <p class=\"hint\">\n Or from the host, which writes the same file:\n <span class=\"mono\">docker login --config {{ dir || '<DATA_DIR>/control/docker' }} <registry></span>\n </p>\n </section>\n </div>\n</template>\n"],"names":["entries","ref","helpers","dir","writable","loaded","listError","host","username","password","saving","formError","canSave","computed","settings","load","r","api","problem","save","stored","toast","forget","registry","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","_createVNode","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","HelpModal","_hoisted_4","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","e","_hoisted_11","_hoisted_12","_hoisted_13","ActionButton","_unref","$event","_hoisted_14","SkeletonList","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23"],"mappings":"8tCA8BA,MAAMA,EAAUC,EAAqB,EAAE,EACjCC,EAAUD,EAAc,EAAE,EAC1BE,EAAMF,EAAI,EAAE,EACZG,EAAWH,EAAoB,IAAI,EACnCI,EAASJ,EAAI,EAAK,EAClBK,EAAYL,EAAI,EAAE,EAElBM,EAAON,EAAI,EAAE,EACbO,EAAWP,EAAI,EAAE,EACjBQ,EAAWR,EAAI,EAAE,EACjBS,EAAST,EAAI,EAAK,EAClBU,EAAYV,EAAI,EAAE,EAElBW,EAAUC,EACd,IAAM,CAAC,CAACC,EAAS,OAAS,CAACJ,EAAO,OAAS,CAAC,CAACH,EAAK,OAAS,CAAC,CAACC,EAAS,OAAS,CAAC,CAACC,EAAS,KAAA,EAG5F,eAAeM,GAAsB,CACnC,MAAMC,EAAI,MAAMC,EAAI,IAAwB,iBAAiB,EAE7D,GADAZ,EAAO,MAAQ,GACX,CAACW,EAAE,GAAI,CACTV,EAAU,MAAQY,EAAQF,EAAG,+BAA+B,EAC5D,MACF,CACAV,EAAU,MAAQ,GAClBN,EAAQ,MAAQgB,EAAE,KAAK,SAAW,CAAA,EAClCd,EAAQ,MAAQc,EAAE,KAAK,SAAW,CAAA,EAClCb,EA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C,EAAArC,CAAA,EAAS,oBAAtBU,EAA+E,OAA/EqC,GAA0C,gCAA8B,KAG1EpC,EAGI,IAHJqC,GAGI,iBAHY,kDAEd,EAAA,GAAArC,EAAyG,OAAzGsC,GAAmB,yBAAsBzB,EAAGnC,EAAA,oCAAqC,cAAiB,CAAA,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as oe,c as o,a as t,f as n,e as c,w as f,_ as G,g as v,x as g,t as u,F as w,s as E,u as x,R as $,i as j,v as z,r,C as O,A as _,B as A,j as le,N as q,o as s,D as ne}from"./index-DVCVnKbf.js";import{c as ae}from"./useFormat-DVXTfIS-.js";import{_ as J}from"./ActionButton.vue_vue_type_script_setup_true_lang-D06apM-6.js";import{_ as K}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js";import{_ as Q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js";import{_ as ie}from"./HelpModal.vue_vue_type_script_setup_true_lang-DwwXY7EX.js";import"./Teleport-d5PoAxFM.js";const re={class:"page-head"},ue={class:"sub"},de={key:1,class:"banner info"},ve={class:"panel"},pe={class:"phead"},fe={class:"mute",style:{"font-size":"var(--t-sm)"}},ce={key:0,class:"banner warn"},me={key:1,class:"cards"},he={class:"stagger"},ye={"data-label":"url"},ke=["href"],be={key:1,class:"mono mute"},ge={key:0,class:"mute"},we={"data-label":"forwards to"},_e={key:0,class:"mono"},Re={key:1,class:"s-failed"},Te={"data-label":"deployment"},Ce={key:1,class:"mute"},xe={class:"dim","data-label":"router"},$e={key:2,class:"mute"},Ae={class:"panel"},Le={class:"phead"},Ne={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Se={class:"mute"},De={key:0,class:"banner failed"},Ie={key:1,class:"banner info"},Ue={key:3,class:"kvlist"},Pe={class:"k"},Ve=["onClick"],Ee={class:"v mute",style:{"font-size":"var(--t-sm)"}},je={key:4,class:"mute"},ze={key:2,class:"panel"},Be={class:"phead"},Fe={class:"section"},We={key:0,class:"badge warn"},Me={key:0,class:"field",style:{"max-width":"340px"}},He={key:2,class:"banner plain"},Ge={class:"field"},Oe={class:"row",style:{"margin-top":"var(--s4)"}},qe={key:0,class:"mute"},Je={class:"field",style:{"max-width":"340px"}},Ke=["for"],Qe=["id","placeholder"],Xe={class:"row"},Ye=`http:
|
|
2
|
-
middlewares:
|
|
3
|
-
# An example — replace it. Middlewares go UNDER http; at the top level Traefik ignores them.
|
|
4
|
-
ip-allow:
|
|
5
|
-
ipAllowList:
|
|
6
|
-
sourceRange:
|
|
7
|
-
- 203.0.113.0/24
|
|
8
|
-
`,it=oe({__name:"RoutingView",setup(Ze){const L=r([]),N=r(null),S=r([]),D=r(""),I=r(null),B=r(!1),R=r(""),i=r(null),d=r(""),m=r(""),T=r(!1),U=r(!1),k=r(!1),p=r(""),C=r(""),h=r(null),y=r(""),F=O(()=>i.value!==null&&d.value!==m.value),X=O(()=>!!$.token&&!k.value&&d.value.trim().length>0&&(F.value||i.value===""));async function P(){const l=await _.get("/api/routing");if(B.value=!0,!l.ok){R.value=A(l,"load the routing files");return}R.value="",S.value=l.body.files??[],D.value=l.body.dir??"",I.value=l.body.writable??!1}async function Y(){const l=await _.get("/api/routing/live");if(!l.ok){N.value=!1;return}N.value=l.body.reachable,L.value=l.body.routes??[]}P(),Y();async function Z(l){i.value=l,U.value=!0,p.value="",T.value=!1,y.value="";const e=await _.getAuthed(`/api/routing/${encodeURIComponent(l)}`);if(U.value=!1,!e.ok){p.value=A(e,"open this file");return}if(e.body.sourceWithheld){T.value=!0,d.value="",m.value="";return}d.value=e.body.content??"",m.value=d.value}function ee(){i.value="",C.value="",d.value=Ye,m.value="",T.value=!1,p.value=""}function W(){i.value=null,d.value="",m.value="",p.value=""}async function M(){const l=i.value===""?C.value.trim():i.value;if(!l){p.value="Give the file a name, ending in .yml";return}k.value=!0,p.value="";const e=await _.put(`/api/routing/${encodeURIComponent(l)}`,{content:d.value});if(k.value=!1,!e.ok){p.value=A(e,"save this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),m.value=d.value,i.value=l,q("ok",`Saved ${l}. Traefik reloads within a second or two.`),P()}async function te(){const l=h.value;l&&(d.value=l.content,i.value=l.name,await M(),h.value=null)}async function se(){const l=i.value;if(!l||y.value!==l)return;const e=await _.del(`/api/routing/${encodeURIComponent(l)}`);if(!e.ok){p.value=A(e,"delete this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),q("ok",`Deleted ${l}.`),W(),P()}return(l,e)=>{const V=le("RouterLink");return s(),o("div",null,[t("div",re,[t("div",null,[t("h1",null,[e[4]||(e[4]=n(" Routing ",-1)),c(ie,{title:"How routing files work, and what can go wrong"},{default:f(()=>[...e[3]||(e[3]=[t("p",null,[t("b",null,"Traefik reads this directory as a whole."),n(" One file it cannot parse and it reports a problem for the "),t("em",null,"directory"),n(" — so the symptom is other, unrelated routes disappearing rather than an error about the file you just saved. ")],-1),t("p",null," Saves here are checked before they are written and replace the old file in one step, so a file that would break the directory never reaches Traefik in the first place. ",-1),t("p",null,[t("b",null,"This page cannot lock you out."),n(" It and the API are routed by their containers' own settings, not by these files — no save here can take away the page you would use to undo it. ")],-1),t("p",null," What belongs here: shared middleware (sign-in prompts, rate limits, address allow-lists), TLS options, the catch-all fallback, and routes to things running outside this host's previews. A single preview's own routes are not here — those travel with the deployment. ",-1)])]),_:1})]),t("div",ue,[e[6]||(e[6]=n(" Every route on this host, and the config files behind them ",-1)),c(G,{label:"what belongs in these files"},{default:f(()=>[...e[5]||(e[5]=[n(" Middleware (basic auth, rate limits, IP allow-lists), TLS options, the catch-all fallback router, and routes to anything running outside compose. Per-PR routers are not here — those are labels in each deployment's own compose file. ",-1)])]),_:1})])]),e[7]||(e[7]=t("span",{class:"grow"},null,-1)),I.value?(s(),o("button",{key:0,class:"btn primary",onClick:ee},"New file")):v("",!0)]),R.value?(s(),g(K,{key:0,text:R.value,title:"Could not load the routing files."},null,8,["text"])):v("",!0),h.value?(s(),o("div",de,[t("b",null,"Replaced "+u(h.value.name)+".",1),t("p",null,[e[8]||(e[8]=n(" The previous contents are still here for this session. ",-1)),t("button",{class:"btn sm",onClick:te},"Put it back")])])):v("",!0),t("section",ve,[t("div",pe,[e[11]||(e[11]=t("h2",{class:"section"},"Live routes",-1)),e[12]||(e[12]=t("span",{class:"grow"},null,-1)),t("span",fe,[e[10]||(e[10]=n(" from container labels ",-1)),c(G,{label:"why routes are not in the files below",align:"end"},{default:f(()=>[...e[9]||(e[9]=[n(" Traefik reads two providers. Per-PR routers are ",-1),t("b",null,"labels on containers",-1),n(", written by each deployment's own compose file — so deploying a stack changes this list and never the files. The files are the other provider: middleware, TLS options, the fallback router. ",-1)])]),_:1})])]),N.value===!1?(s(),o("div",ce,[...e[13]||(e[13]=[t("b",null,"Docker did not answer.",-1),t("p",null,"Routes could not be listed — which is not the same as there being none.",-1)])])):L.value.length?(s(),o("table",me,[e[14]||(e[14]=t("thead",null,[t("tr",null,[t("th",null,"URL"),t("th",null,"Forwards to"),t("th",null,"Deployment"),t("th",null,"Router")])],-1)),t("tbody",he,[(s(!0),o(w,null,E(L.value,(a,H)=>(s(),o("tr",{key:`${a.container}-${a.router}`,style:ne({"--i":H})},[t("td",ye,[(s(!0),o(w,null,E(a.hosts,b=>(s(),o("div",{key:b},[b.startsWith("(pattern)")?(s(),o("span",be,u(b),1)):(s(),o("a",{key:0,href:`https://${b}`,target:"_blank",rel:"noreferrer"},u(b),9,ke))]))),128)),a.hosts.length?v("",!0):(s(),o("span",ge,"no host in the rule"))]),t("td",we,[a.target?(s(),o("span",_e,u(a.target),1)):(s(),o("span",Re,u(a.port===null?"no port declared":"not on the ingress network"),1))]),t("td",Te,[a.project?(s(),g(V,{key:0,to:`/deployments/${encodeURIComponent(a.project)}/runtime`},{default:f(()=>[n(u(a.project),1)]),_:2},1032,["to"])):(s(),o("span",Ce,"—"))]),t("td",xe,u(a.router),1)],4))),128))])])):(s(),o("p",$e,[...e[15]||(e[15]=[n(" No container on this host declares a Traefik router. A deployment's routes come from labels in its own compose file — open a deployment's ",-1),t("b",null,"Containers & routes",-1),n(" tab to see what is missing. ",-1)])]))]),t("section",Ae,[t("div",Le,[e[16]||(e[16]=t("h2",{class:"section"},"Config files",-1)),e[17]||(e[17]=t("span",{class:"grow"},null,-1)),D.value?(s(),o("span",Ne,[t("span",Se,u(D.value),1)])):v("",!0)]),I.value===!1?(s(),o("div",De,[...e[18]||(e[18]=[t("b",null,"Read-only: the API cannot write to this directory.",-1),t("p",null," The control stack mounts it into the API from 0.4.0 onward. Re-run setup again on the host to pick up the mount — it is safe to repeat, and it recreates the control containers. ",-1)])])):x($).token?v("",!0):(s(),o("div",Ie,[e[22]||(e[22]=t("b",null,"Viewing needs a token too.",-1)),t("p",null,[e[20]||(e[20]=n(" These files hold basic-auth hashes and forward-auth URLs, so their contents are not served unauthenticated. ",-1)),c(V,{to:"/settings"},{default:f(()=>[...e[19]||(e[19]=[n("Add your token",-1)])]),_:1}),e[21]||(e[21]=n(". ",-1))])])),B.value?S.value.length?(s(),o("ul",Ue,[(s(!0),o(w,null,E(S.value,a=>(s(),o("li",{key:a.name},[t("span",Pe,[t("button",{class:"ghost sm",onClick:H=>Z(a.name)},u(a.name),9,Ve)]),t("span",Ee,u(a.size)+" bytes · "+u(x(ae)(a.updatedAt)),1)]))),128))])):(s(),o("p",je," No files yet. Everything is routed by container labels, which is a perfectly good place to be. ")):(s(),g(Q,{key:2,rows:3}))]),i.value!==null?(s(),o("section",ze,[t("div",Be,[t("h2",Fe,u(i.value===""?"New file":i.value),1),F.value?(s(),o("span",We,"unsaved")):v("",!0),e[23]||(e[23]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost sm",onClick:W},"Close")]),i.value===""?(s(),o("div",Me,[e[24]||(e[24]=t("label",{for:"fname"},"File name",-1)),j(t("input",{id:"fname","onUpdate:modelValue":e[0]||(e[0]=a=>C.value=a),type:"text",placeholder:"middleware.yml",spellcheck:"false",autocomplete:"off"},null,512),[[z,C.value,void 0,{trim:!0}]]),e[25]||(e[25]=t("div",{class:"mute hint"},[n("Lower case, ending in "),t("code",null,".yml"),n(".")],-1))])):v("",!0),U.value?(s(),g(Q,{key:1,rows:4})):T.value?(s(),o("div",He,[e[28]||(e[28]=t("b",null,"Hidden without an access token.",-1)),t("p",null,[c(V,{to:"/settings"},{default:f(()=>[...e[26]||(e[26]=[n("Add your token",-1)])]),_:1}),e[27]||(e[27]=n(" to read and edit this file. ",-1))])])):(s(),o(w,{key:3},[t("div",Ge,[e[29]||(e[29]=t("label",{for:"content"},"Contents",-1)),j(t("textarea",{id:"content","onUpdate:modelValue":e[1]||(e[1]=a=>d.value=a),rows:"18",spellcheck:"false"},null,512),[[z,d.value]])]),p.value?(s(),g(K,{key:0,text:p.value,title:"Traefik would not accept this."},null,8,["text"])):v("",!0),t("div",Oe,[c(J,{variant:"primary",pending:k.value,disabled:!X.value,onClick:M},{default:f(()=>[n(u(k.value?"Saving…":"Save"),1)]),_:1},8,["pending","disabled"]),x($).token?v("",!0):(s(),o("span",qe,"Saving needs a token."))]),i.value?(s(),o(w,{key:1},[e[33]||(e[33]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Delete this file",-1)),e[34]||(e[34]=t("p",{class:"dim"}," Whatever it configures stops applying as soon as Traefik reloads. If it holds a router, those hostnames stop resolving to anything. ",-1)),t("div",Je,[t("label",{for:`confirm-${i.value}`},[e[30]||(e[30]=n(" Type ",-1)),t("b",null,u(i.value),1),e[31]||(e[31]=n(" to confirm ",-1))],8,Ke),j(t("input",{id:`confirm-${i.value}`,"onUpdate:modelValue":e[2]||(e[2]=a=>y.value=a),type:"text",placeholder:i.value,spellcheck:"false",autocomplete:"off"},null,8,Qe),[[z,y.value,void 0,{trim:!0}]])]),t("div",Xe,[c(J,{variant:"danger",disabled:y.value!==i.value||!x($).token,title:y.value!==i.value?"Type the file name to confirm.":void 0,onClick:se},{default:f(()=>[...e[32]||(e[32]=[n(" Delete ",-1)])]),_:1},8,["disabled","title"])])],64)):v("",!0)],64))])):v("",!0)])}}});export{it as default};
|
|
9
|
-
//# sourceMappingURL=RoutingView-D2StZawf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RoutingView-D2StZawf.js","sources":["../../src/views/RoutingView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Traefik's dynamic configuration — the file list, and an editor.\n *\n * WHAT LIVES HERE. Traefik reads config from two providers: labels on containers (every per-PR router)\n * and a watched *directory* of files. This page is the directory: middleware (basic auth, rate limits,\n * IP allow-lists), TLS options, the catch-all fallback router, routes to something running outside\n * compose. Several files rather than one is the point of a watched directory — one file per concern.\n *\n * THE WARNING IS NOT DECORATION. Traefik's documented behaviour is that an unparseable file produces\n * a parse error for the whole DIRECTORY, and the rest can be discarded with it — so a careless save\n * here breaks *other people's* routes, not the file being edited. The server validates before writing\n * and renames into place so the watcher never sees a partial file, and every rejection is rendered\n * verbatim because it names the actual problem.\n *\n * What it cannot break: `control.<domain>` and `api.<domain>` are docker labels on the pstack\n * container, not file config. This page cannot lock you out of the page you would use to undo a bad\n * save. That is stated in the UI, because an operator hesitating over a save deserves to know it.\n *\n * `previous` from a save is an in-session undo. There is deliberately no history on disk: the obvious\n * place to keep it is the one directory that must contain nothing but dynamic config.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type {\n LiveRoutesResponse,\n RoutingFile,\n RoutingListResponse,\n RoutingReadResponse,\n RoutingWriteResponse,\n RuntimeRoute,\n} from '../api/types';\nimport { settings } from '../composables/useSettings';\nimport { stamp } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport HelpModal from '../components/HelpModal.vue';\n\n/**\n * The live routes, from container labels.\n *\n * This page used to show only the file provider, and the reported confusion was exactly right: a\n * deployment goes up, its hostname appears, and nothing here changes — because per-PR routers are\n * DOCKER labels and the files below are Traefik's *other* provider. Showing both is what makes the\n * page match what \"routing\" means to whoever opened it.\n */\nconst live = ref<RuntimeRoute[]>([]);\nconst liveReachable = ref<boolean | null>(null);\n\nconst files = ref<RoutingFile[]>([]);\nconst dir = ref('');\nconst writable = ref<boolean | null>(null);\nconst loaded = ref(false);\nconst listError = ref('');\n\n/** The open file. `null` name means a new one. */\nconst openName = ref<string | null>(null);\nconst draft = ref('');\nconst original = ref('');\nconst withheld = ref(false);\nconst loadingFile = ref(false);\nconst saving = ref(false);\nconst fileError = ref('');\nconst newName = ref('');\n/** Last replaced content, offered as an undo for the rest of the session. */\nconst undo = ref<{ name: string; content: string } | null>(null);\nconst confirmDelete = ref('');\n\nconst dirty = computed(() => openName.value !== null && draft.value !== original.value);\nconst canSave = computed(\n () => !!settings.token && !saving.value && draft.value.trim().length > 0 && (dirty.value || openName.value === ''),\n);\n\nconst STARTER = `http:\n middlewares:\n # An example — replace it. Middlewares go UNDER http; at the top level Traefik ignores them.\n ip-allow:\n ipAllowList:\n sourceRange:\n - 203.0.113.0/24\n`;\n\nasync function loadList(): Promise<void> {\n const r = await api.get<RoutingListResponse>('/api/routing');\n loaded.value = true;\n if (!r.ok) {\n listError.value = problem(r, 'load the routing files');\n return;\n }\n listError.value = '';\n files.value = r.body.files ?? [];\n dir.value = r.body.dir ?? '';\n writable.value = r.body.writable ?? false;\n}\n\nasync function loadLive(): Promise<void> {\n const r = await api.get<LiveRoutesResponse>('/api/routing/live');\n if (!r.ok) {\n liveReachable.value = false;\n return;\n }\n liveReachable.value = r.body.reachable;\n live.value = r.body.routes ?? [];\n}\n\nvoid loadList();\nvoid loadLive();\n\nasync function open(name: string): Promise<void> {\n openName.value = name;\n loadingFile.value = true;\n fileError.value = '';\n withheld.value = false;\n confirmDelete.value = '';\n // Authenticated: dynamic config holds basic-auth hashes and forward-auth URLs.\n const r = await api.getAuthed<RoutingReadResponse>(`/api/routing/${encodeURIComponent(name)}`);\n loadingFile.value = false;\n if (!r.ok) {\n fileError.value = problem(r, 'open this file');\n return;\n }\n if (r.body.sourceWithheld) {\n withheld.value = true;\n draft.value = '';\n original.value = '';\n return;\n }\n draft.value = r.body.content ?? '';\n original.value = draft.value;\n}\n\nfunction startNew(): void {\n openName.value = '';\n newName.value = '';\n draft.value = STARTER;\n original.value = '';\n withheld.value = false;\n fileError.value = '';\n}\n\nfunction close(): void {\n openName.value = null;\n draft.value = '';\n original.value = '';\n fileError.value = '';\n}\n\nasync function save(): Promise<void> {\n const name = openName.value === '' ? newName.value.trim() : openName.value;\n if (!name) {\n fileError.value = 'Give the file a name, ending in .yml';\n return;\n }\n saving.value = true;\n fileError.value = '';\n const r = await api.put<RoutingWriteResponse>(`/api/routing/${encodeURIComponent(name)}`, {\n content: draft.value,\n });\n saving.value = false;\n if (!r.ok) {\n // Rendered verbatim: the server's message names the unknown section or the YAML error, which is\n // the whole diagnosis.\n fileError.value = problem(r, 'save this file');\n return;\n }\n if (r.body.previous) undo.value = { name, content: r.body.previous };\n original.value = draft.value;\n openName.value = name;\n toast('ok', `Saved ${name}. Traefik reloads within a second or two.`);\n void loadList();\n}\n\nasync function revert(): Promise<void> {\n const u = undo.value;\n if (!u) return;\n draft.value = u.content;\n openName.value = u.name;\n await save();\n undo.value = null;\n}\n\nasync function remove(): Promise<void> {\n const name = openName.value;\n if (!name || confirmDelete.value !== name) return;\n const r = await api.del<RoutingWriteResponse>(`/api/routing/${encodeURIComponent(name)}`);\n if (!r.ok) {\n fileError.value = problem(r, 'delete this file');\n return;\n }\n if (r.body.previous) undo.value = { name, content: r.body.previous };\n toast('ok', `Deleted ${name}.`);\n close();\n void loadList();\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n Routing\n <HelpModal title=\"How routing files work, and what can go wrong\">\n <p>\n <b>Traefik reads this directory as a whole.</b> One file it cannot parse and it reports a\n problem for the <em>directory</em> — so the symptom is other, unrelated routes\n disappearing rather than an error about the file you just saved.\n </p>\n <p>\n Saves here are checked before they are written and replace the old file in one step, so a\n file that would break the directory never reaches Traefik in the first place.\n </p>\n <p>\n <b>This page cannot lock you out.</b> It and the API are routed by their containers'\n own settings, not by these files — no save here can take away the page you would use to\n undo it.\n </p>\n <p>\n What belongs here: shared middleware (sign-in prompts, rate limits, address\n allow-lists), TLS options, the catch-all fallback, and routes to things running outside\n this host's previews. A single preview's own routes are not here — those travel with the\n deployment.\n </p>\n </HelpModal>\n </h1>\n <div class=\"sub\">\n Every route on this host, and the config files behind them\n <InfoHint label=\"what belongs in these files\">\n Middleware (basic auth, rate limits, IP allow-lists), TLS options, the catch-all fallback\n router, and routes to anything running outside compose. Per-PR routers are not here —\n those are labels in each deployment's own compose file.\n </InfoHint>\n </div>\n </div>\n <span class=\"grow\" />\n <button v-if=\"writable\" class=\"btn primary\" @click=\"startNew\">New file</button>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Could not load the routing files.\" />\n\n <div v-if=\"undo\" class=\"banner info\">\n <b>Replaced {{ undo.name }}.</b>\n <p>\n The previous contents are still here for this session.\n <button class=\"btn sm\" @click=\"revert\">Put it back</button>\n </p>\n </div>\n\n <!-- ============================ live routes ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Live routes</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n from container labels\n <InfoHint label=\"why routes are not in the files below\" align=\"end\">\n Traefik reads two providers. Per-PR routers are <b>labels on containers</b>, written by each\n deployment's own compose file — so deploying a stack changes this list and never the files.\n The files are the other provider: middleware, TLS options, the fallback router.\n </InfoHint>\n </span>\n </div>\n\n <div v-if=\"liveReachable === false\" class=\"banner warn\">\n <b>Docker did not answer.</b>\n <p>Routes could not be listed — which is not the same as there being none.</p>\n </div>\n\n <table v-else-if=\"live.length\" class=\"cards\">\n <thead>\n <tr>\n <th>URL</th>\n <th>Forwards to</th>\n <th>Deployment</th>\n <th>Router</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in live\" :key=\"`${r.container}-${r.router}`\" :style=\"{ '--i': i }\">\n <td data-label=\"url\">\n <div v-for=\"h in r.hosts\" :key=\"h\">\n <a v-if=\"!h.startsWith('(pattern)')\" :href=\"`https://${h}`\" target=\"_blank\" rel=\"noreferrer\">\n {{ h }}\n </a>\n <span v-else class=\"mono mute\">{{ h }}</span>\n </div>\n <span v-if=\"!r.hosts.length\" class=\"mute\">no host in the rule</span>\n </td>\n <td data-label=\"forwards to\">\n <span v-if=\"r.target\" class=\"mono\">{{ r.target }}</span>\n <span v-else class=\"s-failed\">\n {{ r.port === null ? 'no port declared' : 'not on the ingress network' }}\n </span>\n </td>\n <td data-label=\"deployment\">\n <RouterLink v-if=\"r.project\" :to=\"`/deployments/${encodeURIComponent(r.project)}/runtime`\">\n {{ r.project }}\n </RouterLink>\n <span v-else class=\"mute\">—</span>\n </td>\n <td class=\"dim\" data-label=\"router\">{{ r.router }}</td>\n </tr>\n </tbody>\n </table>\n\n <p v-else class=\"mute\">\n No container on this host declares a Traefik router. A deployment's routes come from labels in\n its own compose file — open a deployment's <b>Containers & routes</b> tab to see what is\n missing.\n </p>\n </section>\n\n <!-- ============================ config files ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Config files</h2>\n <span class=\"grow\" />\n <span v-if=\"dir\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n <span class=\"mute\">{{ dir }}</span>\n </span>\n </div>\n\n <!--\n The blast radius, stated once and up front — and the reassurance alongside it, because \"this can\n break everything\" without \"you will still be able to fix it\" just makes people avoid the page.\n -->\n\n <div v-if=\"writable === false\" class=\"banner failed\">\n <b>Read-only: the API cannot write to this directory.</b>\n <p>\n The control stack mounts it into the API from 0.4.0 onward. Re-run\n setup again on the host to pick up the mount — it is safe to repeat, and it recreates\n the control containers.\n </p>\n </div>\n\n <div v-else-if=\"!settings.token\" class=\"banner info\">\n <b>Viewing needs a token too.</b>\n <p>\n These files hold basic-auth hashes and forward-auth URLs, so their contents are not served\n unauthenticated. <RouterLink to=\"/settings\">Add your token</RouterLink>.\n </p>\n </div>\n\n <SkeletonList v-if=\"!loaded\" :rows=\"3\" />\n <ul v-else-if=\"files.length\" class=\"kvlist\">\n <li v-for=\"f in files\" :key=\"f.name\">\n <span class=\"k\">\n <button class=\"ghost sm\" @click=\"open(f.name)\">{{ f.name }}</button>\n </span>\n <span class=\"v mute\" style=\"font-size: var(--t-sm)\">\n {{ f.size }} bytes · {{ stamp(f.updatedAt) }}\n </span>\n </li>\n </ul>\n <p v-else class=\"mute\">\n No files yet. Everything is routed by container labels, which is a perfectly good place to be.\n </p>\n </section>\n\n <section v-if=\"openName !== null\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">{{ openName === '' ? 'New file' : openName }}</h2>\n <span v-if=\"dirty\" class=\"badge warn\">unsaved</span>\n <span class=\"grow\" />\n <button class=\"ghost sm\" @click=\"close\">Close</button>\n </div>\n\n <div v-if=\"openName === ''\" class=\"field\" style=\"max-width: 340px\">\n <label for=\"fname\">File name</label>\n <input\n id=\"fname\"\n v-model.trim=\"newName\"\n type=\"text\"\n placeholder=\"middleware.yml\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n <div class=\"mute hint\">Lower case, ending in <code>.yml</code>.</div>\n </div>\n\n <SkeletonList v-if=\"loadingFile\" :rows=\"4\" />\n\n <div v-else-if=\"withheld\" class=\"banner plain\">\n <b>Hidden without an access token.</b>\n <p>\n <RouterLink to=\"/settings\">Add your token</RouterLink> to read and edit this file.\n </p>\n </div>\n\n <template v-else>\n <div class=\"field\">\n <label for=\"content\">Contents</label>\n <textarea id=\"content\" v-model=\"draft\" rows=\"18\" spellcheck=\"false\" />\n </div>\n\n <ErrorNote v-if=\"fileError\" :text=\"fileError\" title=\"Traefik would not accept this.\" />\n\n <div class=\"row\" style=\"margin-top: var(--s4)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"!canSave\" @click=\"save\">\n {{ saving ? 'Saving…' : 'Save' }}\n </ActionButton>\n <span v-if=\"!settings.token\" class=\"mute\">Saving needs a token.</span>\n </div>\n\n <template v-if=\"openName\">\n <h2 class=\"section\" style=\"margin: var(--s5) 0 var(--s3)\">Delete this file</h2>\n <p class=\"dim\">\n Whatever it configures stops applying as soon as Traefik reloads. If it holds a router,\n those hostnames stop resolving to anything.\n </p>\n <div class=\"field\" style=\"max-width: 340px\">\n <label :for=\"`confirm-${openName}`\">\n Type <b>{{ openName }}</b> to confirm\n </label>\n <input\n :id=\"`confirm-${openName}`\"\n v-model.trim=\"confirmDelete\"\n type=\"text\"\n :placeholder=\"openName\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n />\n </div>\n <div class=\"row\">\n <ActionButton\n variant=\"danger\"\n :disabled=\"confirmDelete !== openName || !settings.token\"\n :title=\"confirmDelete !== openName ? 'Type the file name to confirm.' : undefined\"\n @click=\"remove\"\n >\n Delete\n </ActionButton>\n </div>\n </template>\n </template>\n </section>\n </div>\n</template>\n"],"names":["STARTER","live","ref","liveReachable","files","dir","writable","loaded","listError","openName","draft","original","withheld","loadingFile","saving","fileError","newName","undo","confirmDelete","dirty","computed","canSave","settings","loadList","r","api","problem","loadLive","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","_createBlock","ErrorNote","_openBlock","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_Fragment","_renderList","i","_hoisted_10","h","_hoisted_12","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_component_RouterLink","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_unref","_hoisted_26","_hoisted_27","f","_hoisted_28","$event","_hoisted_29","_hoisted_30","stamp","_hoisted_31","SkeletonList","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","ActionButton","_hoisted_40","_hoisted_41","_hoisted_44"],"mappings":"6xDA4EMA,GAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wCA3BhB,MAAMC,EAAOC,EAAoB,EAAE,EAC7BC,EAAgBD,EAAoB,IAAI,EAExCE,EAAQF,EAAmB,EAAE,EAC7BG,EAAMH,EAAI,EAAE,EACZI,EAAWJ,EAAoB,IAAI,EACnCK,EAASL,EAAI,EAAK,EAClBM,EAAYN,EAAI,EAAE,EAGlBO,EAAWP,EAAmB,IAAI,EAClCQ,EAAQR,EAAI,EAAE,EACdS,EAAWT,EAAI,EAAE,EACjBU,EAAWV,EAAI,EAAK,EACpBW,EAAcX,EAAI,EAAK,EACvBY,EAASZ,EAAI,EAAK,EAClBa,EAAYb,EAAI,EAAE,EAClBc,EAAUd,EAAI,EAAE,EAEhBe,EAAOf,EAA8C,IAAI,EACzDgB,EAAgBhB,EAAI,EAAE,EAEtBiB,EAAQC,EAAS,IAAMX,EAAS,QAAU,MAAQC,EAAM,QAAUC,EAAS,KAAK,EAChFU,EAAUD,EACd,IAAM,CAAC,CAACE,EAAS,OAAS,CAACR,EAAO,OAASJ,EAAM,MAAM,OAAO,OAAS,IAAMS,EAAM,OAASV,EAAS,QAAU,GAAA,EAYjH,eAAec,GAA0B,CACvC,MAAMC,EAAI,MAAMC,EAAI,IAAyB,cAAc,EAE3D,GADAlB,EAAO,MAAQ,GACX,CAACiB,EAAE,GAAI,CACThB,EAAU,MAAQkB,EAAQF,EAAG,wBAAwB,EACrD,MACF,CACAhB,EAAU,MAAQ,GAClBJ,EAAM,MAAQoB,EAAE,KAAK,OAAS,CAAA,EAC9BnB,EAAI,MAAQmB,EAAE,KAAK,KAAO,GAC1BlB,EAAS,MAAQkB,EAAE,KAAK,UAAY,EACtC,CAEA,eAAeG,GAA0B,CACvC,MAA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EAAS,oBAAtBe,EAAsE,OAAtE6D,GAA0C,uBAAqB,KAGjDzF,EAAA,WAAhB4B,EA6BWmB,EAAA,CAAA,IAAA,GAAA,eA5BTlB,EAA+E,KAAA,CAA3E,MAAM,UAAU,MAAA,CAAA,OAAA,uBAAA,CAAA,EAAsC,mBAAgB,EAAA,GAC1EI,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAJ,EAGI,IAAA,CAHD,MAAM,KAAA,EAAM,wIAGf,EAAA,GACAA,EAYM,MAZN6D,GAYM,CAXJ7D,EAEQ,QAAA,CAFA,eAAgB7B,EAAA,KAAQ,EAAA,mBAAI,SAC7B,EAAA,GAAA6B,EAAqB,WAAf7B,EAAA,KAAQ,EAAA,CAAA,kBAAO,eAC5B,EAAA,EAAA,UACA6B,EAOE,QAAA,CANC,cAAe7B,EAAA,KAAQ,wCACVS,EAAa,MAAAiE,GAC3B,KAAK,OACJ,YAAa1E,EAAA,MACd,WAAW,QACX,aAAa,KAAA,iBAJCS,EAAA,aAAN,CAAA,KAAR,EAAA,CAA4B,MAOhCoB,EASM,MATN8D,GASM,CARJ5D,EAOeyD,EAAA,CANb,QAAQ,SACP,SAAU/E,EAAA,QAAkBT,SAAQ,CAAKqE,EAAAxD,CAAA,EAAS,MAClD,MAAOJ,EAAA,QAAkBT,EAAA,uCAA8C,OACvE,QAAO2B,EAAA,aACT,IAED,CAAA,GAAAM,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s as S}from"./useFormat-DVXTfIS-.js";import{d as U,H as A,p as D,c as o,x as w,g as u,F as h,a as t,s as p,f as a,t as r,e as k,w as f,_ as P,r as $,C as g,j as B,o as n,D as I,E as R,u as y,A as E,B as V}from"./index-DVCVnKbf.js";import{d as b,v as F}from"./useDeployment-752fTjLE.js";import{_ as K}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js";import{_ as W}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js";import"./useVars-VN9gYdR6.js";const H={key:0,class:"banner warn"},M={key:0,class:"banner ok"},O={class:"panel"},j={class:"phead"},Q={class:"mute",style:{"font-size":"var(--t-sm)"}},q={key:0,class:"cards"},G={class:"stagger"},J={"data-label":"url"},X=["href"],Y={key:1,class:"mono mute"},Z={key:0,class:"mute"},ee={"data-label":"forwards to"},te={key:0,class:"mono"},se={key:1,class:"s-failed"},ne={class:"mute",style:{"font-size":"var(--t-sm)"}},oe={"data-label":"router"},re={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},ae={"data-label":"tls"},le={key:0,class:"badge ok"},ie={key:1,class:"badge off"},de={key:1,class:"banner warn"},ue={class:"panel"},he={class:"phead"},me={class:"mute",style:{"font-size":"var(--t-sm)"}},pe={key:0,class:"cards"},ce={class:"stagger"},fe={class:"name","data-label":"service"},ve={class:"mute",style:{"font-size":"var(--t-sm)"}},ke={"data-label":"state"},ge={"data-label":"ports"},ye={class:"mono"},be={key:0,class:"mute"},_e={key:0,class:"mute"},we={"data-label":"networks"},$e={key:0,class:"mute mono",style:{"font-size":"var(--t-sm)"}},Re={class:"dim","data-label":"image"},Ce={class:"row-actions","data-label":""},Te=["href"],Se={key:1,class:"mute"},Ae=U({__name:"RuntimeTab",setup(Pe){const l=$(null),v=$(""),_=$(!0);async function C(){const i=await E.get(`/api/deployments/${encodeURIComponent(b.id)}/runtime${F.value}`);if(_.value=!1,!i.ok){v.value=V(i,"inspect what is running");return}v.value="",l.value=i.body}A(()=>b.id,()=>{_.value=!0,C()},{immediate:!0}),D(()=>void C(),8e3);const N=g(()=>{var i;return((i=l.value)==null?void 0:i.findings.filter(e=>e.level==="error"))??[]}),x=g(()=>{var i;return((i=l.value)==null?void 0:i.findings.filter(e=>e.level==="warn"))??[]}),L=g(()=>{var i;return((i=l.value)==null?void 0:i.findings.filter(e=>e.level==="info"))??[]}),z=g(()=>{var i;return((i=l.value)==null?void 0:i.containers.filter(e=>e.state==="running").length)??0});function T(i){var c;const e=(c=l.value)==null?void 0:c.routes.filter(s=>s.container===i.name).flatMap(s=>s.hosts).find(s=>!s.startsWith("(pattern)"));return e?`https://${e}`:null}return(i,e)=>{const c=B("RouterLink");return n(),o("div",null,[v.value?(n(),w(W,{key:0,text:v.value,title:"Could not inspect this deployment."},null,8,["text"])):u("",!0),_.value&&!l.value?(n(),w(K,{key:1,rows:5})):l.value?(n(),o(h,{key:2},[l.value.reachable?(n(),o(h,{key:1},[(n(!0),o(h,null,p(N.value,(s,m)=>(n(),o("div",{key:`e${m}`,class:"banner failed"},[e[1]||(e[1]=t("b",null,"Blocking",-1)),t("p",null,r(s.message),1)]))),128)),(n(!0),o(h,null,p(x.value,(s,m)=>(n(),o("div",{key:`w${m}`,class:"banner warn"},[e[2]||(e[2]=t("b",null,"Worth checking",-1)),t("p",null,r(s.message),1)]))),128)),(n(!0),o(h,null,p(L.value,(s,m)=>(n(),o("div",{key:`i${m}`,class:"banner plain"},[t("p",null,r(s.message),1)]))),128)),!l.value.findings.length&&l.value.containers.length?(n(),o("div",M,[...e[3]||(e[3]=[t("b",null,"Nothing looks wrong.",-1),t("p",null," Every container is attached to the ingress network and every router has a rule and a port. If a hostname still fails, the next suspects are DNS and the certificate. ",-1)])])):u("",!0),t("section",O,[t("div",j,[e[5]||(e[5]=t("h2",{class:"section"},"Routing",-1)),e[6]||(e[6]=t("span",{class:"grow"},null,-1)),t("span",Q,[a(" TLS: "+r(l.value.challenge==="unknown"?"unknown":l.value.challenge)+" ",1),k(P,{label:"why the TLS mode matters here",align:"end"},{default:f(()=>[...e[4]||(e[4]=[a(" Under HTTP-01 every per-PR router needs ",-1),t("code",null,"tls.certresolver=le",-1),a(", because each hostname resolves its own certificate. Under DNS-01 that inverts — one always-on router holds the wildcard, and a per-PR certresolver makes each PR order its own and burn the weekly limit. Read from the running Traefik's own flags, not configured here. ",-1)])]),_:1})])]),l.value.routes.length?(n(),o("table",q,[t("thead",null,[t("tr",null,[e[9]||(e[9]=t("th",null,"URL",-1)),t("th",null,[e[8]||(e[8]=a(" Forwards to ",-1)),k(P,{label:"how a URL reaches a port"},{default:f(()=>[...e[7]||(e[7]=[a(" Traefik's docker provider resolves the container's IP on ",-1),t("code",null,"preview-ingress",-1),a(" and dials it on the port from ",-1),t("code",null,"loadbalancer.server.port",-1),a(" — it does ",-1),t("em",null,"not",-1),a(" use ",-1),t("code",null,"service:port",-1),a(" DNS. So the port here is the one inside the container, and publishing a host port is unnecessary. ",-1)])]),_:1})]),e[10]||(e[10]=t("th",null,"Router",-1)),e[11]||(e[11]=t("th",null,"TLS",-1))])]),t("tbody",G,[(n(!0),o(h,null,p(l.value.routes,(s,m)=>(n(),o("tr",{key:s.router,style:I({"--i":m})},[t("td",J,[(n(!0),o(h,null,p(s.hosts,d=>(n(),o("div",{key:d},[d.startsWith("(pattern)")?(n(),o("span",Y,r(d),1)):(n(),o("a",{key:0,href:`https://${d}`,target:"_blank",rel:"noreferrer"},r(d),9,X))]))),128)),s.hosts.length?u("",!0):(n(),o("span",Z,"no host in the rule"))]),t("td",ee,[s.target?(n(),o("span",te,r(s.target),1)):(n(),o("span",se,r(s.port===null?"no port declared":"not on the ingress network"),1)),t("div",ne,r(s.container),1)]),t("td",oe,[a(r(s.router)+" ",1),s.priority?(n(),o("div",re," priority "+r(s.priority),1)):u("",!0)]),t("td",ae,[s.tls?(n(),o("span",le,r(s.certresolver||"inherited"),1)):(n(),o("span",ie,"off"))])],4))),128))])])):(n(),o("div",de,[e[17]||(e[17]=t("b",null,"No routes. Traefik has not been told about this deployment.",-1)),t("p",null,[e[13]||(e[13]=a(" Routes come from labels in ",-1)),e[14]||(e[14]=t("em",null,"your",-1)),e[15]||(e[15]=a(" compose file, not from pstack and not from the ",-1)),k(c,{to:"/routing"},{default:f(()=>[...e[12]||(e[12]=[a("Routing",-1)])]),_:1}),e[16]||(e[16]=a(" page (that is Traefik's file provider — middleware and TLS options, not per-PR routers). A reachable service needs four things: ",-1))]),e[18]||(e[18]=t("pre",{class:"code"},"labels:\n - traefik.enable=true # the host runs exposedbydefault=false\n - traefik.docker.network=preview-ingress # which network Traefik should dial\n - traefik.http.routers.<name>-${STACK}.rule=Host(`<name>-${STACK}.${PREVIEW_DOMAIN}`)\n - traefik.http.services.<name>-${STACK}.loadbalancer.server.port=80\nnetworks: [default, preview-ingress] # and preview-ingress: { external: true }",-1)),e[19]||(e[19]=t("p",{class:"mute"},[a(" Put "),t("code",null,"${STACK}"),a(" in the router and service names: Traefik's namespace is global across the host, so two deployments sharing a router name serve each other's containers. ")],-1))]))]),t("section",ue,[t("div",he,[e[20]||(e[20]=t("h2",{class:"section"},"Containers",-1)),e[21]||(e[21]=t("span",{class:"grow"},null,-1)),t("span",me,r(z.value)+" of "+r(l.value.containers.length)+" running ",1)]),l.value.containers.length?(n(),o("table",pe,[e[24]||(e[24]=t("thead",null,[t("tr",null,[t("th",null,"Service"),t("th",null,"State"),t("th",null,"Ports"),t("th",null,"Networks"),t("th",null,"Image"),t("th",{"aria-label":"Actions"})])],-1)),t("tbody",ce,[(n(!0),o(h,null,p(l.value.containers,(s,m)=>(n(),o("tr",{key:s.id,style:I({"--i":m})},[t("td",fe,[a(r(s.service??s.name)+" ",1),t("div",ve,r(s.name),1)]),t("td",ke,[t("span",{class:R(s.state==="running"?"s-ok":"s-failed")},r(y(S)(s.state)),3),s.health?(n(),o("div",{key:0,class:R(["mute",s.health==="healthy"?"s-ok":"s-failed"]),style:{"font-size":"var(--t-sm)"}},r(y(S)(s.health)),3)):u("",!0)]),t("td",ge,[(n(!0),o(h,null,p(s.ports,d=>(n(),o("div",{key:`${d.containerPort}/${d.protocol}`},[t("span",ye,r(d.containerPort),1),d.hostPort?(n(),o("span",be," ← host "+r(d.hostPort),1)):u("",!0)]))),128)),s.ports.length?u("",!0):(n(),o("span",_e,"none exposed"))]),t("td",we,[(n(!0),o(h,null,p(s.networks,d=>(n(),o("div",{key:d},[t("span",{class:R(d==="preview-ingress"?"s-ok":"")},r(d),3)]))),128)),s.ingressIp?(n(),o("div",$e,r(s.ingressIp),1)):u("",!0)]),t("td",Re,r(s.image),1),t("td",Ce,[k(c,{class:"btn sm ghost",to:`/deployments/${encodeURIComponent(y(b).id)}/logs?container=${encodeURIComponent(s.name)}`},{default:f(()=>[...e[22]||(e[22]=[a(" Logs ",-1)])]),_:1},8,["to"]),s.state==="running"?(n(),w(c,{key:0,class:"btn sm ghost",to:`/deployments/${encodeURIComponent(y(b).id)}/terminal?container=${encodeURIComponent(s.name)}`},{default:f(()=>[...e[23]||(e[23]=[a(" Shell ",-1)])]),_:1},8,["to"])):u("",!0),T(s)?(n(),o("a",{key:1,class:"btn sm ghost",href:T(s),target:"_blank",rel:"noreferrer"}," Open ",8,Te)):u("",!0)])],4))),128))])])):(n(),o("p",Se," No containers for this stack. If you expected some, check that their profile is one the spec selects — a service behind a profile that is not enabled is never started. "))])],64)):(n(),o("div",H,[...e[0]||(e[0]=[t("b",null,"Docker did not answer.",-1),t("p",null," Nothing below could be determined — this is not the same as nothing running. Check the daemon and the socket mount, then refresh. ",-1)])]))],64)):u("",!0)])}}});export{Ae as default};
|
|
2
|
-
//# sourceMappingURL=RuntimeTab-B0D_MxFQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeTab-B0D_MxFQ.js","sources":["../../src/views/tabs/RuntimeTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * What is actually running, and what Traefik was actually told about it.\n *\n * THE QUESTION THIS ANSWERS. \"The hostname does not work.\" Nothing in this UI could answer it: the\n * registry shows what was *submitted*, the logs show what the container *says*, and the reason a\n * request 404s is in neither — it is in the container's Traefik labels, which pstack never writes.\n *\n * The routing table is the direct answer to \"which URL maps to which port\". Traefik does **not** dial\n * `service_name:port`: its docker provider resolves the container's IP on the ingress network and\n * dials that, on the port from the `loadbalancer.server.port` label. That is why a service must be\n * attached to `preview-ingress`, why the port is the *container-internal* one, and why publishing a\n * host port is unnecessary. The `target` column shows the address Traefik assembled, so a missing\n * half is visible rather than inferred.\n *\n * Findings come first because they are the reason anyone opened this tab.\n */\nimport { computed, ref, watch } from 'vue';\nimport { sentence } from '../../composables/useFormat';\nimport { api, problem } from '../../api/client';\nimport type { RuntimeContainer, RuntimeResponse } from '../../api/types';\nimport { dep, varsQuery } from '../../composables/useDeployment';\nimport { usePolling } from '../../composables/usePolling';\nimport SkeletonList from '../../components/SkeletonList.vue';\nimport ErrorNote from '../../components/ErrorNote.vue';\nimport InfoHint from '../../components/InfoHint.vue';\n\nconst rt = ref<RuntimeResponse | null>(null);\nconst error = ref('');\nconst loading = ref(true);\n\nasync function load(): Promise<void> {\n const r = await api.get<RuntimeResponse>(\n `/api/deployments/${encodeURIComponent(dep.id)}/runtime${varsQuery.value}`,\n );\n loading.value = false;\n if (!r.ok) {\n error.value = problem(r, 'inspect what is running');\n return;\n }\n error.value = '';\n rt.value = r.body;\n}\n\nwatch(() => dep.id, () => { loading.value = true; void load(); }, { immediate: true });\n// Containers change state during a deploy; the poll pauses itself when the tab is hidden.\nusePolling(() => void load(), 8000);\n\nconst errors = computed(() => rt.value?.findings.filter((f) => f.level === 'error') ?? []);\nconst warns = computed(() => rt.value?.findings.filter((f) => f.level === 'warn') ?? []);\nconst infos = computed(() => rt.value?.findings.filter((f) => f.level === 'info') ?? []);\nconst running = computed(() => rt.value?.containers.filter((c) => c.state === 'running').length ?? 0);\n\n/**\n * The hostname Traefik actually routes to this container, or null.\n *\n * Built from the ROUTES rather than guessed from the container: a router's rule is the only thing\n * that decides what URL reaches it, and a link assembled from a service name and a domain would be\n * a plausible-looking 404. Pattern hosts (`HostRegexp`) are skipped for the same reason — there is\n * no single address to send someone to.\n */\nfunction urlFor(c: RuntimeContainer): string | null {\n const host = rt.value?.routes\n .filter((r) => r.container === c.name)\n .flatMap((r) => r.hosts)\n .find((h) => !h.startsWith('(pattern)'));\n return host ? `https://${host}` : null;\n}\n</script>\n\n<template>\n <div>\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not inspect this deployment.\" />\n <SkeletonList v-if=\"loading && !rt\" :rows=\"5\" />\n\n <template v-else-if=\"rt\">\n <!--\n `reachable: false` is not \"nothing is running\". The stack may be perfectly healthy while this\n process cannot reach the Docker socket, and reporting that as empty is how a UI tells someone\n their live preview is gone.\n -->\n <div v-if=\"!rt.reachable\" class=\"banner warn\">\n <b>Docker did not answer.</b>\n <p>\n Nothing below could be determined — this is not the same as nothing running. Check the\n daemon and the socket mount, then refresh.\n </p>\n </div>\n\n <template v-else>\n <!-- Findings first: this tab exists because something is not working. -->\n <div v-for=\"(f, i) in errors\" :key=\"`e${i}`\" class=\"banner failed\">\n <b>Blocking</b>\n <p>{{ f.message }}</p>\n </div>\n <div v-for=\"(f, i) in warns\" :key=\"`w${i}`\" class=\"banner warn\">\n <b>Worth checking</b>\n <p>{{ f.message }}</p>\n </div>\n <div v-for=\"(f, i) in infos\" :key=\"`i${i}`\" class=\"banner plain\">\n <p>{{ f.message }}</p>\n </div>\n <div v-if=\"!rt.findings.length && rt.containers.length\" class=\"banner ok\">\n <b>Nothing looks wrong.</b>\n <p>\n Every container is attached to the ingress network and every router has a rule and a port.\n If a hostname still fails, the next suspects are DNS and the certificate.\n </p>\n </div>\n\n <!-- ============================ routing ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Routing</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n TLS: {{ rt.challenge === 'unknown' ? 'unknown' : rt.challenge }}\n <InfoHint label=\"why the TLS mode matters here\" align=\"end\">\n Under HTTP-01 every per-PR router needs <code>tls.certresolver=le</code>, because each\n hostname resolves its own certificate. Under DNS-01 that inverts — one always-on router\n holds the wildcard, and a per-PR certresolver makes each PR order its own and burn the\n weekly limit. Read from the running Traefik's own flags, not configured here.\n </InfoHint>\n </span>\n </div>\n\n <table v-if=\"rt.routes.length\" class=\"cards\">\n <thead>\n <tr>\n <th>URL</th>\n <th>\n Forwards to\n <InfoHint label=\"how a URL reaches a port\">\n Traefik's docker provider resolves the container's IP on\n <code>preview-ingress</code> and dials it on the port from\n <code>loadbalancer.server.port</code> — it does <em>not</em> use\n <code>service:port</code> DNS. So the port here is the one inside the container,\n and publishing a host port is unnecessary.\n </InfoHint>\n </th>\n <th>Router</th>\n <th>TLS</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in rt.routes\" :key=\"r.router\" :style=\"{ '--i': i }\">\n <td data-label=\"url\">\n <div v-for=\"h in r.hosts\" :key=\"h\">\n <a v-if=\"!h.startsWith('(pattern)')\" :href=\"`https://${h}`\" target=\"_blank\" rel=\"noreferrer\">\n {{ h }}\n </a>\n <span v-else class=\"mono mute\">{{ h }}</span>\n </div>\n <span v-if=\"!r.hosts.length\" class=\"mute\">no host in the rule</span>\n </td>\n <td data-label=\"forwards to\">\n <span v-if=\"r.target\" class=\"mono\">{{ r.target }}</span>\n <span v-else class=\"s-failed\">\n {{ r.port === null ? 'no port declared' : 'not on the ingress network' }}\n </span>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">{{ r.container }}</div>\n </td>\n <td data-label=\"router\">\n {{ r.router }}\n <div v-if=\"r.priority\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n priority {{ r.priority }}\n </div>\n </td>\n <td data-label=\"tls\">\n <span v-if=\"r.tls\" class=\"badge ok\">{{ r.certresolver || 'inherited' }}</span>\n <span v-else class=\"badge off\">off</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!--\n The reported failure, stated where it will be looked for. pstack does not write these\n labels — the deployment's own compose file does — so the fix is in the user's file.\n -->\n <div v-else class=\"banner warn\">\n <b>No routes. Traefik has not been told about this deployment.</b>\n <p>\n Routes come from labels in <em>your</em> compose file, not from pstack and not from the\n <RouterLink to=\"/routing\">Routing</RouterLink> page (that is Traefik's file provider —\n middleware and TLS options, not per-PR routers). A reachable service needs four things:\n </p>\n <pre class=\"code\">labels:\n - traefik.enable=true # the host runs exposedbydefault=false\n - traefik.docker.network=preview-ingress # which network Traefik should dial\n - traefik.http.routers.<name>-${STACK}.rule=Host(`<name>-${STACK}.${PREVIEW_DOMAIN}`)\n - traefik.http.services.<name>-${STACK}.loadbalancer.server.port=80\nnetworks: [default, preview-ingress] # and preview-ingress: { external: true }</pre>\n <p class=\"mute\">\n Put <code>${STACK}</code> in the router and service names: Traefik's namespace is global\n across the host, so two deployments sharing a router name serve each other's containers.\n </p>\n </div>\n </section>\n\n <!-- ============================ containers ============================ -->\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Containers</h2>\n <span class=\"grow\" />\n <span class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ running }} of {{ rt.containers.length }} running\n </span>\n </div>\n\n <table v-if=\"rt.containers.length\" class=\"cards\">\n <thead>\n <tr>\n <th>Service</th>\n <th>State</th>\n <th>Ports</th>\n <th>Networks</th>\n <th>Image</th>\n <th aria-label=\"Actions\" />\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(c, i) in rt.containers\" :key=\"c.id\" :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"service\">\n {{ c.service ?? c.name }}\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">{{ c.name }}</div>\n </td>\n <td data-label=\"state\">\n <span :class=\"c.state === 'running' ? 's-ok' : 's-failed'\">{{ sentence(c.state) }}</span>\n <div\n v-if=\"c.health\"\n class=\"mute\"\n style=\"font-size: var(--t-sm)\"\n :class=\"c.health === 'healthy' ? 's-ok' : 's-failed'\"\n >\n {{ sentence(c.health) }}\n </div>\n </td>\n <td data-label=\"ports\">\n <div v-for=\"p in c.ports\" :key=\"`${p.containerPort}/${p.protocol}`\">\n <span class=\"mono\">{{ p.containerPort }}</span>\n <span v-if=\"p.hostPort\" class=\"mute\"> ← host {{ p.hostPort }}</span>\n </div>\n <span v-if=\"!c.ports.length\" class=\"mute\">none exposed</span>\n </td>\n <td data-label=\"networks\">\n <div v-for=\"n in c.networks\" :key=\"n\">\n <span :class=\"n === 'preview-ingress' ? 's-ok' : ''\">{{ n }}</span>\n </div>\n <div v-if=\"c.ingressIp\" class=\"mute mono\" style=\"font-size: var(--t-sm)\">\n {{ c.ingressIp }}\n </div>\n </td>\n <td class=\"dim\" data-label=\"image\">{{ c.image }}</td>\n <!--\n The three things anyone wants from a container row, without hunting for the tab\n that does it. Open goes to the URL Traefik actually assembled for THIS container\n (see `urlFor`), so it is absent rather than wrong when no router points here.\n -->\n <td class=\"row-actions\" data-label=\"\">\n <RouterLink\n class=\"btn sm ghost\"\n :to=\"`/deployments/${encodeURIComponent(dep.id)}/logs?container=${encodeURIComponent(c.name)}`\"\n >\n Logs\n </RouterLink>\n <RouterLink\n v-if=\"c.state === 'running'\"\n class=\"btn sm ghost\"\n :to=\"`/deployments/${encodeURIComponent(dep.id)}/terminal?container=${encodeURIComponent(c.name)}`\"\n >\n Shell\n </RouterLink>\n <a\n v-if=\"urlFor(c)\"\n class=\"btn sm ghost\"\n :href=\"urlFor(c)!\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n Open\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <p v-else class=\"mute\">\n No containers for this stack. If you expected some, check that their profile is one the\n spec selects — a service behind a profile that is not enabled is never started.\n </p>\n </section>\n </template>\n </template>\n </div>\n</template>\n"],"names":["rt","ref","error","loading","load","r","api","dep","varsQuery","problem","watch","usePolling","errors","computed","_a","f","warns","infos","running","c","urlFor","host","h","_createElementBlock","_createBlock","ErrorNote","SkeletonList","_Fragment","_openBlock","_renderList","i","_cache","_createElementVNode","_toDisplayString","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_createVNode","InfoHint","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_10","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_component_RouterLink","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_createTextVNode","_hoisted_28","_hoisted_29","_normalizeClass","_unref","sentence","_hoisted_30","p","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","n","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_1"],"mappings":"ypDA2BA,MAAMA,EAAKC,EAA4B,IAAI,EACrCC,EAAQD,EAAI,EAAE,EACdE,EAAUF,EAAI,EAAI,EAExB,eAAeG,GAAsB,CACnC,MAAMC,EAAI,MAAMC,EAAI,IAClB,oBAAoB,mBAAmBC,EAAI,EAAE,CAAC,WAAWC,EAAU,KAAK,EAAA,EAG1E,GADAL,EAAQ,MAAQ,GACZ,CAACE,EAAE,GAAI,CACTH,EAAM,MAAQO,EAAQJ,EAAG,yBAAyB,EAClD,MACF,CACAH,EAAM,MAAQ,GACdF,EAAG,MAAQK,EAAE,IACf,CAEAK,EAAM,IAAMH,EAAI,GAAI,IAAM,CAAEJ,EAAQ,MAAQ,GAAWC,EAAA,CAAQ,EAAG,CAAE,UAAW,GAAM,EAErFO,EAAW,IAAM,KAAKP,EAAA,EAAQ,GAAI,EAElC,MAAMQ,EAASC,EAAS,WAAM,QAAAC,EAAAd,EAAG,QAAH,YAAAc,EAAU,SAAS,OAAQC,GAAMA,EAAE,QAAU,WAAY,CAAA,EAAE,EACnFC,EAAQH,EAAS,WAAM,QAAAC,EAAAd,EAAG,QAAH,YAAAc,EAAU,SAAS,OAAQC,GAAMA,EAAE,QAAU,UAAW,CAAA,EAAE,EACjFE,EAAQJ,EAAS,WAAM,QAAAC,EAAAd,EAAG,QAAH,YAAAc,EAAU,SAAS,OAAQC,GAAMA,EAAE,QAAU,UAAW,CAAA,EAAE,EACjFG,EAAUL,EAAS,IAAA,OAAM,QAAAC,EAAAd,EAAG,QAAH,YAAAc,EAAU,WAAW,OAAQK,GAAMA,EAAE,QAAU,WAAW,SAAU,EAAC,EAUpG,SAASC,EAAOD,EAAoC,OA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,EAMM,CAAA,GAAAlD,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CALJC,EAA6B,SAA1B,yBAAsB,EAAA,EACzBA,EAGI,SAHD,sIAGH,EAAA,CAAA"}
|
|
@@ -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-d5PoAxFM.js";import{r as E,C as q,a6 as Le,a7 as An,a8 as Pn,a9 as On,aa as En,Y as he,ab as qn,d as k,ac as bt,H as de,ad as Rn,ae as Tn,o as $,x as L,w as R,W as V,u as w,af as Ft,ag as we,M as $n,ah as Bn,ai as kn,c as J,e as N,X as ne,D as Nt,aj as In,V as it,g as Ee,s as zt,F as lt,a as xe,h as Oe,I as Dn,a2 as Pe,a4 as Ht,Z as Wt,$ as jt,ak as Mn,f as Kt,al as Vn,am as Ln,t as Ge}from"./index-DVCVnKbf.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-qGkx2MwW.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as _,c as d,a as t,i as f,v as x,u as s,R as o,f as n,e as k,w as v,_ as c,a3 as B,t as u,g as m,x as E,F as S,y as l,r as y,C as g,a5 as L,N,o as r}from"./index-DVCVnKbf.js";import{_ as T}from"./ActionButton.vue_vue_type_script_setup_true_lang-D06apM-6.js";import{_ as b}from"./SelectMenu.vue_vue_type_script_setup_true_lang-qGkx2MwW.js";import"./Teleport-d5PoAxFM.js";const U={class:"panel settings-form"},$={class:"field"},A={class:"mute hint"},D={class:"field"},R=["type"],F={class:"row",style:{"margin-top":"var(--s2)"}},M={key:2,class:"mute",style:{"font-size":"var(--t-xs)"}},q={class:"mute hint"},H={class:"row",style:{gap:"8px","margin-top":"4px"}},I=["disabled"],P={key:0,class:"mute"},j={key:1,class:"bad"},z={class:"panel"},O={class:"field"},W={class:"field"},Y=_({__name:"SettingsView",setup(G){const p=y(!1),h=y(!1),w=g(()=>{const i=o.token;return i.startsWith("pstack_pat_")?"Looks like a personal token.":/^[0-9a-f]{40,}$/i.test(i)?"Looks like a machine token.":`${i.length} characters — this does not look like a pstack token.`}),C=g(()=>{var i;return((i=l.health)==null?void 0:i.authEnforced)??null});async function V(){p.value=!0;try{await L(),N(l.healthError?"error":"ok",l.healthError||"Control plane reachable")}finally{p.value=!1}}return(i,e)=>(r(),d("div",null,[e[19]||(e[19]=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",U,[e[14]||(e[14]=t("h2",{class:"phead-title"},"Connection",-1)),t("div",$,[e[8]||(e[8]=t("label",{for:"apiBase"},"API base URL",-1)),f(t("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=a=>s(o).apiBase=a),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[x,s(o).apiBase,void 0,{trim:!0}]]),t("div",A,[e[7]||(e[7]=n(" Leave it empty unless you are pointing this page at another host. ",-1)),k(c,{label:"about the API base URL"},{default:v(()=>[...e[6]||(e[6]=[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",D,[e[11]||(e[11]=t("label",{for:"token"},"Access token",-1)),f(t("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=a=>s(o).token=a),type:h.value||!s(o).token?"text":"password",name:"pstack-access-token",autocomplete:"off","data-1p-ignore":"","data-lpignore":"true","data-bwignore":"","data-form-type":"other",spellcheck:"false",placeholder:"paste the token from pstack init"},null,8,R),[[B,s(o).token,void 0,{trim:!0}]]),t("div",F,[s(o).token?(r(),d("button",{key:0,class:"ghost sm",onClick:e[2]||(e[2]=a=>h.value=!h.value)},u(h.value?"Hide":"Show"),1)):m("",!0),s(o).token?(r(),E(T,{key:1,variant:"ghost",class:"sm",confirm:"Clear it?",onRun:e[3]||(e[3]=a=>s(o).token="")},{default:v(()=>[...e[9]||(e[9]=[n(" Clear ",-1)])]),_:1})):m("",!0),s(o).token?(r(),d("span",M,u(w.value),1)):m("",!0)]),t("div",q,[e[10]||(e[10]=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)),C.value===!1?(r(),d(S,{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)):m("",!0)])]),t("div",H,[t("button",{class:"btn",disabled:p.value,onClick:V},u(p.value?"Checking…":"Test connection"),9,I),s(l).health?(r(),d("span",P,[n(" Connected to pstack "+u(s(l).health.version)+" ",1),k(c,{label:"where data is stored"},{default:v(()=>[e[12]||(e[12]=n(" Deployment records and stored specs live in ",-1)),t("code",null,u(s(l).health.dataDir),1),e[13]||(e[13]=n(" on the host. ",-1))]),_:1})])):s(l).healthError?(r(),d("span",j,u(s(l).healthError),1)):m("",!0)])]),t("section",z,[e[18]||(e[18]=t("h2",{class:"phead-title"},"Appearance",-1)),t("div",O,[e[15]||(e[15]=t("label",{for:"theme"},"Theme",-1)),k(b,{modelValue:s(o).theme,"onUpdate:modelValue":e[4]||(e[4]=a=>s(o).theme=a),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),t("div",W,[e[16]||(e[16]=t("label",{for:"motion"},"Motion",-1)),k(b,{modelValue:s(o).motion,"onUpdate:modelValue":e[5]||(e[5]=a=>s(o).motion=a),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[17]||(e[17]=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{Y as default};
|
|
2
|
-
//# sourceMappingURL=SettingsView-Cu1Zkufg.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as q,y as g,O as L,c as a,a as t,f as l,e as i,w as y,_ as k,x as C,g as f,F as x,i as U,v as T,s as B,t as d,r as p,A as E,B as $,C as N,j as D,o as s,D as z,E as A,u as R}from"./index-DVCVnKbf.js";import{s as j}from"./useFormat-DVXTfIS-.js";import{_ as F}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js";import{_ as I}from"./ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js";import{_ as M}from"./RelativeTime.vue_vue_type_script_setup_true_lang-mVrRpkV_.js";import{E as P}from"./EquivalentCommand-NHzDrg5d.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},O={class:"sub"},W={key:1,class:"panel"},G={key:2,class:"panel"},H={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},J={class:"cards","data-testid":"specs.list"},Q={class:"stagger"},X={class:"name","data-label":"name"},Y={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Z={"data-label":"kind"},ee={"data-label":"needs"},te={key:0},se={key:1,class:"mute"},ne={"data-label":"used by"},oe={key:0},ae={key:1,class:"mute"},le={class:"dim nowrap","data-label":"updated"},ie={key:0},de={colspan:"5",class:"mute"},re={key:2,class:"banner plain"},be=q({__name:"SpecsView",setup(pe){const u=p([]),v=p(!1),m=p(""),h=p(!1),c=p("");async function V(){const o=await E.get("/api/specs");if(v.value=!0,o.status===404){h.value=!0;return}if(!o.ok){m.value=$(o,"load specs");return}m.value="",u.value=o.body.specs??[]}V(),g.deploymentsLoaded||L();const b=N(()=>{const o=new Map;for(const e of g.deployments){if(!e.specName)continue;const r=o.get(e.specName)??[];r.push(e.id),o.set(e.specName,r)}return o}),_=N(()=>{const o=c.value.trim().toLowerCase();return o?u.value.filter(e=>e.name.toLowerCase().includes(o)||(e.description??"").toLowerCase().includes(o)):u.value});return(o,e)=>{const r=D("RouterLink");return s(),a("div",null,[t("div",K,[t("div",null,[e[3]||(e[3]=t("h1",null,"Specs",-1)),t("div",O,[e[2]||(e[2]=l(" Stored once, used by any number of deployments ",-1)),i(k,{label:"why store a spec"},{default:y(()=>[...e[1]||(e[1]=[l(" Without this, every deployment carries its own copy — 50 open pull requests meant 50 identical files, and fixing a teardown step meant re-submitting it 50 times. ",-1)])]),_:1})])])]),m.value?(s(),C(I,{key:0,text:m.value,title:"Could not load the specs."},null,8,["text"])):f("",!0),h.value?(s(),a("section",W,[...e[4]||(e[4]=[t("div",{class:"banner plain"},[t("b",null,"This server has no stored specs."),t("p",null," It is an older build of pstack — every deployment carries its own copy of its spec, which still works. Upgrade the host to store specs and reference them by name. ")],-1)])])):(s(),a("section",G,[v.value?u.value.length?(s(),a(x,{key:1},[t("div",H,[e[5]||(e[5]=t("label",{for:"q"},"Search",-1)),U(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=n=>c.value=n),type:"search",placeholder:"name or description"},null,512),[[T,c.value]])]),t("table",J,[t("thead",null,[t("tr",null,[e[8]||(e[8]=t("th",null,"Name",-1)),e[9]||(e[9]=t("th",null,"Kind",-1)),t("th",null,[e[7]||(e[7]=l(" needs ",-1)),i(k,{label:"what needs means"},{default:y(()=>[...e[6]||(e[6]=[l(" Variables the spec uses but does not set. Every deployment referencing it must supply these, which is how one spec serves many stacks. ",-1)])]),_:1})]),e[10]||(e[10]=t("th",null,"Used by",-1)),e[11]||(e[11]=t("th",null,"Updated",-1))])]),t("tbody",Q,[(s(!0),a(x,null,B(_.value,(n,S)=>{var w;return s(),a("tr",{key:n.name,style:z({"--i":S})},[t("td",X,[i(r,{to:`/specs/${encodeURIComponent(n.name)}`},{default:y(()=>[l(d(n.name),1)]),_:2},1032,["to"]),n.description?(s(),a("div",Y,d(n.description),1)):f("",!0)]),t("td",Z,[t("span",{class:A(["badge",n.kind])},d(R(j)(n.kind)),3)]),t("td",ee,[n.requiredVars.length?(s(),a("span",te,d(n.requiredVars.join(", ")),1)):(s(),a("span",se,"nothing"))]),t("td",ne,[(w=b.value.get(n.name))!=null&&w.length?(s(),a("span",oe,d(b.value.get(n.name).length)+" deployment(s) ",1)):(s(),a("span",ae,"nothing yet"))]),t("td",le,[i(M,{at:n.updatedAt},null,8,["at"])])],4)}),128)),_.value.length?f("",!0):(s(),a("tr",ie,[t("td",de,"No spec matches “"+d(c.value)+"”.",1)]))])])],64)):(s(),a("div",re,[e[15]||(e[15]=t("b",null,"No specs stored yet.",-1)),t("p",null,[e[13]||(e[13]=l(" A deployment can carry its own spec inline — see ",-1)),i(r,{to:"/submit"},{default:y(()=>[...e[12]||(e[12]=[l("Submit",-1)])]),_:1}),e[14]||(e[14]=l(" — and that is all you need for a one-off. Storing one here pays off when several deployments share it. ",-1))]),e[16]||(e[16]=t("p",{class:"mute"},"This page cannot store one yet — the command below does.",-1)),i(P,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(s(),C(F,{key:0,rows:3}))]))])}}});export{be as default};
|
|
2
|
-
//# sourceMappingURL=SpecsView-B49LI4Ut.js.map
|