docker-client-mx 1.39.0 → 1.41.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 (94) hide show
  1. package/dist/docker-desktop-mx/browser/chunk--cESao082.js +6 -0
  2. package/dist/docker-desktop-mx/browser/{chunk-DieHqkfe.js → chunk-3ILJfWKv.js} +1 -1
  3. package/dist/docker-desktop-mx/browser/chunk-6D7_x-nR.js +1 -0
  4. package/dist/docker-desktop-mx/browser/chunk-B4eF6Vif2.js +1 -0
  5. package/dist/docker-desktop-mx/browser/chunk-B8Y30jEA.js +1 -0
  6. package/dist/docker-desktop-mx/browser/{chunk-CG34bAfY.js → chunk-BFURpTzq.js} +1 -1
  7. package/dist/docker-desktop-mx/browser/chunk-BGRmfw3c.js +1 -0
  8. package/dist/docker-desktop-mx/browser/{chunk-BgPEkm-o.js → chunk-BSE5rhLU.js} +1 -1
  9. package/dist/docker-desktop-mx/browser/chunk-BV3brnpk.js +1 -0
  10. package/dist/docker-desktop-mx/browser/chunk-BX2-Fi-r.js +1 -0
  11. package/dist/docker-desktop-mx/browser/chunk-B_tQwhwm.js +1 -0
  12. package/dist/docker-desktop-mx/browser/chunk-BjgRfCzM2.js +3 -0
  13. package/dist/docker-desktop-mx/browser/chunk-Bz7JmGk-.js +1 -0
  14. package/dist/docker-desktop-mx/browser/chunk-C3aJtPX1.js +1 -0
  15. package/dist/docker-desktop-mx/browser/chunk-CKpDvmRb.js +1 -0
  16. package/dist/docker-desktop-mx/browser/{chunk-Dw1WSpzf.js → chunk-CMjDdCPI.js} +1 -1
  17. package/dist/docker-desktop-mx/browser/{chunk-BxCMq76L.js → chunk-CRyY-2KM.js} +1 -1
  18. package/dist/docker-desktop-mx/browser/chunk-CTthjUi7.js +1 -0
  19. package/dist/docker-desktop-mx/browser/{chunk-CGtoxp5M.js → chunk-Cg-fuusV.js} +1 -1
  20. package/dist/docker-desktop-mx/browser/{chunk-BpGvpxhZ.js → chunk-CkcnVcC4.js} +1 -1
  21. package/dist/docker-desktop-mx/browser/{chunk-BWEbjl8i.js → chunk-Ckdb4U3d.js} +1 -1
  22. package/dist/docker-desktop-mx/browser/{chunk-D1Z6IQ-O.js → chunk-CxAIbp2c.js} +1 -1
  23. package/dist/docker-desktop-mx/browser/{chunk-S9IeOMe4.js → chunk-DCF2sSJN.js} +1 -1
  24. package/dist/docker-desktop-mx/browser/chunk-DCp2SePu.js +1 -0
  25. package/dist/docker-desktop-mx/browser/chunk-DEE8TVR7.js +1 -0
  26. package/dist/docker-desktop-mx/browser/{chunk-zFBXm_xf2.js → chunk-DFixEhGx.js} +1 -1
  27. package/dist/docker-desktop-mx/browser/{chunk-nJjV_Xqa.js → chunk-DHIpfbHl.js} +1 -1
  28. package/dist/docker-desktop-mx/browser/{chunk-BuLmfnYb2.js → chunk-DIB1txLC2.js} +1 -1
  29. package/dist/docker-desktop-mx/browser/{chunk-DfetwWmp.js → chunk-DSQAF8Vk.js} +2 -2
  30. package/dist/docker-desktop-mx/browser/chunk-DWmHPcio.js +1 -0
  31. package/dist/docker-desktop-mx/browser/chunk-DhuhbUD7.js +3 -0
  32. package/dist/docker-desktop-mx/browser/{chunk-DzQ3NZEw.js → chunk-DiZLvyn5.js} +1 -1
  33. package/dist/docker-desktop-mx/browser/chunk-JmNJabM7.js +4 -0
  34. package/dist/docker-desktop-mx/browser/chunk-PR65vdNg.js +1 -0
  35. package/dist/docker-desktop-mx/browser/{chunk-CEIzuD8m.js → chunk-ZkkhKXw6.js} +2 -2
  36. package/dist/docker-desktop-mx/browser/{chunk-VLH5Jka4.js → chunk-eMZWdejE.js} +1 -1
  37. package/dist/docker-desktop-mx/browser/{chunk-B-3JRBZY.js → chunk-kvK2KAGk.js} +1 -1
  38. package/dist/docker-desktop-mx/browser/chunk-v1AXLZwF.js +1 -0
  39. package/dist/docker-desktop-mx/browser/chunk-x5sA4n99.js +1 -0
  40. package/dist/docker-desktop-mx/browser/{chunk-Bg_b-Jjw.js → chunk-xhdtv1sC.js} +1 -1
  41. package/dist/docker-desktop-mx/browser/index.html +2 -2
  42. package/dist/docker-desktop-mx/browser/main-2LC7MYJJ.js +1 -0
  43. package/dist/docker-desktop-mx/browser/styles-FKMNLG2K.css +1 -0
  44. package/dist-electron/auto-prune.js +76 -0
  45. package/dist-electron/auto-prune.js.map +1 -0
  46. package/dist-electron/channels.js +11 -0
  47. package/dist-electron/channels.js.map +1 -1
  48. package/dist-electron/compose.js +3 -1
  49. package/dist-electron/compose.js.map +1 -1
  50. package/dist-electron/cpu-limit.js +58 -0
  51. package/dist-electron/cpu-limit.js.map +1 -0
  52. package/dist-electron/environment.js +52 -0
  53. package/dist-electron/environment.js.map +1 -0
  54. package/dist-electron/image-file.js +124 -0
  55. package/dist-electron/image-file.js.map +1 -0
  56. package/dist-electron/ipc.js +34 -0
  57. package/dist-electron/ipc.js.map +1 -1
  58. package/dist-electron/main.js +34 -0
  59. package/dist-electron/main.js.map +1 -1
  60. package/dist-electron/preload.js +23 -2
  61. package/dist-electron/preload.js.map +1 -1
  62. package/dist-electron/redact.js +9 -0
  63. package/dist-electron/redact.js.map +1 -1
  64. package/dist-electron/service-build.js +85 -0
  65. package/dist-electron/service-build.js.map +1 -0
  66. package/dist-electron/settings.js +22 -0
  67. package/dist-electron/settings.js.map +1 -1
  68. package/dist-electron/volume-backup.js +16 -3
  69. package/dist-electron/volume-backup.js.map +1 -1
  70. package/dist-electron/volume-copy.js +145 -0
  71. package/dist-electron/volume-copy.js.map +1 -0
  72. package/package.json +1 -1
  73. package/dist/docker-desktop-mx/browser/chunk-0lzDD7VN.js +0 -1
  74. package/dist/docker-desktop-mx/browser/chunk-AYiAyx6i.js +0 -1
  75. package/dist/docker-desktop-mx/browser/chunk-BhIIfV1H.js +0 -1
  76. package/dist/docker-desktop-mx/browser/chunk-Bo6U-hOl.js +0 -1
  77. package/dist/docker-desktop-mx/browser/chunk-BoHvB94t.js +0 -1
  78. package/dist/docker-desktop-mx/browser/chunk-C5DLS5H5.js +0 -1
  79. package/dist/docker-desktop-mx/browser/chunk-CAMD3gZz.js +0 -3
  80. package/dist/docker-desktop-mx/browser/chunk-CFdB_rJ_.js +0 -6
  81. package/dist/docker-desktop-mx/browser/chunk-CW5lS8he.js +0 -1
  82. package/dist/docker-desktop-mx/browser/chunk-C_5f0tVq.js +0 -4
  83. package/dist/docker-desktop-mx/browser/chunk-C_ouaGQt.js +0 -1
  84. package/dist/docker-desktop-mx/browser/chunk-CpkVTYEc.js +0 -1
  85. package/dist/docker-desktop-mx/browser/chunk-Cz39jf9o.js +0 -1
  86. package/dist/docker-desktop-mx/browser/chunk-D2Fy6Fo8.js +0 -1
  87. package/dist/docker-desktop-mx/browser/chunk-DDNJaJAt2.js +0 -2
  88. package/dist/docker-desktop-mx/browser/chunk-Dh_teJNw.js +0 -1
  89. package/dist/docker-desktop-mx/browser/chunk-DnACbmqU.js +0 -1
  90. package/dist/docker-desktop-mx/browser/chunk-DtDLpTQP.js +0 -1
  91. package/dist/docker-desktop-mx/browser/chunk-PF0v2lXq.js +0 -1
  92. package/dist/docker-desktop-mx/browser/chunk-cblD6gvc.js +0 -1
  93. package/dist/docker-desktop-mx/browser/main-ER3MV5C2.js +0 -1
  94. package/dist/docker-desktop-mx/browser/styles-PTUPDI7O.css +0 -1
