docker-client-mx 1.46.0 → 1.47.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 (100) hide show
  1. package/dist/docker-desktop-mx/browser/chunk--8mGUJAn.js +1 -0
  2. package/dist/docker-desktop-mx/browser/chunk-5_sGKQni.js +1 -0
  3. package/dist/docker-desktop-mx/browser/{chunk-dMo4BIG3.js → chunk-B-o5hXOb.js} +1 -1
  4. package/dist/docker-desktop-mx/browser/{chunk-BHeMRkJW.js → chunk-B-wG1P-32.js} +4 -4
  5. package/dist/docker-desktop-mx/browser/chunk-B2EShQtx.js +6 -0
  6. package/dist/docker-desktop-mx/browser/chunk-BYVhZ88_.js +1 -0
  7. package/dist/docker-desktop-mx/browser/{chunk-B2FafzpV.js → chunk-B_y5IYob2.js} +2 -2
  8. package/dist/docker-desktop-mx/browser/{chunk-BiQwXu_z.js → chunk-BdM_u7-N.js} +1 -1
  9. package/dist/docker-desktop-mx/browser/{chunk-DTYNCfd52.js → chunk-BkMeriAO2.js} +1 -1
  10. package/dist/docker-desktop-mx/browser/chunk-BzctO2pl.js +1 -0
  11. package/dist/docker-desktop-mx/browser/{chunk-FuBWiPKf.js → chunk-C0zZrY7Q.js} +1 -1
  12. package/dist/docker-desktop-mx/browser/{chunk-DKpHGsCy.js → chunk-CAFP1xPu.js} +1 -1
  13. package/dist/docker-desktop-mx/browser/chunk-CI4m0buS.js +1 -0
  14. package/dist/docker-desktop-mx/browser/chunk-CQWK0K-u.js +1 -0
  15. package/dist/docker-desktop-mx/browser/chunk-Ci_V0cow.js +1 -0
  16. package/dist/docker-desktop-mx/browser/chunk-CsXiAvQZ.js +1 -0
  17. package/dist/docker-desktop-mx/browser/chunk-Cva1WgC9.js +1 -0
  18. package/dist/docker-desktop-mx/browser/chunk-CyIYmLAx2.js +1 -0
  19. package/dist/docker-desktop-mx/browser/chunk-D9wKjS-4.js +4 -0
  20. package/dist/docker-desktop-mx/browser/chunk-DDXVa5ug.js +1 -0
  21. package/dist/docker-desktop-mx/browser/chunk-DGowKW_R2.js +3 -0
  22. package/dist/docker-desktop-mx/browser/chunk-DJ_YTqcg.js +1 -0
  23. package/dist/docker-desktop-mx/browser/{chunk-Ds9UWi20.js → chunk-DLduIDn8.js} +1 -1
  24. package/dist/docker-desktop-mx/browser/chunk-DM-ZJf6i2.js +1 -0
  25. package/dist/docker-desktop-mx/browser/{chunk-BNXdbUqv.js → chunk-DRSLMQv0.js} +2 -2
  26. package/dist/docker-desktop-mx/browser/{chunk-BSz2tiCV.js → chunk-DUEEE1of.js} +1 -1
  27. package/dist/docker-desktop-mx/browser/chunk-DVNubhu5.js +1 -0
  28. package/dist/docker-desktop-mx/browser/chunk-DaLHmamd.js +1 -0
  29. package/dist/docker-desktop-mx/browser/chunk-DgQfvcw6.js +1 -0
  30. package/dist/docker-desktop-mx/browser/chunk-DhhlIffD.js +1 -0
  31. package/dist/docker-desktop-mx/browser/{chunk-CLii2-2s.js → chunk-DnoDi7LZ.js} +1 -1
  32. package/dist/docker-desktop-mx/browser/chunk-DpQe-4PA.js +1 -0
  33. package/dist/docker-desktop-mx/browser/{chunk-6Ee5XYkz.js → chunk-Dx6pB9SS.js} +1 -1
  34. package/dist/docker-desktop-mx/browser/{chunk-C9w0bf2Y.js → chunk-F6eWZMl2.js} +1 -1
  35. package/dist/docker-desktop-mx/browser/chunk-KPCWgafs.js +1 -0
  36. package/dist/docker-desktop-mx/browser/chunk-MHnhOupE2.js +1 -0
  37. package/dist/docker-desktop-mx/browser/{chunk-bj_sMiGa.js → chunk-N02t_L0r.js} +1 -1
  38. package/dist/docker-desktop-mx/browser/{chunk-BFq6LhBl.js → chunk-RW2CuHOJ.js} +1 -1
  39. package/dist/docker-desktop-mx/browser/chunk-TwB2JZ5F2.js +1 -0
  40. package/dist/docker-desktop-mx/browser/chunk-YcHxGDGY.js +1 -0
  41. package/dist/docker-desktop-mx/browser/chunk-_SDm3Kr6.js +1 -0
  42. package/dist/docker-desktop-mx/browser/{chunk-DwKe2pMP.js → chunk-aZvSgdSQ.js} +1 -1
  43. package/dist/docker-desktop-mx/browser/chunk-t2gYzsd3.js +1 -0
  44. package/dist/docker-desktop-mx/browser/chunk-x4B-Z7Ml.js +1 -0
  45. package/dist/docker-desktop-mx/browser/index.html +2 -2
  46. package/dist/docker-desktop-mx/browser/main-H3S3O6WP.js +1 -0
  47. package/dist/docker-desktop-mx/browser/styles-GSAQVAJP.css +1 -0
  48. package/dist-electron/attention.js +14 -1
  49. package/dist-electron/attention.js.map +1 -1
  50. package/dist-electron/channels.js +3 -0
  51. package/dist-electron/channels.js.map +1 -1
  52. package/dist-electron/container-adjust.js +138 -10
  53. package/dist-electron/container-adjust.js.map +1 -1
  54. package/dist-electron/ipc.js +61 -5
  55. package/dist-electron/ipc.js.map +1 -1
  56. package/dist-electron/main.js +30 -1
  57. package/dist-electron/main.js.map +1 -1
  58. package/dist-electron/memory-watch.js +87 -0
  59. package/dist-electron/memory-watch.js.map +1 -0
  60. package/dist-electron/preload.js +7 -1
  61. package/dist-electron/preload.js.map +1 -1
  62. package/dist-electron/settings.js +8 -0
  63. package/dist-electron/settings.js.map +1 -1
  64. package/dist-electron/stats.js +25 -0
  65. package/dist-electron/stats.js.map +1 -1
  66. package/dist-electron/volume-restore.js +40 -0
  67. package/dist-electron/volume-restore.js.map +1 -0
  68. package/dist-electron/volume-schedules.js +71 -13
  69. package/dist-electron/volume-schedules.js.map +1 -1
  70. package/package.json +1 -1
  71. package/dist/docker-desktop-mx/browser/chunk-B-jCnQFP2.js +0 -6
  72. package/dist/docker-desktop-mx/browser/chunk-B6qORmpw.js +0 -1
  73. package/dist/docker-desktop-mx/browser/chunk-B7IRMMXz2.js +0 -1
  74. package/dist/docker-desktop-mx/browser/chunk-B7xNIuls.js +0 -3
  75. package/dist/docker-desktop-mx/browser/chunk-BZygkakw2.js +0 -1
  76. package/dist/docker-desktop-mx/browser/chunk-Ba7ROPTT.js +0 -1
  77. package/dist/docker-desktop-mx/browser/chunk-Bk32Rk5p.js +0 -4
  78. package/dist/docker-desktop-mx/browser/chunk-BsmS2zXP.js +0 -1
  79. package/dist/docker-desktop-mx/browser/chunk-ByAKccx1.js +0 -1
  80. package/dist/docker-desktop-mx/browser/chunk-C4OFwmD92.js +0 -1
  81. package/dist/docker-desktop-mx/browser/chunk-CI-MgoDd.js +0 -1
  82. package/dist/docker-desktop-mx/browser/chunk-CWjMCD8T.js +0 -1
  83. package/dist/docker-desktop-mx/browser/chunk-CaJx4ff8.js +0 -1
  84. package/dist/docker-desktop-mx/browser/chunk-CesW8OnI.js +0 -1
  85. package/dist/docker-desktop-mx/browser/chunk-CgneC1Je.js +0 -1
  86. package/dist/docker-desktop-mx/browser/chunk-ChGlpKnY.js +0 -1
  87. package/dist/docker-desktop-mx/browser/chunk-CnivQPHU.js +0 -1
  88. package/dist/docker-desktop-mx/browser/chunk-CyNh8lBK2.js +0 -1
  89. package/dist/docker-desktop-mx/browser/chunk-D-daLnRf.js +0 -1
  90. package/dist/docker-desktop-mx/browser/chunk-D5pKQvyX.js +0 -1
  91. package/dist/docker-desktop-mx/browser/chunk-D8vF1ayp2.js +0 -1
  92. package/dist/docker-desktop-mx/browser/chunk-DFkgt4XH.js +0 -1
  93. package/dist/docker-desktop-mx/browser/chunk-DJfErblk.js +0 -1
  94. package/dist/docker-desktop-mx/browser/chunk-DWYNwk_L.js +0 -1
  95. package/dist/docker-desktop-mx/browser/chunk-FM5_LSb4.js +0 -1
  96. package/dist/docker-desktop-mx/browser/chunk-gOjj4-4k.js +0 -1
  97. package/dist/docker-desktop-mx/browser/chunk-idasJ9ng.js +0 -1
  98. package/dist/docker-desktop-mx/browser/chunk-ux3iG9S52.js +0 -1
  99. package/dist/docker-desktop-mx/browser/main-DIJOTBZN.js +0 -1
  100. package/dist/docker-desktop-mx/browser/styles-3HWRDJL3.css +0 -1
