docker-client-mx 1.42.0 → 1.43.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 (92) hide show
  1. package/dist/docker-desktop-mx/browser/chunk-75uKIulV.js +1 -0
  2. package/dist/docker-desktop-mx/browser/chunk-B-8njY4y.js +1 -0
  3. package/dist/docker-desktop-mx/browser/chunk-B1xjyPnV.js +1 -0
  4. package/dist/docker-desktop-mx/browser/{chunk-DsuW5Ksa2.js → chunk-BE5ctn7s.js} +1 -1
  5. package/dist/docker-desktop-mx/browser/chunk-BNz89YmT2.js +1 -0
  6. package/dist/docker-desktop-mx/browser/{chunk-CT1ZUgmS.js → chunk-BYBsnx9-2.js} +1 -1
  7. package/dist/docker-desktop-mx/browser/chunk-BpQVP_gf.js +1 -0
  8. package/dist/docker-desktop-mx/browser/{chunk-CSrKHPxR.js → chunk-BsTDUJ3m.js} +1 -1
  9. package/dist/docker-desktop-mx/browser/{chunk-Ba_z6LGV.js → chunk-Bxte2YBm.js} +1 -1
  10. package/dist/docker-desktop-mx/browser/{chunk-CWusqRG0.js → chunk-C7c_wFw-.js} +1 -1
  11. package/dist/docker-desktop-mx/browser/chunk-CUSsr_nJ.js +1 -0
  12. package/dist/docker-desktop-mx/browser/{chunk-wa_VZZFY.js → chunk-CaR7Z77S2.js} +1 -1
  13. package/dist/docker-desktop-mx/browser/chunk-Cau4mGeC.js +1 -0
  14. package/dist/docker-desktop-mx/browser/{chunk-D0xC_xVf.js → chunk-CjAbzLl3.js} +1 -1
  15. package/dist/docker-desktop-mx/browser/{chunk-C22Z7vgK.js → chunk-CjySsWe4.js} +1 -1
  16. package/dist/docker-desktop-mx/browser/chunk-CpIMiI_l.js +4 -0
  17. package/dist/docker-desktop-mx/browser/chunk-CpNGhf9S.js +1 -0
  18. package/dist/docker-desktop-mx/browser/{chunk-V7ftX_10.js → chunk-CphQt55R.js} +1 -1
  19. package/dist/docker-desktop-mx/browser/{chunk-DvoPI4MU.js → chunk-Cpz4zP5G.js} +1 -1
  20. package/dist/docker-desktop-mx/browser/{chunk-Zom3ankA.js → chunk-Cx-uRg2m.js} +1 -1
  21. package/dist/docker-desktop-mx/browser/{chunk-CI9I9Npi.js → chunk-D2SM5E9h.js} +2 -2
  22. package/dist/docker-desktop-mx/browser/{chunk-DZjRtM2K.js → chunk-D5njuWRz.js} +1 -1
  23. package/dist/docker-desktop-mx/browser/{chunk-DLeqF0uQ.js → chunk-D86K3m6W.js} +1 -1
  24. package/dist/docker-desktop-mx/browser/chunk-DCYTwazU.js +1 -0
  25. package/dist/docker-desktop-mx/browser/chunk-DGnxa3ti2.js +1 -0
  26. package/dist/docker-desktop-mx/browser/{chunk-3VyqMz_T.js → chunk-DLpC_2HL.js} +2 -2
  27. package/dist/docker-desktop-mx/browser/{chunk-Zcfhi-RM.js → chunk-DNfiG-TG.js} +1 -1
  28. package/dist/docker-desktop-mx/browser/chunk-DS3iAefP.js +1 -0
  29. package/dist/docker-desktop-mx/browser/chunk-DdTfHpyK.js +1 -0
  30. package/dist/docker-desktop-mx/browser/{chunk-Cbit44lz.js → chunk-DnY7-enP.js} +1 -1
  31. package/dist/docker-desktop-mx/browser/{chunk-CRNeTD5E.js → chunk-Q3Ig-PJ6.js} +1 -1
  32. package/dist/docker-desktop-mx/browser/{chunk-KUYJNmP22.js → chunk-VC5gaeEq.js} +1 -1
  33. package/dist/docker-desktop-mx/browser/chunk-gHmeiJFn.js +1 -0
  34. package/dist/docker-desktop-mx/browser/{chunk-Ckq_aT3A.js → chunk-hJqozYgS.js} +1 -1
  35. package/dist/docker-desktop-mx/browser/{chunk-D-7d5O7f.js → chunk-hXmaVpBu2.js} +1 -1
  36. package/dist/docker-desktop-mx/browser/chunk-iWbUoQd52.js +6 -0
  37. package/dist/docker-desktop-mx/browser/chunk-k-zsJmvX.js +1 -0
  38. package/dist/docker-desktop-mx/browser/{chunk-CMrtklQ1.js → chunk-qxDOm16k.js} +2 -2
  39. package/dist/docker-desktop-mx/browser/chunk-sxrgZH0E.js +3 -0
  40. package/dist/docker-desktop-mx/browser/{chunk-ep62jwHG.js → chunk-vPeKxmUB.js} +1 -1
  41. package/dist/docker-desktop-mx/browser/{chunk-Bx2_SrZM.js → chunk-xmDwFpQl.js} +1 -1
  42. package/dist/docker-desktop-mx/browser/chunk-yYm_2q6C.js +1 -0
  43. package/dist/docker-desktop-mx/browser/index.html +2 -2
  44. package/dist/docker-desktop-mx/browser/main-UUO74KHR.js +1 -0
  45. package/dist/docker-desktop-mx/browser/styles-IM2TO7ZD.css +1 -0
  46. package/dist-electron/channels.js +9 -0
  47. package/dist-electron/channels.js.map +1 -1
  48. package/dist-electron/compose-known.js +135 -0
  49. package/dist-electron/compose-known.js.map +1 -0
  50. package/dist-electron/compose.js +4 -1
  51. package/dist-electron/compose.js.map +1 -1
  52. package/dist-electron/container-duplicate.js +196 -0
  53. package/dist-electron/container-duplicate.js.map +1 -0
  54. package/dist-electron/containers.js +15 -0
  55. package/dist-electron/containers.js.map +1 -1
  56. package/dist-electron/docker-client.js +1 -0
  57. package/dist-electron/docker-client.js.map +1 -1
  58. package/dist-electron/image-build.js +173 -0
  59. package/dist-electron/image-build.js.map +1 -0
  60. package/dist-electron/image-search.js +58 -0
  61. package/dist-electron/image-search.js.map +1 -0
  62. package/dist-electron/ipc.js +40 -2
  63. package/dist-electron/ipc.js.map +1 -1
  64. package/dist-electron/known-projects.js +129 -0
  65. package/dist-electron/known-projects.js.map +1 -0
  66. package/dist-electron/main.js +15 -0
  67. package/dist-electron/main.js.map +1 -1
  68. package/dist-electron/preload.js +18 -0
  69. package/dist-electron/preload.js.map +1 -1
  70. package/dist-electron/processes.js +77 -0
  71. package/dist-electron/processes.js.map +1 -0
  72. package/package.json +1 -1
  73. package/dist/docker-desktop-mx/browser/chunk-BW20bBdg.js +0 -1
  74. package/dist/docker-desktop-mx/browser/chunk-BdOOWVGY.js +0 -4
  75. package/dist/docker-desktop-mx/browser/chunk-BgNCBUvw2.js +0 -1
  76. package/dist/docker-desktop-mx/browser/chunk-BoN9ZlqT.js +0 -1
  77. package/dist/docker-desktop-mx/browser/chunk-BsAqguck2.js +0 -3
  78. package/dist/docker-desktop-mx/browser/chunk-C-yEXU2P.js +0 -6
  79. package/dist/docker-desktop-mx/browser/chunk-C1Wg9uje.js +0 -1
  80. package/dist/docker-desktop-mx/browser/chunk-C6u6rXYb2.js +0 -1
  81. package/dist/docker-desktop-mx/browser/chunk-CC84vXik.js +0 -1
  82. package/dist/docker-desktop-mx/browser/chunk-Cc4_zCxe2.js +0 -1
  83. package/dist/docker-desktop-mx/browser/chunk-CrBxmi_g.js +0 -1
  84. package/dist/docker-desktop-mx/browser/chunk-D29s9m84.js +0 -1
  85. package/dist/docker-desktop-mx/browser/chunk-DKpHNjiv.js +0 -1
  86. package/dist/docker-desktop-mx/browser/chunk-DzG5R5Kk.js +0 -1
  87. package/dist/docker-desktop-mx/browser/chunk-QaMufr3I.js +0 -1
  88. package/dist/docker-desktop-mx/browser/chunk-cYufOe8J.js +0 -1
  89. package/dist/docker-desktop-mx/browser/chunk-eG8Su12W.js +0 -1
  90. package/dist/docker-desktop-mx/browser/chunk-iwVkNYYA.js +0 -1
  91. package/dist/docker-desktop-mx/browser/main-DECBD64Q.js +0 -1
  92. package/dist/docker-desktop-mx/browser/styles-5TXFXUUF.css +0 -1
