@samyx/preview-stacks-ui 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-D06apM-6.js → ActionButton.vue_vue_type_script_setup_true_lang-CeingrPV.js} +2 -2
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-D06apM-6.js.map → ActionButton.vue_vue_type_script_setup_true_lang-CeingrPV.js.map} +1 -1
- package/dist/assets/{AxesTab-CCB3wdSX.js → AxesTab-vIQWJMZm.js} +2 -2
- package/dist/assets/{AxesTab-CCB3wdSX.js.map → AxesTab-vIQWJMZm.js.map} +1 -1
- package/dist/assets/{ConfigTab-Cyqzeq3C.js → ConfigTab-BeAIDTnl.js} +2 -2
- package/dist/assets/{ConfigTab-Cyqzeq3C.js.map → ConfigTab-BeAIDTnl.js.map} +1 -1
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-CtwJE2eJ.js → ConflictNote.vue_vue_type_script_setup_true_lang-fprimIle.js} +2 -2
- package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-CtwJE2eJ.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-fprimIle.js.map} +1 -1
- package/dist/assets/{DangerTab-Cdr9luUy.js → DangerTab-CcYJAftw.js} +2 -2
- package/dist/assets/{DangerTab-Cdr9luUy.js.map → DangerTab-CcYJAftw.js.map} +1 -1
- package/dist/assets/{DashboardView-S4eiNX8X.js → DashboardView-Cvh03qbj.js} +2 -2
- package/dist/assets/{DashboardView-S4eiNX8X.js.map → DashboardView-Cvh03qbj.js.map} +1 -1
- package/dist/assets/{DeploymentDetailView-CD4RVr06.js → DeploymentDetailView-BzEQBKhd.js} +2 -2
- package/dist/assets/{DeploymentDetailView-CD4RVr06.js.map → DeploymentDetailView-BzEQBKhd.js.map} +1 -1
- package/dist/assets/{DeploymentsView-DIX7IA8g.js → DeploymentsView-f3RgqUkQ.js} +2 -2
- package/dist/assets/{DeploymentsView-DIX7IA8g.js.map → DeploymentsView-f3RgqUkQ.js.map} +1 -1
- package/dist/assets/{EquivalentCommand-NHzDrg5d.js → EquivalentCommand-D0Bfgz63.js} +3 -3
- package/dist/assets/{EquivalentCommand-NHzDrg5d.js.map → EquivalentCommand-D0Bfgz63.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js → ErrorNote.vue_vue_type_script_setup_true_lang-DT5SbSbT.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-BFuRxw1l.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DT5SbSbT.js.map} +1 -1
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-DwwXY7EX.js → HelpModal.vue_vue_type_script_setup_true_lang-2ev6wLk8.js} +2 -2
- package/dist/assets/{HelpModal.vue_vue_type_script_setup_true_lang-DwwXY7EX.js.map → HelpModal.vue_vue_type_script_setup_true_lang-2ev6wLk8.js.map} +1 -1
- package/dist/assets/JobDetailView-B5OFSqGO.js +2 -0
- package/dist/assets/{JobDetailView-BsCnnkPz.js.map → JobDetailView-B5OFSqGO.js.map} +1 -1
- package/dist/assets/{JobsView-Bd_XHRkd.js → JobsView-B6RvX8WS.js} +2 -2
- package/dist/assets/{JobsView-Bd_XHRkd.js.map → JobsView-B6RvX8WS.js.map} +1 -1
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-7Ggcxz1R.js → LogViewer.vue_vue_type_script_setup_true_lang-B5K26k3c.js} +3 -3
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-7Ggcxz1R.js.map → LogViewer.vue_vue_type_script_setup_true_lang-B5K26k3c.js.map} +1 -1
- package/dist/assets/{LoginView-Bj7uMFvv.js → LoginView-NzylzAuv.js} +2 -2
- package/dist/assets/{LoginView-Bj7uMFvv.js.map → LoginView-NzylzAuv.js.map} +1 -1
- package/dist/assets/{LogsTab-DRp76oC1.js → LogsTab-DxhpYJY3.js} +3 -3
- package/dist/assets/{LogsTab-DRp76oC1.js.map → LogsTab-DxhpYJY3.js.map} +1 -1
- package/dist/assets/{NotFoundView-D-A8YFJw.js → NotFoundView-Cg_jPEQi.js} +2 -2
- package/dist/assets/{NotFoundView-D-A8YFJw.js.map → NotFoundView-Cg_jPEQi.js.map} +1 -1
- package/dist/assets/{NotifiersView-CChDRHSy.js → NotifiersView-B53fERhd.js} +2 -2
- package/dist/assets/{NotifiersView-CChDRHSy.js.map → NotifiersView-B53fERhd.js.map} +1 -1
- package/dist/assets/{OverviewTab-jE_kOZI7.js → OverviewTab-Cy7_mGTt.js} +2 -2
- package/dist/assets/{OverviewTab-jE_kOZI7.js.map → OverviewTab-Cy7_mGTt.js.map} +1 -1
- package/dist/assets/{RegistriesView-D3Nh0dbq.js → RegistriesView-dc-04uci.js} +2 -2
- package/dist/assets/{RegistriesView-D3Nh0dbq.js.map → RegistriesView-dc-04uci.js.map} +1 -1
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-mVrRpkV_.js → RelativeTime.vue_vue_type_script_setup_true_lang-D7n5E9jw.js} +2 -2
- package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-mVrRpkV_.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-D7n5E9jw.js.map} +1 -1
- package/dist/assets/{RequiresTab-BgGIZ1Tn.js → RequiresTab-DDWsrZig.js} +2 -2
- package/dist/assets/{RequiresTab-BgGIZ1Tn.js.map → RequiresTab-DDWsrZig.js.map} +1 -1
- package/dist/assets/{RoutingView-D2StZawf.js → RoutingView-BheJjs2g.js} +3 -3
- package/dist/assets/{RoutingView-D2StZawf.js.map → RoutingView-BheJjs2g.js.map} +1 -1
- package/dist/assets/RuntimeTab-D4sJaoqc.js +2 -0
- package/dist/assets/RuntimeTab-D4sJaoqc.js.map +1 -0
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-qGkx2MwW.js → SelectMenu.vue_vue_type_script_setup_true_lang-CSQS6ben.js} +2 -2
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-qGkx2MwW.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-CSQS6ben.js.map} +1 -1
- package/dist/assets/SettingsView-CQIMBeQh.js +2 -0
- package/dist/assets/{SettingsView-Cu1Zkufg.js.map → SettingsView-CQIMBeQh.js.map} +1 -1
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js → SkeletonList.vue_vue_type_script_setup_true_lang-DwoeliUC.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-BYHXRCNR.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-DwoeliUC.js.map} +1 -1
- package/dist/assets/{SpecDetailView-DIi21wo1.js → SpecDetailView-DSlpITFw.js} +2 -2
- package/dist/assets/{SpecDetailView-DIi21wo1.js.map → SpecDetailView-DSlpITFw.js.map} +1 -1
- package/dist/assets/{SpecsView-B49LI4Ut.js → SpecsView-Cq_Ny0u3.js} +2 -2
- package/dist/assets/{SpecsView-B49LI4Ut.js.map → SpecsView-Cq_Ny0u3.js.map} +1 -1
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-DANvveJ6.js → StateBadge.vue_vue_type_script_setup_true_lang-BsDpZsUH.js} +2 -2
- package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-DANvveJ6.js.map → StateBadge.vue_vue_type_script_setup_true_lang-BsDpZsUH.js.map} +1 -1
- package/dist/assets/{SubmitView-ZYGApCXE.js → SubmitView-DqOEabaL.js} +5 -5
- package/dist/assets/{SubmitView-ZYGApCXE.js.map → SubmitView-DqOEabaL.js.map} +1 -1
- package/dist/assets/{Teleport-d5PoAxFM.js → Teleport-BXE_6A8N.js} +3 -3
- package/dist/assets/{Teleport-d5PoAxFM.js.map → Teleport-BXE_6A8N.js.map} +1 -1
- package/dist/assets/{TerminalTab-DAZpn3jK.js → TerminalTab-lb8FY01Y.js} +2 -2
- package/dist/assets/{TerminalTab-DAZpn3jK.js.map → TerminalTab-lb8FY01Y.js.map} +1 -1
- package/dist/assets/{UsersView-BfQKf8Sf.js → UsersView-mOC1UteJ.js} +2 -2
- package/dist/assets/{UsersView-BfQKf8Sf.js.map → UsersView-mOC1UteJ.js.map} +1 -1
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-D--Rd-Mv.js → VarEditor.vue_vue_type_script_setup_true_lang-ChzmZbEl.js} +2 -2
- package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-D--Rd-Mv.js.map → VarEditor.vue_vue_type_script_setup_true_lang-ChzmZbEl.js.map} +1 -1
- package/dist/assets/{VariablesView-Bej9ZZmS.js → VariablesView-NBIFfXQ5.js} +2 -2
- package/dist/assets/{VariablesView-Bej9ZZmS.js.map → VariablesView-NBIFfXQ5.js.map} +1 -1
- package/dist/assets/{index-DVCVnKbf.js → index-wjzRhuU3.js} +4 -4
- package/dist/assets/{index-DVCVnKbf.js.map → index-wjzRhuU3.js.map} +1 -1
- package/dist/assets/{useDeployment-752fTjLE.js → useDeployment-B7kMYmcq.js} +2 -2
- package/dist/assets/{useDeployment-752fTjLE.js.map → useDeployment-B7kMYmcq.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/JobDetailView-BsCnnkPz.js +0 -2
- package/dist/assets/RuntimeTab-B0D_MxFQ.js +0 -2
- package/dist/assets/RuntimeTab-B0D_MxFQ.js.map +0 -1
- package/dist/assets/SettingsView-Cu1Zkufg.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-NzylzAuv.js","assets/ActionButton.vue_vue_type_script_setup_true_lang-CeingrPV.js","assets/EquivalentCommand-D0Bfgz63.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/EquivalentCommand-BFnZRfDg.css","assets/LoginView-BFIG7vGw.css","assets/DashboardView-Cvh03qbj.js","assets/useFormat-DVXTfIS-.js","assets/StateBadge.vue_vue_type_script_setup_true_lang-BsDpZsUH.js","assets/SkeletonList.vue_vue_type_script_setup_true_lang-DwoeliUC.js","assets/DeploymentsView-f3RgqUkQ.js","assets/RelativeTime.vue_vue_type_script_setup_true_lang-D7n5E9jw.js","assets/SelectMenu.vue_vue_type_script_setup_true_lang-CSQS6ben.js","assets/Teleport-BXE_6A8N.js","assets/DeploymentDetailView-BzEQBKhd.js","assets/useDeployment-B7kMYmcq.js","assets/useVars-VN9gYdR6.js","assets/ConflictNote.vue_vue_type_script_setup_true_lang-fprimIle.js","assets/ErrorNote.vue_vue_type_script_setup_true_lang-DT5SbSbT.js","assets/OverviewTab-Cy7_mGTt.js","assets/ConfigTab-BeAIDTnl.js","assets/VarEditor.vue_vue_type_script_setup_true_lang-ChzmZbEl.js","assets/HelpModal.vue_vue_type_script_setup_true_lang-2ev6wLk8.js","assets/RuntimeTab-D4sJaoqc.js","assets/AxesTab-vIQWJMZm.js","assets/RequiresTab-DDWsrZig.js","assets/LogsTab-DxhpYJY3.js","assets/LogViewer.vue_vue_type_script_setup_true_lang-B5K26k3c.js","assets/TerminalTab-lb8FY01Y.js","assets/TerminalTab-DbjRludT.css","assets/DangerTab-CcYJAftw.js","assets/RoutingView-BheJjs2g.js","assets/RegistriesView-dc-04uci.js","assets/NotifiersView-B53fERhd.js","assets/SpecsView-Cq_Ny0u3.js","assets/SpecDetailView-DSlpITFw.js","assets/SubmitView-DqOEabaL.js","assets/JobsView-B6RvX8WS.js","assets/JobDetailView-B5OFSqGO.js","assets/UsersView-mOC1UteJ.js","assets/UsersView-DpZ_4vlY.css","assets/VariablesView-NBIFfXQ5.js","assets/VariablesView-Cnpkn8AM.css","assets/SettingsView-CQIMBeQh.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/**
|
|
3
3
|
* @vue/shared v3.5.40
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -23,7 +23,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-Bj7uM
|
|
|
23
23
|
* vue-router v4.6.4
|
|
24
24
|
* (c) 2025 Eduardo San Martin Morote
|
|
25
25
|
* @license MIT
|
|
26
|
-
*/let bf=()=>location.protocol+"//"+location.host;function Kl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),$o(l,"")}return $o(n,e)+s+r}function Ef(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const g=Kl(e,location),C=n.value,w=t.value;let I=0;if(p){if(n.value=g,t.value=p,i&&i===C){i=null;return}I=w?p.position-w.position:0}else s(g);r.forEach(S=>{S(n.value,C,{delta:I,type:Rr.pop,direction:I?I>0?lr.forward:lr.back:lr.unknown})})};function a(){i=n.value}function u(p){r.push(p);const g=()=>{const C=r.indexOf(p);C>-1&&r.splice(C,1)};return o.push(g),g}function c(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ie({},p.state,{scroll:Ws()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:a,listen:u,destroy:f}}function qo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Ws():null}}function wf(e){const{history:t,location:n}=window,s={value:Kl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,u,c){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:bf()+e+a;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(g){console.error(g),n[c?"replace":"assign"](p)}}function i(a,u){o(a,ie({},t.state,qo(r.value.back,a,r.value.forward,!0),u,{position:r.value.position}),!0),s.value=a}function l(a,u){const c=ie({},r.value,t.state,{forward:a,scroll:Ws()});o(c.current,c,!0),o(a,ie({},qo(s.value,a,null),{position:c.position+1},u),!1),s.value=a}return{location:s,state:r,push:l,replace:i}}function Af(e){e=of(e);const t=wf(e),n=Ef(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ie({location:"",base:e,go:s,createHref:af.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Zt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ce=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Ce||{});const Cf={type:Zt.Static,value:""},Sf=/[a-zA-Z0-9_]/;function xf(e){if(!e)return[[]];if(e==="/")return[[Cf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=Ce.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,a,u="",c="";function f(){u&&(n===Ce.Static?o.push({type:Zt.Static,value:u}):n===Ce.Param||n===Ce.ParamRegExp||n===Ce.ParamRegExpEnd?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Zt.Param,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==Ce.ParamRegExp){s=n,n=Ce.EscapeNext;continue}switch(n){case Ce.Static:a==="/"?(u&&f(),i()):a===":"?(f(),n=Ce.Param):p();break;case Ce.EscapeNext:p(),n=s;break;case Ce.Param:a==="("?n=Ce.ParamRegExp:Sf.test(a)?p():(f(),n=Ce.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case Ce.ParamRegExp:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=Ce.ParamRegExpEnd:c+=a;break;case Ce.ParamRegExpEnd:f(),n=Ce.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===Ce.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),f(),i(),r}const zo="[^/]+?",Rf={sensitive:!1,strict:!1,start:!0,end:!0};var Fe=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Fe||{});const Tf=/[.+*?^${}()[\]/\\]/g;function kf(e,t){const n=ie({},Rf,t),s=[];let r=n.start?"^":"";const o=[];for(const u of e){const c=u.length?[]:[Fe.Root];n.strict&&!u.length&&(r+="/");for(let f=0;f<u.length;f++){const p=u[f];let g=Fe.Segment+(n.sensitive?Fe.BonusCaseSensitive:0);if(p.type===Zt.Static)f||(r+="/"),r+=p.value.replace(Tf,"\\$&"),g+=Fe.Static;else if(p.type===Zt.Param){const{value:C,repeatable:w,optional:I,regexp:S}=p;o.push({name:C,repeatable:w,optional:I});const v=S||zo;if(v!==zo){g+=Fe.BonusCustomRegExp;try{`${v}`}catch(x){throw new Error(`Invalid custom RegExp for param "${C}" (${v}): `+x.message)}}let k=w?`((?:${v})(?:/(?:${v}))*)`:`(${v})`;f||(k=I&&u.length<2?`(?:/${k})`:"/"+k),I&&(k+="?"),r+=k,g+=Fe.Dynamic,I&&(g+=Fe.BonusOptional),w&&(g+=Fe.BonusRepeatable),v===".*"&&(g+=Fe.BonusWildcard)}c.push(g)}s.push(c)}if(n.strict&&n.end){const u=s.length-1;s[u][s[u].length-1]+=Fe.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(u){const c=u.match(i),f={};if(!c)return null;for(let p=1;p<c.length;p++){const g=c[p]||"",C=o[p-1];f[C.name]=g&&C.repeatable?g.split("/"):g}return f}function a(u){let c="",f=!1;for(const p of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const g of p)if(g.type===Zt.Static)c+=g.value;else if(g.type===Zt.Param){const{value:C,repeatable:w,optional:I}=g,S=C in u?u[C]:"";if(rt(S)&&!w)throw new Error(`Provided param "${C}" is an array but it is not repeatable (* or + modifiers)`);const v=rt(S)?S.join("/"):S;if(!v)if(I)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${C}"`);c+=v}}return c||"/"}return{re:i,score:s,keys:o,parse:l,stringify:a}}function Pf(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===Fe.Static+Fe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Fe.Static+Fe.Segment?1:-1:0}function Wl(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const o=Pf(s[n],r[n]);if(o)return o;n++}if(Math.abs(r.length-s.length)===1){if(Jo(s))return 1;if(Jo(r))return-1}return r.length-s.length}function Jo(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Of={strict:!1,end:!0,sensitive:!1};function If(e,t,n){const s=kf(xf(e.path),n),r=ie(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Mf(e,t){const n=[],s=new Map;t=Ho(Of,t);function r(f){return s.get(f)}function o(f,p,g){const C=!g,w=Qo(f);w.aliasOf=g&&g.record;const I=Ho(t,f),S=[w];if("alias"in f){const x=typeof f.alias=="string"?[f.alias]:f.alias;for(const $ of x)S.push(Qo(ie({},w,{components:g?g.record.components:w.components,path:$,aliasOf:g?g.record:w})))}let v,k;for(const x of S){const{path:$}=x;if(p&&$[0]!=="/"){const z=p.record.path,V=z[z.length-1]==="/"?"":"/";x.path=p.record.path+($&&V+$)}if(v=If(x,p,I),g?g.alias.push(v):(k=k||v,k!==v&&k.alias.push(v),C&&f.name&&!Xo(v)&&i(f.name)),ql(v)&&a(v),w.children){const z=w.children;for(let V=0;V<z.length;V++)o(z[V],v,g&&g.children[V])}g=g||v}return k?()=>{i(k)}:Hn}function i(f){if(Ul(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function a(f){const p=Df(f,n);n.splice(p,0,f),f.record.name&&!Xo(f)&&s.set(f.record.name,f)}function u(f,p){let g,C={},w,I;if("name"in f&&f.name){if(g=s.get(f.name),!g)throw An(_e.MATCHER_NOT_FOUND,{location:f});I=g.record.name,C=ie(Yo(p.params,g.keys.filter(k=>!k.optional).concat(g.parent?g.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),f.params&&Yo(f.params,g.keys.map(k=>k.name))),w=g.stringify(C)}else if(f.path!=null)w=f.path,g=n.find(k=>k.re.test(w)),g&&(C=g.parse(w),I=g.record.name);else{if(g=p.name?s.get(p.name):n.find(k=>k.re.test(p.path)),!g)throw An(_e.MATCHER_NOT_FOUND,{location:f,currentLocation:p});I=g.record.name,C=ie({},p.params,f.params),w=g.stringify(C)}const S=[];let v=g;for(;v;)S.unshift(v.record),v=v.parent;return{name:I,path:w,params:C,matched:S,meta:Lf(S)}}e.forEach(f=>o(f));function c(){n.length=0,s.clear()}return{addRoute:o,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:r}}function Yo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Qo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Nf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Nf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Xo(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Lf(e){return e.reduce((t,n)=>ie(t,n.meta),{})}function Df(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Wl(e,t[o])<0?s=o:n=o+1}const r=Vf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Vf(e){let t=e;for(;t=t.parent;)if(ql(t)&&Wl(e,t)===0)return t}function ql({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Zo(e){const t=nt(qs),n=nt(Gr),s=Ne(()=>{const a=q(e.to);return t.resolve(a)}),r=Ne(()=>{const{matched:a}=s.value,{length:u}=a,c=a[u-1],f=n.matched;if(!c||!f.length)return-1;const p=f.findIndex(wn.bind(null,c));if(p>-1)return p;const g=ei(a[u-2]);return u>1&&ei(c)===g&&f[f.length-1].path!==g?f.findIndex(wn.bind(null,a[u-2])):p}),o=Ne(()=>r.value>-1&&$f(n.params,s.value.params)),i=Ne(()=>r.value>-1&&r.value===n.matched.length-1&&$l(n.params,s.value.params));function l(a={}){if(Hf(a)){const u=t[q(e.replace)?"replace":"push"](q(e.to)).catch(Hn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:Ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Ff(e){return e.length===1?e[0]:e}const jf=sn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Zo,setup(e,{slots:t}){const n=Kt(Zo(e)),{options:s}=nt(qs),r=Ne(()=>({[ti(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ti(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Ff(t.default(n));return e.custom?o:vn("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Bf=jf;function Hf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function $f(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!rt(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function ei(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ti=(e,t,n)=>e??t??n,Uf=sn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=nt(kr),r=Ne(()=>e.route||s.value),o=nt(Wo,0),i=Ne(()=>{let u=q(o);const{matched:c}=r.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),l=Ne(()=>r.value.matched[i.value]);cs(Wo,Ne(()=>i.value+1)),cs(_f,l),cs(kr,r);const a=Xe();return gt(()=>[a.value,l.value,e.name],([u,c,f],[p,g,C])=>{c&&(c.instances[f]=u,g&&g!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=g.leaveGuards),c.updateGuards.size||(c.updateGuards=g.updateGuards))),u&&c&&(!g||!wn(c,g)||!p)&&(c.enterCallbacks[f]||[]).forEach(w=>w(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,f=l.value,p=f&&f.components[c];if(!p)return ni(n.default,{Component:p,route:u});const g=f.props[c],C=g?g===!0?u.params:typeof g=="function"?g(u):g:null,I=vn(p,ie({},C,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[c]=null)},ref:a}));return ni(n.default,{Component:I,route:u})||I}}});function ni(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Gf=Uf;function Kf(e){const t=Mf(e.routes,e),n=e.parseQuery||mf,s=e.stringifyQuery||Ko,r=e.history,o=On(),i=On(),l=On(),a=Pa(Mt);let u=Mt;un&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=or.bind(null,b=>""+b),f=or.bind(null,Xu),p=or.bind(null,Yn);function g(b,D){let O,B;return Ul(b)?(O=t.getRecordMatcher(b),B=D):B=b,t.addRoute(B,O)}function C(b){const D=t.getRecordMatcher(b);D&&t.removeRoute(D)}function w(){return t.getRoutes().map(b=>b.record)}function I(b){return!!t.getRecordMatcher(b)}function S(b,D){if(D=ie({},D||a.value),typeof b=="string"){const m=ir(n,b,D.path),_=t.resolve({path:m.path},D),E=r.createHref(m.fullPath);return ie(m,_,{params:p(_.params),hash:Yn(m.hash),redirectedFrom:void 0,href:E})}let O;if(b.path!=null)O=ie({},b,{path:ir(n,b.path,D.path).path});else{const m=ie({},b.params);for(const _ in m)m[_]==null&&delete m[_];O=ie({},b,{params:f(m)}),D.params=f(D.params)}const B=t.resolve(O,D),Y=b.hash||"";B.params=c(p(B.params));const d=tf(s,ie({},b,{hash:Ju(Y),path:B.path})),h=r.createHref(d);return ie({fullPath:d,hash:Y,query:s===Ko?yf(b.query):b.query||{}},B,{redirectedFrom:void 0,href:h})}function v(b){return typeof b=="string"?ir(n,b,a.value.path):ie({},b)}function k(b,D){if(u!==b)return An(_e.NAVIGATION_CANCELLED,{from:D,to:b})}function x(b){return V(b)}function $(b){return x(ie(v(b),{replace:!0}))}function z(b,D){const O=b.matched[b.matched.length-1];if(O&&O.redirect){const{redirect:B}=O;let Y=typeof B=="function"?B(b,D):B;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=v(Y):{path:Y},Y.params={}),ie({query:b.query,hash:b.hash,params:Y.path!=null?{}:b.params},Y)}}function V(b,D){const O=u=S(b),B=a.value,Y=b.state,d=b.force,h=b.replace===!0,m=z(O,B);if(m)return V(ie(v(m),{state:typeof m=="object"?ie({},Y,m.state):Y,force:d,replace:h}),D||O);const _=O;_.redirectedFrom=D;let E;return!d&&nf(s,B,O)&&(E=An(_e.NAVIGATION_DUPLICATED,{to:_,from:B}),ot(B,B,!0,!1)),(E?Promise.resolve(E):J(_,B)).catch(y=>_t(y)?_t(y,_e.NAVIGATION_GUARD_REDIRECT)?y:Ot(y):oe(y,_,B)).then(y=>{if(y){if(_t(y,_e.NAVIGATION_GUARD_REDIRECT))return V(ie({replace:h},v(y.to),{state:typeof y.to=="object"?ie({},Y,y.to.state):Y,force:d}),D||_)}else y=N(_,B,!0,h,Y);return se(_,B,y),y})}function ee(b,D){const O=k(b,D);return O?Promise.reject(O):Promise.resolve()}function L(b){const D=on.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(b):b()}function J(b,D){let O;const[B,Y,d]=vf(b,D);O=ar(B.reverse(),"beforeRouteLeave",b,D);for(const m of B)m.leaveGuards.forEach(_=>{O.push(Vt(_,b,D))});const h=ee.bind(null,b,D);return O.push(h),Je(O).then(()=>{O=[];for(const m of o.list())O.push(Vt(m,b,D));return O.push(h),Je(O)}).then(()=>{O=ar(Y,"beforeRouteUpdate",b,D);for(const m of Y)m.updateGuards.forEach(_=>{O.push(Vt(_,b,D))});return O.push(h),Je(O)}).then(()=>{O=[];for(const m of d)if(m.beforeEnter)if(rt(m.beforeEnter))for(const _ of m.beforeEnter)O.push(Vt(_,b,D));else O.push(Vt(m.beforeEnter,b,D));return O.push(h),Je(O)}).then(()=>(b.matched.forEach(m=>m.enterCallbacks={}),O=ar(d,"beforeRouteEnter",b,D,L),O.push(h),Je(O))).then(()=>{O=[];for(const m of i.list())O.push(Vt(m,b,D));return O.push(h),Je(O)}).catch(m=>_t(m,_e.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function se(b,D,O){l.list().forEach(B=>L(()=>B(b,D,O)))}function N(b,D,O,B,Y){const d=k(b,D);if(d)return d;const h=D===Mt,m=un?history.state:{};O&&(B||h?r.replace(b.fullPath,ie({scroll:h&&m&&m.scroll},Y)):r.push(b.fullPath,Y)),a.value=b,ot(b,D,O,h),Ot()}let te;function ye(){te||(te=r.listen((b,D,O)=>{if(!Wt.listening)return;const B=S(b),Y=z(B,Wt.currentRoute.value);if(Y){V(ie(Y,{replace:!0,force:!0}),B).catch(Hn);return}u=B;const d=a.value;un&&ff(Go(d.fullPath,O.delta),Ws()),J(B,d).catch(h=>_t(h,_e.NAVIGATION_ABORTED|_e.NAVIGATION_CANCELLED)?h:_t(h,_e.NAVIGATION_GUARD_REDIRECT)?(V(ie(v(h.to),{force:!0}),B).then(m=>{_t(m,_e.NAVIGATION_ABORTED|_e.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===Rr.pop&&r.go(-1,!1)}).catch(Hn),Promise.reject()):(O.delta&&r.go(-O.delta,!1),oe(h,B,d))).then(h=>{h=h||N(B,d,!1),h&&(O.delta&&!_t(h,_e.NAVIGATION_CANCELLED)?r.go(-O.delta,!1):O.type===Rr.pop&&_t(h,_e.NAVIGATION_ABORTED|_e.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),se(B,d,h)}).catch(Hn)}))}let $e=On(),Ee=On(),ce;function oe(b,D,O){Ot(b);const B=Ee.list();return B.length?B.forEach(Y=>Y(b,D,O)):console.error(b),Promise.reject(b)}function mt(){return ce&&a.value!==Mt?Promise.resolve():new Promise((b,D)=>{$e.add([b,D])})}function Ot(b){return ce||(ce=!b,ye(),$e.list().forEach(([D,O])=>b?O(b):D()),$e.reset()),b}function ot(b,D,O,B){const{scrollBehavior:Y}=e;if(!un||!Y)return Promise.resolve();const d=!O&&df(Go(b.fullPath,0))||(B||!O)&&history.state&&history.state.scroll||null;return _n().then(()=>Y(b,D,d)).then(h=>h&&uf(h)).catch(h=>oe(h,b,D))}const He=b=>r.go(b);let rn;const on=new Set,Wt={currentRoute:a,listening:!0,addRoute:g,removeRoute:C,clearRoutes:t.clearRoutes,hasRoute:I,getRoutes:w,resolve:S,options:e,push:x,replace:$,go:He,back:()=>He(-1),forward:()=>He(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:Ee.add,isReady:mt,install(b){b.component("RouterLink",Bf),b.component("RouterView",Gf),b.config.globalProperties.$router=Wt,Object.defineProperty(b.config.globalProperties,"$route",{enumerable:!0,get:()=>q(a)}),un&&!rn&&a.value===Mt&&(rn=!0,x(r.location).catch(B=>{}));const D={};for(const B in Mt)Object.defineProperty(D,B,{get:()=>a.value[B],enumerable:!0});b.provide(qs,Wt),b.provide(Gr,Ni(D)),b.provide(kr,a);const O=b.unmount;on.add(b),b.unmount=function(){on.delete(b),on.size<1&&(u=Mt,te&&te(),te=null,a.value=Mt,rn=!1,ce=!1),O()}}};function Je(b){return b.reduce((D,O)=>D.then(()=>L(O)),Promise.resolve())}return Wt}function Kr(){return nt(qs)}function ph(e){return nt(Gr)}const Wf=[{path:"/login",name:"login",component:()=>pe(()=>import("./LoginView-Bj7uMFvv.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/",name:"dashboard",component:()=>pe(()=>import("./DashboardView-S4eiNX8X.js"),__vite__mapDeps([6,7,8,9]))},{path:"/deployments",name:"deployments",component:()=>pe(()=>import("./DeploymentsView-DIX7IA8g.js"),__vite__mapDeps([10,7,9,11,12,13]))},{path:"/deployments/:id",component:()=>pe(()=>import("./DeploymentDetailView-CD4RVr06.js"),__vite__mapDeps([14,7,15,16,17,1,18])),props:!0,children:[{path:"",name:"deployment",redirect:e=>`/deployments/${e.params.id}/overview`},{path:"overview",name:"d.overview",component:()=>pe(()=>import("./OverviewTab-jE_kOZI7.js"),__vite__mapDeps([19,15,16,7,9]))},{path:"config",name:"d.config",component:()=>pe(()=>import("./ConfigTab-Cyqzeq3C.js"),__vite__mapDeps([20,7,15,16,21,22,13]))},{path:"runtime",name:"d.runtime",component:()=>pe(()=>import("./RuntimeTab-B0D_MxFQ.js"),__vite__mapDeps([23,7,15,16,9,18]))},{path:"axes",name:"d.axes",component:()=>pe(()=>import("./AxesTab-CCB3wdSX.js"),__vite__mapDeps([24,15,16]))},{path:"requires",name:"d.requires",component:()=>pe(()=>import("./RequiresTab-BgGIZ1Tn.js"),__vite__mapDeps([25,15,16]))},{path:"logs",name:"d.logs",component:()=>pe(()=>import("./LogsTab-DRp76oC1.js"),__vite__mapDeps([26,15,16,7,12,13,27]))},{path:"terminal",name:"d.terminal",component:()=>pe(()=>import("./TerminalTab-DAZpn3jK.js"),__vite__mapDeps([28,18,12,13,3,29]))},{path:"danger",name:"d.danger",component:()=>pe(()=>import("./DangerTab-Cdr9luUy.js"),__vite__mapDeps([30,15,16,17,7,1,18]))}]},{path:"/routing",name:"routing",component:()=>pe(()=>import("./RoutingView-D2StZawf.js"),__vite__mapDeps([31,7,1,18,9,22,13]))},{path:"/registries",name:"registries",component:()=>pe(()=>import("./RegistriesView-D3Nh0dbq.js"),__vite__mapDeps([32,1,18,9,22,13]))},{path:"/notifiers",name:"notifiers",component:()=>pe(()=>import("./NotifiersView-CChDRHSy.js"),__vite__mapDeps([33,7,1,18,9,11,12,13]))},{path:"/specs",name:"specs",component:()=>pe(()=>import("./SpecsView-B49LI4Ut.js"),__vite__mapDeps([34,7,9,18,11,2,3,4]))},{path:"/specs/:name",name:"spec",component:()=>pe(()=>import("./SpecDetailView-DIi21wo1.js"),__vite__mapDeps([35,7,9,18])),props:!0},{path:"/submit/:id?",name:"submit",component:()=>pe(()=>import("./SubmitView-ZYGApCXE.js"),__vite__mapDeps([36,16,1,18,21,12,13])),props:!0},{path:"/jobs",name:"jobs",component:()=>pe(()=>import("./JobsView-Bd_XHRkd.js"),__vite__mapDeps([37,7,8,9,11,12,13]))},{path:"/jobs/:jobId",name:"job",component:()=>pe(()=>import("./JobDetailView-BsCnnkPz.js"),__vite__mapDeps([38,7,27,8,1,18])),props:!0},{path:"/users",name:"users",component:()=>pe(()=>import("./UsersView-BfQKf8Sf.js"),__vite__mapDeps([39,1,2,3,4,18,11,7,9,40]))},{path:"/variables",name:"variables",component:()=>pe(()=>import("./VariablesView-Bej9ZZmS.js"),__vite__mapDeps([41,1,2,3,4,18,11,7,9,42]))},{path:"/settings",name:"settings",component:()=>pe(()=>import("./SettingsView-Cu1Zkufg.js"),__vite__mapDeps([43,1,12,13]))},{path:"/:pathMatch(.*)*",name:"not-found",component:()=>pe(()=>import("./NotFoundView-D-A8YFJw.js"),[])}],Cn=Kf({history:Af(),routes:Wf,scrollBehavior:(e,t,n)=>n??{top:0}});Cn.beforeEach(async e=>{const{authState:t,checkAuth:n}=await pe(async()=>{const{authState:s,checkAuth:r}=await Promise.resolve().then(()=>md);return{authState:s,checkAuth:r}},void 0);return t.checked||await n(),e.name==="login"?t.authed?{path:"/"}:!0:t.authed?!0:{name:"login",query:e.fullPath!=="/"?{next:e.fullPath}:{}}});const Wr=typeof document<"u"&&typeof document.startViewTransition=="function";Wr&&(document.documentElement.dataset.vt="on");if(Wr){let e=null;Cn.beforeResolve(()=>new Promise(t=>{document.startViewTransition(()=>(t(),new Promise(n=>{e=n,setTimeout(()=>{e==null||e(),e=null},400)})))})),Cn.afterEach(async()=>{await _n(),e==null||e(),e=null})}let qf=0;const mn=Kt([]);function zl(e){const t=mn.findIndex(n=>n.id===e);t>=0&&mn.splice(t,1)}function gh(e,t,n={}){const s=++qf;mn.push({id:s,kind:e,text:t,to:n.to,toLabel:n.toLabel});const r=n.ms??(e==="error"?0:6e3);for(r>0&&setTimeout(()=>zl(s),r);mn.length>5;)mn.shift();return s}const zf={class:"toasts","aria-live":"polite","aria-atomic":"false"},Jf=["aria-label","onClick"],Yf=sn({__name:"ToastHost",setup(e){return(t,n)=>{const s=yr("RouterLink");return Z(),ge("div",zf,[G(vu,{name:"toast"},{default:we(()=>[(Z(!0),ge(ve,null,_s(q(mn),r=>(Z(),ge("div",{key:r.id,class:jt(["toast",r.kind])},[j("div",null,[j("div",null,Pe(r.text),1),r.to?(Z(),St(s,{key:0,to:r.to},{default:we(()=>[Ft(Pe(r.toLabel??"Open")+" →",1)]),_:2},1032,["to"])):Ge("",!0)]),j("button",{class:"x","aria-label":`dismiss: ${r.text}`,onClick:o=>q(zl)(r.id)},"✕",8,Jf)],2))),128))]),_:1})])}}}),Qf=900;function si(e){const t=e;if(!t)return!1;const n=t.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||t.isContentEditable===!0}function Xf(){const e=Kr(),t=Xe(!1);let n=0,s="";const r=o=>{if(o.key==="Escape"){t.value&&(t.value=!1,o.preventDefault()),si(o.target)&&o.target.blur();return}if(o.metaKey||o.ctrlKey||o.altKey||si(o.target))return;const i=Date.now();if(s==="g"&&i-n<Qf){s="";const l={d:"/deployments",j:"/jobs",h:"/",s:"/settings",n:"/submit"}[o.key];l&&(o.preventDefault(),e.push(l));return}if(o.key==="g"){s="g",n=i;return}if(s="",o.key==="?"){o.preventDefault(),t.value=!t.value;return}if(o.key==="/"){const l=document.querySelector("[data-search]");l&&(o.preventDefault(),l.focus(),l.select())}};return xn(()=>document.addEventListener("keydown",r)),es(()=>document.removeEventListener("keydown",r)),{sheetOpen:t}}const Zf=[{keys:"⌘K / Ctrl-K",what:"Open the command palette — jump to any deployment or page"},{keys:"?",what:"Open or close this sheet"},{keys:"g h",what:"Go to the dashboard"},{keys:"g d",what:"Go to deployments"},{keys:"g j",what:"Go to jobs"},{keys:"g n",what:"Go to submit"},{keys:"g s",what:"Go to settings"},{keys:"/",what:"Focus the search box on this view"},{keys:"Esc",what:"Close this sheet, or leave the field you are typing in"}],ed={class:"sheet"},td={class:"row"},nd=sn({__name:"ShortcutSheet",props:{open:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=t;return(s,r)=>(Z(),St(Ks,{name:"fade"},{default:we(()=>[e.open?(Z(),ge("div",{key:0,class:"scrim",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",onClick:r[1]||(r[1]=Ll(o=>n("close"),["self"]))},[j("div",ed,[j("div",td,[r[2]||(r[2]=j("h2",{style:{"font-size":"var(--t-lg)","font-weight":"650"}},"Keyboard shortcuts",-1)),r[3]||(r[3]=j("span",{class:"grow"},null,-1)),j("button",{class:"ghost sm",onClick:r[0]||(r[0]=o=>n("close"))},"Close")]),j("dl",null,[(Z(!0),ge(ve,null,_s(q(Zf),o=>(Z(),ge(ve,{key:o.keys},[j("dt",null,[(Z(!0),ge(ve,null,_s(o.keys.split(" "),i=>(Z(),ge("kbd",{key:i,style:{"margin-left":"4px"}},Pe(i),1))),128))]),j("dd",null,Pe(o.what),1)],64))),128))])])])):Ge("",!0)]),_:1}))}}),Ut={token:"pstack.ui.token",apiBase:"pstack.ui.apiBase",theme:"pstack.ui.theme",motion:"pstack.ui.motion"};function Cs(e,t){try{return localStorage.getItem(e)??t}catch{return t}}function Ss(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const cr=Cs(Ut.theme,"system"),ur=Cs(Ut.motion,"system"),Be=Kt({token:Cs(Ut.token,""),apiBase:Cs(Ut.apiBase,""),theme:cr==="dark"||cr==="light"?cr:"system",motion:ur==="full"||ur==="none"?ur:"system"});function Jl(){const e=document.documentElement;Be.theme==="system"?delete e.dataset.theme:e.dataset.theme=Be.theme,Be.motion==="system"?delete e.dataset.motion:e.dataset.motion=Be.motion}gt(()=>Be.token,e=>Ss(Ut.token,e));gt(()=>Be.apiBase,e=>Ss(Ut.apiBase,e));gt(()=>[Be.theme,Be.motion],()=>{Ss(Ut.theme,Be.theme==="system"?"":Be.theme),Ss(Ut.motion,Be.motion==="system"?"":Be.motion),Jl()});Jl();function mh(e,t={}){const n=new URLSearchParams;for(const r of e)r.k&&n.set(r.k,r.v??"");for(const[r,o]of Object.entries(t))n.set(r,String(o));const s=n.toString();return s?`?${s}`:""}function Yl(e){const t=Be.apiBase.replace(/\/$/,"");return t?t+e:e}let ds=null;function sd(e){ds=e}async function an(e,t,n,s=!1){const r={};e!=="GET"&&(r["content-type"]="application/json"),Be.token&&(r.authorization=`Bearer ${Be.token}`);try{const o=await fetch(Yl(t),{method:e,headers:r,body:n===void 0?void 0:JSON.stringify(n)}),i=await o.text();let l=null;try{l=i?JSON.parse(i):null}catch{}return o.status===401&&!t.startsWith("/api/auth/")&&(ds==null||ds()),l===null&&i?{status:o.status,ok:o.ok,body:{},raw:i,notJson:!0}:{status:o.status,ok:o.ok,body:l??{},raw:i,notJson:!1}}catch(o){return{status:0,ok:!1,body:{error:`unreachable: ${o.message}`},raw:"",notJson:!1}}}const Gt={get:e=>an("GET",e),getAuthed:e=>an("GET",e,void 0,!0),post:(e,t)=>an("POST",e,t??{}),put:(e,t)=>an("PUT",e,t),patch:(e,t)=>an("PATCH",e,t),del:e=>an("DELETE",e),url:Yl};function qr(e,t){if(e.status===0)return e.body.error??"unreachable";if(e.status===401)return`${t}: 401 unauthorized — set the bearer token in Settings.`;if(e.notJson)return`${t}: HTTP ${e.status}, and the response was not JSON. Something other than the pstack API answered — a proxy, or an error page.
|
|
26
|
+
*/let bf=()=>location.protocol+"//"+location.host;function Kl(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),$o(l,"")}return $o(n,e)+s+r}function Ef(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const g=Kl(e,location),C=n.value,w=t.value;let I=0;if(p){if(n.value=g,t.value=p,i&&i===C){i=null;return}I=w?p.position-w.position:0}else s(g);r.forEach(S=>{S(n.value,C,{delta:I,type:Rr.pop,direction:I?I>0?lr.forward:lr.back:lr.unknown})})};function a(){i=n.value}function u(p){r.push(p);const g=()=>{const C=r.indexOf(p);C>-1&&r.splice(C,1)};return o.push(g),g}function c(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ie({},p.state,{scroll:Ws()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:a,listen:u,destroy:f}}function qo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Ws():null}}function wf(e){const{history:t,location:n}=window,s={value:Kl(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,u,c){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:bf()+e+a;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(g){console.error(g),n[c?"replace":"assign"](p)}}function i(a,u){o(a,ie({},t.state,qo(r.value.back,a,r.value.forward,!0),u,{position:r.value.position}),!0),s.value=a}function l(a,u){const c=ie({},r.value,t.state,{forward:a,scroll:Ws()});o(c.current,c,!0),o(a,ie({},qo(s.value,a,null),{position:c.position+1},u),!1),s.value=a}return{location:s,state:r,push:l,replace:i}}function Af(e){e=of(e);const t=wf(e),n=Ef(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ie({location:"",base:e,go:s,createHref:af.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Zt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Ce=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Ce||{});const Cf={type:Zt.Static,value:""},Sf=/[a-zA-Z0-9_]/;function xf(e){if(!e)return[[]];if(e==="/")return[[Cf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${u}": ${g}`)}let n=Ce.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,a,u="",c="";function f(){u&&(n===Ce.Static?o.push({type:Zt.Static,value:u}):n===Ce.Param||n===Ce.ParamRegExp||n===Ce.ParamRegExpEnd?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Zt.Param,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==Ce.ParamRegExp){s=n,n=Ce.EscapeNext;continue}switch(n){case Ce.Static:a==="/"?(u&&f(),i()):a===":"?(f(),n=Ce.Param):p();break;case Ce.EscapeNext:p(),n=s;break;case Ce.Param:a==="("?n=Ce.ParamRegExp:Sf.test(a)?p():(f(),n=Ce.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case Ce.ParamRegExp:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=Ce.ParamRegExpEnd:c+=a;break;case Ce.ParamRegExpEnd:f(),n=Ce.Static,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===Ce.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),f(),i(),r}const zo="[^/]+?",Rf={sensitive:!1,strict:!1,start:!0,end:!0};var Fe=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Fe||{});const Tf=/[.+*?^${}()[\]/\\]/g;function kf(e,t){const n=ie({},Rf,t),s=[];let r=n.start?"^":"";const o=[];for(const u of e){const c=u.length?[]:[Fe.Root];n.strict&&!u.length&&(r+="/");for(let f=0;f<u.length;f++){const p=u[f];let g=Fe.Segment+(n.sensitive?Fe.BonusCaseSensitive:0);if(p.type===Zt.Static)f||(r+="/"),r+=p.value.replace(Tf,"\\$&"),g+=Fe.Static;else if(p.type===Zt.Param){const{value:C,repeatable:w,optional:I,regexp:S}=p;o.push({name:C,repeatable:w,optional:I});const v=S||zo;if(v!==zo){g+=Fe.BonusCustomRegExp;try{`${v}`}catch(x){throw new Error(`Invalid custom RegExp for param "${C}" (${v}): `+x.message)}}let k=w?`((?:${v})(?:/(?:${v}))*)`:`(${v})`;f||(k=I&&u.length<2?`(?:/${k})`:"/"+k),I&&(k+="?"),r+=k,g+=Fe.Dynamic,I&&(g+=Fe.BonusOptional),w&&(g+=Fe.BonusRepeatable),v===".*"&&(g+=Fe.BonusWildcard)}c.push(g)}s.push(c)}if(n.strict&&n.end){const u=s.length-1;s[u][s[u].length-1]+=Fe.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(u){const c=u.match(i),f={};if(!c)return null;for(let p=1;p<c.length;p++){const g=c[p]||"",C=o[p-1];f[C.name]=g&&C.repeatable?g.split("/"):g}return f}function a(u){let c="",f=!1;for(const p of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const g of p)if(g.type===Zt.Static)c+=g.value;else if(g.type===Zt.Param){const{value:C,repeatable:w,optional:I}=g,S=C in u?u[C]:"";if(rt(S)&&!w)throw new Error(`Provided param "${C}" is an array but it is not repeatable (* or + modifiers)`);const v=rt(S)?S.join("/"):S;if(!v)if(I)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${C}"`);c+=v}}return c||"/"}return{re:i,score:s,keys:o,parse:l,stringify:a}}function Pf(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===Fe.Static+Fe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Fe.Static+Fe.Segment?1:-1:0}function Wl(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const o=Pf(s[n],r[n]);if(o)return o;n++}if(Math.abs(r.length-s.length)===1){if(Jo(s))return 1;if(Jo(r))return-1}return r.length-s.length}function Jo(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Of={strict:!1,end:!0,sensitive:!1};function If(e,t,n){const s=kf(xf(e.path),n),r=ie(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Mf(e,t){const n=[],s=new Map;t=Ho(Of,t);function r(f){return s.get(f)}function o(f,p,g){const C=!g,w=Qo(f);w.aliasOf=g&&g.record;const I=Ho(t,f),S=[w];if("alias"in f){const x=typeof f.alias=="string"?[f.alias]:f.alias;for(const $ of x)S.push(Qo(ie({},w,{components:g?g.record.components:w.components,path:$,aliasOf:g?g.record:w})))}let v,k;for(const x of S){const{path:$}=x;if(p&&$[0]!=="/"){const z=p.record.path,V=z[z.length-1]==="/"?"":"/";x.path=p.record.path+($&&V+$)}if(v=If(x,p,I),g?g.alias.push(v):(k=k||v,k!==v&&k.alias.push(v),C&&f.name&&!Xo(v)&&i(f.name)),ql(v)&&a(v),w.children){const z=w.children;for(let V=0;V<z.length;V++)o(z[V],v,g&&g.children[V])}g=g||v}return k?()=>{i(k)}:Hn}function i(f){if(Ul(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function a(f){const p=Df(f,n);n.splice(p,0,f),f.record.name&&!Xo(f)&&s.set(f.record.name,f)}function u(f,p){let g,C={},w,I;if("name"in f&&f.name){if(g=s.get(f.name),!g)throw An(_e.MATCHER_NOT_FOUND,{location:f});I=g.record.name,C=ie(Yo(p.params,g.keys.filter(k=>!k.optional).concat(g.parent?g.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),f.params&&Yo(f.params,g.keys.map(k=>k.name))),w=g.stringify(C)}else if(f.path!=null)w=f.path,g=n.find(k=>k.re.test(w)),g&&(C=g.parse(w),I=g.record.name);else{if(g=p.name?s.get(p.name):n.find(k=>k.re.test(p.path)),!g)throw An(_e.MATCHER_NOT_FOUND,{location:f,currentLocation:p});I=g.record.name,C=ie({},p.params,f.params),w=g.stringify(C)}const S=[];let v=g;for(;v;)S.unshift(v.record),v=v.parent;return{name:I,path:w,params:C,matched:S,meta:Lf(S)}}e.forEach(f=>o(f));function c(){n.length=0,s.clear()}return{addRoute:o,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:l,getRecordMatcher:r}}function Yo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Qo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Nf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Nf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Xo(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Lf(e){return e.reduce((t,n)=>ie(t,n.meta),{})}function Df(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Wl(e,t[o])<0?s=o:n=o+1}const r=Vf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Vf(e){let t=e;for(;t=t.parent;)if(ql(t)&&Wl(e,t)===0)return t}function ql({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Zo(e){const t=nt(qs),n=nt(Gr),s=Ne(()=>{const a=q(e.to);return t.resolve(a)}),r=Ne(()=>{const{matched:a}=s.value,{length:u}=a,c=a[u-1],f=n.matched;if(!c||!f.length)return-1;const p=f.findIndex(wn.bind(null,c));if(p>-1)return p;const g=ei(a[u-2]);return u>1&&ei(c)===g&&f[f.length-1].path!==g?f.findIndex(wn.bind(null,a[u-2])):p}),o=Ne(()=>r.value>-1&&$f(n.params,s.value.params)),i=Ne(()=>r.value>-1&&r.value===n.matched.length-1&&$l(n.params,s.value.params));function l(a={}){if(Hf(a)){const u=t[q(e.replace)?"replace":"push"](q(e.to)).catch(Hn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:s,href:Ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Ff(e){return e.length===1?e[0]:e}const jf=sn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Zo,setup(e,{slots:t}){const n=Kt(Zo(e)),{options:s}=nt(qs),r=Ne(()=>({[ti(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ti(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Ff(t.default(n));return e.custom?o:vn("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Bf=jf;function Hf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function $f(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!rt(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function ei(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ti=(e,t,n)=>e??t??n,Uf=sn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=nt(kr),r=Ne(()=>e.route||s.value),o=nt(Wo,0),i=Ne(()=>{let u=q(o);const{matched:c}=r.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),l=Ne(()=>r.value.matched[i.value]);cs(Wo,Ne(()=>i.value+1)),cs(_f,l),cs(kr,r);const a=Xe();return gt(()=>[a.value,l.value,e.name],([u,c,f],[p,g,C])=>{c&&(c.instances[f]=u,g&&g!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=g.leaveGuards),c.updateGuards.size||(c.updateGuards=g.updateGuards))),u&&c&&(!g||!wn(c,g)||!p)&&(c.enterCallbacks[f]||[]).forEach(w=>w(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,f=l.value,p=f&&f.components[c];if(!p)return ni(n.default,{Component:p,route:u});const g=f.props[c],C=g?g===!0?u.params:typeof g=="function"?g(u):g:null,I=vn(p,ie({},C,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[c]=null)},ref:a}));return ni(n.default,{Component:I,route:u})||I}}});function ni(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Gf=Uf;function Kf(e){const t=Mf(e.routes,e),n=e.parseQuery||mf,s=e.stringifyQuery||Ko,r=e.history,o=On(),i=On(),l=On(),a=Pa(Mt);let u=Mt;un&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=or.bind(null,b=>""+b),f=or.bind(null,Xu),p=or.bind(null,Yn);function g(b,D){let O,B;return Ul(b)?(O=t.getRecordMatcher(b),B=D):B=b,t.addRoute(B,O)}function C(b){const D=t.getRecordMatcher(b);D&&t.removeRoute(D)}function w(){return t.getRoutes().map(b=>b.record)}function I(b){return!!t.getRecordMatcher(b)}function S(b,D){if(D=ie({},D||a.value),typeof b=="string"){const m=ir(n,b,D.path),_=t.resolve({path:m.path},D),E=r.createHref(m.fullPath);return ie(m,_,{params:p(_.params),hash:Yn(m.hash),redirectedFrom:void 0,href:E})}let O;if(b.path!=null)O=ie({},b,{path:ir(n,b.path,D.path).path});else{const m=ie({},b.params);for(const _ in m)m[_]==null&&delete m[_];O=ie({},b,{params:f(m)}),D.params=f(D.params)}const B=t.resolve(O,D),Y=b.hash||"";B.params=c(p(B.params));const d=tf(s,ie({},b,{hash:Ju(Y),path:B.path})),h=r.createHref(d);return ie({fullPath:d,hash:Y,query:s===Ko?yf(b.query):b.query||{}},B,{redirectedFrom:void 0,href:h})}function v(b){return typeof b=="string"?ir(n,b,a.value.path):ie({},b)}function k(b,D){if(u!==b)return An(_e.NAVIGATION_CANCELLED,{from:D,to:b})}function x(b){return V(b)}function $(b){return x(ie(v(b),{replace:!0}))}function z(b,D){const O=b.matched[b.matched.length-1];if(O&&O.redirect){const{redirect:B}=O;let Y=typeof B=="function"?B(b,D):B;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=v(Y):{path:Y},Y.params={}),ie({query:b.query,hash:b.hash,params:Y.path!=null?{}:b.params},Y)}}function V(b,D){const O=u=S(b),B=a.value,Y=b.state,d=b.force,h=b.replace===!0,m=z(O,B);if(m)return V(ie(v(m),{state:typeof m=="object"?ie({},Y,m.state):Y,force:d,replace:h}),D||O);const _=O;_.redirectedFrom=D;let E;return!d&&nf(s,B,O)&&(E=An(_e.NAVIGATION_DUPLICATED,{to:_,from:B}),ot(B,B,!0,!1)),(E?Promise.resolve(E):J(_,B)).catch(y=>_t(y)?_t(y,_e.NAVIGATION_GUARD_REDIRECT)?y:Ot(y):oe(y,_,B)).then(y=>{if(y){if(_t(y,_e.NAVIGATION_GUARD_REDIRECT))return V(ie({replace:h},v(y.to),{state:typeof y.to=="object"?ie({},Y,y.to.state):Y,force:d}),D||_)}else y=N(_,B,!0,h,Y);return se(_,B,y),y})}function ee(b,D){const O=k(b,D);return O?Promise.reject(O):Promise.resolve()}function L(b){const D=on.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(b):b()}function J(b,D){let O;const[B,Y,d]=vf(b,D);O=ar(B.reverse(),"beforeRouteLeave",b,D);for(const m of B)m.leaveGuards.forEach(_=>{O.push(Vt(_,b,D))});const h=ee.bind(null,b,D);return O.push(h),Je(O).then(()=>{O=[];for(const m of o.list())O.push(Vt(m,b,D));return O.push(h),Je(O)}).then(()=>{O=ar(Y,"beforeRouteUpdate",b,D);for(const m of Y)m.updateGuards.forEach(_=>{O.push(Vt(_,b,D))});return O.push(h),Je(O)}).then(()=>{O=[];for(const m of d)if(m.beforeEnter)if(rt(m.beforeEnter))for(const _ of m.beforeEnter)O.push(Vt(_,b,D));else O.push(Vt(m.beforeEnter,b,D));return O.push(h),Je(O)}).then(()=>(b.matched.forEach(m=>m.enterCallbacks={}),O=ar(d,"beforeRouteEnter",b,D,L),O.push(h),Je(O))).then(()=>{O=[];for(const m of i.list())O.push(Vt(m,b,D));return O.push(h),Je(O)}).catch(m=>_t(m,_e.NAVIGATION_CANCELLED)?m:Promise.reject(m))}function se(b,D,O){l.list().forEach(B=>L(()=>B(b,D,O)))}function N(b,D,O,B,Y){const d=k(b,D);if(d)return d;const h=D===Mt,m=un?history.state:{};O&&(B||h?r.replace(b.fullPath,ie({scroll:h&&m&&m.scroll},Y)):r.push(b.fullPath,Y)),a.value=b,ot(b,D,O,h),Ot()}let te;function ye(){te||(te=r.listen((b,D,O)=>{if(!Wt.listening)return;const B=S(b),Y=z(B,Wt.currentRoute.value);if(Y){V(ie(Y,{replace:!0,force:!0}),B).catch(Hn);return}u=B;const d=a.value;un&&ff(Go(d.fullPath,O.delta),Ws()),J(B,d).catch(h=>_t(h,_e.NAVIGATION_ABORTED|_e.NAVIGATION_CANCELLED)?h:_t(h,_e.NAVIGATION_GUARD_REDIRECT)?(V(ie(v(h.to),{force:!0}),B).then(m=>{_t(m,_e.NAVIGATION_ABORTED|_e.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===Rr.pop&&r.go(-1,!1)}).catch(Hn),Promise.reject()):(O.delta&&r.go(-O.delta,!1),oe(h,B,d))).then(h=>{h=h||N(B,d,!1),h&&(O.delta&&!_t(h,_e.NAVIGATION_CANCELLED)?r.go(-O.delta,!1):O.type===Rr.pop&&_t(h,_e.NAVIGATION_ABORTED|_e.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),se(B,d,h)}).catch(Hn)}))}let $e=On(),Ee=On(),ce;function oe(b,D,O){Ot(b);const B=Ee.list();return B.length?B.forEach(Y=>Y(b,D,O)):console.error(b),Promise.reject(b)}function mt(){return ce&&a.value!==Mt?Promise.resolve():new Promise((b,D)=>{$e.add([b,D])})}function Ot(b){return ce||(ce=!b,ye(),$e.list().forEach(([D,O])=>b?O(b):D()),$e.reset()),b}function ot(b,D,O,B){const{scrollBehavior:Y}=e;if(!un||!Y)return Promise.resolve();const d=!O&&df(Go(b.fullPath,0))||(B||!O)&&history.state&&history.state.scroll||null;return _n().then(()=>Y(b,D,d)).then(h=>h&&uf(h)).catch(h=>oe(h,b,D))}const He=b=>r.go(b);let rn;const on=new Set,Wt={currentRoute:a,listening:!0,addRoute:g,removeRoute:C,clearRoutes:t.clearRoutes,hasRoute:I,getRoutes:w,resolve:S,options:e,push:x,replace:$,go:He,back:()=>He(-1),forward:()=>He(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:Ee.add,isReady:mt,install(b){b.component("RouterLink",Bf),b.component("RouterView",Gf),b.config.globalProperties.$router=Wt,Object.defineProperty(b.config.globalProperties,"$route",{enumerable:!0,get:()=>q(a)}),un&&!rn&&a.value===Mt&&(rn=!0,x(r.location).catch(B=>{}));const D={};for(const B in Mt)Object.defineProperty(D,B,{get:()=>a.value[B],enumerable:!0});b.provide(qs,Wt),b.provide(Gr,Ni(D)),b.provide(kr,a);const O=b.unmount;on.add(b),b.unmount=function(){on.delete(b),on.size<1&&(u=Mt,te&&te(),te=null,a.value=Mt,rn=!1,ce=!1),O()}}};function Je(b){return b.reduce((D,O)=>D.then(()=>L(O)),Promise.resolve())}return Wt}function Kr(){return nt(qs)}function ph(e){return nt(Gr)}const Wf=[{path:"/login",name:"login",component:()=>pe(()=>import("./LoginView-NzylzAuv.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/",name:"dashboard",component:()=>pe(()=>import("./DashboardView-Cvh03qbj.js"),__vite__mapDeps([6,7,8,9]))},{path:"/deployments",name:"deployments",component:()=>pe(()=>import("./DeploymentsView-f3RgqUkQ.js"),__vite__mapDeps([10,7,9,11,12,13]))},{path:"/deployments/:id",component:()=>pe(()=>import("./DeploymentDetailView-BzEQBKhd.js"),__vite__mapDeps([14,7,15,16,17,1,18])),props:!0,children:[{path:"",name:"deployment",redirect:e=>`/deployments/${e.params.id}/overview`},{path:"overview",name:"d.overview",component:()=>pe(()=>import("./OverviewTab-Cy7_mGTt.js"),__vite__mapDeps([19,15,16,7,9]))},{path:"config",name:"d.config",component:()=>pe(()=>import("./ConfigTab-BeAIDTnl.js"),__vite__mapDeps([20,7,15,16,21,22,13]))},{path:"runtime",name:"d.runtime",component:()=>pe(()=>import("./RuntimeTab-D4sJaoqc.js"),__vite__mapDeps([23,7,15,16,9,1,18]))},{path:"axes",name:"d.axes",component:()=>pe(()=>import("./AxesTab-vIQWJMZm.js"),__vite__mapDeps([24,15,16]))},{path:"requires",name:"d.requires",component:()=>pe(()=>import("./RequiresTab-DDWsrZig.js"),__vite__mapDeps([25,15,16]))},{path:"logs",name:"d.logs",component:()=>pe(()=>import("./LogsTab-DxhpYJY3.js"),__vite__mapDeps([26,15,16,7,12,13,27]))},{path:"terminal",name:"d.terminal",component:()=>pe(()=>import("./TerminalTab-lb8FY01Y.js"),__vite__mapDeps([28,18,12,13,3,29]))},{path:"danger",name:"d.danger",component:()=>pe(()=>import("./DangerTab-CcYJAftw.js"),__vite__mapDeps([30,15,16,17,7,1,18]))}]},{path:"/routing",name:"routing",component:()=>pe(()=>import("./RoutingView-BheJjs2g.js"),__vite__mapDeps([31,7,1,18,9,22,13]))},{path:"/registries",name:"registries",component:()=>pe(()=>import("./RegistriesView-dc-04uci.js"),__vite__mapDeps([32,1,18,9,22,13]))},{path:"/notifiers",name:"notifiers",component:()=>pe(()=>import("./NotifiersView-B53fERhd.js"),__vite__mapDeps([33,7,1,18,9,11,12,13]))},{path:"/specs",name:"specs",component:()=>pe(()=>import("./SpecsView-Cq_Ny0u3.js"),__vite__mapDeps([34,7,9,18,11,2,3,4]))},{path:"/specs/:name",name:"spec",component:()=>pe(()=>import("./SpecDetailView-DSlpITFw.js"),__vite__mapDeps([35,7,9,18])),props:!0},{path:"/submit/:id?",name:"submit",component:()=>pe(()=>import("./SubmitView-DqOEabaL.js"),__vite__mapDeps([36,16,1,18,21,12,13])),props:!0},{path:"/jobs",name:"jobs",component:()=>pe(()=>import("./JobsView-B6RvX8WS.js"),__vite__mapDeps([37,7,8,9,11,12,13]))},{path:"/jobs/:jobId",name:"job",component:()=>pe(()=>import("./JobDetailView-B5OFSqGO.js"),__vite__mapDeps([38,7,27,8,1,18])),props:!0},{path:"/users",name:"users",component:()=>pe(()=>import("./UsersView-mOC1UteJ.js"),__vite__mapDeps([39,1,2,3,4,18,11,7,9,40]))},{path:"/variables",name:"variables",component:()=>pe(()=>import("./VariablesView-NBIFfXQ5.js"),__vite__mapDeps([41,1,2,3,4,18,11,7,9,42]))},{path:"/settings",name:"settings",component:()=>pe(()=>import("./SettingsView-CQIMBeQh.js"),__vite__mapDeps([43,1,12,13]))},{path:"/:pathMatch(.*)*",name:"not-found",component:()=>pe(()=>import("./NotFoundView-Cg_jPEQi.js"),[])}],Cn=Kf({history:Af(),routes:Wf,scrollBehavior:(e,t,n)=>n??{top:0}});Cn.beforeEach(async e=>{const{authState:t,checkAuth:n}=await pe(async()=>{const{authState:s,checkAuth:r}=await Promise.resolve().then(()=>md);return{authState:s,checkAuth:r}},void 0);return t.checked||await n(),e.name==="login"?t.authed?{path:"/"}:!0:t.authed?!0:{name:"login",query:e.fullPath!=="/"?{next:e.fullPath}:{}}});const Wr=typeof document<"u"&&typeof document.startViewTransition=="function";Wr&&(document.documentElement.dataset.vt="on");if(Wr){let e=null;Cn.beforeResolve(()=>new Promise(t=>{document.startViewTransition(()=>(t(),new Promise(n=>{e=n,setTimeout(()=>{e==null||e(),e=null},400)})))})),Cn.afterEach(async()=>{await _n(),e==null||e(),e=null})}let qf=0;const mn=Kt([]);function zl(e){const t=mn.findIndex(n=>n.id===e);t>=0&&mn.splice(t,1)}function gh(e,t,n={}){const s=++qf;mn.push({id:s,kind:e,text:t,to:n.to,toLabel:n.toLabel});const r=n.ms??(e==="error"?0:6e3);for(r>0&&setTimeout(()=>zl(s),r);mn.length>5;)mn.shift();return s}const zf={class:"toasts","aria-live":"polite","aria-atomic":"false"},Jf=["aria-label","onClick"],Yf=sn({__name:"ToastHost",setup(e){return(t,n)=>{const s=yr("RouterLink");return Z(),ge("div",zf,[G(vu,{name:"toast"},{default:we(()=>[(Z(!0),ge(ve,null,_s(q(mn),r=>(Z(),ge("div",{key:r.id,class:jt(["toast",r.kind])},[j("div",null,[j("div",null,Pe(r.text),1),r.to?(Z(),St(s,{key:0,to:r.to},{default:we(()=>[Ft(Pe(r.toLabel??"Open")+" →",1)]),_:2},1032,["to"])):Ge("",!0)]),j("button",{class:"x","aria-label":`dismiss: ${r.text}`,onClick:o=>q(zl)(r.id)},"✕",8,Jf)],2))),128))]),_:1})])}}}),Qf=900;function si(e){const t=e;if(!t)return!1;const n=t.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||t.isContentEditable===!0}function Xf(){const e=Kr(),t=Xe(!1);let n=0,s="";const r=o=>{if(o.key==="Escape"){t.value&&(t.value=!1,o.preventDefault()),si(o.target)&&o.target.blur();return}if(o.metaKey||o.ctrlKey||o.altKey||si(o.target))return;const i=Date.now();if(s==="g"&&i-n<Qf){s="";const l={d:"/deployments",j:"/jobs",h:"/",s:"/settings",n:"/submit"}[o.key];l&&(o.preventDefault(),e.push(l));return}if(o.key==="g"){s="g",n=i;return}if(s="",o.key==="?"){o.preventDefault(),t.value=!t.value;return}if(o.key==="/"){const l=document.querySelector("[data-search]");l&&(o.preventDefault(),l.focus(),l.select())}};return xn(()=>document.addEventListener("keydown",r)),es(()=>document.removeEventListener("keydown",r)),{sheetOpen:t}}const Zf=[{keys:"⌘K / Ctrl-K",what:"Open the command palette — jump to any deployment or page"},{keys:"?",what:"Open or close this sheet"},{keys:"g h",what:"Go to the dashboard"},{keys:"g d",what:"Go to deployments"},{keys:"g j",what:"Go to jobs"},{keys:"g n",what:"Go to submit"},{keys:"g s",what:"Go to settings"},{keys:"/",what:"Focus the search box on this view"},{keys:"Esc",what:"Close this sheet, or leave the field you are typing in"}],ed={class:"sheet"},td={class:"row"},nd=sn({__name:"ShortcutSheet",props:{open:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const n=t;return(s,r)=>(Z(),St(Ks,{name:"fade"},{default:we(()=>[e.open?(Z(),ge("div",{key:0,class:"scrim",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",onClick:r[1]||(r[1]=Ll(o=>n("close"),["self"]))},[j("div",ed,[j("div",td,[r[2]||(r[2]=j("h2",{style:{"font-size":"var(--t-lg)","font-weight":"650"}},"Keyboard shortcuts",-1)),r[3]||(r[3]=j("span",{class:"grow"},null,-1)),j("button",{class:"ghost sm",onClick:r[0]||(r[0]=o=>n("close"))},"Close")]),j("dl",null,[(Z(!0),ge(ve,null,_s(q(Zf),o=>(Z(),ge(ve,{key:o.keys},[j("dt",null,[(Z(!0),ge(ve,null,_s(o.keys.split(" "),i=>(Z(),ge("kbd",{key:i,style:{"margin-left":"4px"}},Pe(i),1))),128))]),j("dd",null,Pe(o.what),1)],64))),128))])])])):Ge("",!0)]),_:1}))}}),Ut={token:"pstack.ui.token",apiBase:"pstack.ui.apiBase",theme:"pstack.ui.theme",motion:"pstack.ui.motion"};function Cs(e,t){try{return localStorage.getItem(e)??t}catch{return t}}function Ss(e,t){try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}const cr=Cs(Ut.theme,"system"),ur=Cs(Ut.motion,"system"),Be=Kt({token:Cs(Ut.token,""),apiBase:Cs(Ut.apiBase,""),theme:cr==="dark"||cr==="light"?cr:"system",motion:ur==="full"||ur==="none"?ur:"system"});function Jl(){const e=document.documentElement;Be.theme==="system"?delete e.dataset.theme:e.dataset.theme=Be.theme,Be.motion==="system"?delete e.dataset.motion:e.dataset.motion=Be.motion}gt(()=>Be.token,e=>Ss(Ut.token,e));gt(()=>Be.apiBase,e=>Ss(Ut.apiBase,e));gt(()=>[Be.theme,Be.motion],()=>{Ss(Ut.theme,Be.theme==="system"?"":Be.theme),Ss(Ut.motion,Be.motion==="system"?"":Be.motion),Jl()});Jl();function mh(e,t={}){const n=new URLSearchParams;for(const r of e)r.k&&n.set(r.k,r.v??"");for(const[r,o]of Object.entries(t))n.set(r,String(o));const s=n.toString();return s?`?${s}`:""}function Yl(e){const t=Be.apiBase.replace(/\/$/,"");return t?t+e:e}let ds=null;function sd(e){ds=e}async function an(e,t,n,s=!1){const r={};e!=="GET"&&(r["content-type"]="application/json"),Be.token&&(r.authorization=`Bearer ${Be.token}`);try{const o=await fetch(Yl(t),{method:e,headers:r,body:n===void 0?void 0:JSON.stringify(n)}),i=await o.text();let l=null;try{l=i?JSON.parse(i):null}catch{}return o.status===401&&!t.startsWith("/api/auth/")&&(ds==null||ds()),l===null&&i?{status:o.status,ok:o.ok,body:{},raw:i,notJson:!0}:{status:o.status,ok:o.ok,body:l??{},raw:i,notJson:!1}}catch(o){return{status:0,ok:!1,body:{error:`unreachable: ${o.message}`},raw:"",notJson:!1}}}const Gt={get:e=>an("GET",e),getAuthed:e=>an("GET",e,void 0,!0),post:(e,t)=>an("POST",e,t??{}),put:(e,t)=>an("PUT",e,t),patch:(e,t)=>an("PATCH",e,t),del:e=>an("DELETE",e),url:Yl};function qr(e,t){if(e.status===0)return e.body.error??"unreachable";if(e.status===401)return`${t}: 401 unauthorized — set the bearer token in Settings.`;if(e.notJson)return`${t}: HTTP ${e.status}, and the response was not JSON. Something other than the pstack API answered — a proxy, or an error page.
|
|
27
27
|
|
|
28
28
|
${e.raw.slice(0,400)}`;const n=e.body.error;return e.status===404&&(!n||n==="not found")?`${t}: 404 — no such resource, or this build of the API has no such route yet.`:n?`${t}: ${n}`:`${t}: HTTP ${e.status}`}function yh(e){const t=e.error??"HTTP 409 (no message)",n=e.stack??"";return e.kind?{kind:"shared",text:t,stack:n,deployments:[]}:e.containers!==void 0?{kind:"containers",text:t,stack:n,deployments:[]}:e.deployments?{kind:"referenced",text:t,stack:n,deployments:e.deployments}:{kind:"other",text:t,stack:n,deployments:[]}}const rd={class:"palette",role:"dialog","aria-modal":"true","aria-label":"Command palette"},od={class:"palette-q"},id={key:0,class:"palette-empty"},ld={key:0,class:"palette-group"},ad=["data-on","onClick","onMousemove"],cd={class:"palette-label"},ud={key:0,class:"palette-hint"},fd={class:"palette-foot"},dd=sn({__name:"CommandPalette",setup(e,{expose:t}){const n=Kr(),s=Xe(!1),r=Xe(""),o=Xe(0),i=Xe([]),l=Xe(null),a=Xe(null),u=[{id:"p.dash",label:"Dashboard",hint:"g h",group:"Go to",to:"/",base:9},{id:"p.dep",label:"Deployments",hint:"g d",group:"Go to",to:"/deployments",base:8},{id:"p.jobs",label:"Jobs",hint:"g j",group:"Go to",to:"/jobs",base:7},{id:"p.specs",label:"Specs",group:"Go to",to:"/specs",base:6},{id:"p.routing",label:"Routing",group:"Go to",to:"/routing",base:5},{id:"p.reg",label:"Registries",group:"Go to",to:"/registries",base:4},{id:"p.notif",label:"Notifiers",group:"Go to",to:"/notifiers",base:3},{id:"p.hostvars",label:"Variables & secrets",group:"Go to",to:"/variables",base:2.7},{id:"p.users",label:"Users & access",group:"Go to",to:"/users",base:2.5},{id:"p.set",label:"Settings",hint:"g s",group:"Go to",to:"/settings",base:2},{id:"a.submit",label:"Submit a spec",hint:"g n",group:"Actions",to:"/submit",base:1}];function c(S,v){if(!v)return 0;const k=S.toLowerCase(),x=v.toLowerCase();let $=0,z=0,V=0;for(const ee of x){const L=k.indexOf(ee,$);if(L===-1)return null;V=L===$&&$>0?V+1:0,z+=10+V*12-Math.min(L-$,8),L===0&&(z+=25),$=L+1}return z-k.length*.4}const f=Ne(()=>{const S=i.value.map(x=>({id:`d.${x.id}`,label:x.id,hint:x.stack??void 0,group:"Deployments",to:`/deployments/${encodeURIComponent(x.id)}/overview`,base:0})),v=[...u,...S],k=r.value.trim();return k?v.map(x=>({it:x,s:c(`${x.label} ${x.hint??""}`,k)})).filter(x=>x.s!==null).sort((x,$)=>$.s-x.s||$.it.base-x.it.base).map(x=>x.it):v.slice().sort((x,$)=>$.base-x.base)}),p=Ne(()=>f.value.map((S,v)=>({it:S,head:v===0||f.value[v-1].group!==S.group})));async function g(){var v;s.value=!0,r.value="",o.value=0,await _n(),(v=l.value)==null||v.focus();const S=await Gt.get("/api/deployments");S.ok&&(i.value=S.body.deployments)}function C(){s.value=!1}function w(S){S&&(C(),n.push(S.to))}gt(o,async()=>{var S,v;await _n(),(v=(S=a.value)==null?void 0:S.querySelector('[data-on="true"]'))==null||v.scrollIntoView({block:"nearest"})}),gt(r,()=>o.value=0);function I(S){if((S.metaKey||S.ctrlKey)&&S.key.toLowerCase()==="k"){S.preventDefault(),s.value?C():g();return}s.value&&(S.key==="Escape"?(S.preventDefault(),C()):S.key==="ArrowDown"||S.key==="n"&&S.ctrlKey?(S.preventDefault(),o.value=Math.min(o.value+1,f.value.length-1)):S.key==="ArrowUp"||S.key==="p"&&S.ctrlKey?(S.preventDefault(),o.value=Math.max(o.value-1,0)):S.key==="Enter"&&(S.preventDefault(),w(f.value[o.value])))}return xn(()=>document.addEventListener("keydown",I)),es(()=>document.removeEventListener("keydown",I)),t({show:g}),(S,v)=>(Z(),St(Ks,{name:"fade"},{default:we(()=>[s.value?(Z(),ge("div",{key:0,class:"scrim palette-scrim",onClick:Ll(C,["self"])},[j("div",rd,[j("div",od,[v[1]||(v[1]=j("svg",{viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true"},[j("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),j("path",{d:"M16.5 16.5 21 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),Ga(j("input",{ref_key:"input",ref:l,"onUpdate:modelValue":v[0]||(v[0]=k=>r.value=k),type:"text",placeholder:"Go to a deployment, a page, an action…","aria-label":"Search",autocomplete:"off",spellcheck:"false"},null,512),[[Sr,r.value]]),v[2]||(v[2]=j("kbd",null,"esc",-1))]),j("div",{ref_key:"listEl",ref:a,class:"palette-list"},[p.value.length?Ge("",!0):(Z(),ge("p",id," Nothing matches “"+Pe(r.value)+"”. ",1)),(Z(!0),ge(ve,null,_s(p.value,(k,x)=>(Z(),ge(ve,{key:k.it.id},[k.head?(Z(),ge("div",ld,Pe(k.it.group),1)):Ge("",!0),j("button",{class:"palette-row","data-on":x===o.value,onClick:$=>w(k.it),onMousemove:$=>o.value=x},[j("span",cd,Pe(k.it.label),1),k.it.hint?(Z(),ge("span",ud,Pe(k.it.hint),1)):Ge("",!0)],40,ad)],64))),128))],512),j("div",fd,[v[3]||(v[3]=j("span",null,[j("kbd",null,"↑"),j("kbd",null,"↓"),Ft(" move")],-1)),v[4]||(v[4]=j("span",null,[j("kbd",null,"↵"),Ft(" open")],-1)),v[5]||(v[5]=j("span",{class:"grow"},null,-1)),j("span",null,Pe(f.value.length)+" result"+Pe(f.value.length===1?"":"s"),1)])])])):Ge("",!0)]),_:1}))}});function hd(e,t=6e3){let n;const s=()=>{n!==void 0&&clearInterval(n),n=void 0},r=()=>{s(),n=setInterval(e,t)},o=()=>{document.visibilityState==="visible"?(e(),r()):s()};xn(()=>{e(),document.visibilityState==="visible"&&r(),document.addEventListener("visibilitychange",o)}),es(()=>{s(),document.removeEventListener("visibilitychange",o)})}const me=Kt({health:null,healthError:"",deployments:[],deploymentsError:"",deploymentsLoaded:!1,jobs:[],jobsError:"",jobsLoaded:!1});async function ri(){const e=await Gt.get("/api/health");e.ok?(me.health=e.body,me.healthError=""):(me.health=null,me.healthError=qr(e,"GET /api/health"))}async function oi(){const e=await Gt.get("/api/deployments");if(me.deploymentsLoaded=!0,!e.ok){me.deploymentsError=qr(e,"GET /api/deployments");return}me.deploymentsError="",me.deployments=(e.body.deployments??[]).map(t=>({...t,kind:t.kind==="shared"?"shared":"isolated",busy:t.busy??null,running:t.running??null,stack:t.stack??null}))}async function ii(){const e=await Gt.get("/api/jobs");if(me.jobsLoaded=!0,!e.ok){me.jobsError=qr(e,"GET /api/jobs");return}me.jobsError="",me.jobs=e.body.jobs??[]}const _h=Ne(()=>{const e={total:0,isolated:0,shared:0,running:0,busy:0,unknown:0,unresolved:0};for(const t of me.deployments)e.total++,t.kind==="shared"?e.shared++:e.isolated++,t.busy===!0&&e.busy++,t.running===!0&&e.running++,(t.busy===null||t.running===null)&&e.unknown++,t.unresolved&&e.unresolved++;return e}),vh=Ne(()=>me.jobs.filter(e=>e.state==="leaked"));function bh(e){return me.deployments.find(t=>t.id===e)}const ae=Kt({checked:!1,authed:!1,root:!1,user:null,hasUsers:null});async function pd(){const e=await Gt.get("/api/health");e.ok&&(ae.hasUsers=e.body.hasUsers??null);const t=await Gt.getAuthed("/api/auth/me");t.status!==0&&(ae.checked=!0,t.ok?(ae.authed=!0,ae.root=t.body.root===!0,ae.user=t.body.user??null):(ae.authed=!1,ae.root=!1,ae.user=null))}async function gd(e,t){const n=await Gt.post("/api/auth/login",{username:e,password:t});return n.ok?(ae.authed=!0,ae.root=!1,ae.user=n.body.user,null):n.body.error??"login failed"}async function Ql(){await Gt.post("/api/auth/logout",{}),ae.authed=!1,ae.root=!1,ae.user=null}sd(()=>{if(!ae.checked)return;const e=ae.authed;ae.authed=!1,ae.user=null,ae.root=!1;const t=Cn.currentRoute.value;e&&t.name!=="login"&&Cn.replace({name:"login",query:t.fullPath!=="/"?{next:t.fullPath}:{}})});const md=Object.freeze(Object.defineProperty({__proto__:null,authState:ae,checkAuth:pd,login:gd,logout:Ql},Symbol.toStringTag,{value:"Module"}));/**
|
|
29
29
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
@@ -135,5 +135,5 @@ ${e.raw.slice(0,400)}`;const n=e.body.error;return e.status===404&&(!n||n==="not
|
|
|
135
135
|
*
|
|
136
136
|
* This source code is licensed under the ISC license.
|
|
137
137
|
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const Nd=ze("waypoints",[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]]),Ld=["aria-label","aria-expanded"],Dd=sn({__name:"InfoHint",props:{label:{},align:{},side:{}},setup(e){const t=e,n=Xe(!1),s=Xe(!1),r=Xe(null);function o(l){n.value&&r.value&&!r.value.contains(l.target)&&(n.value=!1)}function i(l){l.key==="Escape"&&n.value&&(n.value=!1)}return xn(()=>{document.addEventListener("pointerdown",o),document.addEventListener("keydown",i)}),Fr(()=>{document.removeEventListener("pointerdown",o),document.removeEventListener("keydown",i)}),(l,a)=>(Z(),ge("span",{ref_key:"root",ref:r,class:"hint-wrap"},[j("button",{type:"button",class:jt(["hint-btn",{on:n.value}]),"aria-label":t.label??"More information","aria-expanded":n.value||s.value,onClick:a[0]||(a[0]=u=>n.value=!n.value),onPointerenter:a[1]||(a[1]=u=>s.value=!0),onPointerleave:a[2]||(a[2]=u=>s.value=!1),onFocus:a[3]||(a[3]=u=>s.value=!0),onBlur:a[4]||(a[4]=u=>s.value=!1)},[G(q(xd),{size:15,"stroke-width":2,"aria-hidden":"true"})],42,Ld),G(Ks,{name:"hint"},{default:we(()=>[n.value||s.value?(Z(),ge("span",{key:0,class:jt(["hint-bub",[t.align==="end"?"to-end":"to-start",t.side==="top"?"above":"below"]]),role:"tooltip"},[cc(l.$slots,"default")],2)):Ge("",!0)]),_:3})],512))}}),Vd={key:0,class:"rail"},Fd={"aria-label":"Sections"},jd={class:"count"},Bd={class:"count"},Hd={class:"foot"},$d={key:0,class:"s-failed"},Ud={key:1,class:"row",style:{gap:"4px"}},Gd={key:0,class:"foot-who"},Kd={key:1,class:"foot-who"},Wd={class:"mute"},qd={class:"row",style:{gap:"var(--s1)"}},zd={id:"main",class:"view"},Jd=sn({__name:"App",setup(e){const{sheetOpen:t}=Xf();hd(()=>{ae.authed&&(oi(),ii())},7e3),gt(()=>ae.authed,o=>{o&&(oi(),ii(),ri())});const n=Kr();async function s(){await Ql(),n.push("/login")}ri();const r=Ne(()=>me.jobs.filter(o=>o.state==="running").length);return(o,i)=>{const l=yr("RouterLink"),a=yr("RouterView");return Z(),ge(ve,null,[i[16]||(i[16]=j("a",{class:"skip",href:"#main"},"Skip to content",-1)),j("div",{class:jt(["shell",{"no-rail":!q(ae).authed}])},[q(ae).authed?(Z(),ge("aside",Vd,[G(l,{to:"/",class:"brand"},{default:we(()=>[G(q(kd),{size:20,"aria-hidden":"true"}),i[2]||(i[2]=Ft(" pstack ",-1))]),_:1}),j("nav",Fd,[G(l,{to:"/",class:"navlink",title:"g h"},{default:we(()=>[G(q(Td),{size:17,"aria-hidden":"true"}),i[3]||(i[3]=j("span",null,"Dashboard",-1))]),_:1}),G(l,{to:"/deployments",class:"navlink",title:"g d"},{default:we(()=>[G(q(Ad),{size:17,"aria-hidden":"true"}),i[4]||(i[4]=j("span",null,"Deployments",-1)),j("span",jd,Pe(q(me).deployments.length),1)]),_:1}),G(l,{to:"/specs",class:"navlink"},{default:we(()=>[G(q(Sd),{size:17,"aria-hidden":"true"}),i[5]||(i[5]=j("span",null,"Specs",-1))]),_:1}),G(l,{to:"/routing",class:"navlink"},{default:we(()=>[G(q(Nd),{size:17,"aria-hidden":"true"}),i[6]||(i[6]=j("span",null,"Routing",-1))]),_:1}),G(l,{to:"/registries",class:"navlink"},{default:we(()=>[G(q(Rd),{size:17,"aria-hidden":"true"}),i[7]||(i[7]=j("span",null,"Registries",-1))]),_:1}),G(l,{to:"/notifiers",class:"navlink"},{default:we(()=>[G(q(wd),{size:17,"aria-hidden":"true"}),i[8]||(i[8]=j("span",null,"Notifiers",-1))]),_:1}),G(l,{to:"/jobs",class:"navlink",title:"g j"},{default:we(()=>[G(q(Cd),{size:17,"aria-hidden":"true"}),i[9]||(i[9]=j("span",null,"Jobs",-1)),j("span",Bd,Pe(r.value?`${r.value}▸`:q(me).jobs.length),1)]),_:1}),G(l,{to:"/submit",class:"navlink",title:"g n"},{default:we(()=>[G(q(Pd),{size:17,"aria-hidden":"true"}),i[10]||(i[10]=j("span",null,"Submit",-1))]),_:1}),G(l,{to:"/variables",class:"navlink"},{default:we(()=>[G(q(Md),{size:17,"aria-hidden":"true"}),i[11]||(i[11]=j("span",null,"Variables",-1))]),_:1}),G(l,{to:"/users",class:"navlink"},{default:we(()=>[G(q(Id),{size:17,"aria-hidden":"true"}),i[12]||(i[12]=j("span",null,"Users",-1))]),_:1}),G(l,{to:"/settings",class:"navlink",title:"g s"},{default:we(()=>[G(q(Od),{size:17,"aria-hidden":"true"}),i[13]||(i[13]=j("span",null,"Settings",-1))]),_:1})]),j("div",Hd,[q(me).healthError?(Z(),ge("div",$d,"Can't reach the server")):q(me).health?(Z(),ge("div",Ud,[q(ae).user?(Z(),ge("span",Gd,Pe(q(ae).user.username),1)):q(ae).root&&q(ae).checked?(Z(),ge("span",Kd,"token access")):Ge("",!0),j("span",Wd,"· v"+Pe(q(me).health.version),1),G(Dd,{label:"server details",side:"top"},{default:we(()=>[i[14]||(i[14]=Ft(" Data is stored in ",-1)),j("code",null,Pe(q(me).health.dataDir),1),i[15]||(i[15]=Ft(" on the host. ",-1)),q(me).health.authEnforced===!1?(Z(),ge(ve,{key:0},[Ft(" This server accepts connections from this machine only, so it does not ask for a token. ")],64)):Ge("",!0)]),_:1})])):Ge("",!0),j("div",qd,[j("button",{class:"ghost sm",onClick:i[0]||(i[0]=u=>t.value=!0)},"Shortcuts"),q(ae).user?(Z(),ge("button",{key:0,class:"ghost sm",onClick:s},"Sign out")):Ge("",!0)])])])):Ge("",!0),j("main",zd,[G(a,null,{default:we(({Component:u})=>[q(Wr)?(Z(),St(lo(u),{key:0})):(Z(),St(Ks,{key:1,name:"view",mode:"out-in"},{default:we(()=>[(Z(),St(lo(u)))]),_:2},1024))]),_:1})])],2),G(Yf),G(dd),G(nd,{open:q(t),onClose:i[1]||(i[1]=u=>t.value=!1)},null,8,["open"])],64)}}});Nu(Jd).use(Cn).mount("#app");export{Dc as $,Gt as A,qr as B,Ne as C,Ms as D,jt as E,ve as F,Su as G,gt as H,lo as I,
|
|
139
|
-
//# sourceMappingURL=index-
|
|
138
|
+
*/const Nd=ze("waypoints",[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]]),Ld=["aria-label","aria-expanded"],Dd=sn({__name:"InfoHint",props:{label:{},align:{},side:{}},setup(e){const t=e,n=Xe(!1),s=Xe(!1),r=Xe(null);function o(l){n.value&&r.value&&!r.value.contains(l.target)&&(n.value=!1)}function i(l){l.key==="Escape"&&n.value&&(n.value=!1)}return xn(()=>{document.addEventListener("pointerdown",o),document.addEventListener("keydown",i)}),Fr(()=>{document.removeEventListener("pointerdown",o),document.removeEventListener("keydown",i)}),(l,a)=>(Z(),ge("span",{ref_key:"root",ref:r,class:"hint-wrap"},[j("button",{type:"button",class:jt(["hint-btn",{on:n.value}]),"aria-label":t.label??"More information","aria-expanded":n.value||s.value,onClick:a[0]||(a[0]=u=>n.value=!n.value),onPointerenter:a[1]||(a[1]=u=>s.value=!0),onPointerleave:a[2]||(a[2]=u=>s.value=!1),onFocus:a[3]||(a[3]=u=>s.value=!0),onBlur:a[4]||(a[4]=u=>s.value=!1)},[G(q(xd),{size:15,"stroke-width":2,"aria-hidden":"true"})],42,Ld),G(Ks,{name:"hint"},{default:we(()=>[n.value||s.value?(Z(),ge("span",{key:0,class:jt(["hint-bub",[t.align==="end"?"to-end":"to-start",t.side==="top"?"above":"below"]]),role:"tooltip"},[cc(l.$slots,"default")],2)):Ge("",!0)]),_:3})],512))}}),Vd={key:0,class:"rail"},Fd={"aria-label":"Sections"},jd={class:"count"},Bd={class:"count"},Hd={class:"foot"},$d={key:0,class:"s-failed"},Ud={key:1,class:"row",style:{gap:"4px"}},Gd={key:0,class:"foot-who"},Kd={key:1,class:"foot-who"},Wd={class:"mute"},qd={class:"row",style:{gap:"var(--s1)"}},zd={id:"main",class:"view"},Jd=sn({__name:"App",setup(e){const{sheetOpen:t}=Xf();hd(()=>{ae.authed&&(oi(),ii())},7e3),gt(()=>ae.authed,o=>{o&&(oi(),ii(),ri())});const n=Kr();async function s(){await Ql(),n.push("/login")}ri();const r=Ne(()=>me.jobs.filter(o=>o.state==="running").length);return(o,i)=>{const l=yr("RouterLink"),a=yr("RouterView");return Z(),ge(ve,null,[i[16]||(i[16]=j("a",{class:"skip",href:"#main"},"Skip to content",-1)),j("div",{class:jt(["shell",{"no-rail":!q(ae).authed}])},[q(ae).authed?(Z(),ge("aside",Vd,[G(l,{to:"/",class:"brand"},{default:we(()=>[G(q(kd),{size:20,"aria-hidden":"true"}),i[2]||(i[2]=Ft(" pstack ",-1))]),_:1}),j("nav",Fd,[G(l,{to:"/",class:"navlink",title:"g h"},{default:we(()=>[G(q(Td),{size:17,"aria-hidden":"true"}),i[3]||(i[3]=j("span",null,"Dashboard",-1))]),_:1}),G(l,{to:"/deployments",class:"navlink",title:"g d"},{default:we(()=>[G(q(Ad),{size:17,"aria-hidden":"true"}),i[4]||(i[4]=j("span",null,"Deployments",-1)),j("span",jd,Pe(q(me).deployments.length),1)]),_:1}),G(l,{to:"/specs",class:"navlink"},{default:we(()=>[G(q(Sd),{size:17,"aria-hidden":"true"}),i[5]||(i[5]=j("span",null,"Specs",-1))]),_:1}),G(l,{to:"/routing",class:"navlink"},{default:we(()=>[G(q(Nd),{size:17,"aria-hidden":"true"}),i[6]||(i[6]=j("span",null,"Routing",-1))]),_:1}),G(l,{to:"/registries",class:"navlink"},{default:we(()=>[G(q(Rd),{size:17,"aria-hidden":"true"}),i[7]||(i[7]=j("span",null,"Registries",-1))]),_:1}),G(l,{to:"/notifiers",class:"navlink"},{default:we(()=>[G(q(wd),{size:17,"aria-hidden":"true"}),i[8]||(i[8]=j("span",null,"Notifiers",-1))]),_:1}),G(l,{to:"/jobs",class:"navlink",title:"g j"},{default:we(()=>[G(q(Cd),{size:17,"aria-hidden":"true"}),i[9]||(i[9]=j("span",null,"Jobs",-1)),j("span",Bd,Pe(r.value?`${r.value}▸`:q(me).jobs.length),1)]),_:1}),G(l,{to:"/submit",class:"navlink",title:"g n"},{default:we(()=>[G(q(Pd),{size:17,"aria-hidden":"true"}),i[10]||(i[10]=j("span",null,"Submit",-1))]),_:1}),G(l,{to:"/variables",class:"navlink"},{default:we(()=>[G(q(Md),{size:17,"aria-hidden":"true"}),i[11]||(i[11]=j("span",null,"Variables",-1))]),_:1}),G(l,{to:"/users",class:"navlink"},{default:we(()=>[G(q(Id),{size:17,"aria-hidden":"true"}),i[12]||(i[12]=j("span",null,"Users",-1))]),_:1}),G(l,{to:"/settings",class:"navlink",title:"g s"},{default:we(()=>[G(q(Od),{size:17,"aria-hidden":"true"}),i[13]||(i[13]=j("span",null,"Settings",-1))]),_:1})]),j("div",Hd,[q(me).healthError?(Z(),ge("div",$d,"Can't reach the server")):q(me).health?(Z(),ge("div",Ud,[q(ae).user?(Z(),ge("span",Gd,Pe(q(ae).user.username),1)):q(ae).root&&q(ae).checked?(Z(),ge("span",Kd,"token access")):Ge("",!0),j("span",Wd,"· v"+Pe(q(me).health.version),1),G(Dd,{label:"server details",side:"top"},{default:we(()=>[i[14]||(i[14]=Ft(" Data is stored in ",-1)),j("code",null,Pe(q(me).health.dataDir),1),i[15]||(i[15]=Ft(" on the host. ",-1)),q(me).health.authEnforced===!1?(Z(),ge(ve,{key:0},[Ft(" This server accepts connections from this machine only, so it does not ask for a token. ")],64)):Ge("",!0)]),_:1})])):Ge("",!0),j("div",qd,[j("button",{class:"ghost sm",onClick:i[0]||(i[0]=u=>t.value=!0)},"Shortcuts"),q(ae).user?(Z(),ge("button",{key:0,class:"ghost sm",onClick:s},"Sign out")):Ge("",!0)])])])):Ge("",!0),j("main",zd,[G(a,null,{default:we(({Component:u})=>[q(Wr)?(Z(),St(lo(u),{key:0})):(Z(),St(Ks,{key:1,name:"view",mode:"out-in"},{default:we(()=>[(Z(),St(lo(u)))]),_:2},1024))]),_:1})])],2),G(Yf),G(dd),G(nd,{open:q(t),onClose:i[1]||(i[1]=u=>t.value=!1)},null,8,["open"])],64)}}});Nu(Jd).use(Cn).mount("#app");export{Dc as $,Gt as A,qr as B,Ne as C,Ms as D,jt as E,ve as F,Su as G,gt as H,lo as I,gh as J,Fr as K,mh as L,pe as M,Pa as N,oi as O,Cn as P,yh as Q,Be as R,Kt as S,Ks as T,bh as U,nh as V,cc as W,Vc as X,xn as Y,Yd as Z,Dd as _,j as a,xu as a0,fh as a1,_n as a2,dh as a3,es as a4,ri as a5,rh as a6,th as a7,ts as a8,Le as a9,sh as aa,nt as ab,vn as ac,ka as ad,cs as ae,oh as af,Zd as ag,ua as ah,Xd as ai,ah as aj,ih as ak,uh as al,ch as am,Na as an,Qd as ao,pr as ap,zs as aq,Zi as ar,eh as as,lh as at,Ie as au,Ht as av,hh as aw,ae as b,ge as c,sn as d,G as e,Ft as f,Ge as g,Ll as h,Ga as i,yr as j,Kr as k,ph as l,gd as m,pd as n,Z as o,hd as p,vh as q,Xe as r,_s as s,Pe as t,q as u,Sr as v,we as w,St as x,me as y,_h as z};
|
|
139
|
+
//# sourceMappingURL=index-wjzRhuU3.js.map
|