docker-client-mx 1.37.0 → 1.38.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.
Files changed (63) hide show
  1. package/dist/docker-desktop-mx/browser/chunk-3Xh0zgnl.js +4 -0
  2. package/dist/docker-desktop-mx/browser/chunk-86dQWBGy.js +2 -0
  3. package/dist/docker-desktop-mx/browser/{chunk-DppHyEV4.js → chunk-A1-s5LFW.js} +1 -1
  4. package/dist/docker-desktop-mx/browser/{chunk-CRVM0rcA.js → chunk-B10he8vC.js} +1 -1
  5. package/dist/docker-desktop-mx/browser/{chunk-D0FWgHJO.js → chunk-B417lX5i.js} +1 -1
  6. package/dist/docker-desktop-mx/browser/{chunk-ibW6UTMN.js → chunk-BJhrBPGr.js} +1 -1
  7. package/dist/docker-desktop-mx/browser/{chunk-DnXZxwhv.js → chunk-BJln0q-L.js} +1 -1
  8. package/dist/docker-desktop-mx/browser/{chunk-GRa_eWyd.js → chunk-BKqokLUJ.js} +1 -1
  9. package/dist/docker-desktop-mx/browser/{chunk-_ngdOVTJ.js → chunk-BNyiHfLm.js} +1 -1
  10. package/dist/docker-desktop-mx/browser/{chunk-Fctw84Xo.js → chunk-Biflawt5.js} +1 -1
  11. package/dist/docker-desktop-mx/browser/{chunk-DUvIPvPb.js → chunk-BuZMCHMG.js} +1 -1
  12. package/dist/docker-desktop-mx/browser/chunk-C2AEaPKl.js +1 -0
  13. package/dist/docker-desktop-mx/browser/{chunk-CnjgTml5.js → chunk-CJj93ZID.js} +1 -1
  14. package/dist/docker-desktop-mx/browser/chunk-CKKQa1e9.js +1 -0
  15. package/dist/docker-desktop-mx/browser/chunk-CQJfJJJO.js +4 -0
  16. package/dist/docker-desktop-mx/browser/{chunk-CBFZokW4.js → chunk-CRU66E5W.js} +1 -1
  17. package/dist/docker-desktop-mx/browser/{chunk-BEoyPb75.js → chunk-Cc4TZhIN2.js} +1 -1
  18. package/dist/docker-desktop-mx/browser/{chunk-NszG4cuZ.js → chunk-CcSH3zkW.js} +1 -1
  19. package/dist/docker-desktop-mx/browser/{chunk-C_xeoQ-e.js → chunk-CcUK35Ba.js} +1 -1
  20. package/dist/docker-desktop-mx/browser/{chunk-CFXWwPKo.js → chunk-ChkLvkqV.js} +1 -1
  21. package/dist/docker-desktop-mx/browser/{chunk-rv2Wq9aE.js → chunk-ClFvQPeD.js} +1 -1
  22. package/dist/docker-desktop-mx/browser/{chunk-BqwibbR9.js → chunk-CleqfF2a.js} +1 -1
  23. package/dist/docker-desktop-mx/browser/{chunk-MG8VVeEh.js → chunk-CsmSLtiO.js} +1 -1
  24. package/dist/docker-desktop-mx/browser/{chunk-CxswDxfD.js → chunk-CtE-C6Yi.js} +1 -1
  25. package/dist/docker-desktop-mx/browser/{chunk-t-OrhYrD.js → chunk-Cxf0K3gA.js} +1 -1
  26. package/dist/docker-desktop-mx/browser/{chunk-aZl-0gS4.js → chunk-D2ip_9iB.js} +1 -1
  27. package/dist/docker-desktop-mx/browser/{chunk-CKodeenq.js → chunk-D7w-wcec.js} +1 -1
  28. package/dist/docker-desktop-mx/browser/chunk-DBk_NOEo.js +1 -0
  29. package/dist/docker-desktop-mx/browser/{chunk-ChbnoZwy.js → chunk-DNfHCIbw.js} +1 -1
  30. package/dist/docker-desktop-mx/browser/{chunk-cfauKEfy.js → chunk-DmnENnOJ.js} +1 -1
  31. package/dist/docker-desktop-mx/browser/{chunk-CQIXZf41.js → chunk-Dw7M06TM.js} +1 -1
  32. package/dist/docker-desktop-mx/browser/{chunk-CJPEgaYc.js → chunk-DyCLoZvj.js} +2 -2
  33. package/dist/docker-desktop-mx/browser/{chunk-CnbHjkCv.js → chunk-F0R0gI7h.js} +1 -1
  34. package/dist/docker-desktop-mx/browser/{chunk-D_aXkfN2.js → chunk-JJCcZGeB.js} +1 -1
  35. package/dist/docker-desktop-mx/browser/{chunk-BsvB6MmB.js → chunk-Ou7gEgt7.js} +1 -1
  36. package/dist/docker-desktop-mx/browser/{chunk-85ZfO9F8.js → chunk-_hzP4C8y.js} +1 -1
  37. package/dist/docker-desktop-mx/browser/chunk-n7jRjd3_.js +5 -0
  38. package/dist/docker-desktop-mx/browser/index.html +2 -2
  39. package/dist/docker-desktop-mx/browser/main-27BJOEBW.js +1 -0
  40. package/dist/docker-desktop-mx/browser/styles-RGTBYKL7.css +1 -0
  41. package/dist-electron/attention.js +10 -2
  42. package/dist-electron/attention.js.map +1 -1
  43. package/dist-electron/channels.js +3 -0
  44. package/dist-electron/channels.js.map +1 -1
  45. package/dist-electron/ipc.js +4 -0
  46. package/dist-electron/ipc.js.map +1 -1
  47. package/dist-electron/palette-ai.js +5 -1
  48. package/dist-electron/palette-ai.js.map +1 -1
  49. package/dist-electron/preload.js +7 -1
  50. package/dist-electron/preload.js.map +1 -1
  51. package/dist-electron/project-update.js +120 -0
  52. package/dist-electron/project-update.js.map +1 -0
  53. package/dist-electron/system.js +2 -1
  54. package/dist-electron/system.js.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/docker-desktop-mx/browser/chunk-BBim8Gdo.js +0 -1
  57. package/dist/docker-desktop-mx/browser/chunk-BRMUzx40.js +0 -4
  58. package/dist/docker-desktop-mx/browser/chunk-Bdz1JYTl.js +0 -1
  59. package/dist/docker-desktop-mx/browser/chunk-CUr0g3Yg.js +0 -2
  60. package/dist/docker-desktop-mx/browser/chunk-D6QO1pHf.js +0 -1
  61. package/dist/docker-desktop-mx/browser/chunk-DanrBswj.js +0 -4
  62. package/dist/docker-desktop-mx/browser/main-5BW3ZB5N.js +0 -1
  63. package/dist/docker-desktop-mx/browser/styles-QQZVKMBI.css +0 -1
