@whoz-oss/coday-client 3.16.0 → 3.18.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 (96) hide show
  1. package/browser/chunk--yaU4Sri.js +1 -0
  2. package/browser/{chunk-kvCfAm7Z.js → chunk-4uEZjTft.js} +1 -1
  3. package/browser/chunk-4v7WiOTx.js +1 -0
  4. package/browser/chunk-B-UKlpjJ.js +1 -0
  5. package/browser/chunk-B13_C_P9.js +675 -0
  6. package/browser/chunk-B17Inq8D.js +2 -0
  7. package/browser/chunk-B1vuv-dv.js +1 -0
  8. package/browser/{chunk-Bhq5earA.js → chunk-BEdQqXxw.js} +1 -1
  9. package/browser/{chunk-B_9LxHBv.js → chunk-BGTRsbsl.js} +1 -1
  10. package/browser/{chunk-pH1k_bet.js → chunk-BHiaH1Jm.js} +1 -1
  11. package/browser/chunk-BJld3zB5.js +9 -0
  12. package/browser/{chunk-7jUQT_3F.js → chunk-BVmICoo4.js} +1 -1
  13. package/browser/chunk-BXCHG0wB.js +1 -0
  14. package/browser/{chunk-DOq0u21j.js → chunk-B_Sx6nwb.js} +1 -1
  15. package/browser/{chunk-CXLytVC3.js → chunk-BbPMe8u2.js} +1 -1
  16. package/browser/{chunk-6gdeYlLc.js → chunk-Bb_J3EoX.js} +1 -1
  17. package/browser/chunk-BfE6wTUj.js +1 -0
  18. package/browser/chunk-Bnj9Hkqy.js +276 -0
  19. package/browser/chunk-BqWEyotW.js +55 -0
  20. package/browser/{chunk-Dcftf7UY.js → chunk-Buu9Jf-V.js} +2 -2
  21. package/browser/{chunk-0OiZWE88.js → chunk-CJAdjOmi.js} +1 -1
  22. package/browser/{chunk-Bn3R3VC2.js → chunk-CJEW8Ogd.js} +5 -5
  23. package/browser/chunk-CM1_Z4h5.js +1 -0
  24. package/browser/{chunk-BTS5TBK0.js → chunk-CP3b1EMm.js} +1 -1
  25. package/browser/chunk-CR817PBg.js +1 -0
  26. package/browser/{chunk-YfG457Nc.js → chunk-CXgj_KJY.js} +3 -3
  27. package/browser/{chunk-CYulIMKp.js → chunk-CakkML6n.js} +1 -1
  28. package/browser/{chunk-DQLU3kYb.js → chunk-CfPmQ0Fw.js} +1 -1
  29. package/browser/chunk-CgNkwpQ7.js +508 -0
  30. package/browser/chunk-Cjk-zAXy.js +1 -0
  31. package/browser/chunk-ClCDsg8D.js +5 -0
  32. package/browser/{chunk-BdpJ2ZCM.js → chunk-CmyT-Z4A.js} +1 -1
  33. package/browser/{chunk-C_s4Z3Dk.js → chunk-CqJ7rGVY.js} +1 -1
  34. package/browser/{chunk-SbH2L3h2.js → chunk-CxpHnwnx.js} +1 -1
  35. package/browser/{chunk-CtWMrBfw.js → chunk-D1ZnLng-.js} +1 -1
  36. package/browser/{chunk-swj7IkJA.js → chunk-D26Y186i.js} +1 -1
  37. package/browser/chunk-D2zGvbD2.js +190 -0
  38. package/browser/{chunk-IUvEtpfr.js → chunk-D30bRRTP.js} +1 -1
  39. package/browser/{chunk-CTuHnJP4.js → chunk-D4dmZgr6.js} +1 -1
  40. package/browser/{chunk-CiWu4t_i.js → chunk-D6nkbOg1.js} +1 -1
  41. package/browser/chunk-D8nXP3jN.js +2 -0
  42. package/browser/{chunk-BNS6Fgaw.js → chunk-D92adUD_.js} +1 -1
  43. package/browser/{chunk-Bib1Seeu.js → chunk-DDu5Ufv3.js} +1 -1
  44. package/browser/{chunk-HjD5Rk4C.js → chunk-DFjZf9oL.js} +3 -3
  45. package/browser/{chunk-B0vRsgnD.js → chunk-DJjbZAaS.js} +1 -1
  46. package/browser/{chunk-CgqDTJ5-.js → chunk-DKQvH1hP.js} +1 -1
  47. package/browser/{chunk-UzUd84Qf.js → chunk-DMUiJ7oP.js} +1 -1
  48. package/browser/chunk-DMyGIjcZ.js +1 -0
  49. package/browser/chunk-DOHvMo5p.js +1 -0
  50. package/browser/{chunk-CbK5Lcu9.js → chunk-DVTNoWCQ.js} +1 -1
  51. package/browser/chunk-DV_7IOl_.js +1 -0
  52. package/browser/chunk-DaoWXYMw.js +1 -0
  53. package/browser/{chunk-jv0lz5Ah.js → chunk-DmaEv05C.js} +1 -1
  54. package/browser/{chunk-BSSDDOqW.js → chunk-DoqL_RuM.js} +2 -2
  55. package/browser/chunk-FMHkoXwM.js +37 -0
  56. package/browser/{chunk-axGY7UtD.js → chunk-Fr6-w83-.js} +1 -1
  57. package/browser/{chunk-iNIQR015.js → chunk-HHPhxe9B.js} +1 -1
  58. package/browser/{chunk-fhFxOLYS.js → chunk-IYMfBoNU.js} +1 -1
  59. package/browser/chunk-PQu4_Hy2.js +2 -0
  60. package/browser/chunk-Qpb04pBJ.js +1 -0
  61. package/browser/{chunk-CBNhmZDS.js → chunk-W5DNK5PC.js} +1 -1
  62. package/browser/{chunk-BHZY3TvC.js → chunk-WSA7xa0h.js} +5 -5
  63. package/browser/{chunk-BJYyjaQ6.js → chunk-lX2E6ugr.js} +1 -1
  64. package/browser/{chunk-CGMAzvSo.js → chunk-o2LY9dfG.js} +1 -1
  65. package/browser/{chunk-DzlrRiVM.js → chunk-py_Q_oQH.js} +1 -1
  66. package/browser/{chunk-BUJoEGsf.js → chunk-t87lD8bQ.js} +1 -1
  67. package/browser/{chunk-Be1LOFvg.js → chunk-vL7dLM7S.js} +1 -1
  68. package/browser/{chunk-Co81dkbz.js → chunk-zvR-rokl.js} +1 -1
  69. package/browser/index.html +1 -1
  70. package/browser/main-YYHD6X7H.js +1811 -0
  71. package/package.json +1 -1
  72. package/browser/chunk-BEKR4Un_.js +0 -1
  73. package/browser/chunk-BEUXx3TO.js +0 -1
  74. package/browser/chunk-BJeLQooO.js +0 -1
  75. package/browser/chunk-BY7uKZAo.js +0 -9
  76. package/browser/chunk-BdApeECy.js +0 -1
  77. package/browser/chunk-C-aF2_1R.js +0 -55
  78. package/browser/chunk-CFZbDe5T.js +0 -5
  79. package/browser/chunk-CPBcDx4G.js +0 -1
  80. package/browser/chunk-Ci1jk71f.js +0 -276
  81. package/browser/chunk-CjrWXBiR.js +0 -2
  82. package/browser/chunk-CtkiOUdU.js +0 -675
  83. package/browser/chunk-CwaAd8kk.js +0 -1
  84. package/browser/chunk-DDnWPYAA.js +0 -2
  85. package/browser/chunk-Dfujxxcr.js +0 -1
  86. package/browser/chunk-DgrvmqY2.js +0 -2
  87. package/browser/chunk-DoKoAMs6.js +0 -1
  88. package/browser/chunk-Dtu-PLbq.js +0 -1
  89. package/browser/chunk-S8F5_Te_.js +0 -508
  90. package/browser/chunk-YS-vAhPY.js +0 -190
  91. package/browser/chunk-fYErSEXN.js +0 -1
  92. package/browser/chunk-gmPqDrDS.js +0 -1
  93. package/browser/chunk-izARvh_2.js +0 -1
  94. package/browser/chunk-rwEyLSEP.js +0 -1
  95. package/browser/chunk-tTmeIHGS.js +0 -37
  96. package/browser/main-5PAOSHSM.js +0 -1811
