@samyx/preview-stacks-ui 0.31.0 → 0.32.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-D8Xlp6c9.js +2 -0
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js.map → ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js.map} +1 -1
- package/dist/assets/{AxesTab-BNAORqpJ.js → AxesTab-BWzsbFAx.js} +2 -2
- package/dist/assets/{AxesTab-BNAORqpJ.js.map → AxesTab-BWzsbFAx.js.map} +1 -1
- package/dist/assets/ConfigTab-ucr87rD6.js +2 -0
- package/dist/assets/{ConfigTab-8Ifz-gnA.js.map → ConfigTab-ucr87rD6.js.map} +1 -1
- package/dist/assets/{ConfigView-CPj8QeBo.js → ConfigView-BbRYGyvZ.js} +2 -2
- package/dist/assets/{ConfigView-CPj8QeBo.js.map → ConfigView-BbRYGyvZ.js.map} +1 -1
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js +2 -0
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-DDt6qe65.js.map +1 -0
- package/dist/assets/DangerTab-BimKNJab.js +2 -0
- package/dist/assets/DangerTab-BimKNJab.js.map +1 -0
- package/dist/assets/DashboardView-DK0qDo-f.js +2 -0
- package/dist/assets/{DashboardView-CuDBbXnZ.js.map → DashboardView-DK0qDo-f.js.map} +1 -1
- package/dist/assets/DeploymentDetailView-BcImKApM.js +2 -0
- package/dist/assets/{DeploymentDetailView-qtlOQQ0z.js.map → DeploymentDetailView-BcImKApM.js.map} +1 -1
- package/dist/assets/DeploymentsView-Cx9BqQ8Q.js +2 -0
- package/dist/assets/DeploymentsView-Cx9BqQ8Q.js.map +1 -0
- package/dist/assets/DialogTrigger-nWkfUj3N.js +2 -0
- package/dist/assets/DialogTrigger-nWkfUj3N.js.map +1 -0
- package/dist/assets/{EquivalentCommand-DX5xFW-p.js → EquivalentCommand-D92xDU0_.js} +3 -3
- package/dist/assets/{EquivalentCommand-DX5xFW-p.js.map → EquivalentCommand-D92xDU0_.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js → ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js.map} +1 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js +2 -0
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js.map +1 -0
- package/dist/assets/JobDetailView-B1sXXVJ5.js +2 -0
- package/dist/assets/JobDetailView-B1sXXVJ5.js.map +1 -0
- package/dist/assets/JobsView-CC7lre3Q.css +1 -0
- package/dist/assets/JobsView-DjP5lXHk.js +2 -0
- package/dist/assets/JobsView-DjP5lXHk.js.map +1 -0
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js +3 -0
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-Sg8LzIyX.js.map → LogViewer.vue_vue_type_script_setup_true_lang-Bhy_5cyC.js.map} +1 -1
- package/dist/assets/{LoginView-Gpnnyg1m.js → LoginView-CIkI9Qm_.js} +2 -2
- package/dist/assets/{LoginView-Gpnnyg1m.js.map → LoginView-CIkI9Qm_.js.map} +1 -1
- package/dist/assets/LogsTab-D8zhR7Eb.js +6 -0
- package/dist/assets/{LogsTab-CZ0fNgsO.js.map → LogsTab-D8zhR7Eb.js.map} +1 -1
- package/dist/assets/{NotFoundView-BE2kvYuP.js → NotFoundView-aUtqh2Qi.js} +2 -2
- package/dist/assets/{NotFoundView-BE2kvYuP.js.map → NotFoundView-aUtqh2Qi.js.map} +1 -1
- package/dist/assets/NotifiersView-aRHInxVx.js +2 -0
- package/dist/assets/{NotifiersView-Df_CM6Bj.js.map → NotifiersView-aRHInxVx.js.map} +1 -1
- package/dist/assets/OverviewTab-ChCj5LAj.js +2 -0
- package/dist/assets/{OverviewTab-BSeic8dR.js.map → OverviewTab-ChCj5LAj.js.map} +1 -1
- package/dist/assets/PublicLogsView-DIWJH7qL.js +4 -0
- package/dist/assets/{PublicLogsView-BDyvxkgj.js.map → PublicLogsView-DIWJH7qL.js.map} +1 -1
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-ZUc7pgOx.js → RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js} +2 -2
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-ZUc7pgOx.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js.map} +1 -1
- package/dist/assets/RegistriesView-D2aCsYIu.js +2 -0
- package/dist/assets/{RegistriesView-DMzsLFcT.js.map → RegistriesView-D2aCsYIu.js.map} +1 -1
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js +2 -0
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js.map +1 -0
- package/dist/assets/{RequiresTab-DkuxJsEj.js → RequiresTab-3BhU5BHd.js} +2 -2
- package/dist/assets/{RequiresTab-DkuxJsEj.js.map → RequiresTab-3BhU5BHd.js.map} +1 -1
- package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js +2 -0
- package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js.map +1 -0
- package/dist/assets/RoutingView-T9afX8_M.js +9 -0
- package/dist/assets/RoutingView-T9afX8_M.js.map +1 -0
- package/dist/assets/RoutingView-tn0RQdqM.css +0 -0
- package/dist/assets/RuntimeTab-Bh2gGuhj.js +2 -0
- package/dist/assets/RuntimeTab-Bh2gGuhj.js.map +1 -0
- package/dist/assets/RuntimeTab-By55qdsQ.css +1 -0
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js +2 -0
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js.map} +1 -1
- package/dist/assets/{SettingsView-CgwOmLat.js → SettingsView-DIKjdBdy.js} +2 -2
- package/dist/assets/{SettingsView-CgwOmLat.js.map → SettingsView-DIKjdBdy.js.map} +1 -1
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js → SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js.map} +1 -1
- package/dist/assets/SpecDetailView-Bd4Hx-bI.js +2 -0
- package/dist/assets/{SpecDetailView-BlHaL1Y8.js.map → SpecDetailView-Bd4Hx-bI.js.map} +1 -1
- package/dist/assets/SpecsView-B9qQPzkG.js +2 -0
- package/dist/assets/{SpecsView-C-bS2Av2.js.map → SpecsView-B9qQPzkG.js.map} +1 -1
- package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-aKprkHCF.js → SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js} +2 -2
- package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-aKprkHCF.js.map → SsoMark.vue_vue_type_script_setup_true_lang-BBiCq_4w.js.map} +1 -1
- package/dist/assets/{SsoView-BUz2EaVq.js → SsoView-CltdTdwt.js} +2 -2
- package/dist/assets/{SsoView-BUz2EaVq.js.map → SsoView-CltdTdwt.js.map} +1 -1
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js +2 -0
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-nD6Zdx0q.js.map +1 -0
- package/dist/assets/{SubmitView-s5haxS9q.js → SubmitView-D-jg5Wxy.js} +5 -5
- package/dist/assets/{SubmitView-s5haxS9q.js.map → SubmitView-D-jg5Wxy.js.map} +1 -1
- package/dist/assets/SwarmView-CqFndUrV.js +2 -0
- package/dist/assets/{SwarmView-skNbhHws.js.map → SwarmView-CqFndUrV.js.map} +1 -1
- package/dist/assets/Teleport-I0XiM19H.js +4 -0
- package/dist/assets/{Teleport-CKfsIrp8.js.map → Teleport-I0XiM19H.js.map} +1 -1
- package/dist/assets/TerminalTab-Dleba0ru.js +3 -0
- package/dist/assets/{TerminalTab-CPuFkMzh.js.map → TerminalTab-Dleba0ru.js.map} +1 -1
- package/dist/assets/UsersView-Bd8B9pLD.css +1 -0
- package/dist/assets/UsersView-BrZbuuOg.js +2 -0
- package/dist/assets/UsersView-BrZbuuOg.js.map +1 -0
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js +2 -0
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-uPHU_Ugp.js.map +1 -0
- package/dist/assets/VarIO-BVE8A4Ur.css +1 -0
- package/dist/assets/VarIO-BldCQ6Xx.js +15 -0
- package/dist/assets/VarIO-BldCQ6Xx.js.map +1 -0
- package/dist/assets/VariablesView-CQp0T7Q6.js +3 -0
- package/dist/assets/VariablesView-CQp0T7Q6.js.map +1 -0
- package/dist/assets/VariablesView-Ck3IyRCN.css +1 -0
- package/dist/assets/index-B1ONXQzZ.css +1 -0
- package/dist/assets/index-Cqe_7QZw.js +154 -0
- package/dist/assets/index-Cqe_7QZw.js.map +1 -0
- package/dist/assets/useDeployment-BDbkdxpo.js +2 -0
- package/dist/assets/{useDeployment-CV0kcdoc.js.map → useDeployment-BDbkdxpo.js.map} +1 -1
- package/dist/assets/useJobQueue-D5JkRJNX.js +2 -0
- package/dist/assets/useJobQueue-D5JkRJNX.js.map +1 -0
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js +0 -2
- package/dist/assets/ConfigTab-8Ifz-gnA.js +0 -2
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-B0PJUns4.js +0 -2
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-B0PJUns4.js.map +0 -1
- package/dist/assets/DangerTab-BwXkb6Rr.js +0 -2
- package/dist/assets/DangerTab-BwXkb6Rr.js.map +0 -1
- package/dist/assets/DashboardView-CuDBbXnZ.js +0 -2
- package/dist/assets/DeploymentDetailView-qtlOQQ0z.js +0 -2
- package/dist/assets/DeploymentsView-CQwTTlTI.js +0 -2
- package/dist/assets/DeploymentsView-CQwTTlTI.js.map +0 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-ErbSSi6D.js +0 -2
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-ErbSSi6D.js.map +0 -1
- package/dist/assets/JobDetailView-BgoEL7EB.js +0 -2
- package/dist/assets/JobDetailView-BgoEL7EB.js.map +0 -1
- package/dist/assets/JobsView-CVG0iuN4.js +0 -2
- package/dist/assets/JobsView-CVG0iuN4.js.map +0 -1
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-Sg8LzIyX.js +0 -3
- package/dist/assets/LogsTab-CZ0fNgsO.js +0 -6
- package/dist/assets/NotifiersView-Df_CM6Bj.js +0 -2
- package/dist/assets/OverviewTab-BSeic8dR.js +0 -2
- package/dist/assets/PublicLogsView-BDyvxkgj.js +0 -4
- package/dist/assets/RegistriesView-DMzsLFcT.js +0 -2
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-D4NO-r5D.js +0 -2
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-D4NO-r5D.js.map +0 -1
- package/dist/assets/RoutingView-BEJ3iJ9c.js +0 -9
- package/dist/assets/RoutingView-BEJ3iJ9c.js.map +0 -1
- package/dist/assets/RuntimeTab-DY8ZYeng.css +0 -1
- package/dist/assets/RuntimeTab-bWJuLJcn.js +0 -2
- package/dist/assets/RuntimeTab-bWJuLJcn.js.map +0 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js +0 -2
- package/dist/assets/SpecDetailView-BlHaL1Y8.js +0 -2
- package/dist/assets/SpecsView-C-bS2Av2.js +0 -2
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-C-7EQXcg.js +0 -2
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-C-7EQXcg.js.map +0 -1
- package/dist/assets/SwarmView-skNbhHws.js +0 -2
- package/dist/assets/Teleport-CKfsIrp8.js +0 -4
- package/dist/assets/TerminalTab-CPuFkMzh.js +0 -3
- package/dist/assets/UsersView-Be77zCYE.css +0 -1
- package/dist/assets/UsersView-CIfFPshj.js +0 -2
- package/dist/assets/UsersView-CIfFPshj.js.map +0 -1
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-JwR7DqO1.js +0 -2
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-JwR7DqO1.js.map +0 -1
- package/dist/assets/VariablesView-ByeOvDGJ.css +0 -1
- package/dist/assets/VariablesView-DatC33mT.js +0 -2
- package/dist/assets/VariablesView-DatC33mT.js.map +0 -1
- package/dist/assets/index-B_k9b7xG.css +0 -1
- package/dist/assets/index-T3JGe9ku.js +0 -154
- package/dist/assets/index-T3JGe9ku.js.map +0 -1
- package/dist/assets/useDeployment-CV0kcdoc.js +0 -2
- package/dist/assets/useFormat-DIlTY5Dl.js +0 -2
- package/dist/assets/useFormat-DIlTY5Dl.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.vue_vue_type_script_setup_true_lang-NGvUfuKC.js","sources":["../../src/components/RelativeTime.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A timestamp that stays true — `2m ago` becomes `3m ago` without a reload.\n *\n * WHY NOT JUST CALL `ago()`. It is already correct at first render and wrong a minute later, and a\n * control plane is a page people leave open while watching a deploy. A relative time that silently\n * stops advancing is worse than an absolute one: it looks live and is not.\n *\n * ONE TICKER FOR THE WHOLE PAGE. A per-instance `setInterval` on a hundred-row job list is a\n * hundred timers waking the tab independently. This is a single module-level interval that bumps\n * one shared ref; every instance recomputes from it, and the interval only exists while at least\n * one instance is mounted.\n *\n * THE EXACT TIME IS NEVER LOST — it moves into `title`. \"3m ago\" is what you scan; the ISO stamp is\n * what you need the moment you are correlating with a log somewhere else, and throwing it away to\n * gain readability would be a bad trade.\n */\nimport { computed, onMounted, onUnmounted, ref } from 'vue';\nimport { ago, stamp } from '../composables/useFormat';\n\n// `null` as well as `undefined`: a queued job's `startedAt` is null, and it renders as an em dash.\nconst props = defineProps<{ at: number | null | undefined }>();\n\nconst now = ref(Date.now());\nlet timer: ReturnType<typeof setInterval> | null = null;\nlet mounted = 0;\n\n/**\n * 15s, not 1s. The coarsest unit this renders is a minute, so ticking every second would repaint\n * sixty times to change a label once; 15s bounds the staleness to a quarter of the smallest unit,\n * which nobody can perceive.\n */\nconst TICK_MS = 15_000;\n\nonMounted(() => {\n mounted++;\n if (!timer) timer = setInterval(() => (now.value = Date.now()), TICK_MS);\n});\nonUnmounted(() => {\n mounted--;\n if (mounted === 0 && timer) {\n clearInterval(timer);\n timer = null;\n }\n});\n\n// Reading `now` is what subscribes this instance to the ticker; `ago` itself calls Date.now().\nconst text = computed(() => (now.value, ago(props.at)));\n</script>\n\n<template>\n <time :datetime=\"at ? new Date(at).toISOString() : undefined\" :title=\"stamp(at)\">{{ text }}</time>\n</template>\n"],"names":["TICK_MS","props","__props","now","ref","timer","mounted","onMounted","onUnmounted","text","computed","ago","_createElementBlock","_unref","stamp","_hoisted_1"],"mappings":"uIAgCMA,EAAU,uDAXhB,MAAMC,EAAQC,EAERC,EAAMC,EAAI,KAAK,IAAA,CAAK,EAC1B,IAAIC,EAA+C,KAC/CC,EAAU,EASdC,EAAU,IAAM,CACdD,IACKD,IAAOA,EAAQ,YAAY,IAAOF,EAAI,MAAQ,KAAK,IAAA,EAAQH,CAAO,EACzE,CAAC,EACDQ,EAAY,IAAM,CAChBF,IACIA,IAAY,GAAKD,IACnB,cAAcA,CAAK,EACnBA,EAAQ,KAEZ,CAAC,EAGD,MAAMI,EAAOC,EAAS,KAAOP,EAAI,MAAOQ,EAAIV,EAAM,EAAE,EAAE,oBAIpDW,EAAkG,OAAA,CAA3F,SAAUV,KAAE,IAAO,KAAKA,EAAA,EAAE,EAAE,YAAA,EAAgB,OAAY,MAAOW,EAAAC,CAAA,EAAMZ,EAAA,EAAE,CAAA,IAAMO,EAAA,KAAI,EAAA,EAAAM,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./useDeployment-
|
|
2
|
-
//# sourceMappingURL=RequiresTab-
|
|
1
|
+
import{d as o}from"./useDeployment-BDbkdxpo.js";import{d as m,c as s,a as e,f as n,u as l,F as i,r as c,g as h,o as a,D as p,t as d}from"./index-Cqe_7QZw.js";import"./useVars-VN9gYdR6.js";const y={class:"panel"},f={key:0,class:"mute"},_={class:"cards"},b={class:"stagger"},g={class:"name","data-label":"requirement"},k={class:"dim","data-label":"hint"},q={key:0},R=m({__name:"RequiresTab",setup(v){return(x,t)=>(a(),s("section",y,[t[3]||(t[3]=e("h2",{class:"section",style:{"margin-bottom":"var(--s3)"}},[n(" Requires "),e("span",{class:"mute"},"(checked before anything is created)")],-1)),l(o).detail?(a(),s(i,{key:1},[t[2]||(t[2]=e("p",{class:"hint",style:{margin:"0 0 var(--s3)"}},[n(" Preconditions run first, in order, and "),e("code",null,"up"),n(" stops at the first one that fails — by name, before a single resource exists. The "),e("code",null,"assert"),n(" command itself stays on the host; only the name and its authored hint are sent here. ")],-1)),e("table",_,[t[1]||(t[1]=e("thead",null,[e("tr",null,[e("th",null,"Requirement"),e("th",null,"Hint shown on failure")])],-1)),e("tbody",b,[(a(!0),s(i,null,c(l(o).detail.requires,(r,u)=>(a(),s("tr",{key:r.name,style:p({"--i":u})},[e("td",g,d(r.name),1),e("td",k,d(r.hint||"— (no hint authored)"),1)],4))),128)),l(o).detail.requires.length?h("",!0):(a(),s("tr",q,[...t[0]||(t[0]=[e("td",{colspan:"2",class:"mute"}," None declared — an isolated deployment that borrows shared infrastructure usually wants at least one. ",-1)])]))])])],64)):(a(),s("p",f,"Unavailable until the spec resolves."))]))}});export{R as default};
|
|
2
|
+
//# sourceMappingURL=RequiresTab-3BhU5BHd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequiresTab-
|
|
1
|
+
{"version":3,"file":"RequiresTab-3BhU5BHd.js","sources":["../../src/views/tabs/RequiresTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** Preconditions: checked before anything is created, so a failure names a thing, not a stack trace. */\nimport { dep } from '../../composables/useDeployment';\n</script>\n\n<template>\n <section class=\"panel\">\n <h2 class=\"section\" style=\"margin-bottom: var(--s3)\">\n Requires <span class=\"mute\">(checked before anything is created)</span>\n </h2>\n\n <p v-if=\"!dep.detail\" class=\"mute\">Unavailable until the spec resolves.</p>\n <template v-else>\n <p class=\"hint\" style=\"margin: 0 0 var(--s3)\">\n Preconditions run first, in order, and <code>up</code> stops at the first one that fails —\n by name, before a single resource exists. The <code>assert</code> command itself stays on\n the host; only the name and its authored hint are sent here.\n </p>\n\n <table class=\"cards\">\n <thead>\n <tr>\n <th>Requirement</th>\n <th>Hint shown on failure</th>\n </tr>\n </thead>\n <tbody class=\"stagger\">\n <tr v-for=\"(r, i) in dep.detail.requires\" :key=\"r.name\" :style=\"{ '--i': i }\">\n <td class=\"name\" data-label=\"requirement\">{{ r.name }}</td>\n <td class=\"dim\" data-label=\"hint\">{{ r.hint || '— (no hint authored)' }}</td>\n </tr>\n <tr v-if=\"!dep.detail.requires.length\">\n <td colspan=\"2\" class=\"mute\">\n None declared — an isolated deployment that borrows shared infrastructure usually\n wants at least one.\n </td>\n </tr>\n </tbody>\n </table>\n </template>\n </section>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_unref","dep","_Fragment","_hoisted_3","_hoisted_4","_renderList","i","_hoisted_5","_toDisplayString","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QZw.js";const a=["title"],r={key:1,class:"s-leaked"},i={key:2,class:"s-failed"},c={key:3,class:"s-unverifiable",title:"A swarm task on another node. The manager lists it but cannot see its address — this is normal, and nothing needs fixing."},l={key:4,class:"s-unverifiable",title:"This server did not say why."},g=s({__name:"RouteTarget",props:{route:{}},setup(e){return(d,u)=>e.route.target?(t(),n("span",{key:0,class:"mono cell-clip",title:e.route.target},o(e.route.target),9,a)):e.route.targetReason==="no-port"?(t(),n("span",r," no port declared ")):e.route.targetReason==="not-on-ingress"?(t(),n("span",i," not on the ingress network ")):e.route.targetReason==="unknown-node"?(t(),n("span",c," address not known from this node ")):(t(),n("span",l,"not known"))}});export{g as _};
|
|
2
|
+
//# sourceMappingURL=RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js","sources":["../../src/components/RouteTarget.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The \"Forwards to\" cell: the address Traefik assembled, or WHY it could not.\n *\n * ONE COMPONENT, TWO PAGES. The deployment's Runtime tab and the host-wide Routing page render the\n * same fact from the same shape, and they used to render it from two copies of the same ternary —\n * which is how the two would drift the moment one of them learned something the other did not.\n *\n * WHY NOT A TERNARY. `target === null` had two branches, `port === null ? 'no port declared' :\n * 'not on the ingress network'`, and under swarm the second one was wrong for EVERY route: the\n * routers live on the SERVICE, whose address this node cannot see, so a perfectly healthy stack read\n * as a misconfiguration. The server now says which of the three it is (`targetReason`), and the three\n * are coloured by whether anyone should act:\n *\n * no-port amber — the router works, Traefik is guessing the port; probably fix it\n * not-on-ingress red — a real misconfiguration; the hostname 404s until it is fixed\n * unknown-node neutral — normal under swarm; nothing to do\n *\n * THE FINAL `v-else` IS THE OLD-SERVER BRANCH. `targetReason` is typed non-optional because the UI\n * and the server ship together, but a UI pointed at an older binary receives no field at all. That\n * must not fall into \"not on the ingress network\" — accusing a healthy stack of the exact bug this\n * replaced. It falls here instead, and says only what is true: nothing is known.\n */\nimport type { RuntimeRoute } from '../api/types';\n\ndefineProps<{ route: RuntimeRoute }>();\n</script>\n\n<template>\n <!-- `cell-clip`: an IPv6 address is long, the column is fixed-width, and the whole value stays\n reachable in `title`. The reasons below are short by construction and wrap on their own. -->\n <span v-if=\"route.target\" class=\"mono cell-clip\" :title=\"route.target\">{{ route.target }}</span>\n <span v-else-if=\"route.targetReason === 'no-port'\" class=\"s-leaked\">\n no port declared\n </span>\n <span v-else-if=\"route.targetReason === 'not-on-ingress'\" class=\"s-failed\">\n not on the ingress network\n </span>\n <span\n v-else-if=\"route.targetReason === 'unknown-node'\"\n class=\"s-unverifiable\"\n title=\"A swarm task on another node. The manager lists it but cannot see its address — this is normal, and nothing needs fixing.\"\n >\n address not known from this node\n </span>\n <span v-else class=\"s-unverifiable\" title=\"This server did not say why.\">not known</span>\n</template>\n"],"names":["__props","_createElementBlock","_toDisplayString","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5"],"mappings":"+aA+BcA,EAAA,MAAM,YAAlBC,EAAgG,OAAA,OAAtE,MAAM,iBAAkB,MAAOD,EAAA,MAAM,MAAA,EAAWE,EAAAF,EAAA,MAAM,MAAM,EAAA,EAAAG,CAAA,GACrEH,EAAA,MAAM,eAAY,eAAnCC,EAEO,OAFPG,EAAoE,oBAEpE,GACiBJ,EAAA,MAAM,eAAY,sBAAnCC,EAEO,OAFPI,EAA2E,8BAE3E,GAEaL,EAAA,MAAM,eAAY,oBAD/BC,EAMO,OANPK,EAIC,oCAED,QACAL,EAAyF,OAAzFM,EAAyE,WAAS"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{d as oe,c as o,a as t,f as n,e as c,w as f,_ as O,g as d,z as w,t as v,F as g,r as E,u as x,$ as A,i as j,v as z,j as r,k as q,p as _,C as L,l as ne,U as J,o as s,D as ae,R as ie}from"./index-Cqe_7QZw.js";import{_ as K}from"./ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js";import{_ as Q}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js";import{_ as X}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js";import{_ as re}from"./HelpModal.vue_vue_type_script_setup_true_lang-CSOdBT2E.js";import{_ as ue}from"./RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js";import{_ as de}from"./RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js";import{_ as ve}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DialogTrigger-nWkfUj3N.js";import"./Teleport-I0XiM19H.js";const pe={class:"page-head"},ce={class:"sub"},fe={key:1,class:"banner info"},me={class:"panel"},he={class:"phead"},ye={class:"mute",style:{"font-size":"var(--t-sm)"}},be={key:0,class:"banner warn"},ke={key:1,class:"table-scroll"},we={class:"cards tbl-fixed t-live"},ge={class:"stagger"},_e={class:"cell-wrap","data-label":"url"},Re=["href"],Te={key:1,class:"mono mute"},Ce={key:0,class:"mute"},$e={"data-label":"forwards to"},xe={"data-label":"deployment"},Ae={key:1,class:"mute"},Le={class:"dim","data-label":"router"},Ne=["title"],Se={key:2,class:"mute"},Ie={class:"panel"},Ue={class:"phead"},De={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Pe={class:"mute"},Ve={key:0,class:"banner failed"},Ee={key:1,class:"banner info"},je={key:3,class:"kvlist"},ze={class:"k"},Fe=["onClick"],Be={class:"v mute",style:{"font-size":"var(--t-sm)"}},We={key:4,class:"mute"},Me={key:2,class:"panel"},He={class:"phead"},Ge={class:"section"},Oe={key:0,class:"badge warn"},qe={key:0,class:"field",style:{"max-width":"340px"}},Je={key:2,class:"banner plain"},Ke={class:"field"},Qe={class:"row",style:{"margin-top":"var(--s4)"}},Xe={key:0,class:"mute"},Ye={class:"field",style:{"max-width":"340px"}},Ze=["for"],et=["id","placeholder"],tt={class:"row"},st=`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
|
+
`,lt=oe({__name:"RoutingView",setup(ot){const N=r([]),S=r(null),I=r([]),U=r(""),D=r(null),F=r(!1),R=r(""),i=r(null),u=r(""),m=r(""),T=r(!1),P=r(!1),b=r(!1),p=r(""),C=r(""),h=r(null),y=r(""),B=q(()=>i.value!==null&&u.value!==m.value),Y=q(()=>!!A.token&&!b.value&&u.value.trim().length>0&&(B.value||i.value===""));async function Z(){await Promise.all([$(),W()])}async function $(){const l=await _.get("/api/routing");if(F.value=!0,!l.ok){R.value=L(l,"load the routing files");return}R.value="",I.value=l.body.files??[],U.value=l.body.dir??"",D.value=l.body.writable??!1}async function W(){const l=await _.get("/api/routing/live");if(!l.ok){S.value=!1;return}S.value=l.body.reachable,N.value=l.body.routes??[]}$(),W();async function ee(l){i.value=l,P.value=!0,p.value="",T.value=!1,y.value="";const e=await _.getAuthed(`/api/routing/${encodeURIComponent(l)}`);if(P.value=!1,!e.ok){p.value=L(e,"open this file");return}if(e.body.sourceWithheld){T.value=!0,u.value="",m.value="";return}u.value=e.body.content??"",m.value=u.value}function te(){i.value="",C.value="",u.value=st,m.value="",T.value=!1,p.value=""}function M(){i.value=null,u.value="",m.value="",p.value=""}async function H(){const l=i.value===""?C.value.trim():i.value;if(!l){p.value="Give the file a name, ending in .yml";return}b.value=!0,p.value="";const e=await _.put(`/api/routing/${encodeURIComponent(l)}`,{content:u.value});if(b.value=!1,!e.ok){p.value=L(e,"save this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),m.value=u.value,i.value=l,J("ok",`Saved ${l}. Traefik reloads within a second or two.`),$()}async function se(){const l=h.value;l&&(u.value=l.content,i.value=l.name,await H(),h.value=null)}async function le(){const l=i.value;if(!l||y.value!==l)return;const e=await _.del(`/api/routing/${encodeURIComponent(l)}`);if(!e.ok){p.value=L(e,"delete this file");return}e.body.previous&&(h.value={name:l,content:e.body.previous}),J("ok",`Deleted ${l}.`),M(),$()}return(l,e)=>{const V=ne("RouterLink");return s(),o("div",null,[t("div",pe,[t("div",null,[t("h1",null,[e[4]||(e[4]=n(" Routing ",-1)),c(re,{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",ce,[e[6]||(e[6]=n(" Every route on this host, and the config files behind them ",-1)),c(O,{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)),D.value?(s(),o("button",{key:0,class:"btn primary",onClick:te},"New file")):d("",!0),e[8]||(e[8]=t("span",{class:"grow"},null,-1)),c(ue,{run:Z})]),R.value?(s(),w(Q,{key:0,text:R.value,title:"Could not load the routing files."},null,8,["text"])):d("",!0),h.value?(s(),o("div",fe,[t("b",null,"Replaced "+v(h.value.name)+".",1),t("p",null,[e[9]||(e[9]=n(" The previous contents are still here for this session. ",-1)),t("button",{class:"btn sm",onClick:se},"Put it back")])])):d("",!0),t("section",me,[t("div",he,[e[12]||(e[12]=t("h2",{class:"section"},"Live routes",-1)),e[13]||(e[13]=t("span",{class:"grow"},null,-1)),t("span",ye,[e[11]||(e[11]=n(" from container labels ",-1)),c(O,{label:"why routes are not in the files below",align:"end"},{default:f(()=>[...e[10]||(e[10]=[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})])]),S.value===!1?(s(),o("div",be,[...e[14]||(e[14]=[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)])])):N.value.length?(s(),o("div",ke,[t("table",we,[e[15]||(e[15]=t("colgroup",null,[t("col",{style:{width:"34%"}}),t("col",{style:{width:"24%"}}),t("col",{style:{width:"20%"}}),t("col",{style:{width:"22%"}})],-1)),e[16]||(e[16]=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",ge,[(s(!0),o(g,null,E(N.value,(a,G)=>(s(),o("tr",{key:`${a.container}-${a.router}`,style:ae({"--i":G})},[t("td",_e,[(s(!0),o(g,null,E(a.hosts,k=>(s(),o("div",{key:k},[k.startsWith("(pattern)")?(s(),o("span",Te,v(k),1)):(s(),o("a",{key:0,href:`https://${k}`,target:"_blank",rel:"noreferrer"},v(k),9,Re))]))),128)),a.hosts.length?d("",!0):(s(),o("span",Ce,"no host in the rule"))]),t("td",$e,[c(de,{route:a},null,8,["route"])]),t("td",xe,[a.project?(s(),w(V,{key:0,class:"cell-clip",title:a.project,to:`/deployments/${encodeURIComponent(a.project)}/runtime`},{default:f(()=>[n(v(a.project),1)]),_:2},1032,["title","to"])):(s(),o("span",Ae,"—"))]),t("td",Le,[t("span",{class:"cell-clip",title:a.router},v(a.router),9,Ne)])],4))),128))])])])):(s(),o("p",Se,[...e[17]||(e[17]=[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",Ie,[t("div",Ue,[e[18]||(e[18]=t("h2",{class:"section"},"Config files",-1)),e[19]||(e[19]=t("span",{class:"grow"},null,-1)),U.value?(s(),o("span",De,[t("span",Pe,v(U.value),1)])):d("",!0)]),D.value===!1?(s(),o("div",Ve,[...e[20]||(e[20]=[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(A).token?d("",!0):(s(),o("div",Ee,[e[24]||(e[24]=t("b",null,"Viewing needs a token too.",-1)),t("p",null,[e[22]||(e[22]=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[21]||(e[21]=[n("Add your token",-1)])]),_:1}),e[23]||(e[23]=n(". ",-1))])])),F.value?I.value.length?(s(),o("ul",je,[(s(!0),o(g,null,E(I.value,a=>(s(),o("li",{key:a.name},[t("span",ze,[t("button",{class:"ghost sm",onClick:G=>ee(a.name)},v(a.name),9,Fe)]),t("span",Be,v(a.size)+" bytes · "+v(x(ie)(a.updatedAt)),1)]))),128))])):(s(),o("p",We," No files yet. Everything is routed by container labels, which is a perfectly good place to be. ")):(s(),w(X,{key:2,rows:3}))]),i.value!==null?(s(),o("section",Me,[t("div",He,[t("h2",Ge,v(i.value===""?"New file":i.value),1),B.value?(s(),o("span",Oe,"unsaved")):d("",!0),e[25]||(e[25]=t("span",{class:"grow"},null,-1)),t("button",{class:"ghost sm",onClick:M},"Close")]),i.value===""?(s(),o("div",qe,[e[26]||(e[26]=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[27]||(e[27]=t("div",{class:"mute hint"},[n("Lower case, ending in "),t("code",null,".yml"),n(".")],-1))])):d("",!0),P.value?(s(),w(X,{key:1,rows:4})):T.value?(s(),o("div",Je,[e[30]||(e[30]=t("b",null,"Hidden without an access token.",-1)),t("p",null,[c(V,{to:"/settings"},{default:f(()=>[...e[28]||(e[28]=[n("Add your token",-1)])]),_:1}),e[29]||(e[29]=n(" to read and edit this file. ",-1))])])):(s(),o(g,{key:3},[t("div",Ke,[e[31]||(e[31]=t("label",{for:"content"},"Contents",-1)),j(t("textarea",{id:"content","onUpdate:modelValue":e[1]||(e[1]=a=>u.value=a),rows:"18",spellcheck:"false"},null,512),[[z,u.value]])]),p.value?(s(),w(Q,{key:0,text:p.value,title:"Traefik would not accept this."},null,8,["text"])):d("",!0),t("div",Qe,[c(K,{variant:"primary",pending:b.value,disabled:!Y.value,onClick:H},{default:f(()=>[n(v(b.value?"Saving…":"Save"),1)]),_:1},8,["pending","disabled"]),x(A).token?d("",!0):(s(),o("span",Xe,"Saving needs a token."))]),i.value?(s(),o(g,{key:1},[e[35]||(e[35]=t("h2",{class:"section",style:{margin:"var(--s5) 0 var(--s3)"}},"Delete this file",-1)),e[36]||(e[36]=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",Ye,[t("label",{for:`confirm-${i.value}`},[e[32]||(e[32]=n(" Type ",-1)),t("b",null,v(i.value),1),e[33]||(e[33]=n(" to confirm ",-1))],8,Ze),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,et),[[z,y.value,void 0,{trim:!0}]])]),t("div",tt,[c(K,{variant:"danger",disabled:y.value!==i.value||!x(A).token,title:y.value!==i.value?"Type the file name to confirm.":void 0,onClick:le},{default:f(()=>[...e[34]||(e[34]=[n(" Delete ",-1)])]),_:1},8,["disabled","title"])])],64)):d("",!0)],64))])):d("",!0)])}}}),mt=ve(lt,[["__scopeId","data-v-a18004fb"]]);export{mt as default};
|
|
9
|
+
//# sourceMappingURL=RoutingView-T9afX8_M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoutingView-T9afX8_M.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';\nimport RefreshButton from '../components/RefreshButton.vue';\nimport RouteTarget from '../components/RouteTarget.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 *\n * The table is fixed-layout inside `.table-scroll`, like the deployment's own: host-wide, every\n * router and project name carries a stack name, and under auto layout the longest one on the host\n * set the width for all of them. `RouteTarget` is shared with that table so the two cannot come to\n * describe the same missing address differently.\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\n/** Both halves: the file provider's directory AND the routes Traefik actually has. */\nasync function refreshAll(): Promise<void> {\n await Promise.all([loadList(), loadLive()]);\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 <span class=\"grow\" />\n <RefreshButton :run=\"refreshAll\" />\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 <div v-else-if=\"live.length\" class=\"table-scroll\">\n <table class=\"cards tbl-fixed t-live\">\n <!--\n Host-wide, so every identifier here is longer than its per-deployment equivalent: routers\n and projects both carry the stack name. URL still wraps rather than clips — it is the one\n value on the row anyone reads to the end.\n -->\n <colgroup>\n <col style=\"width: 34%\" />\n <col style=\"width: 24%\" />\n <col style=\"width: 20%\" />\n <col style=\"width: 22%\" />\n </colgroup>\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 class=\"cell-wrap\" 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 <RouteTarget :route=\"r\" />\n </td>\n <td data-label=\"deployment\">\n <RouterLink\n v-if=\"r.project\"\n class=\"cell-clip\"\n :title=\"r.project\"\n :to=\"`/deployments/${encodeURIComponent(r.project)}/runtime`\"\n >\n {{ r.project }}\n </RouterLink>\n <span v-else class=\"mute\">—</span>\n </td>\n <td class=\"dim\" data-label=\"router\">\n <span class=\"cell-clip\" :title=\"r.router\">{{ r.router }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\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\n<style scoped>\n/*\n * `.t-live`'s floor is in `app.css` with the other two, beside the `.tbl-fixed` comment that\n * promises it. It is derived from the `<colgroup>` above.\n */\n</style>\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","refreshAll","loadList","loadLive","r","api","problem","open","name","startNew","close","save","toast","revert","u","remove","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_Fragment","_renderList","i","_hoisted_11","h","_hoisted_13","_hoisted_12","_hoisted_14","_hoisted_15","RouteTarget","_hoisted_16","_component_RouterLink","_createTextVNode","_hoisted_17","_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":"4hEAmFMA,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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,EAAA,WAAhB6B,EA6BWqB,EAAA,CAAA,IAAA,GAAA,eA5BTpB,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,MAZN+D,GAYM,CAXJ/D,EAEQ,QAAA,CAFA,eAAgB9B,EAAA,KAAQ,EAAA,mBAAI,SAC7B,EAAA,GAAA8B,EAAqB,WAAf9B,EAAA,KAAQ,EAAA,CAAA,kBAAO,eAC5B,EAAA,EAAA,UACA8B,EAOE,QAAA,CANC,cAAe9B,EAAA,KAAQ,wCACVS,EAAa,MAAAoE,GAC3B,KAAK,OACJ,YAAa7E,EAAA,MACd,WAAW,QACX,aAAa,KAAA,iBAJCS,EAAA,aAAN,CAAA,KAAR,EAAA,CAA4B,MAOhCqB,EASM,MATNgE,GASM,CARJ9D,EAOe2D,EAAA,CANb,QAAQ,SACP,SAAUlF,EAAA,QAAkBT,SAAQ,CAAKwE,EAAA3D,CAAA,EAAS,MAClD,MAAOJ,EAAA,QAAkBT,EAAA,uCAA8C,OACvE,QAAO4B,EAAA,aACT,IAED,CAAA,GAAAM,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,WAED,EAAA,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as M,z as b,w as m,u as f,g as u,o as n,e as h,a as t,t as l,E as w,f as r,c as o,r as C,F as y,k as x,N as V,x as W,_ as U,j as N,l as K,D as z,M as A,p as E,C as B,U as F}from"./index-Cqe_7QZw.js";import{d as S,v as j}from"./useDeployment-BDbkdxpo.js";import{_ as H}from"./SkeletonList.vue_vue_type_script_setup_true_lang-BmeRGmxf.js";import{_ as L}from"./ActionButton.vue_vue_type_script_setup_true_lang-D8Xlp6c9.js";import{_ as G}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DVbGiVTB.js";import{D as Q,a as q,b as J,c as X,d as Y,e as Z,f as ee}from"./DialogTrigger-nWkfUj3N.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as te}from"./RouteTarget.vue_vue_type_script_setup_true_lang-Caee0wEB.js";import{_ as se}from"./RefreshButton.vue_vue_type_script_setup_true_lang-P7VwWcRa.js";import"./useVars-VN9gYdR6.js";import"./Teleport-I0XiM19H.js";const ne={class:"help-head"},oe={class:"help-body"},le=M({__name:"FindingsModal",props:{findings:{}},setup(T){const i=T,k={error:0,warn:1,info:2},_=x(()=>[...i.findings].sort((p,v)=>k[p.level]-k[v.level])),g=x(()=>{var p;return((p=_.value[0])==null?void 0:p.level)??"info"}),I={error:"Blocking",warn:"Worth checking",info:"Notes"},$={error:"failed",warn:"warn",info:"info"},D={error:"failed",warn:"warn",info:"plain"};return(p,v)=>T.findings.length?(n(),b(f(Q),{key:0},{default:m(()=>[h(f(q),{class:w(["btn sm findings-btn",g.value])},{default:m(()=>[t("span",{class:w(["badge",$[g.value]])},l(T.findings.length),3),r(" "+l(I[g.value]),1)]),_:1},8,["class"]),h(f(ee),null,{default:m(()=>[h(f(J),{class:"scrim help-scrim"}),h(f(X),{class:"help-modal"},{default:m(()=>[t("div",ne,[h(f(Y),{class:"help-title"},{default:m(()=>[...v[0]||(v[0]=[r("What pstack noticed",-1)])]),_:1}),h(f(Z),{class:"ghost sm","aria-label":"Close"},{default:m(()=>[...v[1]||(v[1]=[r("Close",-1)])]),_:1})]),t("div",oe,[(n(!0),o(y,null,C(_.value,(R,a)=>(n(),o("div",{key:a,class:w(["banner",D[R.level]])},[t("b",null,l(I[R.level]),1),t("p",null,l(R.message),1)],2))),128))])]),_:1})]),_:1})]),_:1})):u("",!0)}}),ae=O(le,[["__scopeId","data-v-c92eabc7"]]),re={key:0,class:"banner warn"},ie={key:0,class:"row",style:{margin:"var(--s3) 0"}},de={key:1,class:"banner ok"},ue={class:"panel"},pe={class:"phead"},me={class:"mute",style:{"font-size":"var(--t-sm)"}},he={key:0,class:"table-scroll"},fe={class:"cards tbl-fixed t-routes"},ve={class:"stagger"},ce={class:"cell-wrap","data-label":"url"},ge=["href"],ye={key:1,class:"mono mute"},ke={key:0,class:"mute"},_e={"data-label":"forwards to"},be=["title"],we={"data-label":"router"},$e=["title"],Re={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Ce={"data-label":"tls"},Se={key:0,class:"badge ok"},Te={key:1,class:"badge off"},Ie={key:1,class:"banner warn"},Ne={class:"panel"},xe={class:"phead"},De={class:"mute",style:{"font-size":"var(--t-sm)"}},Pe={key:0,class:"table-scroll"},Le={key:0,style:{width:"14ch"}},Ue={key:0},ze={class:"stagger"},Ae={class:"name","data-label":"service"},Ee=["title"],Be=["title"],Fe={key:0,"data-label":"node"},je=["title"],Me={key:0,class:"badge",title:"runs on another swarm node — logs reach it through the manager; a shell and stop/start do not"},Oe={"data-label":"state"},Ve={"data-label":"ports"},We={class:"mono"},Ke={key:0,class:"mute"},He={key:0,class:"mute"},Ge={"data-label":"networks"},Qe=["title"],qe=["title"],Je={class:"dim","data-label":"image"},Xe=["title"],Ye={class:"row-actions","data-label":""},Ze={key:0,class:"badge",title:"a one-shot job — it runs to completion; there is no long-lived container to start, stop, or open a shell in"},et={key:1,class:"mute",style:{"font-size":"var(--t-sm)"},title:"runs on another swarm node — redeploy the stack, or act on the worker itself"},tt=["href"],st={key:1,class:"mute"},nt=M({__name:"RuntimeTab",setup(T){const i=N(null),k=N(""),_=N(!0);async function g(){const a=await E.get(`/api/deployments/${encodeURIComponent(S.id)}/runtime${j.value}`);if(_.value=!1,!a.ok){k.value=B(a,"inspect what is running");return}k.value="",i.value=a.body}V(()=>S.id,()=>{_.value=!0,g()},{immediate:!0}),W(()=>void g(),8e3);const I=x(()=>{var a;return((a=i.value)==null?void 0:a.containers.filter(e=>e.state==="running").length)??0}),$=x(()=>{var a;return((a=i.value)==null?void 0:a.containers.some(e=>e.node))??!1});function D(a){const e=a.split(".");return e.length===3?`${e[1]}.${e[2]}`:a}const p=N("");async function v(a,e){p.value=`${e}:${a.name}`;const c=await E.post(`/api/deployments/${encodeURIComponent(S.id)}/containers/${encodeURIComponent(a.name)}/${e}${j.value}`);if(p.value="",!c.ok){F("error",B(c,`${e} ${a.name}`));return}F("ok",c.body.note??`${a.name}: ${e} done.`),g()}function R(a){var c;const e=(c=i.value)==null?void 0:c.routes.filter(s=>s.container===a.name||s.container===a.service).flatMap(s=>s.hosts).find(s=>!s.startsWith("(pattern)"));return e?`https://${e}`:null}return(a,e)=>{const c=K("RouterLink");return n(),o("div",null,[k.value?(n(),b(G,{key:0,text:k.value,title:"Could not inspect this deployment."},null,8,["text"])):u("",!0),_.value&&!i.value?(n(),b(H,{key:1,rows:5})):i.value?(n(),o(y,{key:2},[i.value.reachable?(n(),o(y,{key:1},[i.value.findings.length?(n(),o("div",ie,[h(ae,{findings:i.value.findings},null,8,["findings"])])):u("",!0),!i.value.findings.length&&i.value.containers.length?(n(),o("div",de,[...e[1]||(e[1]=[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",ue,[t("div",pe,[e[3]||(e[3]=t("h2",{class:"section"},"Routing",-1)),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),t("span",me,[r(" TLS: "+l(i.value.challenge==="unknown"?"unknown":i.value.challenge)+" ",1),h(U,{label:"why the TLS mode matters here",align:"end"},{default:m(()=>[...e[2]||(e[2]=[r(" Under HTTP-01 every per-PR router needs ",-1),t("code",null,"tls.certresolver=le",-1),r(", 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})])]),i.value.routes.length?(n(),o("div",he,[t("table",fe,[e[10]||(e[10]=t("colgroup",null,[t("col",{style:{width:"34%"}}),t("col",{style:{width:"26%"}}),t("col",{style:{width:"26%"}}),t("col",{style:{width:"14%"}})],-1)),t("thead",null,[t("tr",null,[e[7]||(e[7]=t("th",null,"URL",-1)),t("th",null,[e[6]||(e[6]=r(" Forwards to ",-1)),h(U,{label:"how a URL reaches a port"},{default:m(()=>[...e[5]||(e[5]=[r(" Traefik's docker provider resolves the container's IP on ",-1),t("code",null,"preview-ingress",-1),r(" and dials it on the port from ",-1),t("code",null,"loadbalancer.server.port",-1),r(" — it does ",-1),t("em",null,"not",-1),r(" use ",-1),t("code",null,"service:port",-1),r(" DNS. So the port here is the one inside the container, and publishing a host port is unnecessary. ",-1)])]),_:1})]),e[8]||(e[8]=t("th",null,"Router",-1)),e[9]||(e[9]=t("th",null,"TLS",-1))])]),t("tbody",ve,[(n(!0),o(y,null,C(i.value.routes,(s,P)=>(n(),o("tr",{key:s.router,style:z({"--i":P})},[t("td",ce,[(n(!0),o(y,null,C(s.hosts,d=>(n(),o("div",{key:d},[d.startsWith("(pattern)")?(n(),o("span",ye,l(d),1)):(n(),o("a",{key:0,href:`https://${d}`,target:"_blank",rel:"noreferrer"},l(d),9,ge))]))),128)),s.hosts.length?u("",!0):(n(),o("span",ke,"no host in the rule"))]),t("td",_e,[h(te,{route:s},null,8,["route"]),t("div",{class:"mute cell-clip",style:{"font-size":"var(--t-sm)"},title:s.container},l(s.container),9,be)]),t("td",we,[t("div",{class:"cell-clip",title:s.router},l(s.router),9,$e),s.priority?(n(),o("div",Re," priority "+l(s.priority),1)):u("",!0)]),t("td",Ce,[s.tls?(n(),o("span",Se,l(s.certresolver||"inherited"),1)):(n(),o("span",Te,"off"))])],4))),128))])])])):(n(),o("div",Ie,[e[16]||(e[16]=t("b",null,"No routes. Traefik has not been told about this deployment.",-1)),t("p",null,[e[12]||(e[12]=r(" Routes come from labels in ",-1)),e[13]||(e[13]=t("em",null,"your",-1)),e[14]||(e[14]=r(" compose file, not from pstack and not from the ",-1)),h(c,{to:"/routing"},{default:m(()=>[...e[11]||(e[11]=[r("Routing",-1)])]),_:1}),e[15]||(e[15]=r(" page (that is Traefik's file provider — middleware and TLS options, not per-PR routers). A reachable service needs four things: ",-1))]),e[17]||(e[17]=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[18]||(e[18]=t("p",{class:"mute"},[r(" Put "),t("code",null,"${STACK}"),r(" 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",Ne,[t("div",xe,[e[19]||(e[19]=t("h2",{class:"section"},"Containers",-1)),e[20]||(e[20]=t("span",{class:"grow"},null,-1)),t("span",De,l(I.value)+" of "+l(i.value.containers.length)+" running ",1),h(se,{run:g,busy:_.value},null,8,["busy"])]),i.value.containers.length?(n(),o("div",Pe,[t("table",{class:w(["cards tbl-fixed t-containers",{swarm:$.value}])},[t("colgroup",null,[e[21]||(e[21]=t("col",{style:{width:"22ch"}},null,-1)),$.value?(n(),o("col",Le)):u("",!0),e[22]||(e[22]=t("col",{style:{width:"12ch"}},null,-1)),e[23]||(e[23]=t("col",{style:{width:"13ch"}},null,-1)),e[24]||(e[24]=t("col",{style:{width:"20ch"}},null,-1)),e[25]||(e[25]=t("col",null,null,-1)),e[26]||(e[26]=t("col",{style:{width:"288px"}},null,-1))]),t("thead",null,[t("tr",null,[e[27]||(e[27]=t("th",null,"Service",-1)),$.value?(n(),o("th",Ue,"Node")):u("",!0),e[28]||(e[28]=t("th",null,"State",-1)),e[29]||(e[29]=t("th",null,"Ports",-1)),e[30]||(e[30]=t("th",null,"Networks",-1)),e[31]||(e[31]=t("th",null,"Image",-1)),e[32]||(e[32]=t("th",{"aria-label":"Actions"},null,-1))])]),t("tbody",ze,[(n(!0),o(y,null,C(i.value.containers,(s,P)=>(n(),o("tr",{key:s.id,style:z({"--i":P})},[t("td",Ae,[t("div",{class:"cell-clip",title:s.service??s.name},l(s.service??s.name),9,Ee),t("div",{class:"mute task cell-clip",title:s.name},l(D(s.name)),9,Be)]),$.value?(n(),o("td",Fe,[t("div",{class:"cell-clip",title:s.node??void 0},l(s.node??"—"),9,je),s.remote?(n(),o("span",Me,"remote")):u("",!0)])):u("",!0),t("td",Oe,[t("span",{class:w(s.state==="running"?"s-ok":"s-failed")},l(f(A)(s.state)),3),s.health&&s.state==="running"?(n(),o("div",{key:0,class:w(["mute",s.health==="healthy"?"s-ok":"s-failed"]),style:{"font-size":"var(--t-sm)"}},l(f(A)(s.health)),3)):u("",!0)]),t("td",Ve,[(n(!0),o(y,null,C(s.ports,d=>(n(),o("div",{key:`${d.containerPort}/${d.protocol}`},[t("span",We,l(d.containerPort),1),d.hostPort?(n(),o("span",Ke," ← host "+l(d.hostPort),1)):u("",!0)]))),128)),s.ports.length?u("",!0):(n(),o("span",He,"none exposed"))]),t("td",Ge,[(n(!0),o(y,null,C(s.networks,d=>(n(),o("div",{key:d,class:"cell-clip",title:d},[t("span",{class:w(d==="preview-ingress"?"s-ok":"")},l(d),3)],8,Qe))),128)),s.ingressIp?(n(),o("div",{key:0,class:"mute mono cell-clip",style:{"font-size":"var(--t-sm)"},title:s.ingressIp},l(s.ingressIp),9,qe)):u("",!0)]),t("td",Je,[t("span",{class:"cell-clip",title:s.image},l(s.image),9,Xe)]),t("td",Ye,[s.job?(n(),o("span",Ze,"one-shot")):s.remote?(n(),o("span",et," on "+l(s.node),1)):s.state!=="running"?(n(),b(L,{key:2,class:"sm",variant:"ghost",pending:p.value===`start:${s.name}`,disabled:!!p.value,confirm:"Start it?",onRun:d=>v(s,"start")},{default:m(()=>[...e[33]||(e[33]=[r(" Start ",-1)])]),_:1},8,["pending","disabled","onRun"])):(n(),b(L,{key:3,class:"sm",variant:"ghost",pending:p.value===`stop:${s.name}`,disabled:!!p.value,confirm:"Stop it?",title:"Stops this container only. It stays stopped until something starts it.",onRun:d=>v(s,"stop")},{default:m(()=>[...e[34]||(e[34]=[r(" Stop ",-1)])]),_:1},8,["pending","disabled","onRun"])),!s.remote&&!s.job?(n(),b(L,{key:4,class:"sm",variant:"ghost",pending:p.value===`restart:${s.name}`,disabled:!!p.value,confirm:"Restart it?",onRun:d=>v(s,"restart")},{default:m(()=>[...e[35]||(e[35]=[r(" Restart ",-1)])]),_:1},8,["pending","disabled","onRun"])):u("",!0),h(c,{class:"btn sm ghost",to:`/deployments/${encodeURIComponent(f(S).id)}/logs?container=${encodeURIComponent(s.name)}`},{default:m(()=>[...e[36]||(e[36]=[r(" Logs ",-1)])]),_:1},8,["to"]),s.state==="running"&&!s.remote&&!s.job?(n(),b(c,{key:5,class:"btn sm ghost",to:`/deployments/${encodeURIComponent(f(S).id)}/terminal?container=${encodeURIComponent(s.name)}`},{default:m(()=>[...e[37]||(e[37]=[r(" Shell ",-1)])]),_:1},8,["to"])):u("",!0),s.state==="running"&&R(s)?(n(),o("a",{key:6,class:"btn sm ghost",href:R(s),target:"_blank",rel:"noreferrer"}," Open ",8,tt)):u("",!0)])],4))),128))])],2)])):(n(),o("p",st," 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",re,[...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)])}}}),vt=O(nt,[["__scopeId","data-v-084c7ea0"]]);export{vt as default};
|
|
2
|
+
//# sourceMappingURL=RuntimeTab-Bh2gGuhj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuntimeTab-Bh2gGuhj.js","sources":["../../src/components/FindingsModal.vue","../../src/views/tabs/RuntimeTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The runtime findings, as one button that opens them rather than a stack of banners.\n *\n * WHAT WAS WRONG. Every finding rendered as its own inline banner, unbounded. A deployment with a\n * dozen of them — which is exactly the deployment worth looking at — pushed the routing table and the\n * container table off the bottom of the screen, so the page that exists to show you what is running\n * showed you paragraphs about it instead.\n *\n * WHAT THE BANNERS DID WELL, AND IS KEPT. A `warn` announced itself: you could not open the tab and\n * miss it. So the trigger carries the count and the highest severity as COLOUR, not just a label —\n * three warnings and none look different from across the room, which a plain \"Findings\" button would\n * not. An empty list renders nothing at all: there is no button to wonder about.\n *\n * Built on `HelpModal`'s idiom rather than a second one — the same Reka Dialog, the same\n * `.help-*` classes, so focus trap, focus restore, scroll lock and Escape behave identically. It is a\n * separate component only because the trigger is the whole point here and `HelpModal`'s is a fixed\n * `?` glyph.\n */\nimport { computed } from 'vue';\nimport { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger } from 'reka-ui';\nimport type { RuntimeResponse } from '../api/types';\n\nconst props = defineProps<{ findings: RuntimeResponse['findings'] }>();\n\n/** Blocking first, then worth checking, then notes — the order the banners rendered in. */\nconst ORDER = { error: 0, warn: 1, info: 2 } as const;\nconst sorted = computed(() => [...props.findings].sort((a, b) => ORDER[a.level] - ORDER[b.level]));\n/** The highest severity present. Falls out of the sort — there is no second ranking to disagree. */\nconst worst = computed(() => sorted.value[0]?.level ?? 'info');\n\n/** The banners' own words, so the button and the thing it opens say the same thing. */\nconst LABEL = { error: 'Blocking', warn: 'Worth checking', info: 'Notes' } as const;\nconst BADGE = { error: 'failed', warn: 'warn', info: 'info' } as const;\n/** `info` has no banner tint — a note is not a state. */\nconst BANNER = { error: 'failed', warn: 'warn', info: 'plain' } as const;\n</script>\n\n<template>\n <DialogRoot v-if=\"findings.length\">\n <DialogTrigger class=\"btn sm findings-btn\" :class=\"worst\">\n <span class=\"badge\" :class=\"BADGE[worst]\">{{ findings.length }}</span>\n {{ LABEL[worst] }}\n </DialogTrigger>\n\n <DialogPortal>\n <DialogOverlay class=\"scrim help-scrim\" />\n <DialogContent class=\"help-modal\">\n <div class=\"help-head\">\n <DialogTitle class=\"help-title\">What pstack noticed</DialogTitle>\n <DialogClose class=\"ghost sm\" aria-label=\"Close\">Close</DialogClose>\n </div>\n <div class=\"help-body\">\n <div v-for=\"(f, i) in sorted\" :key=\"i\" class=\"banner\" :class=\"BANNER[f.level]\">\n <b>{{ LABEL[f.level] }}</b>\n <p>{{ f.message }}</p>\n </div>\n </div>\n </DialogContent>\n </DialogPortal>\n </DialogRoot>\n</template>\n\n<style scoped>\n/*\n * The trigger sits where the banners did, so it inherits their vertical rhythm (`.banner` is\n * `margin: var(--s3) 0`) rather than butting against the panel below it.\n */\n.findings-btn {\n margin: var(--s3) 0;\n}\n/*\n * `error` borrows `button.danger`'s treatment by name; `warn` has no button variant in the system, so\n * this is the same recipe in `--leak`. Both are the badge's colour repeated at the button's edge —\n * one hue per state, not two.\n */\n.findings-btn.error {\n background: var(--fail-soft);\n border-color: color-mix(in srgb, var(--fail) 45%, transparent);\n color: var(--fail);\n}\n.findings-btn.error:hover:not(:disabled) {\n background: color-mix(in srgb, var(--fail) 26%, transparent);\n border-color: color-mix(in srgb, var(--fail) 62%, transparent);\n}\n.findings-btn.warn {\n background: var(--leak-soft);\n border-color: color-mix(in srgb, var(--leak) 45%, transparent);\n color: var(--leak);\n}\n.findings-btn.warn:hover:not(:disabled) {\n background: color-mix(in srgb, var(--leak) 26%, transparent);\n border-color: color-mix(in srgb, var(--leak) 62%, transparent);\n}\n/*\n * Inside the modal the banners ARE the list, so the body's own padding already spaces the first and\n * last from the edges. `.help-body > * + *` keeps the gap between them.\n */\n.help-body > .banner:first-child {\n margin-top: 0;\n}\n.help-body > .banner:last-child {\n margin-bottom: 0;\n}\n</style>\n","<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 — and when there is no address, `RouteTarget` says which of\n * three reasons it is. \"Not on the ingress network\" was being printed over swarm services whose\n * network was fine, because the address is simply not knowable from a manager.\n *\n * FINDINGS ARE A BUTTON, NOT BANNERS. They used to lead the tab as a stack of banners: fine at one\n * finding, and at nine they pushed both tables off the screen — on the page whose whole job is those\n * tables. The count and the worst level ride on the trigger so a warning still announces itself\n * unopened (see `FindingsModal`). State that changes what you can do — \"Docker did not answer\",\n * \"nothing looks wrong\" — stays on the page, because it is one line and cannot grow.\n *\n * BOTH TABLES ARE FIXED-LAYOUT, INSIDE A SCROLLER. Under auto layout a single long image or task\n * name took width from every other column on the row, and `.panel > table` splits thead and tbody\n * into two table boxes that size their columns independently — which is why the headers never lined\n * up with the cells under them. The `<colgroup>`s below are those widths, stated once, beside the\n * headers they have to agree with; wrapping the table in `.table-scroll` is what opts it out of the\n * split and lets it scroll instead of squeezing.\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 ActionButton from '../../components/ActionButton.vue';\nimport ErrorNote from '../../components/ErrorNote.vue';\nimport FindingsModal from '../../components/FindingsModal.vue';\nimport InfoHint from '../../components/InfoHint.vue';\nimport RouteTarget from '../../components/RouteTarget.vue';\nimport { toast } from '../../composables/useToasts';\nimport RefreshButton from '../../components/RefreshButton.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 running = computed(() => rt.value?.containers.filter((c) => c.state === 'running').length ?? 0);\n\n/**\n * Whether the node column exists at all — compose has no nodes to name.\n *\n * Hoisted rather than asked twice: the header and the cell were computing this separately, which is\n * how a header can end up describing a column the body did not render in the same position.\n */\nconst hasNode = computed(() => rt.value?.containers.some((c) => c.node) ?? false);\n\n/**\n * The part of a container's name worth reading in a table cell.\n *\n * Compose names a container `<stack>-<service>-<n>`. Swarm names a TASK\n * `<stack>_<service>.<slot>.<task id>` — long, and its first half repeats the service already\n * printed on the line above, in a column that under swarm has to share the row with the node and\n * the row actions. The tail is the half that identifies which task this is: the slot and the id\n * `docker service ps` prints. Compose names hold no dots and come back untouched.\n *\n * The full name stays in the cell's `title` rather than in the text. Truncating the text would have\n * cut the id — the one part worth copying — and nothing here needs the whole name by hand anyway:\n * Logs, Shell and the container actions all carry it themselves.\n */\nfunction taskOf(name: string): string {\n const p = name.split('.');\n return p.length === 3 ? `${p[1]}.${p[2]}` : name;\n}\n\n/**\n * One container action in flight, as `action:name`.\n *\n * A single ref rather than a per-row flag: two `docker restart`s racing on the same stack is not\n * something to make easy, and the readiness watch each one starts would fight the other.\n */\nconst busy = ref('');\n\nasync function act(c: RuntimeContainer, action: 'start' | 'stop' | 'restart'): Promise<void> {\n busy.value = `${action}:${c.name}`;\n const r = await api.post<{ note?: string }>(\n `/api/deployments/${encodeURIComponent(dep.id)}/containers/${encodeURIComponent(c.name)}/${action}${varsQuery.value}`,\n );\n busy.value = '';\n if (!r.ok) {\n // Docker's own words. \"Already started\" and \"no such container\" are different problems and it\n // says both better than this layer could.\n toast('error', problem(r, `${action} ${c.name}`));\n return;\n }\n toast('ok', r.body.note ?? `${c.name}: ${action} done.`);\n // Read the table back rather than assuming the new state: a container that exits again immediately\n // is exactly the case worth seeing, and the 8s poll would show it a beat later anyway.\n void load();\n}\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 // Under swarm the labels live on the service, so a route names `app` where the container is a\n // task called `pr-1_app.1.<id>`. Matching the name alone left every swarm row without a link to\n // a router that does point at it. Both tasks of one service share the URL — Traefik balances.\n .filter((r) => r.container === c.name || r.container === c.service)\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 <!--\n Findings first — as one control, not as their own page. The button is absent when there is\n nothing to say, so the row disappears with it rather than leaving an empty gap.\n -->\n <div v-if=\"rt.findings.length\" class=\"row\" style=\"margin: var(--s3) 0\">\n <FindingsModal :findings=\"rt.findings\" />\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 <div v-if=\"rt.routes.length\" class=\"table-scroll\">\n <table class=\"cards tbl-fixed t-routes\">\n <!--\n The widths, as percentages of whatever the panel gives us. URL is the widest because\n it is the value people read, and it WRAPS: a hostname's tail is which PR it is.\n -->\n <colgroup>\n <col style=\"width: 34%\" />\n <col style=\"width: 26%\" />\n <col style=\"width: 26%\" />\n <col style=\"width: 14%\" />\n </colgroup>\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 class=\"cell-wrap\" 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 <RouteTarget :route=\"r\" />\n <!-- Under swarm this is the SERVICE name; either way it is matched, not read. -->\n <div class=\"mute cell-clip\" style=\"font-size: var(--t-sm)\" :title=\"r.container\">\n {{ r.container }}\n </div>\n </td>\n <td data-label=\"router\">\n <div class=\"cell-clip\" :title=\"r.router\">{{ r.router }}</div>\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 </div>\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 <RefreshButton :run=\"load\" :busy=\"loading\" />\n </div>\n\n <div v-if=\"rt.containers.length\" class=\"table-scroll\">\n <table class=\"cards tbl-fixed t-containers\" :class=\"{ swarm: hasNode }\">\n <!--\n THE NODE `<col>` CARRIES THE SAME `v-if` AS ITS `<th>`, and has to: one without the\n other shifts every column after it by one, which is the header-drift bug rebuilt by\n hand, in the swarm case that is already the worst one.\n\n Image takes no width — under fixed layout the unsized column absorbs what is left,\n so adding Node narrows the image rather than pushing the table wider. Actions is in\n px because it holds buttons, not text: five of them at their widest (Stop, Restart,\n Logs, Shell, Open), which `.row-actions` forbids to wrap, so the column is measured\n from the buttons rather than guessed. The table's floor in `app.css` is this\n colgroup added up; change one and change the other.\n -->\n <colgroup>\n <col style=\"width: 22ch\" />\n <col v-if=\"hasNode\" style=\"width: 14ch\" />\n <col style=\"width: 12ch\" />\n <col style=\"width: 13ch\" />\n <col style=\"width: 20ch\" />\n <col />\n <col style=\"width: 288px\" />\n </colgroup>\n <thead>\n <tr>\n <th>Service</th>\n <!-- Where, then how it is doing — the order the cells are in. They disagreed, so\n under swarm (the only time this column exists) every state read as a node. -->\n <th v-if=\"hasNode\">Node</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 <div class=\"cell-clip\" :title=\"c.service ?? c.name\">{{ c.service ?? c.name }}</div>\n <div class=\"mute task cell-clip\" :title=\"c.name\">{{ taskOf(c.name) }}</div>\n </td>\n <td v-if=\"hasNode\" data-label=\"node\">\n <div class=\"cell-clip\" :title=\"c.node ?? undefined\">{{ c.node ?? '—' }}</div>\n <!-- A task on another node: listed from the manager, out of reach of exec/stop. -->\n <span v-if=\"c.remote\" class=\"badge\" title=\"runs on another swarm node — logs reach it through the manager; a shell and stop/start do not\">remote</span>\n </td>\n <td data-label=\"state\">\n <span :class=\"c.state === 'running' ? 's-ok' : 's-failed'\">{{ sentence(c.state) }}</span>\n <!--\n Health is only reported while it is RUNNING. Docker keeps the last probe result on\n a stopped container, so an exited one rendered \"Exited / Healthy\" — a stale reading\n presented beside the fact that contradicts it.\n -->\n <div\n v-if=\"c.health && c.state === 'running'\"\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\" class=\"cell-clip\" :title=\"n\">\n <span :class=\"n === 'preview-ingress' ? 's-ok' : ''\">{{ n }}</span>\n </div>\n <div v-if=\"c.ingressIp\" class=\"mute mono cell-clip\" style=\"font-size: var(--t-sm)\" :title=\"c.ingressIp\">\n {{ c.ingressIp }}\n </div>\n </td>\n <!-- Clipped, not wrapped: an image reference is matched against one you know, and\n `registry.example.com/team/app@sha256:…` costs three rows to say nothing new. -->\n <td class=\"dim\" data-label=\"image\">\n <span class=\"cell-clip\" :title=\"c.image\">{{ c.image }}</span>\n </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 <!--\n One container, not the service and not the stack. Start appears only when it is\n not running and Stop only when it is, so the control on screen is the one that\n would do something. Both destructive ones confirm in place.\n -->\n <!-- None of these reach a task on another node; docker's verbs are node-local. -->\n <!-- And none of them reach a one-shot job's row, which stands for the SERVICE:\n there is no container behind its name, so the verbs could only fail. -->\n <span v-if=\"c.job\" class=\"badge\" title=\"a one-shot job — it runs to completion; there is no long-lived container to start, stop, or open a shell in\">one-shot</span>\n <span v-else-if=\"c.remote\" class=\"mute\" style=\"font-size: var(--t-sm)\" title=\"runs on another swarm node — redeploy the stack, or act on the worker itself\">\n on {{ c.node }}\n </span>\n <ActionButton\n v-else-if=\"c.state !== 'running'\"\n class=\"sm\"\n variant=\"ghost\"\n :pending=\"busy === `start:${c.name}`\"\n :disabled=\"!!busy\"\n confirm=\"Start it?\"\n @run=\"act(c, 'start')\"\n >\n Start\n </ActionButton>\n <ActionButton\n v-else\n class=\"sm\"\n variant=\"ghost\"\n :pending=\"busy === `stop:${c.name}`\"\n :disabled=\"!!busy\"\n confirm=\"Stop it?\"\n title=\"Stops this container only. It stays stopped until something starts it.\"\n @run=\"act(c, 'stop')\"\n >\n Stop\n </ActionButton>\n <ActionButton\n v-if=\"!c.remote && !c.job\"\n class=\"sm\"\n variant=\"ghost\"\n :pending=\"busy === `restart:${c.name}`\"\n :disabled=\"!!busy\"\n confirm=\"Restart it?\"\n @run=\"act(c, 'restart')\"\n >\n Restart\n </ActionButton>\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' && !c.remote && !c.job\"\n class=\"btn sm ghost\"\n :to=\"`/deployments/${encodeURIComponent(dep.id)}/terminal?container=${encodeURIComponent(c.name)}`\"\n >\n Shell\n </RouterLink>\n <!--\n Only while running: the router label survives a stopped container, so the URL\n still exists and answers 502. A link that is certain to fail is worse than no link.\n -->\n <a\n v-if=\"c.state === 'running' && 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 </div>\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\n<style scoped>\n/*\n * The second line of the service cell: the task, under the service it belongs to.\n *\n * The `max-width` cap is GONE. It was a ceiling on what this line could bid for under auto layout —\n * a bid is what auto layout runs on, and there is no bidding any more: the `<colgroup>` sets the\n * column and `.cell-clip` on the line keeps it inside. Two mechanisms for one width is how they\n * drift apart. `taskOf` still shortens what is shown; `title` still holds the whole name.\n */\n.task {\n font-size: var(--t-sm);\n}\n\n/*\n * The floors that make `.table-scroll` a scroller rather than decoration live in `app.css`, beside\n * the `.tbl-fixed` comment that promises them — one place, so a floor and the rule it belongs to\n * cannot be changed apart. They are derived from the `<colgroup>`s above: change a `<col>` and go\n * change the matching `min-width` there.\n */\n</style>\n"],"names":["props","__props","ORDER","sorted","computed","a","b","worst","_a","LABEL","BADGE","BANNER","_createBlock","_unref","DialogRoot","_createVNode","DialogTrigger","_normalizeClass","_createElementVNode","_toDisplayString","DialogPortal","DialogOverlay","DialogContent","_hoisted_1","DialogTitle","_cache","DialogClose","_hoisted_2","_openBlock","_createElementBlock","_Fragment","_renderList","f","i","rt","ref","error","loading","load","r","api","dep","varsQuery","problem","watch","usePolling","running","c","hasNode","taskOf","name","p","busy","act","action","toast","urlFor","host","h","ErrorNote","SkeletonList","FindingsModal","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","InfoHint","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_12","_hoisted_11","_hoisted_13","_hoisted_14","RouteTarget","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_component_RouterLink","_hoisted_23","_hoisted_24","_hoisted_25","RefreshButton","_hoisted_26","_hoisted_27","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","sentence","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","n","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","ActionButton","$event","_hoisted_49","_hoisted_50"],"mappings":"u+BAuBA,MAAMA,EAAQC,EAGRC,EAAQ,CAAE,MAAO,EAAG,KAAM,EAAG,KAAM,CAAA,EACnCC,EAASC,EAAS,IAAM,CAAC,GAAGJ,EAAM,QAAQ,EAAE,KAAK,CAACK,EAAGC,IAAMJ,EAAMG,EAAE,KAAK,EAAIH,EAAMI,EAAE,KAAK,CAAC,CAAC,EAE3FC,EAAQH,EAAS,WAAM,QAAAI,EAAAL,EAAO,MAAM,CAAC,IAAd,YAAAK,EAAiB,QAAS,OAAM,EAGvDC,EAAQ,CAAE,MAAO,WAAY,KAAM,iBAAkB,KAAM,OAAA,EAC3DC,EAAQ,CAAE,MAAO,SAAU,KAAM,OAAQ,KAAM,MAAA,EAE/CC,EAAS,CAAE,MAAO,SAAU,KAAM,OAAQ,KAAM,OAAA,eAIlCV,EAAA,SAAS,YAA3BW,EAqBaC,EAAAC,CAAA,EAAA,CAAA,IAAA,CAAA,EAAA,WApBX,IAGgB,CAHhBC,EAGgBF,EAAAG,CAAA,EAAA,CAHD,MAAKC,EAAA,CAAC,sBAA8BV,EAAA,KAAK,CAAA,CAAA,aACtD,IAAsE,CAAtEW,EAAsE,OAAA,CAAhE,MAAKD,EAAA,CAAC,QAAgBP,EAAMH,EAAA,KAAK,CAAA,CAAA,CAAA,EAAMY,EAAAlB,EAAA,SAAS,MAAM,EAAA,CAAA,IAAU,IACtEkB,EAAGV,EAAMF,EAAA,KAAK,CAAA,EAAA,CAAA,CAAA,qBAGhBQ,EAceF,EAAAO,EAAA,EAAA,KAAA,WAbb,IAA0C,CAA1CL,EAA0CF,EAAAQ,CAAA,EAAA,CAA3B,MAAM,mBAAkB,EACvCN,EAWgBF,EAAAS,CAAA,EAAA,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,CAAA,GAAAtB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,YAED,EAAA,CAAA,sDACAV,EAKaqE,EAAA,CAJX,MAAM,eACL,GAAE,gBAAkB,mBAAmBvE,EAAA4B,CAAA,EAAI,EAAE,CAAA,mBAAoB,mBAAmBM,EAAE,IAAI,CAAA,EAAA,aAC5F,IAED,CAAA,GAAAtB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,SAED,EAAA,CAAA,oBAEQsB,EAAE,QAAK,WAAA,CAAmBA,EAAE,QAAM,CAAKA,EAAE,SADjDnC,EAMawE,EAAA,OAJX,MAAM,eACL,GAAE,gBAAkB,mBAAmBvE,EAAA4B,CAAA,EAAI,EAAE,CAAA,uBAAwB,mBAAmBM,EAAE,IAAI,CAAA,EAAA,aAChG,IAED,CAAA,GAAAtB,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAA,GAFC,UAED,EAAA,CAAA,8BAMQsB,EAAE,QAAK,WAAkBS,EAAOT,CAAC,OADzClB,EAQI,IAAA,OANF,MAAM,eACL,KAAM2B,EAAOT,CAAC,EACf,OAAO,SACP,IAAI,YAAA,EACL,SAED,EAAAmE,EAAA,wCAMVrF,EAGI,IAHJsF,GAAuB,2KAGvB,EAAA,UAlTJvF,EAAA,EAAAC,EAMM,MANNN,GAMM,CAAA,GAAAE,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,CALJP,EAA6B,SAA1B,yBAAsB,EAAA,EACzBA,EAGI,SAHD,sIAGH,EAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.findings-btn[data-v-c92eabc7]{margin:var(--s3) 0}.findings-btn.error[data-v-c92eabc7]{background:var(--fail-soft);border-color:color-mix(in srgb,var(--fail) 45%,transparent);color:var(--fail)}.findings-btn.error[data-v-c92eabc7]:hover:not(:disabled){background:color-mix(in srgb,var(--fail) 26%,transparent);border-color:color-mix(in srgb,var(--fail) 62%,transparent)}.findings-btn.warn[data-v-c92eabc7]{background:var(--leak-soft);border-color:color-mix(in srgb,var(--leak) 45%,transparent);color:var(--leak)}.findings-btn.warn[data-v-c92eabc7]:hover:not(:disabled){background:color-mix(in srgb,var(--leak) 26%,transparent);border-color:color-mix(in srgb,var(--leak) 62%,transparent)}.help-body>.banner[data-v-c92eabc7]:first-child{margin-top:0}.help-body>.banner[data-v-c92eabc7]:last-child{margin-bottom:0}.task[data-v-084c7ea0]{font-size:var(--t-sm)}
|
|
@@ -0,0 +1,2 @@
|
|
|
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 X,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-I0XiM19H.js";import{j as E,k as q,af as Le,ag as An,ah as Pn,ai as On,aj as En,O as he,ak as qn,d as k,al as bt,N as de,am as Rn,an as Tn,o as $,z as L,w as R,a4 as V,u as w,ao as Ft,ap as we,X as $n,aq as Bn,ar as kn,c as Z,e as N,a9 as ne,D as Nt,as as In,a8 as it,g as Ee,r as zt,F as lt,a as xe,h as Oe,S as Dn,a5 as Pe,ad as Ht,aa as Wt,ab as jt,at as Mn,f as Kt,au as Vn,av as Ln,t as Ge}from"./index-Cqe_7QZw.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 a=o.toJSON();return l+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}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((a,s)=>this.compare(a[0],s[0]));let l=`${o}{`;for(let a=0;a<i.length;a++){const[s,u]=i[a];l+=`${this.serialize(s,!0)}:${this.serialize(u)}`,a<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 Je=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()),Je++,e(()=>{Je===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),Je--})})}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 at(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,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function jn(e,t){const n=at(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 a=l[0];let s,u;if("borderBoxSize"in a){const p=a.borderBoxSize,f=Array.isArray(p)?p[0]:p;s=f.inlineSize,u=f.blockSize}else s=r.offsetWidth,u=r.offsetHeight;t.value={width:s,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(),a=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())??""}}),s=a.find(d=>d.ref===l),u=a.map(d=>d.textValue),p=Xn(u,t.value,s==null?void 0:s.textValue),f=a.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 Xn(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 s=l.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s: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)}}),a=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)}}),s=q(()=>Array.from(r.itemMap.value.values())),u=q(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:u,CollectionSlot:l,CollectionItem:a}}var Yn=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(X),{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=Yn;const[Xt,Jn]=Ce("PopperRoot");var Zn=k({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return Jn({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>V(n.$slots,"default")}}),Qn=Zn,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=Xt();return Ft(()=>{r.onAnchorChange(t.reference??o.value)}),(i,l)=>($(),L(w(X),{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,a=l?0:e.arrowWidth,s=l?0:e.arrowHeight,[u,p]=et(n),f={start:"0%",center:"50%",end:"100%"}[p],d=(((_=r.arrow)==null?void 0:_.x)??0)+a/2,c=(((g=r.arrow)==null?void 0:g.y)??0)+s/2;let m="",y="";return u==="bottom"?(m=l?f:`${d}px`,y=`${-s}px`):u==="top"?(m=l?f:`${d}px`,y=`${o.floating.height+s}px`):u==="right"?(m=`${-s}px`,y=l?f:`${c}px`):u==="left"&&(m=`${o.floating.width+s}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 Yt(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 st(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 st(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 ao(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"],so=["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?so: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),a=ut(l),s=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[a]/2-r[a]/2;let c;switch(s){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:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:c=0}=te(t,e),m=Gt(c),x=a[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(a.floating)),boundary:u,rootBoundary:p,strategy:s})),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(a.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:a,rect:g,offsetParent:C,strategy:s}):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,a=l.detectOverflow?l:{...l,detectOverflow:mo},s=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,s),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:a,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,s)),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:a,middlewareData:s}=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=a.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=Yt(O,B,T),z=!s.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:a,platform:s,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(a),C=le(a)===a,h=await(s.isRTL==null?void 0:s.isRTL(u.floating)),S=d||(C||!y?[Ie(a)]:ao(a)),v=m!=="none";!d&&v&&S.push(...fo(a,y,m,h));const b=[a,...S],A=await s.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=a;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"}),a=Rt(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Tt(a)}}}case"escaped":{const l=await o.detectOverflow(t,{...i,altBoundary:!0}),a=Rt(l,n.floating);return{data:{escapedOffsets:a,escaped:Tt(a)}}}default:return{}}}}},Jt=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),a=_e(n),s=U(n)==="y",u=Jt.has(l)?-1:1,p=i&&s?-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 a&&typeof m=="number"&&(c=a==="end"?m*-1:m),s?{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:a}=t,s=await xo(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,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:a=!1,limiter:s={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=st(d);let m=p[c],y=p[d];const x=(g,C)=>Yt(C+f[g==="y"?"top":"left"],C,C-f[g==="y"?"bottom":"right"]);l&&(m=x(c,m)),a&&(y=x(d,y));const _=s.fn({...t,[c]:m,[d]:y});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[c]:l,[d]:a}}}}}},Co=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:l,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:p=!0,crossAxis:f=!0}=te(e,t),d={x:r,y:i},c=U(l),m=st(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=a.reference[m]-a.floating[S]+g.mainAxis,b=a.reference[m]+a.reference[S]-g.mainAxis;y<v?y=v:y>b&&(y=b)}if(f){var C,h;const S=m==="y"?"width":"height",v=Jt.has(le(l)),b=a.reference[c]-a.floating[S]+(v&&((C=s.offset)==null?void 0:C[c])||0)+(v?0:g.crossAxis),A=a.reference[c]+a.reference[S]+(v?0:((h=s.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=()=>{},...a}=te(e,t),s=await r.detectOverflow(t,a),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-s.top-s.bottom,_=d-s.left-s.right,g=ie(c-s[m],x),C=ie(d-s[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(s.left,s.right):v=c-2*Q(s.top,s.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 Y(e){return Fe()?e instanceof Element||e instanceof H(e).Element:!1}function ae(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 Ze;function ft(e){const t=Y(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(;ae(t)&&!qe(t);){if(ft(t))return t;if(ze(t))return null;t=fe(t)}return null}function pt(){return Ze==null&&(Ze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ze}function qe(e){return/^(html|body|#document)$/.test(ge(e))}function G(e){return H(e).getComputedStyle(e)}function He(e){return Y(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 Zt(e){const t=fe(e);return qe(t)?(e.ownerDocument||e).body:ae(t)&&Ne(t)?t:Zt(t)}function Re(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Zt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=H(r);if(i){const a=nt(l);return t.concat(l,l.visualViewport||[],Ne(r)?r:[],a&&n?Re(a):[])}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=ae(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=ke(n)!==i||ke(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function mt(e){return Y(e)?e:e.contextElement}function Se(e){const t=mt(e);if(!ae(t))return ee(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Qt(t);let l=(i?ke(n.width):n.width)/o,a=(i?ke(n.height):n.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}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?Y(o)&&(l=Se(o)):l=Se(e));const a=Ro(i,n,o)?en(i):ee(0);let s=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,p=r.width/l.x,f=r.height/l.y;if(i&&o){const d=H(i),c=Y(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;s*=x.x,u*=x.y,p*=x.x,f*=x.y,s+=C,u+=h,m=H(y),y=nt(m)}}return De({width:p,height:f,x:s,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),a=t?ze(t.floating):!1;if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},u=ee(1);const p=ee(0),f=ae(o);if((f||!i)&&((ge(o)!=="body"||Ne(l))&&(s=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,s):ee(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+p.x+d.x,y:n.y*u.y-s.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 a=i.clientWidth,s=i.clientHeight,u=0,p=0;if(l){const d=!pt()||t==="fixed";o?d||(u=-l.offsetLeft,p=-l.offsetTop):(a=l.width,s=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&&(a-=_)}return{width:a,height:s,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,a=e.clientHeight*i.y,s=r*i.x,u=o*i.y;return{width:l,height:a,x:s,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(Y(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(a=>Y(a)&&ge(a)!=="body"),r=null;const i=G(e).position==="fixed";let l=i?fe(e):e;for(;Y(l)&&!qe(l);){const a=G(l),s=ft(l),u=r?r.position:i?"fixed":"";!s&&(u==="fixed"||u==="absolute"&&a.position==="static")?o=o.filter(f=>f!==l):r=a,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],a=Bt(t,l[0],r);let s=a.top,u=a.right,p=a.bottom,f=a.left;for(let d=1;d<l.length;d++){const c=Bt(t,l[d],r);s=Q(c.top,s),u=ie(c.right,u),p=ie(c.bottom,p),f=Q(c.left,f)}return{width:u-f,height:p-s,x:f,y:s}}function Lo(e){const{width:t,height:n}=Qt(e);return{width:t,height:n}}function Fo(e,t,n){const o=ae(t),r=oe(t),i=n==="fixed",l=pe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=ee(0);if((o||!i)&&((ge(t)!=="body"||Ne(r))&&(a=He(t)),o)){const d=pe(t,!0,i,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}!o&&r&&(s.x=We(r));const u=r&&!o&&!i?tn(r,a):ee(0),p=l.left+a.scrollLeft-s.x-u.x,f=l.top+a.scrollTop-s.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(!ae(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(!ae(e)){let r=fe(e);for(;r&&!qe(r);){if(Y(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:Y,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 a(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 a();if(O!==f){if(!b)return a();O?a(!1,O):r=setTimeout(()=>{a(!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 s=H(e),u=()=>a(n);return s.addEventListener("resize",u),a(!0),()=>{s.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:a=typeof IntersectionObserver=="function",animationFrame:s=!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&&a?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&&!s&&c.observe(u),t&&c.observe(t));let m,y=s?pe(e):null;s&&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,s&&cancelAnimationFrame(m)}}const Ko=bo,Uo=So,It=yo,Xo=_o,Yo=wo,Go=vo,Jo=Co,Zo=(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"}),a=q(()=>{var b;return(b=be(n.strategy))!=null?b:"absolute"}),s=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(a.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 s.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;Zo(u.value,p.value,{middleware:i.value,placement:l.value,strategy:a.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,a,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},[Xr,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=Xt(),{forwardRef:i,currentElement:l}=me(),a=E(),s=E(),{width:u,height:p}=Kn(s),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"?Jo():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),Xo({...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`)}}),s.value&&er({element:s.value,padding:n.arrowPadding}),oo({arrowWidth:u.value,arrowHeight:p.value}),n.hideWhenDetached&&Yo({strategy:"referenceHidden",...m.value})]),_=q(()=>n.reference??r.anchor.value),{floatingStyles:g,placement:C,isPositioned:h,middlewareData:S}=tr(_,a,{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=>s.value=T,arrowX:O,arrowY:I,shouldHideArrow:A}),(T,B)=>{var D,z,F;return $(),Z("div",{ref_key:"floatingRef",ref:a,"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(X),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 ar=[" ","Enter","ArrowUp","ArrowDown"],sr=[" ","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:a}=it(n),s=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(s.value)?((h=s.value)==null?void 0:h.length)===0:wt(s.value)});Te({isProvider:!0});const m=zn(a),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(s.value)?[...s.value]:[],v=S.findIndex(b=>rt(b,h,n.by));v===-1?S.push(h):S.splice(v,1),s.value=[...S]}else s.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:s,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(s),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(s)},{default:R(()=>[w(wt)(w(s))?($(),Z("option",cr)):Ee("v-if",!0),($(!0),Z(lt,null,zt(Array.from(x.value),v=>($(),Z("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 a=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(a,"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=at(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,an]=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(),a=E();yn(a);const{search:s,handleTypeaheadSearch:u}=Ut(),p=E(),f=E(),d=E(),c=E(!1),m=E(!1),y=E(!1);function x(){f.value&&a.value&&xt([f.value,a.value])}de(c,()=>{x()});const{onOpenChange:_,triggerPointerDownPosRef:g}=r;Le(v=>{if(!a.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=a.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=at(h.value);return an({content:a,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=a.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:s}),(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")?a.value=P.firstElementChild:a.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(),a=E(!1),s=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 J=v.left-h.left,re=S.left-J,se=C.left-re,ue=C.width+se,Ue=Math.max(ue,h.width),Xe=window.innerWidth-j,Ye=Ct(re,j,Math.max(j,Xe-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.left=`${Ye}px`}else{const J=h.right-v.right,re=window.innerWidth-S.right-J,se=window.innerWidth-C.right-re,ue=C.width+se,Ue=Math.max(ue,h.width),Xe=window.innerWidth-j,Ye=Ct(re,j,Math.max(j,Xe-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.right=`${Ye}px`}const b=r().map(J=>J.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 J=c.value===b.at(-1);u.value.style.bottom="0px";const re=f.value.clientHeight-d.value.offsetTop-d.value.offsetHeight,se=Math.max(un,Ke+(J?K:0)+re+B),ue=$e+se;u.value.style.height=`${ue}px`}else{const J=c.value===b[0];u.value.style.top="0px";const se=Math.max(ye,I+d.value.offsetTop+(J?M:0)+Ke)+dn;u.value.style.height=`${se}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(()=>a.value=!0)}}const _=E("");he(async()=>{await Pe(),x(),f.value&&(_.value=window.getComputedStyle(f.value).zIndex)});function g(C){C&&s.value===!0&&(x(),y==null||y(),s.value=!1)}return bn(i.triggerElement,()=>{x()}),br({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:g}),(C,h)=>($(),Z("div",{ref_key:"contentWrapperElement",ref:u,style:Nt({display:"flex",flexDirection:"column",position:"fixed",zIndex:_.value})},[N(w(X),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),an(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 a=E(),s=q(()=>n.forceMount||i.open.value),u=E(s.value);let p;function f(){p&&(clearTimeout(p),p=void 0)}return de(s,(d,c,m)=>{f(),p=setTimeout(()=>{u.value=s.value,p=void 0}),m(f)}),Ht(f),(d,c)=>{var m;return s.value||u.value||(m=a.value)!=null&&m.present?($(),L(w(Sn),{key:0,ref_key:"presenceRef",ref:a,present:s.value},{default:R(()=>[N(wr,Wt(jt({...w(r),...d.$attrs})),{default:R(()=>[V(d.$slots,"default")]),_:3},16)]),_:3},8,["present"])):l.value?($(),Z("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[sn,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:a,currentElement:s}=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===" ")&&(sr.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(()=>{s.value&&l.itemRefCallback(s.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(X),{ref:w(a),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=sn();return(o,r)=>w(n).isSelected.value?($(),L(w(X),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=sn(),{forwardRef:i,currentElement:l}=me(),a=q(()=>{var s,u;return{value:r.value,disabled:r.disabled.value,textContent:((s=l.value)==null?void 0:s.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(a.value))}),Ht(()=>{n.onOptionRemove(a.value)}),(s,u)=>($(),L(w(X),ne({id:w(r).textId,ref:w(i)},{...t,...s.$attrs}),{default:R(()=>[V(s.$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:a,handleTypeaheadSearch:s,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(X),{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(a)!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&C&&g.key===" "||(w(s)(g.key,w(l)()),w(ar).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:a}=me();he(()=>{r==null||r.onViewportChange(a.value)});const s=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(s.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")}}}s.value=f.scrollTop}return(p,f)=>($(),Z(lt,null,[N(w(X),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(X),{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"},Yr=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),Z(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?($(),Z("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{Yr as _};
|
|
2
|
+
//# sourceMappingURL=SelectMenu.vue_vue_type_script_setup_true_lang-BtHqT6G1.js.map
|