@@ -1 +1 @@
1
- import{A as I,Ct as Tc,Dn as kC,En as jc,Ft as Wm,H as Li,I as Jm,In as nS,J as My,Kn as pj,O as HC,On as kc,Qn as rg,R as Kr,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,_n as gj,_r as wt,at as Pr,cn as ec,er as sk,gt as SC,h as Dj,hr as wc,in as dk,ln as f,o as BC,pr as wD,r as Ac,tt as Od,un as fS,ut as RC}from"./chunk-DanrBswj.js";function $(i,e){i&1&&Gm(0,`li`,6)}function j(i,e){if(i&1){let t=RC();SC(0,$,1,0,`li`,6),Li(1,`li`,7)(2,`button`,8),Jm(`click`,function(){let o=Od(t).$implicit;return Ld(HC(2).pick(o))})(`keydown`,function(o){Od(t);return Ld(HC(2).onItemKey(o))}),Gm(3,`app-icon`,9),fS(4),Nc()()}if(i&2){let t=e.$implicit,n=HC(2);kC(t.separated?0:-1),ec(),zr(`title`,t.hint??null),ec(),nS(t.danger?n.dangerClass:n.normalClass),Wm(`disabled`,t.disabled===!0),zr(`data-testid`,`menu-`+t.id),ec(),Wm(`name`,t.icon)(`size`,14),ec(),Ac(` `,t.label,` `)}}function P(i,e){if(i&1&&(Li(0,`ul`,5),kc(1,j,5,9,null,null,U),Nc()),i&2){let t=HC();nS(t.upward()?`bottom-full mb-1.5`:`top-full mt-1.5`),zr(`aria-label`,t.shownLabel()),ec(),Tc(t.items())}}var Q;var U;var V;var G=f(()=>{Kr();sk();dk();Kr();Q=[`trigger`],U=(i,e)=>e.id;V=class i{items=jc.required();label=jc(null);compact=jc(!1,{transform:Dj});picked=pj();shownLabel=Lt(()=>this.label()??ok().shell.actionMenu.label);host=I(Pr);trigger=gj(`trigger`);open=wt(!1);upward=wt(!1);compactTriggerClass=`mx-focus cursor-pointer rounded p-1 text-ink-400 transition-colors hover:bg-ink-800 hover:text-ink-100`;normalClass=`text-ink-200 hover:bg-ink-750 hover:text-ink-100 focus-visible:bg-ink-750 focus-visible:text-ink-100`;dangerClass=`text-danger hover:bg-danger/15 focus-visible:bg-danger/15`;toggle(){let e=!this.open();e&&this.placeMenu(),this.open.set(e),e&&setTimeout(()=>this.focusItem(0))}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.open.set(!1)}onTriggerKey(e){e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),this.placeMenu(),this.open.set(!0),setTimeout(()=>this.focusItem(e.key===`ArrowUp`?-1:0)))}onItemKey(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&e.preventDefault(),this.close();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let n=this.enabledItems().indexOf(document.activeElement);this.focusItem(n===-1?0:n+(e.key===`ArrowDown`?1:-1))}pick(e){this.close(),this.picked.emit(e.id)}placeMenu(){let e=this.trigger()?.nativeElement;if(e===void 0)return;let t=e.getBoundingClientRect(),n=this.items().length*32+24,o=window.innerHeight-t.bottom;this.upward.set(o<n&&t.top>o)}close(){this.open.set(!1),this.trigger()?.nativeElement.focus()}enabledItems(){return[...this.host.nativeElement.querySelectorAll(`[role="menuitem"]:not(:disabled)`)]}focusItem(e){let t=this.enabledItems();t.length!==0&&t[(e+t.length)%t.length].focus()}static ɵfac=function(t){return new(t||i)};static ɵcmp=wc({type:i,selectors:[[`app-action-menu`]],viewQuery:function(t,n){t&1&&rg(n.trigger,Q,5),t&2&&BC()},hostBindings:function(t,n){t&1&&Jm(`pointerdown`,function(a){return n.onOutside(a)},wD)},inputs:{items:[1,`items`],label:[1,`label`],compact:[1,`compact`]},outputs:{picked:`picked`},decls:5,vars:7,consts:[[`trigger`,``],[1,`relative`],[`type`,`button`,`aria-haspopup`,`menu`,`data-testid`,`action-menu`,3,`click`,`keydown`,`title`],[`name`,`menu`,3,`size`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`,3,`class`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`],[`role`,`separator`,1,`my-1`,`border-t`,`border-ink-700`],[`role`,`none`],[`type`,`button`,`role`,`menuitem`,1,`mx-focus`,`flex`,`w-full`,`cursor-pointer`,`items-center`,`gap-2`,`px-3`,`py-1.5`,`text-left`,`text-[13px]`,`transition-colors`,`focus-visible:outline-none`,`disabled:cursor-not-allowed`,`disabled:opacity-40`,`disabled:hover:bg-transparent`,3,`click`,`keydown`,`disabled`],[3,`name`,`size`]],template:function(t,n){t&1&&(Li(0,`div`,1)(1,`button`,2,0),Jm(`click`,function(){return n.toggle()})(`keydown`,function(a){return n.onTriggerKey(a)}),Gm(3,`app-icon`,3),Nc(),SC(4,P,3,3,`ul`,4),Nc()),t&2&&(ec(),nS(n.compact()?n.compactTriggerClass:`mx-btn mx-focus`),Wm(`title`,n.shownLabel()),zr(`aria-expanded`,n.open())(`aria-label`,n.shownLabel()),ec(2),Wm(`size`,n.compact()?15:16),ec(),kC(n.open()?4:-1))},dependencies:[My],encapsulation:2})}});export{V as n,G as t};
1
+ import{A as I,Ct as Tc,Dn as kE,En as jc,Ft as Wm,H as Li,I as Jm,In as nS,J as My,Kn as pj,O as HE,On as kc,Qn as rg,R as Kr,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,_ as Dj,_n as gj,_r as wt,at as Pr,cn as ec,er as sk,gt as SE,hr as wc,in as dk,ln as f,o as BE,pr as wD,r as Ac,tt as Od,un as fS,ut as RE}from"./chunk-CQJfJJJO.js";function $(i,e){i&1&&Gm(0,`li`,6)}function j(i,e){if(i&1){let t=RE();SE(0,$,1,0,`li`,6),Li(1,`li`,7)(2,`button`,8),Jm(`click`,function(){let o=Od(t).$implicit;return Ld(HE(2).pick(o))})(`keydown`,function(o){Od(t);return Ld(HE(2).onItemKey(o))}),Gm(3,`app-icon`,9),fS(4),Nc()()}if(i&2){let t=e.$implicit,n=HE(2);kE(t.separated?0:-1),ec(),zr(`title`,t.hint??null),ec(),nS(t.danger?n.dangerClass:n.normalClass),Wm(`disabled`,t.disabled===!0),zr(`data-testid`,`menu-`+t.id),ec(),Wm(`name`,t.icon)(`size`,14),ec(),Ac(` `,t.label,` `)}}function P(i,e){if(i&1&&(Li(0,`ul`,5),kc(1,j,5,9,null,null,U),Nc()),i&2){let t=HE();nS(t.upward()?`bottom-full mb-1.5`:`top-full mt-1.5`),zr(`aria-label`,t.shownLabel()),ec(),Tc(t.items())}}var Q;var U;var V;var G=f(()=>{Kr();sk();dk();Kr();Q=[`trigger`],U=(i,e)=>e.id;V=class i{items=jc.required();label=jc(null);compact=jc(!1,{transform:Dj});picked=pj();shownLabel=Lt(()=>this.label()??ok().shell.actionMenu.label);host=I(Pr);trigger=gj(`trigger`);open=wt(!1);upward=wt(!1);compactTriggerClass=`mx-focus cursor-pointer rounded p-1 text-ink-400 transition-colors hover:bg-ink-800 hover:text-ink-100`;normalClass=`text-ink-200 hover:bg-ink-750 hover:text-ink-100 focus-visible:bg-ink-750 focus-visible:text-ink-100`;dangerClass=`text-danger hover:bg-danger/15 focus-visible:bg-danger/15`;toggle(){let e=!this.open();e&&this.placeMenu(),this.open.set(e),e&&setTimeout(()=>this.focusItem(0))}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.open.set(!1)}onTriggerKey(e){e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),this.placeMenu(),this.open.set(!0),setTimeout(()=>this.focusItem(e.key===`ArrowUp`?-1:0)))}onItemKey(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&e.preventDefault(),this.close();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let n=this.enabledItems().indexOf(document.activeElement);this.focusItem(n===-1?0:n+(e.key===`ArrowDown`?1:-1))}pick(e){this.close(),this.picked.emit(e.id)}placeMenu(){let e=this.trigger()?.nativeElement;if(e===void 0)return;let t=e.getBoundingClientRect(),n=this.items().length*32+24,o=window.innerHeight-t.bottom;this.upward.set(o<n&&t.top>o)}close(){this.open.set(!1),this.trigger()?.nativeElement.focus()}enabledItems(){return[...this.host.nativeElement.querySelectorAll(`[role="menuitem"]:not(:disabled)`)]}focusItem(e){let t=this.enabledItems();t.length!==0&&t[(e+t.length)%t.length].focus()}static ɵfac=function(t){return new(t||i)};static ɵcmp=wc({type:i,selectors:[[`app-action-menu`]],viewQuery:function(t,n){t&1&&rg(n.trigger,Q,5),t&2&&BE()},hostBindings:function(t,n){t&1&&Jm(`pointerdown`,function(a){return n.onOutside(a)},wD)},inputs:{items:[1,`items`],label:[1,`label`],compact:[1,`compact`]},outputs:{picked:`picked`},decls:5,vars:7,consts:[[`trigger`,``],[1,`relative`],[`type`,`button`,`aria-haspopup`,`menu`,`data-testid`,`action-menu`,3,`click`,`keydown`,`title`],[`name`,`menu`,3,`size`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`,3,`class`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`],[`role`,`separator`,1,`my-1`,`border-t`,`border-ink-700`],[`role`,`none`],[`type`,`button`,`role`,`menuitem`,1,`mx-focus`,`flex`,`w-full`,`cursor-pointer`,`items-center`,`gap-2`,`px-3`,`py-1.5`,`text-left`,`text-[13px]`,`transition-colors`,`focus-visible:outline-none`,`disabled:cursor-not-allowed`,`disabled:opacity-40`,`disabled:hover:bg-transparent`,3,`click`,`keydown`,`disabled`],[3,`name`,`size`]],template:function(t,n){t&1&&(Li(0,`div`,1)(1,`button`,2,0),Jm(`click`,function(){return n.toggle()})(`keydown`,function(a){return n.onTriggerKey(a)}),Gm(3,`app-icon`,3),Nc(),SE(4,P,3,3,`ul`,4),Nc()),t&2&&(ec(),nS(n.compact()?n.compactTriggerClass:`mx-btn mx-focus`),Wm(`title`,n.shownLabel()),zr(`aria-expanded`,n.open())(`aria-label`,n.shownLabel()),ec(2),Wm(`size`,n.compact()?15:16),ec(),kE(n.open()?4:-1))},dependencies:[My],encapsulation:2})}});export{V as n,G as t};
@@ -1 +1 @@
1
- import{A as I,Ct as Tc,Dn as kC,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Jt as ag,Kt as _m,Mn as lk,O as HC,On as kc,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,_r as wt,cn as ec,er as sk,gt as SC,hr as wc,in as dk,ln as f,r as Ac,sn as eH,sr as vS,tt as Od,un as fS,ur as vg,ut as RC,wt as Tg}from"./chunk-DanrBswj.js";import"./chunk-D0FWgHJO.js";import{i as h,n as N,r as d}from"./chunk-CnjgTml5.js";import{n as w,t as B}from"./chunk-t-OrhYrD.js";import{n as p,t as M}from"./chunk-85ZfO9F8.js";import{n as o,t as i}from"./chunk-D_aXkfN2.js";import{n as x,t as u}from"./chunk-CQIXZf41.js";import"./chunk-ChbnoZwy.js";import{r as Q$1,s as fe$1,u as ra}from"./chunk-CRVM0rcA.js";import"./chunk-BsvB6MmB.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-CFXWwPKo.js";import{n as V,t as G$1}from"./chunk-CBFZokW4.js";import{n as W,t as J}from"./chunk-MG8VVeEh.js";import{i as z,n as oe,r as x$1}from"./chunk-aZl-0gS4.js";import{n as P,t as K}from"./chunk-NszG4cuZ.js";function Be(i,t){if(i&1){let e=RC();Li(0,`label`,12)(1,`input`,20),Jm(`change`,function(){let l=Od(e).$implicit;return Ld(HC(2).kind.set(l.kind))}),Nc(),Li(2,`span`)(3,`span`,21),fS(4),Nc(),Li(5,`span`,22),fS(6),Nc()()()}if(i&2){let e=t.$implicit,n=HC(2);ec(),Wm(`value`,e.kind)(`checked`,n.kind()===e.kind)(`disabled`,n.busy()),ec(3),pg(e.label),ec(2),pg(e.hint)}}function Ne(i,t){if(i&1){let e=RC();Li(0,`label`,8)(1,`span`,9),fS(2),Nc(),Li(3,`input`,23),Jm(`input`,function(l){Od(e);return Ld(HC(2).path.set(l.target.value))}),Nc(),Li(4,`span`,24),fS(5),Nc()()}if(i&2){let e=HC(2);ec(2),pg(e.t().folderLabel),ec(),nS(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().folderHint)}}function ze(i,t){if(i&1){let e=RC();Li(0,`label`,8)(1,`span`,9),fS(2),Nc(),Li(3,`input`,25),Jm(`input`,function(l){Od(e);return Ld(HC(2).server.set(l.target.value))}),Nc()(),Li(4,`label`,8)(5,`span`,9),fS(6),Nc(),Li(7,`input`,26),Jm(`input`,function(l){Od(e);return Ld(HC(2).path.set(l.target.value))}),Nc(),Li(8,`span`,24),fS(9),Nc()()}if(i&2){let e=HC(2);ec(2),pg(e.t().nfsServerLabel),ec(),nS(e.field),Wm(`value`,e.server())(`disabled`,e.busy()),ec(3),pg(e.t().nfsPathLabel),ec(),nS(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().nfsHint)}}function Re(i,t){if(i&1){let e=RC();Li(0,`details`,13)(1,`summary`,27),fS(2),Nc(),Li(3,`label`,28)(4,`span`,9),fS(5),Nc(),Li(6,`input`,29),Jm(`input`,function(l){Od(e);return Ld(HC(2).driver.set(l.target.value))}),Nc(),Li(7,`span`,24),fS(8),Nc()()()}if(i&2){let e=HC(2);Wm(`open`,e.driver()!==`local`),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nS(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint)}}function Oe(i,t){i&1&&(Li(0,`p`,14),fS(1),Nc()),i&2&&(ec(),pg(t))}function Le(i,t){if(i&1){let e=RC();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),Li(7,`form`,7),Jm(`submit`,function(l){Od(e);return Ld(HC().submit(l))}),Li(8,`label`,8)(9,`span`,9),fS(10),Nc(),Li(11,`input`,10),Jm(`input`,function(l){Od(e);return Ld(HC().name.set(l.target.value))}),Nc()(),Li(12,`fieldset`)(13,`legend`,9),fS(14),Nc(),Li(15,`div`,11),kc(16,Be,7,5,`label`,12,Pe),Nc()(),SC(18,Ne,6,6,`label`,8)(19,ze,10,11)(20,Re,9,8,`details`,13),SC(21,Oe,2,1,`p`,14),Li(22,`div`,15)(23,`button`,16),Gm(24,`app-icon`,17),fS(25),Nc(),Li(26,`button`,18),Gm(27,`app-icon`,19),fS(28),Nc()()()()()}if(i&2){let e,n,l=HC();ec(4),pg(l.t().title),ec(2),pg(l.t().description),ec(4),pg(l.t().nameLabel),ec(),nS(l.field),Wm(`placeholder`,l.t().namePlaceholder)(`value`,l.name())(`disabled`,l.busy()),ec(3),pg(l.t().storageLabel),ec(2),Tc(l.kinds()),ec(2),kC((e=l.kind())===`folder`?18:e===`nfs`?19:20),ec(3),kC((n=l.problem())?21:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,l.common().cancel,` `),ec(),Wm(`disabled`,!l.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,l.busy()?l.t().creating:l.t().submit,` `)}}var Pe;var We;var Q;var fe=f(()=>{Kr();Je$1();B();dk();sk();Kr();Pe=(i,t)=>t.kind;We=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=I(w);open=mj(!1);t=Lt(()=>ok().volumes.createDialog);common=Lt(()=>ok().common);field=We;kinds=Lt(()=>{let t=this.t();return[{kind:`docker`,label:t.storage.docker,hint:t.storage.dockerHint},{kind:`folder`,label:t.storage.folder,hint:t.storage.folderHint},{kind:`nfs`,label:t.storage.nfs,hint:t.storage.nfsHint}]});name=wt(``);kind=wt(`docker`);driver=wt(`local`);path=wt(``);server=wt(``);busy=wt(!1);problem=wt(null);storage=Lt(()=>{let t=this.path().trim();switch(this.kind()){case`docker`:return this.driver().trim()===``?null:{kind:`docker`,driver:this.driver().trim()};case`folder`:return t===``?null:{kind:`folder`,path:t};case`nfs`:return t===``||this.server().trim()===``?null:{kind:`nfs`,server:this.server().trim(),path:t}}});canSubmit=Lt(()=>!this.busy()&&this.name().trim()!==``&&this.storage()!==null);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.kind.set(`docker`),this.driver.set(`local`),this.path.set(``),this.server.set(``),this.problem.set(null)})})}submit(t){t.preventDefault();let e=this.storage();!this.canSubmit()||e===null||(this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),storage:e}).then(n=>{this.problem.set(n),n===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1)))}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-volume-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`mt-1`,`space-y-1`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2`,`rounded-md`,`px-2`,`py-1.5`,`hover:bg-ink-800`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`],[`type`,`radio`,`name`,`volume-storage`,1,`mt-0.5`,`accent-accent`,3,`change`,`value`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`/srv/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`nas.local`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`/volume1/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`]],template:function(e,n){e&1&&(Li(0,`div`,0),vg(`openChange`,function(s){return vS(n.open,s)||(n.open=s),s}),_m(1,Le,29,16,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function $e(i,t){if(i&1&&(Li(0,`span`,17),fS(1),Nc()),i&2){let e=HC().$implicit;ec(),pg(e.label)}}function je(i,t){i&1&&(Li(0,`span`,19),fS(1,`/`),Nc())}function Ae(i,t){if(i&1){let e=RC();Li(0,`button`,18),Jm(`click`,function(){Od(e);let l=HC().$implicit;return Ld(HC(2).go(l.path))}),fS(1),Nc(),SC(2,je,2,0,`span`,19)}if(i&2){let e=HC().$implicit;ec(),Ac(` `,e.label,` `),ec(),kC(e.path!==`/`?2:-1)}}function He(i,t){if(i&1&&SC(0,$e,2,1,`span`,17)(1,Ae,3,2),i&2){let e=t.$index,n=t.$count;kC(e===n-1?0:1)}}function Ke(i,t){i&1&&(Li(0,`p`,11),fS(1),Nc()),i&2&&(ec(),pg(t))}function qe(i,t){if(i&1&&(Li(0,`p`,12),fS(1),Nc()),i&2){let e=HC(2);ec(),pg(e.t().loading)}}function Qe(i,t){if(i&1&&(Li(0,`p`,12),fS(1),Nc()),i&2){let e=HC(2);ec(),pg(e.t().empty)}}function Ge(i,t){if(i&1){let e=RC();Li(0,`button`,24),Jm(`click`,function(){Od(e);let l=HC().$implicit,s=HC(3);return Ld(s.go(s.childOf(l)))}),fS(1),Nc()}if(i&2){let e=HC().$implicit;ec(),Ac(` `,e.name,` `)}}function Je(i,t){if(i&1&&(Li(0,`span`,23),fS(1),Nc()),i&2){let e=HC().$implicit;ec(),pg(e.name)}}function Xe(i,t){if(i&1&&(Li(0,`li`,20),Gm(1,`app-icon`,21),SC(2,Ge,2,1,`button`,22)(3,Je,2,1,`span`,23),Nc()),i&2){let e=t.$implicit;ec(),ag(`text-accent`,e.kind===`dir`)(`text-ink-500`,e.kind===`file`),Wm(`name`,e.kind===`dir`?`folder`:`file`)(`size`,15),ec(),kC(e.kind===`dir`?2:3)}}function Ye(i,t){if(i&1&&(Li(0,`ul`,13),kc(1,Xe,4,7,`li`,20,Fe),Nc()),i&2){let e=HC(2);ec(),Tc(e.entries())}}function Ze(i,t){if(i&1){let e=RC();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),Li(7,`div`,7)(8,`button`,8),Jm(`click`,function(){Od(e);let l=HC();return Ld(l.go(l.parentOf(l.path())))}),Gm(9,`app-icon`,9),Nc(),Li(10,`nav`,10),kc(11,He,2,1,null,null,Ue),Nc()(),SC(13,Ke,2,1,`p`,11)(14,qe,2,1,`p`,12)(15,Qe,2,1,`p`,12)(16,Ye,3,0,`ul`,13),Li(17,`div`,14)(18,`button`,15),Gm(19,`app-icon`,16),fS(20),Nc()()()()}if(i&2){let e,n=HC();ec(4),pg(n.t().title(n.volume())),ec(2),pg(n.t().description),ec(2),Wm(`disabled`,n.path()===`/`||n.busy()),zr(`aria-label`,n.t().up),ec(),Wm(`size`,14),ec(),zr(`aria-label`,n.t().path),ec(),Tc(n.crumbs()),ec(2),kC((e=n.problem())?13:n.busy()?14:n.entries().length===0?15:16,e),ec(6),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var Ue;var Fe;var G;var be=f(()=>{Kr();Je$1();lk();dk();sk();Kr();Ue=(i,t)=>t.path,Fe=(i,t)=>t.name;G=class i{open=mj(!1);volume=jc.required();t=Lt(()=>ok().volumes.browse);common=Lt(()=>ok().common);path=wt(`/`);entries=wt([]);busy=wt(!1);problem=wt(null);crumbs=Lt(()=>{let t=this.path().split(`/`).filter(e=>e!==``);return[{label:`/`,path:`/`},...t.map((e,n)=>({label:e,path:`/${t.slice(0,n+1).join(`/`)}`}))]});constructor(){rf(()=>{let t=this.open(),e=this.volume();Tg(()=>{t?(this.path.set(`/`),this.load(e)):window.electron.volumes.closeBrowser().catch(()=>{})})})}go(t){this.path.set(t),this.load(this.volume())}parentOf(t){return`/${t.split(`/`).filter(n=>n!==``).slice(0,-1).join(`/`)}`}childOf(t){let e=this.path();return e.endsWith(`/`)?`${e}${t.name}`:`${e}/${t.name}`}async load(t){this.busy.set(!0);try{let e=await window.electron.volumes.browse(t,this.path());this.path.set(e.path),e.ok?(this.entries.set(e.entries),this.problem.set(null)):(this.entries.set([]),this.problem.set(e.problem))}catch(e){this.entries.set([]),this.problem.set(eH(e))}finally{this.busy.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-volume-browser-dialog`]],inputs:{open:[1,`open`],volume:[1,`volume`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`volume-browser-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`flex`,`shrink-0`,`items-center`,`gap-2`],[`type`,`button`,`data-testid`,`volume-up`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`arrow-up`,3,`size`],[1,`flex`,`min-w-0`,`flex-1`,`flex-wrap`,`items-center`,`font-mono`,`text-[12px]`],[1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`volume-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`,`text-[13px]`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`aria-current`,`location`,1,`text-ink-100`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`text-ink-400`,`hover:text-ink-100`,3,`click`],[1,`px-1`,`text-ink-600`],[1,`flex`,`items-center`,`gap-2`,`py-1.5`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`],[1,`min-w-0`,`flex-1`,`truncate`,`text-ink-200`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`,3,`click`]],template:function(e,n){e&1&&(Li(0,`div`,0),vg(`openChange`,function(s){return vS(n.open,s)||(n.open=s),s}),_m(1,Ze,21,9,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function et(i,t){if(i&1&&(Li(0,`span`,7),fS(1),Nc()),i&2){let e=HC();ec(),Ac(`· `,e.t().calculating)}}function tt(i,t){if(i&1&&(Li(0,`span`,17),fS(1),Nc()),i&2){let e=HC();ec(),pg(e.t().refreshing)}}function nt(i,t){if(i&1){let e=RC();Li(0,`div`,19)(1,`span`,31),fS(2),Nc(),Li(3,`button`,32),Jm(`click`,function(){Od(e);return Ld(HC().askRemoveSelected())}),Gm(4,`app-icon`,33),fS(5),Nc()()}if(i&2){let e=HC();ec(2),pg(e.t().selected(e.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,e.common().remove,` `)}}function it(i,t){if(i&1&&(Li(0,`div`,35),fS(1),Nc()),i&2){let e=HC().$implicit;ec(),pg(e.composeProject)}}function ot(i,t){if(i&1&&(Li(0,`div`,34),fS(1),Nc(),SC(2,it,2,1,`div`,35)),i&2){let e=t.$implicit;Wm(`title`,e.mountpoint),ec(),pg(e.name),ec(),kC(e.composeProject?2:-1)}}function at(i,t){if(i&1&&(Li(0,`span`,36),fS(1),Nc()),i&2){let e=t.$implicit;ec(),pg(e.driver)}}function rt(i,t){if(i&1&&(Li(0,`span`,37),fS(1),Nc()),i&2){let e=HC().$implicit,n=HC();ec(),pg(n.t().containerCount(e.inUseBy))}}function lt(i,t){i&1&&(Li(0,`span`,38),fS(1,`—`),Nc())}function st(i,t){if(i&1&&SC(0,rt,2,1,`span`,37)(1,lt,2,0,`span`,38),i&2){let e=t.$implicit;kC(e.inUseBy>0?0:1)}}function mt(i,t){if(i&1&&(Li(0,`span`,39),fS(1),Nc()),i&2){let e=t.$implicit,n=HC();ec(),pg(n.ageOf(e.createdAt))}}function dt(i,t){if(i&1&&(Li(0,`span`,40),fS(1),Nc()),i&2){let e=t.$implicit,n=HC();ec(),pg(n.sizeOf(e.sizeBytes))}}function pt(i,t){if(i&1){let e=RC();Li(0,`div`,41)(1,`app-action-menu`,42),Jm(`picked`,function(l){let s=Od(e).$implicit;return Ld(HC().onRowMenu(l,s))}),Nc()()}if(i&2){let e=t.$implicit,n=HC();ec(),Wm(`label`,n.t().rowMenu(e.name))(`items`,n.rowMenu(e))}}var ve;f(()=>{Kr();h();M();B();G$1();J();oe();K();dk();x();fe();sk();be();ra();o();Kr();ve=class i$1{store=I(w);preferences=I(p);t=Lt(()=>ok().volumes);common=Lt(()=>ok().common);columns=Lt(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`inUse`,label:t.inUse,width:`110px`},{key:`created`,label:t.created,width:`150px`},{key:`size`,label:t.size,width:`100px`,align:`right`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;loadingSizes=this.store.loadingSizes;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);onlyUnused=this.preferences.flag(`volumes.onlyUnused`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);browseOpen=wt(!1);browseVolume=wt(``);rows=Lt(()=>{let t=this.search().trim().toLowerCase(),e=this.onlyUnused();return this.store.volumes().filter(n=>e&&n.inUseBy>0?!1:t===``||n.name.toLowerCase().includes(t))});totalSize=Lt(()=>d(this.store.totalBytes()));trackKey=t=>t.name;inkijk=jc(void 0);bewaar=jc(void 0);router=I(fe$1);route=I(Q$1);constructor(){rf(()=>{let t=this.inkijk();t!==void 0&&Tg(()=>{this.browseVolume.set(t),this.browseOpen.set(!0),i(this.router,this.route,`inkijk`)})}),rf(()=>{let t=this.bewaar(),e=this.store.volumes().find(n=>n.name===t);t!==void 0&&e!==void 0&&Tg(()=>{this.backup(e),i(this.router,this.route,`bewaar`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}sizeOf(t){return t===null?`—`:d(t)}ageOf(t){return t===0?`—`:N(t)}removalReason(t){return t.inUseBy>0?this.t().inUseReason(t.inUseBy):this.common().remove}backup(t){this.store.backup(t.name)}backupTitle(t){return t.inUseBy>0?this.t().backupTitleInUse(t.name):this.t().backupTitle(t.name)}rowMenu(t){let e=this.pending().has(t.name),n=this.t();return[{id:`browse`,label:n.rowBrowse,icon:`folder`,disabled:e},{id:`backup`,label:n.rowBackup,icon:`download`,disabled:e,hint:this.backupTitle(t)},{id:`restore`,label:n.rowRestore,icon:`upload`,disabled:e,hint:n.restoreTitle(t.name)},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:e||t.inUseBy>0,danger:!0,separated:!0,hint:this.removalReason(t)}]}onRowMenu(t,e){t===`browse`?(this.browseVolume.set(e.name),this.browseOpen.set(!0)):t===`backup`?this.backup(e):t===`restore`?this.askRestore(e):this.askRemove(e)}askRestore(t){let e=this.t().restore;this.action.set({names:[t.name],title:e.title(t.name),description:e.description(t.inUseBy),confirmLabel:e.confirm,all:!1,restore:!0}),this.confirmOpen.set(!0)}askRemove(t){let e=this.t().remove;this.action.set({names:[t.name],title:e.title,description:e.description(t.name),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],e=this.t().remove;this.action.set({names:t,title:e.manyTitle,description:e.manyDescription(t.length),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}menuItems=Lt(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-anonymous`,label:this.t().menu.pruneAnonymous,icon:`broom`,separated:!0},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune(t===`prune-unused`)}askPrune(t){let e=this.t().prune;this.action.set({names:[],title:t?e.allTitle:e.anonymousTitle,description:t?e.allDescription:e.anonymousDescription,confirmLabel:e.confirm,all:t}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.restore===!0?this.store.restore(t.names[0]):t.names.length===0?this.store.prune(t.all):(this.store.removeMany(t.names,!1),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){let t=this.action();return t?.restore===!0?`upload`:t?.names.length===0?`broom`:`trash`}static ɵfac=function(e){return new(e||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-volumes-page`]],inputs:{zoek:[1,`zoek`],inkijk:[1,`inkijk`],bewaar:[1,`bewaar`]},decls:42,vars:30,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`text-[12px]`,`font-normal`,`text-ink-500`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`volume`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(e,n){e&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Li(6,`div`,4)(7,`div`)(8,`div`,5),fS(9),Nc(),Li(10,`div`,6),fS(11),SC(12,et,2,1,`span`,7),Nc()(),Li(13,`div`)(14,`div`,5),fS(15),Nc(),Li(16,`div`,6),fS(17),Nc()()()(),Li(18,`div`,8)(19,`app-action-menu`,9),Jm(`picked`,function(s){return n.onMenu(s)}),Nc()()(),Li(20,`div`,10)(21,`label`,11)(22,`span`,12),Gm(23,`app-icon`,13),Nc(),Li(24,`span`,14),fS(25),Nc(),Li(26,`input`,15),Jm(`input`,function(s){return n.search.set(s.target.value)}),Nc()(),Li(27,`app-filter-switch`,16),vg(`onChange`,function(s){return vS(n.onlyUnused,s)||(n.onlyUnused=s),s}),Nc(),SC(28,tt,2,1,`span`,17),Nc(),Gm(29,`app-page-messages`,18),SC(30,nt,6,3,`div`,19),Nc(),Li(31,`div`,20)(32,`app-data-table`,21),vg(`selectedChange`,function(s){return vS(n.selected,s)||(n.selected=s),s}),_m(33,ot,3,3,`ng-template`,22)(34,at,2,1,`ng-template`,23)(35,st,2,1,`ng-template`,24)(36,mt,2,1,`ng-template`,25)(37,dt,2,1,`ng-template`,26)(38,pt,2,2,`ng-template`,27),Nc()()(),Li(39,`app-create-volume-dialog`,28),vg(`openChange`,function(s){return vS(n.createOpen,s)||(n.createOpen=s),s}),Nc(),Li(40,`app-volume-browser-dialog`,29),vg(`openChange`,function(s){return vS(n.browseOpen,s)||(n.browseOpen=s),s}),Nc(),Li(41,`app-confirm-dialog`,30),vg(`openChange`,function(s){return vS(n.confirmOpen,s)||(n.confirmOpen=s),s}),Jm(`confirmed`,function(){return n.confirm()}),Nc()),e&2&&(ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),Ac(` `,n.totalSize(),` `),ec(),kC(n.loadingSizes()?12:-1),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),kC(n.loading()?28:-1),ec(),Wm(`problem`,n.problem()),ec(),kC(n.selected().size>0?30:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(7),hg(`open`,n.createOpen),ec(),hg(`open`,n.browseOpen),Wm(`volume`,n.browseVolume()),ec(),hg(`open`,n.confirmOpen),Wm(`title`,n.actionTitle())(`description`,n.actionDescription())(`confirmLabel`,n.actionConfirmLabel())(`confirmIcon`,n.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,G],encapsulation:2})}})();export{ve as VolumesPage};
1
+ import{A as I,Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Jt as ag,Kt as _m,Mn as lk,O as HE,On as kc,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,_r as wt,cn as ec,er as sk,gt as SE,hr as wc,in as dk,ln as f,r as Ac,sn as eH,sr as vS,tt as Od,un as fS,ur as vg,ut as RE,wt as Tg}from"./chunk-CQJfJJJO.js";import"./chunk-B417lX5i.js";import"./chunk-DNfHCIbw.js";import{i as h,n as N,r as d}from"./chunk-CJj93ZID.js";import{n as w,t as B}from"./chunk-Cxf0K3gA.js";import{n as p,t as M}from"./chunk-_hzP4C8y.js";import{n as o,t as i}from"./chunk-JJCcZGeB.js";import{n as x,t as u}from"./chunk-Dw7M06TM.js";import{r as Q$1,s as fe$1,u as ra}from"./chunk-B10he8vC.js";import"./chunk-Ou7gEgt7.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-ChkLvkqV.js";import{n as V,t as G$1}from"./chunk-CRU66E5W.js";import{n as W,t as J}from"./chunk-CsmSLtiO.js";import{i as z,n as oe,r as x$1}from"./chunk-D2ip_9iB.js";import{n as P,t as K}from"./chunk-CcSH3zkW.js";function Be(i,t){if(i&1){let e=RE();Li(0,`label`,12)(1,`input`,20),Jm(`change`,function(){let l=Od(e).$implicit;return Ld(HE(2).kind.set(l.kind))}),Nc(),Li(2,`span`)(3,`span`,21),fS(4),Nc(),Li(5,`span`,22),fS(6),Nc()()()}if(i&2){let e=t.$implicit,n=HE(2);ec(),Wm(`value`,e.kind)(`checked`,n.kind()===e.kind)(`disabled`,n.busy()),ec(3),pg(e.label),ec(2),pg(e.hint)}}function Ne(i,t){if(i&1){let e=RE();Li(0,`label`,8)(1,`span`,9),fS(2),Nc(),Li(3,`input`,23),Jm(`input`,function(l){Od(e);return Ld(HE(2).path.set(l.target.value))}),Nc(),Li(4,`span`,24),fS(5),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().folderLabel),ec(),nS(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().folderHint)}}function ze(i,t){if(i&1){let e=RE();Li(0,`label`,8)(1,`span`,9),fS(2),Nc(),Li(3,`input`,25),Jm(`input`,function(l){Od(e);return Ld(HE(2).server.set(l.target.value))}),Nc()(),Li(4,`label`,8)(5,`span`,9),fS(6),Nc(),Li(7,`input`,26),Jm(`input`,function(l){Od(e);return Ld(HE(2).path.set(l.target.value))}),Nc(),Li(8,`span`,24),fS(9),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().nfsServerLabel),ec(),nS(e.field),Wm(`value`,e.server())(`disabled`,e.busy()),ec(3),pg(e.t().nfsPathLabel),ec(),nS(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().nfsHint)}}function Re(i,t){if(i&1){let e=RE();Li(0,`details`,13)(1,`summary`,27),fS(2),Nc(),Li(3,`label`,28)(4,`span`,9),fS(5),Nc(),Li(6,`input`,29),Jm(`input`,function(l){Od(e);return Ld(HE(2).driver.set(l.target.value))}),Nc(),Li(7,`span`,24),fS(8),Nc()()()}if(i&2){let e=HE(2);Wm(`open`,e.driver()!==`local`),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nS(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint)}}function Oe(i,t){i&1&&(Li(0,`p`,14),fS(1),Nc()),i&2&&(ec(),pg(t))}function Le(i,t){if(i&1){let e=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),Li(7,`form`,7),Jm(`submit`,function(l){Od(e);return Ld(HE().submit(l))}),Li(8,`label`,8)(9,`span`,9),fS(10),Nc(),Li(11,`input`,10),Jm(`input`,function(l){Od(e);return Ld(HE().name.set(l.target.value))}),Nc()(),Li(12,`fieldset`)(13,`legend`,9),fS(14),Nc(),Li(15,`div`,11),kc(16,Be,7,5,`label`,12,Pe),Nc()(),SE(18,Ne,6,6,`label`,8)(19,ze,10,11)(20,Re,9,8,`details`,13),SE(21,Oe,2,1,`p`,14),Li(22,`div`,15)(23,`button`,16),Gm(24,`app-icon`,17),fS(25),Nc(),Li(26,`button`,18),Gm(27,`app-icon`,19),fS(28),Nc()()()()()}if(i&2){let e,n,l=HE();ec(4),pg(l.t().title),ec(2),pg(l.t().description),ec(4),pg(l.t().nameLabel),ec(),nS(l.field),Wm(`placeholder`,l.t().namePlaceholder)(`value`,l.name())(`disabled`,l.busy()),ec(3),pg(l.t().storageLabel),ec(2),Tc(l.kinds()),ec(2),kE((e=l.kind())===`folder`?18:e===`nfs`?19:20),ec(3),kE((n=l.problem())?21:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,l.common().cancel,` `),ec(),Wm(`disabled`,!l.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,l.busy()?l.t().creating:l.t().submit,` `)}}var Pe;var We;var Q;var fe=f(()=>{Kr();Je$1();B();dk();sk();Kr();Pe=(i,t)=>t.kind;We=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=I(w);open=mj(!1);t=Lt(()=>ok().volumes.createDialog);common=Lt(()=>ok().common);field=We;kinds=Lt(()=>{let t=this.t();return[{kind:`docker`,label:t.storage.docker,hint:t.storage.dockerHint},{kind:`folder`,label:t.storage.folder,hint:t.storage.folderHint},{kind:`nfs`,label:t.storage.nfs,hint:t.storage.nfsHint}]});name=wt(``);kind=wt(`docker`);driver=wt(`local`);path=wt(``);server=wt(``);busy=wt(!1);problem=wt(null);storage=Lt(()=>{let t=this.path().trim();switch(this.kind()){case`docker`:return this.driver().trim()===``?null:{kind:`docker`,driver:this.driver().trim()};case`folder`:return t===``?null:{kind:`folder`,path:t};case`nfs`:return t===``||this.server().trim()===``?null:{kind:`nfs`,server:this.server().trim(),path:t}}});canSubmit=Lt(()=>!this.busy()&&this.name().trim()!==``&&this.storage()!==null);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.kind.set(`docker`),this.driver.set(`local`),this.path.set(``),this.server.set(``),this.problem.set(null)})})}submit(t){t.preventDefault();let e=this.storage();!this.canSubmit()||e===null||(this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),storage:e}).then(n=>{this.problem.set(n),n===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1)))}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-volume-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`mt-1`,`space-y-1`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2`,`rounded-md`,`px-2`,`py-1.5`,`hover:bg-ink-800`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`],[`type`,`radio`,`name`,`volume-storage`,1,`mt-0.5`,`accent-accent`,3,`change`,`value`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`/srv/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`nas.local`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`/volume1/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`]],template:function(e,n){e&1&&(Li(0,`div`,0),vg(`openChange`,function(s){return vS(n.open,s)||(n.open=s),s}),_m(1,Le,29,16,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function $e(i,t){if(i&1&&(Li(0,`span`,17),fS(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.label)}}function je(i,t){i&1&&(Li(0,`span`,19),fS(1,`/`),Nc())}function Ae(i,t){if(i&1){let e=RE();Li(0,`button`,18),Jm(`click`,function(){Od(e);let l=HE().$implicit;return Ld(HE(2).go(l.path))}),fS(1),Nc(),SE(2,je,2,0,`span`,19)}if(i&2){let e=HE().$implicit;ec(),Ac(` `,e.label,` `),ec(),kE(e.path!==`/`?2:-1)}}function He(i,t){if(i&1&&SE(0,$e,2,1,`span`,17)(1,Ae,3,2),i&2){let e=t.$index,n=t.$count;kE(e===n-1?0:1)}}function Ke(i,t){i&1&&(Li(0,`p`,11),fS(1),Nc()),i&2&&(ec(),pg(t))}function qe(i,t){if(i&1&&(Li(0,`p`,12),fS(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().loading)}}function Qe(i,t){if(i&1&&(Li(0,`p`,12),fS(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().empty)}}function Ge(i,t){if(i&1){let e=RE();Li(0,`button`,24),Jm(`click`,function(){Od(e);let l=HE().$implicit,s=HE(3);return Ld(s.go(s.childOf(l)))}),fS(1),Nc()}if(i&2){let e=HE().$implicit;ec(),Ac(` `,e.name,` `)}}function Je(i,t){if(i&1&&(Li(0,`span`,23),fS(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.name)}}function Xe(i,t){if(i&1&&(Li(0,`li`,20),Gm(1,`app-icon`,21),SE(2,Ge,2,1,`button`,22)(3,Je,2,1,`span`,23),Nc()),i&2){let e=t.$implicit;ec(),ag(`text-accent`,e.kind===`dir`)(`text-ink-500`,e.kind===`file`),Wm(`name`,e.kind===`dir`?`folder`:`file`)(`size`,15),ec(),kE(e.kind===`dir`?2:3)}}function Ye(i,t){if(i&1&&(Li(0,`ul`,13),kc(1,Xe,4,7,`li`,20,Fe),Nc()),i&2){let e=HE(2);ec(),Tc(e.entries())}}function Ze(i,t){if(i&1){let e=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),Li(7,`div`,7)(8,`button`,8),Jm(`click`,function(){Od(e);let l=HE();return Ld(l.go(l.parentOf(l.path())))}),Gm(9,`app-icon`,9),Nc(),Li(10,`nav`,10),kc(11,He,2,1,null,null,Ue),Nc()(),SE(13,Ke,2,1,`p`,11)(14,qe,2,1,`p`,12)(15,Qe,2,1,`p`,12)(16,Ye,3,0,`ul`,13),Li(17,`div`,14)(18,`button`,15),Gm(19,`app-icon`,16),fS(20),Nc()()()()}if(i&2){let e,n=HE();ec(4),pg(n.t().title(n.volume())),ec(2),pg(n.t().description),ec(2),Wm(`disabled`,n.path()===`/`||n.busy()),zr(`aria-label`,n.t().up),ec(),Wm(`size`,14),ec(),zr(`aria-label`,n.t().path),ec(),Tc(n.crumbs()),ec(2),kE((e=n.problem())?13:n.busy()?14:n.entries().length===0?15:16,e),ec(6),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var Ue;var Fe;var G;var be=f(()=>{Kr();Je$1();lk();dk();sk();Kr();Ue=(i,t)=>t.path,Fe=(i,t)=>t.name;G=class i{open=mj(!1);volume=jc.required();t=Lt(()=>ok().volumes.browse);common=Lt(()=>ok().common);path=wt(`/`);entries=wt([]);busy=wt(!1);problem=wt(null);crumbs=Lt(()=>{let t=this.path().split(`/`).filter(e=>e!==``);return[{label:`/`,path:`/`},...t.map((e,n)=>({label:e,path:`/${t.slice(0,n+1).join(`/`)}`}))]});constructor(){rf(()=>{let t=this.open(),e=this.volume();Tg(()=>{t?(this.path.set(`/`),this.load(e)):window.electron.volumes.closeBrowser().catch(()=>{})})})}go(t){this.path.set(t),this.load(this.volume())}parentOf(t){return`/${t.split(`/`).filter(n=>n!==``).slice(0,-1).join(`/`)}`}childOf(t){let e=this.path();return e.endsWith(`/`)?`${e}${t.name}`:`${e}/${t.name}`}async load(t){this.busy.set(!0);try{let e=await window.electron.volumes.browse(t,this.path());this.path.set(e.path),e.ok?(this.entries.set(e.entries),this.problem.set(null)):(this.entries.set([]),this.problem.set(e.problem))}catch(e){this.entries.set([]),this.problem.set(eH(e))}finally{this.busy.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-volume-browser-dialog`]],inputs:{open:[1,`open`],volume:[1,`volume`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`volume-browser-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`flex`,`shrink-0`,`items-center`,`gap-2`],[`type`,`button`,`data-testid`,`volume-up`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`arrow-up`,3,`size`],[1,`flex`,`min-w-0`,`flex-1`,`flex-wrap`,`items-center`,`font-mono`,`text-[12px]`],[1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`volume-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`,`text-[13px]`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`aria-current`,`location`,1,`text-ink-100`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`text-ink-400`,`hover:text-ink-100`,3,`click`],[1,`px-1`,`text-ink-600`],[1,`flex`,`items-center`,`gap-2`,`py-1.5`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`],[1,`min-w-0`,`flex-1`,`truncate`,`text-ink-200`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`,3,`click`]],template:function(e,n){e&1&&(Li(0,`div`,0),vg(`openChange`,function(s){return vS(n.open,s)||(n.open=s),s}),_m(1,Ze,21,9,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function et(i,t){if(i&1&&(Li(0,`span`,7),fS(1),Nc()),i&2){let e=HE();ec(),Ac(`· `,e.t().calculating)}}function tt(i,t){if(i&1&&(Li(0,`span`,17),fS(1),Nc()),i&2){let e=HE();ec(),pg(e.t().refreshing)}}function nt(i,t){if(i&1){let e=RE();Li(0,`div`,19)(1,`span`,31),fS(2),Nc(),Li(3,`button`,32),Jm(`click`,function(){Od(e);return Ld(HE().askRemoveSelected())}),Gm(4,`app-icon`,33),fS(5),Nc()()}if(i&2){let e=HE();ec(2),pg(e.t().selected(e.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,e.common().remove,` `)}}function it(i,t){if(i&1&&(Li(0,`div`,35),fS(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.composeProject)}}function ot(i,t){if(i&1&&(Li(0,`div`,34),fS(1),Nc(),SE(2,it,2,1,`div`,35)),i&2){let e=t.$implicit;Wm(`title`,e.mountpoint),ec(),pg(e.name),ec(),kE(e.composeProject?2:-1)}}function at(i,t){if(i&1&&(Li(0,`span`,36),fS(1),Nc()),i&2){let e=t.$implicit;ec(),pg(e.driver)}}function rt(i,t){if(i&1&&(Li(0,`span`,37),fS(1),Nc()),i&2){let e=HE().$implicit,n=HE();ec(),pg(n.t().containerCount(e.inUseBy))}}function lt(i,t){i&1&&(Li(0,`span`,38),fS(1,`—`),Nc())}function st(i,t){if(i&1&&SE(0,rt,2,1,`span`,37)(1,lt,2,0,`span`,38),i&2){let e=t.$implicit;kE(e.inUseBy>0?0:1)}}function mt(i,t){if(i&1&&(Li(0,`span`,39),fS(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.ageOf(e.createdAt))}}function dt(i,t){if(i&1&&(Li(0,`span`,40),fS(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.sizeOf(e.sizeBytes))}}function pt(i,t){if(i&1){let e=RE();Li(0,`div`,41)(1,`app-action-menu`,42),Jm(`picked`,function(l){let s=Od(e).$implicit;return Ld(HE().onRowMenu(l,s))}),Nc()()}if(i&2){let e=t.$implicit,n=HE();ec(),Wm(`label`,n.t().rowMenu(e.name))(`items`,n.rowMenu(e))}}var ve;f(()=>{Kr();h();M();B();G$1();J();oe();K();dk();x();fe();sk();be();ra();o();Kr();ve=class i$1{store=I(w);preferences=I(p);t=Lt(()=>ok().volumes);common=Lt(()=>ok().common);columns=Lt(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`inUse`,label:t.inUse,width:`110px`},{key:`created`,label:t.created,width:`150px`},{key:`size`,label:t.size,width:`100px`,align:`right`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;loadingSizes=this.store.loadingSizes;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);onlyUnused=this.preferences.flag(`volumes.onlyUnused`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);browseOpen=wt(!1);browseVolume=wt(``);rows=Lt(()=>{let t=this.search().trim().toLowerCase(),e=this.onlyUnused();return this.store.volumes().filter(n=>e&&n.inUseBy>0?!1:t===``||n.name.toLowerCase().includes(t))});totalSize=Lt(()=>d(this.store.totalBytes()));trackKey=t=>t.name;inkijk=jc(void 0);bewaar=jc(void 0);router=I(fe$1);route=I(Q$1);constructor(){rf(()=>{let t=this.inkijk();t!==void 0&&Tg(()=>{this.browseVolume.set(t),this.browseOpen.set(!0),i(this.router,this.route,`inkijk`)})}),rf(()=>{let t=this.bewaar(),e=this.store.volumes().find(n=>n.name===t);t!==void 0&&e!==void 0&&Tg(()=>{this.backup(e),i(this.router,this.route,`bewaar`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}sizeOf(t){return t===null?`—`:d(t)}ageOf(t){return t===0?`—`:N(t)}removalReason(t){return t.inUseBy>0?this.t().inUseReason(t.inUseBy):this.common().remove}backup(t){this.store.backup(t.name)}backupTitle(t){return t.inUseBy>0?this.t().backupTitleInUse(t.name):this.t().backupTitle(t.name)}rowMenu(t){let e=this.pending().has(t.name),n=this.t();return[{id:`browse`,label:n.rowBrowse,icon:`folder`,disabled:e},{id:`backup`,label:n.rowBackup,icon:`download`,disabled:e,hint:this.backupTitle(t)},{id:`restore`,label:n.rowRestore,icon:`upload`,disabled:e,hint:n.restoreTitle(t.name)},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:e||t.inUseBy>0,danger:!0,separated:!0,hint:this.removalReason(t)}]}onRowMenu(t,e){t===`browse`?(this.browseVolume.set(e.name),this.browseOpen.set(!0)):t===`backup`?this.backup(e):t===`restore`?this.askRestore(e):this.askRemove(e)}askRestore(t){let e=this.t().restore;this.action.set({names:[t.name],title:e.title(t.name),description:e.description(t.inUseBy),confirmLabel:e.confirm,all:!1,restore:!0}),this.confirmOpen.set(!0)}askRemove(t){let e=this.t().remove;this.action.set({names:[t.name],title:e.title,description:e.description(t.name),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],e=this.t().remove;this.action.set({names:t,title:e.manyTitle,description:e.manyDescription(t.length),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}menuItems=Lt(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-anonymous`,label:this.t().menu.pruneAnonymous,icon:`broom`,separated:!0},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune(t===`prune-unused`)}askPrune(t){let e=this.t().prune;this.action.set({names:[],title:t?e.allTitle:e.anonymousTitle,description:t?e.allDescription:e.anonymousDescription,confirmLabel:e.confirm,all:t}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.restore===!0?this.store.restore(t.names[0]):t.names.length===0?this.store.prune(t.all):(this.store.removeMany(t.names,!1),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){let t=this.action();return t?.restore===!0?`upload`:t?.names.length===0?`broom`:`trash`}static ɵfac=function(e){return new(e||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-volumes-page`]],inputs:{zoek:[1,`zoek`],inkijk:[1,`inkijk`],bewaar:[1,`bewaar`]},decls:42,vars:30,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`text-[12px]`,`font-normal`,`text-ink-500`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`volume`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(e,n){e&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Li(6,`div`,4)(7,`div`)(8,`div`,5),fS(9),Nc(),Li(10,`div`,6),fS(11),SE(12,et,2,1,`span`,7),Nc()(),Li(13,`div`)(14,`div`,5),fS(15),Nc(),Li(16,`div`,6),fS(17),Nc()()()(),Li(18,`div`,8)(19,`app-action-menu`,9),Jm(`picked`,function(s){return n.onMenu(s)}),Nc()()(),Li(20,`div`,10)(21,`label`,11)(22,`span`,12),Gm(23,`app-icon`,13),Nc(),Li(24,`span`,14),fS(25),Nc(),Li(26,`input`,15),Jm(`input`,function(s){return n.search.set(s.target.value)}),Nc()(),Li(27,`app-filter-switch`,16),vg(`onChange`,function(s){return vS(n.onlyUnused,s)||(n.onlyUnused=s),s}),Nc(),SE(28,tt,2,1,`span`,17),Nc(),Gm(29,`app-page-messages`,18),SE(30,nt,6,3,`div`,19),Nc(),Li(31,`div`,20)(32,`app-data-table`,21),vg(`selectedChange`,function(s){return vS(n.selected,s)||(n.selected=s),s}),_m(33,ot,3,3,`ng-template`,22)(34,at,2,1,`ng-template`,23)(35,st,2,1,`ng-template`,24)(36,mt,2,1,`ng-template`,25)(37,dt,2,1,`ng-template`,26)(38,pt,2,2,`ng-template`,27),Nc()()(),Li(39,`app-create-volume-dialog`,28),vg(`openChange`,function(s){return vS(n.createOpen,s)||(n.createOpen=s),s}),Nc(),Li(40,`app-volume-browser-dialog`,29),vg(`openChange`,function(s){return vS(n.browseOpen,s)||(n.browseOpen=s),s}),Nc(),Li(41,`app-confirm-dialog`,30),vg(`openChange`,function(s){return vS(n.confirmOpen,s)||(n.confirmOpen=s),s}),Jm(`confirmed`,function(){return n.confirm()}),Nc()),e&2&&(ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),Ac(` `,n.totalSize(),` `),ec(),kE(n.loadingSizes()?12:-1),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),kE(n.loading()?28:-1),ec(),Wm(`problem`,n.problem()),ec(),kE(n.selected().size>0?30:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(7),hg(`open`,n.createOpen),ec(),hg(`open`,n.browseOpen),Wm(`volume`,n.browseVolume()),ec(),hg(`open`,n.confirmOpen),Wm(`title`,n.actionTitle())(`description`,n.actionDescription())(`confirmLabel`,n.actionConfirmLabel())(`confirmIcon`,n.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,G],encapsulation:2})}})();export{ve as VolumesPage};
@@ -1 +1 @@
1
- import{A as I,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,Kn as pj,L as Km,R as Kr,T as Gm,Tn as jE,Tr as zr,W as Lt,X as Nc,Zn as rf,_ as ES,_r as wt,cn as ec,h as Dj,hr as wc,ln as f,t as $E,un as fS,yr as xm}from"./chunk-DanrBswj.js";import{L as xo,N as sr,T as jn,_ as Vn,d as Qo,m as To,o as Ho,z as zo}from"./chunk-ChbnoZwy.js";var X;var G;var J;var p;var E;var j=f(()=>{Kr();Kr();sr();sr();[X,G]=xo(`RdxSwitchContext`,`components/switch`),J=()=>{let i=I(p),f=To();return{checked:i.checkedState,disabled:Lt(()=>!!f.disabled()),readonly:i.readonly,required:i.required,name:i.name,form:i.form,value:i.submitValue,ariaLabel:i.ariaLabel,ariaLabelledBy:i.ariaLabelledBy,registerNativeInput:n=>i.registerNativeInput(n),markAsTouched:()=>i.markAsTouched()}},p=(()=>{class i extends Ho{constructor(){super(),this.cva=To(),this.id=jc(jn(`rdx-switch-`)),this.defaultChecked=jc(void 0,{transform:e=>e===void 0?void 0:Dj(e)}),this.checked=mj(!1),this.disabled=jc(!1,{transform:Dj}),this.readonly=jc(!1,{transform:Dj}),this.required=jc(!1,{transform:Dj}),this.name=jc(),this.form=jc(),this.submitValue=jc(`on`,{alias:`value`}),this.uncheckedValue=jc(),this.ariaLabelledBy=jc(void 0,{alias:`aria-labelledby`}),this.ariaLabel=jc(void 0,{alias:`aria-label`}),this.onCheckedChange=pj(),this.checkedState=Lt(()=>!!this.cva.value()),this.isDisabled=Lt(()=>!!this.cva.disabled()),this.nativeInput=wt(null),this.nativeInputOwnsValue=Lt(()=>this.nativeInput()!==null&&(this.checkedState()||this.uncheckedValue()===void 0)),this.invalidState=this.formUi.invalidState,this.touchedState=this.formUi.touchedState,this.dirtyState=this.formUi.dirtyState,Qo({name:this.name,form:this.form,disabled:this.isDisabled,value:this.checkedState,serialize:e=>{let t=e?this.submitValue():this.uncheckedValue();return t===void 0?[]:[t]},hasNativeControl:this.nativeInputOwnsValue,syncNativeControl:()=>{let e=this.nativeInput();e&&(e.checked=this.checkedState())},defaultValue:()=>this.defaultChecked()??this.checkedState(),onReset:e=>{this.checked.set(e),this.resetNgControl(e)||this.cva.writeValue(e),this.formUi.resetInteractionState?.()}});let n=!1;rf(()=>{let e=this.defaultChecked();!n&&e!==void 0&&(n=!0,this.checked.set(e),this.cva.setValue(e))})}formUiTouchTarget(){return To()}markAsTouched(){this.formUi.markAsTouched()}toggle(n){if(this.isDisabled()||this.readonly())return;let e=!this.cva.value(),t=n?.currentTarget instanceof HTMLElement?n.currentTarget:void 0,{eventDetails:d}=zo(`none`,n??new Event(`switch.checked-change`),t);this.onCheckedChange.emit({checked:e,eventDetails:d}),!d.isCanceled()&&(this.checked.set(e),this.cva.setValue(e),this.formUi.markDirty())}registerNativeInput(n){return this.nativeInput.set(n),()=>{this.nativeInput()===n&&this.nativeInput.set(null)}}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵdir=$E({type:i,selectors:[[`button`,`rdxSwitchRoot`,``]],hostAttrs:[`role`,`switch`,`type`,`button`],hostVars:15,hostBindings:function(e,t){e&1&&Jm(`click`,function(O){return t.toggle(O)})(`blur`,function(){return t.markAsTouched()}),e&2&&(Km(`id`,t.id()),zr(`aria-checked`,t.checkedState())(`aria-required`,t.required()?`true`:void 0)(`aria-readonly`,t.readonly()?`true`:void 0)(`aria-invalid`,t.displayValid()===!1?`true`:void 0)(`data-checked`,t.checkedState()?``:void 0)(`data-unchecked`,t.checkedState()?void 0:``)(`data-disabled`,t.isDisabled()?``:void 0)(`data-readonly`,t.readonly()?``:void 0)(`data-required`,t.required()?``:void 0)(`data-invalid`,t.displayValid()===!1?``:void 0)(`data-valid`,t.displayValid()===!0?``:void 0)(`data-touched`,t.touchedState()?``:void 0)(`data-dirty`,t.dirtyState()?``:void 0)(`disabled`,t.isDisabled()?``:void 0))},inputs:{id:[1,`id`],defaultChecked:[1,`defaultChecked`],checked:[1,`checked`],disabled:[1,`disabled`],readonly:[1,`readonly`],required:[1,`required`],name:[1,`name`],form:[1,`form`],submitValue:[1,`value`,`submitValue`],uncheckedValue:[1,`uncheckedValue`],ariaLabelledBy:[1,`aria-labelledby`,`ariaLabelledBy`],ariaLabel:[1,`aria-label`,`ariaLabel`]},outputs:{checked:`checkedChange`,onCheckedChange:`onCheckedChange`},exportAs:[`rdxSwitchRoot`],features:[ES([G(J)]),jE([{directive:Vn,inputs:[`value`,`checked`,`disabled`,`disabled`]}]),xm]})}}return i})(),E=(()=>{class i{constructor(){this.rootContext=X()}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵdir=$E({type:i,selectors:[[`span`,`rdxSwitchThumb`,``]],hostVars:5,hostBindings:function(e,t){e&2&&zr(`data-checked`,t.rootContext.checked()?``:void 0)(`data-unchecked`,t.rootContext.checked()?void 0:``)(`data-disabled`,t.rootContext.disabled()?``:void 0)(`data-readonly`,t.rootContext.readonly()?``:void 0)(`data-required`,t.rootContext.required()?``:void 0)},exportAs:[`rdxSwitchThumb`]})}}return i})()});var P;var K=f(()=>{Kr();j();Kr();P=class i{label=jc.required();on=mj.required();disabled=jc(!1);static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-filter-switch`]],hostAttrs:[1,`flex`,`items-center`,`gap-2`,`text-[13px]`,`text-ink-300`],inputs:{label:[1,`label`],on:[1,`on`],disabled:[1,`disabled`]},outputs:{on:`onChange`},decls:4,vars:4,consts:[[`type`,`button`,`rdxSwitchRoot`,``,1,`mx-focus`,`relative`,`h-5`,`w-9`,`shrink-0`,`cursor-pointer`,`rounded-full`,`border`,`border-ink-700`,`bg-ink-800`,`transition-colors`,`data-[checked]:border-accent`,`data-[checked]:bg-accent`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,3,`onCheckedChange`,`checked`,`disabled`],[`rdxSwitchThumb`,``,1,`block`,`size-3.5`,`translate-x-[3px]`,`rounded-full`,`bg-ink-400`,`transition-transform`,`data-[checked]:translate-x-[19px]`,`data-[checked]:bg-white`]],template:function(n,e){n&1&&(Li(0,`button`,0),Jm(`onCheckedChange`,function(d){return e.on.set(d.checked)}),Gm(1,`span`,1),Nc(),Li(2,`span`),fS(3),Nc()),n&2&&(Wm(`checked`,e.on())(`disabled`,e.disabled()),zr(`aria-label`,e.label()),ec(3),pg(e.label()))},dependencies:[p,E],encapsulation:2})}});export{P as n,K as t};
1
+ import{A as I,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,Kn as pj,L as Km,R as Kr,T as Gm,Tn as jC,Tr as zr,W as Lt,X as Nc,Zn as rf,_ as Dj,_r as wt,cn as ec,d as CS,hr as wc,ln as f,t as $C,un as fS,yr as xm}from"./chunk-CQJfJJJO.js";import{L as xo,N as sr,T as jn,_ as Vn,d as Qo,m as To,o as Ho,z as zo}from"./chunk-DNfHCIbw.js";var X;var G;var J;var p;var E;var j=f(()=>{Kr();Kr();sr();sr();[X,G]=xo(`RdxSwitchContext`,`components/switch`),J=()=>{let i=I(p),f=To();return{checked:i.checkedState,disabled:Lt(()=>!!f.disabled()),readonly:i.readonly,required:i.required,name:i.name,form:i.form,value:i.submitValue,ariaLabel:i.ariaLabel,ariaLabelledBy:i.ariaLabelledBy,registerNativeInput:n=>i.registerNativeInput(n),markAsTouched:()=>i.markAsTouched()}},p=(()=>{class i extends Ho{constructor(){super(),this.cva=To(),this.id=jc(jn(`rdx-switch-`)),this.defaultChecked=jc(void 0,{transform:e=>e===void 0?void 0:Dj(e)}),this.checked=mj(!1),this.disabled=jc(!1,{transform:Dj}),this.readonly=jc(!1,{transform:Dj}),this.required=jc(!1,{transform:Dj}),this.name=jc(),this.form=jc(),this.submitValue=jc(`on`,{alias:`value`}),this.uncheckedValue=jc(),this.ariaLabelledBy=jc(void 0,{alias:`aria-labelledby`}),this.ariaLabel=jc(void 0,{alias:`aria-label`}),this.onCheckedChange=pj(),this.checkedState=Lt(()=>!!this.cva.value()),this.isDisabled=Lt(()=>!!this.cva.disabled()),this.nativeInput=wt(null),this.nativeInputOwnsValue=Lt(()=>this.nativeInput()!==null&&(this.checkedState()||this.uncheckedValue()===void 0)),this.invalidState=this.formUi.invalidState,this.touchedState=this.formUi.touchedState,this.dirtyState=this.formUi.dirtyState,Qo({name:this.name,form:this.form,disabled:this.isDisabled,value:this.checkedState,serialize:e=>{let t=e?this.submitValue():this.uncheckedValue();return t===void 0?[]:[t]},hasNativeControl:this.nativeInputOwnsValue,syncNativeControl:()=>{let e=this.nativeInput();e&&(e.checked=this.checkedState())},defaultValue:()=>this.defaultChecked()??this.checkedState(),onReset:e=>{this.checked.set(e),this.resetNgControl(e)||this.cva.writeValue(e),this.formUi.resetInteractionState?.()}});let n=!1;rf(()=>{let e=this.defaultChecked();!n&&e!==void 0&&(n=!0,this.checked.set(e),this.cva.setValue(e))})}formUiTouchTarget(){return To()}markAsTouched(){this.formUi.markAsTouched()}toggle(n){if(this.isDisabled()||this.readonly())return;let e=!this.cva.value(),t=n?.currentTarget instanceof HTMLElement?n.currentTarget:void 0,{eventDetails:d}=zo(`none`,n??new Event(`switch.checked-change`),t);this.onCheckedChange.emit({checked:e,eventDetails:d}),!d.isCanceled()&&(this.checked.set(e),this.cva.setValue(e),this.formUi.markDirty())}registerNativeInput(n){return this.nativeInput.set(n),()=>{this.nativeInput()===n&&this.nativeInput.set(null)}}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵdir=$C({type:i,selectors:[[`button`,`rdxSwitchRoot`,``]],hostAttrs:[`role`,`switch`,`type`,`button`],hostVars:15,hostBindings:function(e,t){e&1&&Jm(`click`,function(O){return t.toggle(O)})(`blur`,function(){return t.markAsTouched()}),e&2&&(Km(`id`,t.id()),zr(`aria-checked`,t.checkedState())(`aria-required`,t.required()?`true`:void 0)(`aria-readonly`,t.readonly()?`true`:void 0)(`aria-invalid`,t.displayValid()===!1?`true`:void 0)(`data-checked`,t.checkedState()?``:void 0)(`data-unchecked`,t.checkedState()?void 0:``)(`data-disabled`,t.isDisabled()?``:void 0)(`data-readonly`,t.readonly()?``:void 0)(`data-required`,t.required()?``:void 0)(`data-invalid`,t.displayValid()===!1?``:void 0)(`data-valid`,t.displayValid()===!0?``:void 0)(`data-touched`,t.touchedState()?``:void 0)(`data-dirty`,t.dirtyState()?``:void 0)(`disabled`,t.isDisabled()?``:void 0))},inputs:{id:[1,`id`],defaultChecked:[1,`defaultChecked`],checked:[1,`checked`],disabled:[1,`disabled`],readonly:[1,`readonly`],required:[1,`required`],name:[1,`name`],form:[1,`form`],submitValue:[1,`value`,`submitValue`],uncheckedValue:[1,`uncheckedValue`],ariaLabelledBy:[1,`aria-labelledby`,`ariaLabelledBy`],ariaLabel:[1,`aria-label`,`ariaLabel`]},outputs:{checked:`checkedChange`,onCheckedChange:`onCheckedChange`},exportAs:[`rdxSwitchRoot`],features:[CS([G(J)]),jC([{directive:Vn,inputs:[`value`,`checked`,`disabled`,`disabled`]}]),xm]})}}return i})(),E=(()=>{class i{constructor(){this.rootContext=X()}static{this.ɵfac=function(e){return new(e||i)}}static{this.ɵdir=$C({type:i,selectors:[[`span`,`rdxSwitchThumb`,``]],hostVars:5,hostBindings:function(e,t){e&2&&zr(`data-checked`,t.rootContext.checked()?``:void 0)(`data-unchecked`,t.rootContext.checked()?void 0:``)(`data-disabled`,t.rootContext.disabled()?``:void 0)(`data-readonly`,t.rootContext.readonly()?``:void 0)(`data-required`,t.rootContext.required()?``:void 0)},exportAs:[`rdxSwitchThumb`]})}}return i})()});var P;var K=f(()=>{Kr();j();Kr();P=class i{label=jc.required();on=mj.required();disabled=jc(!1);static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-filter-switch`]],hostAttrs:[1,`flex`,`items-center`,`gap-2`,`text-[13px]`,`text-ink-300`],inputs:{label:[1,`label`],on:[1,`on`],disabled:[1,`disabled`]},outputs:{on:`onChange`},decls:4,vars:4,consts:[[`type`,`button`,`rdxSwitchRoot`,``,1,`mx-focus`,`relative`,`h-5`,`w-9`,`shrink-0`,`cursor-pointer`,`rounded-full`,`border`,`border-ink-700`,`bg-ink-800`,`transition-colors`,`data-[checked]:border-accent`,`data-[checked]:bg-accent`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,3,`onCheckedChange`,`checked`,`disabled`],[`rdxSwitchThumb`,``,1,`block`,`size-3.5`,`translate-x-[3px]`,`rounded-full`,`bg-ink-400`,`transition-transform`,`data-[checked]:translate-x-[19px]`,`data-[checked]:bg-white`]],template:function(n,e){n&1&&(Li(0,`button`,0),Jm(`onCheckedChange`,function(d){return e.on.set(d.checked)}),Gm(1,`span`,1),Nc(),Li(2,`span`),fS(3),Nc()),n&2&&(Wm(`checked`,e.on())(`disabled`,e.disabled()),zr(`aria-label`,e.label()),ec(3),pg(e.label()))},dependencies:[p,E],encapsulation:2})}});export{P as n,K as t};
@@ -1 +1 @@
1
- import{$n as sg,A as I,Ct as Tc,Dn as kC,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Jt as ag,Kn as pj,Kt as _m,Mn as lk,O as HC,On as kc,Pt as W,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt$1,X as Nc,Zn as rf,Zt as bS,_r as wt$1,cn as ec,en as bg,er as sk,gt as SC,hr as wc,in as dk,ln as f,lr as ve,r as Ac,sn as eH,sr as vS,tt as Od,un as fS,ur as vg,ut as RC,vt as Sc,wt as Tg,xr as yS,xt as TC}from"./chunk-DanrBswj.js";import"./chunk-D0FWgHJO.js";import{i as h,n as N,r as d}from"./chunk-CnjgTml5.js";import{n as h$1,t as P}from"./chunk-DnXZxwhv.js";import{n as p,t as M}from"./chunk-85ZfO9F8.js";import{n as o,t as i}from"./chunk-D_aXkfN2.js";import{n as x,t as u}from"./chunk-CQIXZf41.js";import"./chunk-ChbnoZwy.js";import{r as Q,s as fe,u as ra}from"./chunk-CRVM0rcA.js";import"./chunk-BsvB6MmB.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-CFXWwPKo.js";import{n as V,t as G}from"./chunk-CBFZokW4.js";import{n as W$1,t as J}from"./chunk-MG8VVeEh.js";import{i as z,n as oe,r as x$1}from"./chunk-aZl-0gS4.js";import{n as P$1,t as K}from"./chunk-NszG4cuZ.js";function Ze(a,e){a&1&&(Li(0,`p`,13),fS(1),Nc()),a&2&&(ec(),pg(e))}function Ge(a,e){if(a&1&&(Li(0,`p`,14),fS(1),Nc()),a&2){let t=HC(3);ec(),pg(t.t().empty)}}function Je(a,e){if(a&1&&(Li(0,`span`,20),fS(1),Nc()),a&2){let t=HC(5);ec(),pg(t.t().noSize)}}function Xe(a,e){if(a&1){let t=RC();Li(0,`li`,16)(1,`span`,17),fS(2),Nc(),Li(3,`button`,18),Jm(`click`,function(){let r=Od(t).$index;return Ld(HC(4).toggle(r))}),Li(4,`pre`,19),fS(5),Nc(),SC(6,Je,2,1,`span`,20),Nc()()}if(a&2){let t=e.$implicit,n=e.$index,r=HC(4);ec(),nS(t.sizeBytes===0?`text-ink-600`:`text-ink-200`),ec(),Ac(` `,t.sizeBytes===0?`—`:r.size(t),` `),ec(),zr(`aria-label`,r.t().expand)(`aria-expanded`,r.isOpen(n)),ec(),ag(`line-clamp-2`,!r.isOpen(n)),ec(),pg(t.instruction),ec(),kC(t.sizeBytes===0?6:-1)}}function Ye(a,e){if(a&1&&(Li(0,`ul`,15),kc(1,Xe,7,9,`li`,16,TC),Nc()),a&2){let t=HC(3);ec(),Tc(t.layers())}}function et(a,e){if(a&1&&(Li(0,`p`,12),fS(1),Nc(),SC(2,Ze,2,1,`p`,13),SC(3,Ge,2,1,`p`,14)(4,Ye,3,0,`ul`,15)),a&2){let t,n=HC(2);ec(),pg(n.summary()),ec(),kC((t=n.packed())?2:-1,t),ec(),kC(n.layers().length===0?3:4)}}function tt(a,e){if(a&1&&(Li(0,`p`,7),fS(1),Nc()),a&2){let t=HC(2);ec(),Ac(` `,t.problem(),` `)}}function nt(a,e){if(a&1&&(Li(0,`p`,8),fS(1),Nc()),a&2){let t=HC(2);ec(),pg(t.t().loading)}}function it(a,e){if(a&1&&(Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),SC(7,et,5,3)(8,tt,2,1,`p`,7)(9,nt,2,1,`p`,8),Li(10,`div`,9)(11,`button`,10),Gm(12,`app-icon`,11),fS(13),Nc()()()()),a&2){let t,n=HC();ec(4),pg(n.t().title(n.reference())),ec(2),pg(n.t().description),ec(),kC((t=n.result()?.ok)===!0?7:t===!1?8:9),ec(5),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var pe;var Le=f(()=>{Kr();Je$1();lk();h();dk();sk();Kr();pe=class a{open=mj(!1);reference=jc.required();t=Lt$1(()=>ok().images.layers);common=Lt$1(()=>ok().common);result=wt$1(null);expanded=wt$1(new Set);constructor(){rf(()=>{if(!this.open())return;let e=this.reference();Tg(()=>{this.load(e)})})}layers(){let e=this.result();return e?.ok===!0?e.layers:[]}summary(){let e=this.result();return e?.ok===!0?this.t().summary(e.layers.length,d(e.imageBytes)):``}packed(){let e=this.result();return e?.ok!==!0||e.imageBytes===0||e.layersBytes>=e.imageBytes*.95?null:this.t().packed(d(e.layersBytes))}problem(){let e=this.result();return e?.ok===!1?e.problem:``}size(e){return d(e.sizeBytes)}isOpen(e){return this.expanded().has(e)}toggle(e){this.expanded.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}async load(e){this.result.set(null),this.expanded.set(new Set);try{this.result.set(await window.electron.images.history(e))}catch(t){this.result.set({ok:!1,problem:eH(t)})}}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-layers-dialog`]],inputs:{open:[1,`open`],reference:[1,`reference`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`layers-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-3xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`data-testid`,`layers-summary`,1,`mt-3`,`text-[12px]`,`text-ink-500`],[`data-testid`,`layers-packed`,1,`mt-1`,`text-[12px]`,`text-ink-600`],[1,`mt-3`,`text-[13px]`,`text-ink-400`],[`data-testid`,`layer-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`flex`,`gap-4`,`py-2.5`],[1,`w-24`,`shrink-0`,`text-right`,`text-[12px]`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`text-left`,3,`click`],[1,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre-wrap`,`text-ink-200`],[1,`mt-0.5`,`block`,`text-[11px]`,`text-ink-600`]],template:function(t,n){t&1&&(Li(0,`div`,0),vg(`openChange`,function(d){return vS(n.open,d)||(n.open=d),d}),_m(1,it,14,5,`ng-template`,1),Nc()),t&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function ot(a,e){if(a&1&&(Li(0,`div`,19)(1,`span`,20),fS(2),Nc(),Li(3,`span`,21),fS(4),Nc(),Li(5,`span`,22),Gm(6,`span`,23),Nc(),Li(7,`span`,24),fS(8),Nc()()),a&2){let t=e.$implicit,n=HC(4);ec(),Wm(`title`,t.id),ec(),pg(t.id),ec(),Wm(`title`,t.status),ec(),pg(t.status),ec(2),sg(`width`,n.percentOf(t),`%`),ec(2),pg(n.sizeOf(t.total))}}function lt(a,e){if(a&1&&(Li(0,`div`,18),kc(1,ot,9,7,`div`,19,at),Nc()),a&2){let t=HC();ec(),Tc(t.layers)}}function st(a,e){if(a&1&&(Li(0,`p`,17),fS(1),Nc(),SC(2,lt,3,0,`div`,18)),a&2){let t=e;ag(`text-danger`,t.problem)(`text-ink-300`,!t.problem),ec(),Ac(` `,t.problem??t.message,` `),ec(),kC(t.layers.length>0?2:-1)}}function dt(a,e){if(a&1&&(Li(0,`li`)(1,`span`,7),fS(2),Nc(),Li(3,`span`,28),fS(4),Nc()()),a&2){let t=e.$implicit,n=HC(3);ec(2),pg(t.services.join(`, `)),ec(2),Ac(` `,n.t().inProject(t.name))}}function pt(a,e){if(a&1&&(Li(0,`li`)(1,`span`,7),fS(2),Nc(),Li(3,`span`,28),fS(4),Nc()()),a&2){let t=e.$implicit,n=HC(3);ec(2),pg(t),ec(2),Ac(` — `,n.t().notCompose)}}function ct(a,e){if(a&1&&(Li(0,`p`,29),fS(1),Nc()),a&2){let t=HC(),n=HC(3);ec(),pg(n.t().renewed(t.renewed.join(`, `)))}}function mt(a,e){if(a&1&&(Li(0,`p`,30),fS(1),Nc()),a&2){let t=e.$implicit;ec(),pg(t)}}function ut(a,e){if(a&1&&(SC(0,ct,2,1,`p`,29),kc(1,mt,2,1,`p`,30,Sc)),a&2){let t=e;kC(t.renewed.length>0?0:-1),ec(),Tc(t.problems)}}function gt(a,e){if(a&1){let t=RC();Li(0,`div`,27)(1,`button`,31),Jm(`click`,function(){Od(t);return Ld(HC(3).renew())}),Gm(2,`app-icon`,32),fS(3),Nc(),Li(4,`span`,33),fS(5),Nc()()}if(a&2){let t=HC(3);ec(),Wm(`disabled`,t.renewing()),ec(),Wm(`size`,14),ec(),Ac(` `,t.renewing()?t.t().renewing:t.t().renew,` `),ec(2),pg(t.t().renewHint)}}function _t(a,e){if(a&1&&(Li(0,`div`,11)(1,`p`,25),fS(2),Nc(),Li(3,`ul`,26),kc(4,dt,5,2,`li`,null,rt),kc(6,pt,5,2,`li`,null,Sc),Nc(),SC(8,ut,3,1)(9,gt,6,4,`div`,27),Nc()),a&2){let t,n=e,r=HC(2);ec(2),pg(r.t().staleHeading),ec(2),Tc(n.projects),ec(2),Tc(n.loose),ec(2),kC((t=r.renewed())?8:n.projects.length>0?9:-1,t)}}function xt(a,e){if(a&1){let t=RC();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Li(7,`code`,7),fS(8,`nginx:stable-alpine`),Nc(),fS(9),Li(10,`code`,7),fS(11,`latest`),Nc(),fS(12),Nc(),Li(13,`form`,8),Jm(`submit`,function(r){Od(t);return Ld(HC().submit(r))}),Li(14,`label`,9),fS(15),Nc(),Li(16,`input`,10),Jm(`input`,function(r){Od(t);return Ld(HC().reference.set(r.target.value))}),Nc()(),SC(17,st,3,6),SC(18,_t,10,2,`div`,11),Li(19,`div`,12)(20,`button`,13),Gm(21,`app-icon`,14),fS(22),Nc(),Li(23,`button`,15),Gm(24,`app-icon`,16),fS(25),Nc()()()()}if(a&2){let t,n,r=HC();ec(4),pg(r.t().title),ec(2),Ac(` `,r.t().nameAndTag,` `),ec(3),Ac(`. `,r.t().withoutTag,` `),ec(3),Ac(` `,r.t().isUsed,` `),ec(3),pg(r.t().inputLabel),ec(),Wm(`value`,r.reference())(`disabled`,r.busy()),ec(),kC((t=r.progress())?17:-1,t),ec(),kC((n=r.staleShown())?18:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,r.finished()?r.common().close:r.common().cancel,` `),ec(),Wm(`disabled`,!r.canPull()),ec(),Wm(`size`,14),ec(),Ac(` `,r.t().submit,` `)}}var at;var rt;var he;var ce;var Be=f(()=>{Kr();Je$1();h();dk();lk();sk();Kr();at=(a,e)=>e.id,rt=(a,e)=>e.name;he=class{constructor(e){this.onProgress=e}onProgress;streamId=null;unsubscribe=null;disposed=!1;async start(e){this.stop(),this.disposed=!1;let t=await window.electron.images.pull(e);return t.ok?this.disposed?(window.electron.images.close(t.streamId),null):(this.streamId=t.streamId,this.unsubscribe=window.electron.images.onPullProgress(t.streamId,this.onProgress),null):t.problem}stop(){this.disposed=!0,this.unsubscribe?.(),this.unsubscribe=null,this.streamId!==null&&(window.electron.images.close(this.streamId),this.streamId=null)}},ce=class a{open=mj(!1);t=Lt$1(()=>ok().images.pullDialog);common=Lt$1(()=>ok().common);preset=jc(null);reference=wt$1(``);progress=wt$1(null);busy=wt$1(!1);finished=Lt$1(()=>this.progress()?.done??!1);stale=wt$1(null);renewing=wt$1(!1);renewed=wt$1(null);staleShown=Lt$1(()=>{let e=this.stale();return e!==null&&(e.projects.length>0||e.loose.length>0)?e:null});pulled=wt$1(``);canPull=Lt$1(()=>{let e=this.reference().trim();if(this.busy()||e===``)return!1;let t=this.progress();return!(t?.done===!0&&t.problem===null&&e===this.pulled())});run=new he(e=>{this.progress.set(e),e.done&&(this.busy.set(!1),e.problem===null&&this.lookForStale(this.pulled()))});constructor(){I(ve).onDestroy(()=>this.run.stop()),rf(()=>{let e=this.preset();this.open()&&Tg(()=>{this.busy()||this.clear(),e!==null&&(this.reference.set(e),this.pull())})})}clear(){this.reference.set(``),this.progress.set(null),this.stale.set(null),this.renewed.set(null),this.pulled.set(``)}submit(e){e.preventDefault(),this.pull()}pull(){let e=this.reference().trim();this.canPull()&&(this.busy.set(!0),this.progress.set(null),this.stale.set(null),this.renewed.set(null),this.pulled.set(e),this.run.start(e).then(t=>{t!==null&&this.fail(e,t)}).catch(t=>this.fail(e,eH(t))))}async lookForStale(e){try{let t=await window.electron.images.staleContainers(e);e===this.pulled()&&this.stale.set(t)}catch{this.stale.set(null)}}renew(){let e=this.pulled();this.renewing.set(!0),window.electron.images.renew(e).then(t=>this.renewed.set(t)).catch(t=>this.renewed.set({renewed:[],problems:[eH(t)]})).finally(()=>this.renewing.set(!1))}fail(e,t){this.busy.set(!1),this.progress.set({reference:e,layers:[],message:``,done:!0,problem:t})}percentOf(e){return/complete|already exists/i.test(e.status)?100:e.total<=0?0:Math.min(100,e.current/e.total*100)}sizeOf(e){return e<=0?``:d(e)}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-pull-dialog`]],inputs:{open:[1,`open`],preset:[1,`preset`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-3xl`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`font-mono`],[`id`,`pull-form`,1,`mt-4`,3,`submit`],[`for`,`pull-reference`,1,`sr-only`],[`id`,`pull-reference`,`type`,`text`,`placeholder`,`nginx:stable-alpine`,`autocomplete`,`off`,`spellcheck`,`false`,1,`mx-focus`,`w-full`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`value`,`disabled`],[`data-stale`,``,1,`mt-4`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-2.5`,`text-[13px]`],[1,`mt-5`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,`form`,`pull-form`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`download`,3,`size`],[1,`mt-4`,`text-[13px]`],[1,`mt-3`,`max-h-64`,`space-y-1.5`,`overflow-y-auto`,`pr-1`],[1,`flex`,`items-center`,`gap-4`,`text-[12px]`],[1,`w-28`,`shrink-0`,`truncate`,`font-mono`,`text-ink-500`,3,`title`],[1,`w-44`,`shrink-0`,`truncate`,`text-ink-400`,3,`title`],[1,`h-1.5`,`min-w-0`,`flex-1`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`block`,`h-full`,`rounded-full`,`bg-accent`,`transition-[width]`],[1,`w-20`,`shrink-0`,`text-right`,`tabular-nums`,`text-ink-500`],[1,`text-ink-200`],[1,`mt-1.5`,`space-y-0.5`,`text-ink-300`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`text-ink-500`],[1,`mt-2`,`text-ok`],[1,`mt-2`,`text-danger`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(t,n){t&1&&(Li(0,`div`,0),vg(`openChange`,function(d){return vS(n.open,d)||(n.open=d),d}),_m(1,xt,26,14,`ng-template`,1),Nc()),t&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function ft(a,e){if(a&1&&(Li(0,`option`,22),fS(1),Nc()),a&2){let t=e.$implicit,n=HC(2);Wm(`value`,t.name)(`selected`,n.network()===t.name),ec(),pg(t.name)}}function vt(a,e){if(a&1){let t=RC();Li(0,`label`,23)(1,`span`,13),fS(2),Nc(),Li(3,`input`,14),Jm(`input`,function(r){Od(t);return Ld(HC(2).networkAlias.set(r.target.value))}),Nc(),Li(4,`span`,35),fS(5),Nc()()}if(a&2){let t=HC(2);ec(2),pg(t.t().networkAlias),ec(),nS(t.field+` mt-1.5 w-full`),Wm(`placeholder`,t.t().networkAliasPlaceholder)(`value`,t.networkAlias()),zr(`aria-label`,t.t().networkAlias),ec(2),pg(t.t().networkAliasHint)}}function ht(a,e){if(a&1){let t=RC();Li(0,`input`,37),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HC(3).setPort(d,{host:r.target.value}))}),Nc(),Li(1,`span`,38),fS(2,`→`),Nc(),Li(3,`input`,39),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HC(3).setPort(d,{container:r.target.value}))}),Nc(),Li(4,`select`,20),Jm(`change`,function(r){let d=Od(t).$index;return Ld(HC(3).setPort(d,{protocol:r.target.value}))}),Li(5,`option`,40),fS(6,`tcp`),Nc(),Li(7,`option`,41),fS(8,`udp`),Nc()(),Li(9,`button`,25),Jm(`click`,function(){let r=Od(t).$index;return Ld(HC(3).removePort(r))}),Gm(10,`app-icon`,42),Nc()}if(a&2){let t=e.$implicit,n=e.$index,r=HC(3);nS(r.field),Wm(`placeholder`,r.t().hostPortPlaceholder)(`value`,t.host),zr(`aria-label`,r.t().hostPort(n+1)),ec(3),nS(r.field),Wm(`value`,t.container),zr(`aria-label`,r.t().containerPort(n+1)),ec(),nS(r.field),zr(`aria-label`,r.t().protocol(n+1)),ec(),Wm(`selected`,t.protocol===`tcp`),ec(2),Wm(`selected`,t.protocol===`udp`),ec(2),nS(r.removeButton),zr(`aria-label`,r.t().removePort(n+1)),ec(),Wm(`size`,14)}}function bt(a,e){if(a&1&&(Li(0,`div`,24)(1,`span`,36),fS(2),Nc(),Gm(3,`span`),Li(4,`span`,36),fS(5),Nc(),Li(6,`span`,36),fS(7),Nc(),Gm(8,`span`),kc(9,ht,11,18,null,null,TC),Nc()),a&2){let t=HC(2);ec(2),pg(t.t().onThisComputer),ec(3),pg(t.t().inContainer),ec(2),pg(t.t().protocolHeader),ec(2),Tc(t.ports())}}function wt(a,e){if(a&1){let t=RC();Li(0,`input`,45),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HC(3).setVolume(d,{source:r.target.value}))}),Nc(),Li(1,`span`,38),fS(2,`→`),Nc(),Li(3,`input`,46),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HC(3).setVolume(d,{target:r.target.value}))}),Nc(),Li(4,`label`,47)(5,`input`,48),Jm(`change`,function(r){let d=Od(t).$index;return Ld(HC(3).setVolume(d,{readOnly:r.target.checked}))}),Nc(),fS(6),Nc(),Li(7,`button`,25),Jm(`click`,function(){let r=Od(t).$index;return Ld(HC(3).removeVolume(r))}),Gm(8,`app-icon`,42),Nc()}if(a&2){let t=e.$implicit,n=e.$index,r=HC(3);nS(r.field),Wm(`placeholder`,r.t().sourcePlaceholder)(`value`,t.source),zr(`aria-label`,r.t().volumeSource(n+1)),ec(3),nS(r.field),Wm(`placeholder`,r.t().targetPlaceholder)(`value`,t.target),zr(`aria-label`,r.t().volumeTarget(n+1)),ec(),Wm(`title`,r.t().readOnlyHint),ec(),Wm(`checked`,t.readOnly),ec(),Ac(` `,r.t().readOnly,` `),ec(),nS(r.removeButton),zr(`aria-label`,r.t().removeVolume(n+1)),ec(),Wm(`size`,14)}}function kt(a,e){if(a&1&&Gm(0,`option`,44),a&2){let t=e.$implicit;Wm(`value`,t)}}function Ct(a,e){if(a&1&&(Li(0,`div`,24)(1,`span`,36),fS(2),Nc(),Gm(3,`span`),Li(4,`span`,36),fS(5),Nc(),Gm(6,`span`)(7,`span`),kc(8,wt,9,17,null,null,TC),Nc(),Li(10,`datalist`,43),kc(11,kt,1,1,`option`,44,Sc),Nc()),a&2){let t=HC(2);ec(2),pg(t.t().source),ec(3),pg(t.t().inContainer),ec(3),Tc(t.volumes()),ec(3),Tc(t.knownVolumes())}}function Dt(a,e){if(a&1){let t=RC();Li(0,`input`,49),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HC(3).setEnvKey(d,r.target))}),Nc(),Li(1,`span`,38),fS(2,`=`),Nc(),Li(3,`input`,50),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HC(3).setEnv(d,{value:r.target.value}))}),Nc(),Li(4,`button`,25),Jm(`click`,function(){let r=Od(t).$index;return Ld(HC(3).removeEnv(r))}),Gm(5,`app-icon`,42),Nc()}if(a&2){let t=e.$implicit,n=e.$index,r=HC(3);nS(r.field+` font-mono`),Wm(`value`,t.key),zr(`aria-label`,r.t().envName(n+1)),ec(3),nS(r.field+` font-mono`),Wm(`value`,t.value),zr(`aria-label`,r.t().envValue(n+1))(`data-env-value`,n),ec(),nS(r.removeButton),zr(`aria-label`,r.t().removeEnv(n+1)),ec(),Wm(`size`,14)}}function It(a,e){if(a&1&&(Li(0,`div`,27)(1,`span`,36),fS(2),Nc(),Gm(3,`span`),Li(4,`span`,36),fS(5),Nc(),Gm(6,`span`),kc(7,Dt,6,13,null,null,TC),Nc()),a&2){let t=HC(2);ec(2),pg(t.t().envNameHeader),ec(3),pg(t.t().envValueHeader),ec(2),Tc(t.env())}}function St(a,e){a&1&&(Li(0,`p`,29),fS(1),Nc()),a&2&&(ec(),Ac(` `,e,` `))}function Et(a,e){if(a&1){let t=RC();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`div`,5)(4,`h2`,6),fS(5),Nc(),Li(6,`p`,7)(7,`span`),fS(8),Nc(),Li(9,`code`,8),fS(10),Nc()()(),Li(11,`form`,9),Jm(`submit`,function(r){Od(t);return Ld(HC().submit(r))}),Li(12,`div`,10)(13,`section`,11)(14,`label`,12)(15,`span`,13),fS(16),Nc(),Li(17,`input`,14),Jm(`input`,function(r){Od(t);return Ld(HC().name.set(r.target.value))}),Nc()(),Li(18,`label`,15)(19,`input`,16),Jm(`change`,function(r){Od(t);return Ld(HC().autoRestart.set(r.target.checked))}),Nc(),Li(20,`span`)(21,`span`,17),fS(22),Nc(),Li(23,`span`,18),fS(24),Nc()()()(),Li(25,`section`)(26,`h3`,13),fS(27),Nc(),Li(28,`p`,19),fS(29),Nc(),Li(30,`select`,20),Jm(`change`,function(r){Od(t);return Ld(HC().setNetwork(r.target.value))}),Li(31,`option`,21),fS(32),Nc(),kc(33,ft,2,3,`option`,22,yt),Nc(),SC(35,vt,6,7,`label`,23),Nc(),Li(36,`section`)(37,`h3`,13),fS(38),Nc(),Li(39,`p`,19),fS(40),Nc(),SC(41,bt,11,3,`div`,24),Li(42,`button`,25),Jm(`click`,function(){Od(t);return Ld(HC().addPort())}),Gm(43,`app-icon`,26),fS(44),Nc()(),Li(45,`section`)(46,`h3`,13),fS(47),Nc(),Li(48,`p`,19),fS(49),Nc(),SC(50,Ct,13,2),Li(51,`button`,25),Jm(`click`,function(){Od(t);return Ld(HC().addVolume())}),Gm(52,`app-icon`,26),fS(53),Nc()(),Li(54,`section`)(55,`h3`,13),fS(56),Nc(),Li(57,`p`,19),fS(58),Nc(),SC(59,It,9,2,`div`,27),Li(60,`button`,25),Jm(`click`,function(){Od(t);return Ld(HC().addEnv())}),Gm(61,`app-icon`,26),fS(62),Nc()()(),Li(63,`div`,28),SC(64,St,2,1,`p`,29),Li(65,`div`,30)(66,`button`,31),Gm(67,`app-icon`,32),fS(68),Nc(),Li(69,`button`,33),Gm(70,`app-icon`,34),fS(71),Nc()()()()()()}if(a&2){let t,n=HC();ec(5),pg(n.t().title),ec(3),pg(n.t().fromImage),ec(2),pg(n.image()),ec(6),pg(n.t().name),ec(),nS(n.field+` mt-1.5 w-full`),Wm(`placeholder`,n.t().namePlaceholder)(`value`,n.name()),ec(2),Wm(`checked`,n.autoRestart()),ec(3),pg(n.t().autoRestart),ec(2),pg(n.t().autoRestartHint),ec(3),pg(n.t().network),ec(2),pg(n.t().networkHint),ec(),nS(n.field+` mt-3 w-full`),zr(`aria-label`,n.t().network),ec(),Wm(`selected`,n.network()===``),ec(),pg(n.t().networkDefault),ec(),Tc(n.selectableNetworks()),ec(2),kC(n.canAlias()?35:-1),ec(3),pg(n.t().ports),ec(2),pg(n.t().portsHint),ec(),kC(n.ports().length>0?41:-1),ec(),nS(n.addButton),zr(`aria-label`,n.t().addPort),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addPort,` `),ec(3),pg(n.t().volumes),ec(2),pg(n.t().volumesHint),ec(),kC(n.volumes().length>0?50:-1),ec(),nS(n.addButton),zr(`aria-label`,n.t().addVolume),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addVolume,` `),ec(3),pg(n.t().env),ec(2),pg(n.t().envHint),ec(),kC(n.env().length>0?59:-1),ec(),nS(n.addButton),zr(`aria-label`,n.t().addEnv),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addEnv,` `),ec(2),kC((t=n.problem())?64:-1,t),ec(3),Wm(`size`,14),ec(),Ac(` `,n.common().cancel,` `),ec(),Wm(`disabled`,!n.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,n.busy()?n.t().starting:n.t().submit,` `)}}var yt;var Pt;var Tt;var Rt;var me;var $e=f(()=>{Kr();Je$1();P();dk();lk();sk();Kr();yt=(a,e)=>e.id;Pt=`mx-focus min-w-0 rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Tt=`mx-focus mt-2 inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed border-ink-700 px-2.5 py-1 text-[12px] text-ink-300 hover:border-ink-500 hover:text-ink-100`,Rt=`mx-focus grid size-8 cursor-pointer place-items-center rounded text-ink-400 hover:text-danger`,me=class a{open=mj(!1);image=jc(``);started=pj();store=I(h$1);t=Lt$1(()=>ok().images.runDialog);common=Lt$1(()=>ok().common);field=Pt;addButton=Tt;removeButton=Rt;name=wt$1(``);autoRestart=wt$1(!1);knownVolumes=wt$1([]);knownNetworks=wt$1([]);network=wt$1(``);networkAlias=wt$1(``);ports=wt$1([]);volumes=wt$1([]);env=wt$1([]);problem=wt$1(null);busy=wt$1(!1);canSubmit=Lt$1(()=>!this.busy()&&this.image()!==``);selectableNetworks=Lt$1(()=>this.knownNetworks().filter(e=>e.name!==`bridge`));canAlias=Lt$1(()=>{let e=this.network();return e!==``&&this.knownNetworks().some(t=>t.name===e&&!t.builtIn)});constructor(){rf(()=>{this.open()&&(this.loadVolumes(),this.loadNetworks())})}async loadVolumes(){try{this.knownVolumes.set((await window.electron.volumes.list()).map(e=>e.name))}catch{this.knownVolumes.set([])}}async loadNetworks(){try{this.knownNetworks.set(await window.electron.networks.list())}catch{this.knownNetworks.set([])}}setNetwork(e){this.network.set(e),this.canAlias()||this.networkAlias.set(``)}addPort(){this.ports.update(e=>[...e,{host:``,container:``,protocol:`tcp`}])}addVolume(){this.volumes.update(e=>[...e,{source:``,target:``,readOnly:!1}])}addEnv(){this.env.update(e=>[...e,{key:``,value:``}])}removePort(e){this.ports.update(t=>t.filter((n,r)=>r!==e))}removeVolume(e){this.volumes.update(t=>t.filter((n,r)=>r!==e))}removeEnv(e){this.env.update(t=>t.filter((n,r)=>r!==e))}setPort(e,t){this.ports.update(n=>n.map((r,d)=>d===e?W(W({},r),t):r))}setVolume(e,t){this.volumes.update(n=>n.map((r,d)=>d===e?W(W({},r),t):r))}setEnv(e,t){this.env.update(n=>n.map((r,d)=>d===e?W(W({},r),t):r))}setEnvKey(e,t){let n=t.value,r=n.indexOf(`=`);if(r<=0){this.setEnv(e,{key:n});return}let d=n.slice(0,r),h=n.slice(r+1);this.setEnv(e,h===``?{key:d}:{key:d,value:h}),t.value=d,t.parentElement?.querySelector(`input[data-env-value="${String(e)}"]`)?.focus()}async submit(e){if(e.preventDefault(),!this.canSubmit())return;let t=this.collect();if(typeof t==`string`){this.problem.set(t);return}this.busy.set(!0),this.problem.set(null);try{let n=await window.electron.images.run(t);if(!n.ok){this.problem.set(n.problem);return}this.reset(),this.open.set(!1),this.started.emit(n.id),this.store.refresh()}catch(n){this.problem.set(eH(n))}finally{this.busy.set(!1)}}collect(){let e=this.t(),t=[];for(let P of this.ports()){let T=Number(P.container.trim());if(!Number.isInteger(T)||T<1||T>65535)return e.invalidContainerPort(P.container);let W=P.host.trim(),ae=W===``?null:Number(W);if(ae!==null&&(!Number.isInteger(ae)||ae<1||ae>65535))return e.invalidHostPort(P.host);t.push({hostPort:ae,containerPort:T,protocol:P.protocol})}let n=[];for(let P of this.volumes()){let T=P.source.trim(),W=P.target.trim();if(T===``||W===``)return e.volumeIncomplete;if(!W.startsWith(`/`))return e.notAbsolute(W);n.push({source:T,target:W,readOnly:P.readOnly})}let r=[];for(let P of this.env()){let T=P.key.trim();if(T===``)return e.envNameMissing;if(T.includes(`=`))return e.envNameWithEquals(T);r.push({key:T,value:P.value})}let d=this.name().trim(),h=this.network(),K=this.canAlias()?this.networkAlias().trim():``;return K!==``&&!/^[\w][\w.-]*$/.test(K)?e.invalidAlias(K):{image:this.image(),name:d===``?null:d,ports:t,volumes:n,env:r,network:h===``?null:h,networkAlias:K===``?null:K,restart:this.autoRestart()?`unless-stopped`:`no`}}reset(){this.name.set(``),this.autoRestart.set(!1),this.network.set(``),this.networkAlias.set(``),this.ports.set([]),this.volumes.set([]),this.env.set([]),this.problem.set(null)}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-run-dialog`]],inputs:{open:[1,`open`],image:[1,`image`]},outputs:{open:`openChange`,started:`started`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`shadow-2xl`],[1,`shrink-0`,`border-b`,`border-ink-800`,`px-5`,`pt-5`,`pb-4`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1.5`,`flex`,`items-center`,`gap-1.5`,`text-[13px]`,`text-ink-400`],[1,`rounded`,`bg-ink-800`,`px-1.5`,`py-0.5`,`font-mono`,`text-[12px]`,`text-ink-200`],[1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`submit`],[1,`min-h-0`,`flex-1`,`space-y-6`,`overflow-y-auto`,`px-5`,`py-5`],[1,`space-y-3`],[1,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`mt-0.5`,`text-[12px]`,`text-ink-500`],[3,`change`],[`value`,``,3,`selected`],[3,`value`,`selected`],[1,`mt-3`,`block`],[1,`mt-3`,`grid`,`grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)_7rem_2rem]`,`items-center`,`gap-x-2`,`gap-y-2`],[`type`,`button`,3,`click`],[`name`,`plus`,3,`size`],[1,`mt-3`,`grid`,`grid-cols-[minmax(0,2fr)_auto_minmax(0,3fr)_2rem]`,`items-center`,`gap-x-2`,`gap-y-2`],[1,`shrink-0`,`border-t`,`border-ink-800`,`px-5`,`py-3`],[`role`,`alert`,1,`mb-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`play`,3,`size`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[11px]`,`tracking-wide`,`text-ink-500`,`uppercase`],[`type`,`text`,`inputmode`,`numeric`,3,`input`,`placeholder`,`value`],[1,`text-ink-500`],[`type`,`text`,`placeholder`,`80`,`inputmode`,`numeric`,3,`input`,`value`],[`value`,`tcp`,3,`selected`],[`value`,`udp`,3,`selected`],[`name`,`trash`,3,`size`],[`id`,`run-dialog-volumes`],[3,`value`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`run-dialog-volumes`,3,`input`,`placeholder`,`value`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`flex`,`cursor-pointer`,`items-center`,`gap-1.5`,`whitespace-nowrap`,`text-[12px]`,`text-ink-400`,3,`title`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[`type`,`text`,`placeholder`,`TZ`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`type`,`text`,`placeholder`,`Europe/Amsterdam`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`]],template:function(t,n){t&1&&(Li(0,`div`,0),vg(`openChange`,function(d){return vS(n.open,d)||(n.open=d),d}),_m(1,Et,72,49,`ng-template`,1),Nc()),t&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Mt(a,e){if(a&1&&(Li(0,`span`,16),fS(1),Nc()),a&2){let t=HC();ec(),pg(t.t().refreshing)}}function Nt(a,e){if(a&1&&(Li(0,`p`,18),fS(1),Nc()),a&2){let t=HC();ec(),pg(t.t().updatesHint)}}function Vt(a,e){if(a&1){let t=RC();Li(0,`div`,19)(1,`span`,33),fS(2),Nc(),Li(3,`button`,34),Jm(`click`,function(){Od(t);return Ld(HC().askRemoveSelected())}),Gm(4,`app-icon`,35),fS(5),Nc()()}if(a&2){let t=HC();ec(2),pg(t.t().selected(t.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,t.common().remove,` `)}}function zt(a,e){if(a&1&&(Li(0,`span`,36),fS(1),Nc()),a&2){let t=e.$implicit;ag(`text-ink-500`,t.dangling)(`text-ink-100`,!t.dangling),Wm(`title`,t.repository),ec(),Ac(` `,t.repository,` `)}}function Ot(a,e){if(a&1&&(Li(0,`span`,39),Gm(1,`app-icon`,42),fS(2),Nc()),a&2){let t=HC(2);ec(),Wm(`size`,12),ec(),Ac(` `,t.t().badge.newer,` `)}}function Lt(a,e){if(a&1&&(Li(0,`span`,40),fS(1),Nc()),a&2){HC();let t=bS(0),n=HC();Wm(`title`,t?.problem??``),ec(),pg(n.t().badge.notInRegistry)}}function Bt(a,e){if(a&1&&(Li(0,`span`,41),Gm(1,`app-icon`,43),fS(2),Nc()),a&2){HC();let t=bS(0),n=HC();Wm(`title`,t?.problem??``),ec(),Wm(`size`,12),ec(),Ac(` `,n.t().badge.uncheckable,` `)}}function $t(a,e){if(a&1&&(bg(0),Li(1,`span`,37)(2,`span`,38),fS(3),Nc(),SC(4,Ot,3,2,`span`,39)(5,Lt,2,2,`span`,40)(6,Bt,3,3,`span`,41),Nc()),a&2){let t=e.$implicit,n=yS(HC().updateOf(t));ec(2),Wm(`title`,t.tag),ec(),pg(t.tag),ec(),kC(n?.state===`update`?4:n?.state===`unknown`?5:n?.state===`error`?6:-1)}}function Ut(a,e){if(a&1&&(Li(0,`span`,44),fS(1),Nc()),a&2){let t=e.$implicit;ec(),pg(t.shortId)}}function Ft(a,e){if(a&1&&(Li(0,`span`,45),fS(1),Nc()),a&2){let t=HC().$implicit,n=HC();ec(),pg(n.t().containerCount(t.inUseBy))}}function At(a,e){a&1&&(Li(0,`span`,46),fS(1,`—`),Nc())}function Wt(a,e){if(a&1&&SC(0,Ft,2,1,`span`,45)(1,At,2,0,`span`,46),a&2){let t=e.$implicit;kC(t.inUseBy>0?0:1)}}function jt(a,e){if(a&1&&(Li(0,`span`,47),fS(1),Nc()),a&2){let t=e.$implicit,n=HC();ec(),pg(n.ageOf(t.createdAt))}}function Ht(a,e){if(a&1&&(Li(0,`span`,48),fS(1),Nc()),a&2){let t=e.$implicit,n=HC();ec(),pg(n.sizeOf(t.sizeBytes))}}function Kt(a,e){if(a&1){let t=RC();Li(0,`div`,49)(1,`app-action-menu`,50),Jm(`picked`,function(r){let d=Od(t).$implicit;return Ld(HC().onRowMenu(r,d))}),Nc()()}if(a&2){let t=e.$implicit,n=HC();ec(),Wm(`label`,n.t().rowMenu(t.reference))(`items`,n.rowMenu(t))}}var Ue;f(()=>{Kr();ra();o();P();M();h();G();Le();J();oe();K();dk();x();Be();$e();sk();Kr();Ue=class a{store=I(h$1);router=I(fe);route=I(Q);preferences=I(p);t=Lt$1(()=>ok().images);common=Lt$1(()=>ok().common);columns=Lt$1(()=>{let e=this.t().columns;return[{key:`repository`,label:e.repository},{key:`tag`,label:e.tag,width:`230px`},{key:`shortId`,label:e.imageId,width:`120px`},{key:`inUse`,label:e.inUse,width:`110px`},{key:`created`,label:e.created,width:`150px`},{key:`size`,label:e.size,width:`100px`,align:`right`},{key:`actions`,label:e.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt$1(``);zoek=jc(void 0);starten=jc(void 0);lagen=jc(void 0);ophalen=jc(void 0);verwijder=jc(void 0);controleren=jc(void 0);onlyUnused=this.preferences.flag(`images.onlyUnused`);selected=wt$1(new Set);removal=wt$1(null);confirmOpen=wt$1(!1);pullOpen=wt$1(!1);pullPreset=wt$1(null);updates=this.store.updates;checkingUpdates=this.store.checkingUpdates;hasUpdates=Lt$1(()=>[...this.updates()?.values()??[]].some(e=>e.state===`update`));runOpen=wt$1(!1);runImage=wt$1(``);layersOpen=wt$1(!1);layersImage=wt$1(``);rows=Lt$1(()=>{let e=this.search().trim().toLowerCase(),t=this.onlyUnused();return this.store.images().filter(n=>t&&n.inUseBy>0?!1:e===``?!0:`${n.repository}:${n.tag} ${n.shortId}`.toLowerCase().includes(e))});totalSize=Lt$1(()=>d(this.store.totalBytes()));selectedRefs=Lt$1(()=>[...this.selected()]);trackKey=e=>e.reference;constructor(){rf(()=>{let e=this.zoek();e!==void 0&&Tg(()=>this.search.set(e))}),this.fromRoute(this.starten,`starten`,e=>{this.runImage.set(e),this.runOpen.set(!0)}),this.fromRoute(this.lagen,`lagen`,e=>{this.layersImage.set(e),this.layersOpen.set(!0)}),this.fromRoute(this.ophalen,`ophalen`,e=>this.openPull(e)),this.fromRoute(this.controleren,`controleren`,()=>this.checkUpdates()),rf(()=>{let e=this.verwijder(),t=this.store.images().find(n=>n.reference===e);e!==void 0&&t!==void 0&&Tg(()=>{this.askRemove(t),i(this.router,this.route,`verwijder`)})}),this.store.refresh()}fromRoute(e,t,n){rf(()=>{let r=e();r!==void 0&&Tg(()=>{n(r),i(this.router,this.route,t)})})}menuItems=Lt$1(()=>{let e=this.t().menu;return[{id:`pull`,label:e.pull,icon:`download`},{id:`check`,label:this.checkingUpdates()?e.checking:e.check,icon:`refresh`,disabled:this.checkingUpdates()},{id:`prune-dangling`,label:e.pruneDangling,icon:`broom`,separated:!0},{id:`prune-unused`,label:e.pruneUnused,icon:`broom`}]});onMenu(e){switch(e){case`pull`:this.openPull(null);break;case`check`:this.checkUpdates();break;case`prune-dangling`:this.askPrune(!1);break;case`prune-unused`:this.askPrune(!0);break}}checkUpdates(){this.store.checkUpdates()}openPull(e){this.pullPreset.set(e),this.pullOpen.set(!0)}pullClosed(e){this.pullOpen.set(e),e||(this.pullPreset.set(null),this.store.recheckIfChecked())}updateOf(e){return this.updates()?.get(e.reference)??null}sizeOf(e){return d(e)}ageOf(e){return N(e)}rowMenu(e){let t=this.pending().has(e.reference),n=this.t(),r=[];return this.updateOf(e)?.state===`update`&&r.push({id:`update`,label:n.rowUpdate,icon:`download`,disabled:t,hint:n.updateTitle(e.reference)}),r.push({id:`run`,label:n.rowRun,icon:`play`,disabled:t,hint:this.runLabelOf(e)},{id:`layers`,label:n.rowLayers,icon:`images`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:t,danger:!0,separated:!0}),r}onRowMenu(e,t){e===`update`?this.openPull(t.reference):e===`run`?this.askRun(t):e===`layers`?(this.layersImage.set(t.reference),this.layersOpen.set(!0)):this.askRemove(t)}askRun(e){this.runImage.set(e.reference),this.runOpen.set(!0)}goToContainer(e){this.router.navigate([`/containers`,e]).catch(()=>{})}runLabelOf(e){return e.dangling?this.t().runLabelDangling:this.t().runLabel(e.reference)}askRemove(e){let t=e.inUseBy>0,n=this.t().remove;this.removal.set({references:[e.reference],title:t?n.forceTitle:n.title,description:t?n.forceDescription(e.reference,e.inUseBy):n.description(e.reference),confirmLabel:t?n.forceConfirm:this.common().remove,force:t}),this.confirmOpen.set(!0)}askRemoveSelected(){let e=this.selectedRefs(),t=this.t().remove;this.removal.set({references:e,title:t.manyTitle,description:t.manyDescription(e.length),confirmLabel:this.common().remove,force:!1}),this.confirmOpen.set(!0)}askPrune(e){let t=this.t().prune;this.removal.set({references:[],title:e?t.allTitle:t.danglingTitle,description:e?t.allDescription:t.danglingDescription,confirmLabel:t.confirm,force:e}),this.confirmOpen.set(!0)}confirm(){let e=this.removal();e!==null&&(e.references.length===0?this.store.prune(e.force):(this.store.removeMany(e.references,e.force),this.selected.set(new Set)),this.removal.set(null))}removalTitle(){return this.removal()?.title??``}removalDescription(){return this.removal()?.description??``}removalConfirmLabel(){return this.removal()?.confirmLabel??this.common().remove}removalConfirmIcon(){return this.removal()?.references.length===0?`broom`:`trash`}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-images-page`]],inputs:{zoek:[1,`zoek`],starten:[1,`starten`],lagen:[1,`lagen`],ophalen:[1,`ophalen`],verwijder:[1,`verwijder`],controleren:[1,`controleren`]},decls:44,vars:33,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-2`,`text-[12px]`,`text-ink-400`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`repository`],[`appCell`,`tag`],[`appCell`,`shortId`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[3,`openChange`,`open`,`preset`],[3,`openChange`,`started`,`open`,`image`],[3,`openChange`,`open`,`reference`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`block`,`truncate`,3,`title`],[1,`flex`,`min-w-0`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-300`,3,`title`],[`data-testid`,`update-badge`,1,`flex`,`shrink-0`,`items-center`,`gap-1`,`text-[11px]`,`text-warn`],[1,`shrink-0`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`flex`,`shrink-0`,`items-center`,`gap-1`,`text-[11px]`,`text-ink-500`,3,`title`],[`name`,`arrow-up`,3,`size`],[`name`,`warning`,3,`size`],[1,`font-mono`,`text-[12px]`,`text-ink-400`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(t,n){t&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Li(6,`div`,4)(7,`div`)(8,`div`,5),fS(9),Nc(),Li(10,`div`,6),fS(11),Nc()(),Li(12,`div`)(13,`div`,5),fS(14),Nc(),Li(15,`div`,6),fS(16),Nc()()()(),Li(17,`div`,7)(18,`app-action-menu`,8),Jm(`picked`,function(d){return n.onMenu(d)}),Nc()()(),Li(19,`div`,9)(20,`label`,10)(21,`span`,11),Gm(22,`app-icon`,12),Nc(),Li(23,`span`,13),fS(24),Nc(),Li(25,`input`,14),Jm(`input`,function(d){return n.search.set(d.target.value)}),Nc()(),Li(26,`app-filter-switch`,15),vg(`onChange`,function(d){return vS(n.onlyUnused,d)||(n.onlyUnused=d),d}),Nc(),SC(27,Mt,2,1,`span`,16),Nc(),Gm(28,`app-page-messages`,17),SC(29,Nt,2,1,`p`,18),SC(30,Vt,6,3,`div`,19),Nc(),Li(31,`div`,20)(32,`app-data-table`,21),vg(`selectedChange`,function(d){return vS(n.selected,d)||(n.selected=d),d}),_m(33,zt,2,6,`ng-template`,22)(34,$t,7,4,`ng-template`,23)(35,Ut,2,1,`ng-template`,24)(36,Wt,2,1,`ng-template`,25)(37,jt,2,1,`ng-template`,26)(38,Ht,2,1,`ng-template`,27)(39,Kt,2,2,`ng-template`,28),Nc()()(),Li(40,`app-confirm-dialog`,29),vg(`openChange`,function(d){return vS(n.confirmOpen,d)||(n.confirmOpen=d),d}),Jm(`confirmed`,function(){return n.confirm()}),Nc(),Li(41,`app-pull-dialog`,30),Jm(`openChange`,function(d){return n.pullClosed(d)}),Nc(),Li(42,`app-run-dialog`,31),vg(`openChange`,function(d){return vS(n.runOpen,d)||(n.runOpen=d),d}),Jm(`started`,function(d){return n.goToContainer(d)}),Nc(),Li(43,`app-layers-dialog`,32),vg(`openChange`,function(d){return vS(n.layersOpen,d)||(n.layersOpen=d),d}),Nc()),t&2&&(ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),pg(n.totalSize()),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),kC(n.loading()?27:-1),ec(),Wm(`problem`,n.problem()),ec(),kC(n.hasUpdates()?29:-1),ec(),kC(n.selected().size>0?30:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(8),hg(`open`,n.confirmOpen),Wm(`title`,n.removalTitle())(`description`,n.removalDescription())(`confirmLabel`,n.removalConfirmLabel())(`confirmIcon`,n.removalConfirmIcon()),ec(),Wm(`open`,n.pullOpen())(`preset`,n.pullPreset()),ec(),hg(`open`,n.runOpen),Wm(`image`,n.runImage()),ec(),hg(`open`,n.layersOpen),Wm(`reference`,n.layersImage()))},dependencies:[z,x$1,My,W$1,u,ce,me,pe,P$1,V],encapsulation:2})}})();export{Ue as ImagesPage};
1
+ import{$n as sg,A as I,Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Jt as ag,Kn as pj,Kt as _m,Mn as lk,O as HE,On as kc,Pt as W,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt$1,X as Nc,Zn as rf,Zt as bS,_r as wt$1,cn as ec,en as bg,er as sk,gt as SE,hr as wc,in as dk,ln as f,lr as ve,r as Ac,sn as eH,sr as vS,tt as Od,un as fS,ur as vg,ut as RE,vt as Sc,wt as Tg,xr as yS,xt as TE}from"./chunk-CQJfJJJO.js";import"./chunk-B417lX5i.js";import"./chunk-DNfHCIbw.js";import{i as h,n as N,r as d}from"./chunk-CJj93ZID.js";import{n as h$1,t as P}from"./chunk-BJln0q-L.js";import{n as p,t as M}from"./chunk-_hzP4C8y.js";import{n as o,t as i}from"./chunk-JJCcZGeB.js";import{n as x,t as u}from"./chunk-Dw7M06TM.js";import{r as Q,s as fe,u as ra}from"./chunk-B10he8vC.js";import"./chunk-Ou7gEgt7.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-ChkLvkqV.js";import{n as V,t as G}from"./chunk-CRU66E5W.js";import{n as W$1,t as J}from"./chunk-CsmSLtiO.js";import{i as z,n as oe,r as x$1}from"./chunk-D2ip_9iB.js";import{n as P$1,t as K}from"./chunk-CcSH3zkW.js";function Ze(a,e){a&1&&(Li(0,`p`,13),fS(1),Nc()),a&2&&(ec(),pg(e))}function Ge(a,e){if(a&1&&(Li(0,`p`,14),fS(1),Nc()),a&2){let t=HE(3);ec(),pg(t.t().empty)}}function Je(a,e){if(a&1&&(Li(0,`span`,20),fS(1),Nc()),a&2){let t=HE(5);ec(),pg(t.t().noSize)}}function Xe(a,e){if(a&1){let t=RE();Li(0,`li`,16)(1,`span`,17),fS(2),Nc(),Li(3,`button`,18),Jm(`click`,function(){let r=Od(t).$index;return Ld(HE(4).toggle(r))}),Li(4,`pre`,19),fS(5),Nc(),SE(6,Je,2,1,`span`,20),Nc()()}if(a&2){let t=e.$implicit,n=e.$index,r=HE(4);ec(),nS(t.sizeBytes===0?`text-ink-600`:`text-ink-200`),ec(),Ac(` `,t.sizeBytes===0?`—`:r.size(t),` `),ec(),zr(`aria-label`,r.t().expand)(`aria-expanded`,r.isOpen(n)),ec(),ag(`line-clamp-2`,!r.isOpen(n)),ec(),pg(t.instruction),ec(),kE(t.sizeBytes===0?6:-1)}}function Ye(a,e){if(a&1&&(Li(0,`ul`,15),kc(1,Xe,7,9,`li`,16,TE),Nc()),a&2){let t=HE(3);ec(),Tc(t.layers())}}function et(a,e){if(a&1&&(Li(0,`p`,12),fS(1),Nc(),SE(2,Ze,2,1,`p`,13),SE(3,Ge,2,1,`p`,14)(4,Ye,3,0,`ul`,15)),a&2){let t,n=HE(2);ec(),pg(n.summary()),ec(),kE((t=n.packed())?2:-1,t),ec(),kE(n.layers().length===0?3:4)}}function tt(a,e){if(a&1&&(Li(0,`p`,7),fS(1),Nc()),a&2){let t=HE(2);ec(),Ac(` `,t.problem(),` `)}}function nt(a,e){if(a&1&&(Li(0,`p`,8),fS(1),Nc()),a&2){let t=HE(2);ec(),pg(t.t().loading)}}function it(a,e){if(a&1&&(Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),SE(7,et,5,3)(8,tt,2,1,`p`,7)(9,nt,2,1,`p`,8),Li(10,`div`,9)(11,`button`,10),Gm(12,`app-icon`,11),fS(13),Nc()()()()),a&2){let t,n=HE();ec(4),pg(n.t().title(n.reference())),ec(2),pg(n.t().description),ec(),kE((t=n.result()?.ok)===!0?7:t===!1?8:9),ec(5),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var pe;var Le=f(()=>{Kr();Je$1();lk();h();dk();sk();Kr();pe=class a{open=mj(!1);reference=jc.required();t=Lt$1(()=>ok().images.layers);common=Lt$1(()=>ok().common);result=wt$1(null);expanded=wt$1(new Set);constructor(){rf(()=>{if(!this.open())return;let e=this.reference();Tg(()=>{this.load(e)})})}layers(){let e=this.result();return e?.ok===!0?e.layers:[]}summary(){let e=this.result();return e?.ok===!0?this.t().summary(e.layers.length,d(e.imageBytes)):``}packed(){let e=this.result();return e?.ok!==!0||e.imageBytes===0||e.layersBytes>=e.imageBytes*.95?null:this.t().packed(d(e.layersBytes))}problem(){let e=this.result();return e?.ok===!1?e.problem:``}size(e){return d(e.sizeBytes)}isOpen(e){return this.expanded().has(e)}toggle(e){this.expanded.update(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}async load(e){this.result.set(null),this.expanded.set(new Set);try{this.result.set(await window.electron.images.history(e))}catch(t){this.result.set({ok:!1,problem:eH(t)})}}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-layers-dialog`]],inputs:{open:[1,`open`],reference:[1,`reference`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`layers-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-3xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`data-testid`,`layers-summary`,1,`mt-3`,`text-[12px]`,`text-ink-500`],[`data-testid`,`layers-packed`,1,`mt-1`,`text-[12px]`,`text-ink-600`],[1,`mt-3`,`text-[13px]`,`text-ink-400`],[`data-testid`,`layer-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`flex`,`gap-4`,`py-2.5`],[1,`w-24`,`shrink-0`,`text-right`,`text-[12px]`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`text-left`,3,`click`],[1,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre-wrap`,`text-ink-200`],[1,`mt-0.5`,`block`,`text-[11px]`,`text-ink-600`]],template:function(t,n){t&1&&(Li(0,`div`,0),vg(`openChange`,function(d){return vS(n.open,d)||(n.open=d),d}),_m(1,it,14,5,`ng-template`,1),Nc()),t&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function ot(a,e){if(a&1&&(Li(0,`div`,19)(1,`span`,20),fS(2),Nc(),Li(3,`span`,21),fS(4),Nc(),Li(5,`span`,22),Gm(6,`span`,23),Nc(),Li(7,`span`,24),fS(8),Nc()()),a&2){let t=e.$implicit,n=HE(4);ec(),Wm(`title`,t.id),ec(),pg(t.id),ec(),Wm(`title`,t.status),ec(),pg(t.status),ec(2),sg(`width`,n.percentOf(t),`%`),ec(2),pg(n.sizeOf(t.total))}}function lt(a,e){if(a&1&&(Li(0,`div`,18),kc(1,ot,9,7,`div`,19,at),Nc()),a&2){let t=HE();ec(),Tc(t.layers)}}function st(a,e){if(a&1&&(Li(0,`p`,17),fS(1),Nc(),SE(2,lt,3,0,`div`,18)),a&2){let t=e;ag(`text-danger`,t.problem)(`text-ink-300`,!t.problem),ec(),Ac(` `,t.problem??t.message,` `),ec(),kE(t.layers.length>0?2:-1)}}function dt(a,e){if(a&1&&(Li(0,`li`)(1,`span`,7),fS(2),Nc(),Li(3,`span`,28),fS(4),Nc()()),a&2){let t=e.$implicit,n=HE(3);ec(2),pg(t.services.join(`, `)),ec(2),Ac(` `,n.t().inProject(t.name))}}function pt(a,e){if(a&1&&(Li(0,`li`)(1,`span`,7),fS(2),Nc(),Li(3,`span`,28),fS(4),Nc()()),a&2){let t=e.$implicit,n=HE(3);ec(2),pg(t),ec(2),Ac(` — `,n.t().notCompose)}}function ct(a,e){if(a&1&&(Li(0,`p`,29),fS(1),Nc()),a&2){let t=HE(),n=HE(3);ec(),pg(n.t().renewed(t.renewed.join(`, `)))}}function mt(a,e){if(a&1&&(Li(0,`p`,30),fS(1),Nc()),a&2){let t=e.$implicit;ec(),pg(t)}}function ut(a,e){if(a&1&&(SE(0,ct,2,1,`p`,29),kc(1,mt,2,1,`p`,30,Sc)),a&2){let t=e;kE(t.renewed.length>0?0:-1),ec(),Tc(t.problems)}}function gt(a,e){if(a&1){let t=RE();Li(0,`div`,27)(1,`button`,31),Jm(`click`,function(){Od(t);return Ld(HE(3).renew())}),Gm(2,`app-icon`,32),fS(3),Nc(),Li(4,`span`,33),fS(5),Nc()()}if(a&2){let t=HE(3);ec(),Wm(`disabled`,t.renewing()),ec(),Wm(`size`,14),ec(),Ac(` `,t.renewing()?t.t().renewing:t.t().renew,` `),ec(2),pg(t.t().renewHint)}}function _t(a,e){if(a&1&&(Li(0,`div`,11)(1,`p`,25),fS(2),Nc(),Li(3,`ul`,26),kc(4,dt,5,2,`li`,null,rt),kc(6,pt,5,2,`li`,null,Sc),Nc(),SE(8,ut,3,1)(9,gt,6,4,`div`,27),Nc()),a&2){let t,n=e,r=HE(2);ec(2),pg(r.t().staleHeading),ec(2),Tc(n.projects),ec(2),Tc(n.loose),ec(2),kE((t=r.renewed())?8:n.projects.length>0?9:-1,t)}}function xt(a,e){if(a&1){let t=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Li(7,`code`,7),fS(8,`nginx:stable-alpine`),Nc(),fS(9),Li(10,`code`,7),fS(11,`latest`),Nc(),fS(12),Nc(),Li(13,`form`,8),Jm(`submit`,function(r){Od(t);return Ld(HE().submit(r))}),Li(14,`label`,9),fS(15),Nc(),Li(16,`input`,10),Jm(`input`,function(r){Od(t);return Ld(HE().reference.set(r.target.value))}),Nc()(),SE(17,st,3,6),SE(18,_t,10,2,`div`,11),Li(19,`div`,12)(20,`button`,13),Gm(21,`app-icon`,14),fS(22),Nc(),Li(23,`button`,15),Gm(24,`app-icon`,16),fS(25),Nc()()()()}if(a&2){let t,n,r=HE();ec(4),pg(r.t().title),ec(2),Ac(` `,r.t().nameAndTag,` `),ec(3),Ac(`. `,r.t().withoutTag,` `),ec(3),Ac(` `,r.t().isUsed,` `),ec(3),pg(r.t().inputLabel),ec(),Wm(`value`,r.reference())(`disabled`,r.busy()),ec(),kE((t=r.progress())?17:-1,t),ec(),kE((n=r.staleShown())?18:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,r.finished()?r.common().close:r.common().cancel,` `),ec(),Wm(`disabled`,!r.canPull()),ec(),Wm(`size`,14),ec(),Ac(` `,r.t().submit,` `)}}var at;var rt;var he;var ce;var Be=f(()=>{Kr();Je$1();h();dk();lk();sk();Kr();at=(a,e)=>e.id,rt=(a,e)=>e.name;he=class{constructor(e){this.onProgress=e}onProgress;streamId=null;unsubscribe=null;disposed=!1;async start(e){this.stop(),this.disposed=!1;let t=await window.electron.images.pull(e);return t.ok?this.disposed?(window.electron.images.close(t.streamId),null):(this.streamId=t.streamId,this.unsubscribe=window.electron.images.onPullProgress(t.streamId,this.onProgress),null):t.problem}stop(){this.disposed=!0,this.unsubscribe?.(),this.unsubscribe=null,this.streamId!==null&&(window.electron.images.close(this.streamId),this.streamId=null)}},ce=class a{open=mj(!1);t=Lt$1(()=>ok().images.pullDialog);common=Lt$1(()=>ok().common);preset=jc(null);reference=wt$1(``);progress=wt$1(null);busy=wt$1(!1);finished=Lt$1(()=>this.progress()?.done??!1);stale=wt$1(null);renewing=wt$1(!1);renewed=wt$1(null);staleShown=Lt$1(()=>{let e=this.stale();return e!==null&&(e.projects.length>0||e.loose.length>0)?e:null});pulled=wt$1(``);canPull=Lt$1(()=>{let e=this.reference().trim();if(this.busy()||e===``)return!1;let t=this.progress();return!(t?.done===!0&&t.problem===null&&e===this.pulled())});run=new he(e=>{this.progress.set(e),e.done&&(this.busy.set(!1),e.problem===null&&this.lookForStale(this.pulled()))});constructor(){I(ve).onDestroy(()=>this.run.stop()),rf(()=>{let e=this.preset();this.open()&&Tg(()=>{this.busy()||this.clear(),e!==null&&(this.reference.set(e),this.pull())})})}clear(){this.reference.set(``),this.progress.set(null),this.stale.set(null),this.renewed.set(null),this.pulled.set(``)}submit(e){e.preventDefault(),this.pull()}pull(){let e=this.reference().trim();this.canPull()&&(this.busy.set(!0),this.progress.set(null),this.stale.set(null),this.renewed.set(null),this.pulled.set(e),this.run.start(e).then(t=>{t!==null&&this.fail(e,t)}).catch(t=>this.fail(e,eH(t))))}async lookForStale(e){try{let t=await window.electron.images.staleContainers(e);e===this.pulled()&&this.stale.set(t)}catch{this.stale.set(null)}}renew(){let e=this.pulled();this.renewing.set(!0),window.electron.images.renew(e).then(t=>this.renewed.set(t)).catch(t=>this.renewed.set({renewed:[],problems:[eH(t)]})).finally(()=>this.renewing.set(!1))}fail(e,t){this.busy.set(!1),this.progress.set({reference:e,layers:[],message:``,done:!0,problem:t})}percentOf(e){return/complete|already exists/i.test(e.status)?100:e.total<=0?0:Math.min(100,e.current/e.total*100)}sizeOf(e){return e<=0?``:d(e)}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-pull-dialog`]],inputs:{open:[1,`open`],preset:[1,`preset`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-3xl`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`font-mono`],[`id`,`pull-form`,1,`mt-4`,3,`submit`],[`for`,`pull-reference`,1,`sr-only`],[`id`,`pull-reference`,`type`,`text`,`placeholder`,`nginx:stable-alpine`,`autocomplete`,`off`,`spellcheck`,`false`,1,`mx-focus`,`w-full`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`value`,`disabled`],[`data-stale`,``,1,`mt-4`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-2.5`,`text-[13px]`],[1,`mt-5`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,`form`,`pull-form`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`download`,3,`size`],[1,`mt-4`,`text-[13px]`],[1,`mt-3`,`max-h-64`,`space-y-1.5`,`overflow-y-auto`,`pr-1`],[1,`flex`,`items-center`,`gap-4`,`text-[12px]`],[1,`w-28`,`shrink-0`,`truncate`,`font-mono`,`text-ink-500`,3,`title`],[1,`w-44`,`shrink-0`,`truncate`,`text-ink-400`,3,`title`],[1,`h-1.5`,`min-w-0`,`flex-1`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`block`,`h-full`,`rounded-full`,`bg-accent`,`transition-[width]`],[1,`w-20`,`shrink-0`,`text-right`,`tabular-nums`,`text-ink-500`],[1,`text-ink-200`],[1,`mt-1.5`,`space-y-0.5`,`text-ink-300`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`text-ink-500`],[1,`mt-2`,`text-ok`],[1,`mt-2`,`text-danger`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(t,n){t&1&&(Li(0,`div`,0),vg(`openChange`,function(d){return vS(n.open,d)||(n.open=d),d}),_m(1,xt,26,14,`ng-template`,1),Nc()),t&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function ft(a,e){if(a&1&&(Li(0,`option`,22),fS(1),Nc()),a&2){let t=e.$implicit,n=HE(2);Wm(`value`,t.name)(`selected`,n.network()===t.name),ec(),pg(t.name)}}function vt(a,e){if(a&1){let t=RE();Li(0,`label`,23)(1,`span`,13),fS(2),Nc(),Li(3,`input`,14),Jm(`input`,function(r){Od(t);return Ld(HE(2).networkAlias.set(r.target.value))}),Nc(),Li(4,`span`,35),fS(5),Nc()()}if(a&2){let t=HE(2);ec(2),pg(t.t().networkAlias),ec(),nS(t.field+` mt-1.5 w-full`),Wm(`placeholder`,t.t().networkAliasPlaceholder)(`value`,t.networkAlias()),zr(`aria-label`,t.t().networkAlias),ec(2),pg(t.t().networkAliasHint)}}function ht(a,e){if(a&1){let t=RE();Li(0,`input`,37),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HE(3).setPort(d,{host:r.target.value}))}),Nc(),Li(1,`span`,38),fS(2,`→`),Nc(),Li(3,`input`,39),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HE(3).setPort(d,{container:r.target.value}))}),Nc(),Li(4,`select`,20),Jm(`change`,function(r){let d=Od(t).$index;return Ld(HE(3).setPort(d,{protocol:r.target.value}))}),Li(5,`option`,40),fS(6,`tcp`),Nc(),Li(7,`option`,41),fS(8,`udp`),Nc()(),Li(9,`button`,25),Jm(`click`,function(){let r=Od(t).$index;return Ld(HE(3).removePort(r))}),Gm(10,`app-icon`,42),Nc()}if(a&2){let t=e.$implicit,n=e.$index,r=HE(3);nS(r.field),Wm(`placeholder`,r.t().hostPortPlaceholder)(`value`,t.host),zr(`aria-label`,r.t().hostPort(n+1)),ec(3),nS(r.field),Wm(`value`,t.container),zr(`aria-label`,r.t().containerPort(n+1)),ec(),nS(r.field),zr(`aria-label`,r.t().protocol(n+1)),ec(),Wm(`selected`,t.protocol===`tcp`),ec(2),Wm(`selected`,t.protocol===`udp`),ec(2),nS(r.removeButton),zr(`aria-label`,r.t().removePort(n+1)),ec(),Wm(`size`,14)}}function bt(a,e){if(a&1&&(Li(0,`div`,24)(1,`span`,36),fS(2),Nc(),Gm(3,`span`),Li(4,`span`,36),fS(5),Nc(),Li(6,`span`,36),fS(7),Nc(),Gm(8,`span`),kc(9,ht,11,18,null,null,TE),Nc()),a&2){let t=HE(2);ec(2),pg(t.t().onThisComputer),ec(3),pg(t.t().inContainer),ec(2),pg(t.t().protocolHeader),ec(2),Tc(t.ports())}}function wt(a,e){if(a&1){let t=RE();Li(0,`input`,45),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HE(3).setVolume(d,{source:r.target.value}))}),Nc(),Li(1,`span`,38),fS(2,`→`),Nc(),Li(3,`input`,46),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HE(3).setVolume(d,{target:r.target.value}))}),Nc(),Li(4,`label`,47)(5,`input`,48),Jm(`change`,function(r){let d=Od(t).$index;return Ld(HE(3).setVolume(d,{readOnly:r.target.checked}))}),Nc(),fS(6),Nc(),Li(7,`button`,25),Jm(`click`,function(){let r=Od(t).$index;return Ld(HE(3).removeVolume(r))}),Gm(8,`app-icon`,42),Nc()}if(a&2){let t=e.$implicit,n=e.$index,r=HE(3);nS(r.field),Wm(`placeholder`,r.t().sourcePlaceholder)(`value`,t.source),zr(`aria-label`,r.t().volumeSource(n+1)),ec(3),nS(r.field),Wm(`placeholder`,r.t().targetPlaceholder)(`value`,t.target),zr(`aria-label`,r.t().volumeTarget(n+1)),ec(),Wm(`title`,r.t().readOnlyHint),ec(),Wm(`checked`,t.readOnly),ec(),Ac(` `,r.t().readOnly,` `),ec(),nS(r.removeButton),zr(`aria-label`,r.t().removeVolume(n+1)),ec(),Wm(`size`,14)}}function kt(a,e){if(a&1&&Gm(0,`option`,44),a&2){let t=e.$implicit;Wm(`value`,t)}}function Ct(a,e){if(a&1&&(Li(0,`div`,24)(1,`span`,36),fS(2),Nc(),Gm(3,`span`),Li(4,`span`,36),fS(5),Nc(),Gm(6,`span`)(7,`span`),kc(8,wt,9,17,null,null,TE),Nc(),Li(10,`datalist`,43),kc(11,kt,1,1,`option`,44,Sc),Nc()),a&2){let t=HE(2);ec(2),pg(t.t().source),ec(3),pg(t.t().inContainer),ec(3),Tc(t.volumes()),ec(3),Tc(t.knownVolumes())}}function Dt(a,e){if(a&1){let t=RE();Li(0,`input`,49),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HE(3).setEnvKey(d,r.target))}),Nc(),Li(1,`span`,38),fS(2,`=`),Nc(),Li(3,`input`,50),Jm(`input`,function(r){let d=Od(t).$index;return Ld(HE(3).setEnv(d,{value:r.target.value}))}),Nc(),Li(4,`button`,25),Jm(`click`,function(){let r=Od(t).$index;return Ld(HE(3).removeEnv(r))}),Gm(5,`app-icon`,42),Nc()}if(a&2){let t=e.$implicit,n=e.$index,r=HE(3);nS(r.field+` font-mono`),Wm(`value`,t.key),zr(`aria-label`,r.t().envName(n+1)),ec(3),nS(r.field+` font-mono`),Wm(`value`,t.value),zr(`aria-label`,r.t().envValue(n+1))(`data-env-value`,n),ec(),nS(r.removeButton),zr(`aria-label`,r.t().removeEnv(n+1)),ec(),Wm(`size`,14)}}function It(a,e){if(a&1&&(Li(0,`div`,27)(1,`span`,36),fS(2),Nc(),Gm(3,`span`),Li(4,`span`,36),fS(5),Nc(),Gm(6,`span`),kc(7,Dt,6,13,null,null,TE),Nc()),a&2){let t=HE(2);ec(2),pg(t.t().envNameHeader),ec(3),pg(t.t().envValueHeader),ec(2),Tc(t.env())}}function St(a,e){a&1&&(Li(0,`p`,29),fS(1),Nc()),a&2&&(ec(),Ac(` `,e,` `))}function Et(a,e){if(a&1){let t=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`div`,5)(4,`h2`,6),fS(5),Nc(),Li(6,`p`,7)(7,`span`),fS(8),Nc(),Li(9,`code`,8),fS(10),Nc()()(),Li(11,`form`,9),Jm(`submit`,function(r){Od(t);return Ld(HE().submit(r))}),Li(12,`div`,10)(13,`section`,11)(14,`label`,12)(15,`span`,13),fS(16),Nc(),Li(17,`input`,14),Jm(`input`,function(r){Od(t);return Ld(HE().name.set(r.target.value))}),Nc()(),Li(18,`label`,15)(19,`input`,16),Jm(`change`,function(r){Od(t);return Ld(HE().autoRestart.set(r.target.checked))}),Nc(),Li(20,`span`)(21,`span`,17),fS(22),Nc(),Li(23,`span`,18),fS(24),Nc()()()(),Li(25,`section`)(26,`h3`,13),fS(27),Nc(),Li(28,`p`,19),fS(29),Nc(),Li(30,`select`,20),Jm(`change`,function(r){Od(t);return Ld(HE().setNetwork(r.target.value))}),Li(31,`option`,21),fS(32),Nc(),kc(33,ft,2,3,`option`,22,yt),Nc(),SE(35,vt,6,7,`label`,23),Nc(),Li(36,`section`)(37,`h3`,13),fS(38),Nc(),Li(39,`p`,19),fS(40),Nc(),SE(41,bt,11,3,`div`,24),Li(42,`button`,25),Jm(`click`,function(){Od(t);return Ld(HE().addPort())}),Gm(43,`app-icon`,26),fS(44),Nc()(),Li(45,`section`)(46,`h3`,13),fS(47),Nc(),Li(48,`p`,19),fS(49),Nc(),SE(50,Ct,13,2),Li(51,`button`,25),Jm(`click`,function(){Od(t);return Ld(HE().addVolume())}),Gm(52,`app-icon`,26),fS(53),Nc()(),Li(54,`section`)(55,`h3`,13),fS(56),Nc(),Li(57,`p`,19),fS(58),Nc(),SE(59,It,9,2,`div`,27),Li(60,`button`,25),Jm(`click`,function(){Od(t);return Ld(HE().addEnv())}),Gm(61,`app-icon`,26),fS(62),Nc()()(),Li(63,`div`,28),SE(64,St,2,1,`p`,29),Li(65,`div`,30)(66,`button`,31),Gm(67,`app-icon`,32),fS(68),Nc(),Li(69,`button`,33),Gm(70,`app-icon`,34),fS(71),Nc()()()()()()}if(a&2){let t,n=HE();ec(5),pg(n.t().title),ec(3),pg(n.t().fromImage),ec(2),pg(n.image()),ec(6),pg(n.t().name),ec(),nS(n.field+` mt-1.5 w-full`),Wm(`placeholder`,n.t().namePlaceholder)(`value`,n.name()),ec(2),Wm(`checked`,n.autoRestart()),ec(3),pg(n.t().autoRestart),ec(2),pg(n.t().autoRestartHint),ec(3),pg(n.t().network),ec(2),pg(n.t().networkHint),ec(),nS(n.field+` mt-3 w-full`),zr(`aria-label`,n.t().network),ec(),Wm(`selected`,n.network()===``),ec(),pg(n.t().networkDefault),ec(),Tc(n.selectableNetworks()),ec(2),kE(n.canAlias()?35:-1),ec(3),pg(n.t().ports),ec(2),pg(n.t().portsHint),ec(),kE(n.ports().length>0?41:-1),ec(),nS(n.addButton),zr(`aria-label`,n.t().addPort),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addPort,` `),ec(3),pg(n.t().volumes),ec(2),pg(n.t().volumesHint),ec(),kE(n.volumes().length>0?50:-1),ec(),nS(n.addButton),zr(`aria-label`,n.t().addVolume),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addVolume,` `),ec(3),pg(n.t().env),ec(2),pg(n.t().envHint),ec(),kE(n.env().length>0?59:-1),ec(),nS(n.addButton),zr(`aria-label`,n.t().addEnv),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addEnv,` `),ec(2),kE((t=n.problem())?64:-1,t),ec(3),Wm(`size`,14),ec(),Ac(` `,n.common().cancel,` `),ec(),Wm(`disabled`,!n.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,n.busy()?n.t().starting:n.t().submit,` `)}}var yt;var Pt;var Tt;var Rt;var me;var $e=f(()=>{Kr();Je$1();P();dk();lk();sk();Kr();yt=(a,e)=>e.id;Pt=`mx-focus min-w-0 rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Tt=`mx-focus mt-2 inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed border-ink-700 px-2.5 py-1 text-[12px] text-ink-300 hover:border-ink-500 hover:text-ink-100`,Rt=`mx-focus grid size-8 cursor-pointer place-items-center rounded text-ink-400 hover:text-danger`,me=class a{open=mj(!1);image=jc(``);started=pj();store=I(h$1);t=Lt$1(()=>ok().images.runDialog);common=Lt$1(()=>ok().common);field=Pt;addButton=Tt;removeButton=Rt;name=wt$1(``);autoRestart=wt$1(!1);knownVolumes=wt$1([]);knownNetworks=wt$1([]);network=wt$1(``);networkAlias=wt$1(``);ports=wt$1([]);volumes=wt$1([]);env=wt$1([]);problem=wt$1(null);busy=wt$1(!1);canSubmit=Lt$1(()=>!this.busy()&&this.image()!==``);selectableNetworks=Lt$1(()=>this.knownNetworks().filter(e=>e.name!==`bridge`));canAlias=Lt$1(()=>{let e=this.network();return e!==``&&this.knownNetworks().some(t=>t.name===e&&!t.builtIn)});constructor(){rf(()=>{this.open()&&(this.loadVolumes(),this.loadNetworks())})}async loadVolumes(){try{this.knownVolumes.set((await window.electron.volumes.list()).map(e=>e.name))}catch{this.knownVolumes.set([])}}async loadNetworks(){try{this.knownNetworks.set(await window.electron.networks.list())}catch{this.knownNetworks.set([])}}setNetwork(e){this.network.set(e),this.canAlias()||this.networkAlias.set(``)}addPort(){this.ports.update(e=>[...e,{host:``,container:``,protocol:`tcp`}])}addVolume(){this.volumes.update(e=>[...e,{source:``,target:``,readOnly:!1}])}addEnv(){this.env.update(e=>[...e,{key:``,value:``}])}removePort(e){this.ports.update(t=>t.filter((n,r)=>r!==e))}removeVolume(e){this.volumes.update(t=>t.filter((n,r)=>r!==e))}removeEnv(e){this.env.update(t=>t.filter((n,r)=>r!==e))}setPort(e,t){this.ports.update(n=>n.map((r,d)=>d===e?W(W({},r),t):r))}setVolume(e,t){this.volumes.update(n=>n.map((r,d)=>d===e?W(W({},r),t):r))}setEnv(e,t){this.env.update(n=>n.map((r,d)=>d===e?W(W({},r),t):r))}setEnvKey(e,t){let n=t.value,r=n.indexOf(`=`);if(r<=0){this.setEnv(e,{key:n});return}let d=n.slice(0,r),h=n.slice(r+1);this.setEnv(e,h===``?{key:d}:{key:d,value:h}),t.value=d,t.parentElement?.querySelector(`input[data-env-value="${String(e)}"]`)?.focus()}async submit(e){if(e.preventDefault(),!this.canSubmit())return;let t=this.collect();if(typeof t==`string`){this.problem.set(t);return}this.busy.set(!0),this.problem.set(null);try{let n=await window.electron.images.run(t);if(!n.ok){this.problem.set(n.problem);return}this.reset(),this.open.set(!1),this.started.emit(n.id),this.store.refresh()}catch(n){this.problem.set(eH(n))}finally{this.busy.set(!1)}}collect(){let e=this.t(),t=[];for(let P of this.ports()){let T=Number(P.container.trim());if(!Number.isInteger(T)||T<1||T>65535)return e.invalidContainerPort(P.container);let W=P.host.trim(),ae=W===``?null:Number(W);if(ae!==null&&(!Number.isInteger(ae)||ae<1||ae>65535))return e.invalidHostPort(P.host);t.push({hostPort:ae,containerPort:T,protocol:P.protocol})}let n=[];for(let P of this.volumes()){let T=P.source.trim(),W=P.target.trim();if(T===``||W===``)return e.volumeIncomplete;if(!W.startsWith(`/`))return e.notAbsolute(W);n.push({source:T,target:W,readOnly:P.readOnly})}let r=[];for(let P of this.env()){let T=P.key.trim();if(T===``)return e.envNameMissing;if(T.includes(`=`))return e.envNameWithEquals(T);r.push({key:T,value:P.value})}let d=this.name().trim(),h=this.network(),K=this.canAlias()?this.networkAlias().trim():``;return K!==``&&!/^[\w][\w.-]*$/.test(K)?e.invalidAlias(K):{image:this.image(),name:d===``?null:d,ports:t,volumes:n,env:r,network:h===``?null:h,networkAlias:K===``?null:K,restart:this.autoRestart()?`unless-stopped`:`no`}}reset(){this.name.set(``),this.autoRestart.set(!1),this.network.set(``),this.networkAlias.set(``),this.ports.set([]),this.volumes.set([]),this.env.set([]),this.problem.set(null)}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-run-dialog`]],inputs:{open:[1,`open`],image:[1,`image`]},outputs:{open:`openChange`,started:`started`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`shadow-2xl`],[1,`shrink-0`,`border-b`,`border-ink-800`,`px-5`,`pt-5`,`pb-4`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1.5`,`flex`,`items-center`,`gap-1.5`,`text-[13px]`,`text-ink-400`],[1,`rounded`,`bg-ink-800`,`px-1.5`,`py-0.5`,`font-mono`,`text-[12px]`,`text-ink-200`],[1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`submit`],[1,`min-h-0`,`flex-1`,`space-y-6`,`overflow-y-auto`,`px-5`,`py-5`],[1,`space-y-3`],[1,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`mt-0.5`,`text-[12px]`,`text-ink-500`],[3,`change`],[`value`,``,3,`selected`],[3,`value`,`selected`],[1,`mt-3`,`block`],[1,`mt-3`,`grid`,`grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)_7rem_2rem]`,`items-center`,`gap-x-2`,`gap-y-2`],[`type`,`button`,3,`click`],[`name`,`plus`,3,`size`],[1,`mt-3`,`grid`,`grid-cols-[minmax(0,2fr)_auto_minmax(0,3fr)_2rem]`,`items-center`,`gap-x-2`,`gap-y-2`],[1,`shrink-0`,`border-t`,`border-ink-800`,`px-5`,`py-3`],[`role`,`alert`,1,`mb-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`play`,3,`size`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[11px]`,`tracking-wide`,`text-ink-500`,`uppercase`],[`type`,`text`,`inputmode`,`numeric`,3,`input`,`placeholder`,`value`],[1,`text-ink-500`],[`type`,`text`,`placeholder`,`80`,`inputmode`,`numeric`,3,`input`,`value`],[`value`,`tcp`,3,`selected`],[`value`,`udp`,3,`selected`],[`name`,`trash`,3,`size`],[`id`,`run-dialog-volumes`],[3,`value`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`run-dialog-volumes`,3,`input`,`placeholder`,`value`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`flex`,`cursor-pointer`,`items-center`,`gap-1.5`,`whitespace-nowrap`,`text-[12px]`,`text-ink-400`,3,`title`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[`type`,`text`,`placeholder`,`TZ`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`type`,`text`,`placeholder`,`Europe/Amsterdam`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`]],template:function(t,n){t&1&&(Li(0,`div`,0),vg(`openChange`,function(d){return vS(n.open,d)||(n.open=d),d}),_m(1,Et,72,49,`ng-template`,1),Nc()),t&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Mt(a,e){if(a&1&&(Li(0,`span`,16),fS(1),Nc()),a&2){let t=HE();ec(),pg(t.t().refreshing)}}function Nt(a,e){if(a&1&&(Li(0,`p`,18),fS(1),Nc()),a&2){let t=HE();ec(),pg(t.t().updatesHint)}}function Vt(a,e){if(a&1){let t=RE();Li(0,`div`,19)(1,`span`,33),fS(2),Nc(),Li(3,`button`,34),Jm(`click`,function(){Od(t);return Ld(HE().askRemoveSelected())}),Gm(4,`app-icon`,35),fS(5),Nc()()}if(a&2){let t=HE();ec(2),pg(t.t().selected(t.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,t.common().remove,` `)}}function zt(a,e){if(a&1&&(Li(0,`span`,36),fS(1),Nc()),a&2){let t=e.$implicit;ag(`text-ink-500`,t.dangling)(`text-ink-100`,!t.dangling),Wm(`title`,t.repository),ec(),Ac(` `,t.repository,` `)}}function Ot(a,e){if(a&1&&(Li(0,`span`,39),Gm(1,`app-icon`,42),fS(2),Nc()),a&2){let t=HE(2);ec(),Wm(`size`,12),ec(),Ac(` `,t.t().badge.newer,` `)}}function Lt(a,e){if(a&1&&(Li(0,`span`,40),fS(1),Nc()),a&2){HE();let t=bS(0),n=HE();Wm(`title`,t?.problem??``),ec(),pg(n.t().badge.notInRegistry)}}function Bt(a,e){if(a&1&&(Li(0,`span`,41),Gm(1,`app-icon`,43),fS(2),Nc()),a&2){HE();let t=bS(0),n=HE();Wm(`title`,t?.problem??``),ec(),Wm(`size`,12),ec(),Ac(` `,n.t().badge.uncheckable,` `)}}function $t(a,e){if(a&1&&(bg(0),Li(1,`span`,37)(2,`span`,38),fS(3),Nc(),SE(4,Ot,3,2,`span`,39)(5,Lt,2,2,`span`,40)(6,Bt,3,3,`span`,41),Nc()),a&2){let t=e.$implicit,n=yS(HE().updateOf(t));ec(2),Wm(`title`,t.tag),ec(),pg(t.tag),ec(),kE(n?.state===`update`?4:n?.state===`unknown`?5:n?.state===`error`?6:-1)}}function Ut(a,e){if(a&1&&(Li(0,`span`,44),fS(1),Nc()),a&2){let t=e.$implicit;ec(),pg(t.shortId)}}function Ft(a,e){if(a&1&&(Li(0,`span`,45),fS(1),Nc()),a&2){let t=HE().$implicit,n=HE();ec(),pg(n.t().containerCount(t.inUseBy))}}function At(a,e){a&1&&(Li(0,`span`,46),fS(1,`—`),Nc())}function Wt(a,e){if(a&1&&SE(0,Ft,2,1,`span`,45)(1,At,2,0,`span`,46),a&2){let t=e.$implicit;kE(t.inUseBy>0?0:1)}}function jt(a,e){if(a&1&&(Li(0,`span`,47),fS(1),Nc()),a&2){let t=e.$implicit,n=HE();ec(),pg(n.ageOf(t.createdAt))}}function Ht(a,e){if(a&1&&(Li(0,`span`,48),fS(1),Nc()),a&2){let t=e.$implicit,n=HE();ec(),pg(n.sizeOf(t.sizeBytes))}}function Kt(a,e){if(a&1){let t=RE();Li(0,`div`,49)(1,`app-action-menu`,50),Jm(`picked`,function(r){let d=Od(t).$implicit;return Ld(HE().onRowMenu(r,d))}),Nc()()}if(a&2){let t=e.$implicit,n=HE();ec(),Wm(`label`,n.t().rowMenu(t.reference))(`items`,n.rowMenu(t))}}var Ue;f(()=>{Kr();ra();o();P();M();h();G();Le();J();oe();K();dk();x();Be();$e();sk();Kr();Ue=class a{store=I(h$1);router=I(fe);route=I(Q);preferences=I(p);t=Lt$1(()=>ok().images);common=Lt$1(()=>ok().common);columns=Lt$1(()=>{let e=this.t().columns;return[{key:`repository`,label:e.repository},{key:`tag`,label:e.tag,width:`230px`},{key:`shortId`,label:e.imageId,width:`120px`},{key:`inUse`,label:e.inUse,width:`110px`},{key:`created`,label:e.created,width:`150px`},{key:`size`,label:e.size,width:`100px`,align:`right`},{key:`actions`,label:e.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt$1(``);zoek=jc(void 0);starten=jc(void 0);lagen=jc(void 0);ophalen=jc(void 0);verwijder=jc(void 0);controleren=jc(void 0);onlyUnused=this.preferences.flag(`images.onlyUnused`);selected=wt$1(new Set);removal=wt$1(null);confirmOpen=wt$1(!1);pullOpen=wt$1(!1);pullPreset=wt$1(null);updates=this.store.updates;checkingUpdates=this.store.checkingUpdates;hasUpdates=Lt$1(()=>[...this.updates()?.values()??[]].some(e=>e.state===`update`));runOpen=wt$1(!1);runImage=wt$1(``);layersOpen=wt$1(!1);layersImage=wt$1(``);rows=Lt$1(()=>{let e=this.search().trim().toLowerCase(),t=this.onlyUnused();return this.store.images().filter(n=>t&&n.inUseBy>0?!1:e===``?!0:`${n.repository}:${n.tag} ${n.shortId}`.toLowerCase().includes(e))});totalSize=Lt$1(()=>d(this.store.totalBytes()));selectedRefs=Lt$1(()=>[...this.selected()]);trackKey=e=>e.reference;constructor(){rf(()=>{let e=this.zoek();e!==void 0&&Tg(()=>this.search.set(e))}),this.fromRoute(this.starten,`starten`,e=>{this.runImage.set(e),this.runOpen.set(!0)}),this.fromRoute(this.lagen,`lagen`,e=>{this.layersImage.set(e),this.layersOpen.set(!0)}),this.fromRoute(this.ophalen,`ophalen`,e=>this.openPull(e)),this.fromRoute(this.controleren,`controleren`,()=>this.checkUpdates()),rf(()=>{let e=this.verwijder(),t=this.store.images().find(n=>n.reference===e);e!==void 0&&t!==void 0&&Tg(()=>{this.askRemove(t),i(this.router,this.route,`verwijder`)})}),this.store.refresh()}fromRoute(e,t,n){rf(()=>{let r=e();r!==void 0&&Tg(()=>{n(r),i(this.router,this.route,t)})})}menuItems=Lt$1(()=>{let e=this.t().menu;return[{id:`pull`,label:e.pull,icon:`download`},{id:`check`,label:this.checkingUpdates()?e.checking:e.check,icon:`refresh`,disabled:this.checkingUpdates()},{id:`prune-dangling`,label:e.pruneDangling,icon:`broom`,separated:!0},{id:`prune-unused`,label:e.pruneUnused,icon:`broom`}]});onMenu(e){switch(e){case`pull`:this.openPull(null);break;case`check`:this.checkUpdates();break;case`prune-dangling`:this.askPrune(!1);break;case`prune-unused`:this.askPrune(!0);break}}checkUpdates(){this.store.checkUpdates()}openPull(e){this.pullPreset.set(e),this.pullOpen.set(!0)}pullClosed(e){this.pullOpen.set(e),e||(this.pullPreset.set(null),this.store.recheckIfChecked())}updateOf(e){return this.updates()?.get(e.reference)??null}sizeOf(e){return d(e)}ageOf(e){return N(e)}rowMenu(e){let t=this.pending().has(e.reference),n=this.t(),r=[];return this.updateOf(e)?.state===`update`&&r.push({id:`update`,label:n.rowUpdate,icon:`download`,disabled:t,hint:n.updateTitle(e.reference)}),r.push({id:`run`,label:n.rowRun,icon:`play`,disabled:t,hint:this.runLabelOf(e)},{id:`layers`,label:n.rowLayers,icon:`images`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:t,danger:!0,separated:!0}),r}onRowMenu(e,t){e===`update`?this.openPull(t.reference):e===`run`?this.askRun(t):e===`layers`?(this.layersImage.set(t.reference),this.layersOpen.set(!0)):this.askRemove(t)}askRun(e){this.runImage.set(e.reference),this.runOpen.set(!0)}goToContainer(e){this.router.navigate([`/containers`,e]).catch(()=>{})}runLabelOf(e){return e.dangling?this.t().runLabelDangling:this.t().runLabel(e.reference)}askRemove(e){let t=e.inUseBy>0,n=this.t().remove;this.removal.set({references:[e.reference],title:t?n.forceTitle:n.title,description:t?n.forceDescription(e.reference,e.inUseBy):n.description(e.reference),confirmLabel:t?n.forceConfirm:this.common().remove,force:t}),this.confirmOpen.set(!0)}askRemoveSelected(){let e=this.selectedRefs(),t=this.t().remove;this.removal.set({references:e,title:t.manyTitle,description:t.manyDescription(e.length),confirmLabel:this.common().remove,force:!1}),this.confirmOpen.set(!0)}askPrune(e){let t=this.t().prune;this.removal.set({references:[],title:e?t.allTitle:t.danglingTitle,description:e?t.allDescription:t.danglingDescription,confirmLabel:t.confirm,force:e}),this.confirmOpen.set(!0)}confirm(){let e=this.removal();e!==null&&(e.references.length===0?this.store.prune(e.force):(this.store.removeMany(e.references,e.force),this.selected.set(new Set)),this.removal.set(null))}removalTitle(){return this.removal()?.title??``}removalDescription(){return this.removal()?.description??``}removalConfirmLabel(){return this.removal()?.confirmLabel??this.common().remove}removalConfirmIcon(){return this.removal()?.references.length===0?`broom`:`trash`}static ɵfac=function(t){return new(t||a)};static ɵcmp=wc({type:a,selectors:[[`app-images-page`]],inputs:{zoek:[1,`zoek`],starten:[1,`starten`],lagen:[1,`lagen`],ophalen:[1,`ophalen`],verwijder:[1,`verwijder`],controleren:[1,`controleren`]},decls:44,vars:33,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-2`,`text-[12px]`,`text-ink-400`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`repository`],[`appCell`,`tag`],[`appCell`,`shortId`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[3,`openChange`,`open`,`preset`],[3,`openChange`,`started`,`open`,`image`],[3,`openChange`,`open`,`reference`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`block`,`truncate`,3,`title`],[1,`flex`,`min-w-0`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-300`,3,`title`],[`data-testid`,`update-badge`,1,`flex`,`shrink-0`,`items-center`,`gap-1`,`text-[11px]`,`text-warn`],[1,`shrink-0`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`flex`,`shrink-0`,`items-center`,`gap-1`,`text-[11px]`,`text-ink-500`,3,`title`],[`name`,`arrow-up`,3,`size`],[`name`,`warning`,3,`size`],[1,`font-mono`,`text-[12px]`,`text-ink-400`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(t,n){t&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Li(6,`div`,4)(7,`div`)(8,`div`,5),fS(9),Nc(),Li(10,`div`,6),fS(11),Nc()(),Li(12,`div`)(13,`div`,5),fS(14),Nc(),Li(15,`div`,6),fS(16),Nc()()()(),Li(17,`div`,7)(18,`app-action-menu`,8),Jm(`picked`,function(d){return n.onMenu(d)}),Nc()()(),Li(19,`div`,9)(20,`label`,10)(21,`span`,11),Gm(22,`app-icon`,12),Nc(),Li(23,`span`,13),fS(24),Nc(),Li(25,`input`,14),Jm(`input`,function(d){return n.search.set(d.target.value)}),Nc()(),Li(26,`app-filter-switch`,15),vg(`onChange`,function(d){return vS(n.onlyUnused,d)||(n.onlyUnused=d),d}),Nc(),SE(27,Mt,2,1,`span`,16),Nc(),Gm(28,`app-page-messages`,17),SE(29,Nt,2,1,`p`,18),SE(30,Vt,6,3,`div`,19),Nc(),Li(31,`div`,20)(32,`app-data-table`,21),vg(`selectedChange`,function(d){return vS(n.selected,d)||(n.selected=d),d}),_m(33,zt,2,6,`ng-template`,22)(34,$t,7,4,`ng-template`,23)(35,Ut,2,1,`ng-template`,24)(36,Wt,2,1,`ng-template`,25)(37,jt,2,1,`ng-template`,26)(38,Ht,2,1,`ng-template`,27)(39,Kt,2,2,`ng-template`,28),Nc()()(),Li(40,`app-confirm-dialog`,29),vg(`openChange`,function(d){return vS(n.confirmOpen,d)||(n.confirmOpen=d),d}),Jm(`confirmed`,function(){return n.confirm()}),Nc(),Li(41,`app-pull-dialog`,30),Jm(`openChange`,function(d){return n.pullClosed(d)}),Nc(),Li(42,`app-run-dialog`,31),vg(`openChange`,function(d){return vS(n.runOpen,d)||(n.runOpen=d),d}),Jm(`started`,function(d){return n.goToContainer(d)}),Nc(),Li(43,`app-layers-dialog`,32),vg(`openChange`,function(d){return vS(n.layersOpen,d)||(n.layersOpen=d),d}),Nc()),t&2&&(ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),pg(n.totalSize()),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),kE(n.loading()?27:-1),ec(),Wm(`problem`,n.problem()),ec(),kE(n.hasUpdates()?29:-1),ec(),kE(n.selected().size>0?30:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(8),hg(`open`,n.confirmOpen),Wm(`title`,n.removalTitle())(`description`,n.removalDescription())(`confirmLabel`,n.removalConfirmLabel())(`confirmIcon`,n.removalConfirmIcon()),ec(),Wm(`open`,n.pullOpen())(`preset`,n.pullPreset()),ec(),hg(`open`,n.runOpen),Wm(`image`,n.runImage()),ec(),hg(`open`,n.layersOpen),Wm(`reference`,n.layersImage()))},dependencies:[z,x$1,My,W$1,u,ce,me,pe,P$1,V],encapsulation:2})}})();export{Ue as ImagesPage};
@@ -1 +1 @@
1
- import{$n as sg,A as I,B as LD,En as jc,Fn as mj,G as M,I as Jm,Kn as pj,L as Km,Lt as Ws,P as Ir,Pt as W,R as Kr,Tn as jE,Tr as zr,W as Lt$1,Z as Ng,Zn as rf,_ as ES,_r as wt,a as Ar,at as Pr,br as yR,bt as T,h as Dj,ht as S,it as PS,jn as lf,ln as f,lr as ve$1,nn as br,t as $E,tr as sw,v as Eb,w as Gi,wt as Tg,yt as Se$1}from"./chunk-DanrBswj.js";import{I as ts,L as xo,N as sr,R as xt,T as jn$1,b as Yo,c as Ko,h as Tt,j as qo,n as Be$1,p as Se$2,u as Me,v as Wo,w as es,x as Zo,y as Xo,z as zo}from"./chunk-ChbnoZwy.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-BsvB6MmB.js";function F(e,o){let t=o;for(;t;){if(t===e)return!0;t=St(t)?t.host:t.parentNode}return!1}function En(e){return e.visibility===`hidden`||e.visibility===`collapse`}function wn(e,o){return!e.isConnected||!o||En(o)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():o.display!==`none`&&o.display!==`contents`}function Cn(e){let o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return St(t)?t.host:null}function He(e){for(let o of Array.from(e.children))if(L(o)===`summary`)return o;return null}function Tn(e,o){let t=He(o);return!!t&&(e===t||F(t,e))}function Lt(e){let o=e?L(e):``;return e!=null&&e.matches(bn)&&(o!==`summary`||e.parentElement!=null&&L(e.parentElement)===`details`&&He(e.parentElement)===e)&&(o!==`details`||He(e)==null)&&(o!==`input`||e.type!==`hidden`)}function Fn(e,o){let t=xn(e);return o?!!t&&t.display!==`none`:wn(e,t)}function On(e){if(!Lt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let o=e;o;o=Cn(o)){let t=o!==e,n=L(o)===`slot`;if(o.hasAttribute(`inert`)||t&&L(o)===`details`&&!o.open&&!Tn(e,o)||o.hasAttribute(`hidden`)||!n&&!Fn(o,t))return!1}return!0}function Rn(e){let o=e.tabIndex;if(o<0){let t=L(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return o}function Se(e){if(L(e)!==`input`)return null;let o=e;return o.type===`radio`&&o.name!==``?o:null}function Mn(e,o){let t=Se(e);if(!t)return!0;let n=o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form&&s.checked});return n?n===t:o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form})===t}function Bt(e){if(fe(e)&&L(e)===`slot`){let o=e.assignedElements({flatten:!0});if(o.length>0)return o}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ht(e,o){Bt(e).forEach(t=>{Lt(t)&&o.push(t),Ht(t,o)})}function In(e,o){let t=[],n=i=>{Bt(i).forEach(s=>{fe(s)&&s.matches(o)&&t.push(s),n(s)})};return n(e),t}function An(e){let o=[];return Ht(e,o),o.filter(On)}function ge(e){let o=An(e);return o.filter(t=>Rn(t)>=0&&Mn(t,o))}function me(e){return ge(e)}function Nn(e){let o=ge(e);return[o[0],o[o.length-1]]}function jt(e,o){let t=ge(e);if(t.length===0)return;let n=Xo(e.ownerDocument),i=n?t.indexOf(n):-1;return t[i===-1?o===1?0:t.length-1:i+o]}function je(e){let o=(e?.ownerDocument??document).body;return jt(o,1)??e}function Ge(e){let o=(e?.ownerDocument??document).body;return jt(o,-1)??e}function Pn(e){return e.composedPath?.()[0]??e.target}function kn(e,{select:o=!1,root:t}={}){let n=t??e[0]?.ownerDocument??document,i=Xo(n);for(let s of e)if(x(s,{select:o}),Xo(n)!==i)return!0}function Gt(e){return e instanceof(e?.ownerDocument?.defaultView?.HTMLElement??HTMLElement)&&e.matches(Sn)}function Ln(e){return e instanceof HTMLInputElement&&`select`in e}function x(e,{select:o=!1}={}){if(e&&e.focus){let n=Xo((`ownerDocument`in e?e.ownerDocument:void 0)??document);e.focus({preventScroll:!0}),e!==n&&Ln(e)&&o&&e.select()}}function Ve(e){let o=e.createElement(`span`);return o.setAttribute(`tabindex`,`0`),o.setAttribute(ve,``),Be$1.screenReader.voiceOver&&Be$1.engine.webkit?o.setAttribute(`role`,`button`):o.setAttribute(`aria-hidden`,`true`),Object.assign(o.style,Bn),o}function Nt(e){for(let o of ge(e))o.setAttribute(le,o.getAttribute(`tabindex`)??``),o.setAttribute(`tabindex`,`-1`)}function pe(e){In(e,`[${le}]`).forEach(o=>{let t=o.getAttribute(le);o.removeAttribute(le),t?o.setAttribute(`tabindex`,t):o.removeAttribute(`tabindex`)})}function te(e,o){let t=e.relatedTarget;return!t||!F(o,t)}function Vt(e,o={}){let t=o.enabled??(()=>!0),n=!1;rf(i=>{let s=e();if(!s||!t())return;let r=s.ownerDocument,u=d=>{!d.relatedTarget||!te(d,s)||(d.type===`focusin`?n&&(pe(s),n=!1):(Nt(s),n=!0))};te(new FocusEvent(`focusin`,{relatedTarget:r.activeElement}),s)&&(Nt(s),n=!0),s.addEventListener(`focusin`,u,!0),s.addEventListener(`focusout`,u,!0),i(()=>{s.removeEventListener(`focusin`,u,!0),s.removeEventListener(`focusout`,u,!0),n&&(pe(s),n=!1)})})}function _t(e){return{provide:De,useFactory:e}}function Hn(e){let o=Pt.get(e);return o||(o=wt([]),Pt.set(e,o)),o}function jn(e){let o=Hn(e);return{add(t){let n=o(),i=n[0];t!==i&&i?.pause();let s=kt(n,t);s.unshift(t),o.set(s)},remove(t){let i=kt(o(),t);o.set(i),o()[0]?.resume()}}}function kt(e,o){let t=[...e],n=t.indexOf(o);return n!==-1&&t.splice(n,1),t}var bn;var L;var yn;var fe;var St;var xn;var Le;var Be;var At;var Sn;var ve;var le;var Bn;var De;var Pt;var Do;var Gn;var Vn;var V;var be=f(()=>{Kr();Kr();sr();bn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`,L=e=>e.nodeName.toLowerCase(),yn=e=>e!=null&&typeof e.nodeType==`number`,fe=e=>{if(!yn(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement},St=e=>e!==null&&e.nodeType===11&&`host`in e,xn=e=>{let o=e.ownerDocument.defaultView;return o?o.getComputedStyle(e):null};Le=`focusScope.autoFocusOnMount`,Be=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0};Sn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;ve=`data-rdx-focus-guard`,le=`data-rdx-tabindex`,Bn={position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,border:`0`};De=new M(`RdxFocusScopeConfig`,{factory:()=>({trapped:wt(!1)})});Pt=new WeakMap;[Do,Gn]=xo(`FocusScope Context`,`utils/focus-scope`),Vn=()=>{let e=I(V);return{loop:e.loop,trapped:e.isTrapped}},V=(()=>{class e{constructor(){this.injector=I(Se$1),this.destroyRef=I(ve$1),this.elementRef=I(Pr),this.config=I(De),this.ownerDocument=this.elementRef.nativeElement.ownerDocument??document,this.loop=jc(!1,{transform:Dj}),this.trapped=jc(void 0,{transform:t=>t===void 0?void 0:Dj(t)}),this.isTrapped=Lt$1(()=>this.trapped()??this.config.trapped()),this.mountAutoFocus=pj(),this.unmountAutoFocus=pj(),this.lastFocusedElement=wt(null),this.focusScopesStack=jn(this.ownerDocument),this.focusScope={paused:wt(!1),pause:()=>this.focusScope.paused.set(!0),resume:()=>this.focusScope.paused.set(!1)},this.alive=!0,this.destroyRef.onDestroy(()=>{this.alive=!1}),LD(()=>{rf(t=>{let n=this.elementRef.nativeElement;if(this.isTrapped()){let i=d=>{if(this.focusScope.paused()||!n)return;let v=Pn(d);F(n,v)?this.lastFocusedElement.set(v):x(this.lastFocusedElement(),{select:!0})},s=d=>{if(this.focusScope.paused()||!n)return;let v=d.relatedTarget;v!==null&&(F(n,v)||x(this.lastFocusedElement(),{select:!0}))},r=()=>{F(n,this.lastFocusedElement())||x(n)},u=new MutationObserver(r);n&&u.observe(n,{childList:!0,subtree:!0}),this.ownerDocument.addEventListener(`focusin`,i),this.ownerDocument.addEventListener(`focusout`,s),t(()=>{this.ownerDocument.removeEventListener(`focusin`,i),this.ownerDocument.removeEventListener(`focusout`,s),u.disconnect()})}},{injector:this.injector}),rf(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=Xo(this.ownerDocument),s=F(n,i),r=d=>{this.alive&&this.mountAutoFocus.emit(d)};if(!s){let d=new CustomEvent(Le,At);n.addEventListener(Le,r),n.dispatchEvent(d),d.defaultPrevented||(kn(me(n),{select:!0,root:this.ownerDocument}),Xo(this.ownerDocument)===i&&x(n))}let u=d=>{this.alive&&this.unmountAutoFocus.emit(d)};n.addEventListener(Be,u),t(()=>{n.removeEventListener(Le,r);let d=new CustomEvent(Be,At);n.dispatchEvent(d),(this.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>{let O=this.config.returnFocus?.();O!==!1&&!d.defaultPrevented&&(O?x(O,{select:!0}):this.shouldPreserveMovedFocus()||x(i??this.ownerDocument.body,{select:!0})),n.removeEventListener(Be,u),this.focusScopesStack.remove(this.focusScope)})})},{injector:this.injector})})}shouldPreserveMovedFocus(){let t=Xo(this.ownerDocument);return!!t&&t!==this.ownerDocument.body&&!F(this.elementRef.nativeElement,t)}handleKeyDown(t){if(!this.loop()&&!this.isTrapped()||this.focusScope.paused())return;let n=t.key===`Tab`&&!t.altKey&&!t.ctrlKey&&!t.metaKey,i=Xo(this.ownerDocument);if(n&&i){let s=t.currentTarget,[r,u]=Nn(s);r&&u?!t.shiftKey&&i===u?(t.preventDefault(),this.loop()&&x(r,{select:!0})):t.shiftKey&&i===r&&(t.preventDefault(),this.loop()&&x(u,{select:!0})):i===s&&t.preventDefault()}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxFocusScope`,``]],hostAttrs:[`tabindex`,`-1`],hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.handleKeyDown(r)})},inputs:{loop:[1,`loop`],trapped:[1,`trapped`]},outputs:{mountAutoFocus:`mountAutoFocus`,unmountAutoFocus:`unmountAutoFocus`},features:[ES([Gn(Vn)])]})}}return e})()});function Yt(e){return e?e instanceof ShadowRoot?e.host:Yt(e.parentNode):null}function Kt(e,o){return o.map(t=>{if(e.contains(t))return t;let n=Yt(t);return n&&e.contains(n)?n:null}).filter(t=>t!=null)}function Ut(e){let o=new Set;return e.forEach(t=>{let n=t;for(;n&&!o.has(n);)o.add(n),n=n.parentNode}),o}function Xt(e,o,t){let n=[],i=s=>{!s||t.has(s)||Array.from(s.children).forEach(r=>{r.nodeName.toLowerCase()!==`script`&&(o.has(r)?i(r):n.push(r))})};return i(e),n}function qt(e,o={}){let{ariaHidden:t=!1,inert:n=!1,mark:i=!0}=o,s=e[0];if(!s)return()=>{};let r=s.ownerDocument.body,u=Kt(r,e),d=n?`inert`:t?`aria-hidden`:null,v=[],O=[];if(d){let E=ye[d],l=xe[d],D=Kt(r,Array.from(r.querySelectorAll(`[aria-live]`))),k=u.concat(D);Xt(r,Ut(k),new Set(k)).forEach(R=>{let S=R.getAttribute(d),b=S!==null&&S!==`false`,$=(E.get(R)??0)+1;E.set(R,$),v.push(R),$===1&&b&&l.add(R),b||R.setAttribute(d,d===`inert`?``:`true`)})}return i&&Xt(r,Ut(u),new Set(u)).forEach(l=>{let D=(ne.get(l)??0)+1;ne.set(l,D),O.push(l),D===1&&l.setAttribute(we,``)}),_e+=1,()=>{if(d){let E=ye[d],l=xe[d];v.forEach(D=>{let k=(E.get(D)??0)-1;E.set(D,k),k===0&&(l.has(D)||D.removeAttribute(d),l.delete(D))})}O.forEach(E=>{let l=(ne.get(E)??0)-1;ne.set(E,l),l===0&&E.removeAttribute(we)}),_e-=1,_e===0&&(ye.inert=new WeakMap,ye[`aria-hidden`]=new WeakMap,xe.inert=new WeakSet,xe[`aria-hidden`]=new WeakSet,ne=new WeakMap)}}function Ke(e){return e?typeof KeyboardEvent<`u`&&e instanceof KeyboardEvent?`keyboard`:`pointerType`in e&&typeof e.pointerType==`string`?e.pointerType||`mouse`:typeof MouseEvent<`u`&&e instanceof MouseEvent?e.detail===0?`keyboard`:`mouse`:``:null}function Ce(e){return typeof e==`function`?e():e}function Wt(e,o){let t=typeof e==`function`?e(o):e;return t===!1?!1:Ce(t)}function Kn(e,o){let t=typeof e==`function`?e(o):e;return typeof t==`boolean`?t:Ce(t)}function zt(e){return{provide:$t,useFactory:e}}function Ee(e){return e===void 0?void 0:Dj(e)}function Un(){return _t(()=>({trapped:wt(!1)}))}var we;var ye;var xe;var ne;var _e;var $t;var Te;var Fe=f(()=>{Me();Kr();Kr();sr();be();be();we=`data-rdx-floating-inert`,ye={inert:new WeakMap,"aria-hidden":new WeakMap},xe={inert:new WeakSet,"aria-hidden":new WeakSet},ne=new WeakMap,_e=0;$t=new M(`RdxFloatingFocusManagerConfig`);Te=(()=>{class e{constructor(){this.enabled=jc(void 0,{transform:Ee}),this.modal=jc(void 0,{transform:Ee}),this.inert=jc(void 0,{transform:Ee}),this.initialFocus=jc(void 0),this.returnFocus=jc(void 0),this.restoreFocus=jc(void 0),this.previousFocusableElement=jc(void 0),this.nextFocusableElement=jc(void 0),this.beforeContentFocusGuardRef=jc(void 0),this.externalTree=jc(void 0),this.getInsideElements=jc(void 0),this.closeOnFocusOut=jc(void 0,{transform:Ee}),this.focusOut=pj(),this.config=I($t,{optional:!0}),this.effectiveEnabled=Lt$1(()=>this.enabled()??this.config?.enabled?.()??!0),this.effectiveModal=Lt$1(()=>this.modal()??this.config?.modal?.()??!1),this.effectiveInert=Lt$1(()=>this.inert()??this.config?.inert?.()??this.effectiveModal()),this.effectiveCloseOnFocusOut=Lt$1(()=>this.closeOnFocusOut()??this.config?.closeOnFocusOut?.()??!0),this.effectiveInitialFocus=Lt$1(()=>this.initialFocus()!==void 0?this.initialFocus():this.config?.initialFocus?.()??null),this.effectiveReturnFocus=Lt$1(()=>this.returnFocus()!==void 0?this.returnFocus():this.config?.returnFocus?.()??!0),this.effectiveRestoreFocus=Lt$1(()=>this.restoreFocus()??this.config?.restoreFocus?.()??!1),this.effectivePreviousFocusableElement=Lt$1(()=>this.previousFocusableElement()!==void 0?this.previousFocusableElement():this.config?.previousFocusableElement?.()),this.effectiveNextFocusableElement=Lt$1(()=>this.nextFocusableElement()!==void 0?this.nextFocusableElement():this.config?.nextFocusableElement?.()),this.effectiveBeforeContentFocusGuardRef=Lt$1(()=>this.beforeContentFocusGuardRef()??this.config?.beforeContentFocusGuardRef?.()),this.effectiveExternalTree=Lt$1(()=>this.externalTree()??this.config?.externalTree?.()??null),this.insideElements=Lt$1(()=>((this.getInsideElements()??this.config?.getInsideElements)?.()??[]).filter(n=>n!=null)),this.effectiveOpenInteractionType=Lt$1(()=>this.config?.openInteractionType?.()??this._interactionType()),this.effectiveCloseInteractionType=Lt$1(()=>this.config?.closeInteractionType?.()??this._interactionType()),this.trapped=Lt$1(()=>this.effectiveEnabled()&&this.effectiveModal()),this.focusScopeConfig=I(De),this.host=I(Pr).nativeElement,this.isBrowser=Se$2(I(sw)),this.rootContext=I(xt,{optional:!0}),this.registration=I(Tt,{optional:!0}),this._interactionType=wt(``),this.interactionType=this._interactionType.asReadonly(),rf(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),rf(()=>{if(!Be$1.engine.webkit||this.isFloatingOpen())return;let t=this.rootContext?.floatingElement??this.host;if(!t)return;let n=Xo(t.ownerDocument);Gt(n)&&F(t,n)&&n.blur()}),this.trackInteractionType(),Vt(()=>this.rootContext?.floatingElement??this.host,{enabled:()=>!!this.rootContext&&this.effectiveEnabled()&&this.isFloatingOpen()&&!this.effectiveModal()}),this.wireCloseOnFocusOut(),this.wireRestoreFocus(),this.wirePortalFocusBridge(),this.wireFocusOrchestration(),this.wireInitialFocusFallback())}trackInteractionType(){let t=this.host.ownerDocument,n=s=>{this._interactionType.set(s.pointerType||`mouse`)},i=()=>this._interactionType.set(`keyboard`);t.addEventListener(`pointerdown`,n,!0),t.addEventListener(`keydown`,i,!0),I(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,n,!0),t.removeEventListener(`keydown`,i,!0)})}wireFocusOrchestration(){I(V).mountAutoFocus.subscribe(n=>{let i=this.effectiveOpenInteractionType(),s=Wt(this.effectiveInitialFocus(),i)??this.defaultInitialFocus(i);if(s===!1){n.preventDefault();return}s&&(n.preventDefault(),s.focus())})}resolveReturnTarget(){return this.resolveReturnFocusTarget()}resolveReturnFocusTarget(){let t=Kn(this.effectiveReturnFocus(),this.effectiveCloseInteractionType());if(t===!1||t===void 0)return!1;if(!(t===!0||t==null))return t}defaultInitialFocus(t){if(t!==`touch`)return null;let n=this.rootContext?.floatingElement??this.host;return n.hasAttribute(`tabindex`)||n.setAttribute(`tabindex`,`-1`),n}wireInitialFocusFallback(){rf(()=>{!this.effectiveEnabled()||!this.isFloatingOpen()||this.scheduleInitialFocusFallback()})}scheduleInitialFocusFallback(t=0){(this.host.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>this.applyInitialFocusFallback(t))}applyInitialFocusFallback(t){if(!this.effectiveEnabled()||!this.isFloatingOpen())return;let n=this.rootContext?.floatingElement??this.host,i=this.host.ownerDocument.activeElement;if(i instanceof HTMLElement&&n.contains(i))return;let s=this.effectiveOpenInteractionType(),r=Wt(this.effectiveInitialFocus(),s);if(r===!1)return;let u=r??this.defaultInitialFocus(s);u&&i!==u&&u.focus({preventScroll:!0}),t<2&&this.scheduleInitialFocusFallback(t+1)}wireCloseOnFocusOut(){let t=this.host.ownerDocument,n=!1,i=()=>{n=!0},s=()=>{n=!1},r=u=>{if(!this.effectiveEnabled()||!this.effectiveCloseOnFocusOut()||this.effectiveModal()||n)return;let d=u.relatedTarget;d&&(d instanceof Element&&d.hasAttribute(ve)||this.isRelatedTargetInside(d)||this.focusOut.emit(u))};t.addEventListener(`pointerdown`,i,!0),t.addEventListener(`pointerup`,s,!0),t.addEventListener(`focusout`,r,!0),I(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,i,!0),t.removeEventListener(`pointerup`,s,!0),t.removeEventListener(`focusout`,r,!0)})}wireRestoreFocus(){let t=this.host.ownerDocument,n=i=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen())return;let s=i.target;if(!s||!this.isRelatedTargetInside(s))return;(t.defaultView??globalThis).requestAnimationFrame(()=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen()||t.activeElement!==t.body)return;let u=this.rootContext?.floatingElement??this.host;x(this.effectiveRestoreFocus()===`popup`?u:me(u).at(-1)??u)})};t.addEventListener(`focusout`,n,!0),I(ve$1).onDestroy(()=>t.removeEventListener(`focusout`,n,!0))}wirePortalFocusBridge(){rf(t=>{if(!this.effectiveEnabled()||!this.isFloatingOpen()){this.setBeforeContentFocusGuardRef(null);return}let n=this.host.ownerDocument,i=this.host.parentNode;if(!i)return;let s=Ve(n),r=Ve(n);s.setAttribute(`data-type`,`inside`),r.setAttribute(`data-type`,`inside`),i.insertBefore(s,this.host),i.insertBefore(r,this.host.nextSibling),this.setBeforeContentFocusGuardRef(s);let u=v=>{if(this.effectiveModal()){x(this.getTabbableContent().at(-1)??this.host);return}if(this.isFromOutsideFocusGuard(v)){pe(this.rootContext?.floatingElement??this.host),x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(je(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectivePreviousFocusableElement())??this.defaultPreviousFocusable())},d=v=>{if(this.effectiveModal()){x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(Ge(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectiveNextFocusableElement())??this.defaultNextFocusable())};s.addEventListener(`focus`,u),r.addEventListener(`focus`,d),t(()=>{s.removeEventListener(`focus`,u),r.removeEventListener(`focus`,d),s.remove(),r.remove(),this.setBeforeContentFocusGuardRef(null)})})}avoidElements(){return[this.host,...this.insideElements()].filter(t=>t!=null)}isFloatingOpen(){return this.rootContext?.open()??!0}isRelatedTargetInside(t){if(F(this.rootContext?.floatingElement??this.host,t)||this.rootContext&&this.contextContains(this.rootContext,t)||this.insideElements().some(s=>s===t||F(s,t)))return!0;let i=this.currentFloatingNode();if(i){for(let s of i.tree.ancestors(i))if(s.context&&this.contextContains(s.context,t))return!0;for(let s of i.tree.children(i,{onlyOpen:!0}))if(s.context&&this.contextContains(s.context,t))return!0}return!1}contextContains(t,n){return t.floatingElement&&F(t.floatingElement,n)||t.referenceElement&&F(t.referenceElement,n)?!0:t.triggers.contains(n)}currentFloatingNode(){return(this.registration?.node()??null)||(this.effectiveExternalTree()?.all.find(i=>i.context===this.rootContext)??null)}getTabbableContent(){return me(this.rootContext?.floatingElement??this.host)}portalFocusContainer(){let t=this.rootContext?.floatingElement??this.host,n=t.parentElement;return n&&n!==t.ownerDocument.body?n:t}defaultPreviousFocusable(){return Ge(this.rootContext?.referenceElement??this.host)}defaultNextFocusable(){return je(this.rootContext?.referenceElement??this.host)}setBeforeContentFocusGuardRef(t){let n=this.effectiveBeforeContentFocusGuardRef();n&&(typeof n==`function`?n(t):n.set(t))}isFromOutsideFocusGuard(t){let n=t.relatedTarget;return n instanceof Element&&n.hasAttribute(ve)&&n.getAttribute(`data-type`)===`outside`}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxFloatingFocusManager`,``]],inputs:{enabled:[1,`enabled`],modal:[1,`modal`],inert:[1,`inert`],initialFocus:[1,`initialFocus`],returnFocus:[1,`returnFocus`],restoreFocus:[1,`restoreFocus`],previousFocusableElement:[1,`previousFocusableElement`],nextFocusableElement:[1,`nextFocusableElement`],beforeContentFocusGuardRef:[1,`beforeContentFocusGuardRef`],externalTree:[1,`externalTree`],getInsideElements:[1,`getInsideElements`],closeOnFocusOut:[1,`closeOnFocusOut`]},outputs:{focusOut:`focusOut`},exportAs:[`rdxFloatingFocusManager`],features:[ES([Un()]),jE([{directive:V,inputs:[`loop`,`loop`]}])]})}}return e})()});function qn(e){e||(e=I(ve$1));let o=new T(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Eb(o))}function Xe(e,o){return new Ue(e)}function qe(e){let o=yR(e);return new T(t=>{let n=o?.onDestroy(()=>t.complete()),i=e.subscribe(s=>t.next(s));return()=>{i.unsubscribe(),n?.()}})}var Ue;var Jt=f(()=>{Ws();lf();Ir();Ng();Ue=class{source;destroyed=!1;destroyRef=I(ve$1);constructor(o){this.source=o,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(o){if(this.destroyed)throw new S(953,!1);let t=this.source.pipe(qn(this.destroyRef)).subscribe({next:n=>o(n)});return{unsubscribe:()=>t.unsubscribe()}}}});function Oe(e){return e!==null&&typeof e.nodeType==`number`}function $n(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement}function $e(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.Element:e instanceof Element}function zn(e){return!(`button`in e)||e.button===0}function Qt(e){let o=e.ownerDocument;return e===o.documentElement||e===o.body}function ze(e){return e!==null&&e.nodeType===11&&`host`in e}function Jn(e){let o=e.parentNode;if(o)return o;let t=e.getRootNode();return ze(t)?t.host:null}function We(e){return e===null||e.nodeType===Node.DOCUMENT_NODE||ze(e)||$e(e)&&Qt(e)}function Qn(e){let o=e;for(;!We(o);){let t=Jn(o);if(We(t)||!$e(t))break;o=t}return o}function Zn(e,o){if(!$e(e)||Qt(e)||e.closest(`[data-rdx-internal-backdrop], [data-rdx-menu-internal-backdrop], [data-rdx-dialog-internal-backdrop]`))return!1;let t=e.getRootNode(),n=ze(t)?t:o.ownerDocument,i=Array.from(n.querySelectorAll(`[${we}]`));if(i.length===0)return!1;let s=o.floatingElement;if(s&&e.contains(s))return!1;let r=Qn(e);return i.every(u=>!r.contains(u))}function eo(e){let o=e.target;if(!$n(o)||`touches`in e||typeof e.offsetX!=`number`)return!1;let t=o.ownerDocument.defaultView;if(!t)return!1;let n=e,i=t.getComputedStyle(o),s=/auto|scroll/,r=We(o),u=r||s.test(i.overflowX),d=r||s.test(i.overflowY),v=u&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,O=d&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,E=i.direction===`rtl`,l=O&&(E?n.offsetX<=o.offsetWidth-o.clientWidth:n.offsetX>o.clientWidth),D=v&&n.offsetY>o.clientHeight;return l||D}function to(e,o){let t=Ye.get(e);return o===`escape-key`?t?t.escapeKey():!1:t?t.outsidePress():!0}var oe;var Wn;var Yn;var Ye;var Re;var Zt=f(()=>{Me();Kr();sr();Fe();oe=()=>!0,Wn=()=>!1,Yn=()=>`sloppy`;Ye=new WeakMap;Re=class{constructor(o,t,n={}){this.context=o,this.node=t,this.branches=new Set;let i=n.enabled??oe,s=n.escapeKey??oe,r=n.escapeKeyBubbles??Wn,u=n.outsidePress??oe,d=n.outsidePressBubbles??oe,v=n.outsidePressEvent??Yn,O=n.focusOutside??oe;this.active=()=>this.context.open()&&i(),Ye.set(this.context,{escapeKey:r,outsidePress:d});let E=I(ve$1);if(E.onDestroy(()=>Ye.delete(this.context)),!Se$2(I(sw)))return;let l=this.context.ownerDocument,D=l.defaultView??globalThis,k=(c,N)=>{n.onDismiss?.(c,N)},se=!1,R=!1,S=``,b=null,$,Me,_=()=>{D.clearTimeout($),D.clearTimeout(Me)},K=()=>{let c=v();return typeof c==`string`?c:c[S===`pen`||S===``?`mouse`:S]??`sloppy`},Qe=c=>{c.key!==`Escape`||!this.active()||!s()||se||!r()&&this.hasBlockingChild(`escape-key`)||(n.onEscapeKeyDown?.(c),c.defaultPrevented||k(`escape-key`,c),r()||c.stopPropagation())},Ze=()=>{se=!0},et=()=>{D.setTimeout(()=>{se=!1},Be$1.engine.webkit?5:0)},z=c=>{!this.active()||!zn(c)||this.isInside(c.target)||!u(c)||Zn(c.target,this.context)||eo(c)||!d()&&this.hasBlockingChild(`outside-press`)||(n.onPointerDownOutside?.(c),c.defaultPrevented||k(`outside-press`,c))},tt=c=>{R=this.isInside(c.target),S=c.pointerType||``},nt=()=>{R=!1},ot=c=>{K()===`sloppy`&&c.pointerType!==`touch`&&z(c)},it=c=>{if(K()===`intentional`){if(R){R=!1;return}z(c)}},st=c=>{if(S=`touch`,K()!==`sloppy`||!this.active()||this.isInside(c.target))return;let N=c.touches?.[0];N&&(_(),b={startX:N.clientX,startY:N.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$=D.setTimeout(()=>{b&&(b.dismissOnTouchEnd=!1,b.dismissOnMouseDown=!1)},1e3))},rt=c=>{if(!b||K()!==`sloppy`||this.isInside(c.target))return;let N=c.touches?.[0];if(!N)return;let ct=N.clientX-b.startX,lt=N.clientY-b.startY,ft=Math.sqrt(ct*ct+lt*lt);ft>5&&(b.dismissOnTouchEnd=!0),ft>10&&(z(c),_(),b=null)},at=c=>{if(!(!b||K()!==`sloppy`||this.isInside(c.target))){if(b.dismissOnTouchEnd){z(c),_(),b=null;return}D.clearTimeout(Me),Me=D.setTimeout(()=>{b=null},400)}},ut=c=>{if(!(!b||K()!==`sloppy`)){if(!b.dismissOnMouseDown){b=null,_();return}z(c),_(),b=null}},dt=c=>{Promise.resolve().then(()=>Promise.resolve()).then(()=>{!this.active()||!O()||this.isInside(c.target)||(n.onFocusOutside?.(c),c.defaultPrevented||k(`focus-outside`,c))})};l.addEventListener(`keydown`,Qe,{capture:!0}),l.addEventListener(`compositionstart`,Ze,{capture:!0}),l.addEventListener(`compositionend`,et,{capture:!0}),l.addEventListener(`focusin`,dt),l.addEventListener(`pointerdown`,tt,{capture:!0}),l.addEventListener(`pointercancel`,nt,{capture:!0});let hn=D.setTimeout(()=>{l.addEventListener(`pointerdown`,ot),l.addEventListener(`click`,it),l.addEventListener(`touchstart`,st,{capture:!0,passive:!0}),l.addEventListener(`touchmove`,rt,{capture:!0,passive:!0}),l.addEventListener(`touchend`,at,{capture:!0,passive:!0}),l.addEventListener(`mousedown`,ut,{capture:!0})},0);E.onDestroy(()=>{D.clearTimeout(hn),l.removeEventListener(`keydown`,Qe,{capture:!0}),l.removeEventListener(`compositionstart`,Ze,{capture:!0}),l.removeEventListener(`compositionend`,et,{capture:!0}),l.removeEventListener(`focusin`,dt),l.removeEventListener(`pointerdown`,tt,{capture:!0}),l.removeEventListener(`pointercancel`,nt,{capture:!0}),l.removeEventListener(`pointerdown`,ot),l.removeEventListener(`click`,it),l.removeEventListener(`touchstart`,st,{capture:!0}),l.removeEventListener(`touchmove`,rt,{capture:!0}),l.removeEventListener(`touchend`,at,{capture:!0}),l.removeEventListener(`mousedown`,ut,{capture:!0}),_()})}isInside(o){if(this.contextContains(this.context,o))return!0;let t=this.node();if(t){for(let n of t.tree.children(t,{onlyOpen:!0}))if(n.context&&this.contextContains(n.context,o))return!0}if(Oe(o)){for(let n of this.branches)if(n.contains(o))return!0}return!1}contextContains(o,t){let n=o.floatingElement;return n&&Oe(t)&&n.contains(t)?!0:o.triggers.contains(t)}hasBlockingChild(o){let t=this.node();return t?t.tree.children(t,{onlyOpen:!0}).some(n=>n.context!==null&&!to(n.context,o)):!1}}});function no(e,o){return e?typeof e==`string`?o?.querySelector(e)??null:e instanceof Pr?e.nativeElement??null:e instanceof HTMLElement?e:null:null}var en;var tn=f(()=>{Me();Kr();Kr();g();en=(()=>{class e{constructor(){this.viewContainerRef=I(Gi),this.templateRef=I(Ar),this.document=I(br,{optional:!0}),this.isBrowser=Se$2(I(sw)),this.container=jc(),this.keepMounted=jc(!1,{transform:Dj}),this.contextPresent=I(v).present,this.present=Lt$1(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=PS(this.container),this.elementContainer=Lt$1(()=>no(this._computedContainer(),this.document)??this.document?.body??null),this.mountedNodes=wt([]),this.viewRef=null;let t=new f$1({present:this.present,isBrowser:this.isBrowser,injector:I(Se$1),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});rf(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),I(ve$1).onDestroy(()=>t.dispose())}setContainer(t){this._computedContainer.set(t)}mountView(){this.viewRef=this.viewContainerRef.createEmbeddedView(this.templateRef);let t=this.viewRef.rootNodes;return this.mountedNodes.set(t),t.filter(n=>n instanceof HTMLElement)}destroyView(){this.viewRef?.destroy(),this.viewRef=null,this.mountedNodes.set([])}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,inputs:{container:[1,`container`],keepMounted:[1,`keepMounted`]}})}}return e})()});function sn(e){return{provide:on,useValue:W(W({},nn),e)}}function rn(e){return{contentId:e.contentId,titleId:e.titleId.asReadonly(),descriptionId:e.descriptionId.asReadonly(),isOpen:e.open,present:e.present,modal:e.effectiveModal,disablePointerDismissal:e.effectiveDisablePointerDismissal,role:e.role,transitionStatus:e.transitionStatus,trigger:e.trigger.asReadonly(),triggers:e.triggers.asReadonly(),payload:e.payload.asReadonly(),openInteractionType:e.openInteractionType.asReadonly(),closeInteractionType:e.closeInteractionType.asReadonly(),nested:e.nested,nestedDialogOpen:e.nestedDialogOpen,nestedOpenCount:e.nestedOpenCount.asReadonly(),setTitleId:o=>e.titleId.set(o),setDescriptionId:o=>e.descriptionId.set(o),registerTransitionElement:o=>e.registerTransitionElement(o),registerTrigger:(o,t,n)=>e.registerTrigger(o,t,n),setTriggerOpenInteractionType:o=>e.setTriggerOpenInteractionType(o),open:(o,t,n,i,s)=>e.show(o,t,n,i,s),close:(o,t)=>e.close(o,t),toggle:(o,t,n,i)=>e.toggle(o,t,n,i)}}var nn;var on;var ao;var uo;var B;var co;var ie;var an;var un;var dn;var lo;var fo;var cn;var ln;var fn;var pn;var Je=f(()=>{Kr();Kr();sr();sr();Fe();Fe();Jt();Zt();be();tn();g();nn={role:`dialog`,forceModal:!1,forcePointerDismissalDisabled:!1},on=new M(`RdxDialogVariant`,{factory:()=>nn});ao=e=>e===`trap-focus`?e:Dj(e),uo=()=>rn(I(ie)),[B,co]=xo(`RdxDialogRootContext`,`components/dialog`),ie=(()=>{class e{constructor(){this.destroyRef=I(ve$1),this.parentRoot=I(e,{optional:!0,skipSelf:!0}),this.variant=I(on),this.hasAppliedDefaultOpen=!1,this.hasAppliedDefaultTriggerId=!1,this.registeredTriggers=new Map,this.transition=ts(n=>this.emitOpenChangeComplete(n)),this.transitionStatus=this.transition.status,this.registerTransitionElement=this.transition.registerElement,this.open=mj(!1),this.defaultOpen=jc(!1,{transform:Dj}),this.triggerId=mj(null),this.defaultTriggerId=jc(null),this.modal=jc(!0,{transform:ao}),this.disablePointerDismissal=jc(!1,{transform:Dj}),this.handle=jc(),this.onOpenChange=pj(),this.onOpenChangeComplete=pj(),this.contentId=jn$1(`rdx-dialog-content-`),this.titleId=wt(void 0),this.descriptionId=wt(void 0),this.trigger=wt(void 0),this.triggers=wt([]),this.payload=wt(void 0),this.nestedOpenCount=wt(0),this.openInteractionType=wt(null),this.closeInteractionType=wt(null),this.preventUnmountOnClose=wt(!1),this.pendingTriggerOpenInteractionType=wt(null),this.present=Lt$1(()=>this.open()||this.preventUnmountOnClose()),this.nested=!!this.parentRoot,this.nestedDialogOpen=Lt$1(()=>this.nestedOpenCount()>0),this.role=this.variant.role,this.effectiveModal=Lt$1(()=>this.variant.forceModal?!0:this.modal()),this.effectiveDisablePointerDismissal=Lt$1(()=>this.disablePointerDismissal()||this.variant.forcePointerDismissalDisabled),this.floatingContext=Zo({ownerDocument:I(Pr).nativeElement.ownerDocument,open:()=>this.open()}),rf(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),rf(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();rf(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),rf(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),rf(()=>{let n=this.triggerId();Tg(()=>this.syncTriggerId(n))}),rf(()=>{let n=this.open();n!==t&&(t=n,Tg(()=>this.transition.start(n)))}),rf(n=>{this.open()&&this.parentRoot&&n(Tg(()=>this.parentRoot.openNestedChild()))}),rf(n=>{let i=this.handle();i&&n(Tg(()=>i.registerRoot(rn(this))))})}show(t=this.trigger(),n,i,s=`none`,r){let u=t!==void 0||n!==void 0;if(this.open()){t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n);return}let d=r??new Event(`dialog.open-change`),v=this.createOpenChangeEvent(!0,s,d,t,i??this.triggerId());this.onOpenChange.emit(v.payload),!v.eventDetails.isCanceled()&&(this.openInteractionType.set(this.consumeOpenInteractionType(r)),t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n),this.preventUnmountOnClose.set(!1),this.open.set(!0),this.floatingContext.events.emit(`openchange`,{open:!0,reason:s,event:v.eventDetails.event}))}close(t=`none`,n){if(!this.open())return;let i=n??new Event(`dialog.open-change`),s=this.createOpenChangeEvent(!1,t,i,this.trigger(),this.triggerId());this.onOpenChange.emit(s.payload),!s.eventDetails.isCanceled()&&(this.pendingTriggerOpenInteractionType.set(null),this.closeInteractionType.set(Ke(n)),this.preventUnmountOnClose.set(s.shouldPreventUnmountOnClose()),this.open.set(!1),this.floatingContext.events.emit(`openchange`,{open:!1,reason:t,event:s.eventDetails.event}))}toggle(t,n,i,s=new Event(`dialog.open-change`)){if(this.open()&&this.trigger()===n){this.close(`trigger-press`,s);return}this.show(n,i,t,`trigger-press`,s)}setTriggerOpenInteractionType(t){this.pendingTriggerOpenInteractionType.set(t)}registerTrigger(t,n,i){return this.registeredTriggers.set(t,{element:n,payload:i}),this.triggers.update(s=>s.includes(n)?s:[...s,n]),this.floatingContext.triggers.add(n),(this.triggerId()===t||!this.trigger()&&this.triggerId()===null)&&(this.trigger.set(n),this.payload.set(i())),()=>{if(this.registeredTriggers.get(t)?.element===n&&this.registeredTriggers.delete(t),this.triggers.update(s=>s.filter(r=>r!==n)),this.floatingContext.triggers.delete(n),!this.destroyRef.destroyed&&this.trigger()===n){let s=this.registeredTriggers.entries().next().value;this.triggerId()!==null&&this.triggerId.set(s?.[0]??null),this.trigger.set(s?.[1].element),this.payload.set(s?.[1].payload())}}}openNestedChild(){return this.nestedOpenCount.update(t=>t+1),()=>this.nestedOpenCount.update(t=>t-1)}syncTriggerId(t){if(t===null){this.trigger.set(void 0),this.payload.set(void 0);return}let n=this.registeredTriggers.get(t);n&&n.element!==this.trigger()&&(this.trigger.set(n.element),this.payload.set(n.payload()))}createOpenChangeEvent(t,n,i,s,r){let u=zo(n,i,s);return{eventDetails:u.eventDetails,shouldPreventUnmountOnClose:u.shouldPreventUnmountOnClose,payload:{open:t,triggerId:r,trigger:u.eventDetails.trigger,reason:u.eventDetails.reason,event:u.eventDetails.event,eventDetails:u.eventDetails}}}emitOpenChangeComplete(t){this.destroyRef.destroyed||this.onOpenChangeComplete.emit(t)}consumeOpenInteractionType(t){let n=this.pendingTriggerOpenInteractionType();return this.pendingTriggerOpenInteractionType.set(null),n??Ke(t)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxDialogRoot`,``]],inputs:{open:[1,`open`],defaultOpen:[1,`defaultOpen`],triggerId:[1,`triggerId`],defaultTriggerId:[1,`defaultTriggerId`],modal:[1,`modal`],disablePointerDismissal:[1,`disablePointerDismissal`],handle:[1,`handle`]},outputs:{open:`openChange`,triggerId:`triggerIdChange`,onOpenChange:`onOpenChange`,onOpenChangeComplete:`onOpenChangeComplete`},exportAs:[`rdxDialogRoot`],features:[ES([co(uo),Wo(),Yo(()=>I(e).floatingContext)])]})}}return e})();an=(()=>{class e{constructor(){this.rootContext=B(),this.forceRender=jc(!1,{transform:Dj});let t=I(xt,{optional:!0});if(t){let n=I(Pr).nativeElement;t.addFloatingElement(n),I(ve$1).onDestroy(()=>t.removeFloatingElement(n))}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxDialogBackdrop`,``]],hostAttrs:[`role`,`presentation`],hostVars:7,hostBindings:function(n,i){n&2&&(Km(`hidden`,i.rootContext.nested&&!i.forceRender()),zr(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0))},inputs:{forceRender:[1,`forceRender`]},exportAs:[`rdxDialogBackdrop`]})}}return e})(),un=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[`button`,`rdxDialogClose`,``]],hostAttrs:[`type`,`button`],hostBindings:function(n,i){n&1&&Jm(`click`,function(r){return i.rootContext.close(`close-press`,r)})},exportAs:[`rdxDialogClose`]})}}return e})(),dn=(()=>{class e{constructor(){this.rootContext=B(),this.id=jn$1(`rdx-dialog-description-`),this.rootContext.setDescriptionId(this.id),I(ve$1).onDestroy(()=>this.rootContext.setDescriptionId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxDialogDescription`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogDescription`]})}}return e})(),lo=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),fo=`data-rdx-dialog-internal-backdrop`,cn=(()=>{class e{constructor(){this.rootContext=B(),this.host=I(Pr).nativeElement,this.floatingContext=I(xt),this.registration=I(Tt,{optional:!0}),this.focusManager=I(Te),this.focusScope=I(V),this.escapeKeyDown=pj(),this.pointerDownOutside=pj(),this.focusOutside=pj(),this.interactOutside=pj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),es(Lt$1(()=>this.rootContext.modal()===!0&&this.rootContext.isOpen()),{referenceElement:()=>this.host});let t=this.rootContext.registerTransitionElement(this.host);I(ve$1).onDestroy(t);let n=I(Se$1);LD(()=>Ko(this.host,n,{marker:fo,isOpen:()=>this.rootContext.isOpen(),shouldRender:()=>this.rootContext.modal()===!0,cutout:()=>this.host.closest(`[rdxDialogViewport]`),passThrough:()=>this.host.closest(`[rdxDialogViewport]`)!==null})),new Re(this.floatingContext,()=>this.registration?.node()??null,{escapeKey:()=>!0,outsidePress:()=>this.isTopmost()&&!this.rootContext.disablePointerDismissal(),outsidePressEvent:()=>this.rootContext.modal()===!0?`intentional`:`sloppy`,focusOutside:()=>!1,onEscapeKeyDown:i=>this.escapeKeyDown.emit(i),onPointerDownOutside:i=>{this.pointerDownOutside.emit(i),this.interactOutside.emit(i)},onDismiss:(i,s)=>{this.rootContext.close(i===`escape-key`?`escape-key`:`outside-press`,s)}}),this.focusManager.focusOut.subscribe(i=>{this.focusOutside.emit(i),this.interactOutside.emit(i),i.defaultPrevented||this.rootContext.close(`focus-out`,i)})}isTopmost(){return this.rootContext.isOpen()&&!this.rootContext.nestedDialogOpen()}onKeyDown(t){lo.has(t.key)&&t.stopPropagation()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxDialogPopup`,``]],hostVars:13,hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Km(`id`,i.rootContext.contentId),zr(`role`,i.rootContext.role)(`aria-modal`,i.rootContext.modal()===!0?`true`:void 0)(`aria-describedby`,i.rootContext.descriptionId())(`aria-labelledby`,i.rootContext.titleId())(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`--%NS%nested-dialogs`,i.rootContext.nestedOpenCount()))},outputs:{escapeKeyDown:`escapeKeyDown`,pointerDownOutside:`pointerDownOutside`,focusOutside:`focusOutside`,interactOutside:`interactOutside`,openAutoFocus:`openAutoFocus`,closeAutoFocus:`closeAutoFocus`},exportAs:[`rdxDialogPopup`],features:[ES([zt(()=>{let t=B();return{modal:()=>t.modal()===!0||t.modal()===`trap-focus`,inert:()=>t.modal()===!0,enabled:()=>t.present(),restoreFocus:()=>`popup`,openInteractionType:()=>t.openInteractionType(),closeInteractionType:()=>t.closeInteractionType(),closeOnFocusOut:()=>!t.disablePointerDismissal()}})]),jE([qo,Te])]})}}return e})(),ln=(()=>{class e{constructor(){this.container=jc()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[ES([L$1(()=>({present:B().present}))]),jE([{directive:en,inputs:[`container`,`container`]}])]})}}return e})(),fn=(()=>{class e{constructor(){this.rootContext=B(),this.id=jn$1(`rdx-dialog-title-`),this.rootContext.setTitleId(this.id),I(ve$1).onDestroy(()=>this.rootContext.setTitleId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxDialogTitle`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogTitle`]})}}return e})(),pn=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxDialogViewport`,``]],hostAttrs:[`role`,`presentation`],hostVars:8,hostBindings:function(n,i){n&2&&(zr(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`pointer-events`,i.rootContext.isOpen()?null:`none`))},exportAs:[`rdxDialogViewport`]})}}return e})()});var Oi;var Ri;var Mi;var Ii;var Ai;var Ni;var Pi;var ki;var ho=f(()=>{Kr();Kr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxAlertDialogBackdrop`,``]],exportAs:[`rdxAlertDialogBackdrop`],features:[jE([an])]})}}return e})(),Ri=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[`button`,`rdxAlertDialogClose`,``]],exportAs:[`rdxAlertDialogClose`],features:[jE([un])]})}}return e})(),Mi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxAlertDialogDescription`,``]],exportAs:[`rdxAlertDialogDescription`],features:[jE([dn])]})}}return e})(),Ii=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxAlertDialogPopup`,``]],exportAs:[`rdxAlertDialogPopup`],features:[jE([{directive:cn,outputs:[`escapeKeyDown`,`escapeKeyDown`,`pointerDownOutside`,`pointerDownOutside`,`focusOutside`,`focusOutside`,`interactOutside`,`interactOutside`,`openAutoFocus`,`openAutoFocus`,`closeAutoFocus`,`closeAutoFocus`]}])]})}}return e})(),Ai=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[`ng-template`,`rdxAlertDialogPortal`,``]],exportAs:[`rdxAlertDialogPortal`],features:[jE([{directive:ln,inputs:[`container`,`container`]}])]})}}return e})(),Ni=(()=>{class e{constructor(){this.dialog=I(ie),this.open=this.dialog.open,this.triggerId=this.dialog.triggerId,this.payload=this.dialog.payload}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[ES([sn({role:`alertdialog`,forceModal:!0,forcePointerDismissalDisabled:!0})]),jE([{directive:ie,inputs:[`open`,`open`,`defaultOpen`,`defaultOpen`,`triggerId`,`triggerId`,`defaultTriggerId`,`defaultTriggerId`,`handle`,`handle`],outputs:[`openChange`,`openChange`,`triggerIdChange`,`triggerIdChange`,`onOpenChange`,`onOpenChange`,`onOpenChangeComplete`,`onOpenChangeComplete`]}])]})}}return e})(),Pi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxAlertDialogTitle`,``]],exportAs:[`rdxAlertDialogTitle`],features:[jE([fn])]})}}return e})(),ki=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$E({type:e,selectors:[[``,`rdxAlertDialogViewport`,``]],exportAs:[`rdxAlertDialogViewport`],features:[jE([pn])]})}}return e})()});export{pn as _,Ni as a,Ri as c,dn as d,fn as f,ln as g,ki as h,Mi as i,an as l,ie as m,Ii as n,Oi as o,ho as p,Je as r,Pi as s,Ai as t,cn as u,un as v};
1
+ import{$n as sg,A as I,En as jc,Fn as mj,G as M,I as Jm,Kn as pj,L as Km,Lt as Ws,P as Ir,Pt as W,R as Kr,Tn as jC,Tr as zr,W as Lt$1,Z as Ng,Zn as rf,_ as Dj,_r as wt,a as Ar,at as Pr,br as yR,bt as T,d as CS,f as Cb,ht as S,it as PS,jn as lf,ln as f,lr as ve$1,nn as br,t as $C,tr as sw,w as Gi,wt as Tg,yt as Se$1,z as LD}from"./chunk-CQJfJJJO.js";import{I as ts,L as xo,N as sr,R as xt,T as jn$1,b as Yo,c as Ko,h as Tt,j as qo,n as Be$1,p as Se$2,u as Me,v as Wo,w as es,x as Zo,y as Xo,z as zo}from"./chunk-DNfHCIbw.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-Ou7gEgt7.js";function F(e,o){let t=o;for(;t;){if(t===e)return!0;t=St(t)?t.host:t.parentNode}return!1}function En(e){return e.visibility===`hidden`||e.visibility===`collapse`}function wn(e,o){return!e.isConnected||!o||En(o)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():o.display!==`none`&&o.display!==`contents`}function Cn(e){let o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return St(t)?t.host:null}function He(e){for(let o of Array.from(e.children))if(L(o)===`summary`)return o;return null}function Tn(e,o){let t=He(o);return!!t&&(e===t||F(t,e))}function Lt(e){let o=e?L(e):``;return e!=null&&e.matches(bn)&&(o!==`summary`||e.parentElement!=null&&L(e.parentElement)===`details`&&He(e.parentElement)===e)&&(o!==`details`||He(e)==null)&&(o!==`input`||e.type!==`hidden`)}function Fn(e,o){let t=xn(e);return o?!!t&&t.display!==`none`:wn(e,t)}function On(e){if(!Lt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let o=e;o;o=Cn(o)){let t=o!==e,n=L(o)===`slot`;if(o.hasAttribute(`inert`)||t&&L(o)===`details`&&!o.open&&!Tn(e,o)||o.hasAttribute(`hidden`)||!n&&!Fn(o,t))return!1}return!0}function Rn(e){let o=e.tabIndex;if(o<0){let t=L(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return o}function Se(e){if(L(e)!==`input`)return null;let o=e;return o.type===`radio`&&o.name!==``?o:null}function Mn(e,o){let t=Se(e);if(!t)return!0;let n=o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form&&s.checked});return n?n===t:o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form})===t}function Bt(e){if(fe(e)&&L(e)===`slot`){let o=e.assignedElements({flatten:!0});if(o.length>0)return o}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ht(e,o){Bt(e).forEach(t=>{Lt(t)&&o.push(t),Ht(t,o)})}function In(e,o){let t=[],n=i=>{Bt(i).forEach(s=>{fe(s)&&s.matches(o)&&t.push(s),n(s)})};return n(e),t}function An(e){let o=[];return Ht(e,o),o.filter(On)}function ge(e){let o=An(e);return o.filter(t=>Rn(t)>=0&&Mn(t,o))}function me(e){return ge(e)}function Nn(e){let o=ge(e);return[o[0],o[o.length-1]]}function jt(e,o){let t=ge(e);if(t.length===0)return;let n=Xo(e.ownerDocument),i=n?t.indexOf(n):-1;return t[i===-1?o===1?0:t.length-1:i+o]}function je(e){let o=(e?.ownerDocument??document).body;return jt(o,1)??e}function Ge(e){let o=(e?.ownerDocument??document).body;return jt(o,-1)??e}function Pn(e){return e.composedPath?.()[0]??e.target}function kn(e,{select:o=!1,root:t}={}){let n=t??e[0]?.ownerDocument??document,i=Xo(n);for(let s of e)if(x(s,{select:o}),Xo(n)!==i)return!0}function Gt(e){return e instanceof(e?.ownerDocument?.defaultView?.HTMLElement??HTMLElement)&&e.matches(Sn)}function Ln(e){return e instanceof HTMLInputElement&&`select`in e}function x(e,{select:o=!1}={}){if(e&&e.focus){let n=Xo((`ownerDocument`in e?e.ownerDocument:void 0)??document);e.focus({preventScroll:!0}),e!==n&&Ln(e)&&o&&e.select()}}function Ve(e){let o=e.createElement(`span`);return o.setAttribute(`tabindex`,`0`),o.setAttribute(ve,``),Be$1.screenReader.voiceOver&&Be$1.engine.webkit?o.setAttribute(`role`,`button`):o.setAttribute(`aria-hidden`,`true`),Object.assign(o.style,Bn),o}function Nt(e){for(let o of ge(e))o.setAttribute(le,o.getAttribute(`tabindex`)??``),o.setAttribute(`tabindex`,`-1`)}function pe(e){In(e,`[${le}]`).forEach(o=>{let t=o.getAttribute(le);o.removeAttribute(le),t?o.setAttribute(`tabindex`,t):o.removeAttribute(`tabindex`)})}function te(e,o){let t=e.relatedTarget;return!t||!F(o,t)}function Vt(e,o={}){let t=o.enabled??(()=>!0),n=!1;rf(i=>{let s=e();if(!s||!t())return;let r=s.ownerDocument,u=d=>{!d.relatedTarget||!te(d,s)||(d.type===`focusin`?n&&(pe(s),n=!1):(Nt(s),n=!0))};te(new FocusEvent(`focusin`,{relatedTarget:r.activeElement}),s)&&(Nt(s),n=!0),s.addEventListener(`focusin`,u,!0),s.addEventListener(`focusout`,u,!0),i(()=>{s.removeEventListener(`focusin`,u,!0),s.removeEventListener(`focusout`,u,!0),n&&(pe(s),n=!1)})})}function _t(e){return{provide:De,useFactory:e}}function Hn(e){let o=Pt.get(e);return o||(o=wt([]),Pt.set(e,o)),o}function jn(e){let o=Hn(e);return{add(t){let n=o(),i=n[0];t!==i&&i?.pause();let s=kt(n,t);s.unshift(t),o.set(s)},remove(t){let i=kt(o(),t);o.set(i),o()[0]?.resume()}}}function kt(e,o){let t=[...e],n=t.indexOf(o);return n!==-1&&t.splice(n,1),t}var bn;var L;var yn;var fe;var St;var xn;var Le;var Be;var At;var Sn;var ve;var le;var Bn;var De;var Pt;var Do;var Gn;var Vn;var V;var be=f(()=>{Kr();Kr();sr();bn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`,L=e=>e.nodeName.toLowerCase(),yn=e=>e!=null&&typeof e.nodeType==`number`,fe=e=>{if(!yn(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement},St=e=>e!==null&&e.nodeType===11&&`host`in e,xn=e=>{let o=e.ownerDocument.defaultView;return o?o.getComputedStyle(e):null};Le=`focusScope.autoFocusOnMount`,Be=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0};Sn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;ve=`data-rdx-focus-guard`,le=`data-rdx-tabindex`,Bn={position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,border:`0`};De=new M(`RdxFocusScopeConfig`,{factory:()=>({trapped:wt(!1)})});Pt=new WeakMap;[Do,Gn]=xo(`FocusScope Context`,`utils/focus-scope`),Vn=()=>{let e=I(V);return{loop:e.loop,trapped:e.isTrapped}},V=(()=>{class e{constructor(){this.injector=I(Se$1),this.destroyRef=I(ve$1),this.elementRef=I(Pr),this.config=I(De),this.ownerDocument=this.elementRef.nativeElement.ownerDocument??document,this.loop=jc(!1,{transform:Dj}),this.trapped=jc(void 0,{transform:t=>t===void 0?void 0:Dj(t)}),this.isTrapped=Lt$1(()=>this.trapped()??this.config.trapped()),this.mountAutoFocus=pj(),this.unmountAutoFocus=pj(),this.lastFocusedElement=wt(null),this.focusScopesStack=jn(this.ownerDocument),this.focusScope={paused:wt(!1),pause:()=>this.focusScope.paused.set(!0),resume:()=>this.focusScope.paused.set(!1)},this.alive=!0,this.destroyRef.onDestroy(()=>{this.alive=!1}),LD(()=>{rf(t=>{let n=this.elementRef.nativeElement;if(this.isTrapped()){let i=d=>{if(this.focusScope.paused()||!n)return;let v=Pn(d);F(n,v)?this.lastFocusedElement.set(v):x(this.lastFocusedElement(),{select:!0})},s=d=>{if(this.focusScope.paused()||!n)return;let v=d.relatedTarget;v!==null&&(F(n,v)||x(this.lastFocusedElement(),{select:!0}))},r=()=>{F(n,this.lastFocusedElement())||x(n)},u=new MutationObserver(r);n&&u.observe(n,{childList:!0,subtree:!0}),this.ownerDocument.addEventListener(`focusin`,i),this.ownerDocument.addEventListener(`focusout`,s),t(()=>{this.ownerDocument.removeEventListener(`focusin`,i),this.ownerDocument.removeEventListener(`focusout`,s),u.disconnect()})}},{injector:this.injector}),rf(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=Xo(this.ownerDocument),s=F(n,i),r=d=>{this.alive&&this.mountAutoFocus.emit(d)};if(!s){let d=new CustomEvent(Le,At);n.addEventListener(Le,r),n.dispatchEvent(d),d.defaultPrevented||(kn(me(n),{select:!0,root:this.ownerDocument}),Xo(this.ownerDocument)===i&&x(n))}let u=d=>{this.alive&&this.unmountAutoFocus.emit(d)};n.addEventListener(Be,u),t(()=>{n.removeEventListener(Le,r);let d=new CustomEvent(Be,At);n.dispatchEvent(d),(this.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>{let O=this.config.returnFocus?.();O!==!1&&!d.defaultPrevented&&(O?x(O,{select:!0}):this.shouldPreserveMovedFocus()||x(i??this.ownerDocument.body,{select:!0})),n.removeEventListener(Be,u),this.focusScopesStack.remove(this.focusScope)})})},{injector:this.injector})})}shouldPreserveMovedFocus(){let t=Xo(this.ownerDocument);return!!t&&t!==this.ownerDocument.body&&!F(this.elementRef.nativeElement,t)}handleKeyDown(t){if(!this.loop()&&!this.isTrapped()||this.focusScope.paused())return;let n=t.key===`Tab`&&!t.altKey&&!t.ctrlKey&&!t.metaKey,i=Xo(this.ownerDocument);if(n&&i){let s=t.currentTarget,[r,u]=Nn(s);r&&u?!t.shiftKey&&i===u?(t.preventDefault(),this.loop()&&x(r,{select:!0})):t.shiftKey&&i===r&&(t.preventDefault(),this.loop()&&x(u,{select:!0})):i===s&&t.preventDefault()}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxFocusScope`,``]],hostAttrs:[`tabindex`,`-1`],hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.handleKeyDown(r)})},inputs:{loop:[1,`loop`],trapped:[1,`trapped`]},outputs:{mountAutoFocus:`mountAutoFocus`,unmountAutoFocus:`unmountAutoFocus`},features:[CS([Gn(Vn)])]})}}return e})()});function Yt(e){return e?e instanceof ShadowRoot?e.host:Yt(e.parentNode):null}function Kt(e,o){return o.map(t=>{if(e.contains(t))return t;let n=Yt(t);return n&&e.contains(n)?n:null}).filter(t=>t!=null)}function Ut(e){let o=new Set;return e.forEach(t=>{let n=t;for(;n&&!o.has(n);)o.add(n),n=n.parentNode}),o}function Xt(e,o,t){let n=[],i=s=>{!s||t.has(s)||Array.from(s.children).forEach(r=>{r.nodeName.toLowerCase()!==`script`&&(o.has(r)?i(r):n.push(r))})};return i(e),n}function qt(e,o={}){let{ariaHidden:t=!1,inert:n=!1,mark:i=!0}=o,s=e[0];if(!s)return()=>{};let r=s.ownerDocument.body,u=Kt(r,e),d=n?`inert`:t?`aria-hidden`:null,v=[],O=[];if(d){let E=ye[d],l=xe[d],D=Kt(r,Array.from(r.querySelectorAll(`[aria-live]`))),k=u.concat(D);Xt(r,Ut(k),new Set(k)).forEach(R=>{let S=R.getAttribute(d),b=S!==null&&S!==`false`,$=(E.get(R)??0)+1;E.set(R,$),v.push(R),$===1&&b&&l.add(R),b||R.setAttribute(d,d===`inert`?``:`true`)})}return i&&Xt(r,Ut(u),new Set(u)).forEach(l=>{let D=(ne.get(l)??0)+1;ne.set(l,D),O.push(l),D===1&&l.setAttribute(we,``)}),_e+=1,()=>{if(d){let E=ye[d],l=xe[d];v.forEach(D=>{let k=(E.get(D)??0)-1;E.set(D,k),k===0&&(l.has(D)||D.removeAttribute(d),l.delete(D))})}O.forEach(E=>{let l=(ne.get(E)??0)-1;ne.set(E,l),l===0&&E.removeAttribute(we)}),_e-=1,_e===0&&(ye.inert=new WeakMap,ye[`aria-hidden`]=new WeakMap,xe.inert=new WeakSet,xe[`aria-hidden`]=new WeakSet,ne=new WeakMap)}}function Ke(e){return e?typeof KeyboardEvent<`u`&&e instanceof KeyboardEvent?`keyboard`:`pointerType`in e&&typeof e.pointerType==`string`?e.pointerType||`mouse`:typeof MouseEvent<`u`&&e instanceof MouseEvent?e.detail===0?`keyboard`:`mouse`:``:null}function Ce(e){return typeof e==`function`?e():e}function Wt(e,o){let t=typeof e==`function`?e(o):e;return t===!1?!1:Ce(t)}function Kn(e,o){let t=typeof e==`function`?e(o):e;return typeof t==`boolean`?t:Ce(t)}function zt(e){return{provide:$t,useFactory:e}}function Ee(e){return e===void 0?void 0:Dj(e)}function Un(){return _t(()=>({trapped:wt(!1)}))}var we;var ye;var xe;var ne;var _e;var $t;var Te;var Fe=f(()=>{Me();Kr();Kr();sr();be();be();we=`data-rdx-floating-inert`,ye={inert:new WeakMap,"aria-hidden":new WeakMap},xe={inert:new WeakSet,"aria-hidden":new WeakSet},ne=new WeakMap,_e=0;$t=new M(`RdxFloatingFocusManagerConfig`);Te=(()=>{class e{constructor(){this.enabled=jc(void 0,{transform:Ee}),this.modal=jc(void 0,{transform:Ee}),this.inert=jc(void 0,{transform:Ee}),this.initialFocus=jc(void 0),this.returnFocus=jc(void 0),this.restoreFocus=jc(void 0),this.previousFocusableElement=jc(void 0),this.nextFocusableElement=jc(void 0),this.beforeContentFocusGuardRef=jc(void 0),this.externalTree=jc(void 0),this.getInsideElements=jc(void 0),this.closeOnFocusOut=jc(void 0,{transform:Ee}),this.focusOut=pj(),this.config=I($t,{optional:!0}),this.effectiveEnabled=Lt$1(()=>this.enabled()??this.config?.enabled?.()??!0),this.effectiveModal=Lt$1(()=>this.modal()??this.config?.modal?.()??!1),this.effectiveInert=Lt$1(()=>this.inert()??this.config?.inert?.()??this.effectiveModal()),this.effectiveCloseOnFocusOut=Lt$1(()=>this.closeOnFocusOut()??this.config?.closeOnFocusOut?.()??!0),this.effectiveInitialFocus=Lt$1(()=>this.initialFocus()!==void 0?this.initialFocus():this.config?.initialFocus?.()??null),this.effectiveReturnFocus=Lt$1(()=>this.returnFocus()!==void 0?this.returnFocus():this.config?.returnFocus?.()??!0),this.effectiveRestoreFocus=Lt$1(()=>this.restoreFocus()??this.config?.restoreFocus?.()??!1),this.effectivePreviousFocusableElement=Lt$1(()=>this.previousFocusableElement()!==void 0?this.previousFocusableElement():this.config?.previousFocusableElement?.()),this.effectiveNextFocusableElement=Lt$1(()=>this.nextFocusableElement()!==void 0?this.nextFocusableElement():this.config?.nextFocusableElement?.()),this.effectiveBeforeContentFocusGuardRef=Lt$1(()=>this.beforeContentFocusGuardRef()??this.config?.beforeContentFocusGuardRef?.()),this.effectiveExternalTree=Lt$1(()=>this.externalTree()??this.config?.externalTree?.()??null),this.insideElements=Lt$1(()=>((this.getInsideElements()??this.config?.getInsideElements)?.()??[]).filter(n=>n!=null)),this.effectiveOpenInteractionType=Lt$1(()=>this.config?.openInteractionType?.()??this._interactionType()),this.effectiveCloseInteractionType=Lt$1(()=>this.config?.closeInteractionType?.()??this._interactionType()),this.trapped=Lt$1(()=>this.effectiveEnabled()&&this.effectiveModal()),this.focusScopeConfig=I(De),this.host=I(Pr).nativeElement,this.isBrowser=Se$2(I(sw)),this.rootContext=I(xt,{optional:!0}),this.registration=I(Tt,{optional:!0}),this._interactionType=wt(``),this.interactionType=this._interactionType.asReadonly(),rf(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),rf(()=>{if(!Be$1.engine.webkit||this.isFloatingOpen())return;let t=this.rootContext?.floatingElement??this.host;if(!t)return;let n=Xo(t.ownerDocument);Gt(n)&&F(t,n)&&n.blur()}),this.trackInteractionType(),Vt(()=>this.rootContext?.floatingElement??this.host,{enabled:()=>!!this.rootContext&&this.effectiveEnabled()&&this.isFloatingOpen()&&!this.effectiveModal()}),this.wireCloseOnFocusOut(),this.wireRestoreFocus(),this.wirePortalFocusBridge(),this.wireFocusOrchestration(),this.wireInitialFocusFallback())}trackInteractionType(){let t=this.host.ownerDocument,n=s=>{this._interactionType.set(s.pointerType||`mouse`)},i=()=>this._interactionType.set(`keyboard`);t.addEventListener(`pointerdown`,n,!0),t.addEventListener(`keydown`,i,!0),I(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,n,!0),t.removeEventListener(`keydown`,i,!0)})}wireFocusOrchestration(){I(V).mountAutoFocus.subscribe(n=>{let i=this.effectiveOpenInteractionType(),s=Wt(this.effectiveInitialFocus(),i)??this.defaultInitialFocus(i);if(s===!1){n.preventDefault();return}s&&(n.preventDefault(),s.focus())})}resolveReturnTarget(){return this.resolveReturnFocusTarget()}resolveReturnFocusTarget(){let t=Kn(this.effectiveReturnFocus(),this.effectiveCloseInteractionType());if(t===!1||t===void 0)return!1;if(!(t===!0||t==null))return t}defaultInitialFocus(t){if(t!==`touch`)return null;let n=this.rootContext?.floatingElement??this.host;return n.hasAttribute(`tabindex`)||n.setAttribute(`tabindex`,`-1`),n}wireInitialFocusFallback(){rf(()=>{!this.effectiveEnabled()||!this.isFloatingOpen()||this.scheduleInitialFocusFallback()})}scheduleInitialFocusFallback(t=0){(this.host.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>this.applyInitialFocusFallback(t))}applyInitialFocusFallback(t){if(!this.effectiveEnabled()||!this.isFloatingOpen())return;let n=this.rootContext?.floatingElement??this.host,i=this.host.ownerDocument.activeElement;if(i instanceof HTMLElement&&n.contains(i))return;let s=this.effectiveOpenInteractionType(),r=Wt(this.effectiveInitialFocus(),s);if(r===!1)return;let u=r??this.defaultInitialFocus(s);u&&i!==u&&u.focus({preventScroll:!0}),t<2&&this.scheduleInitialFocusFallback(t+1)}wireCloseOnFocusOut(){let t=this.host.ownerDocument,n=!1,i=()=>{n=!0},s=()=>{n=!1},r=u=>{if(!this.effectiveEnabled()||!this.effectiveCloseOnFocusOut()||this.effectiveModal()||n)return;let d=u.relatedTarget;d&&(d instanceof Element&&d.hasAttribute(ve)||this.isRelatedTargetInside(d)||this.focusOut.emit(u))};t.addEventListener(`pointerdown`,i,!0),t.addEventListener(`pointerup`,s,!0),t.addEventListener(`focusout`,r,!0),I(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,i,!0),t.removeEventListener(`pointerup`,s,!0),t.removeEventListener(`focusout`,r,!0)})}wireRestoreFocus(){let t=this.host.ownerDocument,n=i=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen())return;let s=i.target;if(!s||!this.isRelatedTargetInside(s))return;(t.defaultView??globalThis).requestAnimationFrame(()=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen()||t.activeElement!==t.body)return;let u=this.rootContext?.floatingElement??this.host;x(this.effectiveRestoreFocus()===`popup`?u:me(u).at(-1)??u)})};t.addEventListener(`focusout`,n,!0),I(ve$1).onDestroy(()=>t.removeEventListener(`focusout`,n,!0))}wirePortalFocusBridge(){rf(t=>{if(!this.effectiveEnabled()||!this.isFloatingOpen()){this.setBeforeContentFocusGuardRef(null);return}let n=this.host.ownerDocument,i=this.host.parentNode;if(!i)return;let s=Ve(n),r=Ve(n);s.setAttribute(`data-type`,`inside`),r.setAttribute(`data-type`,`inside`),i.insertBefore(s,this.host),i.insertBefore(r,this.host.nextSibling),this.setBeforeContentFocusGuardRef(s);let u=v=>{if(this.effectiveModal()){x(this.getTabbableContent().at(-1)??this.host);return}if(this.isFromOutsideFocusGuard(v)){pe(this.rootContext?.floatingElement??this.host),x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(je(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectivePreviousFocusableElement())??this.defaultPreviousFocusable())},d=v=>{if(this.effectiveModal()){x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(Ge(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectiveNextFocusableElement())??this.defaultNextFocusable())};s.addEventListener(`focus`,u),r.addEventListener(`focus`,d),t(()=>{s.removeEventListener(`focus`,u),r.removeEventListener(`focus`,d),s.remove(),r.remove(),this.setBeforeContentFocusGuardRef(null)})})}avoidElements(){return[this.host,...this.insideElements()].filter(t=>t!=null)}isFloatingOpen(){return this.rootContext?.open()??!0}isRelatedTargetInside(t){if(F(this.rootContext?.floatingElement??this.host,t)||this.rootContext&&this.contextContains(this.rootContext,t)||this.insideElements().some(s=>s===t||F(s,t)))return!0;let i=this.currentFloatingNode();if(i){for(let s of i.tree.ancestors(i))if(s.context&&this.contextContains(s.context,t))return!0;for(let s of i.tree.children(i,{onlyOpen:!0}))if(s.context&&this.contextContains(s.context,t))return!0}return!1}contextContains(t,n){return t.floatingElement&&F(t.floatingElement,n)||t.referenceElement&&F(t.referenceElement,n)?!0:t.triggers.contains(n)}currentFloatingNode(){return(this.registration?.node()??null)||(this.effectiveExternalTree()?.all.find(i=>i.context===this.rootContext)??null)}getTabbableContent(){return me(this.rootContext?.floatingElement??this.host)}portalFocusContainer(){let t=this.rootContext?.floatingElement??this.host,n=t.parentElement;return n&&n!==t.ownerDocument.body?n:t}defaultPreviousFocusable(){return Ge(this.rootContext?.referenceElement??this.host)}defaultNextFocusable(){return je(this.rootContext?.referenceElement??this.host)}setBeforeContentFocusGuardRef(t){let n=this.effectiveBeforeContentFocusGuardRef();n&&(typeof n==`function`?n(t):n.set(t))}isFromOutsideFocusGuard(t){let n=t.relatedTarget;return n instanceof Element&&n.hasAttribute(ve)&&n.getAttribute(`data-type`)===`outside`}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxFloatingFocusManager`,``]],inputs:{enabled:[1,`enabled`],modal:[1,`modal`],inert:[1,`inert`],initialFocus:[1,`initialFocus`],returnFocus:[1,`returnFocus`],restoreFocus:[1,`restoreFocus`],previousFocusableElement:[1,`previousFocusableElement`],nextFocusableElement:[1,`nextFocusableElement`],beforeContentFocusGuardRef:[1,`beforeContentFocusGuardRef`],externalTree:[1,`externalTree`],getInsideElements:[1,`getInsideElements`],closeOnFocusOut:[1,`closeOnFocusOut`]},outputs:{focusOut:`focusOut`},exportAs:[`rdxFloatingFocusManager`],features:[CS([Un()]),jC([{directive:V,inputs:[`loop`,`loop`]}])]})}}return e})()});function qn(e){e||(e=I(ve$1));let o=new T(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Cb(o))}function Xe(e,o){return new Ue(e)}function qe(e){let o=yR(e);return new T(t=>{let n=o?.onDestroy(()=>t.complete()),i=e.subscribe(s=>t.next(s));return()=>{i.unsubscribe(),n?.()}})}var Ue;var Jt=f(()=>{Ws();lf();Ir();Ng();Ue=class{source;destroyed=!1;destroyRef=I(ve$1);constructor(o){this.source=o,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(o){if(this.destroyed)throw new S(953,!1);let t=this.source.pipe(qn(this.destroyRef)).subscribe({next:n=>o(n)});return{unsubscribe:()=>t.unsubscribe()}}}});function Oe(e){return e!==null&&typeof e.nodeType==`number`}function $n(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement}function $e(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.Element:e instanceof Element}function zn(e){return!(`button`in e)||e.button===0}function Qt(e){let o=e.ownerDocument;return e===o.documentElement||e===o.body}function ze(e){return e!==null&&e.nodeType===11&&`host`in e}function Jn(e){let o=e.parentNode;if(o)return o;let t=e.getRootNode();return ze(t)?t.host:null}function We(e){return e===null||e.nodeType===Node.DOCUMENT_NODE||ze(e)||$e(e)&&Qt(e)}function Qn(e){let o=e;for(;!We(o);){let t=Jn(o);if(We(t)||!$e(t))break;o=t}return o}function Zn(e,o){if(!$e(e)||Qt(e)||e.closest(`[data-rdx-internal-backdrop], [data-rdx-menu-internal-backdrop], [data-rdx-dialog-internal-backdrop]`))return!1;let t=e.getRootNode(),n=ze(t)?t:o.ownerDocument,i=Array.from(n.querySelectorAll(`[${we}]`));if(i.length===0)return!1;let s=o.floatingElement;if(s&&e.contains(s))return!1;let r=Qn(e);return i.every(u=>!r.contains(u))}function eo(e){let o=e.target;if(!$n(o)||`touches`in e||typeof e.offsetX!=`number`)return!1;let t=o.ownerDocument.defaultView;if(!t)return!1;let n=e,i=t.getComputedStyle(o),s=/auto|scroll/,r=We(o),u=r||s.test(i.overflowX),d=r||s.test(i.overflowY),v=u&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,O=d&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,E=i.direction===`rtl`,l=O&&(E?n.offsetX<=o.offsetWidth-o.clientWidth:n.offsetX>o.clientWidth),D=v&&n.offsetY>o.clientHeight;return l||D}function to(e,o){let t=Ye.get(e);return o===`escape-key`?t?t.escapeKey():!1:t?t.outsidePress():!0}var oe;var Wn;var Yn;var Ye;var Re;var Zt=f(()=>{Me();Kr();sr();Fe();oe=()=>!0,Wn=()=>!1,Yn=()=>`sloppy`;Ye=new WeakMap;Re=class{constructor(o,t,n={}){this.context=o,this.node=t,this.branches=new Set;let i=n.enabled??oe,s=n.escapeKey??oe,r=n.escapeKeyBubbles??Wn,u=n.outsidePress??oe,d=n.outsidePressBubbles??oe,v=n.outsidePressEvent??Yn,O=n.focusOutside??oe;this.active=()=>this.context.open()&&i(),Ye.set(this.context,{escapeKey:r,outsidePress:d});let E=I(ve$1);if(E.onDestroy(()=>Ye.delete(this.context)),!Se$2(I(sw)))return;let l=this.context.ownerDocument,D=l.defaultView??globalThis,k=(c,N)=>{n.onDismiss?.(c,N)},se=!1,R=!1,S=``,b=null,$,Me,_=()=>{D.clearTimeout($),D.clearTimeout(Me)},K=()=>{let c=v();return typeof c==`string`?c:c[S===`pen`||S===``?`mouse`:S]??`sloppy`},Qe=c=>{c.key!==`Escape`||!this.active()||!s()||se||!r()&&this.hasBlockingChild(`escape-key`)||(n.onEscapeKeyDown?.(c),c.defaultPrevented||k(`escape-key`,c),r()||c.stopPropagation())},Ze=()=>{se=!0},et=()=>{D.setTimeout(()=>{se=!1},Be$1.engine.webkit?5:0)},z=c=>{!this.active()||!zn(c)||this.isInside(c.target)||!u(c)||Zn(c.target,this.context)||eo(c)||!d()&&this.hasBlockingChild(`outside-press`)||(n.onPointerDownOutside?.(c),c.defaultPrevented||k(`outside-press`,c))},tt=c=>{R=this.isInside(c.target),S=c.pointerType||``},nt=()=>{R=!1},ot=c=>{K()===`sloppy`&&c.pointerType!==`touch`&&z(c)},it=c=>{if(K()===`intentional`){if(R){R=!1;return}z(c)}},st=c=>{if(S=`touch`,K()!==`sloppy`||!this.active()||this.isInside(c.target))return;let N=c.touches?.[0];N&&(_(),b={startX:N.clientX,startY:N.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$=D.setTimeout(()=>{b&&(b.dismissOnTouchEnd=!1,b.dismissOnMouseDown=!1)},1e3))},rt=c=>{if(!b||K()!==`sloppy`||this.isInside(c.target))return;let N=c.touches?.[0];if(!N)return;let ct=N.clientX-b.startX,lt=N.clientY-b.startY,ft=Math.sqrt(ct*ct+lt*lt);ft>5&&(b.dismissOnTouchEnd=!0),ft>10&&(z(c),_(),b=null)},at=c=>{if(!(!b||K()!==`sloppy`||this.isInside(c.target))){if(b.dismissOnTouchEnd){z(c),_(),b=null;return}D.clearTimeout(Me),Me=D.setTimeout(()=>{b=null},400)}},ut=c=>{if(!(!b||K()!==`sloppy`)){if(!b.dismissOnMouseDown){b=null,_();return}z(c),_(),b=null}},dt=c=>{Promise.resolve().then(()=>Promise.resolve()).then(()=>{!this.active()||!O()||this.isInside(c.target)||(n.onFocusOutside?.(c),c.defaultPrevented||k(`focus-outside`,c))})};l.addEventListener(`keydown`,Qe,{capture:!0}),l.addEventListener(`compositionstart`,Ze,{capture:!0}),l.addEventListener(`compositionend`,et,{capture:!0}),l.addEventListener(`focusin`,dt),l.addEventListener(`pointerdown`,tt,{capture:!0}),l.addEventListener(`pointercancel`,nt,{capture:!0});let hn=D.setTimeout(()=>{l.addEventListener(`pointerdown`,ot),l.addEventListener(`click`,it),l.addEventListener(`touchstart`,st,{capture:!0,passive:!0}),l.addEventListener(`touchmove`,rt,{capture:!0,passive:!0}),l.addEventListener(`touchend`,at,{capture:!0,passive:!0}),l.addEventListener(`mousedown`,ut,{capture:!0})},0);E.onDestroy(()=>{D.clearTimeout(hn),l.removeEventListener(`keydown`,Qe,{capture:!0}),l.removeEventListener(`compositionstart`,Ze,{capture:!0}),l.removeEventListener(`compositionend`,et,{capture:!0}),l.removeEventListener(`focusin`,dt),l.removeEventListener(`pointerdown`,tt,{capture:!0}),l.removeEventListener(`pointercancel`,nt,{capture:!0}),l.removeEventListener(`pointerdown`,ot),l.removeEventListener(`click`,it),l.removeEventListener(`touchstart`,st,{capture:!0}),l.removeEventListener(`touchmove`,rt,{capture:!0}),l.removeEventListener(`touchend`,at,{capture:!0}),l.removeEventListener(`mousedown`,ut,{capture:!0}),_()})}isInside(o){if(this.contextContains(this.context,o))return!0;let t=this.node();if(t){for(let n of t.tree.children(t,{onlyOpen:!0}))if(n.context&&this.contextContains(n.context,o))return!0}if(Oe(o)){for(let n of this.branches)if(n.contains(o))return!0}return!1}contextContains(o,t){let n=o.floatingElement;return n&&Oe(t)&&n.contains(t)?!0:o.triggers.contains(t)}hasBlockingChild(o){let t=this.node();return t?t.tree.children(t,{onlyOpen:!0}).some(n=>n.context!==null&&!to(n.context,o)):!1}}});function no(e,o){return e?typeof e==`string`?o?.querySelector(e)??null:e instanceof Pr?e.nativeElement??null:e instanceof HTMLElement?e:null:null}var en;var tn=f(()=>{Me();Kr();Kr();g();en=(()=>{class e{constructor(){this.viewContainerRef=I(Gi),this.templateRef=I(Ar),this.document=I(br,{optional:!0}),this.isBrowser=Se$2(I(sw)),this.container=jc(),this.keepMounted=jc(!1,{transform:Dj}),this.contextPresent=I(v).present,this.present=Lt$1(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=PS(this.container),this.elementContainer=Lt$1(()=>no(this._computedContainer(),this.document)??this.document?.body??null),this.mountedNodes=wt([]),this.viewRef=null;let t=new f$1({present:this.present,isBrowser:this.isBrowser,injector:I(Se$1),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});rf(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),I(ve$1).onDestroy(()=>t.dispose())}setContainer(t){this._computedContainer.set(t)}mountView(){this.viewRef=this.viewContainerRef.createEmbeddedView(this.templateRef);let t=this.viewRef.rootNodes;return this.mountedNodes.set(t),t.filter(n=>n instanceof HTMLElement)}destroyView(){this.viewRef?.destroy(),this.viewRef=null,this.mountedNodes.set([])}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,inputs:{container:[1,`container`],keepMounted:[1,`keepMounted`]}})}}return e})()});function sn(e){return{provide:on,useValue:W(W({},nn),e)}}function rn(e){return{contentId:e.contentId,titleId:e.titleId.asReadonly(),descriptionId:e.descriptionId.asReadonly(),isOpen:e.open,present:e.present,modal:e.effectiveModal,disablePointerDismissal:e.effectiveDisablePointerDismissal,role:e.role,transitionStatus:e.transitionStatus,trigger:e.trigger.asReadonly(),triggers:e.triggers.asReadonly(),payload:e.payload.asReadonly(),openInteractionType:e.openInteractionType.asReadonly(),closeInteractionType:e.closeInteractionType.asReadonly(),nested:e.nested,nestedDialogOpen:e.nestedDialogOpen,nestedOpenCount:e.nestedOpenCount.asReadonly(),setTitleId:o=>e.titleId.set(o),setDescriptionId:o=>e.descriptionId.set(o),registerTransitionElement:o=>e.registerTransitionElement(o),registerTrigger:(o,t,n)=>e.registerTrigger(o,t,n),setTriggerOpenInteractionType:o=>e.setTriggerOpenInteractionType(o),open:(o,t,n,i,s)=>e.show(o,t,n,i,s),close:(o,t)=>e.close(o,t),toggle:(o,t,n,i)=>e.toggle(o,t,n,i)}}var nn;var on;var ao;var uo;var B;var co;var ie;var an;var un;var dn;var lo;var fo;var cn;var ln;var fn;var pn;var Je=f(()=>{Kr();Kr();sr();sr();Fe();Fe();Jt();Zt();be();tn();g();nn={role:`dialog`,forceModal:!1,forcePointerDismissalDisabled:!1},on=new M(`RdxDialogVariant`,{factory:()=>nn});ao=e=>e===`trap-focus`?e:Dj(e),uo=()=>rn(I(ie)),[B,co]=xo(`RdxDialogRootContext`,`components/dialog`),ie=(()=>{class e{constructor(){this.destroyRef=I(ve$1),this.parentRoot=I(e,{optional:!0,skipSelf:!0}),this.variant=I(on),this.hasAppliedDefaultOpen=!1,this.hasAppliedDefaultTriggerId=!1,this.registeredTriggers=new Map,this.transition=ts(n=>this.emitOpenChangeComplete(n)),this.transitionStatus=this.transition.status,this.registerTransitionElement=this.transition.registerElement,this.open=mj(!1),this.defaultOpen=jc(!1,{transform:Dj}),this.triggerId=mj(null),this.defaultTriggerId=jc(null),this.modal=jc(!0,{transform:ao}),this.disablePointerDismissal=jc(!1,{transform:Dj}),this.handle=jc(),this.onOpenChange=pj(),this.onOpenChangeComplete=pj(),this.contentId=jn$1(`rdx-dialog-content-`),this.titleId=wt(void 0),this.descriptionId=wt(void 0),this.trigger=wt(void 0),this.triggers=wt([]),this.payload=wt(void 0),this.nestedOpenCount=wt(0),this.openInteractionType=wt(null),this.closeInteractionType=wt(null),this.preventUnmountOnClose=wt(!1),this.pendingTriggerOpenInteractionType=wt(null),this.present=Lt$1(()=>this.open()||this.preventUnmountOnClose()),this.nested=!!this.parentRoot,this.nestedDialogOpen=Lt$1(()=>this.nestedOpenCount()>0),this.role=this.variant.role,this.effectiveModal=Lt$1(()=>this.variant.forceModal?!0:this.modal()),this.effectiveDisablePointerDismissal=Lt$1(()=>this.disablePointerDismissal()||this.variant.forcePointerDismissalDisabled),this.floatingContext=Zo({ownerDocument:I(Pr).nativeElement.ownerDocument,open:()=>this.open()}),rf(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),rf(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();rf(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),rf(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),rf(()=>{let n=this.triggerId();Tg(()=>this.syncTriggerId(n))}),rf(()=>{let n=this.open();n!==t&&(t=n,Tg(()=>this.transition.start(n)))}),rf(n=>{this.open()&&this.parentRoot&&n(Tg(()=>this.parentRoot.openNestedChild()))}),rf(n=>{let i=this.handle();i&&n(Tg(()=>i.registerRoot(rn(this))))})}show(t=this.trigger(),n,i,s=`none`,r){let u=t!==void 0||n!==void 0;if(this.open()){t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n);return}let d=r??new Event(`dialog.open-change`),v=this.createOpenChangeEvent(!0,s,d,t,i??this.triggerId());this.onOpenChange.emit(v.payload),!v.eventDetails.isCanceled()&&(this.openInteractionType.set(this.consumeOpenInteractionType(r)),t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n),this.preventUnmountOnClose.set(!1),this.open.set(!0),this.floatingContext.events.emit(`openchange`,{open:!0,reason:s,event:v.eventDetails.event}))}close(t=`none`,n){if(!this.open())return;let i=n??new Event(`dialog.open-change`),s=this.createOpenChangeEvent(!1,t,i,this.trigger(),this.triggerId());this.onOpenChange.emit(s.payload),!s.eventDetails.isCanceled()&&(this.pendingTriggerOpenInteractionType.set(null),this.closeInteractionType.set(Ke(n)),this.preventUnmountOnClose.set(s.shouldPreventUnmountOnClose()),this.open.set(!1),this.floatingContext.events.emit(`openchange`,{open:!1,reason:t,event:s.eventDetails.event}))}toggle(t,n,i,s=new Event(`dialog.open-change`)){if(this.open()&&this.trigger()===n){this.close(`trigger-press`,s);return}this.show(n,i,t,`trigger-press`,s)}setTriggerOpenInteractionType(t){this.pendingTriggerOpenInteractionType.set(t)}registerTrigger(t,n,i){return this.registeredTriggers.set(t,{element:n,payload:i}),this.triggers.update(s=>s.includes(n)?s:[...s,n]),this.floatingContext.triggers.add(n),(this.triggerId()===t||!this.trigger()&&this.triggerId()===null)&&(this.trigger.set(n),this.payload.set(i())),()=>{if(this.registeredTriggers.get(t)?.element===n&&this.registeredTriggers.delete(t),this.triggers.update(s=>s.filter(r=>r!==n)),this.floatingContext.triggers.delete(n),!this.destroyRef.destroyed&&this.trigger()===n){let s=this.registeredTriggers.entries().next().value;this.triggerId()!==null&&this.triggerId.set(s?.[0]??null),this.trigger.set(s?.[1].element),this.payload.set(s?.[1].payload())}}}openNestedChild(){return this.nestedOpenCount.update(t=>t+1),()=>this.nestedOpenCount.update(t=>t-1)}syncTriggerId(t){if(t===null){this.trigger.set(void 0),this.payload.set(void 0);return}let n=this.registeredTriggers.get(t);n&&n.element!==this.trigger()&&(this.trigger.set(n.element),this.payload.set(n.payload()))}createOpenChangeEvent(t,n,i,s,r){let u=zo(n,i,s);return{eventDetails:u.eventDetails,shouldPreventUnmountOnClose:u.shouldPreventUnmountOnClose,payload:{open:t,triggerId:r,trigger:u.eventDetails.trigger,reason:u.eventDetails.reason,event:u.eventDetails.event,eventDetails:u.eventDetails}}}emitOpenChangeComplete(t){this.destroyRef.destroyed||this.onOpenChangeComplete.emit(t)}consumeOpenInteractionType(t){let n=this.pendingTriggerOpenInteractionType();return this.pendingTriggerOpenInteractionType.set(null),n??Ke(t)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxDialogRoot`,``]],inputs:{open:[1,`open`],defaultOpen:[1,`defaultOpen`],triggerId:[1,`triggerId`],defaultTriggerId:[1,`defaultTriggerId`],modal:[1,`modal`],disablePointerDismissal:[1,`disablePointerDismissal`],handle:[1,`handle`]},outputs:{open:`openChange`,triggerId:`triggerIdChange`,onOpenChange:`onOpenChange`,onOpenChangeComplete:`onOpenChangeComplete`},exportAs:[`rdxDialogRoot`],features:[CS([co(uo),Wo(),Yo(()=>I(e).floatingContext)])]})}}return e})();an=(()=>{class e{constructor(){this.rootContext=B(),this.forceRender=jc(!1,{transform:Dj});let t=I(xt,{optional:!0});if(t){let n=I(Pr).nativeElement;t.addFloatingElement(n),I(ve$1).onDestroy(()=>t.removeFloatingElement(n))}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxDialogBackdrop`,``]],hostAttrs:[`role`,`presentation`],hostVars:7,hostBindings:function(n,i){n&2&&(Km(`hidden`,i.rootContext.nested&&!i.forceRender()),zr(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0))},inputs:{forceRender:[1,`forceRender`]},exportAs:[`rdxDialogBackdrop`]})}}return e})(),un=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[`button`,`rdxDialogClose`,``]],hostAttrs:[`type`,`button`],hostBindings:function(n,i){n&1&&Jm(`click`,function(r){return i.rootContext.close(`close-press`,r)})},exportAs:[`rdxDialogClose`]})}}return e})(),dn=(()=>{class e{constructor(){this.rootContext=B(),this.id=jn$1(`rdx-dialog-description-`),this.rootContext.setDescriptionId(this.id),I(ve$1).onDestroy(()=>this.rootContext.setDescriptionId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxDialogDescription`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogDescription`]})}}return e})(),lo=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),fo=`data-rdx-dialog-internal-backdrop`,cn=(()=>{class e{constructor(){this.rootContext=B(),this.host=I(Pr).nativeElement,this.floatingContext=I(xt),this.registration=I(Tt,{optional:!0}),this.focusManager=I(Te),this.focusScope=I(V),this.escapeKeyDown=pj(),this.pointerDownOutside=pj(),this.focusOutside=pj(),this.interactOutside=pj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),es(Lt$1(()=>this.rootContext.modal()===!0&&this.rootContext.isOpen()),{referenceElement:()=>this.host});let t=this.rootContext.registerTransitionElement(this.host);I(ve$1).onDestroy(t);let n=I(Se$1);LD(()=>Ko(this.host,n,{marker:fo,isOpen:()=>this.rootContext.isOpen(),shouldRender:()=>this.rootContext.modal()===!0,cutout:()=>this.host.closest(`[rdxDialogViewport]`),passThrough:()=>this.host.closest(`[rdxDialogViewport]`)!==null})),new Re(this.floatingContext,()=>this.registration?.node()??null,{escapeKey:()=>!0,outsidePress:()=>this.isTopmost()&&!this.rootContext.disablePointerDismissal(),outsidePressEvent:()=>this.rootContext.modal()===!0?`intentional`:`sloppy`,focusOutside:()=>!1,onEscapeKeyDown:i=>this.escapeKeyDown.emit(i),onPointerDownOutside:i=>{this.pointerDownOutside.emit(i),this.interactOutside.emit(i)},onDismiss:(i,s)=>{this.rootContext.close(i===`escape-key`?`escape-key`:`outside-press`,s)}}),this.focusManager.focusOut.subscribe(i=>{this.focusOutside.emit(i),this.interactOutside.emit(i),i.defaultPrevented||this.rootContext.close(`focus-out`,i)})}isTopmost(){return this.rootContext.isOpen()&&!this.rootContext.nestedDialogOpen()}onKeyDown(t){lo.has(t.key)&&t.stopPropagation()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxDialogPopup`,``]],hostVars:13,hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Km(`id`,i.rootContext.contentId),zr(`role`,i.rootContext.role)(`aria-modal`,i.rootContext.modal()===!0?`true`:void 0)(`aria-describedby`,i.rootContext.descriptionId())(`aria-labelledby`,i.rootContext.titleId())(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`--%NS%nested-dialogs`,i.rootContext.nestedOpenCount()))},outputs:{escapeKeyDown:`escapeKeyDown`,pointerDownOutside:`pointerDownOutside`,focusOutside:`focusOutside`,interactOutside:`interactOutside`,openAutoFocus:`openAutoFocus`,closeAutoFocus:`closeAutoFocus`},exportAs:[`rdxDialogPopup`],features:[CS([zt(()=>{let t=B();return{modal:()=>t.modal()===!0||t.modal()===`trap-focus`,inert:()=>t.modal()===!0,enabled:()=>t.present(),restoreFocus:()=>`popup`,openInteractionType:()=>t.openInteractionType(),closeInteractionType:()=>t.closeInteractionType(),closeOnFocusOut:()=>!t.disablePointerDismissal()}})]),jC([qo,Te])]})}}return e})(),ln=(()=>{class e{constructor(){this.container=jc()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[CS([L$1(()=>({present:B().present}))]),jC([{directive:en,inputs:[`container`,`container`]}])]})}}return e})(),fn=(()=>{class e{constructor(){this.rootContext=B(),this.id=jn$1(`rdx-dialog-title-`),this.rootContext.setTitleId(this.id),I(ve$1).onDestroy(()=>this.rootContext.setTitleId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxDialogTitle`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogTitle`]})}}return e})(),pn=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxDialogViewport`,``]],hostAttrs:[`role`,`presentation`],hostVars:8,hostBindings:function(n,i){n&2&&(zr(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`pointer-events`,i.rootContext.isOpen()?null:`none`))},exportAs:[`rdxDialogViewport`]})}}return e})()});var Oi;var Ri;var Mi;var Ii;var Ai;var Ni;var Pi;var ki;var ho=f(()=>{Kr();Kr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxAlertDialogBackdrop`,``]],exportAs:[`rdxAlertDialogBackdrop`],features:[jC([an])]})}}return e})(),Ri=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[`button`,`rdxAlertDialogClose`,``]],exportAs:[`rdxAlertDialogClose`],features:[jC([un])]})}}return e})(),Mi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxAlertDialogDescription`,``]],exportAs:[`rdxAlertDialogDescription`],features:[jC([dn])]})}}return e})(),Ii=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxAlertDialogPopup`,``]],exportAs:[`rdxAlertDialogPopup`],features:[jC([{directive:cn,outputs:[`escapeKeyDown`,`escapeKeyDown`,`pointerDownOutside`,`pointerDownOutside`,`focusOutside`,`focusOutside`,`interactOutside`,`interactOutside`,`openAutoFocus`,`openAutoFocus`,`closeAutoFocus`,`closeAutoFocus`]}])]})}}return e})(),Ai=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[`ng-template`,`rdxAlertDialogPortal`,``]],exportAs:[`rdxAlertDialogPortal`],features:[jC([{directive:ln,inputs:[`container`,`container`]}])]})}}return e})(),Ni=(()=>{class e{constructor(){this.dialog=I(ie),this.open=this.dialog.open,this.triggerId=this.dialog.triggerId,this.payload=this.dialog.payload}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[CS([sn({role:`alertdialog`,forceModal:!0,forcePointerDismissalDisabled:!0})]),jC([{directive:ie,inputs:[`open`,`open`,`defaultOpen`,`defaultOpen`,`triggerId`,`triggerId`,`defaultTriggerId`,`defaultTriggerId`,`handle`,`handle`],outputs:[`openChange`,`openChange`,`triggerIdChange`,`triggerIdChange`,`onOpenChange`,`onOpenChange`,`onOpenChangeComplete`,`onOpenChangeComplete`]}])]})}}return e})(),Pi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxAlertDialogTitle`,``]],exportAs:[`rdxAlertDialogTitle`],features:[jC([fn])]})}}return e})(),ki=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$C({type:e,selectors:[[``,`rdxAlertDialogViewport`,``]],exportAs:[`rdxAlertDialogViewport`],features:[jC([pn])]})}}return e})()});export{pn as _,Ni as a,Ri as c,dn as d,fn as f,ln as g,ki as h,Mi as i,an as l,ie as m,Ii as n,Oi as o,ho as p,Je as r,Pi as s,Ai as t,cn as u,un as v};