@@ -1,190 +0,0 @@
1
- import {c as ce,s as se,b as at$1,d as de}from'./chunk-YfG457Nc.js';import {a as Dr,b as gr,_ as _r,g as gt,z as zi,F as Fn,H as Hi}from'./chunk-CtkiOUdU.js';import {W as We,Q as Qt}from'./chunk-S8F5_Te_.js';import {aL as Eo,aM as qn,bD as ge,aO as wt,bE as vt,g,bN as F,bs as bl,az as Kt,bt as Qn,aT as Ut,aR as Fs,c4 as On,aW as w,aS as K,an as ce$1,a as Gi,bQ as Yy,bR as Sd,bS as Da,bP as Qy,al as yt,ae as Ot,u as ue,by as cm,c5 as Et,ap as Hy,aA as an$1,bu as Ve,c6 as Rt,bH as Pt$1,c1 as E,h as Fw,c7 as _e$1,aC as bu,a_ as JT,c8 as eb,bA as wC,m as ws,o as Rg,q as oC,n as hl,c9 as Ff,S as Sg,af as Eg,M as MC,t as nI,T as Tg,x as iC,v as bg,b5 as sT,A as Ug,C as Pg,D as bC,H as SC,bv as Fg,bL as pe,c3 as kt,Q as QC,ac as EC,a8 as Yg,a9 as gC,aa as wf,ab as Cf,bB as CC,b$ as BC}from'./main-5PAOSHSM.js';import {_,b as _e,d as an,E as En}from'./chunk-tTmeIHGS.js';var Qe=["trigger"],Ye=["panel"],Ue=[[["mat-select-trigger"]],"*"],Xe=["mat-select-trigger","*"];function Je(a,_){if(a&1&&(ws(0,"span",4),QC(1),hl()),a&2){let e=EC();nI(),Yg(e.placeholder);}}function Ze(a,_){a&1&&CC(0);}function $e(a,_){if(a&1&&(ws(0,"span",11),QC(1),hl()),a&2){let e=EC(2);nI(),Yg(e.triggerValue);}}function et(a,_){if(a&1&&(ws(0,"span",5),oC(1,Ze,1,0)(2,$e,2,1,"span",11),hl()),a&2){let e=EC();nI(),iC(e.customTrigger?1:2);}}function tt(a,_){if(a&1){let e=gC();ws(0,"div",12,1),Rg("keydown",function(i){wf(e);let n=EC();return Cf(n._handleKeydown(i))}),CC(2,1),hl();}if(a&2){let e=EC();BC(e.panelClass),Ug("mat-select-panel-animations-enabled",!e._animationsDisabled)("mat-primary",e._parentFormField?.color==="primary")("mat-accent",e._parentFormField?.color==="accent")("mat-warn",e._parentFormField?.color==="warn")("mat-undefined",!e._parentFormField?.color),Tg("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby());}}var it=new w("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let a=g(pe);return ()=>kt(a)}}),nt=new w("MAT_SELECT_CONFIG"),at=new w("MatSelectTrigger"),B=class{source;value;constructor(_,e){this.source=_,this.value=e;}},Lt=(()=>{class a{_viewportRuler=g(F);_changeDetectorRef=g(bl);_elementRef=g(Kt);_dir=g(Qn,{optional:true});_idGenerator=g(Ut);_renderer=g(Fs);_parentFormField=g(se,{optional:true});ngControl=g(_,{self:true,optional:true});_liveAnnouncer=g(On);_defaultOptions=g(nt,{optional:true});_animationsDisabled=K();_popoverLocation;_initialized=new ce$1;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,n=gr(e,this.options,this.optionGroups),r=t._getHostElement();e===0&&n===1?i.scrollTop=0:i.scrollTop=_r(r.offsetTop,r.offsetHeight,i.scrollTop,i.offsetHeight);}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0);}_getChangeEvent(e){return new B(this,e)}_scrollStrategyFactory=g(it);_panelOpen=false;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new ce$1;_errorStateTracker;stateChanges=new ce$1;disableAutomaticLabeling=true;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=false;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=false;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e);}_disableRipple=Gi(false);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??false;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next();}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(_e.required)??false}set required(e){this._required=e,this.stateChanges.next();}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e;}_multiple=false;disableOptionCentering=this._defaultOptions?.disableOptionCentering??false;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection();}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e);}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e;}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next();}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e;}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??false;optionSelectionChanges=Yy(()=>{let e=this.options;return e?e.changes.pipe(Sd(e),Da(()=>Qy(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(Da(()=>this.optionSelectionChanges))});openedChange=new yt;_openedStream=this.openedChange.pipe(Ot(e=>e),ue(()=>{}));_closedStream=this.openedChange.pipe(Ot(e=>!e),ue(()=>{}));selectionChange=new yt;valueChange=new yt;constructor(){let e=g(We),t=g(an,{optional:true}),i=g(En,{optional:true}),n=g(new cm("tabindex"),{optional:true}),r=g(Et,{optional:true}),d=g(at$1,{optional:true,self:true});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Qt(e,d||this.ngControl,i,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=n==null?0:parseInt(n)||0,this._popoverLocation=r?.usePopover===false?null:"inline",this.id=this.id;}ngOnInit(){this._selectionModel=new gt(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(Hy(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges());});}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Hy(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect());}),this.options.changes.pipe(Sd(null),Hy(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection();});}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby");}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState());}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval),e.panelClass&&this.panelClass instanceof Set&&(this.panelClass=Array.from(this.panelClass));}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete();}toggle(){this.panelOpen?this.close():this.open();}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._panelOpen=true,this._overlayDir.positionChange.pipe(an$1(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled();}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(true)));}close(){this._panelOpen&&(this._panelOpen=false,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(false)));}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(i),this._cleanupDetach=void 0;};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",n=>{n.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay());}),i=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay();},200);e.classList.add("mat-select-panel-exit");}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck();}writeValue(e){this._assignValue(e);}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next();}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return "";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState();}_isRtl(){return this._dir?this._dir.value==="rtl":false}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e));}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,n=t===13||t===32,r=this._keyManager;if(!r.isTyping()&&n&&!Ve(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let d=this.selected;r.onKeydown(e);let o=this.selected;o&&d!==o&&this._liveAnnouncer.announce(o.viewValue,1e4);}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,n=i===40||i===38,r=t.isTyping();if(n&&e.altKey)e.preventDefault(),this.close();else if(!r&&(i===13||i===32)&&t.activeItem&&!Ve(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!r&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let d=this.options.some(o=>!o.disabled&&!o.selected);this.options.forEach(o=>{o.disabled||(d?o.select():o.deselect());});}else {let d=t.activeItemIndex;t.onKeydown(e),this._multiple&&n&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==d&&t.activeItem._selectViaInteraction();}}_handleOverlayKeydown(e){e.keyCode===27&&!Ve(e)&&(e.preventDefault(),this.close());}_onFocus(){this.disabled||(this._focused=true,this.stateChanges.next());}_onBlur(){this._focused=false,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next());}get empty(){return !this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next();});}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else {let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1);}this._changeDetectorRef.markForCheck();}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return false;try{return (i.value!=null||this.canSelectNullableOptions)&&this._compareWith(i.value,e)}catch(n){return false}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,true):false}_skipPredicate=e=>this.panelOpen?false:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof Rt?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}_initKeyManager(){this._keyManager=new Pt$1(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close());}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction();});}_resetOptions(){let e=Qy(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Hy(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus());}),Qy(...this.options.map(t=>t._stateChanges)).pipe(Hy(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next();});}_onSelect(e,t){let i=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next();}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next();}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck();}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e);}else this._keyManager.setActiveItem(this._selectionModel.selected[0]);}_canOpen(){return !this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e);}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby");}onContainerClick(e){let t=E(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open());}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=Fw({type:a,selectors:[["mat-select"]],contentQueries:function(t,i,n){if(t&1&&Fg(n,at,5)(n,Fn,5)(n,Hi,5),t&2){let r;bC(r=SC())&&(i.customTrigger=r.first),bC(r=SC())&&(i.options=r),bC(r=SC())&&(i.optionGroups=r);}},viewQuery:function(t,i){if(t&1&&Pg(Qe,5)(Ye,5)(_e$1,5),t&2){let n;bC(n=SC())&&(i.trigger=n.first),bC(n=SC())&&(i.panel=n.first),bC(n=SC())&&(i._overlayDir=n.first);}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,i){t&1&&Rg("keydown",function(r){return i._handleKeydown(r)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(Tg("id",i.id)("tabindex",i.disabled?-1:i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),Ug("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple)("mat-select-open",i.panelOpen));},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",JT],disableRipple:[2,"disableRipple","disableRipple",JT],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:eb(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",JT],placeholder:"placeholder",required:[2,"required","required",JT],multiple:[2,"multiple","multiple",JT],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",JT],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",eb],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",JT]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[sT([{provide:de,useExisting:a},{provide:zi,useExisting:a}]),bu],ngContentSelectors:Xe,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",1,"mat-mdc-select-panel","mdc-menu-surface","mdc-menu-surface--open",3,"keydown"]],template:function(t,i){if(t&1&&(wC(Ue),ws(0,"div",2,0),Rg("click",function(){return i.open()}),ws(3,"div",3),oC(4,Je,2,1,"span",4)(5,et,3,1,"span",5),hl(),ws(6,"div",6)(7,"div",7),Ff(),ws(8,"svg",8),Sg(9,"path",9),hl()()()(),Eg(10,tt,3,16,"ng-template",10),Rg("detach",function(){return i.close()})("backdropClick",function(){return i.close()})("overlayKeydown",function(r){return i._handleOverlayKeydown(r)})),t&2){let n=MC(1);nI(3),Tg("id",i._valueId),nI(),iC(i.empty?4:5),nI(6),bg("cdkConnectedOverlayDisableClose",true)("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||n)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",true)("cdkConnectedOverlayUsePopover",i._popoverLocation);}},dependencies:[Rt,_e$1],styles:[`@keyframes _mat-select-enter {
2
- from {
3
- opacity: 0;
4
- transform: scaleY(0.8);
5
- }
6
- to {
7
- opacity: 1;
8
- transform: none;
9
- }
10
- }
11
- @keyframes _mat-select-exit {
12
- from {
13
- opacity: 1;
14
- }
15
- to {
16
- opacity: 0;
17
- }
18
- }
19
- .mat-mdc-select {
20
- display: inline-block;
21
- width: 100%;
22
- outline: none;
23
- -moz-osx-font-smoothing: grayscale;
24
- -webkit-font-smoothing: antialiased;
25
- color: var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));
26
- font-family: var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));
27
- line-height: var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));
28
- font-size: var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));
29
- font-weight: var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));
30
- letter-spacing: var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking));
31
- }
32
-
33
- div.mat-mdc-select-panel {
34
- box-shadow: var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));
35
- }
36
-
37
- .mat-mdc-select-disabled {
38
- color: var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));
39
- }
40
- .mat-mdc-select-disabled .mat-mdc-select-placeholder {
41
- color: var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));
42
- }
43
-
44
- .mat-mdc-select-trigger {
45
- display: inline-flex;
46
- align-items: center;
47
- cursor: pointer;
48
- position: relative;
49
- box-sizing: border-box;
50
- width: 100%;
51
- }
52
- .mat-mdc-select-disabled .mat-mdc-select-trigger {
53
- -webkit-user-select: none;
54
- user-select: none;
55
- cursor: default;
56
- }
57
-
58
- .mat-mdc-select-value {
59
- width: 100%;
60
- overflow: hidden;
61
- text-overflow: ellipsis;
62
- white-space: nowrap;
63
- }
64
-
65
- .mat-mdc-select-value-text {
66
- white-space: nowrap;
67
- overflow: hidden;
68
- text-overflow: ellipsis;
69
- }
70
-
71
- .mat-mdc-select-arrow-wrapper {
72
- height: 24px;
73
- flex-shrink: 0;
74
- display: inline-flex;
75
- align-items: center;
76
- }
77
- .mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper {
78
- transform: none;
79
- }
80
-
81
- .mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,
82
- .mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after {
83
- color: var(--mat-select-invalid-arrow-color, var(--mat-sys-error));
84
- }
85
-
86
- .mat-mdc-select-arrow {
87
- width: 10px;
88
- height: 5px;
89
- position: relative;
90
- color: var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant));
91
- }
92
- .mat-mdc-form-field.mat-focused .mat-mdc-select-arrow {
93
- color: var(--mat-select-focused-arrow-color, var(--mat-sys-primary));
94
- }
95
- .mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow {
96
- color: var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));
97
- }
98
- .mat-select-open .mat-mdc-select-arrow {
99
- transform: rotate(180deg);
100
- }
101
- .mat-form-field-animations-enabled .mat-mdc-select-arrow {
102
- transition: transform 80ms linear;
103
- }
104
- .mat-mdc-select-arrow svg {
105
- fill: currentColor;
106
- position: absolute;
107
- top: 50%;
108
- left: 50%;
109
- transform: translate(-50%, -50%);
110
- }
111
- @media (forced-colors: active) {
112
- .mat-mdc-select-arrow svg {
113
- fill: CanvasText;
114
- }
115
- .mat-mdc-select-disabled .mat-mdc-select-arrow svg {
116
- fill: GrayText;
117
- }
118
- }
119
-
120
- div.mat-mdc-select-panel {
121
- width: 100%;
122
- max-height: 275px;
123
- outline: 0;
124
- overflow: auto;
125
- padding: 8px 0;
126
- box-sizing: border-box;
127
- transform-origin: top center;
128
- border-radius: 0 0 4px 4px;
129
- position: relative;
130
- background-color: var(--mat-select-panel-background-color, var(--mat-sys-surface-container));
131
- }
132
- .mat-mdc-select-panel-above div.mat-mdc-select-panel {
133
- border-radius: 4px 4px 0 0;
134
- transform-origin: bottom center;
135
- }
136
- @media (forced-colors: active) {
137
- div.mat-mdc-select-panel {
138
- outline: solid 1px;
139
- }
140
- }
141
-
142
- .mat-select-panel-animations-enabled {
143
- animation: _mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1);
144
- }
145
- .mat-select-panel-animations-enabled.mat-select-panel-exit {
146
- animation: _mat-select-exit 100ms linear;
147
- }
148
-
149
- .mat-mdc-select-placeholder {
150
- transition: color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);
151
- color: var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant));
152
- }
153
- .mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder, ._mat-animation-noopable .mat-mdc-select-placeholder {
154
- transition: none;
155
- }
156
- .mat-form-field-hide-placeholder .mat-mdc-select-placeholder {
157
- color: transparent;
158
- -webkit-text-fill-color: transparent;
159
- transition: none;
160
- display: block;
161
- }
162
-
163
- .mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper {
164
- cursor: pointer;
165
- }
166
- .mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label {
167
- max-width: calc(100% - 18px);
168
- }
169
- .mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above {
170
- max-width: calc(100% / 0.75 - 24px);
171
- }
172
- .mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch {
173
- max-width: calc(100% - 60px);
174
- }
175
- .mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch {
176
- max-width: calc(100% - 24px);
177
- }
178
-
179
- .mat-mdc-select-min-line:empty::before {
180
- content: " ";
181
- white-space: pre;
182
- width: 1px;
183
- display: inline-block;
184
- visibility: hidden;
185
- }
186
-
187
- .mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper {
188
- transform: var(--mat-select-arrow-transform, translateY(-8px));
189
- }
190
- `],encapsulation:2})}return a})();var Pt=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=Eo({type:a});static \u0275inj=qn({imports:[ge,Dr,wt,vt,ce,Dr]})}return a})();export{Lt as L,Pt as P};
@@ -1 +0,0 @@
1
- import {I}from'./chunk-Bhq5earA.js';import {m}from'./chunk-BY7uKZAo.js';import {g,G,w as we,aJ as Tr,a as Gi,bS as Da,u as ue,c as U,h as Fw,aK as Ob,m as ws,bf as dT,o as Rg,n as hl,af as Eg,M as MC,v as bg,bg as pT,ah as aT,q as oC,ac as EC,x as iC,a9 as gC,aa as wf,ab as Cf,ag as mT}from'./main-5PAOSHSM.js';import {W as Wn,S as Se}from'./chunk-CtkiOUdU.js';import'./chunk-S8F5_Te_.js';import'./chunk-tTmeIHGS.js';import'./chunk-kvCfAm7Z.js';var F=()=>[];function N(o,e){if(o&1){let t=gC();ws(0,"agentos-prompt-item",4),Rg("deleteRequested",function(n){wf(t);let E=EC(2);return Cf(E.deletePrompt(n))}),hl();}o&2&&bg("prompt",e)("platformMode",true);}function V(o,e){if(o&1&&oC(0,N,1,2,"agentos-prompt-item",3),o&2){let t,r=e.$implicit,n=EC();iC((t=n.resolvePrompt(r.id))?0:-1,t);}}var q=class o{router=g(G);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);isLoading=Gi(true);prompts$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.promptState.listPlatform())));promptItems$=this.prompts$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Fw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:7,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,r){if(t&1&&(ws(0,"ds-entity-list",1),dT(1,"async"),Rg("createRequested",function(){return r.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return r.goBack()}),hl()(),Eg(3,V,1,1,"ng-template",null,0,mT)),t&2){let n=MC(4);bg("items",pT(1,4,r.promptItems$)??aT(6,F))("loading",r.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Se,Ob],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformPromptsComponent};
@@ -1 +0,0 @@
1
- import {m}from'./chunk-BY7uKZAo.js';import {g,ao as V,G,w as we,d8 as B,a as Gi,c as U,a7 as va,X as br,z as z$1,b as P,h as Fw,m as ws,o as Rg,Q as QC,n as hl,q as oC,t as nI,a5 as Dl,a8 as Yg,x as iC,a9 as gC,S as Sg,a3 as GI,r as cC,bo as sC,ac as EC,v as bg,A as Ug,a6 as qI,y as uC,aa as wf,ab as Cf}from'./main-5PAOSHSM.js';import {o as z,z as ze,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,C as Cn,E as En,p as An,q as Ct,V as Vt}from'./chunk-tTmeIHGS.js';import'./chunk-kvCfAm7Z.js';import'./chunk-CtkiOUdU.js';import'./chunk-S8F5_Te_.js';var ne=(i,t)=>t.id;function ie(i,t){i&1&&(ws(0,"p",5),QC(1,"Loading\u2026"),hl());}function ae(i,t){i&1&&(ws(0,"span",12),QC(1,"Name is required."),hl());}function le(i,t){if(i&1&&(ws(0,"p",32),QC(1),hl(),ws(2,"span",26),QC(3,"Agent Config cannot be changed after creation."),hl()),i&2){let e=EC(3);nI(),Yg(e.resolveAgentConfigName(e.agentConfigIdControl.value));}}function me(i,t){if(i&1&&(ws(0,"option",34),QC(1),hl()),i&2){let e=t.$implicit;bg("ngValue",e.id),nI(),Yg(e.name);}}function pe(i,t){if(i&1&&(ws(0,"select",33)(1,"option",34),QC(2,"\u2014 None \u2014"),hl(),cC(3,me,2,2,"option",34,ne),hl(),GI(),ws(5,"span",26),QC(6,"Optional. Links this prompt to an agent as a starter. Immutable after creation."),hl()),i&2){let e=EC(3);bg("formControl",e.agentConfigIdControl),qI(),nI(),bg("ngValue",null),nI(2),uC(e.availableAgentConfigs());}}function de(i,t){if(i&1&&(ws(0,"div",8)(1,"label",31),QC(2,"Agent Config"),hl(),oC(3,le,4,1)(4,pe,7,2),hl()),i&2){let e=EC(2);nI(3),iC(e.isEditMode()&&e.agentConfigIdControl.value?3:e.isEditMode()?-1:4);}}function ce(i,t){i&1&&(ws(0,"p",19),QC(1,"No parameters defined."),hl());}function se(i,t){i&1&&(ws(0,"span",12),QC(1,"Parameter name is required."),hl());}function _e(i,t){if(i&1){let e=gC();ws(0,"div",20)(1,"div",35)(2,"div",36)(3,"label",37),QC(4,"Name "),ws(5,"span",10),QC(6,"*"),hl()(),Sg(7,"input",38),GI(),oC(8,se,2,0,"span",12),hl(),ws(9,"div",36)(10,"label",37),QC(11,"Description"),hl(),Sg(12,"input",39),GI(),hl(),ws(13,"div",36)(14,"label",37),QC(15,"Default value"),hl(),Sg(16,"input",40),GI(),hl()(),ws(17,"button",41),Rg("click",function(){let m=wf(e).$index,d=EC(2);return Cf(d.removeParameter(m))}),QC(18," \xD7 "),hl()();}if(i&2){let e=t.$implicit,l=t.$index;bg("formGroupName",l),nI(3),bg("for","param-name-"+l),nI(4),Ug("prompt-form__input--invalid",e.controls.name.invalid&&e.controls.name.touched),bg("id","param-name-"+l),qI(),nI(),iC(e.controls.name.invalid&&e.controls.name.touched?8:-1),nI(2),bg("for","param-desc-"+l),nI(2),bg("id","param-desc-"+l),qI(),nI(2),bg("for","param-default-"+l),nI(2),bg("id","param-default-"+l),qI();}}function fe(i,t){i&1&&(ws(0,"span",12),QC(1,"Content entry must not be blank."),hl());}function ue(i,t){if(i&1){let e=gC();ws(0,"div",22)(1,"span",42),QC(2),hl(),ws(3,"div",43),Sg(4,"textarea",44),GI(),oC(5,fe,2,0,"span",12),hl(),ws(6,"button",45),Rg("click",function(){let m=wf(e).$index,d=EC(2);return Cf(d.removeContentEntry(m))}),QC(7," \xD7 "),hl()();}if(i&2){let e=t.$implicit,l=t.$index,m=EC(2);nI(2),Yg(l+1),nI(2),Ug("prompt-form__textarea--invalid",e.invalid&&e.touched),bg("formControlName",l),qI(),nI(),iC(e.invalid&&e.touched?5:-1),nI(),bg("disabled",m.contentArray.length===1);}}function ge(i,t){if(i&1&&(ws(0,"p",23),QC(1),hl()),i&2){let e=EC(2);nI(),Yg(e.errorMessage());}}function Ce(i,t){i&1&&(ws(0,"span",12),QC(1,"Invalid JSON."),hl());}function xe(i,t){if(i&1){let e=gC();ws(0,"button",46),Rg("click",function(){wf(e);let m=EC(2);return Cf(m.exportYaml())}),QC(1),hl();}if(i&2){let e=EC(2);bg("disabled",e.isExporting()),nI(),Dl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ve(i,t){if(i&1){let e=gC();ws(0,"form",7),Rg("ngSubmit",function(){wf(e);let m=EC();return Cf(m.submit())}),ws(1,"div",8)(2,"label",9),QC(3,"Name "),ws(4,"span",10),QC(5,"*"),hl()(),Sg(6,"input",11),GI(),oC(7,ae,2,0,"span",12),hl(),ws(8,"div",8)(9,"label",13),QC(10,"Description"),hl(),Sg(11,"input",14),GI(),hl(),oC(12,de,5,1,"div",8),ws(13,"fieldset",15)(14,"legend",16),QC(15," Parameters "),ws(16,"span",17),QC(17,"Named placeholders used in content"),hl()(),ws(18,"p",18),QC(19," Each parameter must have a name and a default value. Use "),ws(20,"code"),QC(21),hl(),QC(22," in content entries to reference them. "),hl(),oC(23,ce,2,0,"p",19),cC(24,_e,19,10,"div",20,sC),ws(26,"button",21),Rg("click",function(){wf(e);let m=EC();return Cf(m.addParameter())}),QC(27,"+ Add parameter"),hl()(),ws(28,"fieldset",15)(29,"legend",16),QC(30," Content "),ws(31,"span",10),QC(32,"*"),hl(),ws(33,"span",17),QC(34,"Ordered list of text commands"),hl()(),ws(35,"p",18),QC(36," Each content entry is a command. Use "),ws(37,"code"),QC(38,"@AgentName"),hl(),QC(39," to target an agent, "),ws(40,"code"),QC(41,"/promptName param1 param2"),hl(),QC(42," to call another prompt, and "),ws(43,"code"),QC(44),hl(),QC(45," for parameter placeholders. "),hl(),cC(46,ue,8,6,"div",22,sC),ws(48,"button",21),Rg("click",function(){wf(e);let m=EC();return Cf(m.addContentEntry())}),QC(49,"+ Add content entry"),hl()(),oC(50,ge,2,1,"p",23),ws(51,"div",8)(52,"label",24),QC(53,"External Metadata"),hl(),Sg(54,"textarea",25),GI(),oC(55,Ce,2,0,"span",12),ws(56,"span",26),QC(57,"Optional. Opaque JSON object stored as-is. Leave empty to clear."),hl()(),ws(58,"div",27)(59,"button",28),QC(60),hl(),oC(61,xe,2,2,"button",29),ws(62,"button",30),Rg("click",function(){wf(e);let m=EC();return Cf(m.cancel())}),QC(63,"Cancel"),hl()()();}if(i&2){let e=EC();bg("formGroup",e.form),nI(6),Ug("prompt-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),bg("formControl",e.nameControl),qI(),nI(),iC(e.nameControl.invalid&&e.nameControl.touched?7:-1),nI(4),bg("formControl",e.descriptionControl),qI(),nI(),iC(e.availableAgentConfigs().length>0?12:-1),nI(),bg("formArrayName","parameters"),nI(8),Yg(e.paramPlaceholderSyntax),nI(2),iC(e.parametersArray.length===0?23:-1),nI(),uC(e.parametersArray.controls),nI(4),bg("formArrayName","content"),nI(16),Yg(e.paramPlaceholderSyntax),nI(2),uC(e.contentArray.controls),nI(4),iC(e.errorMessage()?50:-1),nI(4),bg("formControl",e.externalMetadataJsonControl),qI(),nI(),iC(e.externalMetadataJsonControl.invalid&&e.externalMetadataJsonControl.touched?55:-1),nI(4),bg("disabled",e.form.invalid||e.isSubmitting()),nI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," "),nI(),iC(e.isEditMode()?61:-1);}}var re=class i{route=g(V);router=g(G);destroyRef=g(we);promptState=g(m);agentConfigController=g(B);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),agentConfigId:new _t(null),externalMetadataJson:new _t("",{nonNullable:true,validators:[be]}),content:new ze([this.createContentControl()],{validators:[_e$1.required]}),parameters:new ze([])});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get agentConfigIdControl(){return this.form.controls.agentConfigId}get externalMetadataJsonControl(){return this.form.controls.externalMetadataJson}get contentArray(){return this.form.controls.content}get parametersArray(){return this.form.controls.parameters}isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);isExporting=Gi(false);errorMessage=Gi(null);paramPlaceholderSyntax="{{paramName}}";agentConfigs=Gi([]);availableAgentConfigs=this.agentConfigs.asReadonly();existingPrompt=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("promptId");t&&(this.isEditMode.set(true),this.loadPrompt(t)),this.isPlatformMode?this.loadPlatformAgentConfigs():this.namespaceId&&this.loadAgentConfigs(this.namespaceId);}loadPrompt(t){this.isLoading.set(true),this.promptState.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingPrompt=e,this.hydrateForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadAgentConfigs(t){this.agentConfigController.listByParentAgentConfig(t).pipe(U(this.destroyRef),va(()=>br([]))).subscribe(e=>this.agentConfigs.set(e));}loadPlatformAgentConfigs(){this.agentConfigController.listPlatformAgentsAgentConfig().pipe(U(this.destroyRef),va(()=>br([]))).subscribe(t=>this.agentConfigs.set(t));}hydrateForm(t){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.agentConfigIdControl.setValue(t.agentConfigId??null),this.contentArray.clear(),(t.content.length>0?t.content:[""]).forEach(l=>this.contentArray.push(this.createContentControl(l))),this.parametersArray.clear(),(t.parameters??[]).forEach(l=>this.parametersArray.push(this.createParameterGroup(l))),this.externalMetadataJsonControl.setValue(t.externalMetadata?JSON.stringify(t.externalMetadata,null,2):"");}resolveAgentConfigName(t){return this.agentConfigs().find(e=>e.id===t)?.name??t}createContentControl(t=""){return new _t(t,{nonNullable:true,validators:[_e$1.required,_e$1.pattern(/\S/)]})}addContentEntry(){this.contentArray.push(this.createContentControl());}removeContentEntry(t){this.contentArray.length>1&&this.contentArray.removeAt(t);}createParameterGroup(t){return new z({name:new _t(t?.name??"",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(t?.description??null),defaultValue:new _t(t?.defaultValue??"",{nonNullable:true,validators:[_e$1.required]})})}addParameter(){this.parametersArray.push(this.createParameterGroup());}removeParameter(t){this.parametersArray.removeAt(t);}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let t=this.isEditMode()&&!!this.existingPrompt?.id,e=z$1(P({},this.existingPrompt??{}),{namespaceId:this.namespaceId,sourceLanguage:this.existingPrompt?.sourceLanguage??"en",name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,content:this.contentArray.controls.map(d=>d.value.trim()),parameters:this.parametersArray.controls.map(d=>({name:d.controls.name.value.trim(),description:d.controls.description.value?.trim()||void 0,defaultValue:d.controls.defaultValue.value.trim()}))});t||(e.agentConfigId=this.agentConfigIdControl.value||null);let l=this.externalMetadataJsonControl.value.trim();e.externalMetadata=l?JSON.parse(l):null;let m=t?this.promptState.update(this.existingPrompt.id,e):this.promptState.create(e);this.errorMessage.set(null),m.pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:d=>{this.isSubmitting.set(false),d.status===409?this.errorMessage.set(`A prompt named "${e.name}" already exists in this scope.`):d.status===400?this.errorMessage.set(d.error?.message??"Invalid prompt data."):this.errorMessage.set("An unexpected error occurred. Please try again.");}});}exportYaml(){let t=this.existingPrompt?.id;!t||this.isExporting()||(this.isExporting.set(true),this.promptState.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let l=new Blob([e],{type:"application/yaml"}),m=URL.createObjectURL(l),d=document.createElement("a");d.href=m,d.download=`${this.existingPrompt?.name??"prompt"}.yaml`,d.click(),URL.revokeObjectURL(m),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","prompts"]):this.router.navigate(["/agentos",this.namespaceId,"prompts"]);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Fw({type:i,selectors:[["agentos-prompt-form"]],decls:10,vars:3,consts:[[1,"prompt-form"],[1,"prompt-form__header"],["type","button","title","Back to prompts",1,"prompt-form__back",3,"click"],[1,"prompt-form__back-icon"],[1,"prompt-form__title"],[1,"prompt-form__loading"],[1,"prompt-form__form",3,"formGroup"],[1,"prompt-form__form",3,"ngSubmit","formGroup"],[1,"prompt-form__field"],["for","prompt-name",1,"prompt-form__label"],["aria-hidden","true"],["id","prompt-name","type","text","placeholder","e.g. Summarise meeting notes","autocomplete","off",1,"prompt-form__input",3,"formControl"],[1,"prompt-form__field-error"],["for","prompt-description",1,"prompt-form__label"],["id","prompt-description","type","text","placeholder","Optional \u2014 short description of this prompt","autocomplete","off",1,"prompt-form__input",3,"formControl"],[1,"prompt-form__section",3,"formArrayName"],[1,"prompt-form__label"],[1,"prompt-form__label-hint"],[1,"prompt-form__section-hint"],[1,"prompt-form__empty-hint"],[1,"prompt-form__param-row",3,"formGroupName"],["type","button",1,"prompt-form__add-btn",3,"click"],[1,"prompt-form__content-row"],[1,"prompt-form__error"],["for","prompt-external-metadata",1,"prompt-form__label"],["id","prompt-external-metadata","rows","6","placeholder",'{ "key": "value" }',"spellcheck","false","autocomplete","off",1,"prompt-form__textarea","prompt-form__textarea--code",3,"formControl"],[1,"prompt-form__field-hint"],[1,"prompt-form__actions"],["type","submit",1,"prompt-form__btn","prompt-form__btn--primary",3,"disabled"],["type","button",1,"prompt-form__btn","prompt-form__btn--export",3,"disabled"],["type","button",1,"prompt-form__btn",3,"click"],["for","prompt-agent-config",1,"prompt-form__label"],[1,"prompt-form__readonly-value"],["id","prompt-agent-config",1,"prompt-form__select",3,"formControl"],[3,"ngValue"],[1,"prompt-form__param-fields"],[1,"prompt-form__field","prompt-form__field--inline"],[1,"prompt-form__label",3,"for"],["type","text","placeholder","e.g. language","formControlName","name","autocomplete","off",1,"prompt-form__input",3,"id"],["type","text","placeholder","Optional","formControlName","description","autocomplete","off",1,"prompt-form__input",3,"id"],["type","text","placeholder","e.g. English","formControlName","defaultValue","autocomplete","off",1,"prompt-form__input",3,"id"],["type","button","title","Remove this parameter",1,"prompt-form__remove-btn",3,"click"],[1,"prompt-form__content-index"],[1,"prompt-form__content-field"],["rows","4","placeholder","Enter a command\u2026",1,"prompt-form__textarea",3,"formControlName"],["type","button","title","Remove this entry",1,"prompt-form__remove-btn",3,"click","disabled"],["type","button",1,"prompt-form__btn","prompt-form__btn--export",3,"click","disabled"]],template:function(e,l){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return l.cancel()}),ws(3,"span",3),QC(4,"\u2190"),hl(),QC(5),hl(),ws(6,"h1",4),QC(7),hl()(),oC(8,ie,2,0,"p",5)(9,ve,64,18,"form",6),hl()),e&2&&(nI(5),Dl(" ",l.isPlatformMode?"Platform prompts":"Prompts"," "),nI(2),Yg(l.isEditMode()?"Edit prompt":"New prompt"),nI(),iC(l.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,Cn,En,An,Ct,Vt],styles:[".prompt-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.prompt-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.prompt-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.prompt-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.prompt-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.prompt-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.prompt-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.prompt-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.prompt-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.prompt-form__field--inline[_ngcontent-%COMP%]{flex:1}.prompt-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.prompt-form__label-hint[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary);margin-left:.375rem}.prompt-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;cursor:pointer;appearance:auto;transition:border-color .15s ease}.prompt-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.prompt-form__field-hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.prompt-form__readonly-value[_ngcontent-%COMP%]{margin:0;padding:.5rem .875rem;border-radius:0;background:var(--color-bg-hover);border:1px solid var(--color-divider);color:var(--color-text);font-size:.9375rem}.prompt-form__input[_ngcontent-%COMP%], .prompt-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.prompt-form__input[_ngcontent-%COMP%]:focus, .prompt-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.prompt-form__input[_ngcontent-%COMP%]::placeholder, .prompt-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.prompt-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:100px;line-height:1.5}.prompt-form__textarea--code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85rem;resize:vertical}.prompt-form__section[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.prompt-form__section-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.prompt-form__empty-hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.prompt-form__content-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-start}.prompt-form__content-field[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.25rem}.prompt-form__content-index[_ngcontent-%COMP%]{flex-shrink:0;width:1.5rem;padding-top:.6rem;font-size:.8rem;font-weight:600;color:var(--color-text-secondary);text-align:right;-webkit-user-select:none;user-select:none}.prompt-form__param-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-end;padding:.75rem;border-radius:0;background:var(--color-bg-hover)}.prompt-form__param-fields[_ngcontent-%COMP%]{flex:1;display:flex;gap:.75rem;flex-wrap:wrap}.prompt-form__add-btn[_ngcontent-%COMP%]{align-self:flex-start;padding:.4rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-accent);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.prompt-form__add-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-accent)}.prompt-form__remove-btn[_ngcontent-%COMP%]{flex-shrink:0;width:1.75rem;height:1.75rem;display:flex;align-items:center;justify-content:center;border-radius:0;border:1px solid transparent;background:transparent;color:var(--color-neutral-500);font-size:1rem;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}.prompt-form__remove-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:color-mix(in srgb,var(--red) 10%,transparent);color:var(--red);border-color:var(--red)}.prompt-form__remove-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.prompt-form__error[_ngcontent-%COMP%]{margin:0;padding:.625rem .875rem;border-radius:0;background:color-mix(in srgb,var(--red) 10%,transparent);border:1px solid var(--red);color:var(--red);font-size:.875rem;line-height:1.4}.prompt-form__field-error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--red);line-height:1.3}.prompt-form__input--invalid[_ngcontent-%COMP%], .prompt-form__textarea--invalid[_ngcontent-%COMP%]{border-color:var(--red)}.prompt-form__input--invalid[_ngcontent-%COMP%]:focus, .prompt-form__textarea--invalid[_ngcontent-%COMP%]:focus{border-color:var(--red)}.prompt-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.prompt-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.prompt-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.prompt-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.prompt-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.prompt-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.prompt-form__btn--export[_ngcontent-%COMP%]{border-color:var(--color-divider);color:var(--color-text-secondary)}.prompt-form__btn--export[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-accent);color:var(--color-accent)}"]})};function be(i){let t=i.value?.trim();if(!t)return null;try{return JSON.parse(t),null}catch(e){return {invalidJson:true}}}export{re as PromptFormComponent};
@@ -1 +0,0 @@
1
- import {g,G,P,h as Fw,i as hr,j as pr,m as ws,o as Rg,Q as QC,n as hl,q as oC,t as nI,v as bg,x as iC,a5 as Dl,al as yt$1,am as Wm,a9 as gC,ai as em,aa as wf,aj as tT,ab as Cf,a3 as GI,ak as Jg,a6 as qI,C as Pg,D as bC,H as SC,ac as EC,a8 as Yg}from'./main-5PAOSHSM.js';import {y as yt,w as wt,t as ti,Y as Ye,Z as Zn,c as cn}from'./chunk-tTmeIHGS.js';var J=["inputElement"];function K(o,r){if(o&1&&(ws(0,"span",3),QC(1),hl()),o&2){let t=EC();nI(),Yg(t.label);}}function U(o,r){if(o&1&&(ws(0,"small",5),QC(1),hl()),o&2){let t=EC();nI(),Yg(t.hint);}}var h=class o{label="";placeholder="";hint="";isDisabled=false;value="";autoFocus=true;valueChange=new yt$1;enterPressed=new yt$1;inputElement;inputValue="";ngAfterViewInit(){this.inputValue=this.value,this.autoFocus&&setTimeout(()=>this.inputElement?.nativeElement.focus(),100);}onValueChange(r){this.valueChange.emit(r);}onEnter(){this.inputValue.trim()&&this.enterPressed.emit(this.inputValue.trim());}focus(){this.inputElement?.nativeElement.focus();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Fw({type:o,selectors:[["app-text-input"]],viewQuery:function(t,e){if(t&1&&Pg(J,5),t&2){let p;bC(p=SC())&&(e.inputElement=p.first);}},inputs:{label:"label",placeholder:"placeholder",hint:"hint",isDisabled:"isDisabled",value:"value",autoFocus:"autoFocus"},outputs:{valueChange:"valueChange",enterPressed:"enterPressed"},decls:6,vars:5,consts:[["inputElement",""],[1,"text-input-container"],[1,"text-input-wrapper"],[1,"text-input-label"],["type","text",1,"text-input-field",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],[1,"text-input-hint"]],template:function(t,e){if(t&1){let p=gC();ws(0,"div",1)(1,"label",2),oC(2,K,2,1,"span",3),ws(3,"input",4,0),em("ngModelChange",function(m){return wf(p),tT(e.inputValue,m)||(e.inputValue=m),Cf(m)}),Rg("ngModelChange",function(m){return e.onValueChange(m)})("keydown.enter",function(){return e.onEnter()}),hl(),GI(),hl(),oC(5,U,2,1,"small",5),hl();}t&2&&(nI(2),iC(e.label?2:-1),nI(),Jg("ngModel",e.inputValue),bg("placeholder",e.placeholder)("disabled",e.isDisabled),qI(),nI(2),iC(e.hint?5:-1));},dependencies:[ti,Ye,Zn,cn,Wm],styles:[".text-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.text-input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;cursor:text}.text-input-label[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);margin:0}.text-input-field[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:1rem;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;outline:none;transition:all .2s ease}.text-input-field[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.7}.text-input-field[_ngcontent-%COMP%]:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.1)}.text-input-field[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:var(--color-surface)}.text-input-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin:0;font-style:italic}@media(max-width:768px){.text-input-field[_ngcontent-%COMP%]{padding:.65rem .85rem;font-size:.95rem}.text-input-label[_ngcontent-%COMP%]{font-size:.9rem}.text-input-hint[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:1})};function X(o,r){if(o&1&&(ws(0,"div",8),QC(1),hl()),o&2){let t=EC();nI(),Yg(t.errorMessage);}}var L=class o{router=g(G);projectStateService=g(P);projectName="";projectPath="";isCreating=false;errorMessage=null;isValid(){return this.projectName.trim()!==""&&this.projectPath.trim()!==""}onCreate(){if(!this.isValid()){this.errorMessage="Both name and path are required";return}this.isCreating=true,this.errorMessage=null,this.projectStateService.createProject(this.projectName.trim(),this.projectPath.trim()).subscribe({next:()=>{let r=this.projectName.trim();this.isCreating=false,this.projectStateService.selectProject(r),this.router.navigate(["project",r]);},error:r=>{this.errorMessage=r.error?.error??"Failed to create project",this.isCreating=false;}});}onCancel(){this.router.navigate(["/"]);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Fw({type:o,selectors:[["app-project-new"]],decls:19,vars:9,consts:[[1,"project-new-page"],[1,"project-new-card"],["mat-button","",1,"project-new__back",3,"click"],[1,"project-new__title"],[1,"project-new__subtitle"],[1,"project-new__form"],["label","Project name","placeholder","my-project",3,"valueChange","value","isDisabled","autoFocus"],["label","Project path","placeholder","/path/to/project","hint","Absolute path to the project directory",3,"valueChange","enterPressed","value","isDisabled"],[1,"project-new__error"],[1,"project-new__actions"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"]],template:function(t,e){t&1&&(ws(0,"div",0)(1,"div",1)(2,"button",2),Rg("click",function(){return e.onCancel()}),ws(3,"mat-icon"),QC(4,"arrow_back"),hl(),QC(5," Back to projects "),hl(),ws(6,"h1",3),QC(7,"New project"),hl(),ws(8,"p",4),QC(9,"Point Coday to an existing directory on your machine."),hl(),ws(10,"div",5)(11,"app-text-input",6),Rg("valueChange",function(d){return e.projectName=d}),hl(),ws(12,"app-text-input",7),Rg("valueChange",function(d){return e.projectPath=d})("enterPressed",function(){return e.onCreate()}),hl(),oC(13,X,2,1,"div",8),hl(),ws(14,"div",9)(15,"button",10),Rg("click",function(){return e.onCancel()}),QC(16,"Cancel"),hl(),ws(17,"button",11),Rg("click",function(){return e.onCreate()}),QC(18),hl()()()()),t&2&&(nI(11),bg("value",e.projectName)("isDisabled",e.isCreating)("autoFocus",true),nI(),bg("value",e.projectPath)("isDisabled",e.isCreating),nI(),iC(e.errorMessage?13:-1),nI(2),bg("disabled",e.isCreating),nI(2),bg("disabled",!e.isValid()||e.isCreating),nI(),Dl(" ",e.isCreating?"Creating\u2026":"Create project"," "));},dependencies:[hr,pr,yt,wt,h],styles:[".project-new-page[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:center;min-height:100vh;width:100%;background:var(--color-bg);padding:2rem 1.5rem;box-sizing:border-box}.project-new-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;width:100%;max-width:560px;padding:2rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:16px;box-shadow:var(--glass-shadow, 0 8px 32px rgba(31, 38, 135, .15));margin-top:2rem}.project-new__back[_ngcontent-%COMP%]{align-self:flex-start;margin-left:-.5rem;color:var(--color-text-secondary, #6e6e73)}.project-new__title[_ngcontent-%COMP%]{margin:0;font-size:1.625rem;font-weight:700;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.project-new__subtitle[_ngcontent-%COMP%]{margin:-.75rem 0 0;font-size:.9375rem;color:var(--color-text-secondary, #6e6e73)}.project-new__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.project-new__error[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}.project-new__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;justify-content:flex-end;padding-top:.25rem}"],changeDetection:1})};export{L as ProjectNewComponent};
@@ -1 +0,0 @@
1
- import {i}from'./chunk-BEUXx3TO.js';import {l}from'./chunk-BY7uKZAo.js';import {g,dh as J$1,aJ as Tr,aD as jy,bS as Da,a7 as va,X as br,u as ue,cE as Od,z as z$1,b as P,bU as kd,Y as x}from'./main-5PAOSHSM.js';var q=["ApiKeyAuthSetting","BasicAuthAuthSetting","BearerTokenAuthSetting","OAuthDiscoverableAuthSetting","OAuthMcpDiscoverableAuthSetting","OAuthCustomAuthSetting","OAuthRegisteredAuthSetting"],J={ApiKeyAuthSetting:"API Key",BasicAuthAuthSetting:"Basic Auth (username / password)",BearerTokenAuthSetting:"Bearer Token",OAuthDiscoverableAuthSetting:"OAuth \u2014 Discovery URL",OAuthMcpDiscoverableAuthSetting:"OAuth \u2014 MCP Discoverable",OAuthCustomAuthSetting:"OAuth \u2014 Custom endpoints",OAuthRegisteredAuthSetting:"OAuth \u2014 Registered app"},E="none",C="me",I={ApiKeyAuthSetting:"API_KEY",BasicAuthAuthSetting:"BASIC_AUTH",BearerTokenAuthSetting:"BEARER_TOKEN",OAuthDiscoverableAuthSetting:"OAUTH_DISCOVERABLE",OAuthMcpDiscoverableAuthSetting:"OAUTH_MCP_DISCOVERABLE",OAuthCustomAuthSetting:"OAUTH_CUSTOM",OAuthRegisteredAuthSetting:"OAUTH_REGISTERED"},U={API_KEY:"ApiKeyAuthSetting",BASIC_AUTH:"BasicAuthAuthSetting",BEARER_TOKEN:"BearerTokenAuthSetting",OAUTH_DISCOVERABLE:"OAuthDiscoverableAuthSetting",OAUTH_MCP_DISCOVERABLE:"OAuthMcpDiscoverableAuthSetting",OAUTH_CUSTOM:"OAuthCustomAuthSetting",OAUTH_REGISTERED:"OAuthRegisteredAuthSetting"};function v(n){let t=I[n.authType];return t?z$1(P({},n),{authType:t}):n}function d(n){return B(n)}function O(n){return n.map(B)}function B(n){let t=n;if(typeof t.authType=="string"){let e=U[t.authType];if(e)return z$1(P({},t),{authType:e})}return n}var R=class n{controller=g(J$1);userState=g(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=jy([this.namespaceId$,this.refresh$]).pipe(Da(([t])=>{let e=this.loadPlatformSettings().pipe(va(()=>br([])));return t?jy([e,this.loadNamespaceSettings(t).pipe(va(()=>br([]))),this.loadUserSettings(t).pipe(va(()=>br([]))),this.loadUserSettings("global").pipe(va(()=>br([])))]).pipe(ue(([i,s,u,p])=>({platform:i,namespace:s,userOnNs:u,userGlobal:p}))):jy([e,this.loadNamespaceSettings("").pipe(va(()=>br([]))),this.loadUserSettings("global").pipe(va(()=>br([])))]).pipe(ue(([i,s,u])=>({platform:i,namespace:s,userOnNs:[],userGlobal:u})))}),Od({bufferSize:1,refCount:true}));setNamespace(t){this.namespaceId$.value!==t&&this.namespaceId$.next(t);}refresh(){this.refresh$.next();}loadUserSettings(t){let e=t==="global"?E:t;return this.controller.listAuthSetting(e,C).pipe(ue(i=>O(i)))}userGlobal$=i(this.refresh$,()=>this.loadUserSettings("global"),[]);loadPlatformSettings(){return this.controller.listAuthSetting(E).pipe(ue(t=>O(t)))}loadNamespaceSettings(t){return t?this.controller.listAuthSetting(t).pipe(ue(e=>O(e))):br([])}getById(t,e){return this.controller.getByIdAuthSetting(t).pipe(ue(i=>d(i)))}create(t,e,i){let u=this.userState.currentUser()?.id;if((e==="userOnNs"||e==="userGlobal")&&!u)throw new Error(`Cannot create ${e} auth setting before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(e==="namespace"&&(i===void 0||i===""))throw new Error("Cannot create namespace-scoped auth setting without a namespaceId");if(e==="userOnNs"&&!i)throw new Error("Cannot create userOnNs auth setting without a namespaceId");let p=v(z$1(P({},t),{namespaceId:e==="namespace"||e==="userOnNs"?i??void 0:void 0,userId:e==="userOnNs"||e==="userGlobal"?u:void 0}));return this.controller.createAuthSetting(p).pipe(ue(_=>d(_)),kd(()=>this.refresh()))}update(t,e,i){let s=v(z$1(P({},e),{namespaceId:i.namespaceId,userId:i.userId,authType:i.authType}));return this.controller.updateAuthSetting(t,s).pipe(ue(u=>d(u)),kd(()=>this.refresh()))}delete(t,e){return this.controller.deleteAuthSetting(t).pipe(kd(()=>this.refresh()))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};export{J,R,q};
@@ -1,37 +0,0 @@
1
- import {cN as On,z as z$1,b as P,aW as w,aL as Eo,aM as qn,aZ as js,dn as ge,aR as Fs,az as Kt$1,cT as Wp,al as yt$2,bL as pe,g,cX as yr,w as we$1,bs as bl,c2 as RE,a as Gi,E as ET,an as ce$1,W as Vy,u as ue$1,dp as _t$1,bF as X$1,cd as Uf,cD as Ce$1,a_ as JT,dq as Do,dr as Ke$1,bC as bi,cV as vg,b5 as sT,o as Rg,aC as bu,T as Tg,A as Ug,ds as Hw,dt as m,du as Se$1,by as cm,aA as an$1,h as Fw,bA as wC,bB as CC,b$ as BC,dv as ke,dw as vn$1,X as br,bU as kd,bh as Uy,a7 as va,dx as fi,dy as Ta,dz as b,I as fy,aV as U$1,Y as x,aO as wt$2,aI as MS}from'./main-5PAOSHSM.js';var Xe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i;}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i);}registerOnTouched(e){this.onTouched=e;}registerOnChange(e){this.onChange=e;}setDisabledState(e){this.setProperty("disabled",e);}static \u0275fac=function(i){return new(i||n)(ge(Fs),ge(Kt$1))};static \u0275dir=js({type:n})}return n})(),S=(()=>{class n extends Xe{static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,features:[vg]})}return n})(),D=new w(""),Ft={provide:D,useExisting:bi(()=>wt$1),multi:true},wt$1=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e);}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["input","type","checkbox","formControlName","",3,"ngNoCva",""],["input","type","checkbox","formControl","",3,"ngNoCva",""],["input","type","checkbox","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Rg("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()});},standalone:false,features:[sT([Ft]),vg]})}return n})(),Nt={provide:D,useExisting:bi(()=>Ye),multi:true};function St(){let n=_t$1()?_t$1().getUserAgent():"";return /android (\d+)/.test(n.toLowerCase())}var It=new w(""),Ye=(()=>{class n extends Xe{_compositionMode;_composing=false;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!St());}writeValue(e){let i=e??"";this.setProperty("value",i);}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e);}_compositionStart(){this._composing=true;}_compositionEnd(e){this._composing=false,this._compositionMode&&this.onChange(e);}static \u0275fac=function(i){return new(i||n)(ge(Fs),ge(Kt$1),ge(It,8))};static \u0275dir=js({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(i,r){i&1&&Rg("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)});},standalone:false,features:[sT([Nt]),vg]})}return n})();function Ve(n){return n==null||De(n)===0}function De(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new w(""),I=new w(""),Ot=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_e=class{static min(t){return Ke(t)}static max(t){return Je(t)}static required(t){return Qe(t)}static requiredTrue(t){return xt(t)}static email(t){return Rt(t)}static minLength(t){return Pt(t)}static maxLength(t){return et$1(t)}static pattern(t){return kt(t)}static nullValidator(t){return te()}static compose(t){return ot$1(t)}static composeAsync(t){return at(t)}};function Ke(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Je(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Qe(n){return Ve(n.value)?{required:true}:null}function xt(n){return n.value===true?null:{required:true}}function Rt(n){return Ve(n.value)||Ot.test(n.value)?null:{email:true}}function Pt(n){return t=>{let e=t.value?.length??De(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function et$1(n){return t=>{let e=t.value?.length??De(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function kt(n){if(!n)return te;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ve(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function te(n){return null}function tt$1(n){return n!=null}function nt$1(n){return Do(n)?Ke$1(n):n}function it(n){let t={};return n.forEach(e=>{t=e!=null?P(P({},t),e):t;}),Object.keys(t).length===0?null:t}function rt$1(n,t){return t.map(e=>e(n))}function Tt(n){return !n.validate}function st(n){return n.map(t=>Tt(t)?t:e=>t.validate(e))}function ot$1(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){return it(rt$1(e,t))}}function be(n){return n!=null?ot$1(st(n)):null}function at(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){let i=rt$1(e,t).map(nt$1);return Vy(i).pipe(ue$1(it))}}function Ae(n){return n!=null?at(st(n)):null}function Ue(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function lt(n){return n._rawValidators}function ut(n){return n._rawAsyncValidators}function ye(n){return n?Array.isArray(n)?n:[n]:[]}function ne(n,t){return Array.isArray(n)?n.includes(t):n===t}function He(n,t){let e=ye(t);return ye(n).forEach(r=>{ne(e,r)||e.push(r);}),e}function Le(n,t){return ye(t).filter(e=>!ne(n,e))}var 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(t){this._rawValidators=t||[],this._composedValidatorFn=be(this._rawValidators);}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators);}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t);}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[];}reset(t=void 0){this.control?.reset(t);}hasError(t,e){return this.control?this.control.hasError(t,e):false}getError(t,e){return this.control?this.control.getError(t,e):null}},h=class extends ie{name;get formDirective(){return null}get path(){return null}};var U="VALID",ee="INVALID",k="PENDING",H="DISABLED",E=class{},re=class extends E{value;source;constructor(t,e){super(),this.value=t,this.source=e;}},W=class extends E{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e;}},q$1=class q extends E{touched;source;constructor(t,e){super(),this.touched=t,this.source=e;}},T=class extends E{status;source;constructor(t,e){super(),this.status=t,this.source=e;}},se=class extends E{source;constructor(t){super(),this.source=t;}},N=class extends E{source;constructor(t){super(),this.source=t;}};function Me(n){return (ce(n)?n.validators:n)||null}function jt(n){return Array.isArray(n)?be(n):n||null}function Ee(n,t){return (ce(t)?t.asyncValidators:n)||null}function Bt(n){return Array.isArray(n)?Ae(n):n||null}function ce(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function dt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new m(1e3,"");if(!ht(i,e))throw new m(1001,"")}function ct(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new m(-1002,"")});}var $=class{_pendingDirty=false;_hasOwnPendingAsyncValidator=null;_pendingTouched=false;_onCollectionChange=()=>{};_updateOn;_hasRequired=Gi(false);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e);}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t,this._updateHasRequiredValidator();}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t;}get parent(){return this._parent}get status(){return On(this.statusReactive)}set status(t){On(()=>this.statusReactive.set(t));}_status=ET(()=>this.statusReactive());statusReactive=Gi(void 0);get valid(){return this.status===U}get invalid(){return this.status===ee}get pending(){return this.status===k}get disabled(){return this.status===H}get enabled(){return this.status!==H}errors;get pristine(){return On(this.pristineReactive)}set pristine(t){On(()=>this.pristineReactive.set(t));}_pristine=ET(()=>this.pristineReactive());pristineReactive=Gi(true);get dirty(){return !this.pristine}get touched(){return On(this.touchedReactive)}set touched(t){On(()=>this.touchedReactive.set(t));}_touched=ET(()=>this.touchedReactive());touchedReactive=Gi(false);get untouched(){return !this.touched}_events=new ce$1;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t);}setAsyncValidators(t){this._assignAsyncValidators(t);}addValidators(t){this.setValidators(He(t,this._rawValidators));}addAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators));}removeValidators(t){this.setValidators(Le(t,this._rawValidators));}removeAsyncValidators(t){this.setAsyncValidators(Le(t,this._rawAsyncValidators));}hasValidator(t){return ne(this._rawValidators,t)}hasAsyncValidator(t){return ne(this._rawAsyncValidators,t)}clearValidators(){this.validator=null;}clearAsyncValidators(){this.asyncValidator=null;}markAsTouched(t={}){let e=this.touched===false;this.touched=true;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new q$1(true,i));}markAllAsDirty(t={}){this.markAsDirty({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t));}markAllAsTouched(t={}){this.markAsTouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t));}markAsUntouched(t={}){let e=this.touched===true;this.touched=false,this._pendingTouched=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:i});}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==false&&this._events.next(new q$1(false,i));}markAsDirty(t={}){let e=this.pristine===true;this.pristine=false;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new W(false,i));}markAsPristine(t={}){let e=this.pristine===false;this.pristine=true,this._pendingDirty=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:true,emitEvent:t.emitEvent});}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==false&&this._events.next(new W(true,i));}markAsPending(t={}){this.status=k;let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new T(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(z$1(P({},t),{sourceControl:e}));}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=H,this.errors=null,this._forEachChild(r=>{r.disable(z$1(P({},t),{onlySelf:true}));}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,i)),this._events.next(new T(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(true));}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=U,this._forEachChild(i=>{i.enable(z$1(P({},t),{onlySelf:true}));}),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent}),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(false));}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e));}setParent(t){this._parent=t;}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===U||this.status===k)&&this._runAsyncValidator(i,t.emitEvent);}let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,e)),this._events.next(new T(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(z$1(P({},t),{sourceControl:e}));}_updateTreeValidity(t={emitEvent:true}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent});}_setInitialStatus(){this.status=this._allControlsDisabled()?H:U;}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=k,this._hasOwnPendingAsyncValidator={emitEvent:e!==false,shouldHaveEmitted:t!==false};let i=nt$1(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t});});}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??false;return this._hasOwnPendingAsyncValidator=null,t}return false}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==false,this,e.shouldHaveEmitted);}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return !!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new T(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i);}_initObservables(){this.valueChanges=new yt$2,this.statusChanges=new yt$2;}_calculateStatus(){return this._allControlsDisabled()?H:this.errors?ee:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(k)?k:this._anyControlsHaveStatus(ee)?ee:U}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new W(this.pristine,e));}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new q$1(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e);}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t;}_setUpdateStrategy(t){ce(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn);}_parentMarkedDirty(t){return !t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=jt(this._rawValidators),this._updateHasRequiredValidator();}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Bt(this._rawAsyncValidators);}_updateHasRequiredValidator(){On(()=>this._hasRequired.set(this.hasValidator(_e.required)));}};function ht(n,t){return Object.hasOwn(n,t)}function Gt(n){return n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"}function Ut(n,t,e,i){switch(e){case "name":n.setAttribute(t,e,i);break;case "disabled":case "readonly":case "required":i?n.setAttribute(t,e,""):n.removeAttribute(t,e);break;case "max":case "min":case "minLength":case "maxLength":i!==void 0?n.setAttribute(t,e,i.toString()):n.removeAttribute(t,e);break}}var Ce=class{kind;context;control;message;constructor({kind:t,context:e,control:i}){this.kind=t,this.context=e,this.control=i;}};function Ht(n){return typeof n=="number"?n:parseInt(n,10)}function ft(n){return typeof n=="number"?n:parseFloat(n)}var he=(()=>{class n{_validator=te;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):te,this._onChange?.();}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e;}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=js({type:n,features:[bu]})}return n})(),Lt={provide:y,useExisting:bi(()=>Wt),multi:true},Wt=(()=>{class n extends he{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>Je(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Tg("max",r._enabled?r.max:null);},inputs:{max:"max"},standalone:false,features:[sT([Lt]),vg]})}return n})(),qt={provide:y,useExisting:bi(()=>$t),multi:true},$t=(()=>{class n extends he{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Tg("min",r._enabled?r.min:null);},inputs:{min:"min"},standalone:false,features:[sT([qt]),vg]})}return n})(),zt={provide:y,useExisting:bi(()=>gt),multi:true};var gt=(()=>{class n extends he{required;inputName="required";normalizeInput=JT;createValidator=e=>Qe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&Tg("required",r._enabled?"":null);},inputs:{required:"required"},standalone:false,features:[sT([zt]),vg]})}return n})();var Zt={provide:y,useExisting:bi(()=>Xt),multi:true},Xt=(()=>{class n extends he{maxlength;inputName="maxlength";normalizeInput=e=>Ht(e);createValidator=e=>et$1(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Tg("maxlength",r._enabled?r.maxlength:null);},inputs:{maxlength:"maxlength"},standalone:false,features:[sT([Zt]),vg]})}return n})();var Yt=new w(""),O=new w("",{factory:()=>Z$1}),Z$1="always";function fe(n,t){return [...t.path,n]}function oe(n,t,e=Z$1){Fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Jt(n,t),en(n,t),Qt(n,t),Kt(n,t);}function ae(n,t,e=true){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),ue(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}));}function le(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t);});}function Kt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i);};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e);});}}function Fe(n,t){let e=lt(n);t.validator!==null?n.setValidators(Ue(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ut(n);t.asyncValidator!==null?n.setAsyncValidators(Ue(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();le(t._rawValidators,r),le(t._rawAsyncValidators,r);}function ue(n,t){let e=false;if(n!==null){if(t.validator!==null){let r=lt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=true,n.setValidators(s));}}if(t.asyncValidator!==null){let r=ut(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=true,n.setAsyncValidators(s));}}}let i=()=>{};return le(t._rawValidators,i),le(t._rawAsyncValidators,i),e}function Jt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=true,n._pendingDirty=true,n.updateOn==="change"&&pt(n,t);});}function Qt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=true,n.updateOn==="blur"&&n._pendingChange&&pt(n,t),n.updateOn!=="submit"&&n.markAsTouched();});}function pt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:false}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=false;}function en(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i);};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e);});}function mt(n,t){Fe(n,t);}function tn(n,t){return ue(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return false;let e=n.model;return e.isFirstChange()?true:!Object.is(t,e.currentValue)}function nn(n){return Object.getPrototypeOf(n.constructor)===S}function vt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=false);});}function rn(n,t){if(!t)return null;let e,i,r;return t.forEach(s=>{s.constructor===Ye?e=s:nn(s)?i=s:r=s;}),r||i||e||null}function sn(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}var Ne={provide:Yt,useFactory:()=>{let n=g(_,{self:true});return {setParseErrors:t=>{n.setParseErrorSource(t);},set onReset(t){n.onReset=t;}}}},_=class extends ie{_parent=null;name=null;valueAccessor=null;isCustomControlBased=false;userOnReset;resetSubscription;set onReset(t){this.userOnReset=t,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription?.add(this.resetSubscription));}isNativeFormElement=false;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=rn(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(t,e,i){super(),this.injector=t,this.renderer=e,this.rawValueAccessors=i,this.injector?.get(we$1)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe();});}setupCustomControl(){this.subscription?.unsubscribe();let t=this.injector?.get(bl);if(!this.control||!t)return;let e=t.markForCheck.bind(t);this.subscription=new X$1,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator);}ngControlCreate(t){!t.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!t.customControl||(this.isCustomControlBased=true,t.listenToCustomControlModel(r=>{this.control?.setValue(r,{emitModelToViewChange:false}),this.control?.markAsDirty(),this.viewToModelUpdate(r);}),t.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched();}),this.customControlBindings={},this.isNativeFormElement=Gt(t.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(r=>r instanceof gt));}ngControlUpdate(t,e){if(!this.isCustomControlBased)return;let i=this.control,r=this.customControlBindings;Object.is(r.value,i.value)||(r.value=i.value,t.setCustomControlModelInput(i.value)),this.bindControlProperty(t,r,"touched",i.touched),this.bindControlProperty(t,r,"dirty",i.dirty),this.bindControlProperty(t,r,"valid",i.valid),this.bindControlProperty(t,r,"invalid",i.invalid),this.bindControlProperty(t,r,"pending",i.pending),this.bindControlProperty(t,r,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(t,r,"required",this.isRequired);let s=i.errors;if(r.errors!==s){r.errors=s;let a=this._convertErrors(s);t.setInputOnDirectives("errors",a);}}get isRequired(){return (this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??false}get shouldBindRequired(){return true}bindControlProperty(t,e,i,r){if(e[i]===r)return;e[i]=r;let s=t.setInputOnDirectives(i,r);this.isNativeFormElement&&!s&&(i==="disabled"||i==="required")&&this.renderer&&Ut(this.renderer,t.nativeElement,i,r);}_convertErrors(t){if(t===null)return [];let e=this.control;return Object.entries(t).map(([i,r])=>new Ce({context:r,kind:i,control:e}))}setParseErrorSource(t){if(t===void 0)return;let e=null,i=ET(()=>{let r=t();return r.length===0?null:r.reduce((s,a)=>(s[a.kind]=a,s),{})});this.parseErrorsValidator=(()=>e).bind(this),Uf(()=>{e=i(),this.control?.updateValueAndValidity({emitEvent:false});},{injector:this.injector});}removeParseErrorsValidator(t){this.parseErrorsValidator&&(t?.removeValidators(this.parseErrorsValidator),t?.updateValueAndValidity({emitEvent:false}));}},de=class{_cd;constructor(t){this._cd=t;}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return !!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return !!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return !!this._cd?.control?.invalid}get isPending(){return !!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Zn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(_,2))};static \u0275dir=js({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&Ug("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending);},standalone:false,features:[vg]})}return n})(),Xn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(h,10))};static \u0275dir=js({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&Ug("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted);},standalone:false,features:[vg]})}return n})(),z=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;registerControl(t,e){let i=this._find(t);return i||(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}removeControl(t,e={}){let i=this._find(t);i&&i._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}setControl(t,e,i={}){let r=this._find(t);r&&r._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}contains(t){return this._find(t)?.enabled===true}setValue(t,e={}){On(()=>{ct(this,true,t),Object.keys(t).forEach(i=>{dt(this,true,i),this.controls[i].setValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this._find(i);r&&r.patchValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(false,(e,i)=>i._syncPendingControls()?true:e);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e);});}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);});}_updateValue(){this.value=this._reduceValue();}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return true;return false}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s);}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return false;return Object.keys(this.controls).length>0||this.disabled}_find(t){return ht(this.controls,t)?this.controls[t]:null}};var Yn=z;var on={provide:h,useExisting:bi(()=>an)},L=Promise.resolve(),an=(()=>{class n extends h{callSetDisabledState;get submitted(){return On(this.submittedReactive)}_submitted=ET(()=>this.submittedReactive());submittedReactive=Gi(false);_directives=new Set;form;ngSubmit=new yt$2;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new z({},be(e),Ae(i));}ngAfterViewInit(){this._setUpdateStrategy();}get formDirective(){return this}get control(){return this.form}get path(){return []}get controls(){return this.form.controls}addControl(e){L.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:false}),this._directives.add(e);});}getControl(e){return this.form.get(e.path)}removeControl(e){L.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e);});}addFormGroup(e){L.then(()=>{let i=this._findContainer(e.path),r=new z({});mt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:false});});}removeFormGroup(e){L.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name);});}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){L.then(()=>{this.form.get(e.path).setValue(i);});}setValue(e){this.control.setValue(e);}onSubmit(e){return this.submittedReactive.set(true),vt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm();}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(false);}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn);}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=js({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&Rg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[sT([on]),vg]})}return n})();function We(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}function qe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var _t=class extends ${defaultValue=null;_onChange=[];_pendingValue;_pendingChange=false;constructor(t=null,e,i){super(Me(e),Ee(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator}),ce(e)&&(e.nonNullable||e.initialValueIsDefault)&&(qe(t)?this.defaultValue=t.value:this.defaultValue=t);}setValue(t,e={}){On(()=>{this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==false&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==false)),this.updateValueAndValidity(e);});}patchValue(t,e={}){this.setValue(t,e);}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=false,e?.emitEvent!==false&&this._events.next(new N(this));}_updateValue(){}_anyControls(t){return false}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t);}_unregisterOnChange(t){We(this._onChange,t);}registerOnDisabledChange(t){this._onDisabledChange.push(t);}_unregisterOnDisabledChange(t){We(this._onDisabledChange,t);}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:true,emitModelToViewChange:false}),true):false}_applyFormState(t){qe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:true,emitEvent:false}):this.enable({onlySelf:true,emitEvent:false})):this.value=this._pendingValue=t;}};var ln=n=>n instanceof _t,un=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this);}ngOnDestroy(){this.formDirective?.removeFormGroup(this);}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,standalone:false,features:[vg]})}return n})();var dn={provide:_,useExisting:bi(()=>cn)},$e=Promise.resolve(),cn=(()=>{class n extends _{_changeDetectorRef;callSetDisabledState;control=new _t;static ngAcceptInputType_isDisabled;_registered=false;viewModel;name="";isDisabled;model;options;update=new yt$2;constructor(e,i,r,s,a,f,C,j){super(C,j,s),this._changeDetectorRef=a,this.callSetDisabledState=f,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)});}this._setUpControl();}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.formDirective?.removeControl(this);}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,false);}get shouldBindRequired(){return false}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=true;}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn);}_isStandalone(){return !this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:false});}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,e));}_checkForErrors(){this._checkName();}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name;}_updateValue(e){$e.then(()=>{this.control.setValue(e,{emitViewToModelChange:false}),this._changeDetectorRef?.markForCheck();});}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&JT(i);$e.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck();});}_getPath(e){return this._parent?fe(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(ge(h,9),ge(y,10),ge(I,10),ge(D,10),ge(bl,8),ge(O,8),ge(pe,8),ge(Fs,8))};static \u0275dir=js({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:false,features:[sT([dn,Ne]),vg,bu,Hw(null)]})}return n})();var Jn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=js({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:false})}return n})(),hn={provide:D,useExisting:bi(()=>fn),multi:true},fn=(()=>{class n extends S{writeValue(e){let i=e??"";this.setProperty("value",i);}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Rg("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[sT([hn]),vg]})}return n})(),gn={provide:D,useExisting:bi(()=>mn),multi:true};var pn=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i]);}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value);});}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:false}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Ce$1({token:n,factory:n.\u0275fac})}return n})(),mn=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=false;onChange=()=>{};name;formControlName;value;callSetDisabledState=g(O,{optional:true})??Z$1;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s;}ngOnInit(){this._control=this._injector.get(_),this._checkName(),this._registry.add(this._control,this);}ngOnDestroy(){this._registry.remove(this);}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state);}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this);};}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=true;}fireUncheck(e){this.writeValue(e);}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName);}static \u0275fac=function(i){return new(i||n)(ge(Fs),ge(Kt$1),ge(pn),ge(pe))};static \u0275dir=js({type:n,selectors:[["input","type","radio","formControlName","",3,"ngNoCva",""],["input","type","radio","formControl","",3,"ngNoCva",""],["input","type","radio","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Rg("change",function(){return r.onChange()})("blur",function(){return r.onTouched()});},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:false,features:[sT([gn]),vg]})}return n})(),vn={provide:D,useExisting:bi(()=>_n),multi:true},_n=(()=>{class n extends S{writeValue(e){this.setProperty("value",parseFloat(e));}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["input","type","range","formControlName","",3,"ngNoCva",""],["input","type","range","formControl","",3,"ngNoCva",""],["input","type","range","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Rg("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[sT([vn]),vg]})}return n})(),ze=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i);}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent});}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent});}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}get length(){return this.controls.length}setValue(t,e={}){On(()=>{ct(this,false,t),t.forEach((i,r)=>{dt(this,false,r),this.at(r).setValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}));}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?true:e,false);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i);});}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value);}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t));}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return false;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);}_find(t){return this.at(t)??null}};var yt$1=(()=>{class n extends h{callSetDisabledState;get submitted(){return On(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e);}_submitted=ET(()=>this._submittedReactive());_submittedReactive=Gi(false);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){this.onChanges(e);}ngOnDestroy(){this.onDestroy();}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form);}onDestroy(){this.form&&(ue(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}));}get formDirective(){return this}get path(){return []}addControl(e){let i=this.form.get(e.path);return e._setupWithForm(i,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:false}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ae(e.control||null,e,false),sn(this.directives,e);}addFormGroup(e){this._setUpFormContainer(e);}removeFormGroup(e){this._cleanUpFormContainer(e);}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e);}removeFormArray(e){this._cleanUpFormContainer(e);}updateModel(e,i){this.form.get(e.path).setValue(i);}onReset(){this.resetForm();}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(false);}onSubmit(e){return this.submitted=true,vt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ae(i||null,e),ln(r)&&e._setupWithForm(r,this.callSetDisabledState));}),this.form._updateTreeValidity({emitEvent:false});}_setUpFormContainer(e){let i=this.form.get(e.path);mt(i,e),i.updateValueAndValidity({emitEvent:false});}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&tn(i,e)&&i.updateValueAndValidity({emitEvent:false});}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{});}_updateValidators(){Fe(this.form,this),this._oldForm&&ue(this._oldForm,this);}_checkFormPresent(){this.form;}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=js({type:n,features:[vg,bu]})}return n})();var Se=new w(""),yn={provide:_,useExisting:bi(()=>Cn)},Cn=(()=>{class n extends _{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new yt$2;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,r),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&(ae(i,this,false),this.removeParseErrorsValidator(i)),this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.form,this,this.callSetDisabledState)),this.form.updateValueAndValidity({emitEvent:false});}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.form&&ae(this.form,this,false);}get path(){return []}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_isControlChanged(e){return e.hasOwnProperty("form")}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,true);}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(O,8),ge(Fs,8),ge(pe,8))};static \u0275dir=js({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:false,features:[sT([yn,Ne]),vg,bu,Hw(null)]})}return n})(),Vn={provide:h,useExisting:bi(()=>Ct)},Ct=(()=>{class n extends un{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_checkParentType(){Dt(this._parent);}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=js({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:false,features:[sT([Vn]),vg]})}return n})(),Dn={provide:h,useExisting:bi(()=>Vt)},Vt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnInit(){Dt(this._parent),this.formDirective.addFormArray(this);}ngOnDestroy(){this.formDirective?.removeFormArray(this);}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=js({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:false,features:[sT([Dn]),vg]})}return n})();function Dt(n){return !(n instanceof Ct)&&!(n instanceof yt$1)&&!(n instanceof Vt)}var bn={provide:_,useExisting:bi(()=>An)},An=(()=>{class n extends _{_ngModelWarningConfig;_added=false;viewModel;control;name=null;set isDisabled(e){}model;update=new yt$2;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,s),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_setupWithForm(e,i){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(e,this,i));}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model));}ngOnDestroy(){this.formDirective?.removeControl(this);}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=true;}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,true));}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(Fs,8),ge(pe,8))};static \u0275dir=js({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:false,features:[sT([bn,Ne]),vg,bu,Hw(null)]})}return n})();var Mn={provide:h,useExisting:bi(()=>En)},En=(()=>{class n extends yt$1{form=null;ngSubmit=new yt$2;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&Rg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[sT([Mn]),vg]})}return n})(),Fn={provide:D,useExisting:bi(()=>At),multi:true};function bt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function wn(n){return n.split(":")[0]}var At=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;appRefInjector=g(yr).injector;destroyRef=g(we$1);cdr=g(bl);_queuedWrite=false;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=true,RE({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=false,this.writeValue(this.value));}},{injector:this.appRefInjector}));}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=bt(i,e);this.setProperty("value",r);}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value);};}_registerOption(){return (this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=wn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["select","formControlName","",3,"multiple","",3,"ngNoCva",""],["select","formControl","",3,"multiple","",3,"ngNoCva",""],["select","ngModel","",3,"multiple","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Rg("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[sT([Fn]),vg]})}return n})(),Qn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption());}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(bt(this.id,e)),this._select._writeValueAfterRender());}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender();}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender();}static \u0275fac=function(i){return new(i||n)(ge(Kt$1),ge(Fs),ge(At,9))};static \u0275dir=js({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})(),Nn={provide:D,useExisting:bi(()=>Mt),multi:true};function Ze(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Sn(n){return n.split(":")[0]}var Mt=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a)>-1);};}else i=r=>{r._setSelected(false);};this._optionMap.forEach(i);}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let f=0;f<a.length;f++){let C=a[f],j=this._getOptionValue(C.value);r.push(j);}}else {let a=i.options;for(let f=0;f<a.length;f++){let C=a[f];if(C.selected){let j=this._getOptionValue(C.value);r.push(j);}}}this.value=r,e(r);};}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Sn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Wp(n)))(r||n)}})();static \u0275dir=js({type:n,selectors:[["select","multiple","","formControlName","",3,"ngNoCva",""],["select","multiple","","formControl","",3,"ngNoCva",""],["select","multiple","","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Rg("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[sT([Nn]),vg]})}return n})(),ei=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this));}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value));}set value(e){this._select?(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e);}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e);}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value));}static \u0275fac=function(i){return new(i||n)(ge(Kt$1),ge(Fs),ge(Mt,9))};static \u0275dir=js({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})();var Et=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({})}return n})();var ti=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[Et]})}return n})(),ni=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:Se,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Eo({type:n});static \u0275inj=qn({imports:[Et]})}return n})();function V(i){return Error(`Unable to find icon with the name "${i}"`)}function X(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function q(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Y(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var a=class{url;svgText;options;svgElement=null;constructor(l,t,e){this.url=l,this.svgText=t,this.options=e;}},K=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._document=n;}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new a(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){let r=this._sanitizer.sanitize(ke.HTML,n);if(!r)throw Y(n);let s=vn$1(r);return this._addSvgIconConfig(t,e,new a("",s,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let o=this._sanitizer.sanitize(ke.HTML,e);if(!o)throw Y(e);let r=vn$1(o);return this._addSvgIconSetConfig(t,new a("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(ke.RESOURCE_URL,t);if(!e)throw q(t);let n=this._cachedIconsByUrl.get(e);return n?br(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(kd(o=>this._cachedIconsByUrl.set(e,o)),ue$1(o=>C(o)))}getNamedSvgIcon(t,e=""){let n=J(e,t),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):Uy(V(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear();}_getSvgFromConfig(t){return t.svgText?br(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(ue$1(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return br(n);let o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(va(s=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(ke.RESOURCE_URL,r.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(f)),br(null)})));return Vy(o).pipe(ue$1(()=>{let r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw V(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){let r=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(r,t,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(kd(e=>t.svgText=e),ue$1(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?br(null):this._fetchIcon(t).pipe(kd(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let o=t.querySelector(`[id="${e}"]`);if(!o)return null;let r=o.cloneNode(true);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let s=this._svgElementFromString(vn$1("<svg></svg>"));return s.appendChild(r),this._setSvgAttributes(s,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(vn$1("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){let{name:r,value:s}=n[o];r!=="id"&&e.setAttribute(r,s);}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(true));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,o=n?.withCredentials??false;if(!this._httpClient)throw X();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let r=this._sanitizer.sanitize(ke.RESOURCE_URL,e);if(!r)throw q(e);let s=this._inProgressUrlFetches.get(r);if(s)return s;let h=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(ue$1(f=>vn$1(f)),fi(()=>this._inProgressUrlFetches.delete(r)),Ta());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(J(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e;}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](e,t);if(o)return Z(o)?new a(o.url,null,o.options):new a(o,null)}}static \u0275fac=function(e){return new(e||i)(b(fy,8),b(MS),b(U$1,8),b(Se$1))};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function C(i){return i.cloneNode(true)}function J(i,l){return i+":"+l}function Z(i){return !!(i.url&&i.options)}var tt=["*"],et=new w("MAT_ICON_DEFAULT_OPTIONS"),nt=new w("mat-icon-location",{providedIn:"root",factory:()=>{let i=g(U$1),l=i?i.location:null;return {getPathname:()=>l?l.pathname+l.search:""}}}),G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ot=G.map(i=>`[${i}]`).join(", "),rt=/^url\(['"]?#(.*?)['"]?\)$/,wt=(()=>{class i{_elementRef=g(Kt$1);_iconRegistry=g(K);_location=g(nt);_errorHandler=g(Se$1);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;inline=false;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t);}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses());}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses());}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=X$1.EMPTY;constructor(){let t=g(new cm("aria-hidden"),{optional:true}),e=g(et,{optional:true});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true");}_splitIconName(t){if(!t)return ["",""];let e=t.split(":");switch(e.length){case 1:return ["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses();}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e));}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();}_usingFontIcon(){return !this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t);}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove();}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon);}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`);});});}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(ot),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)G.forEach(r=>{let s=e[o],h=s.getAttribute(r),f=h?h.match(rt):null;if(f){let p=n.get(s);p||(p=[],n.set(s,p)),p.push({name:r,value:f[1]});}});}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(an$1(1)).subscribe(o=>this._setSvgElement(o),o=>{let r=`Error retrieving icon ${e}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(r));});}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Fw({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(Tg("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),BC(n.color?"mat-"+n.color:""),Ug("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"));},inputs:{color:"color",inline:[2,"inline","inline",JT],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(wC(),CC(0));},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
2
- color: var(--mat-icon-color, inherit);
3
- }
4
-
5
- .mat-icon {
6
- -webkit-user-select: none;
7
- user-select: none;
8
- background-repeat: no-repeat;
9
- display: inline-block;
10
- fill: currentColor;
11
- height: 24px;
12
- width: 24px;
13
- overflow: hidden;
14
- }
15
- .mat-icon.mat-icon-inline {
16
- font-size: inherit;
17
- height: inherit;
18
- line-height: inherit;
19
- width: inherit;
20
- }
21
- .mat-icon.mat-ligature-font[fontIcon]::before {
22
- content: attr(fontIcon);
23
- }
24
-
25
- [dir=rtl] .mat-icon-rtl-mirror {
26
- transform: scale(-1, 1);
27
- }
28
-
29
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,
30
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon {
31
- display: block;
32
- }
33
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,
34
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon {
35
- margin: auto;
36
- }
37
- `],encapsulation:2})}return i})(),yt=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Eo({type:i});static \u0275inj=qn({imports:[wt$2]})}return i})();export{$t as $,At as A,Cn as C,D,En as E,Jn as J,Qn as Q,Vt as V,Wt as W,Xt as X,Ye as Y,Zn as Z,_,wt$1 as a,_e as b,cn as c,an as d,ei as e,fn as f,gt as g,_n as h,y as i,Yn as j,_t as k,Xn as l,mn as m,ni as n,z as o,An as p,Ct as q,ti as t,wt as w,yt as y,ze as z};