@@ -0,0 +1 @@
1
+ import{B as Kr,E as Gi,En as k,F as Ik,Fn as mj,It as Ws,J as Ng,Kn as pj,Mn as lf,N as Ib,Nt as W,Q as OD,R as Jm,St as Tg,Tn as jc,U as M,Zn as rf,_r as wt,br as y$,c as Ar,cn as f,cr as ve$1,er as sg,f as C,ft as RI,g as Cr,kn as ke,ot as Pk,rt as Ot,st as Pr,tn as br,tr as sw,u as Br,vt as T,wn as jI,y as Dj,z as Km}from"./chunk-CpIMiI_l.js";import{n as $n$1,o as Ne}from"./chunk-DS3iAefP.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-gHmeiJFn.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-xmDwFpQl.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;rf(i=>{let s=e();if(!s||!t())return;let r=s.ownerDocument,u=d=>{!d.relatedTarget||!te(d,s)||(d.type===`focusin`?n&&(pe(s),n=!1):(Nt(s),n=!0))};te(new FocusEvent(`focusin`,{relatedTarget:r.activeElement}),s)&&(Nt(s),n=!0),s.addEventListener(`focusin`,u,!0),s.addEventListener(`focusout`,u,!0),i(()=>{s.removeEventListener(`focusin`,u,!0),s.removeEventListener(`focusout`,u,!0),n&&(pe(s),n=!1)})})}function _t(e){return{provide:De,useFactory:e}}function Hn(e){let o=Pt.get(e);return o||(o=wt([]),Pt.set(e,o)),o}function jn(e){let o=Hn(e);return{add(t){let n=o(),i=n[0];t!==i&&i?.pause();let s=kt(n,t);s.unshift(t),o.set(s)},remove(t){let i=kt(o(),t);o.set(i),o()[0]?.resume()}}}function kt(e,o){let t=[...e],n=t.indexOf(o);return n!==-1&&t.splice(n,1),t}var bn;var L;var yn;var fe;var St;var xn;var Le;var Be;var At;var Sn;var ve;var le;var Bn;var De;var Pt;var Do;var Gn;var Vn;var V;var be=f(()=>{Kr();Kr();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=Ot(()=>this.trapped()??this.config.trapped()),this.mountAutoFocus=pj(),this.unmountAutoFocus=pj(),this.lastFocusedElement=wt(null),this.focusScopesStack=jn(this.ownerDocument),this.focusScope={paused:wt(!1),pause:()=>this.focusScope.paused.set(!0),resume:()=>this.focusScope.paused.set(!1)},this.alive=!0,this.destroyRef.onDestroy(()=>{this.alive=!1}),OD(()=>{rf(t=>{let n=this.elementRef.nativeElement;if(this.isTrapped()){let i=d=>{if(this.focusScope.paused()||!n)return;let v=Pn(d);F(n,v)?this.lastFocusedElement.set(v):x(this.lastFocusedElement(),{select:!0})},s=d=>{if(this.focusScope.paused()||!n)return;let v=d.relatedTarget;v!==null&&(F(n,v)||x(this.lastFocusedElement(),{select:!0}))},r=()=>{F(n,this.lastFocusedElement())||x(n)},u=new MutationObserver(r);n&&u.observe(n,{childList:!0,subtree:!0}),this.ownerDocument.addEventListener(`focusin`,i),this.ownerDocument.addEventListener(`focusout`,s),t(()=>{this.ownerDocument.removeEventListener(`focusin`,i),this.ownerDocument.removeEventListener(`focusout`,s),u.disconnect()})}},{injector:this.injector}),rf(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=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&&Jm(`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=f(()=>{Ne();Kr();Kr();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=pj(),this.config=C($t,{optional:!0}),this.effectiveEnabled=Ot(()=>this.enabled()??this.config?.enabled?.()??!0),this.effectiveModal=Ot(()=>this.modal()??this.config?.modal?.()??!1),this.effectiveInert=Ot(()=>this.inert()??this.config?.inert?.()??this.effectiveModal()),this.effectiveCloseOnFocusOut=Ot(()=>this.closeOnFocusOut()??this.config?.closeOnFocusOut?.()??!0),this.effectiveInitialFocus=Ot(()=>this.initialFocus()!==void 0?this.initialFocus():this.config?.initialFocus?.()??null),this.effectiveReturnFocus=Ot(()=>this.returnFocus()!==void 0?this.returnFocus():this.config?.returnFocus?.()??!0),this.effectiveRestoreFocus=Ot(()=>this.restoreFocus()??this.config?.restoreFocus?.()??!1),this.effectivePreviousFocusableElement=Ot(()=>this.previousFocusableElement()!==void 0?this.previousFocusableElement():this.config?.previousFocusableElement?.()),this.effectiveNextFocusableElement=Ot(()=>this.nextFocusableElement()!==void 0?this.nextFocusableElement():this.config?.nextFocusableElement?.()),this.effectiveBeforeContentFocusGuardRef=Ot(()=>this.beforeContentFocusGuardRef()??this.config?.beforeContentFocusGuardRef?.()),this.effectiveExternalTree=Ot(()=>this.externalTree()??this.config?.externalTree?.()??null),this.insideElements=Ot(()=>((this.getInsideElements()??this.config?.getInsideElements)?.()??[]).filter(n=>n!=null)),this.effectiveOpenInteractionType=Ot(()=>this.config?.openInteractionType?.()??this._interactionType()),this.effectiveCloseInteractionType=Ot(()=>this.config?.closeInteractionType?.()??this._interactionType()),this.trapped=Ot(()=>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(),rf(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),rf(()=>{if(!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(){rf(()=>{!this.effectiveEnabled()||!this.isFloatingOpen()||this.scheduleInitialFocusFallback()})}scheduleInitialFocusFallback(t=0){(this.host.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>this.applyInitialFocusFallback(t))}applyInitialFocusFallback(t){if(!this.effectiveEnabled()||!this.isFloatingOpen())return;let n=this.rootContext?.floatingElement??this.host,i=this.host.ownerDocument.activeElement;if(i instanceof HTMLElement&&n.contains(i))return;let s=this.effectiveOpenInteractionType(),r=Wt(this.effectiveInitialFocus(),s);if(r===!1)return;let u=r??this.defaultInitialFocus(s);u&&i!==u&&u.focus({preventScroll:!0}),t<2&&this.scheduleInitialFocusFallback(t+1)}wireCloseOnFocusOut(){let t=this.host.ownerDocument,n=!1,i=()=>{n=!0},s=()=>{n=!1},r=u=>{if(!this.effectiveEnabled()||!this.effectiveCloseOnFocusOut()||this.effectiveModal()||n)return;let d=u.relatedTarget;d&&(d instanceof Element&&d.hasAttribute(ve)||this.isRelatedTargetInside(d)||this.focusOut.emit(u))};t.addEventListener(`pointerdown`,i,!0),t.addEventListener(`pointerup`,s,!0),t.addEventListener(`focusout`,r,!0),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(){rf(t=>{if(!this.effectiveEnabled()||!this.isFloatingOpen()){this.setBeforeContentFocusGuardRef(null);return}let n=this.host.ownerDocument,i=this.host.parentNode;if(!i)return;let s=Ve(n),r=Ve(n);s.setAttribute(`data-type`,`inside`),r.setAttribute(`data-type`,`inside`),i.insertBefore(s,this.host),i.insertBefore(r,this.host.nextSibling),this.setBeforeContentFocusGuardRef(s);let u=v=>{if(this.effectiveModal()){x(this.getTabbableContent().at(-1)??this.host);return}if(this.isFromOutsideFocusGuard(v)){pe(this.rootContext?.floatingElement??this.host),x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(je(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectivePreviousFocusableElement())??this.defaultPreviousFocusable())},d=v=>{if(this.effectiveModal()){x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(Ge(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectiveNextFocusableElement())??this.defaultNextFocusable())};s.addEventListener(`focus`,u),r.addEventListener(`focus`,d),t(()=>{s.removeEventListener(`focus`,u),r.removeEventListener(`focus`,d),s.remove(),r.remove(),this.setBeforeContentFocusGuardRef(null)})})}avoidElements(){return[this.host,...this.insideElements()].filter(t=>t!=null)}isFloatingOpen(){return this.rootContext?.open()??!0}isRelatedTargetInside(t){if(F(this.rootContext?.floatingElement??this.host,t)||this.rootContext&&this.contextContains(this.rootContext,t)||this.insideElements().some(s=>s===t||F(s,t)))return!0;let i=this.currentFloatingNode();if(i){for(let s of i.tree.ancestors(i))if(s.context&&this.contextContains(s.context,t))return!0;for(let s of i.tree.children(i,{onlyOpen:!0}))if(s.context&&this.contextContains(s.context,t))return!0}return!1}contextContains(t,n){return t.floatingElement&&F(t.floatingElement,n)||t.referenceElement&&F(t.referenceElement,n)?!0:t.triggers.contains(n)}currentFloatingNode(){return(this.registration?.node()??null)||(this.effectiveExternalTree()?.all.find(i=>i.context===this.rootContext)??null)}getTabbableContent(){return me(this.rootContext?.floatingElement??this.host)}portalFocusContainer(){let t=this.rootContext?.floatingElement??this.host,n=t.parentElement;return n&&n!==t.ownerDocument.body?n:t}defaultPreviousFocusable(){return Ge(this.rootContext?.referenceElement??this.host)}defaultNextFocusable(){return je(this.rootContext?.referenceElement??this.host)}setBeforeContentFocusGuardRef(t){let n=this.effectiveBeforeContentFocusGuardRef();n&&(typeof n==`function`?n(t):n.set(t))}isFromOutsideFocusGuard(t){let n=t.relatedTarget;return n instanceof Element&&n.hasAttribute(ve)&&n.getAttribute(`data-type`)===`outside`}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=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=f(()=>{Ws();lf();Cr();Ng();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=f(()=>{Ne();Kr();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=f(()=>{Ne();Kr();Kr();g();en=(()=>{class e{constructor(){this.viewContainerRef=C(Gi),this.templateRef=C(Ar),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=Ot(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=Pk(this.container),this.elementContainer=Ot(()=>no(this._computedContainer(),this.document)??this.document?.body??null),this.mountedNodes=wt([]),this.viewRef=null;let t=new f$1({present:this.present,isBrowser:this.isBrowser,injector:C(ke),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});rf(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),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=f(()=>{Kr();Kr();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=pj(),this.onOpenChangeComplete=pj(),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=Ot(()=>this.open()||this.preventUnmountOnClose()),this.nested=!!this.parentRoot,this.nestedDialogOpen=Ot(()=>this.nestedOpenCount()>0),this.role=this.variant.role,this.effectiveModal=Ot(()=>this.variant.forceModal?!0:this.modal()),this.effectiveDisablePointerDismissal=Ot(()=>this.disablePointerDismissal()||this.variant.forcePointerDismissalDisabled),this.floatingContext=tr({ownerDocument:C(Pr).nativeElement.ownerDocument,open:()=>this.open()}),rf(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),rf(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();rf(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),rf(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),rf(()=>{let n=this.triggerId();Tg(()=>this.syncTriggerId(n))}),rf(()=>{let n=this.open();n!==t&&(t=n,Tg(()=>this.transition.start(n)))}),rf(n=>{this.open()&&this.parentRoot&&n(Tg(()=>this.parentRoot.openNestedChild()))}),rf(n=>{let i=this.handle();i&&n(Tg(()=>i.registerRoot(rn(this))))})}show(t=this.trigger(),n,i,s=`none`,r){let u=t!==void 0||n!==void 0;if(this.open()){t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n);return}let d=r??new Event(`dialog.open-change`),v=this.createOpenChangeEvent(!0,s,d,t,i??this.triggerId());this.onOpenChange.emit(v.payload),!v.eventDetails.isCanceled()&&(this.openInteractionType.set(this.consumeOpenInteractionType(r)),t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n),this.preventUnmountOnClose.set(!1),this.open.set(!0),this.floatingContext.events.emit(`openchange`,{open:!0,reason:s,event:v.eventDetails.event}))}close(t=`none`,n){if(!this.open())return;let i=n??new Event(`dialog.open-change`),s=this.createOpenChangeEvent(!1,t,i,this.trigger(),this.triggerId());this.onOpenChange.emit(s.payload),!s.eventDetails.isCanceled()&&(this.pendingTriggerOpenInteractionType.set(null),this.closeInteractionType.set(Ke(n)),this.preventUnmountOnClose.set(s.shouldPreventUnmountOnClose()),this.open.set(!1),this.floatingContext.events.emit(`openchange`,{open:!1,reason:t,event:s.eventDetails.event}))}toggle(t,n,i,s=new Event(`dialog.open-change`)){if(this.open()&&this.trigger()===n){this.close(`trigger-press`,s);return}this.show(n,i,t,`trigger-press`,s)}setTriggerOpenInteractionType(t){this.pendingTriggerOpenInteractionType.set(t)}registerTrigger(t,n,i){return this.registeredTriggers.set(t,{element:n,payload:i}),this.triggers.update(s=>s.includes(n)?s:[...s,n]),this.floatingContext.triggers.add(n),(this.triggerId()===t||!this.trigger()&&this.triggerId()===null)&&(this.trigger.set(n),this.payload.set(i())),()=>{if(this.registeredTriggers.get(t)?.element===n&&this.registeredTriggers.delete(t),this.triggers.update(s=>s.filter(r=>r!==n)),this.floatingContext.triggers.delete(n),!this.destroyRef.destroyed&&this.trigger()===n){let s=this.registeredTriggers.entries().next().value;this.triggerId()!==null&&this.triggerId.set(s?.[0]??null),this.trigger.set(s?.[1].element),this.payload.set(s?.[1].payload())}}}openNestedChild(){return this.nestedOpenCount.update(t=>t+1),()=>this.nestedOpenCount.update(t=>t-1)}syncTriggerId(t){if(t===null){this.trigger.set(void 0),this.payload.set(void 0);return}let n=this.registeredTriggers.get(t);n&&n.element!==this.trigger()&&(this.trigger.set(n.element),this.payload.set(n.payload()))}createOpenChangeEvent(t,n,i,s,r){let u=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&&(Km(`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&&Jm(`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&&Km(`id`,i.id)},exportAs:[`rdxDialogDescription`]})}}return e})(),lo=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),fo=`data-rdx-dialog-internal-backdrop`,cn=(()=>{class e{constructor(){this.rootContext=B(),this.host=C(Pr).nativeElement,this.floatingContext=C(et),this.registration=C(Je$1,{optional:!0}),this.focusManager=C(Te),this.focusScope=C(V),this.escapeKeyDown=pj(),this.pointerDownOutside=pj(),this.focusOutside=pj(),this.interactOutside=pj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),sr(Ot(()=>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);OD(()=>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&&Jm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Km(`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),sg(`--%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&&Km(`id`,i.id)},exportAs:[`rdxDialogTitle`]})}}return e})(),pn=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=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),sg(`pointer-events`,i.rootContext.isOpen()?null:`none`))},exportAs:[`rdxDialogViewport`]})}}return e})()});var Oi;var Ri;var Mi;var Ii;var Ai;var Ni;var Pi;var ki;var ho=f(()=>{Kr();Kr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=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{$n as sk,B as Kr,Bn as ok,Rt as X,cn as f,cr as ve,f as C,gr as wt,jn as lk,on as eH,rt as Ot}from"./chunk-BdOOWVGY.js";import{n as u,t as f$1}from"./chunk-V7ftX_10.js";import{i as h$1,r as d}from"./chunk-CRNeTD5E.js";function M(n){let e=ok().images.check,t=p=>n.filter(f=>f.state===p).length,s=t(`update`),o=[s===0?e.allCurrent:e.updates(s)];return t(`unknown`)>0&&o.push(e.notInRegistry(t(`unknown`))),t(`error`)>0&&o.push(e.uncheckable(t(`error`))),e.summary(o.join(`, `),n.length)}var h;var P=f(()=>{Kr();h$1();lk();f$1();sk();Kr();h=class n{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);updateResults=wt(null);checking=wt(!1);images=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();updates=this.updateResults.asReadonly();checkingUpdates=this.checking.asReadonly();totalBytes=Ot(()=>[...new Map(this.items().map(e=>[e.id,e.sizeBytes]))].reduce((e,[,t])=>e+t,0));unusedCount=Ot(()=>this.items().filter(e=>e.inUseBy===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`image`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.images.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async remove(e,t){this.running.update(s=>new Set(s).add(e));try{let s=await window.electron.images.remove(e,t);s.ok||this.toast.error(s.problem)}finally{this.running.update(s=>{let o=new Set(s);return o.delete(e),o})}await this.refresh()}async removeMany(e,t){await Promise.all(e.map(s=>this.remove(s,t)))}async prune(e){this.busy.set(!0);try{let t=await window.electron.images.prune(e);t.ok?this.toast.success(t.removed===0?ok().common.nothingToPrune:ok().images.pruned(t.removed,d(t.reclaimedBytes))):this.toast.error(t.problem)}finally{this.busy.set(!1)}await this.refresh()}async checkUpdates(){this.checking.set(!0);try{let e=await window.electron.images.checkUpdates();this.updateResults.set(new Map(e.map(t=>[t.reference,t]))),this.toast.success(M(e))}catch(e){this.toast.error(eH(e))}finally{this.checking.set(!1)}}async recheckIfChecked(){this.updateResults()!==null&&await this.checkUpdates()}static ɵfac=function(t){return new(t||n)};static ɵprov=X({token:n,factory:n.ɵfac,providedIn:`root`})}});export{h as n,P as t};
1
+ import{$n as sS,B as Kr,Bn as oS,Rt as X,_r as wt,cn as f,cr as ve,f as C,jn as lS,on as eH,rt as Ot}from"./chunk-CpIMiI_l.js";import{n as u,t as f$1}from"./chunk-CphQt55R.js";import{i as h$1,r as d}from"./chunk-Q3Ig-PJ6.js";function M(n){let e=oS().images.check,t=p=>n.filter(f=>f.state===p).length,s=t(`update`),o=[s===0?e.allCurrent:e.updates(s)];return t(`unknown`)>0&&o.push(e.notInRegistry(t(`unknown`))),t(`error`)>0&&o.push(e.uncheckable(t(`error`))),e.summary(o.join(`, `),n.length)}var h;var P=f(()=>{Kr();h$1();lS();f$1();sS();Kr();h=class n{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);updateResults=wt(null);checking=wt(!1);images=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();updates=this.updateResults.asReadonly();checkingUpdates=this.checking.asReadonly();totalBytes=Ot(()=>[...new Map(this.items().map(e=>[e.id,e.sizeBytes]))].reduce((e,[,t])=>e+t,0));unusedCount=Ot(()=>this.items().filter(e=>e.inUseBy===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`image`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.images.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async remove(e,t){this.running.update(s=>new Set(s).add(e));try{let s=await window.electron.images.remove(e,t);s.ok||this.toast.error(s.problem)}finally{this.running.update(s=>{let o=new Set(s);return o.delete(e),o})}await this.refresh()}async removeMany(e,t){await Promise.all(e.map(s=>this.remove(s,t)))}async prune(e){this.busy.set(!0);try{let t=await window.electron.images.prune(e);t.ok?this.toast.success(t.removed===0?oS().common.nothingToPrune:oS().images.pruned(t.removed,d(t.reclaimedBytes))):this.toast.error(t.problem)}finally{this.busy.set(!1)}await this.refresh()}async checkUpdates(){this.checking.set(!0);try{let e=await window.electron.images.checkUpdates();this.updateResults.set(new Map(e.map(t=>[t.reference,t]))),this.toast.success(M(e))}catch(e){this.toast.error(eH(e))}finally{this.checking.set(!1)}}async recheckIfChecked(){this.updateResults()!==null&&await this.checkUpdates()}static ɵfac=function(t){return new(t||n)};static ɵprov=X({token:n,factory:n.ɵfac,providedIn:`root`})}});export{h as n,P as t};
@@ -1 +1 @@
1
- import{$n as sk,Bn as ok,cn as f$1}from"./chunk-BdOOWVGY.js";function d(o){if(!Number.isFinite(o)||o<=0)return`0 B`;let t=o,n=0;for(;t>=1024&&n<c.length-1;)t/=1024,n+=1;let r=t<10&&n>0?1:0;return`${t.toFixed(r)} ${c[n]}`}function N(o){let t=ok().format,n=Math.max(0,Math.floor(Date.now()/1e3)-o);if(n<i)return t.justNow;if(n<a){let s=Math.floor(n/i);return t.hoursAgo(s)}if(n<f){let s=Math.floor(n/a);return s===1?t.yesterday:t.daysAgo(s)}if(n<m){let s=Math.floor(n/f);return s===1?t.lastMonth:t.monthsAgo(s)}let r=Math.floor(n/m);return r===1?t.lastYear:t.yearsAgo(r)}function x(o){let t=Math.max(0,Math.round(o/1e3));if(t<e)return`${String(t)}s`;let n=Math.floor(t/e),r=t%e;return r===0?`${String(n)}m`:`${String(n)}m${String(r)}s`}function A(o){if(o===null)return``;let t=new Date(o);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString()}var c;var e;var i;var a;var f;var m;var h=f$1(()=>{sk();c=[`B`,`KB`,`MB`,`GB`,`TB`];e=60,i=60*e,a=24*i,f=30*a,m=365*a});export{x as a,h as i,N as n,d as r,A as t};
1
+ import{$n as sS,Bn as oS,cn as f$1}from"./chunk-CpIMiI_l.js";function d(o){if(!Number.isFinite(o)||o<=0)return`0 B`;let t=o,n=0;for(;t>=1024&&n<c.length-1;)t/=1024,n+=1;let r=t<10&&n>0?1:0;return`${t.toFixed(r)} ${c[n]}`}function N(o){let t=oS().format,n=Math.max(0,Math.floor(Date.now()/1e3)-o);if(n<i)return t.justNow;if(n<a){let s=Math.floor(n/i);return t.hoursAgo(s)}if(n<f){let s=Math.floor(n/a);return s===1?t.yesterday:t.daysAgo(s)}if(n<m){let s=Math.floor(n/f);return s===1?t.lastMonth:t.monthsAgo(s)}let r=Math.floor(n/m);return r===1?t.lastYear:t.yearsAgo(r)}function x(o){let t=Math.max(0,Math.round(o/1e3));if(t<e)return`${String(t)}s`;let n=Math.floor(t/e),r=t%e;return r===0?`${String(n)}m`:`${String(n)}m${String(r)}s`}function A(o){if(o===null)return``;let t=new Date(o);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString()}var c;var e;var i;var a;var f;var m;var h=f$1(()=>{sS();c=[`B`,`KB`,`MB`,`GB`,`TB`];e=60,i=60*e,a=24*i,f=30*a,m=365*a});export{x as a,h as i,N as n,d as r,A as t};
@@ -1 +1 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,Dn as kc,Ft as Wr,H as Ld,Kn as qr,Pn as mj,St as Tc,Tn as jc,Wn as pg,_t as Sc,cn as f,et as Od,ln as fS,mr as wc,o as Ac,qt as ag,rt as Ot,sn as ec,t as $E,u as Br,z as Km,zt as Xm}from"./chunk-BdOOWVGY.js";function B(n){let t=S.exec(n);if(t!==null){let o=m[t[1].toLowerCase()];if(o!==void 0)return o}let e=k.exec(n);if(e!==null)return m[e[1].toLowerCase()]??null;let r=O.exec(n);return r===null?null:m[r[1].toLowerCase()]??null}function H(n,t){return t.size===0||(n===`error`||n===`warn`)&&t.has(n)}function U(n){let t=0,e=0;for(let r of n)t+=r===`error`?1:0,e+=r===`warn`?1:0;return{error:t,warn:e}}function j(n,t){let e=n.trim();if(e===``)return P;let r=/^\/(.+)\/([a-z]*)$/.exec(e);if(r===null){let o=t?e:e.toLowerCase();return{test:a=>(t?a:a.toLowerCase()).includes(o),problem:null}}try{let o=r[2].includes(`i`)||t?r[2]:`${r[2]}i`,a=new RegExp(r[1],o);return{test:M=>a.test(M),problem:null}}catch(o){return{test:()=>!0,problem:ok().logs.invalidExpression(o instanceof Error?o.message:String(o))}}}var m;var O;var S;var k;var G;var P;var V=f(()=>{sk();m={err:`error`,error:`error`,fatal:`error`,panic:`error`,critical:`error`,wrn:`warn`,warn:`warn`,warning:`warn`,inf:`info`,info:`info`,notice:`info`,dbg:`debug`,debug:`debug`,trace:`debug`},O=/\b(ERR|ERROR|FATAL|PANIC|CRITICAL|WRN|WARN|WARNING|INF|INFO|NOTICE|DBG|DEBUG|TRACE)\b/,S=/\b(?:level|lvl|severity)["']?\s*[=:]\s*["']?([A-Za-z]+)/i,k=/\[(err|error|fatal|panic|critical|wrn|warn|warning|inf|info|notice|dbg|debug|trace)\]/i;G={error:`text-danger`,warn:`text-warn`,info:`text-ok`,debug:`text-ink-500`};P={test:()=>!0,problem:null}});function W(n,t){if(n&1){let e=$E();qr(0,`button`,2),Xm(`click`,function(){let o=Ld(e).$implicit;return Od(HE().toggle(o))}),fS(1),qr(2,`span`,3),fS(3),Wr()()}if(n&2){let e=t.$implicit,r=HE();ag(`border-danger`,e===`error`&&r.chosen().has(e))(`text-danger`,e===`error`&&r.chosen().has(e))(`border-warn`,e===`warn`&&r.chosen().has(e))(`text-warn`,e===`warn`&&r.chosen().has(e)),Km(`title`,r.t().unknownHidden),Br(`aria-pressed`,r.chosen().has(e))(`data-testid`,`level-`+e),ec(),Ac(` `,e===`error`?r.t().errors:r.t().warnings,` `),ec(2),pg(e===`error`?r.errors():r.warnings())}}var T;var $=f(()=>{Kr();sk();Kr();T=class n{chosen=mj.required();errors=jc(0);warnings=jc(0);levels=[`error`,`warn`];t=Ot(()=>ok().logs.levels);toggle(t){let e=new Set(this.chosen());e.delete(t)||e.add(t),this.chosen.set(e)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-level-filter`]],inputs:{chosen:[1,`chosen`],errors:[1,`errors`],warnings:[1,`warnings`]},outputs:{chosen:`chosenChange`},decls:3,vars:1,consts:[[`role`,`group`,1,`flex`,`items-center`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-danger`,`text-danger`,`border-warn`,`text-warn`,`title`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`title`],[1,`text-[11px]`,`tabular-nums`,`opacity-70`]],template:function(e,r){e&1&&(qr(0,`div`,0),kc(1,W,4,13,`button`,1,Sc),Wr()),e&2&&(Br(`aria-label`,r.t().label),ec(),Tc(r.levels))},encapsulation:2})}});export{T as a,j as c,H as i,B as n,U as o,G as r,V as s,$ as t};
1
+ import{$n as sS,A as HE,B as Kr,Bn as oS,Fn as mj,Ft as Wr,Gn as pg,H as Ld,On as kc,Tn as jc,cn as f,et as Od,fn as fk,hr as wc,ht as Sc,o as Ac,qn as qr,qt as ag,rt as Ot,sn as ec,t as $E,u as Br,xt as Tc,z as Km,zt as Xm}from"./chunk-CpIMiI_l.js";function B(n){let t=S.exec(n);if(t!==null){let o=m[t[1].toLowerCase()];if(o!==void 0)return o}let e=k.exec(n);if(e!==null)return m[e[1].toLowerCase()]??null;let r=O.exec(n);return r===null?null:m[r[1].toLowerCase()]??null}function H(n,t){return t.size===0||(n===`error`||n===`warn`)&&t.has(n)}function U(n){let t=0,e=0;for(let r of n)t+=r===`error`?1:0,e+=r===`warn`?1:0;return{error:t,warn:e}}function j(n,t){let e=n.trim();if(e===``)return P;let r=/^\/(.+)\/([a-z]*)$/.exec(e);if(r===null){let o=t?e:e.toLowerCase();return{test:a=>(t?a:a.toLowerCase()).includes(o),problem:null}}try{let o=r[2].includes(`i`)||t?r[2]:`${r[2]}i`,a=new RegExp(r[1],o);return{test:M=>a.test(M),problem:null}}catch(o){return{test:()=>!0,problem:oS().logs.invalidExpression(o instanceof Error?o.message:String(o))}}}var m;var O;var S;var k;var G;var P;var V=f(()=>{sS();m={err:`error`,error:`error`,fatal:`error`,panic:`error`,critical:`error`,wrn:`warn`,warn:`warn`,warning:`warn`,inf:`info`,info:`info`,notice:`info`,dbg:`debug`,debug:`debug`,trace:`debug`},O=/\b(ERR|ERROR|FATAL|PANIC|CRITICAL|WRN|WARN|WARNING|INF|INFO|NOTICE|DBG|DEBUG|TRACE)\b/,S=/\b(?:level|lvl|severity)["']?\s*[=:]\s*["']?([A-Za-z]+)/i,k=/\[(err|error|fatal|panic|critical|wrn|warn|warning|inf|info|notice|dbg|debug|trace)\]/i;G={error:`text-danger`,warn:`text-warn`,info:`text-ok`,debug:`text-ink-500`};P={test:()=>!0,problem:null}});function W(n,t){if(n&1){let e=$E();qr(0,`button`,2),Xm(`click`,function(){let o=Ld(e).$implicit;return Od(HE().toggle(o))}),fk(1),qr(2,`span`,3),fk(3),Wr()()}if(n&2){let e=t.$implicit,r=HE();ag(`border-danger`,e===`error`&&r.chosen().has(e))(`text-danger`,e===`error`&&r.chosen().has(e))(`border-warn`,e===`warn`&&r.chosen().has(e))(`text-warn`,e===`warn`&&r.chosen().has(e)),Km(`title`,r.t().unknownHidden),Br(`aria-pressed`,r.chosen().has(e))(`data-testid`,`level-`+e),ec(),Ac(` `,e===`error`?r.t().errors:r.t().warnings,` `),ec(2),pg(e===`error`?r.errors():r.warnings())}}var T;var $=f(()=>{Kr();sS();Kr();T=class n{chosen=mj.required();errors=jc(0);warnings=jc(0);levels=[`error`,`warn`];t=Ot(()=>oS().logs.levels);toggle(t){let e=new Set(this.chosen());e.delete(t)||e.add(t),this.chosen.set(e)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-level-filter`]],inputs:{chosen:[1,`chosen`],errors:[1,`errors`],warnings:[1,`warnings`]},outputs:{chosen:`chosenChange`},decls:3,vars:1,consts:[[`role`,`group`,1,`flex`,`items-center`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-danger`,`text-danger`,`border-warn`,`text-warn`,`title`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`title`],[1,`text-[11px]`,`tabular-nums`,`opacity-70`]],template:function(e,r){e&1&&(qr(0,`div`,0),Sc(1,W,4,13,`button`,1,kc),Wr()),e&2&&(Br(`aria-label`,r.t().label),ec(),Tc(r.levels))},encapsulation:2})}});export{T as a,j as c,H as i,B as n,U as o,G as r,V as s,$ as t};
@@ -0,0 +1 @@
1
+ import{$t as bj,B as Kr,Er as zw,F as Ik,Fn as mj,Hn as on,I as Iw,In as nf,It as Ws,Kn as pj,Mn as lf,Mt as Vr,Nt as W,Q as OD,R as Jm,Rt as X,Sr as yc,St as Tg,Tn as jc,U as M,X as Nn,Zn as rf,_n as gl,_r as wt$1,cn as f,cr as ve,f as C,ft as RI,j as Ho,kn as ke$1,ot as Pk,pn as gb,rr as te,rt as Ot$1,st as Pr,tn as br,tr as sw,u as Br,x as Ej,y as Dj,yr as xm}from"./chunk-CpIMiI_l.js";import{l as T$1,n as $n$1,o as Ne}from"./chunk-DS3iAefP.js";function at(){let n=T$1()?T$1().getUserAgent():``;return/android (\d+)/.test(n.toLowerCase())}function ut(n){return n==null||ct(n)===0}function ct(n){return n==null?null:Array.isArray(n)||typeof n==`string`?n.length:n instanceof Set?n.size:null}function ht(n){return ut(n.value)?{required:!0}:null}function Ie(n){return null}function ke(n){return n!=null}function ft(n){return yc(n)?on(n):n}function Pe(n){let e={};return n.forEach(t=>{e=t!=null?W(W({},e),t):e}),Object.keys(e).length===0?null:e}function je(n,e){return e.map(t=>t(n))}function mt(n){return!n.validate}function Le(n){return n.map(e=>mt(e)?e:t=>e.validate(t))}function gt(n){if(!n)return null;let e=n.filter(ke);return e.length==0?null:function(t){return Pe(je(t,e))}}function yt(n){return n!=null?gt(Le(n)):null}function pt(n){if(!n)return null;let e=n.filter(ke);return e.length==0?null:function(t){return gb(je(t,e).map(ft)).pipe(Nn(Pe))}}function vt(n){return n!=null?pt(Le(n)):null}function _t(n){return n.tagName===`INPUT`||n.tagName===`SELECT`||n.tagName===`TEXTAREA`}function Ct(n,e,t,r){switch(t){case`name`:n.setAttribute(e,t,r);break;case`disabled`:case`readonly`:case`required`:r?n.setAttribute(e,t,``):n.removeAttribute(e,t);break;case`max`:case`min`:case`minLength`:case`maxLength`:r!==void 0?n.setAttribute(e,t,r.toString()):n.removeAttribute(e,t);break}}function Vt(n){return Object.getPrototypeOf(n.constructor)===ot}function wt(n,e){if(!e)return null;let t,r,i;return e.forEach(o=>{o.constructor===Te?t=o:Vt(o)?r=o:i=o}),i||r||t||null}var Re;var ot;var ae;var st;var lt;var Te;var dt;var ie;var oe;var q;var se;var bt;var Dt;var Be;var z;var Ge=f(()=>{Kr();Kr();Ws();lf();Ne();Re=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,r){this._renderer=t,this._elementRef=r}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty(`disabled`,t)}static ɵfac=function(r){return new(r||n)(Vr(gl),Vr(Pr))};static ɵdir=RI({type:n})}return n})(),ot=(()=>{class n extends Re{static ɵfac=(()=>{let t;return function(i){return(t||(t=zw(n)))(i||n)}})();static ɵdir=RI({type:n,features:[xm]})}return n})(),ae=new M(``),st={provide:ae,useExisting:Ho(()=>Te),multi:!0};lt=new M(``),Te=(()=>{class n extends Re{_compositionMode;_composing=!1;constructor(t,r,i){super(t,r),this._compositionMode=i,this._compositionMode??=!at()}writeValue(t){let r=t??``;this.setProperty(`value`,r)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static ɵfac=function(r){return new(r||n)(Vr(gl),Vr(Pr),Vr(lt,8))};static ɵdir=RI({type:n,selectors:[[`input`,`formControlName`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControlName`,``,3,`ngNoCva`,``],[`input`,`formControl`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`formControl`,``,3,`ngNoCva`,``],[`input`,`ngModel`,``,3,`type`,`checkbox`,3,`ngNoCva`,``],[`textarea`,`ngModel`,``,3,`ngNoCva`,``],[``,`ngDefaultControl`,``]],hostBindings:function(r,i){r&1&&Jm(`input`,function(s){return i._handleInput(s.target.value)})(`blur`,function(){return i.onTouched()})(`compositionstart`,function(){return i._compositionStart()})(`compositionend`,function(s){return i._compositionEnd(s.target.value)})},standalone:!1,features:[Ik([st]),xm]})}return n})();dt=new M(``);ie=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=yt(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=vt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},oe=class{},q=class extends oe{source;constructor(e){super(),this.source=e}};se=class{kind;context;control;message;constructor({kind:e,context:t,control:r}){this.kind=e,this.context=t,this.control=r}},bt=(()=>{class n{_validator=Ie;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):Ie,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static ɵfac=function(r){return new(r||n)};static ɵdir=RI({type:n,features:[Iw]})}return n})(),Dt={provide:dt,useExisting:Ho(()=>Be),multi:!0},Be=(()=>{class n extends bt{required;inputName=`required`;normalizeInput=Dj;createValidator=t=>ht;enabled(t){return t}static ɵfac=(()=>{let t;return function(i){return(t||(t=zw(n)))(i||n)}})();static ɵdir=RI({type:n,selectors:[[``,`required`,``,`formControlName`,``,3,`type`,`checkbox`],[``,`required`,``,`formControl`,``,3,`type`,`checkbox`],[``,`required`,``,`ngModel`,``,3,`type`,`checkbox`]],hostVars:1,hostBindings:function(r,i){r&2&&Br(`required`,i._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[Ik([Dt]),xm]})}return n})();z=class extends ie{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(t=>{t instanceof q&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=wt(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,t,r){super(),this.injector=e,this.renderer=t,this.rawValueAccessors=r,this.injector?.get(ve)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(bj);if(!this.control||!e)return;let t=e.markForCheck.bind(e);this.subscription=new te,this.subscription.add(this.control.valueChanges.subscribe(t)),this.subscription.add(this.control.statusChanges.subscribe(t)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(r=>{r instanceof q&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.(`ngNoCva`)&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(i=>{this.control?.markAsDirty(),this.control?.setValue(i,{emitModelToViewChange:!1}),this.viewToModelUpdate(i)}),e.listenToCustomControlOutput(`touch`,()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=_t(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(i=>i instanceof Be))}ngControlUpdate(e,t){if(!this.isCustomControlBased)return;let r=this.control,i=this.customControlBindings;Object.is(i.value,r.value)||(i.value=r.value,e.setCustomControlModelInput(r.value)),this.bindControlProperty(e,i,`touched`,r.touched),this.bindControlProperty(e,i,`dirty`,r.dirty),this.bindControlProperty(e,i,`valid`,r.valid),this.bindControlProperty(e,i,`invalid`,r.invalid),this.bindControlProperty(e,i,`pending`,r.pending),this.bindControlProperty(e,i,`disabled`,r.disabled),this.shouldBindRequired&&this.bindControlProperty(e,i,`required`,this.isRequired);let o=r.errors;if(i.errors!==o){i.errors=o;let s=this._convertErrors(o);e.setInputOnDirectives(`errors`,s)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,t,r,i){if(t[r]===i)return;t[r]=i;let o=e.setInputOnDirectives(r,i);this.isNativeFormElement&&!o&&(r===`disabled`||r===`required`)&&this.renderer&&Ct(this.renderer,e.nativeElement,r,i)}_convertErrors(e){if(e===null)return[];let t=this.control;return Object.entries(e).map(([r,i])=>new se({context:i,kind:r,control:t}))}setParseErrorSource(e){if(e===void 0)return;let t=null,r=Ot$1(()=>{let i=e();return i.length===0?null:i.reduce((o,s)=>(o[s.kind]=s,o),{})});this.parseErrorsValidator=(()=>t).bind(this),rf(()=>{t=r(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}}});function At(n){return{provide:ae,useExisting:Ho(()=>n),multi:!0}}function Ln(){return C(Et)}function Mt(n){return n?Object.entries(n).map(([e,t])=>{let r=typeof t==`string`?t:t&&typeof t==`object`&&typeof t.message==`string`?t.message:void 0;return r===void 0?{kind:e}:{kind:e,message:r}}):[]}function St(){let n=C(ke$1),e=C(ve),t=wt$1(!1,{debugName:`RdxNgControlState.connected`}),r=wt$1(void 0,{debugName:`RdxNgControlState.name`}),i=wt$1(void 0,{debugName:`RdxNgControlState.value`}),o=wt$1(!1,{debugName:`RdxNgControlState.valid`}),s=wt$1(!1,{debugName:`RdxNgControlState.invalid`}),a=wt$1(!1,{debugName:`RdxNgControlState.pending`}),h=wt$1(!1,{debugName:`RdxNgControlState.disabled`}),f=wt$1(null,{debugName:`RdxNgControlState.rawErrors`}),m=Ot$1(()=>Mt(f()),{debugName:`RdxNgControlState.errors`}),l=wt$1(!1,{debugName:`RdxNgControlState.dirty`}),d=wt$1(!1,{debugName:`RdxNgControlState.touched`}),u=!1,g,y;return queueMicrotask(()=>{if(u)return;let D=n.get(z,null,{self:!0,optional:!0}),p=D?.control;if(!p||typeof p.events?.subscribe!=`function`)return;y=v=>p.reset(v);let F=()=>{r.set(D.name==null?void 0:String(D.name)),i.set(p.value),o.set(p.valid),s.set(p.invalid),a.set(p.pending),h.set(p.disabled),f.set(p.errors),l.set(p.dirty),d.set(p.touched)};F();let C=p.events.subscribe(F);g=()=>C.unsubscribe(),t.set(!0)}),e.onDestroy(()=>{u=!0,g?.()}),{connected:t.asReadonly(),name:r.asReadonly(),value:i.asReadonly(),valid:o.asReadonly(),invalid:s.asReadonly(),pending:a.asReadonly(),disabled:h.asReadonly(),errors:m,dirty:l.asReadonly(),touched:d.asReadonly(),reset:D=>y?(y(D),!0):!1}}function Ye(n){return`${Nt}/${n}.md`}function Xe(n,e,t){return`[rdx:${n}] ${e}${t?` See ${Ye(t)}`:``}`}function Bn(n,e,t){!Ej()||Ue.has(n)||(Ue.add(n),console.warn(Xe(n,e,t)))}function N(n,e,t){throw new Error(Xe(n,e,t))}function Gn(n,e){let t=`${n.replace(/\s*Context$/,``)}Context`,r=new M(t);return[(s=!1)=>{let a=C(r,{optional:!0});if(a==null&&!s){let h=e?` See ${Ye(e)} for the required part hierarchy.`:``;throw new Error(`No \`${t}\` found. This part must be placed inside the directive that provides \`${t}\` (usually the primitive's root).${h}`)}return a},s=>({provide:r,useFactory:s})]}function Tt(n){return C(Rt).getId(n)}function kt(n){let e=wt$1(!1),t=Ot$1(()=>{let s=n.errors()??[],a=n.ngControlState?.connected()?n.ngControlState.errors():[];return a.length>0?[...s,...a]:s}),r=Ot$1(()=>n.invalid()||t().length>0||!!(n.ngControlState?.connected()&&n.ngControlState.invalid())),i=Ot$1(()=>(n.pending?.()??!1)||!!(n.ngControlState?.connected()&&n.ngControlState.pending()));return{invalidState:r,pendingState:i,validState:Ot$1(()=>i()?null:r()?!1:n.ngControlState?.connected()&&n.ngControlState.disabled()?null:!0),errorsState:t,touchedState:Ot$1(()=>n.ngControlState?.connected()?n.ngControlState.touched():n.touched()),dirtyState:Ot$1(()=>n.ngControlState?.connected()?n.ngControlState.dirty():n.dirty()||e()),markDirty:()=>e.set(!0),markAsTouched:()=>{n.cva?.markAsTouched(),n.touched.set(!0),n.touch.emit()},resetInteractionState:()=>{n.touched.set(!1),e.set(!1)},resetDirtyState:()=>e.set(!1)}}function Zn(n,e,t){let r=!1,i=!1,o=!1;return{eventDetails:{reason:n,event:e,trigger:t,cancel:()=>{r=!0},isCanceled:()=>r,allowPropagation:()=>{i=!0},get isPropagationAllowed(){return i},preventUnmountOnClose:()=>{o=!0}},shouldPreventUnmountOnClose:()=>o}}function Ze(){let n=new Map;return{emit(e,t){let r=n.get(e);if(r)for(let i of[...r])i(t)},on(e,t){let r=n.get(e);r||(r=new Set,n.set(e,r)),r.add(t)},off(e,t){n.get(e)?.delete(t)}}}function Lt(){return[{provide:k,useFactory:()=>new k},{provide:Je,useExisting:k}]}function Bt(n){return n.context?.open()??!1}function Jn(){return{provide:ce,useFactory:()=>C(ce,{optional:!0,skipSelf:!0})??new ue}}function Qn(n){return{provide:et,useFactory:n}}function Gt(n){return n!==null&&typeof n.nodeType==`number`}function tr(n){return new he(n)}function Wt(n){return`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${n.left}px ${n.top}px,${n.left}px ${n.bottom}px,${n.right}px ${n.bottom}px,${n.right}px ${n.top}px,${n.left}px ${n.top}px)`}function nr(n,e,t){let r=n.ownerDocument,i=t.marker??Ht,o=null,s=()=>{o?.remove(),o=null},a=rf(()=>{let h=t.isOpen(),f=t.shouldRender();if(f&&!o){o=r.createElement(`div`),o.setAttribute(`role`,`presentation`),o.setAttribute(i,``),o.style.position=`fixed`,o.style.inset=`0px`,o.style.userSelect=`none`,o.style.webkitUserSelect=`none`;let m=t.cutout?.()??null;m&&(o.style.clipPath=Wt(m.getBoundingClientRect())),n.parentElement?.insertBefore(o,n)}else f||s();o&&(o.style.pointerEvents=t.passThrough?.()?`none`:``,h?o.removeAttribute(`inert`):o.setAttribute(`inert`,``))},{injector:e});e.get(ve).onDestroy(()=>{a.destroy(),s()})}function $t(n){let{maxTouchPoints:e,webkitBackdropFilter:t}=n,r=n.userAgent.toLowerCase(),i=n.platform.toLowerCase(),o=t,s=!o&&r.includes(`firefox`),a=!o&&r.includes(`chrom`),h=/^i(os$|p)/.test(i)||i===`macintel`&&e>1||/ip(ad|hone|od)/.test(r),f=i===`android`||r.includes(`android`),m=!h&&i.startsWith(`mac`),l=i.startsWith(`win`),d=!f&&/^(linux|chrome os)/.test(i),u=m||h;return{engine:{webkit:o,gecko:s,blink:a},os:{ios:h,android:f,mac:m,windows:l,linux:d,apple:u},screenReader:{voiceOver:u},env:{jsdom:/jsdom|happydom/.test(r)}}}function qt(){let n=typeof navigator>`u`?void 0:navigator;return{userAgent:n?.userAgent??``,platform:n?.platform??``,maxTouchPoints:n?.maxTouchPoints??0,webkitBackdropFilter:typeof CSS<`u`&&CSS.supports?.(`-webkit-backdrop-filter:none`)===!0}}function rr(n=document){let e=n.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function ir(n){return me.engine.webkit&&n.movementX===0&&n.movementY===0}function or(n){let e=C(Pr).nativeElement,t=e.ownerDocument,r=C(ve);if(!t||!$n$1(C(sw)))return zt;let i=[],o,s=[],a=!1,h=!0,f=!1,m=()=>{let u=n.form(),g=u?t.getElementById(u):typeof e.closest==`function`?e.closest(`form`):e.parentElement?.closest(`form`);return g?.localName===`form`?g:null},l=()=>{n.syncNativeControl?.();let u=n.name(),g=n.form(),y=n.disabled(),P=n.hasNativeControl?.()??!1,D=n.value&&n.serialize?n.serialize(n.value()):[];if(!f)return;let F=!!(u&&n.serialize&&!P)?D.length:0;for(;i.length>F;)i.pop()?.remove();for(;i.length<F;){let C=t.createElement(`input`);C.type=`hidden`;let v=i.at(-1);e.parentNode?.insertBefore(C,v?v.nextSibling:e.nextSibling),i.push(C)}for(let C=0;C<i.length;C++){let v=i[C];v.name=u,v.value=D[C],v.disabled=y,g?v.setAttribute(`form`,g):v.removeAttribute(`form`),v.hasAttribute(`data-rdx-native-form-control`)||(v.defaultValue=s[C]??D[C],v.setAttribute(`data-rdx-native-form-control`,``))}};rf(()=>{!a&&n.defaultValue&&(o=n.defaultValue(),s=n.serialize?n.serialize(o):[],a=!0)}),rf(l),OD(()=>{f=!0,Tg(l)});let d=u=>{u.target!==m()||!n.onReset||!a||queueMicrotask(()=>{h&&!u.defaultPrevented&&Tg(()=>n.onReset(o))})};return t.addEventListener(`reset`,d,!0),r.onDestroy(()=>{h=!1,t.removeEventListener(`reset`,d,!0);for(let u of i)u.remove()}),{ownerForm:m,sync:l,requestSubmit:()=>{Tg(l),m()?.requestSubmit()}}}function ge(n){let e=n.ownerDocument.defaultView;if(!e)return!1;let{overflow:t,overflowX:r,overflowY:i,display:o}=e.getComputedStyle(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&![`inline`,`contents`].includes(o)}function Yt(n){let e=n.defaultView;return e?e.innerWidth-n.documentElement.clientWidth>0:!1}function Xt(n){if(!n.defaultView||typeof CSS>`u`||!CSS.supports||!CSS.supports(`scrollbar-gutter`,`stable`))return!1;let t=n.documentElement,r=ge(t)?t:n.body,i=r.style.overflowY,o=t.style.scrollbarGutter;t.style.scrollbarGutter=`stable`,r.style.overflowY=`scroll`;let s=r.offsetWidth;r.style.overflowY=`hidden`;let a=r.offsetWidth;return r.style.overflowY=i,t.style.scrollbarGutter=o,s===a}function Kt(n){let e=n.documentElement,t=ge(e)?e:n.body,r={overflowX:t.style.overflowX,overflowY:t.style.overflowY};return t.style.overflowX=`hidden`,t.style.overflowY=`hidden`,()=>{t.style.overflowX=r.overflowX,t.style.overflowY=r.overflowY}}function Zt(n){let e=n.documentElement,t=n.body,r=n.defaultView;if(!r)return()=>{};if(me.engine.webkit&&(r.visualViewport?.scale??1)!==1)return()=>{};let i=0,o=0,s=!1,a={},h={},f=``,m=0,l=()=>{let g=r.getComputedStyle(e),y=r.getComputedStyle(t),D=(g.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;i=e.scrollTop,o=e.scrollLeft,a={scrollbarGutter:e.style.scrollbarGutter,overflowY:e.style.overflowY,overflowX:e.style.overflowX},f=e.style.scrollBehavior,h={position:t.style.position,height:t.style.height,width:t.style.width,boxSizing:t.style.boxSizing,overflowY:t.style.overflowY,overflowX:t.style.overflowX,scrollBehavior:t.style.scrollBehavior};let p=e.scrollHeight>e.clientHeight,F=e.scrollWidth>e.clientWidth,C=g.overflowY===`scroll`||y.overflowY===`scroll`,v=g.overflowX===`scroll`||y.overflowX===`scroll`,ye=Math.max(0,r.innerWidth-t.clientWidth),pe=Math.max(0,r.innerHeight-t.clientHeight),ve=(parseFloat(y.marginTop)||0)+(parseFloat(y.marginBottom)||0),_e=(parseFloat(y.marginLeft)||0)+(parseFloat(y.marginRight)||0),Ce=ge(e)?e:t;if(s=Xt(n),s){e.style.scrollbarGutter=D,Ce.style.overflowY=`hidden`,Ce.style.overflowX=`hidden`;return}Object.assign(e.style,{scrollbarGutter:D,overflowY:`hidden`,overflowX:`hidden`}),(p||C)&&(e.style.overflowY=`scroll`),(F||v)&&(e.style.overflowX=`scroll`),Object.assign(t.style,{position:`relative`,height:ve||pe?`calc(100dvh - ${ve+pe}px)`:`100dvh`,width:_e||ye?`calc(100vw - ${_e+ye}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),t.scrollTop=i,t.scrollLeft=o,e.style.scrollBehavior=`unset`},d=()=>{Object.assign(e.style,a),Object.assign(t.style,h),s||(e.scrollTop=i,e.scrollLeft=o,e.style.scrollBehavior=f)},u=()=>{d(),m=r.requestAnimationFrame(l)};return l(),r.addEventListener(`resize`,u),()=>{m&&r.cancelAnimationFrame(m),d(),r.removeEventListener(`resize`,u)}}function Jt(n){let e=$e.get(n);return e||(e=new fe(n),$e.set(n,e)),e}function sr(n,e={}){let t=C(br),r=$n$1(C(sw)),i=null,o=null,s=()=>{i?.(),i=null,o=null};rf(()=>{if(!r)return;let a=e.referenceElement?.()?.ownerDocument??t;n()?(!i||o!==a)&&(s(),i=Jt(a).acquire(),o=a):i&&s()}),r&&C(ve).onDestroy(s)}function ar(n){let e=C(ke$1),t=C(ve),r=wt$1(void 0),i,o,s,a=0,h=()=>{s!==void 0&&(cancelAnimationFrame(s),s=void 0),o!==void 0&&(clearTimeout(o),o=void 0)},f=(l,d)=>{d===a&&(h(),r.set(void 0),t.destroyed||n(l))},m=(l,d)=>{let u=i,g=u?en(u):0;if(!u||g===0){f(l,d);return}let y=typeof u.getAnimations==`function`?u.getAnimations():[];o=setTimeout(()=>f(l,d),g+Qt),y.length!==0&&Promise.all(y.map(P=>P.finished.catch(()=>{}))).then(()=>f(l,d))};return t.onDestroy(h),{status:r.asReadonly(),registerElement:l=>(i=l,()=>{i===l&&(i=void 0)}),start:l=>{let d=++a;h(),r.set(l?`starting`:`ending`),OD(()=>{t.destroyed||d!==a||(l?s=requestAnimationFrame(()=>{s=void 0,!(t.destroyed||d!==a)&&(r.set(void 0),m(l,d))}):m(l,d))},{injector:e})}}}function en(n){let e=getComputedStyle(n);return Math.max(qe(e.transitionDuration,e.transitionDelay),qe(e.animationDuration,e.animationDelay))}function qe(n,e){let t=n.split(`,`).map(ze),r=e.split(`,`).map(ze);return t.reduce((i,o,s)=>Math.max(i,o+r[s%r.length]),0)}function ze(n){let e=n.trim(),t=Number.parseFloat(e);return Number.isFinite(t)?e.endsWith(`ms`)?t:t*1e3:0}var Et;var Nt;var Ue;var Ft;var Ke;var xt;var Ot;var It;var Wn;var $n;var qn;var zn;var Yn;var Xn;var He;var Rt;var Pt;var Kn;var jt;var k;var Je;var B;var Qe;var le;var T;var ue;var ce;var et;var er;var de;var Ut;var he;var Ht;var me;var zt;var We;var fe;var $e;var Qt;var tn=f(()=>{Kr();Kr();Ge();Ne();Et=(()=>{class n{constructor(){this.valueInput=jc(void 0,{alias:`value`}),this.disabledInput=jc(!1,{alias:`disabled`,transform:Dj}),this.valueChange=pj(),this._value=Pk(()=>this.valueInput()),this.value=this._value.asReadonly(),this._disabled=Pk(()=>this.disabledInput()),this.disabled=this._disabled.asReadonly()}writeValue(t){Tg(()=>this._value.set(t))}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._disabled.set(t)}setValue(t){this._value.set(t),this.valueChange.emit(t),this.onChange?.(t)}markAsTouched(){this.onTouched?.()}static{this.ɵfac=function(r){return new(r||n)}}static{this.ɵdir=RI({type:n,inputs:{valueInput:[1,`value`,`valueInput`],disabledInput:[1,`disabled`,`disabledInput`]},outputs:{valueChange:`valueChange`},exportAs:[`rdxControlValueAccessor`],features:[Ik([At(n)])]})}}return n})();Nt=`https://radix-ng.com`;Ue=new Set;Ft=[`day`,`month`,`year`],Ke=[`hour`,`minute`,`second`,`dayPeriod`],xt=[`literal`,`timeZoneName`],Ot=[...Ft,...Ke],[...Ke],It=[...Ot,...xt],It.filter(n=>n!==`literal`),Wn=`ArrowDown`,$n=`ArrowLeft`,qn=`ArrowRight`,zn=`ArrowUp`,Yn=`End`,Xn=`Home`,He=new Map,Rt=(()=>{class n{constructor(){this.appId=C(nf)}getId(t){let r=this.appId===`ng`?t:t+this.appId,i=He.get(r)??0;return He.set(r,i+1),`${r}${i}`}static{this.ɵfac=function(r){return new(r||n)}}static{this.ɵprov=X({token:n,factory:n.ɵfac,providedIn:`root`})}}return n})();Pt=new M(`RdxFieldValidity`),Kn=(()=>{class n{constructor(){this.invalid=jc(!1,{transform:Dj}),this.pending=jc(!1,{transform:Dj}),this.touched=mj(!1),this.dirty=jc(!1,{transform:Dj}),this.errors=jc([]),this.touch=pj(),this.ngControlState=St(),this.formUi=kt({invalid:this.invalid,pending:this.pending,errors:this.errors,touched:this.touched,touch:this.touch,dirty:this.dirty,ngControlState:this.ngControlState,cva:this.formUiTouchTarget()}),this.validationErrors=this.formUi.errorsState,this.fieldValidity=C(Pt,{optional:!0}),this.displayValid=Ot$1(()=>this.fieldValidity?this.fieldValidity():this.formUi.validState()),rf(()=>{if(this.ngControlState.connected()){this.touched.set(this.ngControlState.touched()),this.ngControlState.dirty()||this.formUi.resetDirtyState?.();return}this.dirty()||this.formUi.resetDirtyState?.()},{debugName:`RdxFormUiControlBase.syncInteractionState`})}formUiTouchTarget(){return null}resetNgControl(t){return this.ngControlState.reset(t)}reset(){this.formUi.resetInteractionState?.()}static{this.ɵfac=function(r){return new(r||n)}}static{this.ɵdir=RI({type:n,inputs:{invalid:[1,`invalid`],pending:[1,`pending`],touched:[1,`touched`],dirty:[1,`dirty`],errors:[1,`errors`]},outputs:{touched:`touchedChange`,touch:`touch`}})}}return n})();jt=`utils/floating-tree`,k=class{constructor(){this._state=wt$1({status:`pending`}),this.status=Ot$1(()=>this._state().status),this.tree=Ot$1(()=>{let e=this._state();return e.status===`registered`?e.tree:null}),this.node=Ot$1(()=>{let e=this._state();return e.status===`registered`?e.node:null})}register(e,t){t.tree!==e&&N(`floating/registration-mismatch`,`register(tree, node): node.tree must equal tree. Node "${t.id}" belongs to a different tree.`,jt),this._state.set({status:`registered`,tree:e,node:t})}markDetached(){this._state.set({status:`detached`})}clear(){this._state.set({status:`pending`})}},Je=new M(`RdxFloatingRegistration`);B=new WeakMap,Qe=Symbol(`RdxFloatingNode`),le=class{constructor(e,t,r,i,o){this.id=t,e!==Qe&&N(`floating/direct-node-construction`,`RdxFloatingNode is created only by RdxFloatingTree.register().`,T),this.tree=r,B.set(this,{parent:i,context:o})}get parent(){return B.get(this).parent}get context(){return B.get(this).context}},T=`utils/floating-tree`;ue=class{constructor(){this.events=Ze(),this.nodeSet=new Set,this.childrenOf=new Map}register(e){this.assertRegisterableParent(e.parent),Ej()&&this.assertContextDocument(e.context,this.nearestContext(e.parent));let t=new le(Qe,e.id,this,e.parent,e.context);return this.nodeSet.add(t),this.addToChildrenOf(e.parent,t),t}unregister(e){Ej()&&this.assertOwnedNode(e),this.nodeSet.delete(e),this.removeFromChildrenOf(e.parent,e)}setContext(e,t){if(this.assertOwnedNode(e),Ej()&&t!==null){this.assertContextDocument(t,this.nearestContext(e.parent));for(let r of this.descendantContexts(e))this.assertContextDocument(t,r)}B.get(e).context=t}setParent(e,t){if(this.assertOwnedNode(e),this.assertRegisterableParent(t),e.parent===t)return;for(let i=t;i!==null&&this.nodeSet.has(i);i=i.parent)i===e&&N(`floating/parent-cycle`,`Reparenting node "${e.id}" under "${t?.id}" creates an ancestry cycle.`,T);Ej()&&this.assertSubtreeDocuments(e,t);let r=e.parent;B.get(e).parent=t,this.removeFromChildrenOf(r,e),this.addToChildrenOf(t,e)}children(e,t={}){Ej()&&this.assertOwnedNode(e);let r=t.onlyOpen??!0,i=[],o=s=>{for(let a of this.directChildren(s))(!r||Bt(a))&&i.push(a),o(a)};return o(e),i}ancestors(e){Ej()&&this.assertOwnedNode(e);let t=[];for(let r=e.parent;r!==null&&this.nodeSet.has(r);r=r.parent)t.push(r);return t}get all(){return[...this.nodeSet]}directChildren(e){return this.childrenOf.get(e)??[]}addToChildrenOf(e,t){let r=this.childrenOf.get(e);r||(r=[],this.childrenOf.set(e,r)),r.push(t)}removeFromChildrenOf(e,t){let r=this.childrenOf.get(e);if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1),r.length===0&&this.childrenOf.delete(e)}nearestContext(e){for(let t=e;t!==null&&this.nodeSet.has(t);t=t.parent)if(t.context!==null)return t.context;return null}descendantContexts(e){return this.children(e,{onlyOpen:!1}).map(t=>t.context).filter(t=>t!==null)}assertSubtreeDocuments(e,t){let r=this.nearestContext(t);this.assertContextDocument(e.context,r);for(let i of this.descendantContexts(e))this.assertContextDocument(i,r)}isRegistered(e){return this.nodeSet.has(e)}assertOwnedNode(e){(e.tree!==this||!this.nodeSet.has(e))&&N(`floating/foreign-node`,`This node does not belong to this tree (or was already unregistered).`,T)}assertRegisterableParent(e){e!==null&&(e.tree!==this&&N(`floating/cross-tree-parent`,`A floating node parent must belong to the same tree.`,T),this.nodeSet.has(e)||N(`floating/unregistered-parent`,`A floating node parent must be currently registered in the tree.`,T))}assertContextDocument(e,t){e!==null&&t!==null&&e.ownerDocument!==t.ownerDocument&&N(`floating/cross-document-parent`,`A floating node must share the same ownerDocument as its ancestry/subtree.`,T)}},ce=new M(`RdxFloatingTree`);et=new M(`RdxFloatingRootContext`);er=(()=>{class n{constructor(){this.externalTree=jc(null),this.parentOverride=jc({kind:`inherit`}),this.selfReg=C(k),this.parentReg=C(Je,{optional:!0,skipSelf:!0}),this.ambientTree=C(ce,{optional:!0}),this.rootContext=C(et,{optional:!0}),this.nodeId=Tt(`rdx-floating-node-`),this.node=this.selfReg.node,this.status=this.selfReg.status,this.tree=this.selfReg.tree,rf(t=>{let r=this.parentOverride();if(r.kind===`inherit`&&this.parentReg?.status()===`pending`)return;let i=r.kind===`node`?r.parent:r.kind===`root`?null:this.parentReg?.node()??null,o=(r.kind===`node`?r.parent.tree:null)??this.externalTree()??this.parentReg?.tree()??this.ambientTree;if(!o){this.selfReg.markDetached();return}let s=o.register({id:this.nodeId,parent:i,context:this.rootContext});this.selfReg.register(o,s),t(()=>{o.unregister(s),this.selfReg.clear()})})}static{this.ɵfac=function(r){return new(r||n)}}static{this.ɵdir=RI({type:n,selectors:[[``,`rdxFloatingNode`,``]],inputs:{externalTree:[1,`externalTree`],parentOverride:[1,`parentOverride`]},exportAs:[`rdxFloatingNode`],features:[Ik([Lt()])]})}}return n})(),de=class{constructor(){this.elements=new Set}add(e){this.elements.add(e)}delete(e){this.elements.delete(e)}hasElement(e){return e!==null&&this.elements.has(e)}hasMatchingElement(e){if(!e)return!1;for(let t of this.elements)if(t.contains(e))return!0;return!1}contains(e){return this.hasElement(e)?!0:this.hasMatchingElement(Gt(e)?e:null)}};Ut=`utils/floating-tree`,he=class{constructor(e){this.triggers=new de,this.events=Ze(),this.floatingElementRef=null,this.referenceElementRef=null,this.floatingElementsRef=new Set,this.ownerDocument=e.ownerDocument,this.open=e.open??(()=>!1),e.floatingElement!==void 0&&this.setFloatingElement(e.floatingElement),e.referenceElement!==void 0&&this.setReferenceElement(e.referenceElement)}get floatingElement(){return this.floatingElementRef}get referenceElement(){return this.referenceElementRef}get floatingElements(){return this.floatingElementsRef}setFloatingElement(e){this.assertSameDocument(e),this.floatingElementRef&&this.floatingElementsRef.delete(this.floatingElementRef),this.floatingElementRef=e,e&&this.floatingElementsRef.add(e)}addFloatingElement(e){this.assertSameDocument(e),this.floatingElementsRef.add(e)}removeFloatingElement(e){this.floatingElementsRef.delete(e)}setReferenceElement(e){this.assertSameDocument(e),this.referenceElementRef=e}assertSameDocument(e){Ej()&&e!==null&&e.ownerDocument!==this.ownerDocument&&N(`floating/cross-document-element`,`A floating element must share its root context's ownerDocument.`,Ut)}};Ht=`data-rdx-internal-backdrop`;me=$t(qt());zt={ownerForm:()=>null,sync:()=>{},requestSubmit:()=>{}};We=`data-rdx-scroll-locked`;fe=class{constructor(e){this.doc=e,this.lockCount=0,this.restore=null,this.release=()=>{this.lockCount!==0&&(this.lockCount-=1,this.lockCount===0&&this.restore&&(this.restore(),this.restore=null))}}acquire(){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.lock(),this.release}lock(){let e=this.doc.documentElement,t=this.doc.defaultView,r=t?t.getComputedStyle(e).overflowY:``;if(r===`hidden`||r===`clip`)this.restore=()=>{};else{let s=me.os.ios||!Yt(this.doc)?Kt(this.doc):Zt(this.doc);this.restore=s}e.setAttribute(We,``);let i=this.restore;this.restore=()=>{i(),e.removeAttribute(We)}}},$e=new WeakMap;Qt=50});export{qn as C,tr as D,tn as E,zn as O,or as S,sr as T,er as _,Je as a,me as b,Ln as c,Wn as d,Xn as f,en as g,ar as h,Gn as i,Qn as l,Zn as m,Bn as n,Jn as o,Yn as p,Et as r,Kn as s,$n as t,Tt as u,et as v,rr as w,nr as x,ir as y};
@@ -1 +1 @@
1
- import{$n as sk,B as Kr,Bn as ok,Rt as X,cn as f$1,cr as ve,f as C,gr as wt,jn as lk,on as eH,rt as Ot}from"./chunk-BdOOWVGY.js";import{n as u,t as f$2}from"./chunk-V7ftX_10.js";var y;var f=f$1(()=>{Kr();lk();f$2();sk();Kr();y=class s{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);networks=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();unusedCount=Ot(()=>this.items().filter(e=>!e.builtIn&&e.connected===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`network`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.networks.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async create(e){let t;try{let r=await window.electron.networks.create(e);t=r.ok?null:r.problem}catch(r){t=eH(r)}return t===null&&(this.toast.success(ok().networks.created(e.name)),await this.refresh()),t}async remove(e){this.running.update(t=>new Set(t).add(e));try{let t=await window.electron.networks.remove(e);t.ok||this.toast.error(t.problem)}finally{this.running.update(t=>{let r=new Set(t);return r.delete(e),r})}await this.refresh()}async removeMany(e){await Promise.all(e.map(t=>this.remove(t)))}async prune(){this.busy.set(!0);try{let e=await window.electron.networks.prune();e.ok?this.toast.success(e.removed===0?ok().common.nothingToPrune:ok().networks.pruned(e.removed)):this.toast.error(e.problem)}finally{this.busy.set(!1)}await this.refresh()}static ɵfac=function(t){return new(t||s)};static ɵprov=X({token:s,factory:s.ɵfac,providedIn:`root`})}});export{y as n,f as t};
1
+ import{$n as sS,B as Kr,Bn as oS,Rt as X,_r as wt,cn as f$1,cr as ve,f as C,jn as lS,on as eH,rt as Ot}from"./chunk-CpIMiI_l.js";import{n as u,t as f$2}from"./chunk-CphQt55R.js";var y;var f=f$1(()=>{Kr();lS();f$2();sS();Kr();y=class s{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);networks=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();unusedCount=Ot(()=>this.items().filter(e=>!e.builtIn&&e.connected===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`network`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.networks.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async create(e){let t;try{let r=await window.electron.networks.create(e);t=r.ok?null:r.problem}catch(r){t=eH(r)}return t===null&&(this.toast.success(oS().networks.created(e.name)),await this.refresh()),t}async remove(e){this.running.update(t=>new Set(t).add(e));try{let t=await window.electron.networks.remove(e);t.ok||this.toast.error(t.problem)}finally{this.running.update(t=>{let r=new Set(t);return r.delete(e),r})}await this.refresh()}async removeMany(e){await Promise.all(e.map(t=>this.remove(t)))}async prune(){this.busy.set(!0);try{let e=await window.electron.networks.prune();e.ok?this.toast.success(e.removed===0?oS().common.nothingToPrune:oS().networks.pruned(e.removed)):this.toast.error(e.problem)}finally{this.busy.set(!1)}await this.refresh()}static ɵfac=function(t){return new(t||s)};static ɵprov=X({token:s,factory:s.ɵfac,providedIn:`root`})}});export{y as n,f as t};
@@ -1 +1 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,Ct as Tg,D as Gm,Dn as kc,En as kE,Fn as nS,Gt as _m,H as Ld,J as Nc,K as My,Pn as mj,Pt as Wm,R as Jm,St as Tc,Tn as jc,Wn as pg,Xn as rf,cn as f,et as Od,f as C,gr as wt,ht as SE,jn as lk,ln as fS,lr as vg,mr as wc,o as Ac,on as eH,or as vS,qt as ag,rn as dk,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,xn as hg}from"./chunk-BdOOWVGY.js";import{n as u,t as f$1}from"./chunk-V7ftX_10.js";import"./chunk-D29s9m84.js";import{i as h,n as N,r as d}from"./chunk-CRNeTD5E.js";import{n as w,t as B}from"./chunk-Zom3ankA.js";import{n as o,t as i}from"./chunk-Zcfhi-RM.js";import{n as p,t as M}from"./chunk-C22Z7vgK.js";import"./chunk-eG8Su12W.js";import"./chunk-Bx2_SrZM.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-QaMufr3I.js";import{n as x,t as u$1}from"./chunk-BW20bBdg.js";import{r as Q,s as fe,u as ra}from"./chunk-DzG5R5Kk.js";import{i as z,n as oe,r as x$1}from"./chunk-Ba_z6LGV.js";import{n as P,t as K}from"./chunk-DvoPI4MU.js";import{n as V,t as G}from"./chunk-CWusqRG0.js";import{n as W,t as J}from"./chunk-DZjRtM2K.js";function Le(i,t){if(i&1){let e=$E();Oi(0,`label`,12)(1,`input`,20),Jm(`change`,function(){let s=Ld(e).$implicit;return Od(HE(2).kind.set(s.kind))}),Nc(),Oi(2,`span`)(3,`span`,21),fS(4),Nc(),Oi(5,`span`,22),fS(6),Nc()()()}if(i&2){let e=t.$implicit,n=HE(2);ec(),Wm(`value`,e.kind)(`checked`,n.kind()===e.kind)(`disabled`,n.busy()),ec(3),pg(e.label),ec(2),pg(e.hint)}}function Oe(i,t){if(i&1){let e=$E();Oi(0,`label`,8)(1,`span`,9),fS(2),Nc(),Oi(3,`input`,23),Jm(`input`,function(s){Ld(e);return Od(HE(2).path.set(s.target.value))}),Nc(),Oi(4,`span`,24),fS(5),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().folderLabel),ec(),nS(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().folderHint)}}function We(i,t){if(i&1){let e=$E();Oi(0,`label`,8)(1,`span`,9),fS(2),Nc(),Oi(3,`input`,25),Jm(`input`,function(s){Ld(e);return Od(HE(2).server.set(s.target.value))}),Nc()(),Oi(4,`label`,8)(5,`span`,9),fS(6),Nc(),Oi(7,`input`,26),Jm(`input`,function(s){Ld(e);return Od(HE(2).path.set(s.target.value))}),Nc(),Oi(8,`span`,24),fS(9),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().nfsServerLabel),ec(),nS(e.field),Wm(`value`,e.server())(`disabled`,e.busy()),ec(3),pg(e.t().nfsPathLabel),ec(),nS(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().nfsHint)}}function Ue(i,t){if(i&1){let e=$E();Oi(0,`details`,13)(1,`summary`,27),fS(2),Nc(),Oi(3,`label`,28)(4,`span`,9),fS(5),Nc(),Oi(6,`input`,29),Jm(`input`,function(s){Ld(e);return Od(HE(2).driver.set(s.target.value))}),Nc(),Oi(7,`span`,24),fS(8),Nc()()()}if(i&2){let e=HE(2);Wm(`open`,e.driver()!==`local`),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nS(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint)}}function Fe(i,t){i&1&&(Oi(0,`p`,14),fS(1),Nc()),i&2&&(ec(),pg(t))}function je(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Oi(5,`p`,6),fS(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(s){Ld(e);return Od(HE().submit(s))}),Oi(8,`label`,8)(9,`span`,9),fS(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(s){Ld(e);return Od(HE().name.set(s.target.value))}),Nc()(),Oi(12,`fieldset`)(13,`legend`,9),fS(14),Nc(),Oi(15,`div`,11),kc(16,Le,7,5,`label`,12,ze),Nc()(),SE(18,Oe,6,6,`label`,8)(19,We,10,11)(20,Ue,9,8,`details`,13),SE(21,Fe,2,1,`p`,14),Oi(22,`div`,15)(23,`button`,16),Gm(24,`app-icon`,17),fS(25),Nc(),Oi(26,`button`,18),Gm(27,`app-icon`,19),fS(28),Nc()()()()()}if(i&2){let e,n,s=HE();ec(4),pg(s.t().title),ec(2),pg(s.t().description),ec(4),pg(s.t().nameLabel),ec(),nS(s.field),Wm(`placeholder`,s.t().namePlaceholder)(`value`,s.name())(`disabled`,s.busy()),ec(3),pg(s.t().storageLabel),ec(2),Tc(s.kinds()),ec(2),kE((e=s.kind())===`folder`?18:e===`nfs`?19:20),ec(3),kE((n=s.problem())?21:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,s.common().cancel,` `),ec(),Wm(`disabled`,!s.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,s.busy()?s.t().creating:s.t().submit,` `)}}var ze;var $e;var Y;var he=f(()=>{Kr();Je$1();B();dk();sk();Kr();ze=(i,t)=>t.kind;$e=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Y=class i{store=C(w);open=mj(!1);t=Ot(()=>ok().volumes.createDialog);common=Ot(()=>ok().common);field=$e;kinds=Ot(()=>{let t=this.t();return[{kind:`docker`,label:t.storage.docker,hint:t.storage.dockerHint},{kind:`folder`,label:t.storage.folder,hint:t.storage.folderHint},{kind:`nfs`,label:t.storage.nfs,hint:t.storage.nfsHint}]});name=wt(``);kind=wt(`docker`);driver=wt(`local`);path=wt(``);server=wt(``);busy=wt(!1);problem=wt(null);storage=Ot(()=>{let t=this.path().trim();switch(this.kind()){case`docker`:return this.driver().trim()===``?null:{kind:`docker`,driver:this.driver().trim()};case`folder`:return t===``?null:{kind:`folder`,path:t};case`nfs`:return t===``||this.server().trim()===``?null:{kind:`nfs`,server:this.server().trim(),path:t}}});canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.storage()!==null);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.kind.set(`docker`),this.driver.set(`local`),this.path.set(``),this.server.set(``),this.problem.set(null)})})}submit(t){t.preventDefault();let e=this.storage();!this.canSubmit()||e===null||(this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),storage:e}).then(n=>{this.problem.set(n),n===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1)))}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-volume-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`mt-1`,`space-y-1`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2`,`rounded-md`,`px-2`,`py-1.5`,`hover:bg-ink-800`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`],[`type`,`radio`,`name`,`volume-storage`,1,`mt-0.5`,`accent-accent`,3,`change`,`value`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`/srv/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`nas.local`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`/volume1/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(n.open,l)||(n.open=l),l}),_m(1,je,29,16,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Ke(i,t){if(i&1&&(Oi(0,`span`,17),fS(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.label)}}function qe(i,t){i&1&&(Oi(0,`span`,19),fS(1,`/`),Nc())}function Qe(i,t){if(i&1){let e=$E();Oi(0,`button`,18),Jm(`click`,function(){Ld(e);let s=HE().$implicit;return Od(HE(2).go(s.path))}),fS(1),Nc(),SE(2,qe,2,0,`span`,19)}if(i&2){let e=HE().$implicit;ec(),Ac(` `,e.label,` `),ec(),kE(e.path!==`/`?2:-1)}}function Ge(i,t){if(i&1&&SE(0,Ke,2,1,`span`,17)(1,Qe,3,2),i&2){let e=t.$index,n=t.$count;kE(e===n-1?0:1)}}function Je(i,t){i&1&&(Oi(0,`p`,11),fS(1),Nc()),i&2&&(ec(),pg(t))}function Xe(i,t){if(i&1&&(Oi(0,`p`,12),fS(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().loading)}}function Ye(i,t){if(i&1&&(Oi(0,`p`,12),fS(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().empty)}}function Ze(i,t){if(i&1){let e=$E();Oi(0,`button`,24),Jm(`click`,function(){Ld(e);let s=HE().$implicit,l=HE(3);return Od(l.go(l.childOf(s)))}),fS(1),Nc()}if(i&2){let e=HE().$implicit;ec(),Ac(` `,e.name,` `)}}function et(i,t){if(i&1&&(Oi(0,`span`,23),fS(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.name)}}function tt(i,t){if(i&1&&(Oi(0,`li`,20),Gm(1,`app-icon`,21),SE(2,Ze,2,1,`button`,22)(3,et,2,1,`span`,23),Nc()),i&2){let e=t.$implicit;ec(),ag(`text-accent`,e.kind===`dir`)(`text-ink-500`,e.kind===`file`),Wm(`name`,e.kind===`dir`?`folder`:`file`)(`size`,15),ec(),kE(e.kind===`dir`?2:3)}}function nt(i,t){if(i&1&&(Oi(0,`ul`,13),kc(1,tt,4,7,`li`,20,He),Nc()),i&2){let e=HE(2);ec(),Tc(e.entries())}}function it(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Oi(5,`p`,6),fS(6),Nc(),Oi(7,`div`,7)(8,`button`,8),Jm(`click`,function(){Ld(e);let s=HE();return Od(s.go(s.parentOf(s.path())))}),Gm(9,`app-icon`,9),Nc(),Oi(10,`nav`,10),kc(11,Ge,2,1,null,null,Ae),Nc()(),SE(13,Je,2,1,`p`,11)(14,Xe,2,1,`p`,12)(15,Ye,2,1,`p`,12)(16,nt,3,0,`ul`,13),Oi(17,`div`,14)(18,`button`,15),Gm(19,`app-icon`,16),fS(20),Nc()()()()}if(i&2){let e,n=HE();ec(4),pg(n.t().title(n.volume())),ec(2),pg(n.t().description),ec(2),Wm(`disabled`,n.path()===`/`||n.busy()),Br(`aria-label`,n.t().up),ec(),Wm(`size`,14),ec(),Br(`aria-label`,n.t().path),ec(),Tc(n.crumbs()),ec(2),kE((e=n.problem())?13:n.busy()?14:n.entries().length===0?15:16,e),ec(6),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var Ae;var He;var Z;var Ce=f(()=>{Kr();Je$1();lk();dk();sk();Kr();Ae=(i,t)=>t.path,He=(i,t)=>t.name;Z=class i{open=mj(!1);volume=jc.required();t=Ot(()=>ok().volumes.browse);common=Ot(()=>ok().common);path=wt(`/`);entries=wt([]);busy=wt(!1);problem=wt(null);crumbs=Ot(()=>{let t=this.path().split(`/`).filter(e=>e!==``);return[{label:`/`,path:`/`},...t.map((e,n)=>({label:e,path:`/${t.slice(0,n+1).join(`/`)}`}))]});constructor(){rf(()=>{let t=this.open(),e=this.volume();Tg(()=>{t?(this.path.set(`/`),this.load(e)):window.electron.volumes.closeBrowser().catch(()=>{})})})}go(t){this.path.set(t),this.load(this.volume())}parentOf(t){return`/${t.split(`/`).filter(n=>n!==``).slice(0,-1).join(`/`)}`}childOf(t){let e=this.path();return e.endsWith(`/`)?`${e}${t.name}`:`${e}/${t.name}`}async load(t){this.busy.set(!0);try{let e=await window.electron.volumes.browse(t,this.path());this.path.set(e.path),e.ok?(this.entries.set(e.entries),this.problem.set(null)):(this.entries.set([]),this.problem.set(e.problem))}catch(e){this.entries.set([]),this.problem.set(eH(e))}finally{this.busy.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-volume-browser-dialog`]],inputs:{open:[1,`open`],volume:[1,`volume`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`volume-browser-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`flex`,`shrink-0`,`items-center`,`gap-2`],[`type`,`button`,`data-testid`,`volume-up`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`arrow-up`,3,`size`],[1,`flex`,`min-w-0`,`flex-1`,`flex-wrap`,`items-center`,`font-mono`,`text-[12px]`],[1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`volume-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`,`text-[13px]`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`aria-current`,`location`,1,`text-ink-100`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`text-ink-400`,`hover:text-ink-100`,3,`click`],[1,`px-1`,`text-ink-600`],[1,`flex`,`items-center`,`gap-2`,`py-1.5`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`],[1,`min-w-0`,`flex-1`,`truncate`,`text-ink-200`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`,3,`click`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(n.open,l)||(n.open=l),l}),_m(1,it,21,9,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function ot(i,t){if(i&1&&(Oi(0,`p`,10),fS(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().taken)}}function at(i,t){if(i&1&&(Oi(0,`p`,11),fS(1),Nc()),i&2){let e=HE(2);ec(),Ac(` `,e.t().running(e.running().join(`, `)),` `)}}function rt(i,t){if(i&1&&(Oi(0,`p`,12),fS(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().stopped(e.users().join(`, `)))}}function lt(i,t){i&1&&(Oi(0,`p`,13),fS(1),Nc()),i&2&&(ec(),pg(t))}function st(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Oi(5,`p`,6),fS(6),Nc(),Oi(7,`label`,7)(8,`span`,8),fS(9),Nc(),Oi(10,`input`,9),Jm(`input`,function(s){Ld(e);return Od(HE().target.set(s.target.value))}),Nc()(),SE(11,ot,2,1,`p`,10),SE(12,at,2,1,`p`,11)(13,rt,2,1,`p`,12),SE(14,lt,2,1,`p`,13),Oi(15,`div`,14)(16,`button`,15),Gm(17,`app-icon`,16),fS(18),Nc(),Oi(19,`button`,17),Jm(`click`,function(){Ld(e);return Od(HE().copy())}),Gm(20,`app-icon`,18),fS(21),Nc()()()()}if(i&2){let e,n=HE();ec(4),pg(n.t().title(n.volume())),ec(2),pg(n.t().description),ec(3),pg(n.t().name),ec(),nS(n.field+` mt-1.5`),Wm(`value`,n.target()),ec(),kE(n.taken()?11:-1),ec(),kE(n.running().length>0?12:n.users().length>0?13:-1),ec(2),kE((e=n.problem())?14:-1,e),ec(3),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `),ec(),Wm(`disabled`,n.copying()||n.taken()||n.target().trim()===``),ec(),Wm(`size`,14),ec(),Ac(` `,n.copying()?n.t().copying:n.t().copy,` `)}}var pt;var ee;var ke=f(()=>{Kr();Je$1();lk();B();sk();dk();f$1();Kr();pt=`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`,ee=class i{open=mj(!1);volume=jc.required();store=C(w);toast=C(u);t=Ot(()=>ok().volumes.copy);common=Ot(()=>ok().common);field=pt;target=wt(``);copying=wt(!1);problem=wt(null);userList=wt([]);running=Ot(()=>this.userList().filter(t=>t.running).map(t=>t.name));users=Ot(()=>this.userList().map(t=>t.name));taken=Ot(()=>this.store.volumes().some(t=>t.name===this.target().trim()));constructor(){rf(()=>{if(!this.open())return;let t=this.volume();Tg(()=>{this.target.set(`${t}-kopie`),this.problem.set(null),this.loadUsers(t)})})}async copy(){let t=this.target().trim();this.copying.set(!0),this.problem.set(null);try{let e=await window.electron.volumes.copy(this.volume(),t);e.ok?(this.toast.success(this.t().copied(this.volume(),t)),this.store.refresh(),this.open.set(!1)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.copying.set(!1)}}async loadUsers(t){this.userList.set([]);try{this.userList.set(await window.electron.volumes.users(t))}catch{}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-copy-volume-dialog`]],inputs:{open:[1,`open`],volume:[1,`volume`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`copy-volume-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`,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`data-testid`,`copy-volume-name`,3,`input`,`value`],[`data-testid`,`copy-volume-taken`,1,`mt-2`,`text-[12px]`,`text-danger`],[`data-testid`,`copy-volume-running`,1,`mt-3`,`rounded-md`,`border`,`border-warn/40`,`bg-warn/10`,`px-3`,`py-2`,`text-[12px]`,`text-ink-200`],[1,`mt-3`,`text-[12px]`,`text-ink-500`],[`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`,`copy-volume-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`copy`,3,`size`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(n.open,l)||(n.open=l),l}),_m(1,st,22,14,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function mt(i,t){if(i&1&&(Oi(0,`span`,7),fS(1),Nc()),i&2){let e=HE();ec(),Ac(`· `,e.t().calculating)}}function dt(i,t){if(i&1&&(Oi(0,`span`,17),fS(1),Nc()),i&2){let e=HE();ec(),pg(e.t().refreshing)}}function ct(i,t){if(i&1){let e=$E();Oi(0,`div`,19)(1,`span`,31),fS(2),Nc(),Oi(3,`button`,32),Jm(`click`,function(){Ld(e);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,33),fS(5),Nc()()}if(i&2){let e=HE();ec(2),pg(e.t().selected(e.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,e.common().remove,` `)}}function ut(i,t){if(i&1&&(Oi(0,`div`,35),fS(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.composeProject)}}function gt(i,t){if(i&1&&(Oi(0,`div`,34),fS(1),Nc(),SE(2,ut,2,1,`div`,35)),i&2){let e=t.$implicit;Wm(`title`,e.mountpoint),ec(),pg(e.name),ec(),kE(e.composeProject?2:-1)}}function _t(i,t){if(i&1&&(Oi(0,`span`,36),fS(1),Nc()),i&2){let e=t.$implicit;ec(),pg(e.driver)}}function yt(i,t){if(i&1&&(Oi(0,`span`,37),fS(1),Nc()),i&2){let e=HE().$implicit,n=HE();ec(),pg(n.t().containerCount(e.inUseBy))}}function xt(i,t){i&1&&(Oi(0,`span`,38),fS(1,`—`),Nc())}function ft(i,t){if(i&1&&SE(0,yt,2,1,`span`,37)(1,xt,2,0,`span`,38),i&2){let e=t.$implicit;kE(e.inUseBy>0?0:1)}}function bt(i,t){if(i&1&&(Oi(0,`span`,39),fS(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.ageOf(e.createdAt))}}function vt(i,t){if(i&1&&(Oi(0,`span`,40),fS(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.sizeOf(e.sizeBytes))}}function ht(i,t){if(i&1){let e=$E();Oi(0,`div`,41)(1,`app-action-menu`,42),Jm(`picked`,function(s){let l=Ld(e).$implicit;return Od(HE().onRowMenu(s,l))}),Nc()()}if(i&2){let e=t.$implicit,n=HE();ec(),Wm(`label`,n.t().rowMenu(e.name))(`items`,n.rowMenu(e))}}var we;f(()=>{Kr();h();M();B();G();J();oe();K();dk();x();he();sk();Ce();ke();ra();o();Kr();we=class i$1{store=C(w);preferences=C(p);t=Ot(()=>ok().volumes);common=Ot(()=>ok().common);columns=Ot(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`inUse`,label:t.inUse,width:`110px`},{key:`created`,label:t.created,width:`150px`},{key:`size`,label:t.size,width:`100px`,align:`right`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;loadingSizes=this.store.loadingSizes;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);onlyUnused=this.preferences.flag(`volumes.onlyUnused`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);browseOpen=wt(!1);copyOpen=wt(!1);copyVolume=wt(``);browseVolume=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),e=this.onlyUnused();return this.store.volumes().filter(n=>e&&n.inUseBy>0?!1:t===``||n.name.toLowerCase().includes(t))});totalSize=Ot(()=>d(this.store.totalBytes()));trackKey=t=>t.name;inkijk=jc(void 0);bewaar=jc(void 0);router=C(fe);route=C(Q);constructor(){rf(()=>{let t=this.inkijk();t!==void 0&&Tg(()=>{this.browseVolume.set(t),this.browseOpen.set(!0),i(this.router,this.route,`inkijk`)})}),rf(()=>{let t=this.bewaar(),e=this.store.volumes().find(n=>n.name===t);t!==void 0&&e!==void 0&&Tg(()=>{this.backup(e),i(this.router,this.route,`bewaar`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}sizeOf(t){return t===null?`—`:d(t)}ageOf(t){return t===0?`—`:N(t)}removalReason(t){return t.inUseBy>0?this.t().inUseReason(t.inUseBy):this.common().remove}backup(t){this.store.backup(t.name)}backupTitle(t){return t.inUseBy>0?this.t().backupTitleInUse(t.name):this.t().backupTitle(t.name)}rowMenu(t){let e=this.pending().has(t.name),n=this.t();return[{id:`browse`,label:n.rowBrowse,icon:`folder`,disabled:e},{id:`backup`,label:n.rowBackup,icon:`download`,disabled:e,hint:this.backupTitle(t)},{id:`restore`,label:n.rowRestore,icon:`upload`,disabled:e,hint:n.restoreTitle(t.name)},{id:`copy`,label:n.rowCopy,icon:`copy`,disabled:e},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:e||t.inUseBy>0,danger:!0,separated:!0,hint:this.removalReason(t)}]}onRowMenu(t,e){t===`browse`?(this.browseVolume.set(e.name),this.browseOpen.set(!0)):t===`backup`?this.backup(e):t===`restore`?this.askRestore(e):t===`copy`?(this.copyVolume.set(e.name),this.copyOpen.set(!0)):this.askRemove(e)}askRestore(t){let e=this.t().restore;this.action.set({names:[t.name],title:e.title(t.name),description:e.description(t.inUseBy),confirmLabel:e.confirm,all:!1,restore:!0}),this.confirmOpen.set(!0)}askRemove(t){let e=this.t().remove;this.action.set({names:[t.name],title:e.title,description:e.description(t.name),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],e=this.t().remove;this.action.set({names:t,title:e.manyTitle,description:e.manyDescription(t.length),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-anonymous`,label:this.t().menu.pruneAnonymous,icon:`broom`,separated:!0},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune(t===`prune-unused`)}askPrune(t){let e=this.t().prune;this.action.set({names:[],title:t?e.allTitle:e.anonymousTitle,description:t?e.allDescription:e.anonymousDescription,confirmLabel:e.confirm,all:t}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.restore===!0?this.store.restore(t.names[0]):t.names.length===0?this.store.prune(t.all):(this.store.removeMany(t.names,!1),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){let t=this.action();return t?.restore===!0?`upload`:t?.names.length===0?`broom`:`trash`}static ɵfac=function(e){return new(e||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-volumes-page`]],inputs:{zoek:[1,`zoek`],inkijk:[1,`inkijk`],bewaar:[1,`bewaar`]},decls:43,vars:32,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`text-[12px]`,`font-normal`,`text-ink-500`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`volume`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(e,n){e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Oi(6,`div`,4)(7,`div`)(8,`div`,5),fS(9),Nc(),Oi(10,`div`,6),fS(11),SE(12,mt,2,1,`span`,7),Nc()(),Oi(13,`div`)(14,`div`,5),fS(15),Nc(),Oi(16,`div`,6),fS(17),Nc()()()(),Oi(18,`div`,8)(19,`app-action-menu`,9),Jm(`picked`,function(l){return n.onMenu(l)}),Nc()()(),Oi(20,`div`,10)(21,`label`,11)(22,`span`,12),Gm(23,`app-icon`,13),Nc(),Oi(24,`span`,14),fS(25),Nc(),Oi(26,`input`,15),Jm(`input`,function(l){return n.search.set(l.target.value)}),Nc()(),Oi(27,`app-filter-switch`,16),vg(`onChange`,function(l){return vS(n.onlyUnused,l)||(n.onlyUnused=l),l}),Nc(),SE(28,dt,2,1,`span`,17),Nc(),Gm(29,`app-page-messages`,18),SE(30,ct,6,3,`div`,19),Nc(),Oi(31,`div`,20)(32,`app-data-table`,21),vg(`selectedChange`,function(l){return vS(n.selected,l)||(n.selected=l),l}),_m(33,gt,3,3,`ng-template`,22)(34,_t,2,1,`ng-template`,23)(35,ft,2,1,`ng-template`,24)(36,bt,2,1,`ng-template`,25)(37,vt,2,1,`ng-template`,26)(38,ht,2,2,`ng-template`,27),Nc()()(),Oi(39,`app-create-volume-dialog`,28),vg(`openChange`,function(l){return vS(n.createOpen,l)||(n.createOpen=l),l}),Nc(),Oi(40,`app-volume-browser-dialog`,29),vg(`openChange`,function(l){return vS(n.browseOpen,l)||(n.browseOpen=l),l}),Nc(),Oi(41,`app-copy-volume-dialog`,29),vg(`openChange`,function(l){return vS(n.copyOpen,l)||(n.copyOpen=l),l}),Nc(),Oi(42,`app-confirm-dialog`,30),vg(`openChange`,function(l){return vS(n.confirmOpen,l)||(n.confirmOpen=l),l}),Jm(`confirmed`,function(){return n.confirm()}),Nc()),e&2&&(ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),Ac(` `,n.totalSize(),` `),ec(),kE(n.loadingSizes()?12:-1),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),kE(n.loading()?28:-1),ec(),Wm(`problem`,n.problem()),ec(),kE(n.selected().size>0?30:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(7),hg(`open`,n.createOpen),ec(),hg(`open`,n.browseOpen),Wm(`volume`,n.browseVolume()),ec(),hg(`open`,n.copyOpen),Wm(`volume`,n.copyVolume()),ec(),hg(`open`,n.confirmOpen),Wm(`title`,n.actionTitle())(`description`,n.actionDescription())(`confirmLabel`,n.actionConfirmLabel())(`confirmIcon`,n.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u$1,P,V,Y,Z,ee],encapsulation:2})}})();export{we as VolumesPage};
1
+ import{$n as sS,A as HE,B as Kr,Bn as oS,D as Gm,Dn as kE,Fn as mj,Gn as pg,Gt as _m,H as Ld,K as My,Pt as Wm,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt,cn as f,dr as vk,et as Od,f as C,fn as fk,hr as wc,ht as Sc,jn as lS,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,qt as ag,rn as dS,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,xn as hg,xt as Tc}from"./chunk-CpIMiI_l.js";import{n as u,t as f$1}from"./chunk-CphQt55R.js";import"./chunk-DS3iAefP.js";import{i as h,n as N,r as d}from"./chunk-Q3Ig-PJ6.js";import{n as w,t as B}from"./chunk-Cx-uRg2m.js";import{n as o,t as i}from"./chunk-DNfiG-TG.js";import{n as p,t as M}from"./chunk-CjySsWe4.js";import"./chunk-gHmeiJFn.js";import"./chunk-xmDwFpQl.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-DdTfHpyK.js";import{n as x,t as u$1}from"./chunk-CpNGhf9S.js";import{r as Q,s as fe,u as ra}from"./chunk-B1xjyPnV.js";import{n as P,t as K}from"./chunk-Cpz4zP5G.js";import{n as V,t as G}from"./chunk-C7c_wFw-.js";import{n as W,t as J}from"./chunk-D5njuWRz.js";import{i as z,n as oe,r as x$1}from"./chunk-Bxte2YBm.js";function Le(i,t){if(i&1){let e=$E();Oi(0,`label`,12)(1,`input`,20),Jm(`change`,function(){let s=Ld(e).$implicit;return Od(HE(2).kind.set(s.kind))}),Nc(),Oi(2,`span`)(3,`span`,21),fk(4),Nc(),Oi(5,`span`,22),fk(6),Nc()()()}if(i&2){let e=t.$implicit,n=HE(2);ec(),Wm(`value`,e.kind)(`checked`,n.kind()===e.kind)(`disabled`,n.busy()),ec(3),pg(e.label),ec(2),pg(e.hint)}}function Oe(i,t){if(i&1){let e=$E();Oi(0,`label`,8)(1,`span`,9),fk(2),Nc(),Oi(3,`input`,23),Jm(`input`,function(s){Ld(e);return Od(HE(2).path.set(s.target.value))}),Nc(),Oi(4,`span`,24),fk(5),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().folderLabel),ec(),nk(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().folderHint)}}function We(i,t){if(i&1){let e=$E();Oi(0,`label`,8)(1,`span`,9),fk(2),Nc(),Oi(3,`input`,25),Jm(`input`,function(s){Ld(e);return Od(HE(2).server.set(s.target.value))}),Nc()(),Oi(4,`label`,8)(5,`span`,9),fk(6),Nc(),Oi(7,`input`,26),Jm(`input`,function(s){Ld(e);return Od(HE(2).path.set(s.target.value))}),Nc(),Oi(8,`span`,24),fk(9),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().nfsServerLabel),ec(),nk(e.field),Wm(`value`,e.server())(`disabled`,e.busy()),ec(3),pg(e.t().nfsPathLabel),ec(),nk(e.field),Wm(`value`,e.path())(`disabled`,e.busy()),ec(2),pg(e.t().nfsHint)}}function Ue(i,t){if(i&1){let e=$E();Oi(0,`details`,13)(1,`summary`,27),fk(2),Nc(),Oi(3,`label`,28)(4,`span`,9),fk(5),Nc(),Oi(6,`input`,29),Jm(`input`,function(s){Ld(e);return Od(HE(2).driver.set(s.target.value))}),Nc(),Oi(7,`span`,24),fk(8),Nc()()()}if(i&2){let e=HE(2);Wm(`open`,e.driver()!==`local`),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nk(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint)}}function Fe(i,t){i&1&&(Oi(0,`p`,14),fk(1),Nc()),i&2&&(ec(),pg(t))}function je(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(s){Ld(e);return Od(HE().submit(s))}),Oi(8,`label`,8)(9,`span`,9),fk(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(s){Ld(e);return Od(HE().name.set(s.target.value))}),Nc()(),Oi(12,`fieldset`)(13,`legend`,9),fk(14),Nc(),Oi(15,`div`,11),Sc(16,Le,7,5,`label`,12,ze),Nc()(),kE(18,Oe,6,6,`label`,8)(19,We,10,11)(20,Ue,9,8,`details`,13),kE(21,Fe,2,1,`p`,14),Oi(22,`div`,15)(23,`button`,16),Gm(24,`app-icon`,17),fk(25),Nc(),Oi(26,`button`,18),Gm(27,`app-icon`,19),fk(28),Nc()()()()()}if(i&2){let e,n,s=HE();ec(4),pg(s.t().title),ec(2),pg(s.t().description),ec(4),pg(s.t().nameLabel),ec(),nk(s.field),Wm(`placeholder`,s.t().namePlaceholder)(`value`,s.name())(`disabled`,s.busy()),ec(3),pg(s.t().storageLabel),ec(2),Tc(s.kinds()),ec(2),SE((e=s.kind())===`folder`?18:e===`nfs`?19:20),ec(3),SE((n=s.problem())?21:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,s.common().cancel,` `),ec(),Wm(`disabled`,!s.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,s.busy()?s.t().creating:s.t().submit,` `)}}var ze;var $e;var Y;var he=f(()=>{Kr();Je$1();B();dS();sS();Kr();ze=(i,t)=>t.kind;$e=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Y=class i{store=C(w);open=mj(!1);t=Ot(()=>oS().volumes.createDialog);common=Ot(()=>oS().common);field=$e;kinds=Ot(()=>{let t=this.t();return[{kind:`docker`,label:t.storage.docker,hint:t.storage.dockerHint},{kind:`folder`,label:t.storage.folder,hint:t.storage.folderHint},{kind:`nfs`,label:t.storage.nfs,hint:t.storage.nfsHint}]});name=wt(``);kind=wt(`docker`);driver=wt(`local`);path=wt(``);server=wt(``);busy=wt(!1);problem=wt(null);storage=Ot(()=>{let t=this.path().trim();switch(this.kind()){case`docker`:return this.driver().trim()===``?null:{kind:`docker`,driver:this.driver().trim()};case`folder`:return t===``?null:{kind:`folder`,path:t};case`nfs`:return t===``||this.server().trim()===``?null:{kind:`nfs`,server:this.server().trim(),path:t}}});canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.storage()!==null);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.kind.set(`docker`),this.driver.set(`local`),this.path.set(``),this.server.set(``),this.problem.set(null)})})}submit(t){t.preventDefault();let e=this.storage();!this.canSubmit()||e===null||(this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),storage:e}).then(n=>{this.problem.set(n),n===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1)))}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-volume-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`mt-1`,`space-y-1`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2`,`rounded-md`,`px-2`,`py-1.5`,`hover:bg-ink-800`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`],[`type`,`radio`,`name`,`volume-storage`,1,`mt-0.5`,`accent-accent`,3,`change`,`value`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`/srv/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`nas.local`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`/volume1/data`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(n.open,l)||(n.open=l),l}),_m(1,je,29,16,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Ke(i,t){if(i&1&&(Oi(0,`span`,17),fk(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.label)}}function qe(i,t){i&1&&(Oi(0,`span`,19),fk(1,`/`),Nc())}function Qe(i,t){if(i&1){let e=$E();Oi(0,`button`,18),Jm(`click`,function(){Ld(e);let s=HE().$implicit;return Od(HE(2).go(s.path))}),fk(1),Nc(),kE(2,qe,2,0,`span`,19)}if(i&2){let e=HE().$implicit;ec(),Ac(` `,e.label,` `),ec(),SE(e.path!==`/`?2:-1)}}function Ge(i,t){if(i&1&&kE(0,Ke,2,1,`span`,17)(1,Qe,3,2),i&2){let e=t.$index,n=t.$count;SE(e===n-1?0:1)}}function Je(i,t){i&1&&(Oi(0,`p`,11),fk(1),Nc()),i&2&&(ec(),pg(t))}function Xe(i,t){if(i&1&&(Oi(0,`p`,12),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().loading)}}function Ye(i,t){if(i&1&&(Oi(0,`p`,12),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().empty)}}function Ze(i,t){if(i&1){let e=$E();Oi(0,`button`,24),Jm(`click`,function(){Ld(e);let s=HE().$implicit,l=HE(3);return Od(l.go(l.childOf(s)))}),fk(1),Nc()}if(i&2){let e=HE().$implicit;ec(),Ac(` `,e.name,` `)}}function et(i,t){if(i&1&&(Oi(0,`span`,23),fk(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.name)}}function tt(i,t){if(i&1&&(Oi(0,`li`,20),Gm(1,`app-icon`,21),kE(2,Ze,2,1,`button`,22)(3,et,2,1,`span`,23),Nc()),i&2){let e=t.$implicit;ec(),ag(`text-accent`,e.kind===`dir`)(`text-ink-500`,e.kind===`file`),Wm(`name`,e.kind===`dir`?`folder`:`file`)(`size`,15),ec(),SE(e.kind===`dir`?2:3)}}function nt(i,t){if(i&1&&(Oi(0,`ul`,13),Sc(1,tt,4,7,`li`,20,He),Nc()),i&2){let e=HE(2);ec(),Tc(e.entries())}}function it(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`div`,7)(8,`button`,8),Jm(`click`,function(){Ld(e);let s=HE();return Od(s.go(s.parentOf(s.path())))}),Gm(9,`app-icon`,9),Nc(),Oi(10,`nav`,10),Sc(11,Ge,2,1,null,null,Ae),Nc()(),kE(13,Je,2,1,`p`,11)(14,Xe,2,1,`p`,12)(15,Ye,2,1,`p`,12)(16,nt,3,0,`ul`,13),Oi(17,`div`,14)(18,`button`,15),Gm(19,`app-icon`,16),fk(20),Nc()()()()}if(i&2){let e,n=HE();ec(4),pg(n.t().title(n.volume())),ec(2),pg(n.t().description),ec(2),Wm(`disabled`,n.path()===`/`||n.busy()),Br(`aria-label`,n.t().up),ec(),Wm(`size`,14),ec(),Br(`aria-label`,n.t().path),ec(),Tc(n.crumbs()),ec(2),SE((e=n.problem())?13:n.busy()?14:n.entries().length===0?15:16,e),ec(6),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var Ae;var He;var Z;var Ce=f(()=>{Kr();Je$1();lS();dS();sS();Kr();Ae=(i,t)=>t.path,He=(i,t)=>t.name;Z=class i{open=mj(!1);volume=jc.required();t=Ot(()=>oS().volumes.browse);common=Ot(()=>oS().common);path=wt(`/`);entries=wt([]);busy=wt(!1);problem=wt(null);crumbs=Ot(()=>{let t=this.path().split(`/`).filter(e=>e!==``);return[{label:`/`,path:`/`},...t.map((e,n)=>({label:e,path:`/${t.slice(0,n+1).join(`/`)}`}))]});constructor(){rf(()=>{let t=this.open(),e=this.volume();Tg(()=>{t?(this.path.set(`/`),this.load(e)):window.electron.volumes.closeBrowser().catch(()=>{})})})}go(t){this.path.set(t),this.load(this.volume())}parentOf(t){return`/${t.split(`/`).filter(n=>n!==``).slice(0,-1).join(`/`)}`}childOf(t){let e=this.path();return e.endsWith(`/`)?`${e}${t.name}`:`${e}/${t.name}`}async load(t){this.busy.set(!0);try{let e=await window.electron.volumes.browse(t,this.path());this.path.set(e.path),e.ok?(this.entries.set(e.entries),this.problem.set(null)):(this.entries.set([]),this.problem.set(e.problem))}catch(e){this.entries.set([]),this.problem.set(eH(e))}finally{this.busy.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-volume-browser-dialog`]],inputs:{open:[1,`open`],volume:[1,`volume`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`volume-browser-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`flex`,`shrink-0`,`items-center`,`gap-2`],[`type`,`button`,`data-testid`,`volume-up`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`arrow-up`,3,`size`],[1,`flex`,`min-w-0`,`flex-1`,`flex-wrap`,`items-center`,`font-mono`,`text-[12px]`],[1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`volume-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`,`text-[13px]`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`aria-current`,`location`,1,`text-ink-100`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`text-ink-400`,`hover:text-ink-100`,3,`click`],[1,`px-1`,`text-ink-600`],[1,`flex`,`items-center`,`gap-2`,`py-1.5`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`],[1,`min-w-0`,`flex-1`,`truncate`,`text-ink-200`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`,3,`click`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(n.open,l)||(n.open=l),l}),_m(1,it,21,9,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function ot(i,t){if(i&1&&(Oi(0,`p`,10),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().taken)}}function at(i,t){if(i&1&&(Oi(0,`p`,11),fk(1),Nc()),i&2){let e=HE(2);ec(),Ac(` `,e.t().running(e.running().join(`, `)),` `)}}function rt(i,t){if(i&1&&(Oi(0,`p`,12),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().stopped(e.users().join(`, `)))}}function lt(i,t){i&1&&(Oi(0,`p`,13),fk(1),Nc()),i&2&&(ec(),pg(t))}function st(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`label`,7)(8,`span`,8),fk(9),Nc(),Oi(10,`input`,9),Jm(`input`,function(s){Ld(e);return Od(HE().target.set(s.target.value))}),Nc()(),kE(11,ot,2,1,`p`,10),kE(12,at,2,1,`p`,11)(13,rt,2,1,`p`,12),kE(14,lt,2,1,`p`,13),Oi(15,`div`,14)(16,`button`,15),Gm(17,`app-icon`,16),fk(18),Nc(),Oi(19,`button`,17),Jm(`click`,function(){Ld(e);return Od(HE().copy())}),Gm(20,`app-icon`,18),fk(21),Nc()()()()}if(i&2){let e,n=HE();ec(4),pg(n.t().title(n.volume())),ec(2),pg(n.t().description),ec(3),pg(n.t().name),ec(),nk(n.field+` mt-1.5`),Wm(`value`,n.target()),ec(),SE(n.taken()?11:-1),ec(),SE(n.running().length>0?12:n.users().length>0?13:-1),ec(2),SE((e=n.problem())?14:-1,e),ec(3),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `),ec(),Wm(`disabled`,n.copying()||n.taken()||n.target().trim()===``),ec(),Wm(`size`,14),ec(),Ac(` `,n.copying()?n.t().copying:n.t().copy,` `)}}var pt;var ee;var ke=f(()=>{Kr();Je$1();lS();B();sS();dS();f$1();Kr();pt=`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`,ee=class i{open=mj(!1);volume=jc.required();store=C(w);toast=C(u);t=Ot(()=>oS().volumes.copy);common=Ot(()=>oS().common);field=pt;target=wt(``);copying=wt(!1);problem=wt(null);userList=wt([]);running=Ot(()=>this.userList().filter(t=>t.running).map(t=>t.name));users=Ot(()=>this.userList().map(t=>t.name));taken=Ot(()=>this.store.volumes().some(t=>t.name===this.target().trim()));constructor(){rf(()=>{if(!this.open())return;let t=this.volume();Tg(()=>{this.target.set(`${t}-kopie`),this.problem.set(null),this.loadUsers(t)})})}async copy(){let t=this.target().trim();this.copying.set(!0),this.problem.set(null);try{let e=await window.electron.volumes.copy(this.volume(),t);e.ok?(this.toast.success(this.t().copied(this.volume(),t)),this.store.refresh(),this.open.set(!1)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.copying.set(!1)}}async loadUsers(t){this.userList.set([]);try{this.userList.set(await window.electron.volumes.users(t))}catch{}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-copy-volume-dialog`]],inputs:{open:[1,`open`],volume:[1,`volume`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`copy-volume-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`,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`data-testid`,`copy-volume-name`,3,`input`,`value`],[`data-testid`,`copy-volume-taken`,1,`mt-2`,`text-[12px]`,`text-danger`],[`data-testid`,`copy-volume-running`,1,`mt-3`,`rounded-md`,`border`,`border-warn/40`,`bg-warn/10`,`px-3`,`py-2`,`text-[12px]`,`text-ink-200`],[1,`mt-3`,`text-[12px]`,`text-ink-500`],[`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`,`copy-volume-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`copy`,3,`size`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(n.open,l)||(n.open=l),l}),_m(1,st,22,14,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function mt(i,t){if(i&1&&(Oi(0,`span`,7),fk(1),Nc()),i&2){let e=HE();ec(),Ac(`· `,e.t().calculating)}}function dt(i,t){if(i&1&&(Oi(0,`span`,17),fk(1),Nc()),i&2){let e=HE();ec(),pg(e.t().refreshing)}}function ct(i,t){if(i&1){let e=$E();Oi(0,`div`,19)(1,`span`,31),fk(2),Nc(),Oi(3,`button`,32),Jm(`click`,function(){Ld(e);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,33),fk(5),Nc()()}if(i&2){let e=HE();ec(2),pg(e.t().selected(e.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,e.common().remove,` `)}}function ut(i,t){if(i&1&&(Oi(0,`div`,35),fk(1),Nc()),i&2){let e=HE().$implicit;ec(),pg(e.composeProject)}}function gt(i,t){if(i&1&&(Oi(0,`div`,34),fk(1),Nc(),kE(2,ut,2,1,`div`,35)),i&2){let e=t.$implicit;Wm(`title`,e.mountpoint),ec(),pg(e.name),ec(),SE(e.composeProject?2:-1)}}function _t(i,t){if(i&1&&(Oi(0,`span`,36),fk(1),Nc()),i&2){let e=t.$implicit;ec(),pg(e.driver)}}function yt(i,t){if(i&1&&(Oi(0,`span`,37),fk(1),Nc()),i&2){let e=HE().$implicit,n=HE();ec(),pg(n.t().containerCount(e.inUseBy))}}function xt(i,t){i&1&&(Oi(0,`span`,38),fk(1,`—`),Nc())}function ft(i,t){if(i&1&&kE(0,yt,2,1,`span`,37)(1,xt,2,0,`span`,38),i&2){let e=t.$implicit;SE(e.inUseBy>0?0:1)}}function bt(i,t){if(i&1&&(Oi(0,`span`,39),fk(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.ageOf(e.createdAt))}}function vt(i,t){if(i&1&&(Oi(0,`span`,40),fk(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.sizeOf(e.sizeBytes))}}function ht(i,t){if(i&1){let e=$E();Oi(0,`div`,41)(1,`app-action-menu`,42),Jm(`picked`,function(s){let l=Ld(e).$implicit;return Od(HE().onRowMenu(s,l))}),Nc()()}if(i&2){let e=t.$implicit,n=HE();ec(),Wm(`label`,n.t().rowMenu(e.name))(`items`,n.rowMenu(e))}}var we;f(()=>{Kr();h();M();B();G();J();oe();K();dS();x();he();sS();Ce();ke();ra();o();Kr();we=class i$1{store=C(w);preferences=C(p);t=Ot(()=>oS().volumes);common=Ot(()=>oS().common);columns=Ot(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`inUse`,label:t.inUse,width:`110px`},{key:`created`,label:t.created,width:`150px`},{key:`size`,label:t.size,width:`100px`,align:`right`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;loadingSizes=this.store.loadingSizes;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);onlyUnused=this.preferences.flag(`volumes.onlyUnused`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);browseOpen=wt(!1);copyOpen=wt(!1);copyVolume=wt(``);browseVolume=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),e=this.onlyUnused();return this.store.volumes().filter(n=>e&&n.inUseBy>0?!1:t===``||n.name.toLowerCase().includes(t))});totalSize=Ot(()=>d(this.store.totalBytes()));trackKey=t=>t.name;inkijk=jc(void 0);bewaar=jc(void 0);router=C(fe);route=C(Q);constructor(){rf(()=>{let t=this.inkijk();t!==void 0&&Tg(()=>{this.browseVolume.set(t),this.browseOpen.set(!0),i(this.router,this.route,`inkijk`)})}),rf(()=>{let t=this.bewaar(),e=this.store.volumes().find(n=>n.name===t);t!==void 0&&e!==void 0&&Tg(()=>{this.backup(e),i(this.router,this.route,`bewaar`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}sizeOf(t){return t===null?`—`:d(t)}ageOf(t){return t===0?`—`:N(t)}removalReason(t){return t.inUseBy>0?this.t().inUseReason(t.inUseBy):this.common().remove}backup(t){this.store.backup(t.name)}backupTitle(t){return t.inUseBy>0?this.t().backupTitleInUse(t.name):this.t().backupTitle(t.name)}rowMenu(t){let e=this.pending().has(t.name),n=this.t();return[{id:`browse`,label:n.rowBrowse,icon:`folder`,disabled:e},{id:`backup`,label:n.rowBackup,icon:`download`,disabled:e,hint:this.backupTitle(t)},{id:`restore`,label:n.rowRestore,icon:`upload`,disabled:e,hint:n.restoreTitle(t.name)},{id:`copy`,label:n.rowCopy,icon:`copy`,disabled:e},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:e||t.inUseBy>0,danger:!0,separated:!0,hint:this.removalReason(t)}]}onRowMenu(t,e){t===`browse`?(this.browseVolume.set(e.name),this.browseOpen.set(!0)):t===`backup`?this.backup(e):t===`restore`?this.askRestore(e):t===`copy`?(this.copyVolume.set(e.name),this.copyOpen.set(!0)):this.askRemove(e)}askRestore(t){let e=this.t().restore;this.action.set({names:[t.name],title:e.title(t.name),description:e.description(t.inUseBy),confirmLabel:e.confirm,all:!1,restore:!0}),this.confirmOpen.set(!0)}askRemove(t){let e=this.t().remove;this.action.set({names:[t.name],title:e.title,description:e.description(t.name),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],e=this.t().remove;this.action.set({names:t,title:e.manyTitle,description:e.manyDescription(t.length),confirmLabel:this.common().remove,all:!1}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-anonymous`,label:this.t().menu.pruneAnonymous,icon:`broom`,separated:!0},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune(t===`prune-unused`)}askPrune(t){let e=this.t().prune;this.action.set({names:[],title:t?e.allTitle:e.anonymousTitle,description:t?e.allDescription:e.anonymousDescription,confirmLabel:e.confirm,all:t}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.restore===!0?this.store.restore(t.names[0]):t.names.length===0?this.store.prune(t.all):(this.store.removeMany(t.names,!1),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){let t=this.action();return t?.restore===!0?`upload`:t?.names.length===0?`broom`:`trash`}static ɵfac=function(e){return new(e||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-volumes-page`]],inputs:{zoek:[1,`zoek`],inkijk:[1,`inkijk`],bewaar:[1,`bewaar`]},decls:43,vars:32,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`text-[12px]`,`font-normal`,`text-ink-500`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`volume`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(e,n){e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fk(5),Nc(),Oi(6,`div`,4)(7,`div`)(8,`div`,5),fk(9),Nc(),Oi(10,`div`,6),fk(11),kE(12,mt,2,1,`span`,7),Nc()(),Oi(13,`div`)(14,`div`,5),fk(15),Nc(),Oi(16,`div`,6),fk(17),Nc()()()(),Oi(18,`div`,8)(19,`app-action-menu`,9),Jm(`picked`,function(l){return n.onMenu(l)}),Nc()()(),Oi(20,`div`,10)(21,`label`,11)(22,`span`,12),Gm(23,`app-icon`,13),Nc(),Oi(24,`span`,14),fk(25),Nc(),Oi(26,`input`,15),Jm(`input`,function(l){return n.search.set(l.target.value)}),Nc()(),Oi(27,`app-filter-switch`,16),vg(`onChange`,function(l){return vk(n.onlyUnused,l)||(n.onlyUnused=l),l}),Nc(),kE(28,dt,2,1,`span`,17),Nc(),Gm(29,`app-page-messages`,18),kE(30,ct,6,3,`div`,19),Nc(),Oi(31,`div`,20)(32,`app-data-table`,21),vg(`selectedChange`,function(l){return vk(n.selected,l)||(n.selected=l),l}),_m(33,gt,3,3,`ng-template`,22)(34,_t,2,1,`ng-template`,23)(35,ft,2,1,`ng-template`,24)(36,bt,2,1,`ng-template`,25)(37,vt,2,1,`ng-template`,26)(38,ht,2,2,`ng-template`,27),Nc()()(),Oi(39,`app-create-volume-dialog`,28),vg(`openChange`,function(l){return vk(n.createOpen,l)||(n.createOpen=l),l}),Nc(),Oi(40,`app-volume-browser-dialog`,29),vg(`openChange`,function(l){return vk(n.browseOpen,l)||(n.browseOpen=l),l}),Nc(),Oi(41,`app-copy-volume-dialog`,29),vg(`openChange`,function(l){return vk(n.copyOpen,l)||(n.copyOpen=l),l}),Nc(),Oi(42,`app-confirm-dialog`,30),vg(`openChange`,function(l){return vk(n.confirmOpen,l)||(n.confirmOpen=l),l}),Jm(`confirmed`,function(){return n.confirm()}),Nc()),e&2&&(ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),Ac(` `,n.totalSize(),` `),ec(),SE(n.loadingSizes()?12:-1),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),SE(n.loading()?28:-1),ec(),Wm(`problem`,n.problem()),ec(),SE(n.selected().size>0?30:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(7),hg(`open`,n.createOpen),ec(),hg(`open`,n.browseOpen),Wm(`volume`,n.browseVolume()),ec(),hg(`open`,n.copyOpen),Wm(`volume`,n.copyVolume()),ec(),hg(`open`,n.confirmOpen),Wm(`title`,n.actionTitle())(`description`,n.actionDescription())(`confirmLabel`,n.actionConfirmLabel())(`confirmIcon`,n.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u$1,P,V,Y,Z,ee],encapsulation:2})}})();export{we as VolumesPage};
@@ -0,0 +1,6 @@
1
+ import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,Cr as yk,D as Gm,Dn as kE,Fn as mj,Ft as Wr,Gn as pg,Gt as _m,H as Ld,K as My,Kn as pj,Nt as W,On as kc,Pn as mg,Pt as Wm,Qt as bg,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt$1,cn as f,cr as ve,dr as vk,en as bk,et as Od,f as C,fn as fk,hr as wc,ht as Sc,jn as lS,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,qn as qr,qt as ag,rn as dS,rt as Ot$1,sn as ec,t as $E,tt as Oi,u as Br,w as G,xn as hg,xt as Tc,z as Km}from"./chunk-CpIMiI_l.js";import{n as j,r as w,t as C$1}from"./chunk-k-zsJmvX.js";import"./chunk-CphQt55R.js";import{n as p,t as g}from"./chunk-BpQVP_gf.js";import"./chunk-DS3iAefP.js";import{n as o,t as i}from"./chunk-DNfiG-TG.js";import"./chunk-gHmeiJFn.js";import"./chunk-xmDwFpQl.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-DdTfHpyK.js";import{n as v,t as u}from"./chunk-Cau4mGeC.js";import{n as x,t as u$1}from"./chunk-CpNGhf9S.js";import{a as Yt,r as Q,s as fe,u as ra}from"./chunk-B1xjyPnV.js";import{n as V,t as G$1}from"./chunk-C7c_wFw-.js";import{n as W$1,t as J}from"./chunk-D5njuWRz.js";import{n as c,t as b}from"./chunk-75uKIulV.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))}),fk(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(),Ac(` `,e===`raw`?i.t().raw:i.t().resolved,` `)}}function Je(n,t){n&1&&(Oi(0,`pre`,9),fk(1),Nc()),n&2&&(ec(),pg(t))}function Xe(n,t){n&1&&(Oi(0,`p`,10),fk(1),Nc()),n&2&&(ec(),pg(t))}function Ye(n,t){if(n&1&&(Oi(0,`p`,11),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function Ze(n,t){n&1&&(Oi(0,`span`,13),fk(1),Nc()),n&2&&(ec(),pg(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),fk(4),Nc(),Oi(5,`p`,6),fk(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),fk(17),Nc(),Oi(18,`button`,16),Jm(`click`,function(){Ld(e);return Od(HE().copy())}),Gm(19,`app-icon`,17),fk(20),Nc()()()()}if(n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),Ac(` `,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(),Ac(` `,o.common().close,` `),ec(),Wm(`disabled`,o.body()===null),ec(),Wm(`name`,o.copied()?`check`:`copy`)(`size`,14),ec(),Ac(` `,o.copied()?o.common().copied:o.common().copy,` `)}}var se;var Be=f(()=>{Kr();Je$1();lS();dS();sS();Kr();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(){rf(()=>{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}
2
+ ${e.problem??(e.content.trim()===``?this.t().empty:e.content)}`).join(`
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),fk(1),Wr()),n&2){let e=HE();ec(),pg(e.t().done(e.service()))}}function nt(n,t){if(n&1&&(qr(0,`p`,2),fk(1),Wr()),n&2){let e=HE();ec(),pg(e.problem())}}function it(n,t){if(n&1&&(qr(0,`details`,3)(1,`summary`,4),fk(2),Wr(),qr(3,`pre`,5),fk(4),Wr()()),n&2){let e=HE();Km(`open`,!e.result().ok),ec(2),pg(e.t().output),ec(2),pg(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 A;var L;var _e=f(()=>{Kr();lS();sS();dS();Kr();A=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=pj();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),fk(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(),Ac(` `,i.busy()?i.t().busy:i.t().button,` `),ec(),SE((o=i.showResult()&&i.result())?3:-1,o)}},dependencies:[My,A],encapsulation:2})}});function lt(n,t){if(n&1&&(Oi(0,`p`,7),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function dt(n,t){if(n&1&&(Oi(0,`li`,14),Gm(1,`app-icon`,16),Oi(2,`span`,17),fk(3),Nc(),Oi(4,`span`,18),fk(5),Nc(),Oi(6,`span`,19),fk(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(),pg(e.reference),ec(2),pg(e.services.join(`, `)),ec(),nk(e.state===`failed`?`text-danger`:`text-ink-400`),Wm(`title`,e.problem??``),ec(),Ac(` `,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),fk(4),Nc(),Oi(5,`span`,22),fk(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),pg(e.service),ec(2),pg(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),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().noImages)}}function ut(n,t){n&1&&(Oi(0,`p`,9),fk(1),Nc()),n&2&&(ec(),pg(t))}function gt(n,t){if(n&1&&(Oi(0,`p`,7),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().checking)}}function _t(n,t){if(n&1&&(Oi(0,`p`,24),Gm(1,`app-icon`,25),fk(2),Nc()),n&2){let e=HE(3);ec(),Wm(`size`,13),ec(),Ac(` `,e.t().upToDate)}}function xt(n,t){if(n&1&&(Oi(0,`p`,28),fk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().renewed(e.renewed.join(`, `)))}}function ft(n,t){if(n&1&&(Oi(0,`p`,29),fk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().unchanged(e.unchanged.join(`, `)))}}function yt(n,t){if(n&1&&(Oi(0,`p`,30),fk(1),Nc()),n&2){let e=t.$implicit;ec(),pg(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),fk(3),Nc(),Oi(4,`span`,33),fk(5),Nc()()}if(n&2){let e=HE(4);ec(),Wm(`disabled`,e.phase()===`renewing`),ec(),Wm(`size`,14),ec(),Ac(` `,e.phase()===`renewing`?e.t().renewing:e.t().renew,` `),ec(2),pg(e.t().renewHint)}}function ht(n,t){if(n&1&&(Oi(0,`p`,26),fk(1),Nc(),kE(2,bt,4,2)(3,vt,6,4,`div`,27)),n&2){let e,i=HE(),o=HE(2);ec(),pg(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),fk(4),Nc(),Oi(5,`p`,6),fk(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),fk(16),Nc()()()()),n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),pg(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(),Ac(` `,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=f(()=>{Kr();Je$1();lS();sS();dS();_e();Kr();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()),rf(()=>{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(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,G=>{if(!G.done){i({percent:Dt(G)});return}i(G.problem===null?{state:`done`,percent:null}:{state:`failed`,problem:G.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),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.version)}}function Et(n,t){if(n&1&&(Oi(0,`div`,16),fk(1),Nc()),n&2){let e=HE();ec(),pg(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),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.t().updating)}}function It(n,t){if(n&1&&(Oi(0,`span`,23),fk(1),Nc()),n&2){let e=t;Wm(`title`,e),ec(),pg(e)}}function Rt(n,t){if(n&1&&(Oi(0,`div`,26),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().busy)}}function Ft(n,t){if(n&1&&(Oi(0,`div`,27),Gm(1,`app-icon`,30),fk(2),Nc()),n&2){let e=HE().$implicit,i=HE();Br(`data-testid`,`compose-missing-`+e.name),ec(),Wm(`size`,12),ec(),Ac(` `,i.t().missing,` `)}}function Nt(n,t){if(n&1&&(Oi(0,`div`,31),Gm(1,`app-icon`,32),fk(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(),Ac(` `,e.text,` `)}}function Bt(n,t){if(n&1&&(Oi(0,`span`,36),fk(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(),pg(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),fk(1),Nc()),n&2){let e=t.$implicit;ec(),Ac(` `,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),fk(3),Nc(),Oi(4,`span`,44),fk(5),Nc(),Oi(6,`span`,45),fk(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(),pg(e.name),ec(2),pg(e.status),ec(2),pg(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),fk(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),fk(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),pg(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(),Ac(` `,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),fk(7),Nc()(),Oi(8,`span`,22),fk(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),pg(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),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}var kt;var $e;var Pt;var jt;var ze;f(()=>{Kr();ra();C$1();g();v();sS();J();dS();x();b();Be();Oe();_e();G$1();o();Kr();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);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);router=C(fe);route=C(Q);constructor(){this.containers.refresh(),this.compose.loadStatus(),this.compose.loadKnown(),rf(()=>{let t=this.bestand();t!==void 0&&Tg(()=>{this.fileProject.set(t),this.fileOpen.set(!0),i(this.router,this.route,`bestand`)})}),rf(()=>{let t=this.projectKey(),e=this.status()?.cliAvailable;t!==``&&e===!0&&Tg(()=>t.split(`
6
+ `).forEach(i=>{this.checkDrift(i),this.loadBuildable(i)}))}),rf(()=>{let t=this.bijwerken();t!==void 0&&Tg(()=>{this.openUpdate(t),i(this.router,this.route,`bijwerken`)})}),rf(()=>{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`]},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),fk(5),Nc(),Oi(6,`p`,4),fk(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),fk(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),pg(i.t().title),ec(2),pg(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(),Ac(` `,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,A,V],encapsulation:2})}})();export{ze as ComposePage};
@@ -0,0 +1 @@
1
+ import{Nt as W,cn as f,w as G}from"./chunk-CpIMiI_l.js";function y(i,t){return i===0?`stopped`:i===t?`running`:`partial`}function j(i){let t=new Map;for(let r of i){if(r.composeProject===null)continue;let o=t.get(r.composeProject);o===void 0?t.set(r.composeProject,[r]):o.push(r)}let c=[];for(let[r,o]of t){let e=new Map;for(let n of o){let a=n.composeService??n.name,m=e.get(a);m===void 0?e.set(a,[n]):m.push(n)}let s=[...e.entries()].map(([n,a])=>({name:n,containers:[...a].sort((m,d)=>m.name.localeCompare(d.name))})).sort((n,a)=>n.name.localeCompare(a.name)),l=o.filter(n=>n.state===`running`).length,p=o.find(n=>n.composeWorkingDir!==null);c.push({name:r,workingDir:p?.composeWorkingDir??null,configFiles:p?.composeConfigFiles??[],services:s,containerIds:o.map(n=>n.id),total:o.length,running:l,state:y(l,o.length),missing:!1})}return c.sort((r,o)=>r.name.localeCompare(o.name))}function w(i,t){let c=new Map(t.map(e=>[e.name,e])),r=i.map(e=>{let s=c.get(e.name);return e.workingDir===null&&s!==void 0?G(W({},e),{workingDir:s.workingDir,configFiles:s.configFiles}):e}),o=new Set(i.map(e=>e.name));for(let e of t)o.has(e.name)||r.push({name:e.name,workingDir:e.workingDir,configFiles:e.configFiles,services:[],containerIds:[],total:0,running:0,state:`down`,missing:e.missing});return r.sort((e,s)=>e.name.localeCompare(s.name))}var C=f(()=>{});export{j as n,w as r,C as t};
@@ -1,5 +1,5 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,D as Gm,Dn as kc,En as kE,Gt as _m,H as Ld,J as Nc,K as My,Pt as Wm,R as Jm,St as Tc,Tn as jc,Wn as pg,Wt as _S,bt as TE,cn as f,et as Od,gr as wt,gt as SS,ht as SE,l as BE,ln as fS,mr as wc,o as Ac,rn as dk,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,ut as Qm}from"./chunk-BdOOWVGY.js";import{i as Ie,o as Ne}from"./chunk-D29s9m84.js";function $(e){let n=[],t=0;for(let i of e.matchAll(ie))i.index>t&&n.push({kind:`text`,text:e.slice(t,i.index)}),n.push(i[1]===void 0?{kind:`bold`,text:i[2]??i[3]??``}:{kind:`code`,text:i[1]}),t=i.index+i[0].length;return t<e.length&&n.push({kind:`text`,text:e.slice(t)}),n}function Q(e){let n=e.replace(/\r\n?/g,`
1
+ import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,D as Gm,Dn as kE,Gn as pg,Gt as _m,H as Ld,K as My,Pt as Wm,R as Jm,Tn as jc,Wt as _k,_r as wt,cn as f,et as Od,fn as fk,hr as wc,ht as Sc,l as BE,mt as SE,o as Ac,q as Nc,rn as dS,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,ut as Qm,xt as Tc,yt as TE}from"./chunk-CpIMiI_l.js";import{i as Ie,o as Ne}from"./chunk-DS3iAefP.js";function $(e){let n=[],t=0;for(let i of e.matchAll(ie))i.index>t&&n.push({kind:`text`,text:e.slice(t,i.index)}),n.push(i[1]===void 0?{kind:`bold`,text:i[2]??i[3]??``}:{kind:`code`,text:i[1]}),t=i.index+i[0].length;return t<e.length&&n.push({kind:`text`,text:e.slice(t)}),n}function Q(e){let n=e.replace(/\r\n?/g,`
2
2
  `).split(`
3
3
  `),t=[],i=[],o=null,a=()=>{i.length>0&&(t.push({kind:`paragraph`,inlines:$(i.join(`
4
4
  `))}),i=[]),o!==null&&(t.push({kind:`list`,ordered:o.ordered,items:o.items.map($)}),o=null)};for(let p=0;p<n.length;p+=1){let d=n[p]??``,v=ee.exec(d);if(v!==null){a();let b=v[1]??"```",N=[];for(p+=1;p<n.length&&!oe(n[p]??``,b);)N.push(n[p]??``),p+=1;t.push({kind:`code`,language:v[2]??``,text:N.join(`
5
- `)});continue}if(d.trim()===``){a();continue}let E=te.exec(d);if(E!==null){a(),t.push({kind:`heading`,inlines:$(E[1]??``)});continue}let F=ne.exec(d);if(F!==null){let b=/\d/.test(F[1]??``);(i.length>0||o!==null&&o.ordered!==b)&&a(),o??={ordered:b,items:[]},o.items.push(F[2]??``);continue}if(o!==null&&/^\s/.test(d)&&o.items.length>0){o.items[o.items.length-1]+=` ${d.trim()}`;continue}o!==null&&a(),i.push(d)}return a(),t}function oe(e,n){let t=e.trim();return t.length>=n.length&&[...t].every(i=>i===n[0])}var ee;var te;var ne;var ie;var U=f(()=>{ee=/^ {0,3}(`{3,}|~{3,})\s*([\w+#.-]*)\s*$/,te=/^ {0,3}#{1,6}\s+(.*?)\s*#*\s*$/,ne=/^ {0,3}([-*+]|\d{1,3}[.)])\s+(.*)$/,ie=/`([^`\n]+)`|\*\*([^*\n]+?)\*\*|__([^_\n]+?)__/g});function re(e,n){if(e&1&&(Oi(0,`strong`,1),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function ae(e,n){if(e&1&&(Oi(0,`code`,2),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function le(e,n){if(e&1&&fS(0),e&2){let t=HE().$implicit;Ac(` `,t.text,` `)}}function ce(e,n){if(e&1&&SE(0,re,2,1,`strong`,1)(1,ae,2,1,`code`,2)(2,le,1,1),e&2){let t,i=n.$implicit;kE((t=i.kind)===`bold`?0:t===`code`?1:2)}}function se(e,n){if(e&1&&kc(0,ce,3,1,null,null,TE),e&2){let t=n.$implicit;Tc(t)}}function pe(e,n){e&1&&Qm(0)}function de(e,n){if(e&1&&(Oi(0,`p`,3),_m(1,pe,1,0,`ng-container`,5),Nc()),e&2){let t=HE().$implicit;HE();let i=BE(1);ec(),Wm(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,SS(2,I,t.inlines))}}function me(e,n){e&1&&Qm(0)}function _e(e,n){if(e&1&&(Oi(0,`p`,1),_m(1,me,1,0,`ng-container`,5),Nc()),e&2){let t=HE().$implicit;HE();let i=BE(1);ec(),Wm(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,SS(2,I,t.inlines))}}function xe(e,n){e&1&&Qm(0)}function ue(e,n){if(e&1&&(Oi(0,`li`),_m(1,xe,1,0,`ng-container`,5),Nc()),e&2){let t=n.$implicit,i=HE(4),o=BE(1);ec(),Wm(`ngTemplateOutlet`,o)(`ngTemplateOutletContext`,SS(2,I,i.asInlines(t)))}}function ye(e,n){if(e&1&&(Oi(0,`ol`,6),kc(1,ue,2,4,`li`,null,TE),Nc()),e&2){let t=HE(2).$implicit;ec(),Tc(t.items)}}function ge(e,n){e&1&&Qm(0)}function fe(e,n){if(e&1&&(Oi(0,`li`),_m(1,ge,1,0,`ng-container`,5),Nc()),e&2){let t=n.$implicit,i=HE(4),o=BE(1);ec(),Wm(`ngTemplateOutlet`,o)(`ngTemplateOutletContext`,SS(2,I,i.asInlines(t)))}}function Ce(e,n){if(e&1&&(Oi(0,`ul`,7),kc(1,fe,2,4,`li`,null,TE),Nc()),e&2){let t=HE(2).$implicit;ec(),Tc(t.items)}}function Te(e,n){if(e&1&&SE(0,ye,3,0,`ol`,6)(1,Ce,3,0,`ul`,7),e&2){let t=HE().$implicit;kE(t.ordered?0:1)}}function be(e,n){if(e&1){let t=$E();Oi(0,`div`,4)(1,`pre`,8),fS(2),Nc(),Oi(3,`button`,9),Jm(`click`,function(){Ld(t);let o=HE(),a=o.$implicit,p=o.$index;return Od(HE().copy(p,a.text))}),Gm(4,`app-icon`,10),Nc()()}if(e&2){let t=HE(),i=t.$implicit,o=t.$index,a=HE();ec(2),pg(i.text),ec(),Wm(`title`,a.copiedIndex()===o?a.common().copied:a.common().copy),Br(`aria-label`,a.copiedIndex()===o?a.common().copied:a.common().copy),ec(),Wm(`name`,a.copiedIndex()===o?`check`:`copy`)(`size`,13)}}function ke(e,n){if(e&1&&SE(0,de,2,4,`p`,3)(1,_e,2,4,`p`,1)(2,Te,2,1)(3,be,5,5,`div`,4),e&2){let t,i=n.$implicit;kE((t=i.kind)===`paragraph`?0:t===`heading`?1:t===`list`?2:t===`code`?3:-1)}}var I;var W;var he=f(()=>{Ne();Kr();U();sk();dk();Kr();I=e=>({$implicit:e});W=class e{text=jc.required();blocks=Ot(()=>Q(this.text()));common=Ot(()=>ok().common);copiedIndex=wt(null);asInlines(n){return n}async copy(n,t){try{await navigator.clipboard.writeText(t),this.copiedIndex.set(n),setTimeout(()=>this.copiedIndex.update(i=>i===n?null:i),1500)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-answer-text`]],hostAttrs:[1,`block`,`space-y-2`],inputs:{text:[1,`text`]},decls:4,vars:0,consts:[[`line`,``],[1,`font-semibold`,`text-ink-100`],[1,`rounded`,`bg-ink-800`,`px-1`,`py-px`,`font-mono`,`text-[0.92em]`,`text-ink-100`],[1,`whitespace-pre-line`],[`data-testid`,`answer-code`,1,`relative`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`list-decimal`,`space-y-0.5`,`pl-5`],[1,`list-disc`,`space-y-0.5`,`pl-5`],[1,`overflow-x-auto`,`rounded-md`,`bg-ink-900`,`py-1.5`,`pr-9`,`pl-2`,`font-mono`,`text-[12px]`,`leading-snug`,`text-ink-100`],[`type`,`button`,`data-testid`,`answer-copy`,1,`mx-focus`,`absolute`,`top-1`,`right-1`,`rounded`,`p-1`,`text-ink-400`,`hover:bg-ink-800`,`hover:text-ink-100`,3,`click`,`title`],[3,`name`,`size`]],template:function(t,i){t&1&&(_m(0,se,2,0,`ng-template`,null,0,_S),kc(2,ke,4,1,null,null,TE)),t&2&&(ec(2),Tc(i.blocks()))},dependencies:[My,Ie],encapsulation:2})}});export{he as n,W as t};
5
+ `)});continue}if(d.trim()===``){a();continue}let E=te.exec(d);if(E!==null){a(),t.push({kind:`heading`,inlines:$(E[1]??``)});continue}let F=ne.exec(d);if(F!==null){let b=/\d/.test(F[1]??``);(i.length>0||o!==null&&o.ordered!==b)&&a(),o??={ordered:b,items:[]},o.items.push(F[2]??``);continue}if(o!==null&&/^\s/.test(d)&&o.items.length>0){o.items[o.items.length-1]+=` ${d.trim()}`;continue}o!==null&&a(),i.push(d)}return a(),t}function oe(e,n){let t=e.trim();return t.length>=n.length&&[...t].every(i=>i===n[0])}var ee;var te;var ne;var ie;var U=f(()=>{ee=/^ {0,3}(`{3,}|~{3,})\s*([\w+#.-]*)\s*$/,te=/^ {0,3}#{1,6}\s+(.*?)\s*#*\s*$/,ne=/^ {0,3}([-*+]|\d{1,3}[.)])\s+(.*)$/,ie=/`([^`\n]+)`|\*\*([^*\n]+?)\*\*|__([^_\n]+?)__/g});function re(e,n){if(e&1&&(Oi(0,`strong`,1),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function ae(e,n){if(e&1&&(Oi(0,`code`,2),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function le(e,n){if(e&1&&fk(0),e&2){let t=HE().$implicit;Ac(` `,t.text,` `)}}function ce(e,n){if(e&1&&kE(0,re,2,1,`strong`,1)(1,ae,2,1,`code`,2)(2,le,1,1),e&2){let t,i=n.$implicit;SE((t=i.kind)===`bold`?0:t===`code`?1:2)}}function se(e,n){if(e&1&&Sc(0,ce,3,1,null,null,TE),e&2){let t=n.$implicit;Tc(t)}}function pe(e,n){e&1&&Qm(0)}function de(e,n){if(e&1&&(Oi(0,`p`,3),_m(1,pe,1,0,`ng-container`,5),Nc()),e&2){let t=HE().$implicit;HE();let i=BE(1);ec(),Wm(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,kk(2,I,t.inlines))}}function me(e,n){e&1&&Qm(0)}function _e(e,n){if(e&1&&(Oi(0,`p`,1),_m(1,me,1,0,`ng-container`,5),Nc()),e&2){let t=HE().$implicit;HE();let i=BE(1);ec(),Wm(`ngTemplateOutlet`,i)(`ngTemplateOutletContext`,kk(2,I,t.inlines))}}function xe(e,n){e&1&&Qm(0)}function ue(e,n){if(e&1&&(Oi(0,`li`),_m(1,xe,1,0,`ng-container`,5),Nc()),e&2){let t=n.$implicit,i=HE(4),o=BE(1);ec(),Wm(`ngTemplateOutlet`,o)(`ngTemplateOutletContext`,kk(2,I,i.asInlines(t)))}}function ye(e,n){if(e&1&&(Oi(0,`ol`,6),Sc(1,ue,2,4,`li`,null,TE),Nc()),e&2){let t=HE(2).$implicit;ec(),Tc(t.items)}}function ge(e,n){e&1&&Qm(0)}function fe(e,n){if(e&1&&(Oi(0,`li`),_m(1,ge,1,0,`ng-container`,5),Nc()),e&2){let t=n.$implicit,i=HE(4),o=BE(1);ec(),Wm(`ngTemplateOutlet`,o)(`ngTemplateOutletContext`,kk(2,I,i.asInlines(t)))}}function Ce(e,n){if(e&1&&(Oi(0,`ul`,7),Sc(1,fe,2,4,`li`,null,TE),Nc()),e&2){let t=HE(2).$implicit;ec(),Tc(t.items)}}function Te(e,n){if(e&1&&kE(0,ye,3,0,`ol`,6)(1,Ce,3,0,`ul`,7),e&2){let t=HE().$implicit;SE(t.ordered?0:1)}}function be(e,n){if(e&1){let t=$E();Oi(0,`div`,4)(1,`pre`,8),fk(2),Nc(),Oi(3,`button`,9),Jm(`click`,function(){Ld(t);let o=HE(),a=o.$implicit,p=o.$index;return Od(HE().copy(p,a.text))}),Gm(4,`app-icon`,10),Nc()()}if(e&2){let t=HE(),i=t.$implicit,o=t.$index,a=HE();ec(2),pg(i.text),ec(),Wm(`title`,a.copiedIndex()===o?a.common().copied:a.common().copy),Br(`aria-label`,a.copiedIndex()===o?a.common().copied:a.common().copy),ec(),Wm(`name`,a.copiedIndex()===o?`check`:`copy`)(`size`,13)}}function ke(e,n){if(e&1&&kE(0,de,2,4,`p`,3)(1,_e,2,4,`p`,1)(2,Te,2,1)(3,be,5,5,`div`,4),e&2){let t,i=n.$implicit;SE((t=i.kind)===`paragraph`?0:t===`heading`?1:t===`list`?2:t===`code`?3:-1)}}var I;var W;var he=f(()=>{Ne();Kr();U();sS();dS();Kr();I=e=>({$implicit:e});W=class e{text=jc.required();blocks=Ot(()=>Q(this.text()));common=Ot(()=>oS().common);copiedIndex=wt(null);asInlines(n){return n}async copy(n,t){try{await navigator.clipboard.writeText(t),this.copiedIndex.set(n),setTimeout(()=>this.copiedIndex.update(i=>i===n?null:i),1500)}catch{}}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-answer-text`]],hostAttrs:[1,`block`,`space-y-2`],inputs:{text:[1,`text`]},decls:4,vars:0,consts:[[`line`,``],[1,`font-semibold`,`text-ink-100`],[1,`rounded`,`bg-ink-800`,`px-1`,`py-px`,`font-mono`,`text-[0.92em]`,`text-ink-100`],[1,`whitespace-pre-line`],[`data-testid`,`answer-code`,1,`relative`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`list-decimal`,`space-y-0.5`,`pl-5`],[1,`list-disc`,`space-y-0.5`,`pl-5`],[1,`overflow-x-auto`,`rounded-md`,`bg-ink-900`,`py-1.5`,`pr-9`,`pl-2`,`font-mono`,`text-[12px]`,`leading-snug`,`text-ink-100`],[`type`,`button`,`data-testid`,`answer-copy`,1,`mx-focus`,`absolute`,`top-1`,`right-1`,`rounded`,`p-1`,`text-ink-400`,`hover:bg-ink-800`,`hover:text-ink-100`,3,`click`,`title`],[3,`name`,`size`]],template:function(t,i){t&1&&(_m(0,se,2,0,`ng-template`,null,0,_k),Sc(2,ke,4,1,null,null,TE)),t&2&&(ec(2),Tc(i.blocks()))},dependencies:[My,Ie],encapsulation:2})}});export{he as n,W as t};