@@ -0,0 +1 @@
1
+ import{Bn as p,Pn as nk,Zn as rg,c as Br,pr as wc,q as Lt,ut as Qr,wn as jc}from"./chunk-D9wKjS-4.js";var a;var c;var b=p(()=>{Qr();Qr();a={running:`bg-ok shadow-[0_0_0_3px_color-mix(in_oklab,var(--color-ok)_28%,transparent)]`,paused:`bg-halt`,restarting:`bg-halt`,partial:`bg-halt`,dead:`bg-danger`,created:`border-2 border-ink-400`,removing:`border-2 border-ink-400`,exited:`bg-stopped`,stopped:`bg-stopped`,down:`border-2 border-ink-400`},c=class s{state=jc.required();size=jc(`sm`);look=Lt(()=>this.state()in a?a[this.state()]:a.created);static ɵfac=function(t){return new(t||s)};static ɵcmp=wc({type:s,selectors:[[`app-state-dot`]],hostAttrs:[1,`block`,`shrink-0`,`rounded-full`],hostVars:7,hostBindings:function(t,e){t&2&&(Br(`data-state`,e.state()),nk(e.look()),rg(`size-2`,e.size()===`sm`)(`size-3`,e.size()===`md`))},inputs:{state:[1,`state`],size:[1,`size`]},decls:0,vars:0,template:function(t,e){},encapsulation:2})}});export{c as n,b as t};
@@ -0,0 +1 @@
1
+ import{Bn as p,Cn as jI,E as Gi,Ft as Ws,J as M,M as Ig,Mt as W,Nn as mj,Nt as Wm,On as ke,P as Ik,Qn as rp,Rt as Xd,Tn as k,U as LD,Ut as Zm,_t as T,b as Eg,c as Br,dt as RI,er as sw,fn as fj,h as Cr,hr as wt,i as $r,j as Ib,lt as Pr,q as Lt$1,rn as br,rr as tg,sr as ve$1,st as Pk,u as C,ut as Qr,v as Dj,wn as jc,yr as y_}from"./chunk-D9wKjS-4.js";import{n as $n$1,o as Ne}from"./chunk-t2gYzsd3.js";import{D as tr,E as tn$1,T as sr,_ as er,a as Je$1,b as me$1,h as ar,i as Gn$1,l as Qn$1,m as Zn$1,o as Jn$1,u as Tt,v as et,w as rr,x as nr}from"./chunk-CI4m0buS.js";import{i as v,n as f,r as g,t as L$1}from"./chunk-DLduIDn8.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=rr(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=rr(n);for(let s of e)if(x(s,{select:o}),rr(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=rr((`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,``),me$1.screenReader.voiceOver&&me$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;Xd(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=p(()=>{Qr();Qr();tn$1();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]=Gn$1(`FocusScope Context`,`utils/focus-scope`),Vn=()=>{let e=C(V);return{loop:e.loop,trapped:e.isTrapped}},V=(()=>{class e{constructor(){this.injector=C(ke),this.destroyRef=C(ve$1),this.elementRef=C(Pr),this.config=C(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=fj(),this.unmountAutoFocus=fj(),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(()=>{Xd(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}),Xd(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=rr(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}),rr(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=rr(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=rr(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=RI({type:e,selectors:[[``,`rdxFocusScope`,``]],hostAttrs:[`tabindex`,`-1`],hostBindings:function(n,i){n&1&&Zm(`keydown`,function(r){return i.handleKeyDown(r)})},inputs:{loop:[1,`loop`],trapped:[1,`trapped`]},outputs:{mountAutoFocus:`mountAutoFocus`,unmountAutoFocus:`unmountAutoFocus`},features:[Ik([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=p(()=>{Ne();Qr();Qr();tn$1();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=fj(),this.config=C($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=C(De),this.host=C(Pr).nativeElement,this.isBrowser=$n$1(C(sw)),this.rootContext=C(et,{optional:!0}),this.registration=C(Je$1,{optional:!0}),this._interactionType=wt(``),this.interactionType=this._interactionType.asReadonly(),Xd(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(Xd(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),Xd(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),Xd(()=>{if(!me$1.engine.webkit||this.isFloatingOpen())return;let t=this.rootContext?.floatingElement??this.host;if(!t)return;let n=rr(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),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,n,!0),t.removeEventListener(`keydown`,i,!0)})}wireFocusOrchestration(){C(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(){Xd(()=>{!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),C(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),C(ve$1).onDestroy(()=>t.removeEventListener(`focusout`,n,!0))}wirePortalFocusBridge(){Xd(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=RI({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:[Ik([Un()]),jI([{directive:V,inputs:[`loop`,`loop`]}])]})}}return e})()});function qn(e){e||(e=C(ve$1));let o=new T(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Ib(o))}function Xe(e,o){return new Ue(e)}function qe(e){let o=y_(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=p(()=>{Ws();rp();Cr();Eg();Ue=class{source;destroyed=!1;destroyRef=C(ve$1);constructor(o){this.source=o,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(o){if(this.destroyed)throw new k(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=p(()=>{Ne();Qr();tn$1();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=C(ve$1);if(E.onDestroy(()=>Ye.delete(this.context)),!$n$1(C(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},me$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=p(()=>{Ne();Qr();Qr();g();en=(()=>{class e{constructor(){this.viewContainerRef=C(Gi),this.templateRef=C($r),this.document=C(br,{optional:!0}),this.isBrowser=$n$1(C(sw)),this.container=jc(),this.keepMounted=jc(!1,{transform:Dj}),this.contextPresent=C(v).present,this.present=Lt$1(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=Pk(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({present:this.present,isBrowser:this.isBrowser,injector:C(ke),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});Xd(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),C(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=RI({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=p(()=>{Qr();Qr();tn$1();tn$1();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(C(ie)),[B,co]=Gn$1(`RdxDialogRootContext`,`components/dialog`),ie=(()=>{class e{constructor(){this.destroyRef=C(ve$1),this.parentRoot=C(e,{optional:!0,skipSelf:!0}),this.variant=C(on),this.hasAppliedDefaultOpen=!1,this.hasAppliedDefaultTriggerId=!1,this.registeredTriggers=new Map,this.transition=ar(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=fj(),this.onOpenChangeComplete=fj(),this.contentId=Tt(`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=tr({ownerDocument:C(Pr).nativeElement.ownerDocument,open:()=>this.open()}),Xd(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),Xd(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();Xd(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),Xd(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),Xd(()=>{let n=this.triggerId();Ig(()=>this.syncTriggerId(n))}),Xd(()=>{let n=this.open();n!==t&&(t=n,Ig(()=>this.transition.start(n)))}),Xd(n=>{this.open()&&this.parentRoot&&n(Ig(()=>this.parentRoot.openNestedChild()))}),Xd(n=>{let i=this.handle();i&&n(Ig(()=>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=Zn$1(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=RI({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:[Ik([co(uo),Jn$1(),Qn$1(()=>C(e).floatingContext)])]})}}return e})();an=(()=>{class e{constructor(){this.rootContext=B(),this.forceRender=jc(!1,{transform:Dj});let t=C(et,{optional:!0});if(t){let n=C(Pr).nativeElement;t.addFloatingElement(n),C(ve$1).onDestroy(()=>t.removeFloatingElement(n))}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxDialogBackdrop`,``]],hostAttrs:[`role`,`presentation`],hostVars:7,hostBindings:function(n,i){n&2&&(Wm(`hidden`,i.rootContext.nested&&!i.forceRender()),Br(`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=RI({type:e,selectors:[[`button`,`rdxDialogClose`,``]],hostAttrs:[`type`,`button`],hostBindings:function(n,i){n&1&&Zm(`click`,function(r){return i.rootContext.close(`close-press`,r)})},exportAs:[`rdxDialogClose`]})}}return e})(),dn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-description-`),this.rootContext.setDescriptionId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setDescriptionId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxDialogDescription`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Wm(`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=C(Pr).nativeElement,this.floatingContext=C(et),this.registration=C(Je$1,{optional:!0}),this.focusManager=C(Te),this.focusScope=C(V),this.escapeKeyDown=fj(),this.pointerDownOutside=fj(),this.focusOutside=fj(),this.interactOutside=fj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),sr(Lt$1(()=>this.rootContext.modal()===!0&&this.rootContext.isOpen()),{referenceElement:()=>this.host});let t=this.rootContext.registerTransitionElement(this.host);C(ve$1).onDestroy(t);let n=C(ke);LD(()=>nr(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=RI({type:e,selectors:[[``,`rdxDialogPopup`,``]],hostVars:13,hostBindings:function(n,i){n&1&&Zm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Wm(`id`,i.rootContext.contentId),Br(`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),tg(`--%NS%nested-dialogs`,i.rootContext.nestedOpenCount()))},outputs:{escapeKeyDown:`escapeKeyDown`,pointerDownOutside:`pointerDownOutside`,focusOutside:`focusOutside`,interactOutside:`interactOutside`,openAutoFocus:`openAutoFocus`,closeAutoFocus:`closeAutoFocus`},exportAs:[`rdxDialogPopup`],features:[Ik([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()}})]),jI([er,Te])]})}}return e})(),ln=(()=>{class e{constructor(){this.container=jc()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[Ik([L$1(()=>({present:B().present}))]),jI([{directive:en,inputs:[`container`,`container`]}])]})}}return e})(),fn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-title-`),this.rootContext.setTitleId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setTitleId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxDialogTitle`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Wm(`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=RI({type:e,selectors:[[``,`rdxDialogViewport`,``]],hostAttrs:[`role`,`presentation`],hostVars:8,hostBindings:function(n,i){n&2&&(Br(`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),tg(`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=p(()=>{Qr();Qr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxAlertDialogBackdrop`,``]],exportAs:[`rdxAlertDialogBackdrop`],features:[jI([an])]})}}return e})(),Ri=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[`button`,`rdxAlertDialogClose`,``]],exportAs:[`rdxAlertDialogClose`],features:[jI([un])]})}}return e})(),Mi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxAlertDialogDescription`,``]],exportAs:[`rdxAlertDialogDescription`],features:[jI([dn])]})}}return e})(),Ii=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxAlertDialogPopup`,``]],exportAs:[`rdxAlertDialogPopup`],features:[jI([{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=RI({type:e,selectors:[[`ng-template`,`rdxAlertDialogPortal`,``]],exportAs:[`rdxAlertDialogPortal`],features:[jI([{directive:ln,inputs:[`container`,`container`]}])]})}}return e})(),Ni=(()=>{class e{constructor(){this.dialog=C(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=RI({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[Ik([sn({role:`alertdialog`,forceModal:!0,forcePointerDismissalDisabled:!0})]),jI([{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=RI({type:e,selectors:[[``,`rdxAlertDialogTitle`,``]],exportAs:[`rdxAlertDialogTitle`],features:[jI([fn])]})}}return e})(),ki=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxAlertDialogViewport`,``]],exportAs:[`rdxAlertDialogViewport`],features:[jI([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 +1 @@
1
- import{Vn as p$1}from"./chunk-Bk32Rk5p.js";function r(t){let s=t.lastIndexOf(`/`),n=t.lastIndexOf(`:`);return n>s?{repository:t.slice(0,n),tag:t.slice(n+1)}:{repository:t,tag:`latest`}}function p(t){if(t.length===0||t.length>255)return!1;let s=t.indexOf(`/`),n=s===-1?t:t.slice(0,s);return s!==-1&&(n.includes(`.`)||n.includes(`:`)||n===`localhost`)?$.test(n)&&a.test(t.slice(s+1)):a.test(t)}function A(t){let s=t.indexOf(`/`),n=s===-1?``:t.slice(0,s);return s===-1||!(n.includes(`.`)||n.includes(`:`)||n===`localhost`)||n===`docker.io`||n===`index.docker.io`?null:n}function x(t){return f.test(t)}function d(t){let{repository:s,tag:n}=r(t);return p(s)&&x(n)}function O(t,s,n){let e=t.replace(/@sha256:[0-9a-f]+$/,``);if(!/^(sha256:)?[0-9a-f]{12,64}$/.test(e)){let{repository:c,tag:l}=r(e),o=`${c}${n}:${l}`;if(d(o))return o}return`${s.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/^[^a-z0-9]+/,``)||`container`}${n}:latest`}var i;var u;var f;var a;var $;var z=p$1(()=>{i=`[a-z0-9]+(?:(?:[._]|__|-+)[a-z0-9]+)*`,u=`(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*(?::[0-9]+)?`,f=/^\w[\w.-]{0,127}$/,a=new RegExp(`^${i}(?:/${i})*$`),$=new RegExp(`^${u}$`)});export{z as a,r as i,O as n,d as r,A as t};
1
+ import{Bn as p$1}from"./chunk-D9wKjS-4.js";function r(t){let s=t.lastIndexOf(`/`),n=t.lastIndexOf(`:`);return n>s?{repository:t.slice(0,n),tag:t.slice(n+1)}:{repository:t,tag:`latest`}}function p(t){if(t.length===0||t.length>255)return!1;let s=t.indexOf(`/`),n=s===-1?t:t.slice(0,s);return s!==-1&&(n.includes(`.`)||n.includes(`:`)||n===`localhost`)?$.test(n)&&a.test(t.slice(s+1)):a.test(t)}function A(t){let s=t.indexOf(`/`),n=s===-1?``:t.slice(0,s);return s===-1||!(n.includes(`.`)||n.includes(`:`)||n===`localhost`)||n===`docker.io`||n===`index.docker.io`?null:n}function x(t){return f.test(t)}function d(t){let{repository:s,tag:n}=r(t);return p(s)&&x(n)}function O(t,s,n){let e=t.replace(/@sha256:[0-9a-f]+$/,``);if(!/^(sha256:)?[0-9a-f]{12,64}$/.test(e)){let{repository:c,tag:l}=r(e),o=`${c}${n}:${l}`;if(d(o))return o}return`${s.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/^[^a-z0-9]+/,``)||`container`}${n}:latest`}var i;var u;var f;var a;var $;var z=p$1(()=>{i=`[a-z0-9]+(?:(?:[._]|__|-+)[a-z0-9]+)*`,u=`(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*(?::[0-9]+)?`,f=/^\w[\w.-]{0,127}$/,a=new RegExp(`^${i}(?:/${i})*$`),$=new RegExp(`^${u}$`)});export{z as a,r as i,O as n,d as r,A as t};
@@ -1,6 +1,6 @@
1
- import{$ as Od,At as W,Cn as jc,Cr as yk,D as HE,En as kc,F as Jm,G as My,Gn as pk,K as Nc,Kn as qr,Kt as ag,Ln as oS,Mn as mj,Mt as Wr,On as kk,Pn as nk,Qn as sS,Qt as bg,Tn as kE,V as Ld,Vn as p,Vt as _E,Zn as rp,_r as xc,cr as vg,ct as Qr,dt as SE,en as bk,et as Oi,ft as Sc,gr as wt$1,jn as mg,jt as Wm,kn as lS,l as C,ln as fg,mr as wc,n as $m,nt as Ot$1,on as eH,rn as dS,s as Br,sn as ec,sr as ve,st as Qm,un as fj,ur as vk,vt as Tc,w as Gm,x as G$1,yn as hg,yt as Tg}from"./chunk-Bk32Rk5p.js";import{n as j,r as w,t as C$1}from"./chunk-C9w0bf2Y.js";import"./chunk-FM5_LSb4.js";import{l as ia,o as Yt,t as Q,u as pe$1}from"./chunk-CgneC1Je.js";import{n as p$1,t as g}from"./chunk-BSz2tiCV.js";import{n as o,t as i}from"./chunk-bj_sMiGa.js";import"./chunk-CesW8OnI.js";import"./chunk-Ds9UWi20.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-BsmS2zXP.js";import{n as v,t as u}from"./chunk-DJfErblk.js";import{n as x,t as u$1}from"./chunk-D5pKQvyX.js";import{n as c,t as b}from"./chunk-ChGlpKnY.js";import{n as V,t as G$2}from"./chunk-CLii2-2s.js";import{n as W$1,t as J}from"./chunk-idasJ9ng.js";function Qe(n,t){if(n&1){let e=_E();Oi(0,`button`,18),Jm(`click`,function(){let o=Ld(e).$implicit;return Od(HE(2).view.set(o))}),pk(1),Nc()}if(n&2){let e=t.$implicit,i=HE(2);ag(`border-accent`,i.view()===e)(`text-accent`,i.view()===e),Br(`data-testid`,`compose-view-`+e)(`aria-pressed`,i.view()===e),ec(),xc(` `,e===`raw`?i.t().raw:i.t().resolved,` `)}}function Je(n,t){n&1&&(Oi(0,`pre`,9),pk(1),Nc()),n&2&&(ec(),fg(t))}function Xe(n,t){n&1&&(Oi(0,`p`,10),pk(1),Nc()),n&2&&(ec(),fg(t))}function Ye(n,t){if(n&1&&(Oi(0,`p`,11),pk(1),Nc()),n&2){let e=HE(2);ec(),fg(e.t().loading)}}function Ze(n,t){n&1&&(Oi(0,`span`,13),pk(1),Nc()),n&2&&(ec(),fg(t))}function et(n,t){if(n&1){let e=_E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Oi(5,`p`,6),pk(6),Nc(),Oi(7,`div`,7),Sc(8,Qe,2,7,`button`,8,kc),Nc(),kE(10,Je,2,1,`pre`,9)(11,Xe,2,1,`p`,10)(12,Ye,2,1,`p`,11),Oi(13,`div`,12),kE(14,Ze,2,1,`span`,13),Oi(15,`button`,14),Gm(16,`app-icon`,15),pk(17),Nc(),Oi(18,`button`,16),Jm(`click`,function(){Ld(e);return Od(HE().copy())}),Gm(19,`app-icon`,17),pk(20),Nc()()()()}if(n&2){let e,i,o=HE();ec(4),fg(o.t().title(o.project())),ec(2),xc(` `,o.view()===`raw`?o.t().rawHint:o.t().resolvedHint,` `),ec(2),Tc(o.views),ec(2),SE((e=o.body())?10:(e=o.problem())?11:12,e),ec(4),SE((i=o.copyProblem())?14:-1,i),ec(2),Wm(`size`,14),ec(),xc(` `,o.common().close,` `),ec(),Wm(`disabled`,o.body()===null),ec(),Wm(`name`,o.copied()?`check`:`copy`)(`size`,14),ec(),xc(` `,o.copied()?o.common().copied:o.common().copy,` `)}}var se;var Be=p(()=>{Qr();Je$1();lS();dS();sS();Qr();se=class n{open=mj(!1);project=jc.required();t=Ot$1(()=>oS().compose.file);common=Ot$1(()=>oS().common);views=[`raw`,`resolved`];view=wt$1(`raw`);files=wt$1(null);config=wt$1(null);copied=wt$1(!1);copyProblem=wt$1(null);constructor(){rp(()=>{if(!this.open())return;let t=this.project();Tg(()=>{this.load(t)})})}body(){if(this.view()===`resolved`){let e=this.config();return e?.ok===!0?e.yaml:null}let t=this.files();return t?.ok!==!0?null:t.files.map(e=>`# ${e.path}
1
+ import{$ as Nc,$n as sS,An as kk,Bn as p,Dn as kc,En as kE,Et as Um,G as Li,Gn as pk,In as oS,Kt as _E,M as Ig,Mt as W,Nn as mj,Nt as Wm,O as HE,Pn as nk,Pt as Wr,Q as My,Rt as Xd,Sr as yk,Un as pg,Ut as Zm,Zn as rg,ar as ug,bt as Tc,c as Br,cn as eH,dn as fg,fn as fj,gr as xd,hn as gg,hr as wt$1,in as cg,jn as lS,ln as ec,lr as vk,mt as Sc,n as $d,nn as bk,on as dS,pr as wc,pt as SE,q as Lt$1,qn as qr,sr as ve,t as $c,tt as Nm,u as C,ut as Qr,w as G$1,wn as jc,wr as zm}from"./chunk-D9wKjS-4.js";import{n as j,r as w,t as C$1}from"./chunk-F6eWZMl2.js";import"./chunk-t2gYzsd3.js";import{l as ia,o as Yt,t as Q,u as pe$1}from"./chunk-DDXVa5ug.js";import{n as p$1,t as g}from"./chunk-DUEEE1of.js";import{n as o,t as i}from"./chunk-N02t_L0r.js";import"./chunk-CI4m0buS.js";import"./chunk-DLduIDn8.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-5_sGKQni.js";import{n as v,t as u}from"./chunk-_SDm3Kr6.js";import{n as x,t as u$1}from"./chunk-Ci_V0cow.js";import{n as c,t as b}from"./chunk--8mGUJAn.js";import{n as V,t as G$2}from"./chunk-DnoDi7LZ.js";import{n as W$1,t as J}from"./chunk-BYVhZ88_.js";function Qe(n,t){if(n&1){let e=_E();Li(0,`button`,18),Zm(`click`,function(){let o=$d(e).$implicit;return xd(HE(2).view.set(o))}),pk(1),Nc()}if(n&2){let e=t.$implicit,i=HE(2);rg(`border-accent`,i.view()===e)(`text-accent`,i.view()===e),Br(`data-testid`,`compose-view-`+e)(`aria-pressed`,i.view()===e),ec(),$c(` `,e===`raw`?i.t().raw:i.t().resolved,` `)}}function Je(n,t){n&1&&(Li(0,`pre`,9),pk(1),Nc()),n&2&&(ec(),cg(t))}function Xe(n,t){n&1&&(Li(0,`p`,10),pk(1),Nc()),n&2&&(ec(),cg(t))}function Ye(n,t){if(n&1&&(Li(0,`p`,11),pk(1),Nc()),n&2){let e=HE(2);ec(),cg(e.t().loading)}}function Ze(n,t){n&1&&(Li(0,`span`,13),pk(1),Nc()),n&2&&(ec(),cg(t))}function et(n,t){if(n&1){let e=_E();Um(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li(5,`p`,6),pk(6),Nc(),Li(7,`div`,7),Sc(8,Qe,2,7,`button`,8,kc),Nc(),kE(10,Je,2,1,`pre`,9)(11,Xe,2,1,`p`,10)(12,Ye,2,1,`p`,11),Li(13,`div`,12),kE(14,Ze,2,1,`span`,13),Li(15,`button`,14),Um(16,`app-icon`,15),pk(17),Nc(),Li(18,`button`,16),Zm(`click`,function(){$d(e);return xd(HE().copy())}),Um(19,`app-icon`,17),pk(20),Nc()()()()}if(n&2){let e,i,o=HE();ec(4),cg(o.t().title(o.project())),ec(2),$c(` `,o.view()===`raw`?o.t().rawHint:o.t().resolvedHint,` `),ec(2),Tc(o.views),ec(2),SE((e=o.body())?10:(e=o.problem())?11:12,e),ec(4),SE((i=o.copyProblem())?14:-1,i),ec(2),zm(`size`,14),ec(),$c(` `,o.common().close,` `),ec(),zm(`disabled`,o.body()===null),ec(),zm(`name`,o.copied()?`check`:`copy`)(`size`,14),ec(),$c(` `,o.copied()?o.common().copied:o.common().copy,` `)}}var se;var Be=p(()=>{Qr();Je$1();lS();dS();sS();Qr();se=class n{open=mj(!1);project=jc.required();t=Lt$1(()=>oS().compose.file);common=Lt$1(()=>oS().common);views=[`raw`,`resolved`];view=wt$1(`raw`);files=wt$1(null);config=wt$1(null);copied=wt$1(!1);copyProblem=wt$1(null);constructor(){Xd(()=>{if(!this.open())return;let t=this.project();Ig(()=>{this.load(t)})})}body(){if(this.view()===`resolved`){let e=this.config();return e?.ok===!0?e.yaml:null}let t=this.files();return t?.ok!==!0?null:t.files.map(e=>`# ${e.path}
2
2
  ${e.problem??(e.content.trim()===``?this.t().empty:e.content)}`).join(`
3
3
 
4
- `)}problem(){let t=this.view()===`resolved`?this.config():this.files();return t?.ok===!1?t.problem:null}async copy(){let t=this.body();if(t!==null)try{await navigator.clipboard.writeText(t),this.copyProblem.set(null),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch(e){this.copyProblem.set(this.t().copyFailed(eH(e)))}}async load(t){this.files.set(null),this.config.set(null),this.copied.set(!1),this.copyProblem.set(null),this.view.set(`raw`);let[e,i]=await Promise.all([window.electron.compose.files(t).catch(o=>({ok:!1,problem:eH(o)})),window.electron.compose.config(t).catch(o=>({ok:!1,problem:eH(o)}))]);this.files.set(e),this.config.set(i)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-file-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},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`,`compose-file-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-4xl`,`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`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-accent`,`text-accent`],[`data-testid`,`compose-file-text`,1,`mt-3`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre`,`text-ink-200`],[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`,`items-center`,`justify-end`,`gap-2`],[1,`mr-auto`,`text-[12px]`,`text-danger`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`compose-file-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`]],template:function(e,i){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(s){return vk(i.open,s)||(i.open=s),s}),$m(1,et,21,10,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function tt(n,t){if(n&1&&(qr(0,`p`,1),pk(1),Wr()),n&2){let e=HE();ec(),fg(e.t().done(e.service()))}}function nt(n,t){if(n&1&&(qr(0,`p`,2),pk(1),Wr()),n&2){let e=HE();ec(),fg(e.problem())}}function it(n,t){if(n&1&&(qr(0,`details`,3)(1,`summary`,4),pk(2),Wr(),qr(3,`pre`,5),pk(4),Wr()()),n&2){let e=HE();Qm(`open`,!e.result().ok),ec(2),fg(e.t().output),ec(2),fg(e.result().output)}}function ot(n,t){if(n&1&&Gm(0,`app-build-output`,2),n&2)Wm(`service`,HE().service())(`result`,t)}var G;var L;var _e=p(()=>{Qr();lS();sS();dS();Qr();G=class n{service=jc.required();result=jc.required();t=Ot$1(()=>oS().compose.build);problem(){let t=this.result();return t.ok?``:t.problem}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-build-output`]],hostAttrs:[1,`block`],inputs:{service:[1,`service`],result:[1,`result`]},decls:4,vars:3,consts:[[1,`text-[12px]`],[1,`text-ok`],[1,`whitespace-pre-line`,`text-danger`],[1,`mt-1`,3,`open`],[1,`cursor-pointer`,`text-ink-400`,`hover:text-ink-200`],[1,`mt-1`,`max-h-64`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-2`,`font-mono`,`text-[11px]`,`leading-snug`,`whitespace-pre-wrap`,`text-ink-300`]],template:function(e,i){e&1&&(qr(0,`div`,0),kE(1,tt,2,1,`p`,1)(2,nt,2,1,`p`,2),kE(3,it,5,3,`details`,3),Wr()),e&2&&(Br(`data-testid`,`service-build-result-`+i.service()),ec(),SE(i.result().ok?1:2),ec(2),SE(i.result().output!==``?3:-1))},encapsulation:2})},L=class n{project=jc.required();service=jc.required();disabled=jc(!1);showResult=jc(!0);finished=fj();t=Ot$1(()=>oS().compose.build);busy=wt$1(!1);result=wt$1(null);async build(){this.busy.set(!0),this.result.set(null);let t;try{t=await window.electron.compose.rebuild(this.project(),this.service())}catch(e){t={ok:!1,problem:eH(e),output:``}}this.result.set(t),this.busy.set(!1),this.finished.emit(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-service-build`]],hostAttrs:[1,`block`],inputs:{project:[1,`project`],service:[1,`service`],disabled:[1,`disabled`],showResult:[1,`showResult`]},outputs:{finished:`finished`},decls:4,vars:7,consts:[[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-2`,3,`service`,`result`]],template:function(e,i){if(e&1&&(Oi(0,`button`,0),Jm(`click`,function(){return i.build()}),Gm(1,`app-icon`,1),pk(2),Nc(),kE(3,ot,1,2,`app-build-output`,2)),e&2){let o;Wm(`disabled`,i.busy()||i.disabled())(`title`,i.t().title),Br(`aria-label`,i.t().aria(i.service()))(`data-testid`,`service-build-`+i.service()),ec(),Wm(`size`,14),ec(),xc(` `,i.busy()?i.t().busy:i.t().button,` `),ec(),SE((o=i.showResult()&&i.result())?3:-1,o)}},dependencies:[My,G],encapsulation:2})}});function lt(n,t){if(n&1&&(Oi(0,`p`,7),pk(1),Nc()),n&2){let e=HE(2);ec(),fg(e.t().loading)}}function dt(n,t){if(n&1&&(Oi(0,`li`,14),Gm(1,`app-icon`,16),Oi(2,`span`,17),pk(3),Nc(),Oi(4,`span`,18),pk(5),Nc(),Oi(6,`span`,19),pk(7),Nc()()),n&2){let e=t.$implicit,i=HE(3);ec(),nk(i.iconClass(e)),Wm(`name`,i.iconOf(e))(`size`,13),ec(),Wm(`title`,e.reference),ec(),fg(e.reference),ec(2),fg(e.services.join(`, `)),ec(),nk(e.state===`failed`?`text-danger`:`text-ink-400`),Wm(`title`,e.problem??``),ec(),xc(` `,i.stateOf(e),` `)}}function st(n,t){if(n&1&&Gm(0,`app-service-build`,23),n&2){let e=HE().$implicit,i=HE(3);Wm(`project`,i.project())(`service`,e.service)(`disabled`,!i.finished())}}function pt(n,t){if(n&1&&(Oi(0,`li`,15)(1,`div`,14),Gm(2,`app-icon`,20),Oi(3,`span`,21),pk(4),Nc(),Oi(5,`span`,22),pk(6),Nc()(),kE(7,st,1,3,`app-service-build`,23),Nc()),n&2){let e=t.$implicit,i=HE(3);ec(2),Wm(`size`,13),ec(2),fg(e.service),ec(2),fg(e.reason===`build`?i.t().skippedBuild:i.t().skippedDigest),ec(),SE(e.reason===`build`?7:-1)}}function ct(n,t){if(n&1&&(Oi(0,`ul`,8),Sc(1,dt,8,11,`li`,14,at),Sc(3,pt,8,4,`li`,15,rt),Nc()),n&2){let e=HE(2);ec(),Tc(e.rows()),ec(2),Tc(e.skipped())}}function mt(n,t){if(n&1&&(Oi(0,`p`,7),pk(1),Nc()),n&2){let e=HE(2);ec(),fg(e.t().noImages)}}function ut(n,t){n&1&&(Oi(0,`p`,9),pk(1),Nc()),n&2&&(ec(),fg(t))}function gt(n,t){if(n&1&&(Oi(0,`p`,7),pk(1),Nc()),n&2){let e=HE(2);ec(),fg(e.t().checking)}}function _t(n,t){if(n&1&&(Oi(0,`p`,24),Gm(1,`app-icon`,25),pk(2),Nc()),n&2){let e=HE(3);ec(),Wm(`size`,13),ec(),xc(` `,e.t().upToDate)}}function xt(n,t){if(n&1&&(Oi(0,`p`,28),pk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),fg(i.t().renewed(e.renewed.join(`, `)))}}function ft(n,t){if(n&1&&(Oi(0,`p`,29),pk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),fg(i.t().unchanged(e.unchanged.join(`, `)))}}function yt(n,t){if(n&1&&(Oi(0,`p`,30),pk(1),Nc()),n&2){let e=t.$implicit;ec(),fg(e)}}function bt(n,t){if(n&1&&(kE(0,xt,2,1,`p`,28),kE(1,ft,2,1,`p`,29),Sc(2,yt,2,1,`p`,30,kc)),n&2){let e=t;SE(e.renewed.length>0?0:-1),ec(),SE(e.unchanged.length>0?1:-1),ec(),Tc(e.problems)}}function vt(n,t){if(n&1){let e=_E();Oi(0,`div`,27)(1,`button`,31),Jm(`click`,function(){Ld(e);return Od(HE(4).renew())}),Gm(2,`app-icon`,32),pk(3),Nc(),Oi(4,`span`,33),pk(5),Nc()()}if(n&2){let e=HE(4);ec(),Wm(`disabled`,e.phase()===`renewing`),ec(),Wm(`size`,14),ec(),xc(` `,e.phase()===`renewing`?e.t().renewing:e.t().renew,` `),ec(2),fg(e.t().renewHint)}}function ht(n,t){if(n&1&&(Oi(0,`p`,26),pk(1),Nc(),kE(2,bt,4,2)(3,vt,6,4,`div`,27)),n&2){let e,i=HE(),o=HE(2);ec(),fg(o.t().stale(i.join(`, `))),ec(),SE((e=o.result())?2:3,e)}}function Ct(n,t){n&1&&(Oi(0,`div`,10),kE(1,_t,3,2,`p`,24)(2,ht,4,2),Nc()),n&2&&(ec(),SE(t.length===0?1:2))}function wt(n,t){if(n&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Oi(5,`p`,6),pk(6),Nc(),kE(7,lt,2,1,`p`,7),kE(8,ct,5,0,`ul`,8)(9,mt,2,1,`p`,7),kE(10,ut,2,1,`p`,9),kE(11,gt,2,1,`p`,7),kE(12,Ct,3,1,`div`,10),Oi(13,`div`,11)(14,`button`,12),Gm(15,`app-icon`,13),pk(16),Nc()()()()),n&2){let e,i,o=HE();ec(4),fg(o.t().title(o.project())),ec(2),fg(o.t().description),ec(),SE(o.phase()===`loading`?7:-1),ec(),SE(o.rows().length>0||o.skipped().length>0?8:o.phase()!==`loading`&&o.phase()!==`failed`?9:-1),ec(2),SE((e=o.problem())?10:-1,e),ec(),SE(o.phase()===`checking`?11:-1),ec(),SE((i=o.stale())?12:-1,i),ec(3),Wm(`size`,14),ec(),xc(` `,o.finished()?o.common().close:o.common().cancel,` `)}}function Dt(n){let t=n.layers.reduce((e,i)=>e+i.total,0);return t===0?null:Math.round(n.layers.reduce((e,i)=>e+i.current,0)/t*100)}var at;var rt;var pe;var Oe=p(()=>{Qr();Je$1();lS();sS();dS();_e();Qr();at=(n,t)=>t.reference,rt=(n,t)=>t.service;pe=class n{open=mj(!1);project=jc.required();t=Ot$1(()=>oS().compose.update);common=Ot$1(()=>oS().common);phase=wt$1(`loading`);rows=wt$1([]);skipped=wt$1([]);stale=wt$1(null);result=wt$1(null);problem=wt$1(null);finished=Ot$1(()=>[`ready`,`done`,`failed`].includes(this.phase()));round=0;stopPull=null;constructor(){C(ve).onDestroy(()=>this.cancel()),rp(()=>{let t=this.open(),e=this.project();Tg(()=>{t?this.start(e):this.cancel()})})}stateOf(t){let e=this.t();switch(t.state){case`waiting`:return e.waiting;case`pulling`:return t.percent===null?e.pulling:`${e.pulling} ${String(t.percent)}%`;case`done`:return e.pulled;case`failed`:return e.failed(t.problem??``)}}iconOf(t){return t.state===`done`?`check`:t.state===`failed`?`warning`:`download`}iconClass(t){return t.state===`done`?`text-ok`:t.state===`failed`?`text-danger`:t.state===`pulling`?`text-accent`:`text-ink-500`}cancel(){this.round+=1,this.stopPull?.(),this.stopPull=null}async start(t){this.cancel();let e=this.round,i=()=>e===this.round;this.phase.set(`loading`),this.rows.set([]),this.skipped.set([]),this.stale.set(null),this.result.set(null),this.problem.set(null);try{let o=await window.electron.compose.images(t);if(!i())return;this.rows.set(o.images.map(u=>G$1(W({},u),{state:`waiting`,percent:null,problem:null}))),this.skipped.set(o.skipped),this.phase.set(`pulling`);for(let u of o.images)if(await this.pull(u.reference,i),!i())return;this.phase.set(`checking`);let s=await window.electron.compose.stale(t);i()&&(this.stale.set(s),this.phase.set(`ready`))}catch(o){i()&&(this.problem.set(eH(o)),this.phase.set(`failed`))}}async pull(t,e){let i=s=>{e()&&this.rows.update(u=>u.map(R=>R.reference===t?W(W({},R),s):R))};i({state:`pulling`});let o=await window.electron.images.pull(t);if(!o.ok){i({state:`failed`,problem:o.problem});return}await new Promise(s=>{let u=window.electron.images.onPullProgress(o.streamId,q=>{if(!q.done){i({percent:Dt(q)});return}i(q.problem===null?{state:`done`,percent:null}:{state:`failed`,problem:q.problem}),R()}),R=()=>{u(),window.electron.images.close(o.streamId),this.stopPull=null,s()};this.stopPull=R})}async renew(){let t=this.round;this.phase.set(`renewing`);try{let e=await window.electron.compose.renew(this.project());t===this.round&&(this.result.set(e),this.phase.set(`done`))}catch(e){t===this.round&&(this.result.set({renewed:[],unchanged:[],problems:[eH(e)]}),this.phase.set(`done`))}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-project-update-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},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`,`project-update`,1,`w-full`,`max-w-2xl`,`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`,`text-[13px]`,`text-ink-400`],[`data-testid`,`project-update-images`,1,`mt-4`,`space-y-1.5`,`text-[13px]`],[1,`mt-4`,`text-[13px]`,`text-danger`],[`data-testid`,`project-update-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`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`],[1,`text-ink-500`],[3,`name`,`size`],[1,`min-w-0`,`truncate`,`font-mono`,`text-ink-100`,3,`title`],[1,`min-w-0`,`truncate`,`text-ink-500`],[1,`ml-auto`,`shrink-0`,`text-[12px]`,3,`title`],[`name`,`code`,3,`size`],[1,`font-mono`],[1,`ml-auto`,`text-[12px]`],[1,`mt-1.5`,`ml-6`,3,`project`,`service`,`disabled`],[1,`flex`,`items-center`,`gap-2`,`text-ink-300`],[`name`,`check`,1,`text-ok`,3,`size`],[1,`text-ink-200`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`mt-2`,`text-ok`],[1,`mt-1`,`text-ink-400`],[1,`mt-2`,`text-danger`],[`type`,`button`,`data-testid`,`project-update-renew`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(s){return vk(i.open,s)||(i.open=s),s}),$m(1,wt,17,9,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My,L],encapsulation:2})}});function St(n,t){if(n&1&&(Oi(0,`div`,7),pk(1),Nc()),n&2){let e=HE();ec(),fg(e.version)}}function Et(n,t){if(n&1&&(Oi(0,`div`,16),pk(1),Nc()),n&2){let e=HE();ec(),fg(e.problem)}}function Mt(n,t){n&1&&kE(0,St,2,1,`div`,7)(1,Et,2,1,`div`,16),n&2&&SE(t.cliAvailable?0:1)}function Tt(n,t){if(n&1&&(Oi(0,`div`,7),pk(1),Nc()),n&2){let e=HE();ec(),fg(e.t().updating)}}function It(n,t){if(n&1&&(Oi(0,`span`,23),pk(1),Nc()),n&2){let e=t;Wm(`title`,e),ec(),fg(e)}}function Rt(n,t){if(n&1&&(Oi(0,`div`,26),pk(1),Nc()),n&2){let e=HE(2);ec(),fg(e.t().busy)}}function Ft(n,t){if(n&1&&(Oi(0,`div`,27),Gm(1,`app-icon`,30),pk(2),Nc()),n&2){let e=HE().$implicit,i=HE();Br(`data-testid`,`compose-missing-`+e.name),ec(),Wm(`size`,12),ec(),xc(` `,i.t().missing,` `)}}function Nt(n,t){if(n&1&&(Oi(0,`div`,31),Gm(1,`app-icon`,32),pk(2),Nc()),n&2){let e=t,i=HE().$implicit,o=HE();nk(e.problem?`text-danger`:`text-accent`),Wm(`title`,e.problem?``:o.t().driftTitle),Br(`data-testid`,`compose-drift-`+i.name),ec(),Wm(`name`,e.problem?`warning`:`file`)(`size`,12),ec(),xc(` `,e.text,` `)}}function Bt(n,t){if(n&1&&(Oi(0,`span`,36),pk(1),Nc()),n&2){let e=HE().$implicit,i=HE(2).$implicit,o=HE();Wm(`title`,o.t().driftTitle),Br(`data-testid`,`compose-drift-`+i.name+`-`+e.name),ec(),fg(o.t().drift)}}function Ot(n,t){if(n&1){let e=_E();Oi(0,`app-service-build`,42),Jm(`finished`,function(o){Ld(e);let s=HE().$implicit,u=HE(2).$implicit;return Od(HE().afterBuild(u.name,s.name,o))}),Nc()}if(n&2){let e=HE().$implicit,i=HE(2).$implicit,o=bk(0);Wm(`project`,i.name)(`service`,e.name)(`disabled`,o)(`showResult`,!1)}}function zt(n,t){if(n&1&&Gm(0,`app-build-output`,40),n&2){let e=HE().$implicit;Wm(`service`,e.name)(`result`,t)}}function $t(n,t){if(n&1&&(Oi(0,`span`,46),pk(1),Nc()),n&2){let e=t.$implicit;ec(),xc(` `,e.hostPort?e.hostPort+`:`+e.containerPort:e.containerPort,` `)}}function Vt(n,t){if(n&1&&(Oi(0,`span`,44),Sc(1,$t,2,1,`span`,46,jt),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.ports.slice(0,2))}}function Ut(n,t){if(n&1&&(Oi(0,`div`,41),Gm(1,`app-state-dot`,20),Oi(2,`a`,43),pk(3),Nc(),Oi(4,`span`,44),pk(5),Nc(),Oi(6,`span`,45),pk(7),Nc(),kE(8,Vt,3,0,`span`,44),Nc()),n&2){let e=t.$implicit;ec(),Wm(`state`,e.state),ec(),Wm(`routerLink`,kk(6,kt,e.id)),ec(),fg(e.name),ec(2),fg(e.status),ec(2),fg(e.image),ec(),SE(e.ports.length>0?8:-1)}}function Lt(n,t){if(n&1){let e=_E();Oi(0,`div`,33)(1,`div`,34)(2,`div`,35),pk(3),Nc(),kE(4,Bt,2,3,`span`,36),kE(5,Ot,1,4,`app-service-build`,37),Oi(6,`button`,38),Jm(`click`,function(){let o=Ld(e).$implicit,s=HE(2).$implicit;return Od(HE().recreate(s,o))}),Gm(7,`app-icon`,39),pk(8),Nc()(),kE(9,zt,1,2,`app-build-output`,40),Sc(10,Ut,9,8,`div`,41,Pt),Nc()}if(n&2){let e,i=t.$implicit,o=HE(2).$implicit,s=bk(0),u=HE();ec(3),fg(i.name),ec(),SE(u.drifted(o.name,i.name)?4:-1),ec(),SE(u.canBuild(o.name,i.name)?5:-1),ec(),ag(`ml-auto`,!u.canBuild(o.name,i.name)),Wm(`disabled`,s||!u.canCompose(o))(`title`,u.canCompose(o)?u.t().recreateTitle:u.composeBlockedReason(o)),Br(`data-testid`,`compose-recreate-`+i.name)(`aria-label`,u.t().recreateAria(i.name)),ec(),Wm(`size`,14),ec(),xc(` `,u.t().recreate,` `),ec(),SE((e=u.buildResult(o.name,i.name))?9:-1,e),ec(),Tc(i.containers)}}function Wt(n,t){if(n&1&&(Oi(0,`div`,29),Sc(1,Lt,12,12,`div`,33,$e),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.services)}}function At(n,t){if(n&1){let e=_E();bg(0),Oi(1,`div`,12)(2,`div`,17)(3,`button`,18),Jm(`click`,function(){let o=Ld(e).$implicit;return Od(HE().toggle(o.name))}),Gm(4,`app-icon`,19)(5,`app-state-dot`,20),Oi(6,`span`,21),pk(7),Nc()(),Oi(8,`span`,22),pk(9),Nc(),kE(10,It,2,2,`span`,23),Oi(11,`div`,24)(12,`app-action-menu`,25),Jm(`picked`,function(o){let s=Ld(e).$implicit;return Od(HE().onProjectMenu(o,s))}),Nc()()(),kE(13,Rt,2,1,`div`,26),kE(14,Ft,3,3,`div`,27),kE(15,Nt,3,7,`div`,28),kE(16,Wt,3,0,`div`,29),Nc()}if(n&2){let e,i,o=t.$implicit,s=HE(),u=yk(s.busy(o));ec(3),Br(`aria-expanded`,s.isExpanded(o.name))(`aria-label`,s.isExpanded(o.name)?s.t().collapse(o.name):s.t().expand(o.name)),ec(),Wm(`name`,s.isExpanded(o.name)?`chevronDown`:`chevronRight`)(`size`,14),ec(),Wm(`state`,o.state),ec(2),fg(o.name),ec(2),mg(` `,s.projectLabelOf(o.state),` · `,o.state===`down`?s.t().notStarted:s.t().runningOf(o.running,o.total),` `),ec(),SE((e=o.workingDir)?10:-1,e),ec(2),Wm(`label`,s.t().menuAria(o.name))(`items`,s.projectMenu(o)),ec(),SE(u?13:-1),ec(),SE(o.missing?14:-1),ec(),SE((i=s.driftNote(o.name))?15:-1,i),ec(),SE(s.isExpanded(o.name)?16:-1)}}function Gt(n,t){if(n&1&&(Oi(0,`p`,13),pk(1),Nc()),n&2){let e=HE();ec(),fg(e.t().empty)}}var kt;var $e;var Pt;var jt;var ze;p(()=>{Qr();ia();C$1();g();v();sS();J();dS();x();b();Be();Oe();_e();G$2();o();Qr();kt=n=>[`/containers`,n],$e=(n,t)=>t.name,Pt=(n,t)=>t.id,jt=(n,t)=>t.containerPort;ze=class n{containers=C(u);compose=C(p$1);t=Ot$1(()=>oS().compose);common=Ot$1(()=>oS().common);loading=this.containers.loading;problem=this.containers.problem;composePending=this.compose.pending;containerPending=this.containers.pending;status=this.compose.status;projects=Ot$1(()=>w(j(this.containers.containers()),this.compose.known()));opening=this.compose.opening;expanded=wt$1(new Set);confirmOpen=wt$1(!1);fileOpen=wt$1(!1);fileProject=wt$1(``);pendingDown=wt$1(null);updateOpen=wt$1(!1);drift=wt$1(new Map);buildable=wt$1(new Map);buildResults=wt$1(new Map);projectKey=Ot$1(()=>this.projects().filter(t=>t.workingDir!==null&&t.state!==`down`).map(t=>t.name).join(`
5
- `));updateProject=wt$1(``);bestand=jc(void 0);afbreken=jc(void 0);bijwerken=jc(void 0);openen=jc(void 0);router=C(pe$1);route=C(Q);constructor(){this.containers.refresh(),this.compose.loadStatus(),this.compose.loadKnown(),rp(()=>{let t=this.bestand();t!==void 0&&Tg(()=>{this.fileProject.set(t),this.fileOpen.set(!0),i(this.router,this.route,`bestand`)})}),rp(()=>{let t=this.projectKey(),e=this.status()?.cliAvailable;t!==``&&e===!0&&Tg(()=>t.split(`
6
- `).forEach(i=>{this.checkDrift(i),this.loadBuildable(i)}))}),rp(()=>{let t=this.bijwerken();t!==void 0&&Tg(()=>{this.openUpdate(t),i(this.router,this.route,`bijwerken`)})}),rp(()=>{this.openen()!==void 0&&Tg(()=>{i(this.router,this.route,`openen`),this.openComposeFile()})}),rp(()=>{let t=this.afbreken();t!==void 0&&Tg(()=>{this.pendingDown.set(t),this.confirmOpen.set(!0),i(this.router,this.route,`afbreken`)})})}isExpanded(t){return this.expanded().has(t)}toggle(t){let e=new Set(this.expanded());e.delete(t)||e.add(t),this.expanded.set(e)}openComposeFile(){this.compose.openFile()}projectLabelOf(t){return this.t().state[t]}busy(t){return this.composePending().has(t.name)||t.containerIds.some(e=>this.containerPending().has(e))}composeBlockedReason(t){let e=this.status();return e!==null&&!e.cliAvailable?this.t().noCli:t.workingDir===null?this.t().noWorkingDir:t.missing?this.t().missing:``}canCompose(t){return this.composeBlockedReason(t)===``}run(t,e){this.containers.runMany(t,e.containerIds)}up(t){this.compose.up(t.name)}projectMenu(t){let e=this.t(),i=this.common(),o=this.busy(t),s=this.canCompose(t),u=s?void 0:this.composeBlockedReason(t);return t.state===`down`?[{id:`up`,label:e.up,icon:`plus`,disabled:o||!s,hint:u??`docker compose up -d`},{id:`file`,label:e.file.button,icon:`file`,disabled:t.missing,separated:!0},{id:`forget`,label:e.forget,icon:`eraser`,disabled:o,hint:e.forgetHint,separated:!0}]:[{id:`up`,label:e.up,icon:`plus`,disabled:o||!s,hint:u??`docker compose up -d`},{id:`start`,label:i.start,icon:`play`,disabled:o},{id:`stop`,label:i.stop,icon:`stop`,disabled:o},{id:`restart`,label:i.restart,icon:`refresh`,disabled:o},{id:`update`,label:e.update.menu,icon:`download`,disabled:o||!s,hint:u??e.update.hint},{id:`file`,label:e.file.button,icon:`file`,disabled:t.workingDir===null,separated:!0},{id:`down`,label:e.down,icon:`trash`,danger:!0,disabled:o||!s,hint:u??`docker compose down`,separated:!0}]}onProjectMenu(t,e){t===`up`?this.up(e):t===`update`?this.openUpdate(e.name):t===`file`?this.openFile(e):t===`down`?this.askDown(e):t===`forget`?this.compose.forget(e.name):this.run(t,e)}recreate(t,e){this.compose.recreate(t.name,e.name).then(()=>this.checkDrift(t.name))}async checkDrift(t){try{let e=await window.electron.compose.drift(t);this.drift.update(i=>new Map(i).set(t,e))}catch{}}async loadBuildable(t){try{let e=await window.electron.compose.buildable(t);this.buildable.update(i=>new Map(i).set(t,e))}catch{}}canBuild(t,e){return this.buildable().get(t)?.includes(e)===!0}afterBuild(t,e,i){this.buildResults.update(o=>new Map(o).set(`${t}/${e}`,i)),this.checkDrift(t)}buildResult(t,e){return this.buildResults().get(`${t}/${e}`)??null}drifted(t,e){let i=this.drift().get(t);return i?.ok===!0&&i.changed.includes(e)}driftNote(t){let e=this.drift().get(t);return e===void 0?null:e.ok?e.changed.length===0?null:{text:this.t().driftProject(e.changed.join(`, `)),problem:!1}:{text:this.t().driftProblem(e.problem),problem:!0}}openUpdate(t){this.updateProject.set(t),this.updateOpen.set(!0)}openFile(t){this.fileProject.set(t.name),this.fileOpen.set(!0)}askDown(t){this.pendingDown.set(t.name),this.confirmOpen.set(!0)}confirmDown(){let t=this.pendingDown();t!==null&&(this.compose.down(t),this.pendingDown.set(null))}downDescription(){let t=this.pendingDown();return t===null?``:this.t().downDialog.description(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-page`]],inputs:{bestand:[1,`bestand`],afbreken:[1,`afbreken`],bijwerken:[1,`bijwerken`],openen:[1,`openen`]},decls:23,vars:18,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-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`ml-auto`,`flex`,`items-start`,`gap-4`],[1,`text-right`],[1,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`compose-open-file`,1,`mx-btn`,`mx-focus`,`shrink-0`,3,`click`,`disabled`,`title`],[`name`,`file`,3,`size`],[3,`problem`],[1,`min-h-0`,`flex-1`,`space-y-3`,`overflow-y-auto`,`px-6`,`pb-6`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`],[1,`py-10`,`text-center`,`text-[13px]`,`text-ink-400`],[3,`openChange`,`open`,`project`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`],[1,`max-w-xs`,`text-[12px]`,`text-warn`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`,`px-3`,`py-2.5`],[`type`,`button`,1,`mx-focus`,`flex`,`min-w-0`,`cursor-pointer`,`items-center`,`gap-2`,`text-left`,3,`click`],[1,`shrink-0`,`text-ink-500`,3,`name`,`size`],[3,`state`],[1,`truncate`,`text-[14px]`,`font-medium`,`text-ink-100`],[1,`shrink-0`,`text-[12px]`,`text-ink-400`],[1,`min-w-0`,`truncate`,`font-mono`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`ml-auto`,`shrink-0`],[`compact`,``,3,`picked`,`label`,`items`],[1,`px-3`,`pb-2`,`text-[12px]`,`text-ink-500`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,`text-warn`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`class`,`title`],[1,`border-t`,`border-ink-800`],[`name`,`warning`,3,`size`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`title`],[3,`name`,`size`],[1,`border-b`,`border-ink-800`,`px-3`,`py-2`,`last:border-b-0`],[1,`flex`,`items-center`,`gap-3`],[1,`text-[12px]`,`font-medium`,`text-ink-300`],[1,`text-[11px]`,`text-accent`,3,`title`],[1,`ml-auto`,3,`project`,`service`,`disabled`,`showResult`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-1.5`,`mb-1`,3,`service`,`result`],[1,`mt-1`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`pl-3`,`text-[13px]`],[1,`ml-auto`,3,`finished`,`project`,`service`,`disabled`,`showResult`],[1,`mx-focus`,`min-w-0`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`routerLink`],[1,`shrink-0`,`text-ink-500`],[1,`min-w-0`,`truncate`,`text-ink-400`],[1,`mr-2`]],template:function(e,i){if(e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),pk(5),Nc(),Oi(6,`p`,4),pk(7),Nc()(),Oi(8,`div`,5)(9,`div`,6),kE(10,Mt,2,1),kE(11,Tt,2,1,`div`,7),Nc(),Oi(12,`button`,8),Jm(`click`,function(){return i.openComposeFile()}),Gm(13,`app-icon`,9),pk(14),Nc()()(),Gm(15,`app-page-messages`,10),Nc(),Oi(16,`div`,11),Sc(17,At,17,16,`div`,12,$e,!1,Gt,2,1,`p`,13),Nc()(),Oi(20,`app-compose-file-dialog`,14),vg(`openChange`,function(s){return vk(i.fileOpen,s)||(i.fileOpen=s),s}),Nc(),Oi(21,`app-project-update-dialog`,14),vg(`openChange`,function(s){return vk(i.updateOpen,s)||(i.updateOpen=s),s}),Nc(),Oi(22,`app-confirm-dialog`,15),vg(`openChange`,function(s){return vk(i.confirmOpen,s)||(i.confirmOpen=s),s}),Jm(`confirmed`,function(){return i.confirmDown()}),Nc()),e&2){let o;ec(5),fg(i.t().title),ec(2),fg(i.t().intro),ec(3),SE((o=i.status())?10:-1,o),ec(),SE(i.loading()?11:-1),ec(),Wm(`disabled`,i.opening()||i.status()?.cliAvailable===!1)(`title`,i.t().openHint),ec(),Wm(`size`,14),ec(),xc(` `,i.opening()?i.t().opening:i.t().openFile,` `),ec(),Wm(`problem`,i.problem()),ec(2),Tc(i.projects()),ec(3),hg(`open`,i.fileOpen),Wm(`project`,i.fileProject()),ec(),hg(`open`,i.updateOpen),Wm(`project`,i.updateProject()),ec(),hg(`open`,i.confirmOpen),Wm(`title`,i.t().downDialog.title)(`description`,i.downDescription())(`confirmLabel`,i.t().downDialog.confirm)}},dependencies:[Yt,My,W$1,u$1,c,se,pe,L,G,V],encapsulation:2})}})();export{ze as ComposePage};
4
+ `)}problem(){let t=this.view()===`resolved`?this.config():this.files();return t?.ok===!1?t.problem:null}async copy(){let t=this.body();if(t!==null)try{await navigator.clipboard.writeText(t),this.copyProblem.set(null),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch(e){this.copyProblem.set(this.t().copyFailed(eH(e)))}}async load(t){this.files.set(null),this.config.set(null),this.copied.set(!1),this.copyProblem.set(null),this.view.set(`raw`);let[e,i]=await Promise.all([window.electron.compose.files(t).catch(o=>({ok:!1,problem:eH(o)})),window.electron.compose.config(t).catch(o=>({ok:!1,problem:eH(o)}))]);this.files.set(e),this.config.set(i)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-file-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},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`,`compose-file-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-4xl`,`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`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-accent`,`text-accent`],[`data-testid`,`compose-file-text`,1,`mt-3`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre`,`text-ink-200`],[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`,`items-center`,`justify-end`,`gap-2`],[1,`mr-auto`,`text-[12px]`,`text-danger`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`compose-file-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`]],template:function(e,i){e&1&&(Li(0,`div`,0),fg(`openChange`,function(s){return vk(i.open,s)||(i.open=s),s}),Nm(1,et,21,10,`ng-template`,1),Nc()),e&2&&pg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function tt(n,t){if(n&1&&(qr(0,`p`,1),pk(1),Wr()),n&2){let e=HE();ec(),cg(e.t().done(e.service()))}}function nt(n,t){if(n&1&&(qr(0,`p`,2),pk(1),Wr()),n&2){let e=HE();ec(),cg(e.problem())}}function it(n,t){if(n&1&&(qr(0,`details`,3)(1,`summary`,4),pk(2),Wr(),qr(3,`pre`,5),pk(4),Wr()()),n&2){let e=HE();Wm(`open`,!e.result().ok),ec(2),cg(e.t().output),ec(2),cg(e.result().output)}}function ot(n,t){if(n&1&&Um(0,`app-build-output`,2),n&2)zm(`service`,HE().service())(`result`,t)}var G;var L;var _e=p(()=>{Qr();lS();sS();dS();Qr();G=class n{service=jc.required();result=jc.required();t=Lt$1(()=>oS().compose.build);problem(){let t=this.result();return t.ok?``:t.problem}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-build-output`]],hostAttrs:[1,`block`],inputs:{service:[1,`service`],result:[1,`result`]},decls:4,vars:3,consts:[[1,`text-[12px]`],[1,`text-ok`],[1,`whitespace-pre-line`,`text-danger`],[1,`mt-1`,3,`open`],[1,`cursor-pointer`,`text-ink-400`,`hover:text-ink-200`],[1,`mt-1`,`max-h-64`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-2`,`font-mono`,`text-[11px]`,`leading-snug`,`whitespace-pre-wrap`,`text-ink-300`]],template:function(e,i){e&1&&(qr(0,`div`,0),kE(1,tt,2,1,`p`,1)(2,nt,2,1,`p`,2),kE(3,it,5,3,`details`,3),Wr()),e&2&&(Br(`data-testid`,`service-build-result-`+i.service()),ec(),SE(i.result().ok?1:2),ec(2),SE(i.result().output!==``?3:-1))},encapsulation:2})},L=class n{project=jc.required();service=jc.required();disabled=jc(!1);showResult=jc(!0);finished=fj();t=Lt$1(()=>oS().compose.build);busy=wt$1(!1);result=wt$1(null);async build(){this.busy.set(!0),this.result.set(null);let t;try{t=await window.electron.compose.rebuild(this.project(),this.service())}catch(e){t={ok:!1,problem:eH(e),output:``}}this.result.set(t),this.busy.set(!1),this.finished.emit(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-service-build`]],hostAttrs:[1,`block`],inputs:{project:[1,`project`],service:[1,`service`],disabled:[1,`disabled`],showResult:[1,`showResult`]},outputs:{finished:`finished`},decls:4,vars:7,consts:[[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-2`,3,`service`,`result`]],template:function(e,i){if(e&1&&(Li(0,`button`,0),Zm(`click`,function(){return i.build()}),Um(1,`app-icon`,1),pk(2),Nc(),kE(3,ot,1,2,`app-build-output`,2)),e&2){let o;zm(`disabled`,i.busy()||i.disabled())(`title`,i.t().title),Br(`aria-label`,i.t().aria(i.service()))(`data-testid`,`service-build-`+i.service()),ec(),zm(`size`,14),ec(),$c(` `,i.busy()?i.t().busy:i.t().button,` `),ec(),SE((o=i.showResult()&&i.result())?3:-1,o)}},dependencies:[My,G],encapsulation:2})}});function lt(n,t){if(n&1&&(Li(0,`p`,7),pk(1),Nc()),n&2){let e=HE(2);ec(),cg(e.t().loading)}}function dt(n,t){if(n&1&&(Li(0,`li`,14),Um(1,`app-icon`,16),Li(2,`span`,17),pk(3),Nc(),Li(4,`span`,18),pk(5),Nc(),Li(6,`span`,19),pk(7),Nc()()),n&2){let e=t.$implicit,i=HE(3);ec(),nk(i.iconClass(e)),zm(`name`,i.iconOf(e))(`size`,13),ec(),zm(`title`,e.reference),ec(),cg(e.reference),ec(2),cg(e.services.join(`, `)),ec(),nk(e.state===`failed`?`text-danger`:`text-ink-400`),zm(`title`,e.problem??``),ec(),$c(` `,i.stateOf(e),` `)}}function st(n,t){if(n&1&&Um(0,`app-service-build`,23),n&2){let e=HE().$implicit,i=HE(3);zm(`project`,i.project())(`service`,e.service)(`disabled`,!i.finished())}}function pt(n,t){if(n&1&&(Li(0,`li`,15)(1,`div`,14),Um(2,`app-icon`,20),Li(3,`span`,21),pk(4),Nc(),Li(5,`span`,22),pk(6),Nc()(),kE(7,st,1,3,`app-service-build`,23),Nc()),n&2){let e=t.$implicit,i=HE(3);ec(2),zm(`size`,13),ec(2),cg(e.service),ec(2),cg(e.reason===`build`?i.t().skippedBuild:i.t().skippedDigest),ec(),SE(e.reason===`build`?7:-1)}}function ct(n,t){if(n&1&&(Li(0,`ul`,8),Sc(1,dt,8,11,`li`,14,at),Sc(3,pt,8,4,`li`,15,rt),Nc()),n&2){let e=HE(2);ec(),Tc(e.rows()),ec(2),Tc(e.skipped())}}function mt(n,t){if(n&1&&(Li(0,`p`,7),pk(1),Nc()),n&2){let e=HE(2);ec(),cg(e.t().noImages)}}function ut(n,t){n&1&&(Li(0,`p`,9),pk(1),Nc()),n&2&&(ec(),cg(t))}function gt(n,t){if(n&1&&(Li(0,`p`,7),pk(1),Nc()),n&2){let e=HE(2);ec(),cg(e.t().checking)}}function _t(n,t){if(n&1&&(Li(0,`p`,24),Um(1,`app-icon`,25),pk(2),Nc()),n&2){let e=HE(3);ec(),zm(`size`,13),ec(),$c(` `,e.t().upToDate)}}function xt(n,t){if(n&1&&(Li(0,`p`,28),pk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),cg(i.t().renewed(e.renewed.join(`, `)))}}function ft(n,t){if(n&1&&(Li(0,`p`,29),pk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),cg(i.t().unchanged(e.unchanged.join(`, `)))}}function yt(n,t){if(n&1&&(Li(0,`p`,30),pk(1),Nc()),n&2){let e=t.$implicit;ec(),cg(e)}}function bt(n,t){if(n&1&&(kE(0,xt,2,1,`p`,28),kE(1,ft,2,1,`p`,29),Sc(2,yt,2,1,`p`,30,kc)),n&2){let e=t;SE(e.renewed.length>0?0:-1),ec(),SE(e.unchanged.length>0?1:-1),ec(),Tc(e.problems)}}function vt(n,t){if(n&1){let e=_E();Li(0,`div`,27)(1,`button`,31),Zm(`click`,function(){$d(e);return xd(HE(4).renew())}),Um(2,`app-icon`,32),pk(3),Nc(),Li(4,`span`,33),pk(5),Nc()()}if(n&2){let e=HE(4);ec(),zm(`disabled`,e.phase()===`renewing`),ec(),zm(`size`,14),ec(),$c(` `,e.phase()===`renewing`?e.t().renewing:e.t().renew,` `),ec(2),cg(e.t().renewHint)}}function ht(n,t){if(n&1&&(Li(0,`p`,26),pk(1),Nc(),kE(2,bt,4,2)(3,vt,6,4,`div`,27)),n&2){let e,i=HE(),o=HE(2);ec(),cg(o.t().stale(i.join(`, `))),ec(),SE((e=o.result())?2:3,e)}}function Ct(n,t){n&1&&(Li(0,`div`,10),kE(1,_t,3,2,`p`,24)(2,ht,4,2),Nc()),n&2&&(ec(),SE(t.length===0?1:2))}function wt(n,t){if(n&1&&(Um(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li(5,`p`,6),pk(6),Nc(),kE(7,lt,2,1,`p`,7),kE(8,ct,5,0,`ul`,8)(9,mt,2,1,`p`,7),kE(10,ut,2,1,`p`,9),kE(11,gt,2,1,`p`,7),kE(12,Ct,3,1,`div`,10),Li(13,`div`,11)(14,`button`,12),Um(15,`app-icon`,13),pk(16),Nc()()()()),n&2){let e,i,o=HE();ec(4),cg(o.t().title(o.project())),ec(2),cg(o.t().description),ec(),SE(o.phase()===`loading`?7:-1),ec(),SE(o.rows().length>0||o.skipped().length>0?8:o.phase()!==`loading`&&o.phase()!==`failed`?9:-1),ec(2),SE((e=o.problem())?10:-1,e),ec(),SE(o.phase()===`checking`?11:-1),ec(),SE((i=o.stale())?12:-1,i),ec(3),zm(`size`,14),ec(),$c(` `,o.finished()?o.common().close:o.common().cancel,` `)}}function Dt(n){let t=n.layers.reduce((e,i)=>e+i.total,0);return t===0?null:Math.round(n.layers.reduce((e,i)=>e+i.current,0)/t*100)}var at;var rt;var pe;var Oe=p(()=>{Qr();Je$1();lS();sS();dS();_e();Qr();at=(n,t)=>t.reference,rt=(n,t)=>t.service;pe=class n{open=mj(!1);project=jc.required();t=Lt$1(()=>oS().compose.update);common=Lt$1(()=>oS().common);phase=wt$1(`loading`);rows=wt$1([]);skipped=wt$1([]);stale=wt$1(null);result=wt$1(null);problem=wt$1(null);finished=Lt$1(()=>[`ready`,`done`,`failed`].includes(this.phase()));round=0;stopPull=null;constructor(){C(ve).onDestroy(()=>this.cancel()),Xd(()=>{let t=this.open(),e=this.project();Ig(()=>{t?this.start(e):this.cancel()})})}stateOf(t){let e=this.t();switch(t.state){case`waiting`:return e.waiting;case`pulling`:return t.percent===null?e.pulling:`${e.pulling} ${String(t.percent)}%`;case`done`:return e.pulled;case`failed`:return e.failed(t.problem??``)}}iconOf(t){return t.state===`done`?`check`:t.state===`failed`?`warning`:`download`}iconClass(t){return t.state===`done`?`text-ok`:t.state===`failed`?`text-danger`:t.state===`pulling`?`text-accent`:`text-ink-500`}cancel(){this.round+=1,this.stopPull?.(),this.stopPull=null}async start(t){this.cancel();let e=this.round,i=()=>e===this.round;this.phase.set(`loading`),this.rows.set([]),this.skipped.set([]),this.stale.set(null),this.result.set(null),this.problem.set(null);try{let o=await window.electron.compose.images(t);if(!i())return;this.rows.set(o.images.map(u=>G$1(W({},u),{state:`waiting`,percent:null,problem:null}))),this.skipped.set(o.skipped),this.phase.set(`pulling`);for(let u of o.images)if(await this.pull(u.reference,i),!i())return;this.phase.set(`checking`);let s=await window.electron.compose.stale(t);i()&&(this.stale.set(s),this.phase.set(`ready`))}catch(o){i()&&(this.problem.set(eH(o)),this.phase.set(`failed`))}}async pull(t,e){let i=s=>{e()&&this.rows.update(u=>u.map(R=>R.reference===t?W(W({},R),s):R))};i({state:`pulling`});let o=await window.electron.images.pull(t);if(!o.ok){i({state:`failed`,problem:o.problem});return}await new Promise(s=>{let u=window.electron.images.onPullProgress(o.streamId,q=>{if(!q.done){i({percent:Dt(q)});return}i(q.problem===null?{state:`done`,percent:null}:{state:`failed`,problem:q.problem}),R()}),R=()=>{u(),window.electron.images.close(o.streamId),this.stopPull=null,s()};this.stopPull=R})}async renew(){let t=this.round;this.phase.set(`renewing`);try{let e=await window.electron.compose.renew(this.project());t===this.round&&(this.result.set(e),this.phase.set(`done`))}catch(e){t===this.round&&(this.result.set({renewed:[],unchanged:[],problems:[eH(e)]}),this.phase.set(`done`))}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-project-update-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},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`,`project-update`,1,`w-full`,`max-w-2xl`,`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`,`text-[13px]`,`text-ink-400`],[`data-testid`,`project-update-images`,1,`mt-4`,`space-y-1.5`,`text-[13px]`],[1,`mt-4`,`text-[13px]`,`text-danger`],[`data-testid`,`project-update-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`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`],[1,`text-ink-500`],[3,`name`,`size`],[1,`min-w-0`,`truncate`,`font-mono`,`text-ink-100`,3,`title`],[1,`min-w-0`,`truncate`,`text-ink-500`],[1,`ml-auto`,`shrink-0`,`text-[12px]`,3,`title`],[`name`,`code`,3,`size`],[1,`font-mono`],[1,`ml-auto`,`text-[12px]`],[1,`mt-1.5`,`ml-6`,3,`project`,`service`,`disabled`],[1,`flex`,`items-center`,`gap-2`,`text-ink-300`],[`name`,`check`,1,`text-ok`,3,`size`],[1,`text-ink-200`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`mt-2`,`text-ok`],[1,`mt-1`,`text-ink-400`],[1,`mt-2`,`text-danger`],[`type`,`button`,`data-testid`,`project-update-renew`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li(0,`div`,0),fg(`openChange`,function(s){return vk(i.open,s)||(i.open=s),s}),Nm(1,wt,17,9,`ng-template`,1),Nc()),e&2&&pg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My,L],encapsulation:2})}});function St(n,t){if(n&1&&(Li(0,`div`,7),pk(1),Nc()),n&2){let e=HE();ec(),cg(e.version)}}function Et(n,t){if(n&1&&(Li(0,`div`,16),pk(1),Nc()),n&2){let e=HE();ec(),cg(e.problem)}}function Mt(n,t){n&1&&kE(0,St,2,1,`div`,7)(1,Et,2,1,`div`,16),n&2&&SE(t.cliAvailable?0:1)}function Tt(n,t){if(n&1&&(Li(0,`div`,7),pk(1),Nc()),n&2){let e=HE();ec(),cg(e.t().updating)}}function It(n,t){if(n&1&&(Li(0,`span`,23),pk(1),Nc()),n&2){let e=t;zm(`title`,e),ec(),cg(e)}}function Rt(n,t){if(n&1&&(Li(0,`div`,26),pk(1),Nc()),n&2){let e=HE(2);ec(),cg(e.t().busy)}}function Ft(n,t){if(n&1&&(Li(0,`div`,27),Um(1,`app-icon`,30),pk(2),Nc()),n&2){let e=HE().$implicit,i=HE();Br(`data-testid`,`compose-missing-`+e.name),ec(),zm(`size`,12),ec(),$c(` `,i.t().missing,` `)}}function Nt(n,t){if(n&1&&(Li(0,`div`,31),Um(1,`app-icon`,32),pk(2),Nc()),n&2){let e=t,i=HE().$implicit,o=HE();nk(e.problem?`text-danger`:`text-accent`),zm(`title`,e.problem?``:o.t().driftTitle),Br(`data-testid`,`compose-drift-`+i.name),ec(),zm(`name`,e.problem?`warning`:`file`)(`size`,12),ec(),$c(` `,e.text,` `)}}function Bt(n,t){if(n&1&&(Li(0,`span`,36),pk(1),Nc()),n&2){let e=HE().$implicit,i=HE(2).$implicit,o=HE();zm(`title`,o.t().driftTitle),Br(`data-testid`,`compose-drift-`+i.name+`-`+e.name),ec(),cg(o.t().drift)}}function Ot(n,t){if(n&1){let e=_E();Li(0,`app-service-build`,42),Zm(`finished`,function(o){$d(e);let s=HE().$implicit,u=HE(2).$implicit;return xd(HE().afterBuild(u.name,s.name,o))}),Nc()}if(n&2){let e=HE().$implicit,i=HE(2).$implicit,o=bk(0);zm(`project`,i.name)(`service`,e.name)(`disabled`,o)(`showResult`,!1)}}function zt(n,t){if(n&1&&Um(0,`app-build-output`,40),n&2){let e=HE().$implicit;zm(`service`,e.name)(`result`,t)}}function $t(n,t){if(n&1&&(Li(0,`span`,46),pk(1),Nc()),n&2){let e=t.$implicit;ec(),$c(` `,e.hostPort?e.hostPort+`:`+e.containerPort:e.containerPort,` `)}}function Vt(n,t){if(n&1&&(Li(0,`span`,44),Sc(1,$t,2,1,`span`,46,jt),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.ports.slice(0,2))}}function Ut(n,t){if(n&1&&(Li(0,`div`,41),Um(1,`app-state-dot`,20),Li(2,`a`,43),pk(3),Nc(),Li(4,`span`,44),pk(5),Nc(),Li(6,`span`,45),pk(7),Nc(),kE(8,Vt,3,0,`span`,44),Nc()),n&2){let e=t.$implicit;ec(),zm(`state`,e.state),ec(),zm(`routerLink`,kk(6,kt,e.id)),ec(),cg(e.name),ec(2),cg(e.status),ec(2),cg(e.image),ec(),SE(e.ports.length>0?8:-1)}}function Lt(n,t){if(n&1){let e=_E();Li(0,`div`,33)(1,`div`,34)(2,`div`,35),pk(3),Nc(),kE(4,Bt,2,3,`span`,36),kE(5,Ot,1,4,`app-service-build`,37),Li(6,`button`,38),Zm(`click`,function(){let o=$d(e).$implicit,s=HE(2).$implicit;return xd(HE().recreate(s,o))}),Um(7,`app-icon`,39),pk(8),Nc()(),kE(9,zt,1,2,`app-build-output`,40),Sc(10,Ut,9,8,`div`,41,Pt),Nc()}if(n&2){let e,i=t.$implicit,o=HE(2).$implicit,s=bk(0),u=HE();ec(3),cg(i.name),ec(),SE(u.drifted(o.name,i.name)?4:-1),ec(),SE(u.canBuild(o.name,i.name)?5:-1),ec(),rg(`ml-auto`,!u.canBuild(o.name,i.name)),zm(`disabled`,s||!u.canCompose(o))(`title`,u.canCompose(o)?u.t().recreateTitle:u.composeBlockedReason(o)),Br(`data-testid`,`compose-recreate-`+i.name)(`aria-label`,u.t().recreateAria(i.name)),ec(),zm(`size`,14),ec(),$c(` `,u.t().recreate,` `),ec(),SE((e=u.buildResult(o.name,i.name))?9:-1,e),ec(),Tc(i.containers)}}function Wt(n,t){if(n&1&&(Li(0,`div`,29),Sc(1,Lt,12,12,`div`,33,$e),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.services)}}function At(n,t){if(n&1){let e=_E();gg(0),Li(1,`div`,12)(2,`div`,17)(3,`button`,18),Zm(`click`,function(){let o=$d(e).$implicit;return xd(HE().toggle(o.name))}),Um(4,`app-icon`,19)(5,`app-state-dot`,20),Li(6,`span`,21),pk(7),Nc()(),Li(8,`span`,22),pk(9),Nc(),kE(10,It,2,2,`span`,23),Li(11,`div`,24)(12,`app-action-menu`,25),Zm(`picked`,function(o){let s=$d(e).$implicit;return xd(HE().onProjectMenu(o,s))}),Nc()()(),kE(13,Rt,2,1,`div`,26),kE(14,Ft,3,3,`div`,27),kE(15,Nt,3,7,`div`,28),kE(16,Wt,3,0,`div`,29),Nc()}if(n&2){let e,i,o=t.$implicit,s=HE(),u=yk(s.busy(o));ec(3),Br(`aria-expanded`,s.isExpanded(o.name))(`aria-label`,s.isExpanded(o.name)?s.t().collapse(o.name):s.t().expand(o.name)),ec(),zm(`name`,s.isExpanded(o.name)?`chevronDown`:`chevronRight`)(`size`,14),ec(),zm(`state`,o.state),ec(2),cg(o.name),ec(2),ug(` `,s.projectLabelOf(o.state),` · `,o.state===`down`?s.t().notStarted:s.t().runningOf(o.running,o.total),` `),ec(),SE((e=o.workingDir)?10:-1,e),ec(2),zm(`label`,s.t().menuAria(o.name))(`items`,s.projectMenu(o)),ec(),SE(u?13:-1),ec(),SE(o.missing?14:-1),ec(),SE((i=s.driftNote(o.name))?15:-1,i),ec(),SE(s.isExpanded(o.name)?16:-1)}}function Gt(n,t){if(n&1&&(Li(0,`p`,13),pk(1),Nc()),n&2){let e=HE();ec(),cg(e.t().empty)}}var kt;var $e;var Pt;var jt;var ze;p(()=>{Qr();ia();C$1();g();v();sS();J();dS();x();b();Be();Oe();_e();G$2();o();Qr();kt=n=>[`/containers`,n],$e=(n,t)=>t.name,Pt=(n,t)=>t.id,jt=(n,t)=>t.containerPort;ze=class n{containers=C(u);compose=C(p$1);t=Lt$1(()=>oS().compose);common=Lt$1(()=>oS().common);loading=this.containers.loading;problem=this.containers.problem;composePending=this.compose.pending;containerPending=this.containers.pending;status=this.compose.status;projects=Lt$1(()=>w(j(this.containers.containers()),this.compose.known()));opening=this.compose.opening;expanded=wt$1(new Set);confirmOpen=wt$1(!1);fileOpen=wt$1(!1);fileProject=wt$1(``);pendingDown=wt$1(null);updateOpen=wt$1(!1);drift=wt$1(new Map);buildable=wt$1(new Map);buildResults=wt$1(new Map);projectKey=Lt$1(()=>this.projects().filter(t=>t.workingDir!==null&&t.state!==`down`).map(t=>t.name).join(`
5
+ `));updateProject=wt$1(``);bestand=jc(void 0);afbreken=jc(void 0);bijwerken=jc(void 0);openen=jc(void 0);router=C(pe$1);route=C(Q);constructor(){this.containers.refresh(),this.compose.loadStatus(),this.compose.loadKnown(),Xd(()=>{let t=this.bestand();t!==void 0&&Ig(()=>{this.fileProject.set(t),this.fileOpen.set(!0),i(this.router,this.route,`bestand`)})}),Xd(()=>{let t=this.projectKey(),e=this.status()?.cliAvailable;t!==``&&e===!0&&Ig(()=>t.split(`
6
+ `).forEach(i=>{this.checkDrift(i),this.loadBuildable(i)}))}),Xd(()=>{let t=this.bijwerken();t!==void 0&&Ig(()=>{this.openUpdate(t),i(this.router,this.route,`bijwerken`)})}),Xd(()=>{this.openen()!==void 0&&Ig(()=>{i(this.router,this.route,`openen`),this.openComposeFile()})}),Xd(()=>{let t=this.afbreken();t!==void 0&&Ig(()=>{this.pendingDown.set(t),this.confirmOpen.set(!0),i(this.router,this.route,`afbreken`)})})}isExpanded(t){return this.expanded().has(t)}toggle(t){let e=new Set(this.expanded());e.delete(t)||e.add(t),this.expanded.set(e)}openComposeFile(){this.compose.openFile()}projectLabelOf(t){return this.t().state[t]}busy(t){return this.composePending().has(t.name)||t.containerIds.some(e=>this.containerPending().has(e))}composeBlockedReason(t){let e=this.status();return e!==null&&!e.cliAvailable?this.t().noCli:t.workingDir===null?this.t().noWorkingDir:t.missing?this.t().missing:``}canCompose(t){return this.composeBlockedReason(t)===``}run(t,e){this.containers.runMany(t,e.containerIds)}up(t){this.compose.up(t.name)}projectMenu(t){let e=this.t(),i=this.common(),o=this.busy(t),s=this.canCompose(t),u=s?void 0:this.composeBlockedReason(t);return t.state===`down`?[{id:`up`,label:e.up,icon:`plus`,disabled:o||!s,hint:u??`docker compose up -d`},{id:`file`,label:e.file.button,icon:`file`,disabled:t.missing,separated:!0},{id:`forget`,label:e.forget,icon:`eraser`,disabled:o,hint:e.forgetHint,separated:!0}]:[{id:`up`,label:e.up,icon:`plus`,disabled:o||!s,hint:u??`docker compose up -d`},{id:`start`,label:i.start,icon:`play`,disabled:o},{id:`stop`,label:i.stop,icon:`stop`,disabled:o},{id:`restart`,label:i.restart,icon:`refresh`,disabled:o},{id:`update`,label:e.update.menu,icon:`download`,disabled:o||!s,hint:u??e.update.hint},{id:`file`,label:e.file.button,icon:`file`,disabled:t.workingDir===null,separated:!0},{id:`down`,label:e.down,icon:`trash`,danger:!0,disabled:o||!s,hint:u??`docker compose down`,separated:!0}]}onProjectMenu(t,e){t===`up`?this.up(e):t===`update`?this.openUpdate(e.name):t===`file`?this.openFile(e):t===`down`?this.askDown(e):t===`forget`?this.compose.forget(e.name):this.run(t,e)}recreate(t,e){this.compose.recreate(t.name,e.name).then(()=>this.checkDrift(t.name))}async checkDrift(t){try{let e=await window.electron.compose.drift(t);this.drift.update(i=>new Map(i).set(t,e))}catch{}}async loadBuildable(t){try{let e=await window.electron.compose.buildable(t);this.buildable.update(i=>new Map(i).set(t,e))}catch{}}canBuild(t,e){return this.buildable().get(t)?.includes(e)===!0}afterBuild(t,e,i){this.buildResults.update(o=>new Map(o).set(`${t}/${e}`,i)),this.checkDrift(t)}buildResult(t,e){return this.buildResults().get(`${t}/${e}`)??null}drifted(t,e){let i=this.drift().get(t);return i?.ok===!0&&i.changed.includes(e)}driftNote(t){let e=this.drift().get(t);return e===void 0?null:e.ok?e.changed.length===0?null:{text:this.t().driftProject(e.changed.join(`, `)),problem:!1}:{text:this.t().driftProblem(e.problem),problem:!0}}openUpdate(t){this.updateProject.set(t),this.updateOpen.set(!0)}openFile(t){this.fileProject.set(t.name),this.fileOpen.set(!0)}askDown(t){this.pendingDown.set(t.name),this.confirmOpen.set(!0)}confirmDown(){let t=this.pendingDown();t!==null&&(this.compose.down(t),this.pendingDown.set(null))}downDescription(){let t=this.pendingDown();return t===null?``:this.t().downDialog.description(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-page`]],inputs:{bestand:[1,`bestand`],afbreken:[1,`afbreken`],bijwerken:[1,`bijwerken`],openen:[1,`openen`]},decls:23,vars:18,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-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`ml-auto`,`flex`,`items-start`,`gap-4`],[1,`text-right`],[1,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`compose-open-file`,1,`mx-btn`,`mx-focus`,`shrink-0`,3,`click`,`disabled`,`title`],[`name`,`file`,3,`size`],[3,`problem`],[1,`min-h-0`,`flex-1`,`space-y-3`,`overflow-y-auto`,`px-6`,`pb-6`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`],[1,`py-10`,`text-center`,`text-[13px]`,`text-ink-400`],[3,`openChange`,`open`,`project`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`],[1,`max-w-xs`,`text-[12px]`,`text-warn`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`,`px-3`,`py-2.5`],[`type`,`button`,1,`mx-focus`,`flex`,`min-w-0`,`cursor-pointer`,`items-center`,`gap-2`,`text-left`,3,`click`],[1,`shrink-0`,`text-ink-500`,3,`name`,`size`],[3,`state`],[1,`truncate`,`text-[14px]`,`font-medium`,`text-ink-100`],[1,`shrink-0`,`text-[12px]`,`text-ink-400`],[1,`min-w-0`,`truncate`,`font-mono`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`ml-auto`,`shrink-0`],[`compact`,``,3,`picked`,`label`,`items`],[1,`px-3`,`pb-2`,`text-[12px]`,`text-ink-500`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,`text-warn`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`class`,`title`],[1,`border-t`,`border-ink-800`],[`name`,`warning`,3,`size`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`title`],[3,`name`,`size`],[1,`border-b`,`border-ink-800`,`px-3`,`py-2`,`last:border-b-0`],[1,`flex`,`items-center`,`gap-3`],[1,`text-[12px]`,`font-medium`,`text-ink-300`],[1,`text-[11px]`,`text-accent`,3,`title`],[1,`ml-auto`,3,`project`,`service`,`disabled`,`showResult`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-1.5`,`mb-1`,3,`service`,`result`],[1,`mt-1`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`pl-3`,`text-[13px]`],[1,`ml-auto`,3,`finished`,`project`,`service`,`disabled`,`showResult`],[1,`mx-focus`,`min-w-0`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`routerLink`],[1,`shrink-0`,`text-ink-500`],[1,`min-w-0`,`truncate`,`text-ink-400`],[1,`mr-2`]],template:function(e,i){if(e&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),pk(5),Nc(),Li(6,`p`,4),pk(7),Nc()(),Li(8,`div`,5)(9,`div`,6),kE(10,Mt,2,1),kE(11,Tt,2,1,`div`,7),Nc(),Li(12,`button`,8),Zm(`click`,function(){return i.openComposeFile()}),Um(13,`app-icon`,9),pk(14),Nc()()(),Um(15,`app-page-messages`,10),Nc(),Li(16,`div`,11),Sc(17,At,17,16,`div`,12,$e,!1,Gt,2,1,`p`,13),Nc()(),Li(20,`app-compose-file-dialog`,14),fg(`openChange`,function(s){return vk(i.fileOpen,s)||(i.fileOpen=s),s}),Nc(),Li(21,`app-project-update-dialog`,14),fg(`openChange`,function(s){return vk(i.updateOpen,s)||(i.updateOpen=s),s}),Nc(),Li(22,`app-confirm-dialog`,15),fg(`openChange`,function(s){return vk(i.confirmOpen,s)||(i.confirmOpen=s),s}),Zm(`confirmed`,function(){return i.confirmDown()}),Nc()),e&2){let o;ec(5),cg(i.t().title),ec(2),cg(i.t().intro),ec(3),SE((o=i.status())?10:-1,o),ec(),SE(i.loading()?11:-1),ec(),zm(`disabled`,i.opening()||i.status()?.cliAvailable===!1)(`title`,i.t().openHint),ec(),zm(`size`,14),ec(),$c(` `,i.opening()?i.t().opening:i.t().openFile,` `),ec(),zm(`problem`,i.problem()),ec(2),Tc(i.projects()),ec(3),pg(`open`,i.fileOpen),zm(`project`,i.fileProject()),ec(),pg(`open`,i.updateOpen),zm(`project`,i.updateProject()),ec(),pg(`open`,i.confirmOpen),zm(`title`,i.t().downDialog.title)(`description`,i.downDescription())(`confirmLabel`,i.t().downDialog.confirm)}},dependencies:[Yt,My,W$1,u$1,c,se,pe,L,G,V],encapsulation:2})}})();export{ze as ComposePage};
@@ -0,0 +1,6 @@
1
+ import{$ as Nc,$n as sS,An as kk,Bn as p,Dn as kc,En as kE,Et as Um,G as Li$1,Gn as pk,In as oS,Kt as _E,Lt as X,M as Ig,Mt as W,Nn as mj,Nt as Wm,O as HE,P as Ik,Pn as nk,Pt as Wr,Q as My,Rt as Xd,Sn as iS,Sr as yk,Un as pg,Ut as Zm,V as Km,X as Mm,Zn as rg,a as Ak,ar as ug,bt as Tc,c as Br,cn as eH,d as CE,dn as fg,et as Nk,fn as fj,g as DE,gn as gj,gr as xd,hn as gg,hr as wt,in as cg,jn as lS,ln as ec,lr as vk,mt as Sc,n as $d,nn as bk,on as dS,pr as wc,pt as SE,q as Lt,qn as qr,rr as tg,s as Bd,sr as ve$1,t as $c,tt as Nm,u as C,ur as vr$1,ut as Qr,vt as TE,w as G,wn as jc,wr as zm,wt as UE,zt as Xm}from"./chunk-D9wKjS-4.js";import{n as y,t as o}from"./chunk-BdM_u7-N.js";import{a as Me$1,o as Ne$1}from"./chunk-t2gYzsd3.js";import{i as Wi$1,l as ia$1,o as Yt$1,s as ca$1,u as pe}from"./chunk-DDXVa5ug.js";import{n as p$1,t as g}from"./chunk-DUEEE1of.js";import"./chunk-DRSLMQv0.js";import{n as r,t as l}from"./chunk-BzctO2pl.js";import{a as x,i as h,r as d,t as A}from"./chunk-C0zZrY7Q.js";import{n as h$1,t as P}from"./chunk-DhhlIffD.js";import"./chunk-CI4m0buS.js";import"./chunk-DLduIDn8.js";import{_ as pn$1,d as dn$1,f as fn$1,g as ln$1,l as an$1,m as ie,r as Je,u as cn$1,v as un$1}from"./chunk-5_sGKQni.js";import{n as p$2,t as M}from"./chunk-aZvSgdSQ.js";import{n as v,t as u}from"./chunk-_SDm3Kr6.js";import{n as x$1,t as u$1}from"./chunk-Ci_V0cow.js";import{a as T,i as H,n as B,o as U,r as G$1,s as V,t as $}from"./chunk-DgQfvcw6.js";import{a as fi$1,i as _e,n as Qt$1,o as gi$1,r as Ye$1,s as we,t as Le$1}from"./chunk-DpQe-4PA.js";import{a as ve$2,n as Me$2,o as xe,r as Ze$1}from"./chunk-Dx6pB9SS.js";import{n as c,t as b}from"./chunk--8mGUJAn.js";import{a as z,i as r$1,n as O,r as d$1}from"./chunk-B-o5hXOb.js";import{a as oe,i as ie$1,n as S,o as ye,r as ae,t as Ce}from"./chunk-RW2CuHOJ.js";import{n as V$1,t as G$2}from"./chunk-DnoDi7LZ.js";import{n as W$1,t as J}from"./chunk-BYVhZ88_.js";function zn(i,t){if(i&1&&(Li$1(0,`pre`,15),pk(1),Nc(),Li$1(2,`p`,16),pk(3),Nc()),i&2){let e=HE(2);ec(),cg(e.markdown()),ec(2),cg(e.redactionText())}}function Bn(i,t){if(i&1&&(Li$1(0,`p`,7),pk(1),Nc()),i&2){let e=HE(2);ec(),$c(` `,e.problem(),` `)}}function $n(i,t){if(i&1&&(Li$1(0,`p`,8),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().collecting)}}function Wn(i,t){i&1&&(Li$1(0,`span`,10),pk(1),Nc()),i&2&&(ec(),cg(t))}function Hn(i,t){if(i&1){let e=_E();Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),kE(7,zn,4,2)(8,Bn,2,1,`p`,7)(9,$n,2,1,`p`,8),Li$1(10,`div`,9),kE(11,Wn,2,1,`span`,10),Li$1(12,`button`,11),Um(13,`app-icon`,12),pk(14),Nc(),Li$1(15,`button`,13),Zm(`click`,function(){$d(e);return xd(HE().copy())}),Um(16,`app-icon`,14),pk(17),Nc()()()()}if(i&2){let e,n,r=HE();ec(4),cg(r.t().title),ec(2),cg(r.t().description),ec(),SE((e=r.result()?.ok)===!0?7:e===!1?8:9),ec(4),SE((n=r.copyProblem())?11:-1,n),ec(2),zm(`size`,14),ec(),$c(` `,r.common().close,` `),ec(),zm(`disabled`,r.result()?.ok!==!0),ec(),zm(`name`,r.copied()?`check`:`copy`)(`size`,14),ec(),$c(` `,r.copied()?r.common().copied:r.common().copy,` `)}}var De;var Kt=p(()=>{Qr();Je();lS();dS();sS();Qr();De=class i{open=mj(!1);containerId=jc.required();t=Lt(()=>oS().containers.diagnosis);common=Lt(()=>oS().common);result=wt(null);copied=wt(!1);copyProblem=wt(null);constructor(){Xd(()=>{if(!this.open())return;let t=this.containerId();Ig(()=>{this.load(t)})})}markdown(){let t=this.result();return t?.ok===!0?t.markdown:``}problem(){let t=this.result();return t?.ok===!1?t.problem:``}redactionText(){let t=this.result(),e=t?.ok===!0?t.redactions:0;return e===0?this.t().noRedactions:this.t().redactions(e)}async copy(){let t=this.result();if(t?.ok===!0)try{await navigator.clipboard.writeText(t.markdown),this.copyProblem.set(null),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch(e){this.copyProblem.set(this.t().copyFailed(eH(e)))}}async load(t){this.result.set(null),this.copied.set(!1),this.copyProblem.set(null);try{this.result.set(await window.electron.containers.diagnose(t))}catch(e){this.result.set({ok:!1,problem:eH(e)})}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-diagnosis-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`]},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`,`diagnosis-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`,`items-center`,`justify-end`,`gap-2`],[1,`mr-auto`,`text-[12px]`,`text-danger`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`diagnosis-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`data-testid`,`diagnosis-text`,1,`mt-4`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre-wrap`,`text-ink-200`],[`data-testid`,`diagnosis-redactions`,1,`mt-2`,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,Hn,18,10,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Jn(i,t){if(i&1&&(Li$1(0,`p`,7),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().loading)}}function qn(i,t){if(i&1&&(Li$1(0,`p`,23),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().compose)}}function Gn(i,t){if(i&1){let e=_E();Li$1(0,`p`,14),pk(1),Nc(),Li$1(2,`div`,15)(3,`label`,16)(4,`span`,17),pk(5),Nc(),Li$1(6,`input`,18),Zm(`input`,function(r){$d(e);return xd(HE(2).amount.set(r.target.value))}),Nc()(),Li$1(7,`select`,19),Zm(`change`,function(r){$d(e);return xd(HE(2).unit.set(r.target.value))}),Li$1(8,`option`,20),pk(9,`MB`),Nc(),Li$1(10,`option`,21),pk(11,`GB`),Nc()()(),Li$1(12,`p`,22),pk(13),Nc(),kE(14,qn,2,1,`p`,23)}if(i&2){let e=HE(2);ec(),$c(` `,e.current()===null?e.t().none:e.t().current(e.format(e.current()??0)),` `),ec(4),cg(e.t().label),ec(),nk(e.field+` mt-1.5 w-full`),zm(`value`,e.amount()),Br(`aria-label`,e.t().label),ec(),nk(e.field),Br(`aria-label`,e.t().unit),ec(),zm(`selected`,e.unit()===`MB`),ec(2),zm(`selected`,e.unit()===`GB`),ec(3),cg(e.t().noRemove),ec(),SE(e.compose()?14:-1)}}function Un(i,t){i&1&&(Li$1(0,`p`,8),pk(1),Nc()),i&2&&(ec(),cg(t))}function Kn(i,t){if(i&1){let e=_E();Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),kE(7,Jn,2,1,`p`,7)(8,Gn,15,13),kE(9,Un,2,1,`p`,8),Li$1(10,`div`,9)(11,`button`,10),Um(12,`app-icon`,11),pk(13),Nc(),Li$1(14,`button`,12),Zm(`click`,function(){$d(e);return xd(HE().save())}),Um(15,`app-icon`,13),pk(16),Nc()()()()}if(i&2){let e,n=HE();ec(4),cg(n.t().title),ec(2),cg(n.t().description),ec(),SE(n.loading()?7:8),ec(2),SE((e=n.problem())?9:-1,e),ec(3),zm(`size`,14),ec(),$c(` `,n.common().close,` `),ec(),zm(`disabled`,n.loading()||n.saving()),ec(),zm(`size`,14),ec(),$c(` `,n.saving()?n.t().saving:n.t().save,` `)}}function Qn(i,t){let e=Number(i.replace(`,`,`.`));return!Number.isFinite(e)||e<=0?null:Math.round(e*(t===`GB`?Ue:Ke))}var Ke;var Ue;var Zn;var Se;var Zt=p(()=>{Qr();Je();lS();h();dS();ca$1();sS();Qr();Ke=1024*1024,Ue=1024*Ke,Zn=`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`;Se=class i{open=mj(!1);containerId=jc.required();compose=jc(!1);saved=fj();toast=C(Wi$1);t=Lt(()=>oS().containers.memoryLimit);common=Lt(()=>oS().common);field=Zn;current=wt(null);amount=wt(``);unit=wt(`MB`);loading=wt(!0);saving=wt(!1);problem=wt(null);constructor(){Xd(()=>{if(!this.open())return;let t=this.containerId();Ig(()=>{this.load(t)})})}format(t){return d(t)}async save(){let t=Qn(this.amount(),this.unit());if(t===null){this.problem.set(this.t().invalid);return}this.saving.set(!0),this.problem.set(null);try{let e=await window.electron.containers.setMemoryLimit(this.containerId(),t);e.ok?(this.toast.success(this.t().saved(d(t))),this.saved.emit(),this.open.set(!1)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.saving.set(!1)}}async load(t){this.loading.set(!0),this.problem.set(null);try{let e=await window.electron.containers.memoryLimit(t);if(e.ok){this.current.set(e.limitBytes);let n=e.limitBytes;n!==null&&n%Ue===0?(this.unit.set(`GB`),this.amount.set(String(n/Ue))):(this.unit.set(`MB`),this.amount.set(n===null?``:String(Math.round(n/Ke))))}else this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-memory-limit-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],compose:[1,`compose`]},outputs:{open:`openChange`,saved:`saved`},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`,`memory-limit-dialog`,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`,`text-[13px]`,`text-ink-400`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`memory-limit-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`check`,3,`size`],[`data-testid`,`memory-limit-current`,1,`mt-4`,`text-[13px]`,`text-ink-200`],[1,`mt-3`,`flex`,`items-end`,`gap-2`],[1,`block`,`flex-1`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`number`,`min`,`1`,`step`,`any`,3,`input`,`value`],[3,`change`],[`value`,`MB`,3,`selected`],[`value`,`GB`,3,`selected`],[1,`mt-3`,`text-[12px]`,`text-ink-500`],[1,`mt-1`,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,Kn,17,9,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Yn(i,t){if(i&1&&(Li$1(0,`p`,7),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().loading)}}function Xn(i,t){if(i&1&&(Li$1(0,`p`,20),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().compose)}}function ei(i,t){if(i&1){let e=_E();Li$1(0,`p`,14),pk(1),Nc(),Li$1(2,`label`,15)(3,`span`,16),pk(4),Nc(),Li$1(5,`input`,17),Zm(`input`,function(r){$d(e);return xd(HE(2).amount.set(r.target.value))}),Nc()(),Li$1(6,`p`,18),pk(7),Nc(),Li$1(8,`p`,19),pk(9),Nc(),kE(10,Xn,2,1,`p`,20)}if(i&2){let e=HE(2);ec(),$c(` `,e.current()===null?e.t().none:e.t().current(e.format(e.current()??0)),` `),ec(3),cg(e.t().label),ec(),nk(e.field+` mt-1.5 w-full`),zm(`value`,e.amount()),Br(`aria-label`,e.t().label),ec(2),cg(e.t().hint(e.format(e.max()))),ec(2),cg(e.t().noRemove),ec(),SE(e.compose()?10:-1)}}function ti(i,t){i&1&&(Li$1(0,`p`,8),pk(1),Nc()),i&2&&(ec(),cg(t))}function ni(i,t){if(i&1){let e=_E();Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),kE(7,Yn,2,1,`p`,7)(8,ei,11,9),kE(9,ti,2,1,`p`,8),Li$1(10,`div`,9)(11,`button`,10),Um(12,`app-icon`,11),pk(13),Nc(),Li$1(14,`button`,12),Zm(`click`,function(){$d(e);return xd(HE().save())}),Um(15,`app-icon`,13),pk(16),Nc()()()()}if(i&2){let e,n=HE();ec(4),cg(n.t().title),ec(2),cg(n.t().description),ec(),SE(n.loading()?7:8),ec(2),SE((e=n.problem())?9:-1,e),ec(3),zm(`size`,14),ec(),$c(` `,n.common().close,` `),ec(),zm(`disabled`,n.loading()||n.saving()),ec(),zm(`size`,14),ec(),$c(` `,n.saving()?n.t().saving:n.t().save,` `)}}function ai(i){let t=Number(i.trim().replace(`,`,`.`));return Number.isFinite(t)&&t>0?t:null}function Ze(i,t){return new Intl.NumberFormat(t,{maximumFractionDigits:2}).format(i)}var ii;var Ie;var Qt=p(()=>{Qr();Je();y();lS();sS();dS();ca$1();Qr();ii=`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`;Ie=class i{open=mj(!1);containerId=jc.required();compose=jc(!1);saved=fj();toast=C(Wi$1);engine=C(o);t=Lt(()=>oS().containers.cpuLimit);common=Lt(()=>oS().common);field=ii;max=Lt(()=>this.engine.status()?.info?.cpus??1);current=wt(null);amount=wt(``);loading=wt(!0);saving=wt(!1);problem=wt(null);constructor(){Xd(()=>{if(!this.open())return;let t=this.containerId();Ig(()=>{this.load(t)})})}format(t){return Ze(t,iS())}async save(){let t=ai(this.amount());if(t===null){this.problem.set(this.t().invalid);return}this.saving.set(!0),this.problem.set(null);try{let e=await window.electron.containers.setCpuLimit(this.containerId(),t);e.ok?(this.toast.success(this.t().saved(this.format(t))),this.saved.emit(),this.open.set(!1)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.saving.set(!1)}}async load(t){this.loading.set(!0),this.problem.set(null);try{let e=await window.electron.containers.cpuLimit(t);e.ok?(this.current.set(e.cpus),this.amount.set(e.cpus===null?``:this.format(e.cpus))):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-cpu-limit-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],compose:[1,`compose`]},outputs:{open:`openChange`,saved:`saved`},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`,`cpu-limit-dialog`,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`,`text-[13px]`,`text-ink-400`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`cpu-limit-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`check`,3,`size`],[`data-testid`,`cpu-limit-current`,1,`mt-4`,`text-[13px]`,`text-ink-200`],[1,`mt-3`,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`inputmode`,`decimal`,`autocomplete`,`off`,3,`input`,`value`],[1,`mt-1.5`,`text-[12px]`,`text-ink-500`],[1,`mt-3`,`text-[12px]`,`text-ink-500`],[1,`mt-1`,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,ni,17,9,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function ri(i,t){i&1&&(Li$1(0,`p`,0),pk(1),Nc()),i&2&&(ec(),cg(t))}function li(i,t){if(i&1&&(Li$1(0,`p`,6),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().empty)}}function si(i,t){if(i&1){let e=_E();Li$1(0,`button`,17),Zm(`click`,function(){$d(e);let r=HE().$implicit;return xd(HE(3).reveal(r.name))}),pk(1,` •••••••• `),Li$1(2,`span`,18),pk(3),Nc()()}if(i&2){let e=HE().$implicit,n=HE(3);Br(`aria-label`,n.t().reveal(e.name))(`data-testid`,`env-reveal-`+e.name),ec(3),cg(n.t().show)}}function di(i,t){if(i&1&&(Li$1(0,`span`,15),pk(1),Nc()),i&2){let e=HE(4);ec(),cg(e.t().emptyValue)}}function ci(i,t){if(i&1&&pk(0),i&2){let e=HE().$implicit;$c(` `,e.value,` `)}}function mi(i,t){if(i&1&&(Li$1(0,`tr`,11)(1,`td`,12),pk(2),Nc(),Li$1(3,`td`,13),kE(4,si,4,3,`button`,14)(5,di,2,1,`span`,15)(6,ci,1,1),Nc(),Li$1(7,`td`,16),pk(8),Nc()()),i&2){let e=t.$implicit,n=HE(3);Br(`data-testid`,`env-`+e.name),ec(2),cg(e.name),ec(2),SE(n.hidden(e)?4:e.value===``?5:6),ec(3),nk(e.source===`image`?`text-ink-500`:`text-ink-300`),ec(),cg(n.t().sources[e.source])}}function pi(i,t){if(i&1&&(Li$1(0,`table`,7)(1,`thead`)(2,`tr`,8)(3,`th`,9),pk(4),Nc(),Li$1(5,`th`,9),pk(6),Nc(),Li$1(7,`th`,10),pk(8),Nc()()(),Li$1(9,`tbody`),Sc(10,mi,9,6,`tr`,11,oi),Nc()()),i&2){let e=HE(),n=HE();ec(4),cg(n.t().name),ec(2),cg(n.t().value),ec(2),cg(n.t().source),ec(2),Tc(e)}}function ui(i,t){if(i&1){let e=_E();Li$1(0,`div`,2)(1,`p`,3),pk(2),Nc(),Li$1(3,`button`,4),Zm(`click`,function(){$d(e);return xd(HE().copyAll())}),Um(4,`app-icon`,5),pk(5),Nc()(),kE(6,li,2,1,`p`,6)(7,pi,12,3,`table`,7)}if(i&2){let e=t,n=HE();ec(2),cg(n.compose()?n.t().composeNote:n.t().readOnly),ec(),zm(`disabled`,e.length===0),ec(),zm(`size`,14),ec(),$c(` `,n.t().copyAll,` `),ec(),SE(e.length===0?6:7)}}function _i(i,t){if(i&1&&(Li$1(0,`p`,1),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().loading)}}var oi;var Ee;var Yt=p(()=>{Qr();lS();sS();dS();ca$1();Qr();oi=(i,t)=>t.name;Ee=class i{containerId=jc.required();compose=jc(!1);toast=C(Wi$1);t=Lt(()=>oS().containers.environment);variables=wt(null);problem=wt(null);revealed=wt(new Set);constructor(){Xd(()=>{let t=this.containerId();Ig(()=>{this.load(t)})})}hidden(t){return t.secret&&!this.revealed().has(t.name)}reveal(t){this.revealed.update(e=>new Set(e).add(t))}async copyAll(){let t=this.variables()??[],e=t.filter(n=>!this.hidden(n));try{await navigator.clipboard.writeText(e.map(n=>`${n.name}=${n.value}`).join(`
2
+ `)),this.toast.success(this.t().copied(e.length,t.length-e.length))}catch(n){this.toast.error(eH(n))}}async load(t){this.variables.set(null),this.problem.set(null),this.revealed.set(new Set);try{let e=await window.electron.containers.environment(t);e.ok?this.variables.set(e.variables):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-environment-view`]],hostAttrs:[1,`block`,`h-full`,`overflow-auto`,`px-6`,`py-4`],inputs:{containerId:[1,`containerId`],compose:[1,`compose`]},decls:3,vars:1,consts:[[1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`text-[13px]`,`text-ink-400`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`],[1,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`env-copy`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`,`disabled`],[`name`,`copy`,3,`size`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`w-full`,`text-[13px]`],[1,`border-b`,`border-ink-700`,`text-left`,`text-[12px]`,`text-ink-400`],[1,`py-1.5`,`pr-4`,`font-normal`],[1,`w-36`,`py-1.5`,`font-normal`],[1,`border-b`,`border-ink-800`,`align-top`],[1,`py-1.5`,`pr-4`,`font-mono`,`text-[12px]`,`break-all`,`text-ink-100`],[1,`py-1.5`,`pr-4`,`font-mono`,`text-[12px]`,`break-all`,`text-ink-300`],[`type`,`button`,1,`mx-focus`,`rounded`,`text-ink-500`,`hover:text-ink-200`],[1,`text-ink-600`],[1,`py-1.5`,`text-[12px]`],[`type`,`button`,1,`mx-focus`,`rounded`,`text-ink-500`,`hover:text-ink-200`,3,`click`],[1,`font-sans`,`text-[11px]`,`underline`]],template:function(e,n){if(e&1&&kE(0,ri,2,1,`p`,0)(1,ui,8,5)(2,_i,2,1,`p`,1),e&2){let r;SE((r=n.problem())?0:(r=n.variables())?1:2,r)}},dependencies:[My],encapsulation:2})}});function xi(i,t){if(i&1&&(Li$1(0,`p`,7),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().loading)}}function gi(i,t){if(i&1&&(Li$1(0,`option`,17),pk(1),Nc()),i&2){let e=t.$implicit,n=HE(3);zm(`value`,e)(`selected`,n.name()===e),ec(),cg(n.t().names[e])}}function yi(i,t){if(i&1){let e=_E();Li$1(0,`label`,18)(1,`span`,15),pk(2),Nc(),Li$1(3,`input`,19),Zm(`input`,function(r){$d(e);return xd(HE(3).setMaximum(r.target.value))}),Nc(),Li$1(4,`span`,20),pk(5),Nc()()}if(i&2){let e=HE(3);ec(2),cg(e.t().maximum),ec(),nk(e.field+` mt-1.5 w-full`),zm(`value`,e.maximum()),Br(`aria-label`,e.t().maximum),ec(2),cg(e.t().maximumHint)}}function fi(i,t){if(i&1){let e=_E();Li$1(0,`label`,14)(1,`span`,15),pk(2),Nc(),Li$1(3,`select`,16),Zm(`change`,function(r){$d(e);return xd(HE(2).choose(r.target.value))}),Sc(4,gi,2,3,`option`,17,kc),Nc()(),kE(6,yi,6,6,`label`,18)}if(i&2){let e=HE(2);ec(2),cg(e.t().label),ec(),nk(e.field+` mt-1.5 w-full`),Br(`aria-label`,e.t().label),ec(),Tc(e.names),ec(2),SE(e.name()===`on-failure`?6:-1)}}function vi(i,t){i&1&&(Li$1(0,`p`,8),pk(1),Nc()),i&2&&(ec(),$c(` `,t,` `))}function hi(i,t){if(i&1){let e=_E();Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),kE(7,xi,2,1,`p`,7)(8,fi,7,5),kE(9,vi,2,1,`p`,8),Li$1(10,`div`,9)(11,`button`,10),Um(12,`app-icon`,11),pk(13),Nc(),Li$1(14,`button`,12),Zm(`click`,function(){$d(e);return xd(HE().save())}),Um(15,`app-icon`,13),pk(16),Nc()()()()}if(i&2){let e,n=HE();ec(4),cg(n.t().title),ec(2),cg(n.t().description),ec(),SE(n.loading()?7:8),ec(2),SE((e=n.problem())?9:-1,e),ec(3),zm(`size`,14),ec(),$c(` `,n.common().close,` `),ec(),zm(`disabled`,n.loading()||n.saving()),ec(),zm(`size`,14),ec(),$c(` `,n.saving()?n.t().saving:n.t().save,` `)}}var Xt;var bi;var Te;var en=p(()=>{Qr();Je();lS();dS();ca$1();sS();Qr();Xt=[`no`,`always`,`unless-stopped`,`on-failure`],bi=`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`,Te=class i{open=mj(!1);containerId=jc.required();toast=C(Wi$1);t=Lt(()=>oS().containers.restartPolicy);common=Lt(()=>oS().common);field=bi;names=Xt;name=wt(`no`);maximum=wt(0);loading=wt(!0);saving=wt(!1);problem=wt(null);constructor(){Xd(()=>{if(!this.open())return;let t=this.containerId();Ig(()=>{this.load(t)})})}choose(t){this.name.set(Xt.find(e=>e===t)??`no`)}setMaximum(t){let e=Number.parseInt(t,10);this.maximum.set(Number.isNaN(e)?0:Math.min(100,Math.max(0,e)))}async save(){this.saving.set(!0),this.problem.set(null);try{let t={name:this.name(),maximumRetryCount:this.maximum()},e=await window.electron.containers.setRestartPolicy(this.containerId(),t);e.ok?(this.toast.success(this.t().saved(this.t().names[t.name])),this.open.set(!1)):this.problem.set(e.problem)}catch(t){this.problem.set(eH(t))}finally{this.saving.set(!1)}}async load(t){this.loading.set(!0),this.problem.set(null);try{let e=await window.electron.containers.restartPolicy(t);e.ok?(this.name.set(e.policy.name),this.maximum.set(e.policy.maximumRetryCount)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-restart-policy-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`]},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`,`restart-policy-dialog`,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`,`text-[13px]`,`text-ink-400`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`restart-policy-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`check`,3,`size`],[1,`mt-4`,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[3,`change`],[3,`value`,`selected`],[1,`mt-3`,`block`],[`type`,`number`,`min`,`0`,`max`,`100`,3,`input`,`value`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,hi,17,9,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function wi(i,t){if(i&1&&(qr(0,`p`,0),pk(1),Wr()),i&2){let e=HE();ec(),cg(e.t().notRunning)}}function ki(i,t){i&1&&(qr(0,`p`,1),pk(1),Wr()),i&2&&(ec(),cg(t))}function Di(i,t){if(i&1&&(qr(0,`span`,18),pk(1),Wr()),i&2){let e=HE(3);ec(),cg(e.t().redacted)}}function Si(i,t){if(i&1){let e=_E();qr(0,`tr`,11)(1,`td`,12),pk(2),Wr(),qr(3,`td`,13),pk(4),Wr(),qr(5,`td`,14),pk(6),Wr(),qr(7,`td`,14),pk(8),Wr(),qr(9,`td`,15),pk(10),Wr(),qr(11,`td`,16)(12,`button`,17),Km(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).toggle(r.pid))}),pk(13),Wr(),kE(14,Di,2,1,`span`,18),Wr()()}if(i&2){let e=t.$implicit,n=HE(2);Br(`data-testid`,`process-`+e.pid),ec(2),cg(e.pid),ec(),Wm(`title`,e.user),ec(),cg(e.user),ec(2),cg(n.percent(e.cpu)),ec(2),cg(n.percent(e.memory)),ec(2),cg(e.elapsed),ec(2),rg(`truncate`,!n.expanded().has(e.pid))(`break-all`,n.expanded().has(e.pid)),Wm(`title`,n.expanded().has(e.pid)?``:e.command),Br(`aria-expanded`,n.expanded().has(e.pid)),ec(),$c(` `,e.command,` `),ec(),SE(e.redacted?14:-1)}}function Ii(i,t){if(i&1&&(qr(0,`p`,3),pk(1),Wr(),qr(2,`table`,4)(3,`thead`)(4,`tr`,5)(5,`th`,6),pk(6,`PID`),Wr(),qr(7,`th`,7),pk(8),Wr(),qr(9,`th`,8),pk(10,`CPU`),Wr(),qr(11,`th`,9),pk(12),Wr(),qr(13,`th`,7),pk(14),Wr(),qr(15,`th`,10),pk(16),Wr()()(),qr(17,`tbody`),Sc(18,Si,15,15,`tr`,11,Ci),Wr()()),i&2){let e=t,n=HE();ec(),ug(``,n.t().hint(e.length),` `,n.t().pids),ec(7),cg(n.t().user),ec(4),cg(n.t().memory),ec(2),cg(n.t().elapsed),ec(2),cg(n.t().command),ec(2),Tc(e)}}function Ei(i,t){if(i&1&&(qr(0,`p`,2),pk(1),Wr()),i&2){let e=HE();ec(),cg(e.t().loading)}}var Ci;var Ti;var Me;var tn=p(()=>{Qr();lS();sS();Qr();Ci=(i,t)=>t.pid;Ti=3e3,Me=class i{containerId=jc.required();active=jc(!1);running=jc(!0);t=Lt(()=>oS().containers.processes);processes=wt(null);problem=wt(null);expanded=wt(new Set);timer=null;constructor(){C(ve$1).onDestroy(()=>this.stop()),Xd(()=>{let t=this.containerId(),e=this.active()&&this.running();Ig(()=>{this.stop(),e&&(this.load(t),this.timer=setInterval(()=>{this.load(t)},Ti))})})}percent(t){return t===null?`—`:`${new Intl.NumberFormat(iS(),{maximumFractionDigits:1}).format(t)}%`}toggle(t){let e=new Set(this.expanded());e.delete(t)||e.add(t),this.expanded.set(e)}stop(){this.timer!==null&&(clearInterval(this.timer),this.timer=null)}async load(t){try{let e=await window.electron.containers.processes(t);e.ok?(this.processes.set(e.processes),this.problem.set(null)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-processes-view`]],hostAttrs:[1,`block`,`h-full`,`overflow-auto`,`px-6`,`py-4`],inputs:{containerId:[1,`containerId`],active:[1,`active`],running:[1,`running`]},decls:4,vars:1,consts:[[`data-testid`,`processes-stopped`,1,`text-[13px]`,`text-ink-400`],[`role`,`alert`,1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`text-[13px]`,`text-ink-400`],[1,`text-[12px]`,`text-ink-500`],[`data-testid`,`processes`,1,`mt-3`,`w-full`,`table-fixed`,`text-[13px]`],[1,`border-b`,`border-ink-700`,`text-left`,`text-[12px]`,`text-ink-400`],[1,`w-20`,`py-1.5`,`pr-3`,`font-normal`],[1,`w-28`,`py-1.5`,`pr-3`,`font-normal`],[1,`w-16`,`py-1.5`,`pr-3`,`text-right`,`font-normal`],[1,`w-20`,`py-1.5`,`pr-3`,`text-right`,`font-normal`],[1,`py-1.5`,`font-normal`],[1,`border-b`,`border-ink-800`,`align-top`],[1,`py-1.5`,`pr-3`,`font-mono`,`text-[12px]`,`tabular-nums`,`text-ink-300`],[1,`truncate`,`py-1.5`,`pr-3`,`text-ink-300`,3,`title`],[1,`py-1.5`,`pr-3`,`text-right`,`tabular-nums`,`text-ink-200`],[1,`py-1.5`,`pr-3`,`font-mono`,`text-[12px]`,`text-ink-400`],[1,`py-1.5`,`font-mono`,`text-[12px]`,`text-ink-100`],[`type`,`button`,1,`mx-focus`,`w-full`,`cursor-pointer`,`text-left`,3,`click`,`title`],[1,`font-sans`,`text-[11px]`,`text-ink-500`]],template:function(e,n){if(e&1&&kE(0,wi,2,1,`p`,0)(1,ki,2,1,`p`,1)(2,Ii,20,6)(3,Ei,2,1,`p`,2),e&2){let r;SE(n.running()?(r=n.problem())?1:(r=n.processes())?2:3:0,r)}},encapsulation:2})}});function Ni(i,t){if(i&1){let e=_E();Li$1(0,`button`,15),Zm(`click`,function(){let r=$d(e);return xd(HE(4).openComposeFile(r))}),Um(1,`app-icon`,16),pk(2),Nc()}if(i&2){let e=HE(4);ec(),zm(`size`,14),ec(),$c(` `,e.t().openFile,` `)}}function Pi(i,t){if(i&1&&(Li$1(0,`p`,10),pk(1),Nc(),Li$1(2,`div`,11)(3,`button`,12),Um(4,`app-icon`,13),pk(5),Nc(),kE(6,Ni,3,2,`button`,14),Nc()),i&2){let e,n=HE(3);ec(),cg(n.t().compose),ec(3),zm(`size`,14),ec(),$c(` `,n.common().close),ec(),SE((e=n.project())?6:-1,e)}}function Ri(i,t){if(i&1&&(Li$1(0,`span`,21),pk(1),Nc()),i&2){let e=HE(4);ec(),cg(e.t().envInvalid(t))}}function Li(i,t){if(i&1&&(Li$1(0,`span`,22),pk(1),Nc()),i&2){let e=HE(4);ec(),cg(e.t().envHint)}}function Fi(i,t){if(i&1){let e=_E();Li$1(0,`div`,43)(1,`input`,44),Zm(`input`,function(r){let c=$d(e).$index;return xd(HE(5).setPort(c,r.target.value))}),Nc(),Li$1(2,`span`,45),pk(3,`→`),Nc(),Li$1(4,`span`,46),pk(5),Nc()()}if(i&2){let e=t.$implicit,n=t.$index,r=HE(5);ec(),nk(r.field+` w-24`),zm(`value`,r.hostPorts()[n]??``),Br(`aria-label`,r.t().hostPort(r.label(e)))(`data-testid`,`adjust-port-`+e.containerPort),ec(4),cg(r.label(e))}}function ji(i,t){if(i&1&&(Li$1(0,`div`)(1,`p`,19),pk(2),Nc(),Li$1(3,`div`,27),Sc(4,Fi,6,6,`div`,43,Vi),Nc(),Li$1(6,`p`,22),pk(7),Nc()()),i&2){let e=HE(2),n=HE(2);ec(2),cg(n.t().ports),ec(2),Tc(e.ports),ec(3),cg(n.t().portHint)}}function Oi(i,t){if(i&1&&(Li$1(0,`option`,25),pk(1),Nc()),i&2){let e=t.$implicit,n=HE(4);zm(`value`,e),ec(),cg(n.policyNames()[e])}}function Ai(i,t){if(i&1&&(Li$1(0,`span`,54),pk(1),Nc(),Li$1(2,`span`,55),pk(3),Nc()),i&2){let e=HE().$implicit,n=HE(4);ec(),cg(e.kind===`volume`?n.t().mountVolume:n.t().mountFolder),ec(),zm(`title`,e.source),ec(),$c(` `,e.anonymous?n.t().anonymous:e.source,` `)}}function zi(i,t){if(i&1){let e=_E();Li$1(0,`button`,61),Zm(`click`,function(){$d(e);let r=HE(2).$index;return xd(HE(4).chooseFolder(r))}),Um(1,`app-icon`,62),pk(2),Nc()}if(i&2){let e=HE(2).$index,n=HE(4);Br(`data-testid`,`adjust-mount-choose-`+e),ec(),zm(`size`,13),ec(),$c(` `,n.t().choose,` `)}}function Bi(i,t){if(i&1){let e=_E();Li$1(0,`select`,56),Zm(`change`,function(r){$d(e);let c=HE().$index;return xd(HE(4).setMount(c,{kind:r.target.value}))}),Li$1(1,`option`,57),pk(2),Nc(),Li$1(3,`option`,58),pk(4),Nc()(),Li$1(5,`input`,59),Zm(`input`,function(r){$d(e);let c=HE().$index;return xd(HE(4).setMount(c,{source:r.target.value}))}),Nc(),kE(6,zi,3,3,`button`,60)}if(i&2){let e=HE(),n=e.$implicit,r=e.$index,c=HE(4);nk(c.field+` w-24`),zm(`value`,n.kind),Br(`data-testid`,`adjust-mount-kind-`+r),ec(2),cg(c.t().mountVolume),ec(2),cg(c.t().mountFolder),ec(),nk(c.field+` min-w-0 flex-1`),zm(`value`,n.source),Br(`list`,n.kind===`volume`?`adjust-known-volumes`:null)(`aria-label`,c.t().source)(`placeholder`,n.kind===`volume`?`mysql-data`:`C:\\projecten\\site`)(`data-testid`,`adjust-mount-source-`+r),ec(),SE(n.kind===`bind`?6:-1)}}function $i(i,t){if(i&1&&(Li$1(0,`span`,47),pk(1),Nc()),i&2){let e=HE().$implicit;ec(),cg(e.target)}}function Wi(i,t){if(i&1){let e=_E();Li$1(0,`input`,63),Zm(`input`,function(r){$d(e);let c=HE().$index;return xd(HE(4).setMount(c,{target:r.target.value}))}),Nc()}if(i&2){let e=HE(),n=e.$implicit,r=e.$index,c=HE(4);nk(c.field+` w-44`),zm(`value`,n.target),Br(`aria-label`,c.t().target)(`data-testid`,`adjust-mount-target-`+r)}}function Hi(i,t){if(i&1&&(Li$1(0,`span`,53),pk(1),Nc()),i&2){let e=HE().$implicit,n=HE(4);ec(),cg(n.t().newVolume(e.source.trim()))}}function Ji(i,t){if(i&1){let e=_E();Li$1(0,`div`,28),kE(1,Ai,4,3)(2,Bi,7,14),Li$1(3,`span`,45),pk(4,`→`),Nc(),kE(5,$i,2,1,`span`,47)(6,Wi,1,5,`input`,48),Li$1(7,`label`,49)(8,`input`,50),Zm(`change`,function(r){let c=$d(e).$index;return xd(HE(4).setMount(c,{readOnly:r.target.checked}))}),Nc(),pk(9),Nc(),Li$1(10,`button`,51),Zm(`click`,function(){let r=$d(e).$index;return xd(HE(4).removeMount(r))}),Um(11,`app-icon`,52),Nc(),kE(12,Hi,2,1,`span`,53),Nc()}if(i&2){let e=t.$implicit,n=t.$index,r=HE(4);ec(),SE(e.existing?1:2),ec(4),SE(e.existing?5:6),ec(3),zm(`checked`,e.readOnly),Br(`data-testid`,`adjust-mount-ro-`+n),ec(),$c(` `,r.t().readOnly,` `),ec(),Br(`aria-label`,r.t().removeMount(e.target||e.source))(`data-testid`,`adjust-mount-remove-`+n),ec(),zm(`size`,13),ec(),SE(!e.existing&&e.kind===`volume`&&e.source.trim()!==``&&!r.knownVolumes().includes(e.source.trim())?12:-1)}}function qi(i,t){if(i&1&&Um(0,`option`,25),i&2){let e=t.$implicit;zm(`value`,e)}}function Gi(i,t){if(i&1&&(Li$1(0,`p`,30),pk(1),Nc()),i&2){let e=t.$implicit,n=HE(4);ec(),cg(n.t().removedData(e))}}function Ui(i,t){if(i&1&&(Li$1(0,`p`,31),pk(1),Nc()),i&2){let e=HE(4);ec(),cg(e.t().mountInvalid)}}function Ki(i,t){if(i&1&&(Li$1(0,`p`,35),pk(1),Nc()),i&2){let e=HE(4);ec(),cg(e.t().healthOfImage(e.describe(t)))}}function Zi(i,t){if(i&1){let e=_E();Li$1(0,`label`,37)(1,`input`,64),Zm(`change`,function(){let r=$d(e).$implicit;return xd(HE(4).healthMode.set(r.mode))}),Nc(),pk(2),Nc()}if(i&2){let e=t.$implicit,n=HE(4);ec(),zm(`checked`,n.healthMode()===e.mode),Br(`data-testid`,`adjust-health-`+e.mode),ec(),$c(` `,e.label,` `)}}function Qi(i,t){if(i&1){let e=_E();Li$1(0,`div`,38)(1,`input`,65),Zm(`input`,function(r){$d(e);return xd(HE(4).healthCommand.set(r.target.value))}),Nc(),Li$1(2,`label`,49),pk(3),Li$1(4,`input`,66),Zm(`input`,function(r){$d(e);return xd(HE(4).healthInterval.set(+r.target.value))}),Nc()(),Li$1(5,`label`,49),pk(6),Li$1(7,`input`,67),Zm(`input`,function(r){$d(e);return xd(HE(4).healthRetries.set(+r.target.value))}),Nc()()()}if(i&2){let e=HE(4);ec(),nk(e.field+` min-w-0 flex-1`),zm(`value`,e.healthCommand()),Br(`aria-label`,e.t().command),ec(2),$c(` `,e.t().interval,` `),ec(),nk(e.field+` w-20`),zm(`value`,e.healthInterval()),ec(2),$c(` `,e.t().retries,` `),ec(),nk(e.field+` w-16`),zm(`value`,e.healthRetries())}}function Yi(i,t){i&1&&(Li$1(0,`p`,39),pk(1),Nc()),i&2&&(ec(),cg(t))}function Xi(i,t){if(i&1){let e=_E();Li$1(0,`form`,17),Zm(`submit`,function(r){$d(e);return xd(HE(3).submit(r))}),Li$1(1,`label`,18)(2,`span`,19),pk(3),Nc(),Li$1(4,`textarea`,20),Zm(`input`,function(r){$d(e);return xd(HE(3).envText.set(r.target.value))}),Nc(),kE(5,Ri,2,1,`span`,21)(6,Li,2,1,`span`,22),Nc(),kE(7,ji,8,2,`div`),Li$1(8,`label`,23)(9,`span`,19),pk(10),Nc(),Li$1(11,`select`,24),Zm(`change`,function(r){$d(e);return xd(HE(3).restart.set(r.target.value))}),Sc(12,Oi,2,2,`option`,25,kc),Nc()(),Li$1(14,`div`,26)(15,`p`,19),pk(16),Nc(),Li$1(17,`div`,27),Sc(18,Ji,13,9,`div`,28,TE),Li$1(20,`datalist`,29),Sc(21,qi,1,1,`option`,25,kc),Nc()(),Sc(23,Gi,2,1,`p`,30,kc),kE(25,Ui,2,1,`p`,31),Li$1(26,`button`,32),Zm(`click`,function(){$d(e);return xd(HE(3).addMount())}),Um(27,`app-icon`,33),pk(28),Nc()(),Li$1(29,`fieldset`,34)(30,`legend`,19),pk(31),Nc(),kE(32,Ki,2,1,`p`,35),Li$1(33,`div`,36),Sc(34,Zi,3,3,`label`,37,Mi),Nc(),kE(36,Qi,8,12,`div`,38),Nc(),kE(37,Yi,2,1,`p`,39),Li$1(38,`div`,40)(39,`button`,12),Um(40,`app-icon`,13),pk(41),Nc(),Li$1(42,`button`,41),Um(43,`app-icon`,42),pk(44),Nc()()()}if(i&2){let e,n,r,c=HE(),C=HE(2);ec(3),cg(C.t().env),ec(),nk(C.field+` mt-1.5 w-full resize-y text-[12px]`),zm(`value`,C.envText()),ec(),SE((e=C.invalidLine())?5:6,e),ec(2),SE(c.ports.length>0?7:-1),ec(3),cg(C.t().restart),ec(),nk(C.field),zm(`value`,C.restart()),ec(),Tc(C.policies),ec(4),cg(C.t().mounts),ec(2),Tc(C.mounts()),ec(3),Tc(C.knownVolumes()),ec(2),Tc(C.removedVolumes()),ec(2),SE(C.mountProblem()?25:-1),ec(2),zm(`size`,13),ec(),$c(` `,C.t().addMount,` `),ec(3),cg(C.t().health),ec(),SE((n=c.health.image)?32:-1,n),ec(2),Tc(C.healthOptions()),ec(2),SE(C.healthMode()===`custom`?36:-1),ec(),SE((r=C.problem())?37:-1,r),ec(3),zm(`size`,14),ec(),$c(` `,C.common().close),ec(),zm(`disabled`,!C.canSave()),ec(),zm(`size`,14),ec(),$c(` `,C.saving()?C.t().saving:C.t().save,` `)}}function ea(i,t){i&1&&kE(0,Pi,7,4)(1,Xi,45,23,`form`,9),i&2&&SE(t.compose?0:1)}function ta(i,t){i&1&&(Li$1(0,`p`,7),pk(1),Nc()),i&2&&(ec(),cg(t))}function na(i,t){if(i&1&&(Li$1(0,`p`,8),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().loading)}}function ia(i,t){if(i&1&&(Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),kE(7,ea,2,1)(8,ta,2,1,`p`,7)(9,na,2,1,`p`,8),Nc()()),i&2){let e,n=HE();ec(4),cg(n.t().title(n.name())),ec(2),cg(n.t().description),ec(),SE((e=n.plan())?7:(e=n.problem())?8:9,e)}}var Mi;var Vi;var aa;var oa;var ra;var la;var sa;var da;var Ve;var nn=p(()=>{Qr();ia$1();Je();lS();sS();dS();ca$1();Qr();Mi=(i,t)=>t.mode,Vi=(i,t)=>t.containerPort+t.protocol;aa=`mx-focus rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 font-mono text-[13px] text-ink-100 placeholder:text-ink-500`,oa=[`no`,`always`,`unless-stopped`,`on-failure`],ra=/^[A-Za-z_][^=]*=/,la=/^[A-Za-z0-9][A-Za-z0-9_.-]*$/,sa=/^([A-Za-z]:[\\/][^:]*|\/[^:]*)$/,da=/^\/[^:]+$/,Ve=class i{open=mj(!1);containerId=jc.required();name=jc.required();project=jc(null);toast=C(Wi$1);router=C(pe);t=Lt(()=>oS().containers.adjust);common=Lt(()=>oS().common);policyNames=Lt(()=>oS().containers.restartPolicy.names);field=aa;policies=oa;plan=wt(null);envText=wt(``);hostPorts=wt([]);restart=wt(`no`);saving=wt(!1);problem=wt(null);mounts=wt([]);knownVolumes=wt([]);healthMode=wt(`keep`);healthCommand=wt(``);healthInterval=wt(30);healthRetries=wt(3);removedVolumes=Lt(()=>{let t=new Set(this.mounts().map(e=>`${e.kind}:${e.source}`));return(this.plan()?.mounts??[]).filter(e=>e.kind===`volume`&&!t.has(`volume:${e.source}`)).map(e=>e.anonymous===!0?e.target:e.source)});mountProblem=Lt(()=>this.mounts().some(t=>!t.existing&&(!da.test(t.target.trim())||(t.kind===`volume`?!la.test(t.source.trim()):!sa.test(t.source.trim())))));healthValid=Lt(()=>this.healthMode()!==`custom`||this.healthCommand().trim()!==``&&this.healthInterval()>=1&&Number.isInteger(this.healthRetries())&&this.healthRetries()>=1);healthOptions=Lt(()=>{let t=this.t(),e=this.plan()?.health;if(e===void 0)return[];let n=e.disabled?t.healthNowOff:e.current!==null?this.describe(e.current):t.healthNowNone;return[{mode:`keep`,label:t.healthKeep(n)},{mode:`custom`,label:t.healthCustom},...e.disabled?[]:[{mode:`none`,label:t.healthOff}],...e.image!==null&&!e.fromImage?[{mode:`image`,label:t.healthImage}]:[]]});envLines=Lt(()=>this.envText().split(`
3
+ `).map(t=>t.replace(/\r$/,``)).filter(t=>t.trim()!==``));invalidLine=Lt(()=>{let e=this.envText().split(`
4
+ `).findIndex(n=>n.trim()!==``&&!ra.test(n));return e===-1?null:e+1});portsValid=Lt(()=>this.hostPorts().every(t=>t.trim()===``||/^\d{1,5}$/.test(t.trim())&&Number(t)>=1&&Number(t)<=65535));canSave=Lt(()=>!this.saving()&&this.plan()!==null&&this.invalidLine()===null&&this.portsValid()&&!this.mountProblem()&&this.healthValid());constructor(){Xd(()=>{if(!this.open())return;let t=this.containerId();Ig(()=>{this.load(t)})})}label(t){return`${String(t.containerPort)}/${t.protocol}`}setPort(t,e){this.hostPorts.update(n=>n.map((r,c)=>c===t?e:r))}describe(t){return this.t().healthLine(t.command,t.intervalSeconds,t.retries)}addMount(){this.mounts.update(t=>[...t,{kind:`volume`,source:``,target:``,readOnly:!1,existing:!1}])}setMount(t,e){this.mounts.update(n=>n.map((r,c)=>c===t?W(W({},r),e):r))}removeMount(t){this.mounts.update(e=>e.filter((n,r)=>r!==t))}async chooseFolder(t){let e=await window.electron.volumes.chooseBackupFolder().catch(()=>null);e!==null&&this.setMount(t,{source:e})}mountsChanged(t){let e=n=>`${n.kind}|${n.source.trim()}|${n.target.trim()}|${String(n.readOnly)}`;return JSON.stringify(this.mounts().map(e))!==JSON.stringify(t.mounts.map(e))}healthChoice(){let t=this.healthMode();if(t!==`keep`)return t===`custom`?{mode:t,command:this.healthCommand().trim(),intervalSeconds:this.healthInterval(),retries:this.healthRetries()}:{mode:t}}openComposeFile(t){this.open.set(!1),this.router.navigate([`/compose`],{queryParams:{bestand:t}}).catch(()=>{})}async submit(t){t.preventDefault();let e=this.plan();if(!this.canSave()||e===null)return;let n=e.ports.map((r,c)=>{let C=(this.hostPorts()[c]??``).trim();return G(W({},r),{hostPort:C===``?null:Number(C)})});this.saving.set(!0),this.problem.set(null);try{let r=this.healthChoice(),c=this.mountsChanged(e)?this.mounts().map(de=>W({kind:de.kind,source:de.source.trim(),target:de.target.trim(),readOnly:de.readOnly},de.anonymous===!0?{anonymous:!0}:{})):void 0,C=await window.electron.containers.adjust(this.containerId(),W(W({env:this.envLines(),ports:n,restart:this.restart()},c===void 0?{}:{mounts:c}),r===void 0?{}:{health:r}));C.ok?(this.toast.success(this.t().done(this.name())),this.open.set(!1)):this.problem.set(C.problem)}catch(r){this.problem.set(eH(r))}finally{this.saving.set(!1)}}async load(t){this.plan.set(null),this.problem.set(null);try{let e=await window.electron.containers.adjustPlan(t);if(e.ok){this.plan.set(e.plan),this.envText.set(e.plan.env.join(`
5
+ `)),this.hostPorts.set(e.plan.ports.map(r=>r.hostPort===null?``:String(r.hostPort))),this.restart.set(e.plan.restart),this.mounts.set(e.plan.mounts.map(r=>G(W({},r),{existing:!0})));let n=e.plan.health.current??e.plan.health.image;this.healthMode.set(`keep`),this.healthCommand.set(n?.command??``),this.healthInterval.set(n?.intervalSeconds??30),this.healthRetries.set(n?.retries??3),window.electron.volumes.list().then(r=>this.knownVolumes.set(r.map(c=>c.name))).catch(()=>{})}else this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-adjust-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],name:[1,`name`],project:[1,`project`]},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`,`adjust-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`],[`role`,`alert`,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`,`min-h-0`,`flex-1`,`flex-col`,`gap-4`,`overflow-y-auto`],[`data-testid`,`adjust-compose`,1,`mt-4`,`rounded-md`,`border`,`border-warn/40`,`bg-warn/10`,`px-3`,`py-2`,`text-[13px]`,`text-ink-200`],[1,`mt-5`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`adjust-open-file`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`],[`type`,`button`,`data-testid`,`adjust-open-file`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`],[`name`,`file`,3,`size`],[1,`mt-4`,`flex`,`min-h-0`,`flex-1`,`flex-col`,`gap-4`,`overflow-y-auto`,3,`submit`],[1,`flex`,`flex-col`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`rows`,`8`,`spellcheck`,`false`,`autocomplete`,`off`,`wrap`,`off`,`data-testid`,`adjust-env`,3,`input`,`value`],[`data-testid`,`adjust-env-invalid`,1,`mt-1.5`,`text-[12px]`,`text-danger`],[1,`mt-1.5`,`text-[12px]`,`text-ink-500`],[1,`flex`,`items-center`,`gap-3`],[`data-testid`,`adjust-restart`,3,`change`,`value`],[3,`value`],[`data-testid`,`adjust-mounts`],[1,`mt-1.5`,`space-y-1.5`],[1,`flex`,`flex-wrap`,`items-center`,`gap-2`,`text-[13px]`],[`id`,`adjust-known-volumes`],[`data-testid`,`adjust-mount-removed`,1,`mt-1.5`,`text-[12px]`,`text-warn`],[`data-testid`,`adjust-mount-invalid`,1,`mt-1.5`,`text-[12px]`,`text-danger`],[`type`,`button`,`data-testid`,`adjust-mount-add`,1,`mx-btn`,`mx-focus`,`mt-2`,3,`click`],[`name`,`plus`,3,`size`],[`data-testid`,`adjust-health`],[1,`mt-1`,`text-[12px]`,`text-ink-500`],[1,`mt-1.5`,`space-y-1`,`text-[13px]`,`text-ink-200`],[1,`flex`,`cursor-pointer`,`items-center`,`gap-2`],[1,`mt-2`,`flex`,`flex-wrap`,`items-center`,`gap-2`,`text-[13px]`],[`role`,`alert`,1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`submit`,`data-testid`,`adjust-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`check`,3,`size`],[1,`flex`,`items-center`,`gap-2`,`text-[13px]`],[`type`,`text`,`inputmode`,`numeric`,`autocomplete`,`off`,3,`input`,`value`],[1,`text-ink-500`],[1,`font-mono`,`text-ink-300`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`/pad/in/container`,3,`class`,`value`],[1,`flex`,`items-center`,`gap-1`,`text-[12px]`,`text-ink-400`],[`type`,`checkbox`,1,`accent-accent`,3,`change`,`checked`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`rounded`,`p-1`,`text-ink-500`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`w-full`,`text-[12px]`,`text-ink-500`],[1,`w-14`,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`min-w-0`,`flex-1`,`truncate`,`font-mono`,`text-[12px]`,`text-ink-200`,3,`title`],[3,`change`,`value`],[`value`,`volume`],[`value`,`bind`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`type`,`button`,1,`mx-btn`,`mx-focus`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`],[`name`,`folder`,3,`size`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`/pad/in/container`,3,`input`,`value`],[`type`,`radio`,`name`,`adjust-health`,1,`accent-accent`,3,`change`,`checked`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`placeholder`,`curl -f http://localhost/ || exit 1`,`data-testid`,`adjust-health-command`,3,`input`,`value`],[`type`,`number`,`min`,`1`,`data-testid`,`adjust-health-interval`,3,`input`,`value`],[`type`,`number`,`min`,`1`,`data-testid`,`adjust-health-retries`,3,`input`,`value`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,ia,10,3,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function ma(i,t){if(i&1){let e=_E();Li$1(0,`p`,8),pk(1),Nc(),Li$1(2,`div`,9)(3,`button`,10),Um(4,`app-icon`,11),pk(5),Nc(),Li$1(6,`button`,12),Zm(`click`,function(){let r=$d(e);return xd(HE(2).goTo(`zoek`,r.reference))}),Um(7,`app-icon`,13),pk(8),Nc(),Li$1(9,`button`,14),Zm(`click`,function(){let r=$d(e);return xd(HE(2).goTo(`starten`,r.reference))}),Um(10,`app-icon`,15),pk(11),Nc()()}if(i&2){let e=t,n=HE(2);ec(),$c(` `,n.t().saved(e.reference,e.imageId),` `),ec(3),zm(`size`,14),ec(),$c(` `,n.common().close,` `),ec(2),zm(`size`,14),ec(),$c(` `,n.t().toImage,` `),ec(2),zm(`size`,14),ec(),$c(` `,n.t().run,` `)}}function pa(i,t){if(i&1&&(Li$1(0,`p`,20),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().invalid)}}function ua(i,t){if(i&1&&(Li$1(0,`p`,21),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().exists(e.normalized()))}}function _a(i,t){if(i&1&&(Li$1(0,`p`,22),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().hint)}}function xa(i,t){if(i&1&&(Li$1(0,`p`,23),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().running)}}function ga(i,t){if(i&1&&(Li$1(0,`li`,30),pk(1),Nc()),i&2){let e=t.$implicit;ec(),ug(``,e.source,` → `,e.destination)}}function ya(i,t){if(i&1&&(Li$1(0,`div`,24)(1,`p`),pk(2),Nc(),Li$1(3,`ul`,29),Sc(4,ga,2,2,`li`,30,ca),Nc()()),i&2){let e=HE(3);ec(2),cg(e.t().mounts),ec(2),Tc(e.mounts())}}function fa(i,t){i&1&&(Li$1(0,`p`,25),pk(1),Nc()),i&2&&(ec(),cg(t))}function va(i,t){if(i&1){let e=_E();Li$1(0,`form`,16),Zm(`submit`,function(r){$d(e);return xd(HE(2).submit(r))}),Li$1(1,`label`,17)(2,`span`,18),pk(3),Nc(),Li$1(4,`input`,19),Zm(`input`,function(r){$d(e);return xd(HE(2).target.set(r.target.value))}),Nc()(),kE(5,pa,2,1,`p`,20)(6,ua,2,1,`p`,21)(7,_a,2,1,`p`,22),kE(8,xa,2,1,`p`,23),kE(9,ya,6,1,`div`,24),kE(10,fa,2,1,`p`,25),Li$1(11,`div`,26)(12,`button`,10),Um(13,`app-icon`,11),pk(14),Nc(),Li$1(15,`button`,27),Um(16,`app-icon`,28),pk(17),Nc()()()}if(i&2){let e,n=HE(2);ec(3),cg(n.t().label),ec(),nk(n.field+` mt-1.5`),zm(`value`,n.target()),ec(),SE(n.invalid()?5:n.exists()?6:7),ec(3),SE(n.running()?8:-1),ec(),SE(n.mounts().length>0?9:-1),ec(),SE((e=n.problem())?10:-1,e),ec(3),zm(`size`,14),ec(),$c(` `,n.common().close,` `),ec(),zm(`disabled`,!n.canSave()),ec(),zm(`size`,14),ec(),$c(` `,n.saving()?n.t().saving:n.t().save,` `)}}function ha(i,t){if(i&1&&(Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),kE(7,ma,12,7)(8,va,18,13,`form`,7),Nc()()),i&2){let e,n=HE();ec(4),cg(n.t().title),ec(2),cg(n.t().description),ec(),SE((e=n.saved())?7:8,e)}}var ca;var ba;var Ne;var an=p(()=>{Qr();ia$1();Je();z();lS();P();sS();dS();ca$1();Qr();ca=(i,t)=>t.destination;ba=`mx-focus w-full rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 font-mono text-[13px] text-ink-100 placeholder:text-ink-500`,Ne=class i{open=mj(!1);containerId=jc.required();containerName=jc.required();image=jc.required();running=jc(!1);mounts=jc([]);images=C(h$1);router=C(pe);toast=C(Wi$1);t=Lt(()=>oS().containers.commit);common=Lt(()=>oS().common);field=ba;target=wt(``);saving=wt(!1);problem=wt(null);saved=wt(null);wanted=Lt(()=>this.target().trim());invalid=Lt(()=>this.wanted()!==``&&!d$1(this.wanted()));normalized=Lt(()=>{let{repository:t,tag:e}=r$1(this.wanted());return`${t}:${e}`});exists=Lt(()=>this.images.images().some(t=>t.reference===this.normalized()));canSave=Lt(()=>!this.saving()&&d$1(this.wanted()));constructor(){Xd(()=>{if(!this.open())return;let t=O(this.image(),this.containerName(),this.t().suffix);Ig(()=>{this.target.set(t),this.problem.set(null),this.saved.set(null),this.images.images().length===0&&this.images.refresh()})})}async submit(t){if(t.preventDefault(),!!this.canSave()){this.saving.set(!0),this.problem.set(null);try{let e=await window.electron.containers.commit(this.containerId(),this.wanted());e.ok?(this.saved.set({reference:e.reference,imageId:e.imageId}),this.toast.success(this.t().saved(e.reference,e.imageId)),this.images.refresh()):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.saving.set(!1)}}}goTo(t,e){this.open.set(!1),this.router.navigate([`/images`],{queryParams:{[t]:e}}).catch(()=>{})}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-commit-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],containerName:[1,`containerName`],image:[1,`image`],running:[1,`running`],mounts:[1,`mounts`]},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`,`commit-dialog`,1,`w-full`,`max-w-lg`,`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`],[`data-testid`,`commit-saved`,1,`mt-4`,`rounded-md`,`border`,`border-accent/40`,`bg-accent/10`,`px-3`,`py-2`,`text-[13px]`,`text-ink-100`],[1,`mt-5`,`flex`,`flex-wrap`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`commit-to-image`,1,`mx-btn`,`mx-focus`,3,`click`],[`name`,`images`,3,`size`],[`type`,`button`,`data-testid`,`commit-run`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`],[`name`,`play`,3,`size`],[1,`mt-4`,3,`submit`],[1,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`data-testid`,`commit-name`,3,`input`,`value`],[`data-testid`,`commit-invalid`,1,`mt-2`,`text-[12px]`,`text-danger`],[`data-testid`,`commit-exists`,1,`mt-2`,`text-[12px]`,`text-warn`],[1,`mt-1.5`,`text-[12px]`,`text-ink-500`],[1,`mt-3`,`text-[12px]`,`text-ink-500`],[`data-testid`,`commit-mounts`,1,`mt-3`,`rounded-md`,`border`,`border-warn/40`,`bg-warn/10`,`px-3`,`py-2`,`text-[12px]`,`text-ink-200`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`submit`,`data-testid`,`commit-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`check`,3,`size`],[1,`mt-1.5`,`space-y-0.5`,`font-mono`,`text-[11px]`,`text-ink-300`],[1,`truncate`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,ha,9,3,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Ca(i,t){if(i&1){let e=_E();Li$1(0,`button`,18),Zm(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).format.set(r))}),pk(1),Nc()}if(i&2){let e=t.$implicit,n=HE(2);nk(n.format()===e?`bg-ink-700 text-ink-100`:`text-ink-400 hover:text-ink-200`),Br(`aria-pressed`,n.format()===e)(`data-testid`,`run-command-format-`+e),ec(),$c(` `,e===`run`?n.t().formatRun:n.t().formatCompose,` `)}}function wa(i,t){if(i&1&&(Li$1(0,`p`,9),pk(1),Nc()),i&2){let e=HE(2);ec(),$c(` `,e.t().composeNote(t),` `)}}function ka(i,t){if(i&1&&(Li$1(0,`pre`,19),pk(1),Nc(),Li$1(2,`p`,20),pk(3),Nc()),i&2){let e=HE(2);ec(),cg(e.command()),ec(2),cg(e.envText())}}function Da(i,t){if(i&1&&(Li$1(0,`p`,10),pk(1),Nc()),i&2){let e=HE(2);ec(),$c(` `,e.problem(),` `)}}function Sa(i,t){if(i&1&&(Li$1(0,`p`,11),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().building)}}function Ia(i,t){i&1&&(Li$1(0,`span`,13),pk(1),Nc()),i&2&&(ec(),cg(t))}function Ea(i,t){if(i&1){let e=_E();Um(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),pk(4),Nc(),Li$1(5,`p`,6),pk(6),Nc(),Li$1(7,`div`,7),Sc(8,Ca,2,5,`button`,8,kc),Nc(),kE(10,wa,2,1,`p`,9),kE(11,ka,4,2)(12,Da,2,1,`p`,10)(13,Sa,2,1,`p`,11),Li$1(14,`div`,12),kE(15,Ia,2,1,`span`,13),Li$1(16,`button`,14),Um(17,`app-icon`,15),pk(18),Nc(),Li$1(19,`button`,16),Zm(`click`,function(){$d(e);return xd(HE().copy())}),Um(20,`app-icon`,17),pk(21),Nc()()()()}if(i&2){let e,n,r,c=HE();ec(4),cg(c.format()===`compose`?c.t().composeTitle:c.t().title),ec(2),cg(c.format()===`compose`?c.t().composeDescription:c.t().description),ec(2),Tc(c.formats),ec(2),SE((e=c.composeProject())?10:-1,e),ec(),SE((n=c.result()?.ok)===!0?11:n===!1?12:13),ec(4),SE((r=c.copyProblem())?15:-1,r),ec(2),zm(`size`,14),ec(),$c(` `,c.common().close,` `),ec(),zm(`disabled`,c.result()?.ok!==!0),ec(),zm(`name`,c.copied()?`check`:`copy`)(`size`,14),ec(),$c(` `,c.copied()?c.common().copied:c.common().copy,` `)}}var Pe;var on=p(()=>{Qr();Je();lS();dS();sS();Qr();Pe=class i{open=mj(!1);containerId=jc.required();composeProject=jc(null);format=mj(`run`);formats=[`run`,`compose`];t=Lt(()=>oS().containers.runCommand);common=Lt(()=>oS().common);result=wt(null);copied=wt(!1);copyProblem=wt(null);constructor(){Xd(()=>{if(!this.open())return;let t=this.containerId();Ig(()=>{this.load(t)})})}command(){let t=this.result();return t?.ok!==!0?``:this.format()===`compose`?t.compose:t.command}problem(){let t=this.result();return t?.ok===!1?t.problem:``}envText(){let t=this.result(),e=t?.ok===!0?t.envCount:0;return e===0?this.t().noEnv:this.format()===`compose`?this.t().composeEnvWarning(e):this.t().envWarning(e)}async copy(){if(this.result()?.ok===!0)try{await navigator.clipboard.writeText(this.command()),this.copyProblem.set(null),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch(e){this.copyProblem.set(this.t().copyFailed(eH(e)))}}async load(t){this.result.set(null),this.copied.set(!1),this.copyProblem.set(null);try{this.result.set(await window.electron.containers.runCommand(t))}catch(e){this.result.set({ok:!1,problem:eH(e)})}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-run-command-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],composeProject:[1,`composeProject`],format:[1,`format`]},outputs:{open:`openChange`,format:`formatChange`},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`,`run-command-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`],[`role`,`group`,1,`mt-3`,`inline-flex`,`self-start`,`rounded-md`,`border`,`border-ink-700`,`p-0.5`,`text-[12px]`],[`type`,`button`,1,`mx-focus`,`rounded`,`px-2.5`,`py-1`,3,`class`],[1,`mt-3`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`px-3`,`py-2`,`text-[12px]`,`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`,`items-center`,`justify-end`,`gap-2`],[1,`mr-auto`,`text-[12px]`,`text-danger`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`run-command-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`rounded`,`px-2.5`,`py-1`,3,`click`],[`data-testid`,`run-command-text`,1,`mt-4`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`break-all`,`whitespace-pre-wrap`,`text-ink-200`],[`data-testid`,`run-command-env`,1,`mt-2`,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),fg(`openChange`,function(c){return vk(n.open,c)||(n.open=c),c}),Nm(1,Ea,22,11,`ng-template`,1),Nc()),e&2&&pg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Ma(i,t){if(i&1){let e=_E();Li$1(0,`button`,10),Zm(`click`,function(){$d(e);let r=HE().$implicit;return xd(HE().toggle(r.path))}),Um(1,`app-icon`,11),Nc()}if(i&2){let e=HE().$implicit,n=HE();Br(`aria-expanded`,n.isOpen(e.path))(`aria-label`,n.isOpen(e.path)?n.t().collapse(e.key):n.t().expand(e.key)),ec(),zm(`name`,n.isOpen(e.path)?`chevronDown`:`chevronRight`)(`size`,12)}}function Va(i,t){i&1&&Um(0,`span`,5)}function Na(i,t){if(i&1&&(Li$1(0,`span`,8),pk(1),Nc()),i&2){let e=HE().$implicit;ec(),cg(e.preview)}}function Pa(i,t){if(i&1&&(Li$1(0,`span`,9),pk(1),Nc()),i&2){let e=HE().$implicit;ec(),cg(e.preview)}}function Ra(i,t){if(i&1&&(Li$1(0,`div`,3),kE(1,Ma,2,4,`button`,4)(2,Va,1,0,`span`,5),Li$1(3,`span`,6),pk(4),Nc(),Li$1(5,`span`,7),pk(6,`:`),Nc(),kE(7,Na,2,1,`span`,8)(8,Pa,2,1,`span`,9),Nc()),i&2){let e=t.$implicit;tg(`padding-left`,e.depth*14+4,`px`),ec(),SE(e.hasChildren?1:2),ec(3),cg(e.key),ec(3),SE(e.kind===`value`?7:8)}}function La(i,t){if(i&1&&(Li$1(0,`p`,2),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().empty)}}function Qe(i){return Array.isArray(i)?i.map((t,e)=>[String(e),t]):i!==null&&typeof i==`object`?Object.entries(i):[]}function Fa(i){return Array.isArray(i)?`array`:i!==null&&typeof i==`object`?`object`:`value`}function ja(i,t){if(t===`array`){let e=i.length;return e===0?`[]`:`[${String(e)}]`}if(t===`object`){let e=Object.keys(i).length;return e===0?`{}`:`{${String(e)}}`}return JSON.stringify(i)??`null`}function Oa(i,t){let e=[];function n(r,c,C,de){let nt=Fa(c),$e=Qe(c);if(e.push({path:C,key:r,depth:de,kind:nt,preview:ja(c,nt),hasChildren:$e.length>0}),!($e.length===0||!t.has(C)))for(let[it,hn]of $e)n(it,hn,`${C}.${it}`,de+1)}for(let[r,c]of Qe(i))n(r,c,r,0);return e}function Aa(i){return new Set(Qe(i).map(([t])=>t))}var Ta;var Re;var rn=p(()=>{Qr();dS();sS();Qr();Ta=(i,t)=>t.path;Re=class i{value=jc.required();t=Lt(()=>oS().shell.jsonView);overrides=wt(new Map);defaults=Lt(()=>Aa(this.value()));rows=Lt(()=>Oa(this.value(),this.openPaths()));openPaths=Lt(()=>{let t=new Set(this.defaults());for(let[e,n]of this.overrides())n?t.add(e):t.delete(e);return t});isOpen(t){return this.openPaths().has(t)}toggle(t){let e=new Map(this.overrides());e.set(t,!this.isOpen(t)),this.overrides.set(e)}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-json-view`]],inputs:{value:[1,`value`]},decls:4,vars:1,consts:[[1,`font-mono`,`text-[12px]`,`leading-[1.7]`],[`data-testid`,`json-row`,1,`flex`,`gap-1.5`,`rounded-sm`,`px-1`,`hover:bg-ink-850`,3,`padding-left`],[1,`text-ink-400`],[`data-testid`,`json-row`,1,`flex`,`gap-1.5`,`rounded-sm`,`px-1`,`hover:bg-ink-850`],[`type`,`button`,1,`mx-focus`,`w-3`,`shrink-0`,`cursor-pointer`,`text-ink-500`,`hover:text-ink-100`],[1,`w-3`,`shrink-0`],[1,`shrink-0`,`text-accent`],[1,`text-ink-600`],[1,`break-all`,`text-ink-200`],[1,`text-ink-500`],[`type`,`button`,1,`mx-focus`,`w-3`,`shrink-0`,`cursor-pointer`,`text-ink-500`,`hover:text-ink-100`,3,`click`],[3,`name`,`size`]],template:function(e,n){e&1&&(Li$1(0,`div`,0),Sc(1,Ra,9,5,`div`,1,Ta,!1,La,2,1,`p`,2),Nc()),e&2&&(ec(),Tc(n.rows()))},dependencies:[My],encapsulation:2})}});function Ye(i,t){return{since:Math.floor(i/1e3),until:t===null?null:Math.ceil(t/1e3)}}function ln(i){return Ye(i-3600*1e3,null)}function sn(i){let t=[...i].filter(e=>e.action===`start`).sort((e,n)=>n.time-e.time)[0];return t===void 0?null:Ye(t.time,null)}function za(i){let t=[...i].sort((n,r)=>n.time-r.time),e=null;return t.forEach((n,r)=>{if(n.action!==`die`||n.exitCode===null||n.exitCode===0||n.exitCode===143)return;t.slice(0,r).some(C=>(C.action===`kill`||C.action===`stop`)&&n.time-C.time<=15e3)||(e=n.time)}),e}function dn(i){let t=za(i);return t===null?null:Ye(t-3e5,t+6e4)}function Le(i){let t=new Date(i),e=n=>String(n).padStart(2,`0`);return`${String(t.getFullYear())}-${e(t.getMonth()+1)}-${e(t.getDate())}T${e(t.getHours())}:${e(t.getMinutes())}`}function Xe(i){if(i.trim()===``)return null;let t=new Date(i).getTime();return Number.isFinite(t)?t:null}var cn=p(()=>{});var Fe;var et;var ve;var tt=p(()=>{Qr();lS();Qr();Fe=2e3,et=500,ve=class i{buffer=wt([]);busy=wt(!1);failure=wt(null);dropped=wt(!1);shownRange=wt(null);streamId=null;unsubscribe=null;disposed=!1;lines=this.buffer.asReadonly();loading=this.busy.asReadonly();problem=this.failure.asReadonly();truncated=this.dropped.asReadonly();range=this.shownRange.asReadonly();constructor(){C(ve$1).onDestroy(()=>this.close())}async open(t,e=et,n=null){this.close(),this.disposed=!1,this.busy.set(!0),this.buffer.set([]),this.dropped.set(!1),this.shownRange.set(n);try{let r=await window.electron.logs.open(t,e,n);if(this.disposed){window.electron.logs.close(r);return}this.streamId=r,this.unsubscribe=window.electron.logs.onLines(r,c=>this.append(c)),this.failure.set(null)}catch(r){this.failure.set(eH(r))}finally{this.busy.set(!1)}}close(){this.disposed=!0,this.unsubscribe?.(),this.unsubscribe=null,this.streamId!==null&&(window.electron.logs.close(this.streamId),this.streamId=null)}clear(){this.buffer.set([]),this.dropped.set(!1)}append(t){let e=[...this.buffer(),...t];if(this.shownRange()!==null&&e.length>Fe){this.dropped.set(!0),this.buffer.set(e.slice(0,Fe));return}if(e.length>Fe){this.dropped.set(!0),this.buffer.set(e.slice(e.length-Fe));return}this.buffer.set(e)}static ɵfac=function(e){return new(e||i)};static ɵprov=X({token:i,factory:i.ɵfac})}});function $a(i,t){if(i&1&&pk(0),i&2)$c(` `,HE().t().connecting,` `)}function Wa(i,t){if(i&1&&(Li$1(0,`span`,24),pk(1),Nc()),i&2){let e=HE(2);ec(),$c(` · `,e.session.range()===null?e.t().truncated:e.t().firstOnly)}}function Ha(i,t){if(i&1&&(pk(0),kE(1,Wa,2,1,`span`,24)),i&2){let e=HE();$c(` `,e.t().count(e.visible().length,e.session.lines().length),` `),ec(),SE(e.session.truncated()?1:-1)}}function Ja(i,t){if(i&1&&(Li$1(0,`span`,35),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.describe(t))}}function qa(i,t){if(i&1){let e=_E();Li$1(0,`div`,19)(1,`label`,25)(2,`span`,26),pk(3),Nc(),Li$1(4,`input`,27),Zm(`input`,function(r){$d(e);return xd(HE().fromInput.set(r.target.value))}),Nc()(),Li$1(5,`label`,25)(6,`span`,26),pk(7),Nc(),Li$1(8,`input`,28),Zm(`input`,function(r){$d(e);return xd(HE().toInput.set(r.target.value))}),Nc()(),Li$1(9,`button`,29),Zm(`click`,function(){$d(e);let r=HE();return xd(r.show(r.typedRange()))}),pk(10),Nc(),Um(11,`span`,30),Li$1(12,`button`,31),Zm(`click`,function(){$d(e);let r=HE();return xd(r.show(r.lastHourRange()))}),pk(13),Nc(),Li$1(14,`button`,32),Zm(`click`,function(){$d(e);let r=HE();return xd(r.show(r.startRange()))}),pk(15),Nc(),Li$1(16,`button`,33),Zm(`click`,function(){$d(e);let r=HE();return xd(r.show(r.crashRange()))}),pk(17),Nc(),Li$1(18,`button`,34),Zm(`click`,function(){$d(e);return xd(HE().show(null))}),pk(19),Nc(),kE(20,Ja,2,1,`span`,35),Nc()}if(i&2){let e,n=HE();ec(3),cg(n.t().from),ec(),zm(`value`,n.fromInput()),ec(3),cg(n.t().to),ec(),zm(`title`,n.t().toHint)(`value`,n.toInput()),ec(),zm(`disabled`,n.typedRange()===null),ec(),$c(` `,n.t().apply,` `),ec(3),cg(n.t().lastHour),ec(),zm(`disabled`,n.startRange()===null),ec(),$c(` `,n.t().sinceStart,` `),ec(),zm(`disabled`,n.crashRange()===null),ec(),$c(` `,n.t().aroundCrash,` `),ec(),zm(`disabled`,n.session.range()===null),ec(),$c(` `,n.t().latest,` `),ec(),SE((e=n.session.range())?20:-1,e)}}function Ga(i,t){i&1&&(Li$1(0,`p`,20),pk(1),Nc()),i&2&&(ec(),$c(` `,t,` `))}function Ua(i,t){if(i&1&&(Li$1(0,`span`,37),pk(1),Nc()),i&2){let e=HE().$implicit;ec(),cg(e.line.timestamp)}}function Ka(i,t){if(i&1&&(Li$1(0,`div`,36),kE(1,Ua,2,1,`span`,37),Li$1(2,`span`,38),pk(3),Nc()()),i&2){let e=t.$implicit,n=HE();rg(`text-danger`,e.line.stream===`stderr`&&e.level===null),ec(),SE(n.showTimestamps()&&e.line.timestamp?1:-1),ec(),nk(n.colorOf(e)),ec(),cg(e.line.text)}}function Za(i,t){if(i&1&&(Li$1(0,`p`,23),pk(1),Nc()),i&2){let e=HE();ec(),$c(` `,e.session.loading()?``:e.filter()===``&&e.levels().size===0?e.t().empty:e.t().noMatches,` `)}}var Ba;var je;var mn=p(()=>{Qr();V();cn();tt();tt();M();dS();$();ca$1();sS();Qr();Ba=[`scroller`];je=class i{containerId=jc.required();name=jc(``);preset=jc(null);session=C(ve);preferences=C(p$2);t=Lt(()=>oS().containers.logs);common=Lt(()=>oS().common);filter=wt(``);follow=this.preferences.flag(`logs.follow`,!0);showTimestamps=this.preferences.flag(`logs.showTimestamps`);copied=wt(!1);saving=wt(!1);toast=C(Wi$1);scroller=gj(`scroller`);rangeOpen=wt(!1);fromInput=wt(``);toInput=wt(``);events=wt([]);startRange=Lt(()=>sn(this.events()));bounded=Lt(()=>{let t=this.session.range();return t!==null&&t.until!==null});crashRange=Lt(()=>dn(this.events()));typedRange=Lt(()=>{let t=Xe(this.fromInput()),e=Xe(this.toInput());return t===null||e!==null&&e<t?null:{since:Math.floor(t/1e3),until:e===null?null:Math.ceil(e/1e3)}});levels=wt(new Set);leveled=Lt(()=>this.session.lines().map(t=>({line:t,level:B(t.text)})));matching=Lt(()=>{let t=this.filter().trim().toLowerCase();return t===``?this.leveled():this.leveled().filter(e=>e.line.text.toLowerCase().includes(t))});counts=Lt(()=>U(this.matching().map(t=>t.level)));visible=Lt(()=>{let t=this.levels();return t.size===0?this.matching():this.matching().filter(e=>H(e.level,t))});constructor(){Xd(()=>{let t=this.preset(),e=this.containerId();Ig(()=>{this.openWith(e,t)})}),Xd(()=>{let t=this.visible(),e=this.scroller()?.nativeElement;!this.follow()||e===void 0||t.length===0||queueMicrotask(()=>{e.scrollTop=e.scrollHeight})})}async openWith(t,e){if(e===`uur`){this.rangeOpen.set(!0),this.show(this.lastHourRange());return}if(e===`crash`){this.rangeOpen.set(!0),await this.loadEvents();let n=this.crashRange();if(n!==null){this.show(n);return}}await this.session.open(t)}toggleRange(){let t=!this.rangeOpen();this.rangeOpen.set(t),t&&(this.fromInput()===``&&this.fromInput.set(Le(Date.now()-3600*1e3)),this.loadEvents())}lastHourRange(){return ln(Date.now())}show(t){t!==null&&(this.fromInput.set(Le(t.since*1e3)),this.toInput.set(t.until===null?``:Le(t.until*1e3))),this.session.open(this.containerId(),et,t)}describe(t){let e=n=>new Intl.DateTimeFormat(iS(),{dateStyle:`short`,timeStyle:`short`}).format(new Date(n*1e3));return this.t().active(e(t.since),t.until===null?null:e(t.until))}async loadEvents(){try{this.events.set(await window.electron.containers.events(this.name()))}catch{}}colorOf(t){return t.level!==null?G$1[t.level]:t.line.stream===`stdout`?`text-ink-200`:``}async save(){this.saving.set(!0);try{let t=await window.electron.containers.saveLogs(this.containerId(),this.name()||this.containerId().slice(0,12),this.session.range());t.ok?this.toast.success(this.t().saved(t.lines,t.path)):t.canceled||this.toast.error(t.problem)}finally{this.saving.set(!1)}}async copy(){let t=this.visible().map(({line:e})=>this.showTimestamps()&&e.timestamp!==null?`${e.timestamp} ${e.text}`:e.text).join(`
6
+ `);try{await navigator.clipboard.writeText(t),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch{}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-logs-view`]],viewQuery:function(e,n){e&1&&Xm(n.scroller,Ba,5),e&2&&UE()},inputs:{containerId:[1,`containerId`],name:[1,`name`],preset:[1,`preset`]},features:[Ik([ve])],decls:37,vars:43,consts:[[`scroller`,``],[1,`flex`,`h-full`,`flex-col`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`,`border-b`,`border-ink-700`,`px-4`,`py-2`],[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-64`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1`,`pr-3`,`pl-8`,`text-[12px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`chosenChange`,`chosen`,`errors`,`warnings`],[`type`,`button`,`data-testid`,`logs-range`,1,`mx-btn`,`mx-focus`,3,`click`],[`name`,`clock`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`play`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`],[3,`name`,`size`],[`type`,`button`,`data-testid`,`logs-save`,1,`mx-btn`,`mx-focus`,3,`click`,`title`,`disabled`],[`name`,`download`,3,`size`],[`name`,`eraser`,3,`size`],[1,`ml-auto`,`text-[12px]`,`text-ink-500`],[`data-testid`,`logs-range-panel`,1,`flex`,`flex-wrap`,`items-end`,`gap-3`,`border-b`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-2`,`text-[12px]`],[1,`m-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[`data-testid`,`log-pane`,1,`min-h-0`,`flex-1`,`overflow-auto`,`bg-ink-950`,`px-4`,`py-2`,`font-mono`,`text-[12px]`,`leading-[1.6]`],[`data-testid`,`log-line`,1,`flex`,`gap-2`,`whitespace-pre-wrap`,3,`text-danger`],[1,`text-ink-500`],[1,`text-warn`],[1,`flex`,`flex-col`,`gap-1`],[1,`text-ink-400`],[`type`,`datetime-local`,`data-testid`,`logs-from`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-2`,`py-1`,`text-ink-100`,3,`input`,`value`],[`type`,`datetime-local`,`data-testid`,`logs-to`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-2`,`py-1`,`text-ink-100`,3,`input`,`title`,`value`],[`type`,`button`,`data-testid`,`logs-range-apply`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[1,`mx-1`,`h-6`,`w-px`,`bg-ink-700`],[`type`,`button`,`data-testid`,`logs-last-hour`,1,`mx-btn`,`mx-focus`,3,`click`],[`type`,`button`,`data-testid`,`logs-since-start`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`type`,`button`,`data-testid`,`logs-around-crash`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`type`,`button`,`data-testid`,`logs-latest`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`data-testid`,`logs-range-active`,1,`ml-auto`,`text-ink-300`],[`data-testid`,`log-line`,1,`flex`,`gap-2`,`whitespace-pre-wrap`],[1,`shrink-0`,`text-ink-500`],[1,`break-all`]],template:function(e,n){if(e&1){let r=_E();Li$1(0,`div`,1)(1,`div`,2)(2,`label`,3)(3,`span`,4),Um(4,`app-icon`,5),Nc(),Li$1(5,`span`,6),pk(6),Nc(),Li$1(7,`input`,7),Zm(`input`,function(C){return n.filter.set(C.target.value)}),Nc()(),Li$1(8,`app-level-filter`,8),fg(`chosenChange`,function(C){return $d(r),vk(n.levels,C)||(n.levels=C),xd(C)}),Nc(),Li$1(9,`button`,9),Zm(`click`,function(){return n.toggleRange()}),Um(10,`app-icon`,10),pk(11),Nc(),Li$1(12,`button`,11),Zm(`click`,function(){return n.follow.set(!n.follow())}),Um(13,`app-icon`,12),pk(14),Nc(),Li$1(15,`button`,13),Zm(`click`,function(){return n.showTimestamps.set(!n.showTimestamps())}),Um(16,`app-icon`,10),pk(17),Nc(),Li$1(18,`button`,13),Zm(`click`,function(){return n.copy()}),Um(19,`app-icon`,14),pk(20),Nc(),Li$1(21,`button`,15),Zm(`click`,function(){return n.save()}),Um(22,`app-icon`,16),pk(23),Nc(),Li$1(24,`button`,13),Zm(`click`,function(){return n.session.clear()}),Um(25,`app-icon`,17),pk(26),Nc(),Li$1(27,`span`,18),kE(28,$a,1,1)(29,Ha,2,2),Nc()(),kE(30,qa,21,15,`div`,19),kE(31,Ga,2,1,`p`,20),Li$1(32,`div`,21,0),Sc(34,Ka,4,6,`div`,22,TE,!1,Za,2,1,`p`,23),Nc()()}if(e&2){let r;ec(4),zm(`size`,14),ec(2),cg(n.t().filter),ec(),zm(`placeholder`,n.t().filter)(`value`,n.filter()),ec(),pg(`chosen`,n.levels),zm(`errors`,n.counts().error)(`warnings`,n.counts().warn),ec(),rg(`border-accent`,n.rangeOpen()||n.session.range()!==null)(`text-accent`,n.rangeOpen()||n.session.range()!==null),Br(`aria-expanded`,n.rangeOpen()),ec(),zm(`size`,14),ec(),$c(` `,n.t().range,` `),ec(),rg(`border-accent`,n.follow())(`text-accent`,n.follow()),zm(`disabled`,n.bounded())(`title`,n.bounded()?n.t().notLive:``),Br(`aria-pressed`,n.follow()),ec(),zm(`size`,14),ec(),$c(` `,n.t().follow,` `),ec(),rg(`border-accent`,n.showTimestamps())(`text-accent`,n.showTimestamps()),Br(`aria-pressed`,n.showTimestamps()),ec(),zm(`size`,14),ec(),$c(` `,n.t().timestamps,` `),ec(2),zm(`name`,n.copied()?`check`:`copy`)(`size`,14),ec(),$c(` `,n.copied()?n.common().copied:n.common().copy,` `),ec(),zm(`title`,n.session.range()===null?n.t().saveHint:n.t().saveRangeHint)(`disabled`,n.saving()),ec(),zm(`size`,14),ec(),$c(` `,n.t().save,` `),ec(2),zm(`size`,14),ec(),$c(` `,n.t().clear,` `),ec(2),SE(n.session.loading()?28:29),ec(2),SE(n.rangeOpen()?30:-1),ec(),SE((r=n.session.problem())?31:-1,r),ec(3),Tc(n.visible())}},dependencies:[My,T],encapsulation:2})}});function Ya(i,t){if(i&1){let e=_E();Li$1(0,`button`,7),Zm(`click`,function(){$d(e);let r=HE();return xd(r.go(r.parentOf(r.path())))}),Um(1,`app-icon`,15),Nc()}if(i&2){let e=HE();zm(`disabled`,e.path()===`/`||e.busy()),Br(`aria-label`,e.t().up),ec(),zm(`size`,14)}}function Xa(i,t){if(i&1&&(Li$1(0,`p`,3),pk(1),Nc()),i&2){let e=HE();ec(),ug(` `,e.t().changesTitle,` · `,e.t().changesCount(e.changes().length),` `)}}function eo(i,t){if(i&1&&(Li$1(0,`span`,16),pk(1),Nc()),i&2){let e=HE().$implicit;ec(),cg(e.label)}}function to(i,t){i&1&&(Li$1(0,`span`,18),pk(1,`/`),Nc())}function no(i,t){if(i&1){let e=_E();Li$1(0,`button`,17),Zm(`click`,function(){$d(e);let r=HE().$implicit;return xd(HE(2).go(r.path))}),pk(1),Nc(),kE(2,to,2,0,`span`,18)}if(i&2){let e=HE().$implicit;ec(),$c(` `,e.label,` `),ec(),SE(e.path!==`/`?2:-1)}}function io(i,t){if(i&1&&kE(0,eo,2,1,`span`,16)(1,no,3,2),i&2){let e=t.$index,n=t.$count;SE(e===n-1?0:1)}}function ao(i,t){if(i&1&&(Li$1(0,`nav`,4),Sc(1,io,2,1,null,null,pn),Nc()),i&2){let e=HE();Br(`aria-label`,e.t().path),ec(),Tc(e.crumbs())}}function oo(i,t){if(i&1){let e=_E();Li$1(0,`button`,7),Zm(`click`,function(){$d(e);return xd(HE().chooseAndUpload())}),Um(1,`app-icon`,19),pk(2),Nc(),Li$1(3,`button`,20),Zm(`click`,function(){$d(e);return xd(HE().ops.startCreate())}),Um(4,`app-icon`,21),pk(5),Nc()}if(i&2){let e=HE();zm(`disabled`,e.busy()),ec(),zm(`size`,14),ec(),$c(` `,e.t().upload,` `),ec(),zm(`disabled`,e.busy()),ec(),zm(`size`,14),ec(),$c(` `,e.fileOps().newFolder,` `)}}function ro(i,t){if(i&1){let e=_E();Li$1(0,`button`,22),Zm(`click`,function(){$d(e);return xd(HE().saveAsImage.emit())}),Um(1,`app-icon`,23),pk(2),Nc()}if(i&2){let e=HE();zm(`disabled`,e.busy()),ec(),zm(`size`,14),ec(),$c(` `,e.actions().commit,` `)}}function lo(i,t){if(i&1&&(Li$1(0,`p`,24),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().changesEmpty)}}function so(i,t){if(i&1){let e=_E();Li$1(0,`li`,26)(1,`span`,27),pk(2),Nc(),Li$1(3,`button`,28),Zm(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).openFolderOf(r))}),pk(4),Nc()()}if(i&2){let e=t.$implicit,n=HE(2);ec(),nk(n.kindTone(e)),ec(),cg(n.t().changeKind[e.kind]),ec(),Br(`aria-label`,n.t().openFolderOf(e.path)),ec(),$c(` `,e.path,` `)}}function co(i,t){if(i&1&&(kE(0,lo,2,1,`p`,24),Li$1(1,`ul`,25),Sc(2,so,5,5,`li`,26,pn),Nc()),i&2){let e=HE();SE(e.changes().length===0&&!e.busy()&&e.problem()===null?0:-1),ec(2),Tc(e.changes())}}function mo(i,t){if(i&1&&(Li$1(0,`p`,24),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().empty)}}function po(i,t){if(i&1){let e=_E();Li$1(0,`button`,39),Zm(`click`,function(){$d(e);let r=HE().$implicit,c=HE(2);return xd(c.go(c.childOf(r)))}),pk(1),Nc()}if(i&2){let e=HE().$implicit;ec(),$c(` `,e.name,` `)}}function uo(i,t){if(i&1){let e=_E();Li$1(0,`span`,40),pk(1),Nc(),Li$1(2,`button`,34),Zm(`click`,function(){$d(e);let r=HE().$implicit;return xd(HE(2).edit(r))}),Um(3,`app-icon`,6),Nc()}if(i&2){let e=HE().$implicit,n=HE(2);ec(),cg(e.name),ec(),zm(`disabled`,n.busy()),Br(`aria-label`,n.t().edit(e.name))(`data-testid`,`file-edit-`+e.name),ec(),zm(`size`,14)}}function _o(i,t){if(i&1){let e=_E();Li$1(0,`li`,31),Um(1,`app-icon`,32),kE(2,po,2,1,`button`,33)(3,uo,4,5),Li$1(4,`button`,34),Zm(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).download(r))}),Um(5,`app-icon`,35),Nc(),Li$1(6,`button`,34),Zm(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).ops.startRename(r))}),Um(7,`app-icon`,36),Nc(),Li$1(8,`button`,37),Zm(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).ops.startRemove(r))}),Um(9,`app-icon`,38),Nc()()}if(i&2){let e=t.$implicit,n=HE(2);ec(),rg(`text-accent`,e.kind===`dir`)(`text-ink-500`,e.kind===`file`),zm(`name`,e.kind===`dir`?`folder`:`file`)(`size`,15),ec(),SE(e.kind===`dir`?2:3),ec(2),zm(`disabled`,n.busy()),Br(`aria-label`,e.kind===`dir`?n.t().downloadFolder(e.name):n.t().downloadFile(e.name)),ec(),zm(`size`,14),ec(),zm(`disabled`,n.busy()),Br(`aria-label`,n.fileOps().rename(e.name))(`data-testid`,`file-rename-`+e.name),ec(),zm(`size`,14),ec(),zm(`disabled`,n.busy()),Br(`aria-label`,n.fileOps().removeOf(e.name))(`data-testid`,`file-remove-`+e.name),ec(),zm(`size`,14)}}function xo(i,t){if(i&1&&(Um(0,`app-file-ops-bar`,29),kE(1,mo,2,1,`p`,24),Li$1(2,`ul`,30),Sc(3,_o,10,18,`li`,31,Qa),Nc()),i&2){let e=HE();zm(`ops`,e.ops),ec(),SE(e.entries().length===0&&!e.busy()&&e.problem()===null?1:-1),ec(2),Tc(e.entries())}}var pn;var Qa;var Oe;var un=p(()=>{Qr();lS();dS();x$1();ye();Ce();ca$1();sS();Qr();pn=(i,t)=>t.path,Qa=(i,t)=>t.name;Oe=class i{containerId=jc.required();active=jc(!0);saveAsImage=fj();toast=C(Wi$1);t=Lt(()=>oS().containers.files);actions=Lt(()=>oS().containers.actions);fileOps=Lt(()=>oS().containers.fileOps);ops=new oe(()=>({kind:`container`,id:this.containerId()}),()=>this.path(),this.toast,()=>this.load());path=wt(`/`);entries=wt([]);busy=wt(!1);problem=wt(null);dragging=wt(!1);changed=wt(!1);changes=wt([]);loaded=!1;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(){Xd(()=>{this.active()&&!this.loaded&&(this.loaded=!0,Ig(()=>{this.load()}))})}async load(){if(this.changed()){await this.loadChanges();return}this.busy.set(!0);try{let t=await window.electron.files.list(this.containerId(),this.path());this.path.set(t.path),t.ok?(this.entries.set(t.entries),this.problem.set(null)):(this.entries.set([]),this.problem.set(t.problem))}catch(t){this.problem.set(eH(t))}finally{this.busy.set(!1)}}openFolderOf(t){this.changed.set(!1),this.go(this.parentOf(t.path))}toggleChanged(){this.changed.update(t=>!t),this.load()}kindTone(t){return t.kind===`added`?`text-ok`:t.kind===`deleted`?`text-danger`:`text-warn`}go(t){this.ops.cancel(),this.path.set(t),this.load()}async loadChanges(){this.busy.set(!0);try{let t=await window.electron.files.changes(this.containerId());t.ok?(this.changes.set(t.changes),this.problem.set(null)):(this.changes.set([]),this.problem.set(t.problem))}catch(t){this.problem.set(eH(t))}finally{this.busy.set(!1)}}parentOf(t){return`/${t.split(`/`).filter(n=>n!==``).slice(0,-1).join(`/`)}`}editPath=wt(``);editSource=Lt(()=>({kind:`container`,id:this.containerId()}));editOpen=wt(!1);edit(t){this.editPath.set(this.childOf(t)),this.editOpen.set(!0)}childOf(t){return S(this.path(),t.name)}async download(t){try{let e=await window.electron.files.download(this.containerId(),this.childOf(t),t.kind);e.ok?e.savedTo!==null&&this.toast.success(this.t().savedAs(e.savedTo)):this.toast.error(e.problem)}catch(e){this.toast.error(eH(e))}}async chooseAndUpload(){await this.afterUpload(window.electron.files.chooseAndUpload(this.containerId(),this.path()))}onDragOver(t){t.preventDefault(),this.dragging.set(!0)}async onDrop(t){t.preventDefault(),this.dragging.set(!1);let e=[...t.dataTransfer?.files??[]];e.length>0&&await this.afterUpload(window.electron.files.upload(this.containerId(),this.path(),e))}async afterUpload(t){this.busy.set(!0);try{let e=await t;if(!e.ok){this.toast.error(e.problem);return}e.count>0&&this.toast.success(this.t().uploaded(e.count,this.path()))}catch(e){this.toast.error(eH(e))}finally{this.busy.set(!1)}await this.load()}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-files-view`]],hostAttrs:[1,`block`,`h-full`],inputs:{containerId:[1,`containerId`],active:[1,`active`]},outputs:{saveAsImage:`saveAsImage`},decls:21,vars:22,consts:[[1,`flex`,`h-full`,`min-h-0`,`flex-col`,3,`dragover`,`dragleave`,`drop`],[1,`flex`,`shrink-0`,`flex-wrap`,`items-center`,`gap-2`,`border-b`,`border-ink-700`,`px-6`,`py-2.5`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`disabled`],[1,`min-w-0`,`flex-1`,`text-[12px]`,`text-ink-400`],[1,`flex`,`min-w-0`,`flex-1`,`flex-wrap`,`items-center`,`font-mono`,`text-[12px]`],[`type`,`button`,`data-testid`,`files-changed`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`pencil`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[`type`,`button`,`data-testid`,`files-commit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[1,`px-6`],[3,`problem`],[1,`min-h-0`,`flex-1`,`overflow-auto`,`px-6`,`py-3`],[3,`openChange`,`saveAsImage`,`open`,`source`,`path`],[1,`shrink-0`,`border-t`,`border-ink-800`,`px-6`,`py-2`,`text-[11px]`,`text-ink-500`],[`name`,`arrow-up`,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`],[`name`,`upload`,3,`size`],[`type`,`button`,`data-testid`,`files-new-folder`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`folder-plus`,3,`size`],[`type`,`button`,`data-testid`,`files-commit`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`images`,3,`size`],[1,`text-[13px]`,`text-ink-400`],[`data-testid`,`change-list`,1,`divide-y`,`divide-ink-800`,`text-[13px]`],[1,`flex`,`items-center`,`gap-3`,`py-1.5`],[1,`w-24`,`shrink-0`,`text-[11px]`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`font-mono`,`text-[12px]`,`text-ink-200`,`hover:underline`,3,`click`],[3,`ops`],[`data-testid`,`file-list`,1,`divide-y`,`divide-ink-800`,`text-[13px]`],[1,`group`,`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`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`rounded`,`p-1`,`text-ink-500`,`opacity-0`,`group-hover:opacity-100`,`focus:opacity-100`,`hover:text-ink-100`,3,`click`,`disabled`],[`name`,`download`,3,`size`],[`name`,`rename`,3,`size`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`rounded`,`p-1`,`text-ink-500`,`opacity-0`,`group-hover:opacity-100`,`focus:opacity-100`,`hover:text-danger`,3,`click`,`disabled`],[`name`,`trash`,3,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`,3,`click`],[1,`min-w-0`,`flex-1`,`truncate`,`text-ink-200`]],template:function(e,n){e&1&&(Li$1(0,`section`,0),Zm(`dragover`,function(c){return n.onDragOver(c)})(`dragleave`,function(){return n.dragging.set(!1)})(`drop`,function(c){return n.onDrop(c)}),Li$1(1,`div`,1),kE(2,Ya,2,3,`button`,2),kE(3,Xa,2,2,`p`,3)(4,ao,3,1,`nav`,4),Li$1(5,`button`,5),Zm(`click`,function(){return n.toggleChanged()}),Um(6,`app-icon`,6),pk(7),Nc(),Li$1(8,`button`,7),Zm(`click`,function(){return n.load()}),Um(9,`app-icon`,8),pk(10),Nc(),kE(11,oo,6,6)(12,ro,3,3,`button`,9),Nc(),Li$1(13,`div`,10),Um(14,`app-page-messages`,11),Nc(),Li$1(15,`div`,12),kE(16,co,4,1)(17,xo,5,2),Nc(),Li$1(18,`app-edit-file-dialog`,13),fg(`openChange`,function(c){return vk(n.editOpen,c)||(n.editOpen=c),c}),Zm(`saveAsImage`,function(){return n.saveAsImage.emit()}),Nc(),Li$1(19,`p`,14),pk(20),Nc()()),e&2&&(rg(`bg-accent/5`,n.dragging()),ec(2),SE(n.changed()?-1:2),ec(),SE(n.changed()?3:4),ec(2),rg(`border-accent`,n.changed())(`text-accent`,n.changed()),zm(`disabled`,n.busy()),Br(`aria-pressed`,n.changed()),ec(),zm(`size`,14),ec(),$c(` `,n.t().changed,` `),ec(),zm(`disabled`,n.busy()),ec(),zm(`size`,14),ec(),$c(` `,n.t().refresh,` `),ec(),SE(n.changed()?12:11),ec(3),zm(`problem`,n.problem()),ec(2),SE(n.changed()?16:17),ec(2),pg(`open`,n.editOpen),zm(`source`,n.editSource())(`path`,n.editPath()),ec(2),$c(` `,n.changed()?n.t().changesHint:n.t().hint(n.path()),` `))},dependencies:[My,u$1,ie$1,ae],encapsulation:2})}});function go(i,t){if(i&1&&(Li$1(0,`p`,2),Um(1,`app-icon`,4),pk(2),Nc()),i&2){let e=HE();ec(),zm(`size`,14),ec(),$c(` `,e.t().crashLoop(e.crashes()),` `)}}function yo(i,t){if(i&1&&(Li$1(0,`p`,3),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().loading)}}function fo(i,t){if(i&1&&(Li$1(0,`p`,3),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().empty)}}function vo(i,t){i&1&&(Li$1(0,`span`,11),pk(1),Nc()),i&2&&(ec(),$c(`— `,t))}function ho(i,t){if(i&1&&(Li$1(0,`li`,6)(1,`span`,8),pk(2),Nc(),Um(3,`app-icon`,9),Li$1(4,`span`,10),pk(5),kE(6,vo,2,1,`span`,11),Nc()()),i&2){let e,n=t.$implicit,r=HE(2);ec(),zm(`title`,r.fullTime(n)),ec(),cg(r.when(n)),ec(),zm(`name`,r.icon(n))(`size`,13),ec(),nk(r.tone(n)),ec(),$c(` `,r.describe(n),` `),ec(),SE((e=r.hint(n))?6:-1,e)}}function bo(i,t){if(i&1&&(Li$1(0,`ol`,5),Sc(1,ho,7,8,`li`,6,TE),Nc(),Li$1(3,`p`,7),pk(4),Nc()),i&2){let e=HE();ec(),Tc(e.events()),ec(3),cg(e.t().scope)}}function _n(i){let t=[...i].sort((r,c)=>r.time-c.time),e=new Set,n=-Infinity;for(let r of t)r.action===`kill`?n=r.time:r.action===`die`&&r.time-n<=ko&&e.add(r);return e}function Eo(i,t){let e=_n(i);return i.filter(n=>n.time>=t-Co&&(n.action===`oom`||n.action===`die`&&n.exitCode!==0&&!e.has(n))).length}var Co;var wo;var ko;var Do;var So;var Io;var Ae;var xn=p(()=>{Qr();v();dS();sS();Qr();Co=3600*1e3,wo=4,ko=3e4,Do={1:`SIGHUP`,2:`SIGINT`,9:`SIGKILL`,15:`SIGTERM`},So={oom:`text-danger`,start:`text-ok`},Io={start:`play`,restart:`refresh`,stop:`stop`,kill:`stop`,die:`stop`,oom:`warning`,health:`pulse`,destroy:`trash`,create:`plus`};Ae=class i{name=jc.required();active=jc(!1);store=C(u);t=Lt(()=>oS().containers.detail.events);crashLoopAt=wo;events=wt(null);crashes=Lt(()=>Eo(this.events()??[],Date.now()));stopped=Lt(()=>_n(this.events()??[]));constructor(){Xd(()=>{let t=this.name();this.store.containers(),this.active()&&Ig(()=>{this.load(t)})})}when(t){let e=new Date(t.time);return new Date().toDateString()===e.toDateString()?e.toLocaleTimeString():`${e.toLocaleDateString()} ${e.toLocaleTimeString()}`}fullTime(t){return new Date(t.time).toISOString()}icon(t){return Io[t.action]??`lines`}tone(t){return t.action===`die`?t.exitCode===0||this.stopped().has(t)?`text-ink-200`:`text-danger`:t.action===`health`?t.health===`unhealthy`?`text-danger`:t.health===`healthy`?`text-ok`:`text-ink-200`:So[t.action]??`text-ink-200`}describe(t){let e=this.t();switch(t.action){case`die`:return t.exitCode===null?e.exitedUnknown:e.exited(t.exitCode);case`kill`:return e.kill(Do[t.signal??``]??t.signal??`?`);case`health`:return t.health===null?e.health.starting:e.health[t.health];case`rename`:return t.oldName===null?e.renamed:e.rename(t.oldName);default:return e[t.action]}}hint(t){return t.action!==`die`||this.stopped().has(t)?null:t.exitCode===137?this.t().exitHint137:t.exitCode===143?this.t().exitHint143:null}async load(t){try{this.events.set(await window.electron.containers.events(t))}catch{this.events.set([])}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-events-view`]],inputs:{name:[1,`name`],active:[1,`active`]},decls:6,vars:2,consts:[[1,`h-full`,`overflow-auto`,`px-6`,`py-5`],[1,`max-w-3xl`],[`role`,`status`,`data-testid`,`events-crash-loop`,1,`mb-4`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`text-[13px]`,`text-ink-400`],[`name`,`warning`,3,`size`],[`data-testid`,`events-list`,1,`divide-y`,`divide-ink-800`],[1,`flex`,`items-baseline`,`gap-3`,`py-1.5`,`text-[13px]`],[1,`mt-4`,`text-[12px]`,`text-ink-500`],[1,`w-36`,`shrink-0`,`font-mono`,`text-[12px]`,`text-ink-500`,3,`title`],[1,`shrink-0`,`self-center`,`text-ink-500`,3,`name`,`size`],[1,`min-w-0`,`flex-1`],[1,`ml-1`,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Li$1(0,`div`,0)(1,`section`,1),kE(2,go,3,2,`p`,2),kE(3,yo,2,1,`p`,3)(4,fo,2,1,`p`,3)(5,bo,5,1),Nc()()),e&2&&(ec(2),SE(n.crashes()>=n.crashLoopAt?2:-1),ec(),SE(n.events()===null?3:n.events()?.length===0?4:5))},dependencies:[My],encapsulation:2})}});function To(i,t){if(i&1&&(Li$1(0,`span`,4),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().failingStreak(e.health().failingStreak))}}function Mo(i,t){i&1&&(Li$1(0,`code`,10),pk(1),Nc()),i&2&&(ec(),cg(t))}function Vo(i,t){if(i&1&&(Li$1(0,`span`,11),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().fromImage)}}function No(i,t){if(i&1&&(Li$1(0,`p`,14),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().noProbes)}}function Po(i,t){i&1&&(Li$1(0,`pre`,20),pk(1),Nc()),i&2&&(ec(),cg(t))}function Ro(i,t){if(i&1&&(Li$1(0,`p`,21),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().noOutput)}}function Lo(i,t){if(i&1&&(Li$1(0,`li`,16)(1,`div`,17)(2,`span`,18),pk(3),Nc(),Li$1(4,`span`,19),pk(5),Nc()(),kE(6,Po,2,1,`pre`,20)(7,Ro,2,1,`p`,21),Nc()),i&2){let e,n=t.$implicit,r=HE(2);ec(3),cg(r.clock(n)),ec(),nk(n.exitCode===0?`text-ok`:`text-danger`),ec(),$c(` `,r.exitCode(n),` `),ec(),SE((e=n.output.trim())?6:7,e)}}function Fo(i,t){if(i&1&&(Li$1(0,`ul`,15),Sc(1,Lo,8,5,`li`,16,TE),Nc()),i&2){let e=HE();ec(),Tc(e.health().probes)}}var jo;var ze;var gn=p(()=>{Qr();h();dS();sS();Qr();jo={healthy:`border-ok/40 bg-ok/10 text-ok`,unhealthy:`border-danger/40 bg-danger/10 text-danger`,starting:`border-warn/40 bg-warn/10 text-warn`},ze=class i{health=jc.required();busy=jc(!1);refresh=fj();t=Lt(()=>oS().containers.detail.health);tone=Lt(()=>jo[this.health().status??``]??`border-ink-700 bg-ink-800 text-ink-300`);statusLabel=Lt(()=>{let t=this.health().status;return t===null?this.t().status.unknown:this.t().status[t]});command=Lt(()=>this.health().test.join(` `));rhythm=Lt(()=>{let t=this.health(),e=this.t(),n=[];return t.intervalMs!==null&&n.push(e.every(x(t.intervalMs))),t.timeoutMs!==null&&n.push(e.timeout(x(t.timeoutMs))),t.startPeriodMs!==null&&n.push(e.startPeriod(x(t.startPeriodMs))),t.retries!==null&&n.push(e.retries(t.retries)),n.length===0?e.defaults:n.join(` · `)});clock(t){return A(t.finishedAt)||`—`}exitCode(t){return t.exitCode===null?this.t().unknownExitCode:this.t().exitCode(t.exitCode)}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-health-view`]],hostAttrs:[1,`block`,`h-full`,`min-h-0`],inputs:{health:[1,`health`],busy:[1,`busy`]},outputs:{refresh:`refresh`},decls:26,vars:13,consts:[[1,`h-full`,`overflow-auto`,`px-6`,`py-5`],[1,`max-w-3xl`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`],[1,`rounded-md`,`border`,`px-2`,`py-0.5`,`font-mono`,`text-[12px]`],[1,`text-[13px]`,`text-ink-400`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`mt-5`,`space-y-3`],[1,`text-[12px]`,`text-ink-500`],[1,`mt-0.5`,`text-[13px]`,`text-ink-100`],[1,`font-mono`,`break-all`],[1,`text-ink-400`],[1,`mt-8`,`max-w-3xl`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-2`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`space-y-2`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`flex`,`flex-wrap`,`items-baseline`,`gap-3`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-[12px]`],[1,`mt-2`,`font-mono`,`text-[12px]`,`whitespace-pre-wrap`,`text-ink-200`],[1,`mt-2`,`text-[12px]`,`text-ink-500`]],template:function(e,n){if(e&1&&(Li$1(0,`div`,0)(1,`section`,1)(2,`div`,2)(3,`span`,3),pk(4),Nc(),kE(5,To,2,1,`span`,4),Li$1(6,`button`,5),Zm(`click`,function(){return n.refresh.emit()}),Um(7,`app-icon`,6),pk(8),Nc()(),Li$1(9,`dl`,7)(10,`div`)(11,`dt`,8),pk(12),Nc(),Li$1(13,`dd`,9),kE(14,Mo,2,1,`code`,10)(15,Vo,2,1,`span`,11),Nc()(),Li$1(16,`div`)(17,`dt`,8),pk(18),Nc(),Li$1(19,`dd`,9),pk(20),Nc()()()(),Li$1(21,`section`,12)(22,`h3`,13),pk(23),Nc(),kE(24,No,2,1,`p`,14)(25,Fo,3,0,`ul`,15),Nc()()),e&2){let r;ec(3),nk(n.tone()),ec(),cg(n.statusLabel()),ec(),SE(n.health().failingStreak>0?5:-1),ec(),zm(`disabled`,n.busy()),ec(),zm(`size`,14),ec(),$c(` `,n.busy()?n.t().loading:n.t().refresh,` `),ec(4),cg(n.t().command),ec(2),SE((r=n.command())?14:15,r),ec(4),cg(n.t().rhythm),ec(2),cg(n.rhythm()),ec(3),cg(n.t().probes),ec(),SE(n.health().probes.length===0?24:25)}},dependencies:[My],encapsulation:2})}});function zo(i,t){if(i&1&&(Li$1(0,`p`,3),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().loading)}}function Bo(i,t){if(i&1&&(Li$1(0,`p`,3),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().empty)}}function $o(i,t){if(i&1&&pk(0),i&2){let e=HE().$implicit;$c(` · `,HE(2).t().alsoKnownAs(e.aliases.join(`, `)),` `)}}function Wo(i,t){if(i&1){let e=_E();Li$1(0,`li`,10)(1,`div`,11)(2,`div`,12),pk(3),Nc(),Li$1(4,`div`,6),pk(5),kE(6,$o,1,1),Nc()(),Li$1(7,`button`,13),Zm(`click`,function(){let r=$d(e).$implicit;return xd(HE(2).disconnect(r.name))}),Um(8,`app-icon`,14),pk(9),Nc()()}if(i&2){let e=t.$implicit,n=HE(2);ec(3),cg(e.name),ec(2),$c(` `,e.ipAddress??n.t().noAddress,` `),ec(),SE(e.aliases.length>0?6:-1),ec(),zm(`disabled`,n.busy()),Br(`aria-label`,n.t().disconnectFrom(e.name)),ec(),zm(`size`,14),ec(),$c(` `,n.t().disconnect,` `)}}function Ho(i,t){if(i&1&&(Li$1(0,`ul`,4),Sc(1,Wo,10,7,`li`,10,Oo),Nc()),i&2){let e=HE();ec(),Tc(e.attached())}}function Jo(i,t){if(i&1&&(Li$1(0,`p`,7),pk(1),Nc()),i&2){let e=HE();ec(),cg(e.t().allConnected)}}function qo(i,t){if(i&1&&(Li$1(0,`option`,18),pk(1),Nc()),i&2){let e=t.$implicit,n=HE(2);zm(`value`,e.name)(`selected`,n.chosen()===e.name),ec(),cg(e.name)}}function Go(i,t){if(i&1){let e=_E();Li$1(0,`label`,19)(1,`span`,2),pk(2),Nc(),Li$1(3,`input`,22),Zm(`input`,function(r){$d(e);return xd(HE(2).alias.set(r.target.value))}),Nc(),Li$1(4,`span`,23),pk(5),Nc()()}if(i&2){let e=HE(2);ec(2),cg(e.t().alias),ec(),nk(e.field+` mt-1.5 w-full`),zm(`placeholder`,e.t().aliasPlaceholder)(`value`,e.alias()),Br(`aria-label`,e.t().alias),ec(2),cg(e.t().aliasHint)}}function Uo(i,t){if(i&1){let e=_E();Li$1(0,`form`,15),Zm(`submit`,function(r){$d(e);return xd(HE().connect(r))}),Li$1(1,`select`,16),Zm(`change`,function(r){$d(e);return xd(HE().choose(r.target.value))}),Li$1(2,`option`,17),pk(3),Nc(),Sc(4,qo,2,3,`option`,18,Ao),Nc(),kE(6,Go,6,7,`label`,19),Li$1(7,`button`,20),Um(8,`app-icon`,21),pk(9),Nc()()}if(i&2){let e=HE();ec(),nk(e.field+` w-full`),Br(`aria-label`,e.t().networkLabel),ec(),zm(`selected`,e.chosen()===``),ec(),cg(e.t().choose),ec(),Tc(e.available()),ec(2),SE(e.canAlias()?6:-1),ec(),zm(`disabled`,e.chosen()===``||e.busy()),ec(),zm(`size`,14),ec(),$c(` `,e.busy()?e.t().working:e.t().connect,` `)}}function Ko(i,t){i&1&&(Li$1(0,`p`,9),pk(1),Nc()),i&2&&(ec(),$c(` `,t,` `))}var Oo;var Ao;var Zo;var Qo;var Be;var yn=p(()=>{Qr();lS();dS();sS();Qr();Oo=(i,t)=>t.name,Ao=(i,t)=>t.id;Zo=/^[\w][\w.-]*$/,Qo=`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`,Be=class i{containerId=jc.required();t=Lt(()=>oS().containers.detail.networks);field=Qo;attached=wt([]);all=wt([]);chosen=wt(``);alias=wt(``);problem=wt(null);loading=wt(!0);busy=wt(!1);available=Lt(()=>{let t=new Set(this.attached().map(e=>e.name));return this.all().filter(e=>!t.has(e.name))});canAlias=Lt(()=>{let t=this.chosen();return t!==``&&this.all().some(e=>e.name===t&&!e.builtIn)});constructor(){Xd(()=>{this.load(this.containerId())})}async load(t){this.loading.set(!0);try{let[e,n]=await Promise.all([window.electron.networks.ofContainer(t),window.electron.networks.list()]);this.attached.set(e),this.all.set(n)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}choose(t){this.chosen.set(t),this.canAlias()||this.alias.set(``)}async connect(t){t.preventDefault();let e=this.chosen(),n=this.canAlias()?this.alias().trim():``;if(e===``||this.busy())return;if(n!==``&&!Zo.test(n)){this.problem.set(this.t().invalidAlias(n));return}await this.attach(()=>window.electron.networks.connect(e,this.containerId(),n===``?null:n))&&(this.chosen.set(``),this.alias.set(``))}async disconnect(t){await this.attach(()=>window.electron.networks.disconnect(t,this.containerId()))}async attach(t){this.busy.set(!0),this.problem.set(null);try{let e=await t();return e.ok?(await this.load(this.containerId()),!0):(this.problem.set(e.problem),!1)}catch(e){return this.problem.set(eH(e)),!1}finally{this.busy.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-networks-view`]],hostAttrs:[1,`block`,`h-full`,`min-h-0`],inputs:{containerId:[1,`containerId`]},decls:15,vars:6,consts:[[1,`h-full`,`overflow-auto`,`px-6`,`py-5`],[1,`max-w-3xl`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-2`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`divide-y`,`divide-ink-800`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`],[1,`mt-8`,`max-w-3xl`],[1,`mt-0.5`,`text-[12px]`,`text-ink-500`],[1,`mt-3`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`space-y-3`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`flex`,`items-center`,`gap-4`,`px-4`,`py-3`],[1,`min-w-0`,`flex-1`],[1,`truncate`,`text-[13px]`,`text-ink-100`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`close`,3,`size`],[1,`mt-3`,`space-y-3`,3,`submit`],[3,`change`],[`value`,``,3,`selected`],[3,`value`,`selected`],[1,`block`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`plus`,3,`size`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`]],template:function(e,n){if(e&1&&(Li$1(0,`div`,0)(1,`section`,1)(2,`h3`,2),pk(3),Nc(),kE(4,zo,2,1,`p`,3)(5,Bo,2,1,`p`,3)(6,Ho,3,0,`ul`,4),Nc(),Li$1(7,`section`,5)(8,`h3`,2),pk(9),Nc(),Li$1(10,`p`,6),pk(11),Nc(),kE(12,Jo,2,1,`p`,7)(13,Uo,10,9,`form`,8),kE(14,Ko,2,1,`p`,9),Nc()()),e&2){let r;ec(3),cg(n.t().title),ec(),SE(n.loading()?4:n.attached().length===0?5:6),ec(5),cg(n.t().addTitle),ec(2),cg(n.t().addHint),ec(),SE(n.available().length===0?12:13),ec(2),SE((r=n.problem())?14:-1,r)}},dependencies:[My],encapsulation:2})}});function er(i,t){if(i&1){let e=_E();Li$1(0,`span`,16),pk(1),Nc(),Li$1(2,`button`,17),Zm(`click`,function(){$d(e);return xd(HE(2).killNow())}),Um(3,`app-icon`,18),pk(4),Nc()}if(i&2){let e=HE(2);ec(),cg(e.k().hint),ec(2),zm(`size`,14),ec(),$c(` `,e.k().now,` `)}}function tr(i,t){if(i&1){let e=_E();Li$1(0,`button`,27),Zm(`click`,function(){$d(e);return xd(HE(4).recreate())}),Um(1,`app-icon`,28),pk(2),Nc()}if(i&2){let e=HE(4);zm(`disabled`,e.recreateBusy()),ec(),zm(`size`,14),ec(),$c(` `,e.a().recreate,` `)}}function nr(i,t){if(i&1){let e=_E();Li$1(0,`div`,19),Um(1,`app-icon`,21),Li$1(2,`div`,22)(3,`p`,23),pk(4),Nc(),Li$1(5,`p`,16),pk(6),Nc()(),kE(7,tr,3,3,`button`,24),Li$1(8,`button`,25),Zm(`click`,function(){let r=$d(e);return xd(HE(3).reconnect(r))}),Um(9,`app-icon`,26),pk(10),Nc()()}if(i&2){let e=t,n=HE(3);ec(),zm(`size`,14),ec(3),cg(n.w().network(e)),ec(2),cg(n.w().networkWhy),ec(),SE(n.canRecreate()?7:-1),ec(),zm(`disabled`,n.wiringBusy()),ec(),zm(`size`,14),ec(),$c(` `,n.w().connect(e),` `)}}function ir(i,t){if(i&1){let e=_E();Li$1(0,`button`,25),Zm(`click`,function(){$d(e);return xd(HE(5).recreate())}),Um(1,`app-icon`,28),pk(2),Nc()}if(i&2){let e=HE(5);zm(`disabled`,e.recreateBusy()),ec(),zm(`size`,14),ec(),$c(` `,e.a().recreate,` `)}}function ar(i,t){if(i&1){let e=_E();Li$1(0,`button`,25),Zm(`click`,function(){$d(e);return xd(HE(5).restartForPorts())}),Um(1,`app-icon`,28),pk(2),Nc()}if(i&2){let e=HE(5);zm(`disabled`,e.wiringBusy()||e.pending()),ec(),zm(`size`,14),ec(),$c(` `,e.w().restart,` `)}}function or(i,t){if(i&1&&kE(0,ir,3,3,`button`,30)(1,ar,3,3,`button`,30),i&2)SE(HE(4).canRecreate()?0:1)}function rr(i,t){if(i&1&&(Li$1(0,`div`,20),Um(1,`app-icon`,29),Li$1(2,`div`,22)(3,`p`,23),pk(4),Nc(),Li$1(5,`p`,16),pk(6),Nc()(),kE(7,or,2,1),Nc()),i&2){let e=HE(),n=HE(2);ec(),zm(`size`,14),ec(3),cg(n.w().ports(n.portList(e.missingPorts))),ec(2),cg(e.missingNetwork===null?n.w().portsWhy:n.w().portsFromNetwork),ec(),SE(e.missingNetwork===null?7:-1)}}function lr(i,t){if(i&1&&(kE(0,nr,11,7,`div`,19),kE(1,rr,8,4,`div`,20)),i&2){let e,n=t;SE((e=n.missingNetwork)?0:-1,e),ec(),SE(n.missingPorts.length>0?1:-1)}}function sr(i,t){if(i&1){let e=_E();Li$1(0,`div`,9),Um(1,`app-state-dot`,10),Li$1(2,`h1`,11),pk(3),Nc(),Li$1(4,`span`,12),pk(5),Nc(),Li$1(6,`span`,13),pk(7),Nc(),Li$1(8,`span`,12),pk(9),Nc(),Li$1(10,`div`,14),kE(11,er,5,3),Li$1(12,`app-action-menu`,15),Zm(`picked`,function(r){$d(e);return xd(HE().onMenu(r))}),Nc()()(),kE(13,lr,2,2)}if(i&2){let e,n=HE(),r=bk(0);ec(),zm(`state`,r.state),ec(2),cg(r.name),ec(2),cg(r.status),ec(2),cg(r.shortId),ec(2),cg(r.image),ec(2),SE(n.slowStop()?11:-1),ec(),zm(`label`,n.t().menu)(`items`,n.menuItems()),ec(),SE((e=n.wiring())?13:-1,e)}}function dr(i,t){if(i&1&&(Li$1(0,`a`,31),pk(1),Nc()),i&2){let e=t,n=HE(3);zm(`routerLink`,kk(2,Xo,e.id)),ec(),$c(` `,n.t().successor(e.name,e.status),` `)}}function cr(i,t){if(i&1&&(Li$1(0,`p`)(1,`span`,23),pk(2),Nc(),pk(3),Nc(),kE(4,dr,2,4,`a`,31)),i&2){let e,n=HE(2);ec(2),cg(t),ec(),$c(``,n.t().gone,` `),ec(),SE((e=n.successor())?4:-1,e)}}function mr(i,t){if(i&1&&(Li$1(0,`p`),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().goneUnnamed)}}function pr(i,t){if(i&1&&(Li$1(0,`div`,2),kE(1,cr,5,3)(2,mr,2,1,`p`),Nc()),i&2){let e,n=HE();ec(),SE((e=n.name())?1:2,e)}}function ur(i,t){if(i&1&&(Li$1(0,`button`,34),Um(1,`app-icon`,60),pk(2),Nc()),i&2){let e=t.$implicit,n=HE(2);zm(`value`,e),ec(),zm(`name`,n.tabIcons[e])(`size`,14),ec(),$c(``,n.tabLabel(e),` `)}}function _r(i,t){if(i&1){let e=_E();Li$1(0,`div`,37)(1,`app-health-view`,61),Zm(`refresh`,function(){$d(e);return xd(HE(2).onHealthRefresh())}),Nc()()}if(i&2){let e=HE(2);ec(),zm(`health`,t)(`busy`,e.healthBusy())}}function xr(i,t){i&1&&(Li$1(0,`p`,39),pk(1),Nc()),i&2&&(ec(),cg(t))}function gr(i,t){i&1&&Um(0,`app-json-view`,40),i&2&&zm(`value`,t)}function yr(i,t){if(i&1&&(Li$1(0,`p`,12),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().fetching)}}function fr(i,t){if(i&1&&(Li$1(0,`div`,41),Um(1,`app-environment-view`,62),Nc()),i&2){let e=HE(2),n=bk(0);ec(),zm(`containerId`,e.id())(`compose`,!!n.composeProject)}}function vr(i,t){if(i&1&&Um(0,`app-terminal-view`,63),i&2){let e=HE(3),n=bk(0);zm(`containerId`,e.id())(`name`,n.name)(`active`,e.tab()===`terminal`)}}function hr(i,t){if(i&1&&(Li$1(0,`p`,47),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().terminalLoading)}}function br(i,t){if(i&1&&(Mm(0,vr,1,3)(1,hr,2,1),DE(2,0,Yo,1)),i&2){let e=HE(2);ec(2),CE(e.visited().has(`terminal`))}}function Cr(i,t){if(i&1&&(Li$1(0,`p`,47),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().shellOnlyRunning)}}function wr(i,t){if(i&1&&(Li$1(0,`div`,50),Um(1,`app-networks-view`,64),Nc()),i&2){let e=HE(2);ec(),zm(`containerId`,e.id())}}function kr(i,t){if(i&1&&(Li$1(0,`div`,51),Um(1,`app-assistant-view`,64),Nc()),i&2){let e=HE(2);ec(),zm(`containerId`,e.id())}}function Dr(i,t){if(i&1&&(vr$1(),Li$1(0,`svg`,65),Um(1,`polyline`,66),Nc(),Bd(),Li$1(2,`div`,67),pk(3),Nk(4,`number`),Nc()),i&2){let e=HE(2);ec(),Br(`points`,e.cpuPath()),ec(2),$c(` `,e.t().lastMinute(Ak(4,2,e.cpuPeak(),`1.2-2`)??``),` `)}}function Sr(i,t){if(i&1&&(Um(0,`div`,68),Li$1(1,`div`,67),pk(2),Nc()),i&2){let e=HE(2);ec(2),cg(e.t().chartPending)}}function Ir(i,t){if(i&1&&(Li$1(0,`p`,72),pk(1),Nc()),i&2){let e=HE(3);ec(),cg(e.t().nearLimit)}}function Er(i,t){if(i&1&&(Li$1(0,`div`,69),Um(1,`div`,70),Nc(),Li$1(2,`div`,71),pk(3),Nk(4,`number`),Nc(),kE(5,Ir,2,1,`p`,72)),i&2){let e=HE(2);ec(),nk(e.memoryPercent()>=90?`bg-danger`:`bg-accent`),tg(`width`,e.memoryPercent(),`%`),ec(2),$c(` `,e.t().ofLimit(Ak(4,6,e.memoryPercent(),`1.1-1`)??``),` `),ec(2),SE(e.memoryPercent()>=90?5:-1)}}function Tr(i,t){if(i&1&&(Li$1(0,`div`,58),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().noLimit)}}function Mr(i,t){if(i&1&&(Li$1(0,`p`,59),pk(1),Nc()),i&2){let e=HE(2);ec(),cg(e.t().statsOnlyRunning)}}function Vr(i,t){if(i&1){let e=_E();Li$1(0,`div`,32),fg(`valueChange`,function(r){$d(e);let c=HE();return vk(c.tab,r)||(c.tab=r),xd(r)}),Li$1(1,`div`,33),Sc(2,ur,3,4,`button`,34,kc),Nc(),Li$1(4,`div`,35),Um(5,`app-logs-view`,36),Nc(),kE(6,_r,2,2,`div`,37),Li$1(7,`div`,38),kE(8,xr,2,1,`p`,39)(9,gr,1,1,`app-json-view`,40)(10,yr,2,1,`p`,12),Nc(),kE(11,fr,2,2,`div`,41),Li$1(12,`div`,42),Um(13,`app-processes-view`,43),Nc(),Li$1(14,`div`,44),Um(15,`app-events-view`,45),Nc(),Li$1(16,`div`,46),kE(17,br,4,1)(18,Cr,2,1,`p`,47),Nc(),Li$1(19,`div`,48)(20,`app-files-view`,49),Zm(`saveAsImage`,function(){$d(e);return xd(HE().commitOpen.set(!0))}),Nc()(),kE(21,wr,2,1,`div`,50),kE(22,kr,2,1,`div`,51),Li$1(23,`div`,52)(24,`div`,53)(25,`div`,54)(26,`div`,16),pk(27),Nc(),Li$1(28,`div`,55),pk(29),Nk(30,`number`),Li$1(31,`span`,56),pk(32,`%`),Nc()(),kE(33,Dr,5,5)(34,Sr,3,1),Li$1(35,`div`,57),pk(36),Nc()(),Li$1(37,`div`,54)(38,`div`,16),pk(39),Nc(),Li$1(40,`div`,55),pk(41),Nc(),kE(42,Er,6,9)(43,Tr,2,1,`div`,58),Nc()(),kE(44,Mr,2,1,`p`,59),Nc()()}if(i&2){let e,n,r=HE(),c=bk(0);pg(`value`,r.tab),ec(),Br(`aria-label`,r.t().tabsLabel),ec(),Tc(r.tabNames()),ec(3),zm(`preset`,r.logs()??null)(`containerId`,r.id())(`name`,c.name),ec(),SE((e=r.health())?6:-1,e),ec(2),SE((n=r.inspectProblem())?8:(n=r.inspect())?9:10,n),ec(3),SE(r.visited().has(`env`)?11:-1),ec(2),zm(`containerId`,r.id())(`active`,r.tab()===`processes`)(`running`,c.state===`running`),ec(2),zm(`name`,c.name)(`active`,r.tab()===`events`),ec(2),SE(c.state===`running`?17:18),ec(3),zm(`containerId`,r.id())(`active`,r.tab()===`files`),ec(),SE(r.visited().has(`networks`)?21:-1),ec(),SE(r.assistantConfigured()&&r.visited().has(`assistant`)?22:-1);let C=r.sample();ec(5),cg(r.t().cpu),ec(2),$c(` `,C?Ak(30,26,C.cpuPercent,`1.2-2`):`—`),ec(4),SE(r.cpuPath()?33:34),ec(3),cg(r.cpuLimit()===null?r.t().cpuNoLimit:r.cpuOfLimitText()),ec(3),cg(r.t().memory),ec(2),cg(r.memoryLabel()),ec(),SE(r.memoryLimit()!==null?42:43),ec(2),SE(C?-1:44)}}function Nr(i,t){if(i&1){let e=_E();Li$1(0,`app-adjust-dialog`,73),fg(`openChange`,function(r){$d(e);let c=HE();return vk(c.adjustOpen,r)||(c.adjustOpen=r),xd(r)}),Nc(),Li$1(1,`app-duplicate-dialog`,74),fg(`openChange`,function(r){$d(e);let c=HE();return vk(c.duplicateOpen,r)||(c.duplicateOpen=r),xd(r)}),Nc(),Li$1(2,`app-rename-dialog`,75),fg(`openChange`,function(r){$d(e);let c=HE();return vk(c.renameOpen,r)||(c.renameOpen=r),xd(r)}),Nc(),Li$1(3,`app-commit-dialog`,76),fg(`openChange`,function(r){$d(e);let c=HE();return vk(c.commitOpen,r)||(c.commitOpen=r),xd(r)}),Nc()}if(i&2){let e=t,n=HE();pg(`open`,n.adjustOpen),zm(`containerId`,n.id())(`name`,e.name)(`project`,e.composeProject),ec(),pg(`open`,n.duplicateOpen),zm(`containerId`,n.id())(`name`,e.name),ec(),pg(`open`,n.renameOpen),zm(`containerId`,n.id())(`name`,e.name)(`compose`,!!e.composeProject),ec(),pg(`open`,n.commitOpen),zm(`containerId`,n.id())(`containerName`,e.name)(`image`,e.image)(`running`,e.state===`running`)(`mounts`,n.commitMounts())}}var Yo;var Xo;var fn;var vn;p(()=>{Qr();Ne$1();ia$1();Le$1();g();v();lS();l();h();G$2();J();ca$1();Ye$1();Kt();Zt();Qt();Yt();en();Me$2();tn();Ze$1();nn();an();on();dS();rn();b();mn();un();xn();gn();yn();sS();Qr();Yo=()=>[import(`./chunk-TwB2JZ5F2.js`).then(i=>i.TerminalView)],Xo=i=>[`/containers`,i];fn=60,vn=class i{id=jc.required();name=jc(void 0);diagnose=jc(void 0);tabblad=jc(void 0);geheugen=jc(void 0);processor=jc(void 0);hernoemen=jc(void 0);stoppen=jc(void 0);dupliceren=jc(void 0);bewaren=jc(void 0);aanpassen=jc(void 0);verwijderen=jc(void 0);logs=jc(void 0);yaml=jc(void 0);store=C(u);router=C(pe);toast=C(Wi$1);muted=C(r);compose=C(p$1);t=Lt(()=>oS().containers.detail);tabIcons={logs:`lines`,health:`pulse`,inspect:`code`,env:`sliders`,stats:`chart`,processes:`menu`,terminal:`terminal`,files:`folder`,networks:`networks`,events:`clock`,assistant:`sparkle`};assistantConfigured=wt(!1);tabNames=Lt(()=>{let t=[`logs`,`inspect`,`env`,`stats`,`processes`,`events`,`terminal`,`files`,`networks`],e=this.health()===null?t:[`logs`,`health`,...t.slice(1)];return this.assistantConfigured()?[...e,`assistant`]:e});tab=wt(`logs`);visited=wt(new Set([`logs`]));health=wt(null);healthBusy=wt(!1);inspect=wt(null);inspectProblem=wt(null);confirmOpen=wt(!1);diagnosisOpen=wt(!1);runCommandOpen=wt(!1);runCommandFormat=wt(`run`);restartPolicyOpen=wt(!1);memoryLimitOpen=wt(!1);cpuLimitOpen=wt(!1);renameOpen=wt(!1);commitOpen=wt(!1);killOpen=wt(!1);duplicateOpen=wt(!1);adjustOpen=wt(!1);slowStop=Lt(()=>this.store.slow().has(this.id()));k=Lt(()=>oS().containers.kill);commitMounts=Lt(()=>(this.inspect()?.Mounts??[]).map(e=>({source:e.Type===`volume`?e.Name??``:e.Type===`tmpfs`?`tmpfs`:e.Source??``,destination:e.Destination??``})));memoryLimit=Lt(()=>{let e=this.inspect()?.HostConfig?.Memory;return typeof e==`number`&&e>0?e:null});cpuLimit=Lt(()=>{let e=this.inspect()?.HostConfig?.NanoCpus;return typeof e==`number`&&e>0?e/1e9:null});cpuHistory=wt([]);wiring=wt(null);wiringBusy=wt(!1);w=Lt(()=>oS().containers.detail.wiring);a=Lt(()=>oS().containers.actions);canRecreate=Lt(()=>{let t=this.container();return t!==null&&t.composeProject!==null&&t.composeService!==null&&t.composeWorkingDir!==null&&this.compose.status()?.cliAvailable===!0});recreateBusy=Lt(()=>{let t=this.container()?.composeProject;return t==null||this.compose.pending().has(t)});wiringKey=Lt(()=>{let t=this.container();return t===null?null:`${t.id}|${t.state}|${t.missingNetwork??``}`});container=Lt(()=>this.store.containers().find(t=>t.id===this.id())??null);successor=Lt(()=>{let t=this.name();return t===void 0?null:this.store.containers().find(e=>e.name===t&&e.id!==this.id())??null});loaded=Lt(()=>this.store.containers().length>0||!this.store.loading());sample=Lt(()=>this.store.stats().get(this.id())??null);pending=Lt(()=>this.store.pending().has(this.id()));menuItems=Lt(()=>{let t=this.container(),e=this.pending();if(t===null)return[];let n=oS().common,r=oS().containers.actions,c=t.state===`running`||t.state===`restarting`;return[...t.state===`running`?[{id:`stop`,label:n.stop,icon:`stop`,disabled:e},{id:`restart`,label:n.restart,icon:`refresh`,disabled:e},{id:`pause`,label:r.pause,icon:`pause`,disabled:e}]:t.state===`paused`?[{id:`unpause`,label:r.resume,icon:`play`,disabled:e}]:[{id:`start`,label:n.start,icon:`play`,disabled:e}],...this.canRecreate()?[{id:`recreate`,label:r.recreate,icon:`refresh`,disabled:e||this.recreateBusy(),hint:`docker compose up -d --force-recreate`}]:[],{id:`diagnose`,label:r.copyDiagnosis,icon:`copy`,separated:!0},{id:`runCommand`,label:r.copyRunCommand,icon:`copy`},{id:`composeService`,label:r.copyComposeService,icon:`file`},{id:`rename`,label:r.rename,icon:`pencil`,separated:!0},{id:`adjust`,label:r.adjust,icon:`sliders`},{id:`commit`,label:r.commit,icon:`images`},{id:`duplicate`,label:r.duplicate,icon:`copy`},{id:`restartPolicy`,label:r.restartPolicy,icon:`refresh`},{id:`memoryLimit`,label:r.memoryLimit,icon:`sliders`},{id:`cpuLimit`,label:r.cpuLimit,icon:`sliders`},this.muted.has(t.name)?{id:`unmute`,label:r.unmute,icon:`bell`,separated:!0}:{id:`mute`,label:r.mute,icon:`bell-off`,separated:!0},...c?[{id:`kill`,label:r.kill,icon:`power`,danger:!0,separated:!0}]:[],{id:`remove`,label:n.remove,icon:`trash`,danger:!0,disabled:e,separated:!c}]});cpuPath=Lt(()=>{let t=this.cpuHistory();if(t.length<2)return``;let e=this.cpuLimit(),n=e===null?Math.max(...t,1):e*100,r=100/(fn-1);return t.map((c,C)=>`${(C*r).toFixed(2)},${(30-Math.min(c,n)/n*28).toFixed(2)}`).join(` `)});cpuPeak=Lt(()=>Math.max(...this.cpuHistory(),0));constructor(){this.muted.load(),Xd(()=>{let t=this.tab();this.visited.update(e=>e.has(t)?e:new Set(e).add(t))}),Xd(()=>{this.store.watchStats([this.id()])}),Xd(()=>{let t=this.sample();t!==null&&this.cpuHistory.update(e=>[...e,t.cpuPercent].slice(-fn))}),Xd(()=>{this.loadInspect(this.id())}),Xd(()=>{this.wiringKey()!==null&&this.loadWiring(this.id())}),Xd(()=>{if((this.container()?.status??``)===``){this.health.set(null);return}this.loadHealth(this.id())}),Xd(()=>{this.diagnose()!==void 0&&this.diagnosisOpen.set(!0)}),Xd(()=>{let t=this.tabblad();t!==void 0&&this.tabNames().includes(t)&&Ig(()=>this.tab.set(t))}),Xd(()=>{this.geheugen()!==void 0&&Ig(()=>this.memoryLimitOpen.set(!0)),this.processor()!==void 0&&Ig(()=>this.cpuLimitOpen.set(!0)),this.hernoemen()!==void 0&&Ig(()=>this.renameOpen.set(!0)),this.stoppen()!==void 0&&Ig(()=>this.killOpen.set(!0)),this.dupliceren()!==void 0&&Ig(()=>this.duplicateOpen.set(!0)),this.bewaren()!==void 0&&Ig(()=>this.commitOpen.set(!0)),this.aanpassen()!==void 0&&Ig(()=>this.adjustOpen.set(!0)),this.verwijderen()!==void 0&&Ig(()=>this.confirmOpen.set(!0)),this.logs()!==void 0&&Ig(()=>this.tab.set(`logs`))}),Xd(()=>{this.yaml()!==void 0&&Ig(()=>{this.runCommandFormat.set(`compose`),this.runCommandOpen.set(!0)})}),C(ve$1).onDestroy(()=>this.store.watchStats([])),window.electron.assistant.status().then(t=>this.assistantConfigured.set(t.configured)).catch(()=>this.assistantConfigured.set(!1)),this.store.refresh(),this.compose.status()===null&&this.compose.loadStatus().catch(()=>{})}tabLabel(t){return this.t().tabs[t]}memoryLabel(){let t=this.sample();if(t===null)return`—`;let e=this.memoryLimit();return e===null?d(t.memoryBytes):`${d(t.memoryBytes)} / ${d(e)}`}memoryPercent(){let t=this.sample(),e=this.memoryLimit();return t===null||e===null?0:Math.min(100,t.memoryBytes/e*100)}cpuOfLimitText(){let t=this.sample(),e=this.cpuLimit();if(t===null||e===null)return``;let n=new Intl.NumberFormat(iS(),{maximumFractionDigits:1}).format(Math.min(100,t.cpuPercent/e));return this.t().cpuOfLimit(n,Ze(e,iS()))}onMemoryLimitSaved(){this.loadInspect(this.id())}onMenu(t){t===`diagnose`?this.diagnosisOpen.set(!0):t===`runCommand`?(this.runCommandFormat.set(`run`),this.runCommandOpen.set(!0)):t===`composeService`?(this.runCommandFormat.set(`compose`),this.runCommandOpen.set(!0)):t===`restartPolicy`?this.restartPolicyOpen.set(!0):t===`memoryLimit`?this.memoryLimitOpen.set(!0):t===`cpuLimit`?this.cpuLimitOpen.set(!0):t===`rename`?this.renameOpen.set(!0):t===`commit`?this.commitOpen.set(!0):t===`kill`?this.killOpen.set(!0):t===`duplicate`?this.duplicateOpen.set(!0):t===`adjust`?this.adjustOpen.set(!0):t===`mute`||t===`unmute`?this.setMuted(t===`mute`):t===`remove`?this.askRemove():t===`recreate`?this.recreate():this.store.run(t,this.id())}async setMuted(t){let e=this.container()?.name;if(e!==void 0)try{await this.muted.mute(e,t),this.toast.success(t?oS().containers.actions.muted(e):oS().containers.actions.unmuted(e))}catch(n){this.toast.error(eH(n))}}killNow(){this.store.kill(this.id())}askRemove(){this.confirmOpen.set(!0)}async confirmRemove(){await this.store.run(`remove`,this.id()),await this.router.navigate([`/containers`])}onHealthRefresh(){this.loadHealth(this.id())}async loadHealth(t){this.healthBusy.set(!0);try{this.health.set(await window.electron.containers.health(t))}catch{this.health.set(null)}finally{this.healthBusy.set(!1)}}portList(t){return t.map(e=>{let n=e.hostPort===null?String(e.containerPort):String(e.hostPort);return e.hostIp===null?n:`${e.hostIp}:${n}`}).join(`, `)}async reconnect(t){this.wiringBusy.set(!0);try{let e=await window.electron.networks.connect(t,this.id(),null);e.ok||this.toast.error(e.problem)}catch(e){this.toast.error(eH(e))}finally{this.wiringBusy.set(!1)}await this.store.refresh(),await this.loadWiring(this.id())}async recreate(){let t=this.container();if(t===null||t.composeProject===null||t.composeService===null||!await this.compose.recreate(t.composeProject,t.composeService))return;await this.store.refresh();let n=this.store.containers().find(r=>r.name===t.name&&r.id!==t.id);n!==void 0&&await this.router.navigate([`/containers`,n.id],{replaceUrl:!0})}async restartForPorts(){await this.store.run(`restart`,this.id()),await this.loadWiring(this.id())}async loadWiring(t){try{this.wiring.set(await window.electron.containers.wiring(t))}catch{this.wiring.set(null)}}async loadInspect(t){try{this.inspect.set(await window.electron.containers.inspect(t)),this.inspectProblem.set(null)}catch(e){this.inspect.set(null),this.inspectProblem.set(eH(e))}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-container-detail`]],hostAttrs:[1,`flex`,`h-full`,`flex-col`],inputs:{id:[1,`id`],name:[1,`name`],diagnose:[1,`diagnose`],tabblad:[1,`tabblad`],geheugen:[1,`geheugen`],processor:[1,`processor`],hernoemen:[1,`hernoemen`],stoppen:[1,`stoppen`],dupliceren:[1,`dupliceren`],bewaren:[1,`bewaren`],aanpassen:[1,`aanpassen`],verwijderen:[1,`verwijderen`],logs:[1,`logs`],yaml:[1,`yaml`]},decls:15,vars:26,consts:[[1,`shrink-0`,`border-b`,`border-ink-700`,`px-6`,`pt-4`,`pb-3`],[`routerLink`,`/containers`,1,`mx-focus`,`inline-flex`,`items-center`,`gap-1`,`text-[12px]`,`text-ink-400`,`hover:text-ink-100`],[`data-testid`,`container-gone`,1,`mt-3`,`text-[13px]`,`text-ink-400`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`value`],[3,`openChange`,`open`,`containerId`],[3,`openChange`,`formatChange`,`open`,`format`,`containerId`,`composeProject`],[3,`openChange`,`saved`,`open`,`containerId`,`compose`],[`confirmIcon`,`power`,3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`],[3,`openChange`,`confirmed`,`open`,`title`,`description`],[1,`mt-2`,`flex`,`flex-wrap`,`items-center`,`gap-3`],[`size`,`md`,`aria-hidden`,`true`,3,`state`],[1,`text-lg`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`text-[13px]`,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-500`],[1,`ml-auto`,`flex`,`items-center`,`gap-2`],[3,`picked`,`label`,`items`],[1,`text-[12px]`,`text-ink-400`],[`type`,`button`,`data-testid`,`kill-now`,1,`mx-btn`,`mx-focus`,`border-danger`,`text-danger`,3,`click`],[`name`,`power`,3,`size`],[`role`,`status`,`data-testid`,`wiring-network`,1,`mt-3`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`],[`role`,`status`,`data-testid`,`wiring-ports`,1,`mt-3`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`],[`name`,`networks`,1,`text-danger`,3,`size`],[1,`min-w-0`,`flex-1`],[1,`text-ink-100`],[`type`,`button`,`data-testid`,`wiring-recreate`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`plus`,3,`size`],[`type`,`button`,`data-testid`,`wiring-recreate`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[`name`,`warning`,1,`text-danger`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`disabled`],[1,`mx-focus`,`mt-2`,`inline-flex`,`items-center`,`gap-1`,`text-accent`,`hover:underline`,3,`routerLink`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`logs`,1,`min-h-0`,`flex-1`],[3,`preset`,`containerId`,`name`],[`rdxTabsPanel`,``,`value`,`health`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`inspect`,1,`min-h-0`,`flex-1`,`overflow-auto`,`px-6`,`py-4`],[1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[3,`value`],[`rdxTabsPanel`,``,`value`,`env`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`processes`,1,`min-h-0`,`flex-1`],[3,`containerId`,`active`,`running`],[`rdxTabsPanel`,``,`value`,`events`,1,`min-h-0`,`flex-1`],[3,`name`,`active`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[`rdxTabsPanel`,``,`value`,`files`,1,`min-h-0`,`flex-1`],[3,`saveAsImage`,`containerId`,`active`],[`rdxTabsPanel`,``,`value`,`networks`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`stats`,1,`min-h-0`,`flex-1`,`overflow-auto`,`px-6`,`py-5`],[1,`grid`,`max-w-3xl`,`gap-6`,`sm:grid-cols-2`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-4`],[1,`mt-1`,`text-2xl`,`font-semibold`,`tabular-nums`,`text-ink-100`],[1,`text-base`,`text-ink-400`],[`data-testid`,`cpu-limit`,1,`mt-1`,`text-[11px]`,`text-ink-500`],[`data-testid`,`memory-no-limit`,1,`mt-4`,`text-[11px]`,`text-ink-500`],[1,`mt-6`,`text-[13px]`,`text-ink-400`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`refresh`,`health`,`busy`],[3,`containerId`,`compose`],[3,`containerId`,`name`,`active`],[3,`containerId`],[`viewBox`,`0 0 100 30`,`preserveAspectRatio`,`none`,`aria-hidden`,`true`,1,`mt-3`,`h-16`,`w-full`],[`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1`,`vector-effect`,`non-scaling-stroke`,1,`text-accent`],[1,`mt-1`,`text-[11px]`,`text-ink-500`],[1,`mt-3`,`h-16`],[1,`mt-4`,`h-2`,`w-full`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`h-full`,`rounded-full`,`transition-[width]`],[`data-testid`,`memory-of-limit`,1,`mt-1`,`text-[11px]`,`text-ink-500`],[`role`,`status`,`data-testid`,`memory-near-limit`,1,`mt-2`,`text-[12px]`,`text-danger`],[3,`openChange`,`open`,`containerId`,`name`,`project`],[3,`openChange`,`open`,`containerId`,`name`],[3,`openChange`,`open`,`containerId`,`name`,`compose`],[3,`openChange`,`open`,`containerId`,`containerName`,`image`,`running`,`mounts`]],template:function(e,n){if(e&1){let r=_E();gg(0),Li$1(1,`header`,0)(2,`a`,1),pk(3),Nc(),kE(4,sr,14,9)(5,pr,3,1,`div`,2),Nc(),kE(6,Vr,45,29,`div`,3),Li$1(7,`app-diagnosis-dialog`,4),fg(`openChange`,function(C){return $d(r),vk(n.diagnosisOpen,C)||(n.diagnosisOpen=C),xd(C)}),Nc(),Li$1(8,`app-run-command-dialog`,5),fg(`openChange`,function(C){return $d(r),vk(n.runCommandOpen,C)||(n.runCommandOpen=C),xd(C)})(`formatChange`,function(C){return $d(r),vk(n.runCommandFormat,C)||(n.runCommandFormat=C),xd(C)}),Nc(),Li$1(9,`app-restart-policy-dialog`,4),fg(`openChange`,function(C){return $d(r),vk(n.restartPolicyOpen,C)||(n.restartPolicyOpen=C),xd(C)}),Nc(),Li$1(10,`app-memory-limit-dialog`,6),fg(`openChange`,function(C){return $d(r),vk(n.memoryLimitOpen,C)||(n.memoryLimitOpen=C),xd(C)}),Zm(`saved`,function(){return n.onMemoryLimitSaved()}),Nc(),kE(11,Nr,4,17),Li$1(12,`app-cpu-limit-dialog`,6),fg(`openChange`,function(C){return $d(r),vk(n.cpuLimitOpen,C)||(n.cpuLimitOpen=C),xd(C)}),Zm(`saved`,function(){return n.onMemoryLimitSaved()}),Nc(),Li$1(13,`app-confirm-dialog`,7),fg(`openChange`,function(C){return $d(r),vk(n.killOpen,C)||(n.killOpen=C),xd(C)}),Zm(`confirmed`,function(){return n.killNow()}),Nc(),Li$1(14,`app-confirm-dialog`,8),fg(`openChange`,function(C){return $d(r),vk(n.confirmOpen,C)||(n.confirmOpen=C),xd(C)}),Zm(`confirmed`,function(){return n.confirmRemove()}),Nc()}if(e&2){let r,c=yk(n.container());ec(3),$c(` `,n.t().back,` `),ec(),SE(c?4:n.loaded()?5:-1),ec(2),SE(c?6:-1),ec(),pg(`open`,n.diagnosisOpen),zm(`containerId`,n.id()),ec(),pg(`open`,n.runCommandOpen)(`format`,n.runCommandFormat),zm(`containerId`,n.id())(`composeProject`,n.container()?.composeProject??null),ec(),pg(`open`,n.restartPolicyOpen),zm(`containerId`,n.id()),ec(),pg(`open`,n.memoryLimitOpen),zm(`containerId`,n.id())(`compose`,!!n.container()?.composeProject),ec(),SE((r=n.container())?11:-1,r),ec(),pg(`open`,n.cpuLimitOpen),zm(`containerId`,n.id())(`compose`,!!n.container()?.composeProject),ec(),pg(`open`,n.killOpen),zm(`title`,n.k().title)(`description`,n.k().description(n.container()?.name??``))(`confirmLabel`,n.k().confirm),ec(),pg(`open`,n.confirmOpen),zm(`title`,n.t().confirmTitle)(`description`,n.t().confirmDescription)}},dependencies:[Yt$1,we,fi$1,gi$1,_e,My,Re,je,Oe,ze,Ae,Be,W$1,De,Pe,Te,Se,Ie,xe,Me,ve$2,Ve,Ne,Ee,Qt$1,V$1,c,Me$1],encapsulation:2})}})();export{vn as ContainerDetail};