@@ -1 +1 @@
1
- import{At as Uw,Cr as yc,En as jc,Fn as mj,G as M,Hn as on,I as Jm,Kn as pj,Ln as nf,Lt as Ws,Nt as Vr,P as Iw,Pt as W,Q as Nn,R as Kr,Tr as zr,W as Lt$1,Zn as rf,_ as Dj,_r as wt$1,at as Pr,b as Ej,it as PS,j as IS,jn as lf,k as Ho,ln as f,lr as ve,mn as gb,nn as br,rr as te,t as $I,tn as bj,tr as sw,u as C,vn as gl,wt as Tg,yr as xm,yt as Se,z as LD,zt as X}from"./chunk-C_5f0tVq.js";import{l as T$1,n as $n$1,o as Ne}from"./chunk-0lzDD7VN.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=$I({type:n})}return n})(),ot=(()=>{class n extends Re{static ɵfac=(()=>{let t;return function(i){return(t||(t=Uw(n)))(i||n)}})();static ɵdir=$I({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=$I({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:[IS([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=$I({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=Uw(n)))(i||n)}})();static ɵdir=$I({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&&zr(`required`,i._enabled?``:null)},inputs:{required:`required`},standalone:!1,features:[IS([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=Lt$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(Se),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=Lt$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=Lt$1(()=>{let s=n.errors()??[],a=n.ngControlState?.connected()?n.ngControlState.errors():[];return a.length>0?[...s,...a]:s}),r=Lt$1(()=>n.invalid()||t().length>0||!!(n.ngControlState?.connected()&&n.ngControlState.invalid())),i=Lt$1(()=>(n.pending?.()??!1)||!!(n.ngControlState?.connected()&&n.ngControlState.pending()));return{invalidState:r,pendingState:i,validState:Lt$1(()=>i()?null:r()?!1:n.ngControlState?.connected()&&n.ngControlState.disabled()?null:!0),errorsState:t,touchedState:Lt$1(()=>n.ngControlState?.connected()?n.ngControlState.touched():n.touched()),dirtyState:Lt$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),LD(()=>{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(Se),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`),LD(()=>{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=PS(()=>this.valueInput()),this.value=this._value.asReadonly(),this._disabled=PS(()=>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=$I({type:n,inputs:{valueInput:[1,`value`,`valueInput`],disabledInput:[1,`disabled`,`disabledInput`]},outputs:{valueChange:`valueChange`},exportAs:[`rdxControlValueAccessor`],features:[IS([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=Lt$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=$I({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=Lt$1(()=>this._state().status),this.tree=Lt$1(()=>{let e=this._state();return e.status===`registered`?e.tree:null}),this.node=Lt$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=$I({type:n,selectors:[[``,`rdxFloatingNode`,``]],inputs:{externalTree:[1,`externalTree`],parentOverride:[1,`parentOverride`]},exportAs:[`rdxFloatingNode`],features:[IS([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
+ import{A as IS,An as lf,B as M,Ct as Tg,F as Jm,Gn as pj,In as nf,It as Ws,L as Kr,Mt as Vr,N as Iw,Nt as W,O as Ho,Pn as mj,Rt as X,Sr as yc,Tn as jc,Vn as on,Xn as rf,Y as OD,_n as gl,cn as f,cr as ve,en as bj,er as sw,et as Ot$1,g as Dj,gr as wt$1,it as Pr,kt as Uw,l as C,nr as te,pn as gb,q as Nn,rt as PS,s as Br,t as $I,tn as br,vr as xm,vt as Se,y as Ej}from"./chunk-JmNJabM7.js";import{l as T$1,n as $n$1,o as Ne}from"./chunk-Bz7JmGk-.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=$I({type:n})}return n})(),ot=(()=>{class n extends Re{static ɵfac=(()=>{let t;return function(i){return(t||(t=Uw(n)))(i||n)}})();static ɵdir=$I({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=$I({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:[IS([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=$I({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=Uw(n)))(i||n)}})();static ɵdir=$I({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:[IS([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(Se),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(Se),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=PS(()=>this.valueInput()),this.value=this._value.asReadonly(),this._disabled=PS(()=>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=$I({type:n,inputs:{valueInput:[1,`value`,`valueInput`],disabledInput:[1,`disabled`,`disabledInput`]},outputs:{valueChange:`valueChange`},exportAs:[`rdxControlValueAccessor`],features:[IS([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=$I({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=$I({type:n,selectors:[[``,`rdxFloatingNode`,``]],inputs:{externalTree:[1,`externalTree`],parentOverride:[1,`parentOverride`]},exportAs:[`rdxFloatingNode`],features:[IS([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};
@@ -0,0 +1 @@
1
+ import"./chunk-JmNJabM7.js";import"./chunk-CRyY-2KM.js";import{n as ro,t as Ql}from"./chunk-DSQAF8Vk.js";Ql();export{ro as TerminalView};
@@ -0,0 +1 @@
1
+ import{$n as sk,A as IS,B as M,Bn as ok,Cn as ik,Ct as Tg,D as HE,Dn as kc,En as kE,F as Jm,G as Nc,Gn as pj,I as Km,L as Kr,Nt as W$1,Pn as mj,Pt as Wm,Q as Oi,St as Tc,Tn as jc,U as My,Wn as pg,Xn as rf,Y as OD,Z as Od,bt as TE,cn as f,cr as ve$1,et as Ot$1,f as Cj,g as Dj,gr as wt,ht as SE,it as Pr,jn as lk,l as C,ln as fS,lt as RE,mr as wc,on as eH,r as Ac,rn as dk,rt as PS,s as Br,sn as ec,t as $I,w as Gm,wn as jI,x as G,y as Ej,z as Ld}from"./chunk-JmNJabM7.js";import{n as he$1,t as W$2}from"./chunk-ZkkhKXw6.js";import{C as qn,E as tn,O as zn,d as Wn,f as Xn,h as ar,i as Gn,m as Zn,n as Bn,p as Yn,t as $n,u as Tt,y as ir}from"./chunk-DCF2sSJN.js";import{r as g,t as L}from"./chunk-BFURpTzq.js";function Ft(e){let n=C(ie);return Ot$1(()=>e?.()??n())}var ie;var Pt=f(()=>{Kr();ie=new M(`RDX_DIRECTION`,{providedIn:`root`,factory:()=>Ot$1(()=>`ltr`)})});function Kt(){return C(St,{optional:!0,self:!0})}function Bt(e){return{provide:St,useFactory:e}}function Wt(e,n){let t=e.compareDocumentPosition(n);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}function de(e){return[...e].filter(n=>n.element.isConnected).sort((n,t)=>Wt(n.element,t.element))}function le(e){let n=new Set;for(let t=1;t<e.length;t+=1){let i=ue(e[t-1],e[t]);i&&n.add(i)}return n}function ue(e,n){let t=e.parentElement;for(;t&&!t.contains(n);)t=t.parentElement;return t}function ce(e){let n=new Set;for(let t of e){for(let i=0;i<t.addedNodes.length;i+=1)if(n.has(t.addedNodes[i]))return!0;for(let i=0;i<t.removedNodes.length;i+=1)n.add(t.removedNodes[i])}for(let t of n)if(t.isConnected)return!0;return!1}function he(e,n){return re.some(t=>!n.includes(t)&&e.getModifierState(t))}function At(e){if(!(e instanceof HTMLElement))return!1;if(e.tagName===`TEXTAREA`)return!0;if(e.tagName!==`INPUT`)return!1;try{return e.selectionStart!=null}catch{return!1}}function zt(e,n){let t=n===`rtl`?$n:qn,i=n===`rtl`?qn:$n;return{forwardKeys:e===`horizontal`?[t]:e===`vertical`?[Wn]:[t,Wn],backwardKeys:e===`horizontal`?[i]:e===`vertical`?[zn]:[i,zn]}}function me(e,n,t,i){let{forwardKeys:o,backwardKeys:s}=zt(t,i),a=n.selectionStart,l=n.selectionEnd,r=n.value??``;return!!(a==null||l==null||e.shiftKey||a!==l||!s.includes(e.key)&&a<r.length||!o.includes(e.key)&&a>0)}function Lt(e,n){return n<0||n>=e.length}function Vt(e,n){return ot(e,{startingIndex:-1,disabledIndices:n})}function pe(e,n){return ot(e,{startingIndex:e.length,decrement:!0,disabledIndices:n})}function ot(e,n={}){let{startingIndex:t=-1,decrement:i=!1,disabledIndices:o}=n,s=i?-1:1;for(let a=t+s;a>=0&&a<e.length;a+=s)if(!$t(e,a,o))return a;return-1}function $t(e,n,t){if(t?.includes(n))return!0;let i=e[n];return i?!ge(i)||i.matches(`:disabled`)?!0:t===void 0&&(i.hasAttribute(`disabled`)||i.getAttribute(`aria-disabled`)===`true`):!1}function fe(e){return e===null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function ge(e){if(!e||!e.isConnected)return!1;if(typeof Element<`u`&&!(e instanceof Element))return!0;let n;try{n=getComputedStyle(e)}catch{return!0}return n.visibility!==`hidden`&&n.visibility!==`collapse`}function be(e,n,t,i){if(!e||!n||typeof e.scrollTo!=`function`)return;let o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight,a=e.scrollLeft,l=e.scrollTop;if(o&&i!==`vertical`){let r=Ot(e,n,`left`),d=J(e),p=J(n);t===`ltr`&&(r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:r-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(a=r-p.scrollMarginLeft-d.scrollPaddingLeft)),t===`rtl`&&(r-p.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?a=r-p.scrollMarginLeft-d.scrollPaddingLeft:r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(s&&i!==`horizontal`){let r=Ot(e,n,`top`),d=J(e),p=J(n);r-p.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?l=r-p.scrollMarginTop-d.scrollPaddingTop:r+n.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(l=r+n.offsetHeight+p.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:a,top:l,behavior:`auto`})}function Ot(e,n,t){let i=t===`left`?`offsetLeft`:`offsetTop`,o=0,s=n;for(;s?.offsetParent&&(o+=s[i],s.offsetParent!==e);)s=s.offsetParent;return o}function J(e){let n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}var St;var se;var jt;var ae;var re;var ve;var st;var xe;var W;var O;var ye;var at;var Ie;var z;var Z;var rt=f(()=>{Kr();Kr();tn();Pt();St=new M(`RdxCompositeItemOwner`);se=`data-composite-item-active`,jt=new Set([zn,Wn,$n,qn]),ae=new Set([...jt,Xn,Yn]),re=[`Shift`,`Control`,`Alt`,`Meta`];ve=()=>{let e=C(W);return{listElement:e.elementRef.nativeElement,items:e.items,itemMap:e.itemMap,registerItem:n=>e.registerItem(n),indexOf:n=>e.indexOf(n)}},[st,xe]=Gn(`RdxCompositeListContext`,`utils/composite`),W=(()=>{class e{constructor(){this.elementRef=C(Pr),this.registrations=new Map,this.registrationTick=wt(0),this.reorderTick=wt(0),this.onMapChange=pj(),this.items=Ot$1(()=>(this.reorderTick(),this.registrationTick(),de([...this.registrations.values()]))),this.indexMap=Ot$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,o)}),t}),this.itemMap=Ot$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,G(W$1({},i.metadata()??{}),{index:o}))}),t}),rf(()=>{this.onMapChange.emit(this.itemMap())}),this.observeItemReordering()}observeItemReordering(){typeof MutationObserver==`function`&&rf(t=>{let i=this.items().map(a=>a.element);if(i.length<2)return;let o=le(i);if(o.size===0)return;let s=new MutationObserver(a=>{if(!ce(a))return;let l=null;for(let r of i)if(r.isConnected){if(l&&Wt(l,r)>0){s.disconnect(),this.reorderTick.update(d=>d+1);return}l=r}});o.forEach(a=>s.observe(a,{childList:!0})),t(()=>s.disconnect())})}registerItem(t){return this.registrations.set(t.element,t),this.registrationTick.update(i=>i+1),()=>{this.registrations.get(t.element)===t&&(this.registrations.delete(t.element),this.registrationTick.update(i=>i+1))}}indexOf(t){return this.indexMap().get(t)??-1}elements(){return this.items().map(t=>t.element)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeList`,``]],outputs:{onMapChange:`onMapChange`},exportAs:[`rdxCompositeList`],features:[IS([xe(ve)])]})}}return e})(),O=(()=>{class e{constructor(){this.owner=Kt(),this.injectedListContext=this.owner?null:st(!0),this.elementRef=C(Pr),this.hasRendered=wt(!1),this.listContext=Ot$1(()=>this.owner?this.owner.listContext():this.injectedListContext),this.metadataInput=jc(void 0,{alias:`metadata`}),this._metadata=PS(()=>this.metadataInput()),this.index=Ot$1(()=>this.listContext()?.indexOf(this.elementRef.nativeElement)??-1),this.inListElement=Ot$1(()=>this.isInListElement(this.listContext())),OD(()=>{this.hasRendered.set(!0)}),rf(t=>{let i=this.listContext();if(!i||!this.hasRendered()||!this.isInListElement(i))return;let o=this.elementRef.nativeElement;t(Tg(()=>i.registerItem({element:o,metadata:this._metadata.asReadonly()})))})}setMetadata(t){this._metadata.set(t)}isInListElement(t){return!!t&&t.listElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeListItem`,``]],inputs:{metadataInput:[1,`metadata`,`metadataInput`]},exportAs:[`rdxCompositeListItem`]})}}return e})(),ye=()=>{let e=C(z);return{rootElement:e.elementRef.nativeElement,highlightedIndex:e.highlightedIndex.asReadonly(),highlightItemOnHover:e.highlightItemOnHover,orientation:e.orientation,dir:e.dir,isIndexDisabled:n=>e.isIndexDisabled(n),setHighlightedIndex:(n,t)=>e.setHighlightedIndex(n,t),relayKeyboardEvent:n=>e.relayKeyboardEvent(n)}},[at,Ie]=Gn(`RdxCompositeRootContext`,`utils/composite`),z=(()=>{class e{constructor(){this.elementRef=C(Pr),this.compositeList=C(W,{self:!0}),this.hasSetInitialIndex=!1,this.orientationInput=jc(`both`,{alias:`orientation`}),this._orientation=PS(()=>this.orientationInput()),this.orientation=this._orientation.asReadonly(),this.dirInput=jc(void 0,{alias:`dir`}),this.effectiveDir=Ft(this.dirInput),this._dir=PS(()=>this.effectiveDir()),this.dir=this._dir.asReadonly(),this.loopFocusInput=jc(!0,{alias:`loopFocus`,transform:Dj}),this._loopFocus=PS(()=>this.loopFocusInput()),this.loopFocus=this._loopFocus.asReadonly(),this.enableHomeAndEndKeysInput=jc(!1,{alias:`enableHomeAndEndKeys`,transform:Dj}),this._enableHomeAndEndKeys=PS(()=>this.enableHomeAndEndKeysInput()),this.enableHomeAndEndKeys=this._enableHomeAndEndKeys.asReadonly(),this.disabledIndicesInput=jc(void 0,{alias:`disabledIndices`}),this._disabledIndices=PS(()=>this.disabledIndicesInput()),this.disabledIndices=this._disabledIndices.asReadonly(),this.modifierKeysInput=jc([],{alias:`modifierKeys`}),this._modifierKeys=PS(()=>this.modifierKeysInput()),this.modifierKeys=this._modifierKeys.asReadonly(),this.highlightItemOnHover=jc(!1,{transform:Dj}),this.stopEventPropagation=jc(!0,{transform:Dj}),this.highlightedIndex=mj(0),this.onHighlightedIndexChange=pj(),this.onMapChange=pj(),this.items=this.compositeList.items,this.itemMap=this.compositeList.itemMap,rf(()=>{let t=this.items();if(t.length!==0){if(!this.hasSetInitialIndex){this.hasSetInitialIndex=!0;let i=t.findIndex(o=>o.element.hasAttribute(se));if(i!==-1){this.setHighlightedIndex(i,!0);return}this.moveHighlightOffDisabledItem();return}this.disabledIndices()!=null&&this.moveHighlightOffDisabledItem()}}),rf(()=>{this.onMapChange.emit(this.itemMap())})}moveHighlightOffDisabledItem(){if(!this.isIndexDisabled(this.highlightedIndex()))return;let t=this.elements(),i=Vt(t,this.disabledIndices());Lt(t,i)||this.setHighlightedIndex(i)}indexOf(t){return this.compositeList.indexOf(t)}setOrientation(t){this._orientation.set(t)}setLoopFocus(t){this._loopFocus.set(t)}setDir(t){this._dir.set(t)}setEnableHomeAndEndKeys(t){this._enableHomeAndEndKeys.set(t)}setDisabledIndices(t){this._disabledIndices.set(t)}setModifierKeys(t){this._modifierKeys.set(t)}isIndexDisabled(t){return $t(this.elements(),t,this.disabledIndices())}setHighlightedIndex(t,i=!1){this.highlightedIndex()!==t&&(this.highlightedIndex.set(t),this.onHighlightedIndexChange.emit(t)),i&&be(this.elementRef.nativeElement,this.elements()[t],this.dir(),this.orientation())}relayKeyboardEvent(t){this.handleCompositeKeydown(t,!0)}handleKeydown(t){this.handleCompositeKeydown(t,!1)}handleFocusIn(t){let i=t.target;At(i)&&i.setSelectionRange(0,i.value.length)}handleCompositeKeydown(t,i){if(!(this.enableHomeAndEndKeys()?ae:jt).has(t.key)||he(t,this.modifierKeys()))return;let s=t.target,a=this.elementRef.nativeElement;if(!i&&s instanceof HTMLElement){let d=s.closest(`[rdxCompositeRoot]`);if(d&&d!==a)return}if(At(s)&&!fe(s))try{if(me(t,s,this.orientation(),this.dir()))return}catch{return}let l=this.elements();if(l.length===0)return;let r=this.getNextIndex(t,l);r===this.highlightedIndex()||Lt(l,r)||(this.stopEventPropagation()&&t.stopPropagation(),t.preventDefault(),this.setHighlightedIndex(r,!0),queueMicrotask(()=>{this.elements()[r]?.focus()}))}getNextIndex(t,i){let o=this.highlightedIndex(),s=Vt(i,this.disabledIndices()),a=pe(i,this.disabledIndices());if(this.enableHomeAndEndKeys()){if(t.key===`Home`)return s;if(t.key===`End`)return a}let{forwardKeys:l,backwardKeys:r}=zt(this.orientation(),this.dir()),d=l.includes(t.key),p=r.includes(t.key);if(!d&&!p)return o;let E=p,Xt=E?s:a,Yt=E?a:s;return this.loopFocus()&&o===Xt?Yt:ot(i,{startingIndex:o,decrement:E,disabledIndices:this.disabledIndices()})}elements(){return this.compositeList.elements()}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeRoot`,``]],hostBindings:function(i,o){i&1&&Jm(`keydown`,function(a){return o.handleKeydown(a)})(`focusin`,function(a){return o.handleFocusIn(a)})},inputs:{orientationInput:[1,`orientation`,`orientationInput`],dirInput:[1,`dir`,`dirInput`],loopFocusInput:[1,`loopFocus`,`loopFocusInput`],enableHomeAndEndKeysInput:[1,`enableHomeAndEndKeys`,`enableHomeAndEndKeysInput`],disabledIndicesInput:[1,`disabledIndices`,`disabledIndicesInput`],modifierKeysInput:[1,`modifierKeys`,`modifierKeysInput`],highlightItemOnHover:[1,`highlightItemOnHover`],stopEventPropagation:[1,`stopEventPropagation`],highlightedIndex:[1,`highlightedIndex`]},outputs:{highlightedIndex:`highlightedIndexChange`,onHighlightedIndexChange:`onHighlightedIndexChange`,onMapChange:`onMapChange`},exportAs:[`rdxCompositeRoot`],features:[IS([Ie(ye)]),jI([W])]})}}return e})(),Z=(()=>{class e{constructor(){this.owner=Kt(),this.injectedRootContext=this.owner?null:at(!0),this.listItem=C(O,{self:!0}),this.elementRef=C(Pr),this.rootContext=Ot$1(()=>this.owner?this.owner.rootContext():this.injectedRootContext),this.index=this.listItem.index,this.tabIndex=Ot$1(()=>{let t=this.rootContext();if(!this.isInRootElement(t))return null;let i=this.index();return i!==-1&&t.highlightedIndex()===i&&!t.isIndexDisabled(i)?0:-1})}setMetadata(t){this.listItem.setMetadata(t)}handleFocus(){let t=this.rootContext(),i=this.index();i!==-1&&this.isInRootElement(t)&&t.setHighlightedIndex(i)}handleMouseMove(t){if(ir(t))return;let i=this.rootContext(),o=this.index();!this.isInRootElement(i)||o===-1||!i.highlightItemOnHover()||i.highlightedIndex()===o||i.isIndexDisabled(o)||this.elementRef.nativeElement.focus()}isInRootElement(t){return!!t&&t.rootElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxCompositeItem`,``]],hostVars:1,hostBindings:function(i,o){i&1&&Jm(`focus`,function(){return o.handleFocus()})(`mousemove`,function(a){return o.handleMouseMove(a)}),i&2&&Br(`tabindex`,o.tabIndex())},exportAs:[`rdxCompositeItem`],features:[jI([{directive:O,inputs:[`metadata`,`metadata`]}])]})}}return e})()});function qt(e,n){return`${e}-tab-${n}`}function Ut(e,n){return`${e}-panel-${n}`}function De(e){return typeof e.disabled==`boolean`&&typeof e.id==`string`&&Object.prototype.hasOwnProperty.call(e,`value`)}function Te(e,n){for(let t of e.values())if(t.value===n)return t}function Ne(e){for(let n of e.values())if(!n.disabled)return n.value}function ke(e,n,t,i){if(e==null||n==null)return`none`;let o=null,s=null,a=-1,l=-1;for(let[p,E]of i.entries())if(E.value===e&&(o=p,a=E.index),E.value===n&&(s=p,l=E.index),o&&s)break;if(!o||!s||a===l)return Fe(e,n,t);let r=o.getBoundingClientRect(),d=s.getBoundingClientRect();return t===`horizontal`?d.left<r.left?`left`:d.left>r.left||l>a?`right`:`left`:d.top<r.top?`up`:d.top>r.top||l>a?`down`:`up`}function Fe(e,n,t){return e!==n&&typeof e==`number`&&typeof n==`number`||e!==n&&typeof e==`string`&&typeof n==`string`?t===`horizontal`?n>e?`right`:`left`:n>e?`down`:`up`:`none`}function Ae(){return Bt(Pe)}var tt;var Me;var fi;var Re;var _e;var Ee;var we;var Pe;var gi;var Le=f(()=>{Kr();Kr();tn();rt();rt();g();[tt,Me]=Gn(`RdxTabsRootContext`,`components/tabs`);fi=(()=>{class e{constructor(){this.rootContext=tt(),this.elementRef=C(Pr),this.compositeRoot=C(z,{self:!0}),this.compositeRootContext=at(),this.compositeListContext=st(),this.activateOnFocus=jc(!1,{transform:Dj}),this.loopFocus=jc(!0,{transform:Dj}),this.tabMap=Ot$1(()=>{let i=new Map;return this.compositeRoot.itemMap().forEach((o,s)=>{De(o)&&i.set(s,o)}),i}),this.tabMetadata=Ot$1(()=>Array.from(this.tabMap().values())),this.disabledIndices=Ot$1(()=>this.tabMetadata().filter(i=>i.disabled).map(i=>i.index)),this.activeIndex=Ot$1(()=>{let i=this.rootContext.value();return this.tabMetadata().find(s=>s.value===i)?.index??-1});let t=this.rootContext.registerTabList(this.elementRef.nativeElement,this.compositeRootContext,this.compositeListContext);C(ve$1).onDestroy(t),this.compositeRoot.setEnableHomeAndEndKeys(!0),this.compositeRoot.setDisabledIndices([]),rf(()=>{this.compositeRoot.setOrientation(this.rootContext.orientation()),this.compositeRoot.setLoopFocus(this.loopFocus())}),rf(()=>{this.rootContext.setTabMap(this.tabMap())}),rf(()=>{let i=this.activeIndex();if(i===-1)return;let o=this.elementRef.nativeElement,s=o.ownerDocument.activeElement;if(!(s&&o.contains(s))){if(this.disabledIndices().includes(i)){let a=this.tabMetadata().find(l=>!l.disabled)?.index;a!==void 0&&this.compositeRoot.setHighlightedIndex(a);return}this.compositeRoot.setHighlightedIndex(i)}}),rf(()=>this.rootContext.setActivateOnFocus(this.activateOnFocus()))}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsList`,``]],hostAttrs:[`role`,`tablist`],hostVars:3,hostBindings:function(i,o){i&2&&Br(`aria-orientation`,o.rootContext.orientation()===`vertical`?`vertical`:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())},inputs:{activateOnFocus:[1,`activateOnFocus`],loopFocus:[1,`loopFocus`]},exportAs:[`rdxTabsList`],features:[jI([z])]})}}return e})();Re=()=>({present:C(_e).present}),_e=(()=>{class e{constructor(){this.elementRef=C(Pr),this.listItem=C(O,{self:!0}),this.rootContext=tt(),this.value=jc.required(),this.keepMounted=jc(!1,{transform:Dj}),this.transition=ar(()=>{}),this.transitionStatus=this.transition.status,this.panelId=Ot$1(()=>Ut(this.rootContext.baseId,this.value())),this.tabId=Ot$1(()=>{let i=this.value();for(let o of this.rootContext.tabMap().values())if(o.value===i)return o.id;return qt(this.rootContext.baseId,i)}),this.active=Ot$1(()=>this.rootContext.value()===this.value()),this.hasPresence=wt(!1),this.present=Ot$1(()=>this.keepMounted()||this.active()),this.hidden=Ot$1(()=>!this.active()&&this.transitionStatus()!==`ending`&&(!this.hasPresence()||this.keepMounted())),this.index=this.listItem.index,this.previousActive=!1,this.isFirstRun=!0;let t=this.transition.registerElement(this.elementRef.nativeElement);C(ve$1).onDestroy(t),rf(()=>{this.listItem.setMetadata({id:this.panelId(),value:this.value()})}),rf(()=>{let i=this.active();if(this.isFirstRun){this.isFirstRun=!1,this.previousActive=i;return}i!==this.previousActive&&(this.previousActive=i,Tg(()=>this.transition.start(i)))})}markHasPresence(){this.hasPresence.set(!0)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsPanel`,``]],hostAttrs:[`role`,`tabpanel`],hostVars:10,hostBindings:function(i,o){i&2&&(Km(`hidden`,o.hidden()),Br(`id`,o.panelId())(`tabindex`,o.active()?0:-1)(`aria-labelledby`,o.tabId())(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-index`,o.index())(`data-hidden`,o.active()?void 0:``)(`data-starting-style`,o.transitionStatus()===`starting`?``:void 0)(`data-ending-style`,o.transitionStatus()===`ending`?``:void 0))},inputs:{value:[1,`value`],keepMounted:[1,`keepMounted`]},exportAs:[`rdxTabsPanel`],features:[IS([L(Re)]),jI([O])]})}}return e})(),Ee=()=>{let e=C(we);return{baseId:e.baseId,value:e.value,orientation:e.orientation,activationDirection:e.activationDirection.asReadonly(),activateOnFocus:e.activateOnFocus.asReadonly(),tabListElement:e.tabListElement.asReadonly(),tabMap:e.tabMap.asReadonly(),tabCompositeRoot:e.tabCompositeRoot.asReadonly(),tabCompositeList:e.tabCompositeList.asReadonly(),setValue:(n,t,i)=>e.setValue(n,t,i),setActivateOnFocus:n=>e.activateOnFocus.set(n),registerTabList:(n,t,i)=>e.registerTabList(n,t,i),setTabMap:n=>e.tabMap.set(n)}},we=(()=>{class e{constructor(){this.baseId=Tt(`rdx-tabs-`),this.value=mj(),this.defaultValue=jc(void 0),this.orientation=jc(`horizontal`),this.onValueChange=pj(),this.activateOnFocus=wt(!1),this.tabListElement=wt(null),this.tabMap=wt(new Map),this.tabCompositeRoot=wt(null),this.tabCompositeList=wt(null),this.activationDirection=wt(`none`),this.externallyControlled=wt(!1),this.hasObservedValue=!1,this.internalValueCommit=!1,this.hasAppliedDefaultValue=!1,this.shouldNotifyInitialValueChange=!0,this.shouldHonorDisabledDefaultValue=!1,this.didRegisterTabs=!1,rf(()=>{let t=this.value();if(this.internalValueCommit){this.internalValueCommit=!1,this.hasObservedValue=!0,this.previousObservedValue=t;return}if(!this.hasObservedValue){this.hasObservedValue=!0,this.previousObservedValue=t,t!==void 0&&this.externallyControlled.set(!0);return}t!==this.previousObservedValue&&(this.externallyControlled.set(!0),this.previousObservedValue=t)}),rf(()=>{if(this.hasAppliedDefaultValue||Tg(this.value)!==void 0)return;let t=this.defaultValue(),i=t!==void 0;this.hasAppliedDefaultValue=!0,this.initialDefaultValue=t??0,this.shouldNotifyInitialValueChange=!i,this.shouldHonorDisabledDefaultValue=i,Tg(()=>this.commitValue(this.initialDefaultValue))}),rf(()=>{let t=this.tabMap(),i=this.value();if(this.externallyControlled())return;if(t.size===0){this.didRegisterTabs&&i!==null&&!this.lastKnownTabElement?.isConnected&&Tg(()=>this.commitAutomaticValueChange(null,`missing`));return}this.didRegisterTabs=!0,this.lastKnownTabElement=t.keys().next().value;let o=Te(t,i),s=Ne(t),a=o?.disabled,l=o==null&&i!==null;if(!a&&i===this.initialDefaultValue&&(this.shouldHonorDisabledDefaultValue=!1),this.shouldHonorDisabledDefaultValue&&a&&i===this.initialDefaultValue)return;let r=this.shouldNotifyInitialValueChange;if(a||l){let d=s??null;if(i===d){this.shouldNotifyInitialValueChange=!1;return}let p=`missing`;r?p=`initial`:a&&(p=`disabled`),Tg(()=>this.commitAutomaticValueChange(d,p));return}r&&o!=null&&(Tg(()=>this.notifyAutomaticValueChange(i,`initial`)),this.shouldNotifyInitialValueChange=!1)})}setValue(t,i,o=`none`){let s=this.value();if(s===t)return;let a=i?.currentTarget instanceof HTMLElement?i.currentTarget:void 0,{eventDetails:l}=Zn(o,i??new Event(`tabs.value-change`),a),r=l,d=ke(s,t,this.orientation(),this.tabMap());r.activationDirection=d,this.onValueChange.emit({value:t,eventDetails:r}),!r.isCanceled()&&(this.activationDirection.set(d),this.commitValue(t))}registerTabList(t,i,o){return this.tabListElement.set(t),this.tabCompositeRoot.set(i),this.tabCompositeList.set(o),()=>{this.tabCompositeRoot()!==i||this.tabCompositeList()!==o||(this.tabListElement.set(null),this.tabCompositeRoot.set(null),this.tabCompositeList.set(null),this.activateOnFocus.set(!1))}}commitValue(t){this.internalValueCommit=!0,this.value.set(t)}commitAutomaticValueChange(t,i){this.activationDirection.set(`none`),this.commitValue(t),this.notifyAutomaticValueChange(t,i),this.shouldNotifyInitialValueChange=!1}notifyAutomaticValueChange(t,i){if(t===void 0)return;let{eventDetails:o}=Zn(i,new Event(`tabs.value-change`)),s=o;s.activationDirection=`none`,this.onValueChange.emit({value:t,eventDetails:s})}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsRoot`,``]],hostVars:2,hostBindings:function(i,o){i&2&&Br(`data-orientation`,o.orientation())(`data-activation-direction`,o.activationDirection())},inputs:{value:[1,`value`],defaultValue:[1,`defaultValue`],orientation:[1,`orientation`]},outputs:{value:`valueChange`,onValueChange:`onValueChange`},exportAs:[`rdxTabsRoot`],features:[IS([Me(Ee)]),jI([W])]})}}return e})();Pe=()=>{let e=tt();return{rootContext:e.tabCompositeRoot,listContext:e.tabCompositeList}};gi=(()=>{class e{constructor(){this.rootContext=tt(),this.compositeItem=C(Z,{self:!0}),this.elementRef=C(Pr),this.value=jc.required(),this.disabled=jc(!1,{transform:Dj}),this.nativeButton=jc(!0,{transform:Dj}),this.id=jc(void 0),this.tabId=Ot$1(()=>this.id()??qt(this.rootContext.baseId,this.value())),this.panelId=Ot$1(()=>Ut(this.rootContext.baseId,this.value())),this.active=Ot$1(()=>this.rootContext.value()===this.value()),this.isPressing=!1,this.isMainButton=!1,Ej()&&Cj(()=>{let t=this.rootContext.tabCompositeList();t&&!t.listElement.contains(this.elementRef.nativeElement)&&Bn(`tabs/tab-outside-list`,'`rdxTabsTab` is rendered outside its `rdxTabsList`, so it gets no roving tabindex, arrow keys cannot reach it, and its `role="tab"` sits outside the `role="tablist"`. Move the tab inside the list, or project it there with `<ng-content>`.',`components/tabs`)}),rf(()=>{this.compositeItem.setMetadata({disabled:this.disabled(),id:this.tabId(),value:this.value()})})}onClick(t){this.active()||this.disabled()||this.rootContext.setValue(this.value(),t,`none`)}onKeyDown(t){!this.disabled()&&(t.key===` `||t.key===`Enter`)&&this.rootContext.setValue(this.value(),t,`none`)}onPointerDown(t){if(this.active()||this.disabled())return;this.isPressing=!0,this.isMainButton=t.button===0;let i=t.currentTarget instanceof HTMLElement?t.currentTarget.ownerDocument:document;i.addEventListener(`pointerup`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`pointercancel`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`blur`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0})}onFocus(t){this.active()||this.disabled()||this.rootContext.activateOnFocus()&&(!this.isPressing||this.isMainButton)&&this.rootContext.setValue(this.value(),t,`none`)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxTabsTab`,``]],hostAttrs:[`role`,`tab`],hostVars:11,hostBindings:function(i,o){i&1&&Jm(`click`,function(a){return o.onClick(a)})(`keydown`,function(a){return o.onKeyDown(a)})(`pointerdown`,function(a){return o.onPointerDown(a)})(`focus`,function(a){return o.onFocus(a)}),i&2&&Br(`type`,o.nativeButton()?`button`:void 0)(`id`,o.tabId())(`aria-selected`,o.active())(`aria-controls`,o.panelId())(`aria-disabled`,o.disabled()?`true`:void 0)(`disabled`,null)(`data-composite-item-active`,o.active()?``:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-active`,o.active()?``:void 0)(`data-disabled`,o.disabled()?``:void 0)},inputs:{value:[1,`value`],disabled:[1,`disabled`],nativeButton:[1,`nativeButton`],id:[1,`id`]},exportAs:[`rdxTabsTab`],features:[IS([Ae()]),jI([Z])]})}}return e})()});function Ve(e,n){if(e&1&&(Oi(0,`p`,8),fS(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introHost)}}function Oe(e,n){if(e&1&&(Oi(0,`p`,8),fS(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introContainer)}}function He(e,n){if(e&1&&SE(0,Ve,2,1,`p`,8)(1,Oe,2,1,`p`,8),e&2)kE(HE().containerId()===null?0:1)}function Se(e,n){if(e&1&&(Oi(0,`p`,9),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ke(e,n){if(e&1&&Gm(0,`app-answer-text`,10),e&2){let t=HE().$implicit;Wm(`text`,t.text)}}function Be(e,n){if(e&1&&(Oi(0,`p`,11),Gm(1,`app-icon`,15),fS(2),Nc()),e&2){let t=HE().$implicit;ec(),Wm(`size`,12),ec(),Ac(` `,t.label,` `)}}function je(e,n){if(e&1&&(Oi(0,`pre`,17),fS(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.proposal.command)}}function We(e,n){if(e&1&&(Oi(0,`span`,21),fS(1),Nc()),e&2){let t=HE(2).$implicit,i=HE();ec(),pg(t.proposal.kind===`command`?i.t().onPrompt:i.t().done)}}function ze(e,n){if(e&1&&(Oi(0,`span`,22),fS(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.problem)}}function $e(e,n){if(e&1){let t=RE();Oi(0,`div`,12)(1,`p`,16),fS(2),Nc(),SE(3,je,2,1,`pre`,17),Oi(4,`div`,18)(5,`button`,19),Jm(`click`,function(){Ld(t);let o=HE(),s=o.$implicit,a=o.$index;return Od(HE().carryOut(a,s.proposal))}),Gm(6,`app-icon`,20),fS(7),Nc(),SE(8,We,2,1,`span`,21)(9,ze,2,1,`span`,22),Nc()()}if(e&2){let t=HE().$implicit,i=HE();ec(2),pg(t.proposal.reason),ec(),kE(t.proposal.kind===`command`?3:-1),ec(2),Wm(`disabled`,t.state===`busy`||t.state===`done`&&t.proposal.kind!==`command`),ec(),Wm(`name`,i.proposalIcon(t.proposal))(`size`,14),ec(),Ac(` `,i.proposalLabel(t.proposal),` `),ec(),kE(t.state===`done`?8:t.state===`failed`?9:-1)}}function qe(e,n){if(e&1&&(Oi(0,`p`,13),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ue(e,n){if(e&1&&(Oi(0,`p`,14),fS(1),Nc()),e&2){let t=HE().$implicit;ec(),Ac(` `,t.problem,` `)}}function Qe(e,n){if(e&1&&SE(0,Se,2,1,`p`,9)(1,Ke,1,1,`app-answer-text`,10)(2,Be,3,2,`p`,11)(3,$e,10,7,`div`,12)(4,qe,2,1,`p`,13)(5,Ue,2,1,`p`,14),e&2){let t,i=n.$implicit;kE((t=i.kind)===`question`?0:t===`answer`?1:t===`tool`?2:t===`proposal`?3:t===`usage`?4:t===`error`?5:-1)}}function Xe(e,n){if(e&1&&(Oi(0,`p`,2),fS(1),Nc()),e&2){let t=HE();ec(),pg(t.t().thinking)}}function dt(e){return e.toLocaleString(ik())}var Qt;var Ye=f(()=>{Kr();lk();he$1();dk();sk();Kr();Qt=class e{containerId=jc(null);commandChosen=pj();entries=wt([]);busy=wt(!1);draft=wt(``);t=Ot$1(()=>ok().containers.assistant);defaultQuestion=Ot$1(()=>this.containerId()===null?this.t().defaultHostQuestion:this.t().defaultQuestion);conversationId=null;unsubscribe=null;destroyed=!1;constructor(){C(ve$1).onDestroy(()=>{this.destroyed=!0,this.unsubscribe?.(),this.conversationId!==null&&window.electron.assistant.close(this.conversationId)})}async submit(n){n.preventDefault();let t=this.draft().trim()||(this.entries().length===0?this.defaultQuestion():``);if(!(t===``||this.busy())){this.draft.set(``),this.busy.set(!0),this.append({kind:`question`,text:t});try{let i=await this.conversation();await window.electron.assistant.ask(i,t)}catch(i){this.append({kind:`error`,problem:eH(i)})}finally{this.busy.set(!1)}}}proposalLabel(n){let t=this.t();return n.kind===`command`?t.putInTerminal:n.kind===`compose`?t.composeUp(n.project):t[n.action](n.containerName)}proposalIcon(n){return n.kind===`command`?`terminal`:n.kind===`compose`?`play`:{start:`play`,stop:`stop`,restart:`refresh`}[n.action]}async carryOut(n,t){if(t.kind===`command`){this.commandChosen.emit(t.command),this.updateProposal(n,{state:`done`});return}this.updateProposal(n,{state:`busy`});try{let i=t.kind===`compose`?await window.electron.compose.up(t.project):await window.electron.containers.action(t.action,t.containerId);this.updateProposal(n,i.ok?{state:`done`}:{state:`failed`,problem:i.problem})}catch(i){this.updateProposal(n,{state:`failed`,problem:eH(i)})}}async conversation(){if(this.conversationId!==null)return this.conversationId;let n=await window.electron.assistant.start(this.containerId());if(this.destroyed)throw window.electron.assistant.close(n),new Error(this.t().panelClosed);return this.conversationId=n,this.unsubscribe=window.electron.assistant.onEvent(n,t=>this.receive(t)),n}receive(n){switch(n.type){case`text`:this.entries.update(t=>{let i=t.at(-1);return i?.kind===`answer`?[...t.slice(0,-1),{kind:`answer`,text:i.text+n.text}]:n.text.trim()===``?t:[...t,{kind:`answer`,text:n.text}]});break;case`tool`:this.append({kind:`tool`,label:n.label});break;case`proposal`:this.append({kind:`proposal`,proposal:n.proposal,state:`open`});break;case`done`:this.append({kind:`usage`,text:this.t().usage(dt(n.inputTokens),dt(n.cachedTokens),dt(n.outputTokens))});break;case`error`:this.append({kind:`error`,problem:n.problem});break}}append(n){this.entries.update(t=>[...t,n])}updateProposal(n,t){this.entries.update(i=>i.map((o,s)=>s===n&&o.kind===`proposal`?W$1(W$1({},o),t):o))}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-assistant-view`]],hostAttrs:[1,`flex`,`h-full`,`flex-col`],inputs:{containerId:[1,`containerId`]},outputs:{commandChosen:`commandChosen`},decls:13,vars:9,consts:[[`data-testid`,`assistant-log`,1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`py-4`],[1,`max-w-3xl`,`space-y-3`],[1,`text-[12px]`,`text-ink-500`],[1,`flex`,`shrink-0`,`gap-2`,`border-t`,`border-ink-700`,`px-6`,`py-3`,3,`submit`],[`for`,`assistant-question`,1,`sr-only`],[`id`,`assistant-question`,`type`,`text`,`autocomplete`,`off`,1,`mx-focus`,`min-w-0`,`flex-1`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`,`disabled`],[`type`,`submit`,`data-testid`,`assistant-ask`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`sparkle`,3,`size`],[1,`max-w-2xl`,`text-[13px]`,`text-ink-400`],[1,`rounded-md`,`bg-ink-800`,`px-3`,`py-2`,`text-[13px]`,`text-ink-100`],[`data-testid`,`assistant-answer`,1,`text-[13px]`,`leading-relaxed`,`text-ink-200`,3,`text`],[`data-testid`,`assistant-tool`,1,`flex`,`items-center`,`gap-1.5`,`text-[12px]`,`text-ink-500`],[`data-testid`,`assistant-proposal`,1,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[`data-testid`,`assistant-usage`,1,`text-[11px]`,`text-ink-600`],[`data-testid`,`assistant-error`,1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[`name`,`search`,3,`size`],[1,`text-[12px]`,`text-ink-400`],[1,`mt-2`,`overflow-x-auto`,`rounded`,`bg-ink-900`,`px-2`,`py-1`,`font-mono`,`text-[12px]`,`text-ink-100`],[1,`mt-2`,`flex`,`items-center`,`gap-2`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[1,`text-[12px]`,`text-ok`],[1,`text-[12px]`,`text-danger`]],template:function(t,i){t&1&&(Oi(0,`div`,0),SE(1,He,2,1),Oi(2,`div`,1),kc(3,Qe,6,1,null,null,TE),SE(5,Xe,2,1,`p`,2),Nc()(),Oi(6,`form`,3),Jm(`submit`,function(s){return i.submit(s)}),Oi(7,`label`,4),fS(8),Nc(),Oi(9,`input`,5),Jm(`input`,function(s){return i.draft.set(s.target.value)}),Nc(),Oi(10,`button`,6),Gm(11,`app-icon`,7),fS(12),Nc()()),t&2&&(ec(),kE(i.entries().length===0?1:-1),ec(2),Tc(i.entries()),ec(2),kE(i.busy()?5:-1),ec(3),pg(i.t().questionLabel),ec(),Wm(`placeholder`,i.entries().length===0?i.defaultQuestion():i.t().followUp)(`value`,i.draft())(`disabled`,i.busy()),ec(),Wm(`disabled`,i.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().ask,` `))},dependencies:[W$2,My],encapsulation:2})}});export{fi as a,_e as i,Qt as n,gi as o,Ye as r,we as s,Le as t};
@@ -1 +1 @@
1
- import{Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li,I as Jm,In as nS,J as My,Kt as _m,Mn as lk,O as HE,On as kc,R as Kr,Sn as hg,T as Gm,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,_r as wt,_t as SS,cn as ec,er as sk,gt as SE,hr as wc,in as dk,ln as f,r as Ac,sn as eH,sr as vS,tt as Od,u as C,un as fS,ur as vg,ut as RE,wt as Tg}from"./chunk-C_5f0tVq.js";import"./chunk-Bg_b-Jjw.js";import"./chunk-0lzDD7VN.js";import{n as y,t as f$1}from"./chunk-AYiAyx6i.js";import{n as o,t as i}from"./chunk-D1Z6IQ-O.js";import{n as p,t as M}from"./chunk-VLH5Jka4.js";import"./chunk-S9IeOMe4.js";import"./chunk-CG34bAfY.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-C_ouaGQt.js";import{n as x,t as u}from"./chunk-Dw1WSpzf.js";import{a as Yt,r as Q$1,s as fe$1,u as ra}from"./chunk-CW5lS8he.js";import{n as P,t as K}from"./chunk-CGtoxp5M.js";import{n as V,t as G}from"./chunk-BpGvpxhZ.js";import{n as W,t as J}from"./chunk-Bo6U-hOl.js";import{i as z,n as oe,r as x$1}from"./chunk-BgPEkm-o.js";function Ie(i,t){i&1&&(Li(0,`p`,22),fS(1),Nc()),i&2&&(ec(),pg(t))}function Ee(i,t){if(i&1){let n=RE();Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),Li(7,`form`,7),Jm(`submit`,function(m){Od(n);return Ld(HE().submit(m))}),Li(8,`label`,8)(9,`span`,9),fS(10),Nc(),Li(11,`input`,10),Jm(`input`,function(m){Od(n);return Ld(HE().name.set(m.target.value))}),Nc()(),Li(12,`label`,11)(13,`input`,12),Jm(`change`,function(m){Od(n);return Ld(HE().internal.set(m.target.checked))}),Nc(),Li(14,`span`)(15,`span`,13),fS(16),Nc(),Li(17,`span`,14),fS(18),Nc()()(),Li(19,`details`,15)(20,`summary`,16),fS(21),Nc(),Li(22,`label`,17)(23,`span`,9),fS(24),Nc(),Li(25,`input`,18),Jm(`input`,function(m){Od(n);return Ld(HE().driver.set(m.target.value))}),Nc(),Li(26,`span`,19),fS(27),Nc()(),Li(28,`label`,17)(29,`span`,9),fS(30),Nc(),Li(31,`input`,20),Jm(`input`,function(m){Od(n);return Ld(HE().subnet.set(m.target.value))}),Nc(),Li(32,`span`,19),fS(33),Nc()(),Li(34,`label`,17)(35,`span`,9),fS(36),Nc(),Li(37,`input`,21),Jm(`input`,function(m){Od(n);return Ld(HE().gateway.set(m.target.value))}),Nc(),Li(38,`span`,19),fS(39),Nc()()(),SE(40,Ie,2,1,`p`,22),Li(41,`div`,23)(42,`button`,24),Gm(43,`app-icon`,25),fS(44),Nc(),Li(45,`button`,26),Gm(46,`app-icon`,27),fS(47),Nc()()()()()}if(i&2){let n,e=HE();ec(4),pg(e.t().title),ec(2),pg(e.t().description),ec(4),pg(e.t().nameLabel),ec(),nS(e.field),Wm(`placeholder`,e.t().namePlaceholder)(`value`,e.name())(`disabled`,e.busy()),ec(2),Wm(`checked`,e.internal())(`disabled`,e.busy()),ec(3),pg(e.t().internal),ec(2),pg(e.t().internalHint),ec(),Wm(`open`,e.advanced()),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),ec(3),pg(e.t().subnetLabel),ec(),nS(e.field),Wm(`value`,e.subnet())(`disabled`,e.busy()),ec(2),pg(e.t().subnetHint),ec(3),pg(e.t().gatewayLabel),ec(),nS(e.field),Wm(`value`,e.gateway())(`disabled`,e.busy()),ec(2),pg(e.t().gatewayHint),ec(),kE((n=e.problem())?40:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,e.common().cancel,` `),ec(),Wm(`disabled`,!e.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().creating:e.t().submit,` `)}}var Pe;var Q;var be=f(()=>{Kr();Je$1();f$1();dk();sk();Kr();Pe=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=C(y);open=mj(!1);t=Lt(()=>ok().networks.createDialog);common=Lt(()=>ok().common);field=Pe;name=wt(``);internal=wt(!1);driver=wt(`bridge`);subnet=wt(``);gateway=wt(``);busy=wt(!1);problem=wt(null);advanced=Lt(()=>this.driver().trim()!==`bridge`||this.subnet().trim()!==``||this.gateway().trim()!==``);canSubmit=Lt(()=>!this.busy()&&this.name().trim()!==``&&this.driver().trim()!==``);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.internal.set(!1),this.driver.set(`bridge`),this.subnet.set(``),this.gateway.set(``),this.problem.set(null)})})}submit(t){if(t.preventDefault(),!this.canSubmit())return;let n=this.subnet().trim(),e=this.gateway().trim();this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),driver:this.driver().trim(),internal:this.internal(),subnet:n===``?null:n,gateway:e===``?null:e}).then(m=>{this.problem.set(m),m===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1))}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-network-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,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`172.30.0.0/16`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`172.30.0.1`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`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`]],template:function(n,e){n&1&&(Li(0,`div`,0),vg(`openChange`,function(l){return vS(e.open,l)||(e.open=l),l}),_m(1,Ee,48,38,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Le(i,t){i&1&&(Li(0,`p`,7),fS(1),Nc()),i&2&&(ec(),pg(t))}function Ve(i,t){if(i&1&&(Li(0,`p`,8),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().loading)}}function ze(i,t){if(i&1&&(Li(0,`p`,8),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().empty)}}function Oe(i,t){i&1&&(Li(0,`span`,16),fS(1),Nc()),i&2&&(ec(),pg(t))}function We(i,t){if(i&1){let n=RE();Li(0,`li`,13),Gm(1,`span`,14),Li(2,`a`,15),Jm(`click`,function(){Od(n);return Ld(HE(3).open.set(!1))}),fS(3),Nc(),SE(4,Oe,2,1,`span`,16),Li(5,`span`,17),fS(6),Nc()()}if(i&2){let n,e=t.$implicit,m=HE(3);ec(),nS(e.running?`bg-ok`:`bg-ink-600`),ec(),Wm(`routerLink`,SS(8,Te,e.id)),ec(),pg(e.name),ec(),kE((n=e.composeProject)?4:-1,n),ec(),nS(e.ipAddress?`text-ink-300`:`text-ink-600`),ec(),Ac(` `,e.ipAddress??(e.running?m.t().noAddress:m.t().stopped),` `)}}function Be(i,t){if(i&1&&(Li(0,`ul`,9),kc(1,We,7,10,`li`,13,Re),Nc()),i&2){let n=HE(2);ec(),Tc(n.members())}}function Ae(i,t){if(i&1&&(Gm(0,`div`,2),Li(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li(5,`p`,6),fS(6),Nc(),SE(7,Le,2,1,`p`,7)(8,Ve,2,1,`p`,8)(9,ze,2,1,`p`,8)(10,Be,3,0,`ul`,9),Li(11,`div`,10)(12,`button`,11),Gm(13,`app-icon`,12),fS(14),Nc()()()()),i&2){let n,e=HE();ec(4),pg(e.t().title(e.network())),ec(2),pg(e.t().description),ec(),kE((n=e.problem())?7:e.members()===null?8:e.members()?.length===0?9:10,n),ec(6),Wm(`size`,14),ec(),Ac(` `,e.common().close,` `)}}var Te;var Re;var U;var ye=f(()=>{Kr();ra();Je$1();lk();dk();sk();Kr();Te=i=>[`/containers`,i],Re=(i,t)=>t.id;U=class i{open=mj(!1);network=jc.required();t=Lt(()=>ok().networks.members);common=Lt(()=>ok().common);members=wt(null);problem=wt(null);constructor(){rf(()=>{if(!this.open())return;let t=this.network();Tg(()=>{this.load(t)})})}async load(t){this.members.set(null),this.problem.set(null);try{this.members.set(await window.electron.networks.members(t))}catch(n){this.problem.set(eH(n))}}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-network-members-dialog`]],inputs:{open:[1,`open`],network:[1,`network`]},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`,`network-members-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`network-member-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`,`py-2`,`text-[13px]`],[`aria-hidden`,`true`,1,`size-2`,`shrink-0`,`rounded-full`],[1,`mx-focus`,`min-w-0`,`flex-1`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`click`,`routerLink`],[1,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`w-32`,`shrink-0`,`text-right`,`font-mono`,`text-[12px]`]],template:function(n,e){n&1&&(Li(0,`div`,0),vg(`openChange`,function(l){return vS(e.open,l)||(e.open=l),l}),_m(1,Ae,15,5,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,Yt,My],encapsulation:2})}});function Fe(i,t){if(i&1&&(Li(0,`span`,16),fS(1),Nc()),i&2){let n=HE();ec(),pg(n.t().refreshing)}}function je(i,t){if(i&1){let n=RE();Li(0,`div`,18)(1,`span`,30),fS(2),Nc(),Li(3,`button`,31),Jm(`click`,function(){Od(n);return Ld(HE().askRemoveSelected())}),Gm(4,`app-icon`,32),fS(5),Nc()()}if(i&2){let n=HE();ec(2),pg(n.t().selected(n.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,n.common().remove,` `)}}function He(i,t){if(i&1&&(Li(0,`span`,35),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().builtIn)}}function Ke(i,t){if(i&1&&(Li(0,`span`,35),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().internal)}}function qe(i,t){if(i&1&&(Li(0,`div`,36),fS(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.composeProject)}}function Qe(i,t){if(i&1&&(Li(0,`div`,33)(1,`span`,34),fS(2),Nc(),SE(3,He,2,1,`span`,35),SE(4,Ke,2,1,`span`,35),Nc(),SE(5,qe,2,1,`div`,36)),i&2){let n=t.$implicit;ec(),Wm(`title`,n.shortId),ec(),pg(n.name),ec(),kE(n.builtIn?3:-1),ec(),kE(n.internal?4:-1),ec(),kE(n.composeProject?5:-1)}}function Ue(i,t){if(i&1&&(Li(0,`span`,37),fS(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.driver)}}function Ge(i,t){if(i&1&&(Li(0,`span`,38),fS(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.scope)}}function Je(i,t){if(i&1&&(Li(0,`span`,39),fS(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.subnet)}}function Xe(i,t){i&1&&(Li(0,`span`,40),fS(1,`—`),Nc())}function Ye(i,t){if(i&1&&SE(0,Je,2,1,`span`,39)(1,Xe,2,0,`span`,40),i&2){let n=t.$implicit;kE(n.subnet?0:1)}}function Ze(i,t){if(i&1&&(Li(0,`span`,41),fS(1),Nc()),i&2){let n=HE().$implicit,e=HE();ec(),pg(e.t().containerCount(n.connected))}}function $e(i,t){i&1&&(Li(0,`span`,40),fS(1,`—`),Nc())}function et(i,t){if(i&1&&SE(0,Ze,2,1,`span`,41)(1,$e,2,0,`span`,40),i&2){let n=t.$implicit;kE(n.connected>0?0:1)}}function tt(i,t){if(i&1){let n=RE();Li(0,`div`,42)(1,`app-action-menu`,43),Jm(`picked`,function(m){let l=Od(n).$implicit;return Ld(HE().onRowMenu(m,l))}),Nc()()}if(i&2){let n=t.$implicit,e=HE();ec(),Wm(`label`,e.t().rowMenu(n.name))(`items`,e.rowMenu(n))}}var fe;f(()=>{Kr();f$1();M();G();J();oe();K();dk();x();be();sk();ye();ra();o();Kr();fe=class i$1{store=C(y);preferences=C(p);t=Lt(()=>ok().networks);common=Lt(()=>ok().common);columns=Lt(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`scope`,label:t.scope,width:`90px`},{key:`subnet`,label:t.subnet,width:`160px`},{key:`connected`,label:t.connected,width:`120px`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);hideBuiltIn=this.preferences.flag(`networks.hideBuiltIn`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);membersOpen=wt(!1);membersNetwork=wt(``);rows=Lt(()=>{let t=this.search().trim().toLowerCase(),n=this.hideBuiltIn();return this.store.networks().filter(e=>n&&e.builtIn?!1:t===``||`${e.name} ${e.driver}`.toLowerCase().includes(t))});trackKey=t=>t.id;leden=jc(void 0);router=C(fe$1);route=C(Q$1);constructor(){rf(()=>{let t=this.leden();t!==void 0&&Tg(()=>{this.membersNetwork.set(t),this.membersOpen.set(!0),i(this.router,this.route,`leden`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}removalReason(t){return t.builtIn?this.t().builtInReason:t.connected>0?this.t().connectedReason(t.connected):this.common().remove}rowMenu(t){return[{id:`members`,label:this.t().rowMembers,icon:`containers`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:!this.canRemove(t)||this.pending().has(t.id),danger:!0,hint:this.removalReason(t),separated:!0}]}onRowMenu(t,n){t===`members`?(this.membersNetwork.set(n.name),this.membersOpen.set(!0)):this.askRemove(n)}canRemove(t){return!t.builtIn&&t.connected===0}askRemove(t){let n=this.t().remove;this.action.set({ids:[t.id],title:n.title,description:n.description(t.name),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],n=this.t().remove;this.action.set({ids:t,title:n.manyTitle,description:n.manyDescription(t.length),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}menuItems=Lt(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`,separated:!0}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune()}askPrune(){let t=this.t().prune;this.action.set({ids:[],title:t.title,description:t.description,confirmLabel:t.confirm}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.ids.length===0?this.store.prune():(this.store.removeMany(t.ids),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(){return this.action()?.ids.length===0?`broom`:`trash`}static ɵfac=function(n){return new(n||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-networks-page`]],inputs:{zoek:[1,`zoek`],leden:[1,`leden`]},decls:35,vars:27,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`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-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`,`scope`],[`appCell`,`subnet`],[`appCell`,`connected`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`network`],[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,`flex`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`shrink-0`,`rounded`,`border`,`border-ink-700`,`px-1`,`text-[10px]`,`text-ink-500`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-ink-600`],[1,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(n,e){n&1&&(Li(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Li(6,`div`,4)(7,`div`,5),fS(8),Nc(),Li(9,`div`,6),fS(10),Nc()()(),Li(11,`div`,7)(12,`app-action-menu`,8),Jm(`picked`,function(l){return e.onMenu(l)}),Nc()()(),Li(13,`div`,9)(14,`label`,10)(15,`span`,11),Gm(16,`app-icon`,12),Nc(),Li(17,`span`,13),fS(18),Nc(),Li(19,`input`,14),Jm(`input`,function(l){return e.search.set(l.target.value)}),Nc()(),Li(20,`app-filter-switch`,15),vg(`onChange`,function(l){return vS(e.hideBuiltIn,l)||(e.hideBuiltIn=l),l}),Nc(),SE(21,Fe,2,1,`span`,16),Nc(),Gm(22,`app-page-messages`,17),SE(23,je,6,3,`div`,18),Nc(),Li(24,`div`,19)(25,`app-data-table`,20),vg(`selectedChange`,function(l){return vS(e.selected,l)||(e.selected=l),l}),_m(26,Qe,6,5,`ng-template`,21)(27,Ue,2,1,`ng-template`,22)(28,Ge,2,1,`ng-template`,23)(29,Ye,2,1,`ng-template`,24)(30,et,2,1,`ng-template`,25)(31,tt,2,2,`ng-template`,26),Nc()()(),Li(32,`app-create-network-dialog`,27),vg(`openChange`,function(l){return vS(e.createOpen,l)||(e.createOpen=l),l}),Nc(),Li(33,`app-network-members-dialog`,28),vg(`openChange`,function(l){return vS(e.membersOpen,l)||(e.membersOpen=l),l}),Nc(),Li(34,`app-confirm-dialog`,29),vg(`openChange`,function(l){return vS(e.confirmOpen,l)||(e.confirmOpen=l),l}),Jm(`confirmed`,function(){return e.confirm()}),Nc()),n&2&&(ec(5),pg(e.t().title),ec(3),pg(e.t().unused),ec(2),pg(e.unusedCount()),ec(2),Wm(`label`,e.t().menuLabel)(`items`,e.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(e.t().searchLabel),ec(),Wm(`placeholder`,e.t().searchLabel)(`value`,e.search()),ec(),Wm(`label`,e.t().hideBuiltIn),hg(`on`,e.hideBuiltIn),ec(),kE(e.loading()?21:-1),ec(),Wm(`problem`,e.problem()),ec(),kE(e.selected().size>0?23:-1),ec(2),Wm(`columns`,e.columns())(`rows`,e.rows())(`trackKey`,e.trackKey),hg(`selected`,e.selected),Wm(`emptyMessage`,e.t().empty),ec(7),hg(`open`,e.createOpen),ec(),hg(`open`,e.membersOpen),Wm(`network`,e.membersNetwork()),ec(),hg(`open`,e.confirmOpen),Wm(`title`,e.actionTitle())(`description`,e.actionDescription())(`confirmLabel`,e.actionConfirmLabel())(`confirmIcon`,e.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,U],encapsulation:2})}})();export{fe as NetworksPage};
1
+ import{$n as sk,Bn as ok,Ct as Tg,D as HE,Dn as kc,En as kE,F as Jm,Fn as nS,G as Nc,Gt as _m,L as Kr,Pn as mj,Pt as Wm,Q as Oi,St as Tc,Tn as jc,U as My,Wn as pg,Xn as rf,Z as Od,cn as f,et as Ot,gr as wt,gt as SS,ht as SE,jn as lk,l as C,ln as fS,lr as vg,lt as RE,mr as wc,on as eH,or as vS,r as Ac,rn as dk,sn as ec,w as Gm,xn as hg,z as Ld}from"./chunk-JmNJabM7.js";import"./chunk-xhdtv1sC.js";import"./chunk-Bz7JmGk-.js";import{n as y,t as f$1}from"./chunk-C3aJtPX1.js";import{n as o,t as i}from"./chunk-CxAIbp2c.js";import{n as p,t as M}from"./chunk-eMZWdejE.js";import"./chunk-DCF2sSJN.js";import"./chunk-BFURpTzq.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-6D7_x-nR.js";import{n as x,t as u}from"./chunk-CMjDdCPI.js";import{a as Yt,r as Q$1,s as fe$1,u as ra}from"./chunk-v1AXLZwF.js";import{n as P,t as K}from"./chunk-Cg-fuusV.js";import{n as V,t as G}from"./chunk-CkcnVcC4.js";import{n as W,t as J}from"./chunk-CTthjUi7.js";import{i as z,n as oe,r as x$1}from"./chunk-BSE5rhLU.js";function Ie(i,t){i&1&&(Oi(0,`p`,22),fS(1),Nc()),i&2&&(ec(),pg(t))}function Ee(i,t){if(i&1){let n=RE();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(m){Ld(n);return Od(HE().submit(m))}),Oi(8,`label`,8)(9,`span`,9),fS(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(m){Ld(n);return Od(HE().name.set(m.target.value))}),Nc()(),Oi(12,`label`,11)(13,`input`,12),Jm(`change`,function(m){Ld(n);return Od(HE().internal.set(m.target.checked))}),Nc(),Oi(14,`span`)(15,`span`,13),fS(16),Nc(),Oi(17,`span`,14),fS(18),Nc()()(),Oi(19,`details`,15)(20,`summary`,16),fS(21),Nc(),Oi(22,`label`,17)(23,`span`,9),fS(24),Nc(),Oi(25,`input`,18),Jm(`input`,function(m){Ld(n);return Od(HE().driver.set(m.target.value))}),Nc(),Oi(26,`span`,19),fS(27),Nc()(),Oi(28,`label`,17)(29,`span`,9),fS(30),Nc(),Oi(31,`input`,20),Jm(`input`,function(m){Ld(n);return Od(HE().subnet.set(m.target.value))}),Nc(),Oi(32,`span`,19),fS(33),Nc()(),Oi(34,`label`,17)(35,`span`,9),fS(36),Nc(),Oi(37,`input`,21),Jm(`input`,function(m){Ld(n);return Od(HE().gateway.set(m.target.value))}),Nc(),Oi(38,`span`,19),fS(39),Nc()()(),SE(40,Ie,2,1,`p`,22),Oi(41,`div`,23)(42,`button`,24),Gm(43,`app-icon`,25),fS(44),Nc(),Oi(45,`button`,26),Gm(46,`app-icon`,27),fS(47),Nc()()()()()}if(i&2){let n,e=HE();ec(4),pg(e.t().title),ec(2),pg(e.t().description),ec(4),pg(e.t().nameLabel),ec(),nS(e.field),Wm(`placeholder`,e.t().namePlaceholder)(`value`,e.name())(`disabled`,e.busy()),ec(2),Wm(`checked`,e.internal())(`disabled`,e.busy()),ec(3),pg(e.t().internal),ec(2),pg(e.t().internalHint),ec(),Wm(`open`,e.advanced()),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),ec(3),pg(e.t().subnetLabel),ec(),nS(e.field),Wm(`value`,e.subnet())(`disabled`,e.busy()),ec(2),pg(e.t().subnetHint),ec(3),pg(e.t().gatewayLabel),ec(),nS(e.field),Wm(`value`,e.gateway())(`disabled`,e.busy()),ec(2),pg(e.t().gatewayHint),ec(),kE((n=e.problem())?40:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,e.common().cancel,` `),ec(),Wm(`disabled`,!e.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().creating:e.t().submit,` `)}}var Pe;var Q;var be=f(()=>{Kr();Je$1();f$1();dk();sk();Kr();Pe=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=C(y);open=mj(!1);t=Ot(()=>ok().networks.createDialog);common=Ot(()=>ok().common);field=Pe;name=wt(``);internal=wt(!1);driver=wt(`bridge`);subnet=wt(``);gateway=wt(``);busy=wt(!1);problem=wt(null);advanced=Ot(()=>this.driver().trim()!==`bridge`||this.subnet().trim()!==``||this.gateway().trim()!==``);canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.driver().trim()!==``);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.internal.set(!1),this.driver.set(`bridge`),this.subnet.set(``),this.gateway.set(``),this.problem.set(null)})})}submit(t){if(t.preventDefault(),!this.canSubmit())return;let n=this.subnet().trim(),e=this.gateway().trim();this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),driver:this.driver().trim(),internal:this.internal(),subnet:n===``?null:n,gateway:e===``?null:e}).then(m=>{this.problem.set(m),m===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1))}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-network-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,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`172.30.0.0/16`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`172.30.0.1`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`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`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(e.open,l)||(e.open=l),l}),_m(1,Ee,48,38,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Le(i,t){i&1&&(Oi(0,`p`,7),fS(1),Nc()),i&2&&(ec(),pg(t))}function Ve(i,t){if(i&1&&(Oi(0,`p`,8),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().loading)}}function ze(i,t){if(i&1&&(Oi(0,`p`,8),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().empty)}}function Oe(i,t){i&1&&(Oi(0,`span`,16),fS(1),Nc()),i&2&&(ec(),pg(t))}function We(i,t){if(i&1){let n=RE();Oi(0,`li`,13),Gm(1,`span`,14),Oi(2,`a`,15),Jm(`click`,function(){Ld(n);return Od(HE(3).open.set(!1))}),fS(3),Nc(),SE(4,Oe,2,1,`span`,16),Oi(5,`span`,17),fS(6),Nc()()}if(i&2){let n,e=t.$implicit,m=HE(3);ec(),nS(e.running?`bg-ok`:`bg-ink-600`),ec(),Wm(`routerLink`,SS(8,Te,e.id)),ec(),pg(e.name),ec(),kE((n=e.composeProject)?4:-1,n),ec(),nS(e.ipAddress?`text-ink-300`:`text-ink-600`),ec(),Ac(` `,e.ipAddress??(e.running?m.t().noAddress:m.t().stopped),` `)}}function Be(i,t){if(i&1&&(Oi(0,`ul`,9),kc(1,We,7,10,`li`,13,Re),Nc()),i&2){let n=HE(2);ec(),Tc(n.members())}}function Ae(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Oi(5,`p`,6),fS(6),Nc(),SE(7,Le,2,1,`p`,7)(8,Ve,2,1,`p`,8)(9,ze,2,1,`p`,8)(10,Be,3,0,`ul`,9),Oi(11,`div`,10)(12,`button`,11),Gm(13,`app-icon`,12),fS(14),Nc()()()()),i&2){let n,e=HE();ec(4),pg(e.t().title(e.network())),ec(2),pg(e.t().description),ec(),kE((n=e.problem())?7:e.members()===null?8:e.members()?.length===0?9:10,n),ec(6),Wm(`size`,14),ec(),Ac(` `,e.common().close,` `)}}var Te;var Re;var U;var ye=f(()=>{Kr();ra();Je$1();lk();dk();sk();Kr();Te=i=>[`/containers`,i],Re=(i,t)=>t.id;U=class i{open=mj(!1);network=jc.required();t=Ot(()=>ok().networks.members);common=Ot(()=>ok().common);members=wt(null);problem=wt(null);constructor(){rf(()=>{if(!this.open())return;let t=this.network();Tg(()=>{this.load(t)})})}async load(t){this.members.set(null),this.problem.set(null);try{this.members.set(await window.electron.networks.members(t))}catch(n){this.problem.set(eH(n))}}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-network-members-dialog`]],inputs:{open:[1,`open`],network:[1,`network`]},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`,`network-members-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`network-member-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`,`py-2`,`text-[13px]`],[`aria-hidden`,`true`,1,`size-2`,`shrink-0`,`rounded-full`],[1,`mx-focus`,`min-w-0`,`flex-1`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`click`,`routerLink`],[1,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`w-32`,`shrink-0`,`text-right`,`font-mono`,`text-[12px]`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(e.open,l)||(e.open=l),l}),_m(1,Ae,15,5,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,Yt,My],encapsulation:2})}});function Fe(i,t){if(i&1&&(Oi(0,`span`,16),fS(1),Nc()),i&2){let n=HE();ec(),pg(n.t().refreshing)}}function je(i,t){if(i&1){let n=RE();Oi(0,`div`,18)(1,`span`,30),fS(2),Nc(),Oi(3,`button`,31),Jm(`click`,function(){Ld(n);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,32),fS(5),Nc()()}if(i&2){let n=HE();ec(2),pg(n.t().selected(n.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,n.common().remove,` `)}}function He(i,t){if(i&1&&(Oi(0,`span`,35),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().builtIn)}}function Ke(i,t){if(i&1&&(Oi(0,`span`,35),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().internal)}}function qe(i,t){if(i&1&&(Oi(0,`div`,36),fS(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.composeProject)}}function Qe(i,t){if(i&1&&(Oi(0,`div`,33)(1,`span`,34),fS(2),Nc(),SE(3,He,2,1,`span`,35),SE(4,Ke,2,1,`span`,35),Nc(),SE(5,qe,2,1,`div`,36)),i&2){let n=t.$implicit;ec(),Wm(`title`,n.shortId),ec(),pg(n.name),ec(),kE(n.builtIn?3:-1),ec(),kE(n.internal?4:-1),ec(),kE(n.composeProject?5:-1)}}function Ue(i,t){if(i&1&&(Oi(0,`span`,37),fS(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.driver)}}function Ge(i,t){if(i&1&&(Oi(0,`span`,38),fS(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.scope)}}function Je(i,t){if(i&1&&(Oi(0,`span`,39),fS(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.subnet)}}function Xe(i,t){i&1&&(Oi(0,`span`,40),fS(1,`—`),Nc())}function Ye(i,t){if(i&1&&SE(0,Je,2,1,`span`,39)(1,Xe,2,0,`span`,40),i&2){let n=t.$implicit;kE(n.subnet?0:1)}}function Ze(i,t){if(i&1&&(Oi(0,`span`,41),fS(1),Nc()),i&2){let n=HE().$implicit,e=HE();ec(),pg(e.t().containerCount(n.connected))}}function $e(i,t){i&1&&(Oi(0,`span`,40),fS(1,`—`),Nc())}function et(i,t){if(i&1&&SE(0,Ze,2,1,`span`,41)(1,$e,2,0,`span`,40),i&2){let n=t.$implicit;kE(n.connected>0?0:1)}}function tt(i,t){if(i&1){let n=RE();Oi(0,`div`,42)(1,`app-action-menu`,43),Jm(`picked`,function(m){let l=Ld(n).$implicit;return Od(HE().onRowMenu(m,l))}),Nc()()}if(i&2){let n=t.$implicit,e=HE();ec(),Wm(`label`,e.t().rowMenu(n.name))(`items`,e.rowMenu(n))}}var fe;f(()=>{Kr();f$1();M();G();J();oe();K();dk();x();be();sk();ye();ra();o();Kr();fe=class i$1{store=C(y);preferences=C(p);t=Ot(()=>ok().networks);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:`scope`,label:t.scope,width:`90px`},{key:`subnet`,label:t.subnet,width:`160px`},{key:`connected`,label:t.connected,width:`120px`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);hideBuiltIn=this.preferences.flag(`networks.hideBuiltIn`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);membersOpen=wt(!1);membersNetwork=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),n=this.hideBuiltIn();return this.store.networks().filter(e=>n&&e.builtIn?!1:t===``||`${e.name} ${e.driver}`.toLowerCase().includes(t))});trackKey=t=>t.id;leden=jc(void 0);router=C(fe$1);route=C(Q$1);constructor(){rf(()=>{let t=this.leden();t!==void 0&&Tg(()=>{this.membersNetwork.set(t),this.membersOpen.set(!0),i(this.router,this.route,`leden`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}removalReason(t){return t.builtIn?this.t().builtInReason:t.connected>0?this.t().connectedReason(t.connected):this.common().remove}rowMenu(t){return[{id:`members`,label:this.t().rowMembers,icon:`containers`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:!this.canRemove(t)||this.pending().has(t.id),danger:!0,hint:this.removalReason(t),separated:!0}]}onRowMenu(t,n){t===`members`?(this.membersNetwork.set(n.name),this.membersOpen.set(!0)):this.askRemove(n)}canRemove(t){return!t.builtIn&&t.connected===0}askRemove(t){let n=this.t().remove;this.action.set({ids:[t.id],title:n.title,description:n.description(t.name),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],n=this.t().remove;this.action.set({ids:t,title:n.manyTitle,description:n.manyDescription(t.length),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`,separated:!0}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune()}askPrune(){let t=this.t().prune;this.action.set({ids:[],title:t.title,description:t.description,confirmLabel:t.confirm}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.ids.length===0?this.store.prune():(this.store.removeMany(t.ids),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(){return this.action()?.ids.length===0?`broom`:`trash`}static ɵfac=function(n){return new(n||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-networks-page`]],inputs:{zoek:[1,`zoek`],leden:[1,`leden`]},decls:35,vars:27,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`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-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`,`scope`],[`appCell`,`subnet`],[`appCell`,`connected`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`network`],[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,`flex`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`shrink-0`,`rounded`,`border`,`border-ink-700`,`px-1`,`text-[10px]`,`text-ink-500`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-ink-600`],[1,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(n,e){n&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`,5),fS(8),Nc(),Oi(9,`div`,6),fS(10),Nc()()(),Oi(11,`div`,7)(12,`app-action-menu`,8),Jm(`picked`,function(l){return e.onMenu(l)}),Nc()()(),Oi(13,`div`,9)(14,`label`,10)(15,`span`,11),Gm(16,`app-icon`,12),Nc(),Oi(17,`span`,13),fS(18),Nc(),Oi(19,`input`,14),Jm(`input`,function(l){return e.search.set(l.target.value)}),Nc()(),Oi(20,`app-filter-switch`,15),vg(`onChange`,function(l){return vS(e.hideBuiltIn,l)||(e.hideBuiltIn=l),l}),Nc(),SE(21,Fe,2,1,`span`,16),Nc(),Gm(22,`app-page-messages`,17),SE(23,je,6,3,`div`,18),Nc(),Oi(24,`div`,19)(25,`app-data-table`,20),vg(`selectedChange`,function(l){return vS(e.selected,l)||(e.selected=l),l}),_m(26,Qe,6,5,`ng-template`,21)(27,Ue,2,1,`ng-template`,22)(28,Ge,2,1,`ng-template`,23)(29,Ye,2,1,`ng-template`,24)(30,et,2,1,`ng-template`,25)(31,tt,2,2,`ng-template`,26),Nc()()(),Oi(32,`app-create-network-dialog`,27),vg(`openChange`,function(l){return vS(e.createOpen,l)||(e.createOpen=l),l}),Nc(),Oi(33,`app-network-members-dialog`,28),vg(`openChange`,function(l){return vS(e.membersOpen,l)||(e.membersOpen=l),l}),Nc(),Oi(34,`app-confirm-dialog`,29),vg(`openChange`,function(l){return vS(e.confirmOpen,l)||(e.confirmOpen=l),l}),Jm(`confirmed`,function(){return e.confirm()}),Nc()),n&2&&(ec(5),pg(e.t().title),ec(3),pg(e.t().unused),ec(2),pg(e.unusedCount()),ec(2),Wm(`label`,e.t().menuLabel)(`items`,e.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(e.t().searchLabel),ec(),Wm(`placeholder`,e.t().searchLabel)(`value`,e.search()),ec(),Wm(`label`,e.t().hideBuiltIn),hg(`on`,e.hideBuiltIn),ec(),kE(e.loading()?21:-1),ec(),Wm(`problem`,e.problem()),ec(),kE(e.selected().size>0?23:-1),ec(2),Wm(`columns`,e.columns())(`rows`,e.rows())(`trackKey`,e.trackKey),hg(`selected`,e.selected),Wm(`emptyMessage`,e.t().empty),ec(7),hg(`open`,e.createOpen),ec(),hg(`open`,e.membersOpen),Wm(`network`,e.membersNetwork()),ec(),hg(`open`,e.confirmOpen),Wm(`title`,e.actionTitle())(`description`,e.actionDescription())(`confirmLabel`,e.actionConfirmLabel())(`confirmIcon`,e.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,U],encapsulation:2})}})();export{fe as NetworksPage};
@@ -1 +1 @@
1
- import{R as Kr,Vn as ok,_r as wt,er as sk,ln as f,u as C,zt as X}from"./chunk-C_5f0tVq.js";import{n as u,t as f$1}from"./chunk-Bg_b-Jjw.js";var c;var y=f(()=>{Kr();sk();f$1();Kr();c=class s{toast=C(u);cliStatus=wt(null);running=wt(new Set);status=this.cliStatus.asReadonly();pending=this.running.asReadonly();async loadStatus(){this.cliStatus.set(await window.electron.compose.status())}async up(t){await this.run(t,`up`)}async down(t){await this.run(t,`down`)}async recreate(t,n){this.running.update(e=>new Set(e).add(t));try{let e=await window.electron.compose.recreate(t,n);return e.ok?this.toast.success(ok().compose.recreateDone(n)):this.toast.error(e.problem),e.ok}finally{this.release(t)}}async run(t,n){this.running.update(e=>new Set(e).add(t));try{let e=await(n===`up`?window.electron.compose.up(t):window.electron.compose.down(t));if(e.ok){let r=ok().compose;this.toast.success(n===`up`?r.upDone(t):r.downDone(t))}else this.toast.error(e.problem)}finally{this.release(t)}}release(t){this.running.update(n=>{let e=new Set(n);return e.delete(t),e})}static ɵfac=function(n){return new(n||s)};static ɵprov=X({token:s,factory:s.ɵfac,providedIn:`root`})}});export{y as n,c as t};
1
+ import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f,gr as wt,l as C}from"./chunk-JmNJabM7.js";import{n as u,t as f$1}from"./chunk-xhdtv1sC.js";var c;var y=f(()=>{Kr();sk();f$1();Kr();c=class s{toast=C(u);cliStatus=wt(null);running=wt(new Set);status=this.cliStatus.asReadonly();pending=this.running.asReadonly();async loadStatus(){this.cliStatus.set(await window.electron.compose.status())}async up(t){await this.run(t,`up`)}async down(t){await this.run(t,`down`)}async recreate(t,n){this.running.update(e=>new Set(e).add(t));try{let e=await window.electron.compose.recreate(t,n);return e.ok?this.toast.success(ok().compose.recreateDone(n)):this.toast.error(e.problem),e.ok}finally{this.release(t)}}async run(t,n){this.running.update(e=>new Set(e).add(t));try{let e=await(n===`up`?window.electron.compose.up(t):window.electron.compose.down(t));if(e.ok){let r=ok().compose;this.toast.success(n===`up`?r.upDone(t):r.downDone(t))}else this.toast.error(e.problem)}finally{this.release(t)}}release(t){this.running.update(n=>{let e=new Set(n);return e.delete(t),e})}static ɵfac=function(n){return new(n||s)};static ɵprov=X({token:s,factory:s.ɵfac,providedIn:`root`})}});export{y as n,c as t};
@@ -1 +1 @@
1
- import{A as IE,Ct as Tc,Dn as kE,Ft as Wm,Gn as pg,H as Li,I as Jm,J as My,O as HE,On as kc,Qn as rg,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Zn as rf,_n as gj,_r as wt,cn as ec,er as sk,gt as SE,h as DE,hr as wc,in as dk,ln as f,o as BE,pt as Rm,r as Ac,sr as vS,tt as Od,un as fS,ur as vg,ut as RE,vt as Sc}from"./chunk-C_5f0tVq.js";import"./chunk-BxCMq76L.js";import"./chunk-0lzDD7VN.js";import"./chunk-CEIzuD8m.js";import"./chunk-S9IeOMe4.js";import"./chunk-CG34bAfY.js";import{n as ro,t as Ql}from"./chunk-DfetwWmp.js";import{a as fi,i as _e,n as Qt,o as gi,r as Ye,s as we,t as Le}from"./chunk-C5DLS5H5.js";function te(n,a){if(n&1&&(Li(0,`button`,7),Gm(1,`app-icon`,10),fS(2),Nc()),n&2){let e=a.$implicit,t=HE();Wm(`value`,e),ec(),Wm(`name`,t.tabIcons[e])(`size`,14),ec(),Ac(``,t.tabLabel(e),` `)}}function ae(n,a){if(n&1&&Gm(0,`app-terminal-view`,11),n&2)Wm(`active`,HE().tab()===`terminal`)}function ne(n,a){if(n&1&&(Li(0,`p`,12),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function ie(n,a){if(n&1){let e=RE();Li(0,`div`,9)(1,`app-assistant-view`,13),Jm(`commandChosen`,function(g){Od(e);return Ld(HE().insertCommand(g))}),Nc()()}}var ee;var J;f(()=>{Kr();Le();dk();Ye();Ql();sk();Kr();ee=()=>[ro];J=class n{terminal=gj(ro);t=Lt(()=>ok().terminal);tabIcons={terminal:`terminal`,assistant:`sparkle`};assistantConfigured=wt(!1);tabNames=Lt(()=>this.assistantConfigured()?[`terminal`,`assistant`]:[`terminal`]);tab=wt(`terminal`);visited=wt(new Set([`terminal`]));constructor(){rf(()=>{let a=this.tab();this.visited.update(e=>e.has(a)?e:new Set(e).add(a))}),window.electron.assistant.status().then(a=>this.assistantConfigured.set(a.configured)).catch(()=>this.assistantConfigured.set(!1))}tabLabel(a){return this.t().tabs[a]}insertCommand(a){this.tab.set(`terminal`),this.terminal()?.insert(a)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-terminal-page`]],viewQuery:function(e,t){e&1&&rg(t.terminal,ro,5),e&2&&BE()},decls:25,vars:8,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`text-ink-200`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`active`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[3,`commandChosen`]],template:function(e,t){e&1&&(Li(0,`section`,0)(1,`div`,1)(2,`h1`,2),fS(3),Nc(),Li(4,`p`,3),fS(5),Li(6,`code`),fS(7,`docker`),Nc(),fS(8),Li(9,`strong`,4),fS(10,`root`),Nc(),fS(11),Li(12,`code`),fS(13,`alpine`),Nc(),fS(14),Nc()(),Li(15,`div`,5),vg(`valueChange`,function(l){return vS(t.tab,l)||(t.tab=l),l}),Li(16,`div`,6),kc(17,te,3,4,`button`,7,Sc),Nc(),Li(19,`div`,8),Rm(20,ae,1,1)(21,ne,2,1),DE(22,20,ee,21),IE(),Nc(),SE(24,ie,2,0,`div`,9),Nc()()),e&2&&(ec(3),pg(t.t().title),ec(2),Ac(` `,t.t().intro.start,` `),ec(3),pg(t.t().intro.afterDocker),ec(3),pg(t.t().intro.afterRoot),ec(3),Ac(``,t.t().intro.afterAlpine,` `),ec(),hg(`value`,t.tab),ec(),zr(`aria-label`,t.t().tabsLabel),ec(),Tc(t.tabNames()),ec(7),kE(t.assistantConfigured()&&t.visited().has(`assistant`)?24:-1))},dependencies:[we,fi,gi,_e,My,Qt],encapsulation:2})}})();export{J as TerminalPage};
1
+ import{$n as sk,Bn as ok,Cr as zE,D as HE,Dn as kc,En as kE,F as Jm,G as Nc,L as Kr,Pt as Wm,Q as Oi,St as Tc,U as My,Wn as pg,Xn as rf,Z as Od,Zn as rg,_t as Sc,cn as f,et as Ot,ft as Rm,gn as gj,gr as wt,ht as SE,k as IE,ln as fS,lr as vg,lt as RE,m as DE,mr as wc,or as vS,r as Ac,rn as dk,s as Br,sn as ec,w as Gm,xn as hg,z as Ld}from"./chunk-JmNJabM7.js";import"./chunk-CRyY-2KM.js";import"./chunk-Bz7JmGk-.js";import"./chunk-ZkkhKXw6.js";import"./chunk-DCF2sSJN.js";import"./chunk-BFURpTzq.js";import{a as fi,i as _e,n as Qt,o as gi,r as Ye,s as we,t as Le}from"./chunk-DEE8TVR7.js";import{n as ro,t as Ql}from"./chunk-DSQAF8Vk.js";function te(n,a){if(n&1&&(Oi(0,`button`,7),Gm(1,`app-icon`,10),fS(2),Nc()),n&2){let e=a.$implicit,t=HE();Wm(`value`,e),ec(),Wm(`name`,t.tabIcons[e])(`size`,14),ec(),Ac(``,t.tabLabel(e),` `)}}function ae(n,a){if(n&1&&Gm(0,`app-terminal-view`,11),n&2)Wm(`active`,HE().tab()===`terminal`)}function ne(n,a){if(n&1&&(Oi(0,`p`,12),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function ie(n,a){if(n&1){let e=RE();Oi(0,`div`,9)(1,`app-assistant-view`,13),Jm(`commandChosen`,function(g){Ld(e);return Od(HE().insertCommand(g))}),Nc()()}}var ee;var J;f(()=>{Kr();Le();dk();Ye();Ql();sk();Kr();ee=()=>[ro];J=class n{terminal=gj(ro);t=Ot(()=>ok().terminal);tabIcons={terminal:`terminal`,assistant:`sparkle`};assistantConfigured=wt(!1);tabNames=Ot(()=>this.assistantConfigured()?[`terminal`,`assistant`]:[`terminal`]);tab=wt(`terminal`);visited=wt(new Set([`terminal`]));constructor(){rf(()=>{let a=this.tab();this.visited.update(e=>e.has(a)?e:new Set(e).add(a))}),window.electron.assistant.status().then(a=>this.assistantConfigured.set(a.configured)).catch(()=>this.assistantConfigured.set(!1))}tabLabel(a){return this.t().tabs[a]}insertCommand(a){this.tab.set(`terminal`),this.terminal()?.insert(a)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-terminal-page`]],viewQuery:function(e,t){e&1&&rg(t.terminal,ro,5),e&2&&zE()},decls:25,vars:8,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`text-ink-200`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`active`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[3,`commandChosen`]],template:function(e,t){e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`h1`,2),fS(3),Nc(),Oi(4,`p`,3),fS(5),Oi(6,`code`),fS(7,`docker`),Nc(),fS(8),Oi(9,`strong`,4),fS(10,`root`),Nc(),fS(11),Oi(12,`code`),fS(13,`alpine`),Nc(),fS(14),Nc()(),Oi(15,`div`,5),vg(`valueChange`,function(l){return vS(t.tab,l)||(t.tab=l),l}),Oi(16,`div`,6),kc(17,te,3,4,`button`,7,Sc),Nc(),Oi(19,`div`,8),Rm(20,ae,1,1)(21,ne,2,1),DE(22,20,ee,21),IE(),Nc(),SE(24,ie,2,0,`div`,9),Nc()()),e&2&&(ec(3),pg(t.t().title),ec(2),Ac(` `,t.t().intro.start,` `),ec(3),pg(t.t().intro.afterDocker),ec(3),pg(t.t().intro.afterRoot),ec(3),Ac(``,t.t().intro.afterAlpine,` `),ec(),hg(`value`,t.tab),ec(),Br(`aria-label`,t.t().tabsLabel),ec(),Tc(t.tabNames()),ec(7),kE(t.assistantConfigured()&&t.visited().has(`assistant`)?24:-1))},dependencies:[we,fi,gi,_e,My,Qt],encapsulation:2})}})();export{J as TerminalPage};