@whoz-oss/coday-client 0.122.0 → 0.124.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.
- package/3rdpartylicenses.txt +19 -19
- package/browser/chunk-2WJFXA53.js +1 -0
- package/browser/chunk-3D3KN52V.js +1 -0
- package/browser/chunk-3JGMGRXW.js +5 -0
- package/browser/chunk-3U3QVZEU.js +2 -0
- package/browser/chunk-4VZIFCB6.js +83 -0
- package/browser/chunk-53STPEYQ.js +3 -0
- package/browser/chunk-6LO3ANKL.js +1 -0
- package/browser/chunk-7MXZXY4I.js +1 -0
- package/browser/{chunk-VNGIXNER.js → chunk-AJOXSD6I.js} +1 -1
- package/browser/chunk-AK6F2DC7.js +5 -0
- package/browser/chunk-AQ3SEH2N.js +1 -0
- package/browser/{chunk-CBU7DNMV.js → chunk-B2FFL2F7.js} +1 -1
- package/browser/chunk-B2QA6UZX.js +9 -0
- package/browser/chunk-BRHVMM4O.js +1 -0
- package/browser/{chunk-OK747ZMT.js → chunk-CRBPOP52.js} +1 -1
- package/browser/{chunk-P5TSPSCB.js → chunk-DE5MXWYR.js} +1 -1
- package/browser/{chunk-NO2ODJHX.js → chunk-DRBOHCTP.js} +3 -3
- package/browser/{chunk-UGVRFJHC.js → chunk-EPA5P2I6.js} +1 -1
- package/browser/chunk-ESGUJDS6.js +1 -0
- package/browser/chunk-EWEA7F46.js +270 -0
- package/browser/chunk-FOWPCPU3.js +2 -0
- package/browser/chunk-GAZJZBKP.js +1 -0
- package/browser/chunk-H5JE6Y2U.js +1 -0
- package/browser/chunk-H6OBD3IB.js +1 -0
- package/browser/chunk-HCG45H7O.js +2 -0
- package/browser/chunk-HSNVFCBN.js +1 -0
- package/browser/chunk-HTG2SANG.js +1 -0
- package/browser/chunk-HTRRBKXE.js +2 -0
- package/browser/chunk-I5EEQETN.js +1 -0
- package/browser/chunk-I5OT3IGD.js +1 -0
- package/browser/{chunk-MQ3QG7VF.js → chunk-IFXDK4GQ.js} +1 -1
- package/browser/chunk-IXD43YQI.js +2 -0
- package/browser/chunk-IZFHJAEI.js +1 -0
- package/browser/chunk-J44N4WCW.js +1 -0
- package/browser/chunk-JFRMX4TL.js +1 -0
- package/browser/chunk-JUPV65PP.js +1 -0
- package/browser/chunk-KKEITF3S.js +1 -0
- package/browser/chunk-KTPX26DH.js +2 -0
- package/browser/chunk-KYPWHL43.js +1 -0
- package/browser/chunk-MWWLTJ77.js +1 -0
- package/browser/{chunk-7RF7FEOC.js → chunk-NAQEVUOV.js} +1 -1
- package/browser/chunk-O2IJMHBE.js +2 -0
- package/browser/chunk-O3U2KGCT.js +1 -0
- package/browser/chunk-OPGZ37VP.js +1 -0
- package/browser/chunk-PWDBCAQS.js +2 -0
- package/browser/{chunk-4UEZ3CNG.js → chunk-Q3YY3NFM.js} +1 -1
- package/browser/{chunk-UXXLDXN3.js → chunk-QSQYSFNQ.js} +1 -1
- package/browser/chunk-QWMDAFBN.js +1 -0
- package/browser/chunk-QXZ6AR76.js +1 -0
- package/browser/chunk-SHHNG775.js +1 -0
- package/browser/chunk-SPIWOGE3.js +1 -0
- package/browser/chunk-SZNIOJIK.js +1 -0
- package/browser/chunk-TLXAJ2J2.js +1 -0
- package/browser/chunk-TNUQQNZR.js +1 -0
- package/browser/{chunk-OMLFSDJ5.js → chunk-U4662WTU.js} +1 -1
- package/browser/chunk-UDGUWWGZ.js +1 -0
- package/browser/chunk-UKAN3Y3I.js +2 -0
- package/browser/{chunk-FCCT54AP.js → chunk-UORJVNGU.js} +1 -1
- package/browser/chunk-VNCIHM33.js +1 -0
- package/browser/chunk-VOCIDXAB.js +1 -0
- package/browser/{chunk-5UOZGBZ2.js → chunk-WNNKQ2DH.js} +4 -4
- package/browser/chunk-WPC6XC7P.js +2 -0
- package/browser/chunk-XIQ3L6H6.js +1 -0
- package/browser/chunk-XJUBZLY2.js +1 -0
- package/browser/chunk-XQ4PJULE.js +1 -0
- package/browser/chunk-YZSDQIEK.js +7 -0
- package/browser/chunk-ZAM3WGZM.js +3 -0
- package/browser/chunk-ZL64I3EB.js +4 -0
- package/browser/index.html +2 -2
- package/browser/main-PMTICERL.js +1 -0
- package/browser/{styles-HC545BYS.css → styles-THLRUXCP.css} +1 -1
- package/package.json +1 -1
- package/browser/chunk-2DE3OXG3.js +0 -1
- package/browser/chunk-3TOJSAQM.js +0 -1
- package/browser/chunk-4LFZBXC3.js +0 -1
- package/browser/chunk-4OMSGXSL.js +0 -1
- package/browser/chunk-5CTKRMM2.js +0 -2
- package/browser/chunk-6NFS2ZCV.js +0 -1
- package/browser/chunk-DJBCK5D7.js +0 -5
- package/browser/chunk-FPUSD6J7.js +0 -1
- package/browser/chunk-G5XS2TEE.js +0 -1
- package/browser/chunk-GT5UFSUE.js +0 -2
- package/browser/chunk-H2Q3V5BR.js +0 -1
- package/browser/chunk-IHHVFGPF.js +0 -1
- package/browser/chunk-JPWWZVYZ.js +0 -1
- package/browser/chunk-JW6LSUP2.js +0 -1
- package/browser/chunk-KYPMYRHP.js +0 -1
- package/browser/chunk-LVEC3TBP.js +0 -1
- package/browser/chunk-MJEQQZDO.js +0 -1
- package/browser/chunk-N5LTGEF5.js +0 -1
- package/browser/chunk-PKKHLHXJ.js +0 -10
- package/browser/chunk-PWN5O4WY.js +0 -1
- package/browser/chunk-S3ZG6FUN.js +0 -1
- package/browser/chunk-S5LR3GBS.js +0 -2
- package/browser/chunk-SNTJSECZ.js +0 -1
- package/browser/chunk-T357ITNZ.js +0 -1
- package/browser/chunk-TE3JOGRA.js +0 -2
- package/browser/chunk-UMDZZGIC.js +0 -1
- package/browser/chunk-VWD2QH4N.js +0 -1
- package/browser/chunk-W4VYO3E2.js +0 -1
- package/browser/chunk-XPK5V34V.js +0 -1
- package/browser/chunk-YDXVLOQW.js +0 -11
- package/browser/chunk-Z7DC3UIO.js +0 -1
- package/browser/main-3X4E54YE.js +0 -361
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as k}from"./chunk-QWMDAFBN.js";import{a as z,b as F}from"./chunk-WPC6XC7P.js";import{C as R,c as A,g as B,m as Q}from"./chunk-XJUBZLY2.js";import{b as D}from"./chunk-XIQ3L6H6.js";import{Q as O,S as V}from"./chunk-B2QA6UZX.js";import{Bb as y,Db as c,Fb as _,Jb as j,Jc as S,Ka as a,Kb as P,Lb as M,Tb as l,Ub as f,Vb as E,Wa as C,Xb as T,Yb as I,Zb as N,ca as b,ga as v,ha as w,lb as u,mb as g,oa as x,rb as s,sb as i,tb as n}from"./chunk-3JGMGRXW.js";var H=["inputElement"];function G(o,r){if(o&1&&(i(0,"span",3),l(1),n()),o&2){let t=_();a(),f(t.label)}}function J(o,r){if(o&1&&(i(0,"small",5),l(1),n()),o&2){let t=_();a(),f(t.hint)}}var h=class o{label="";placeholder="";hint="";isDisabled=!1;value="";autoFocus=!0;valueChange=new x;enterPressed=new x;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=C({type:o,selectors:[["app-text-input"]],viewQuery:function(t,e){if(t&1&&j(H,5),t&2){let p;P(p=M())&&(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=y();i(0,"div",1)(1,"label",2),u(2,G,2,1,"span",3),i(3,"input",4,0),N("ngModelChange",function(m){return v(p),I(e.inputValue,m)||(e.inputValue=m),w(m)}),c("ngModelChange",function(m){return e.onValueChange(m)})("keydown.enter",function(){return e.onEnter()}),n()(),u(5,J,2,1,"small",5),n()}t&2&&(a(2),g(e.label?2:-1),a(),T("ngModel",e.inputValue),s("placeholder",e.placeholder)("disabled",e.isDisabled),a(2),g(e.hint?5:-1))},dependencies:[R,A,B,Q,S],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}}"]})};function K(o,r){if(o&1&&(i(0,"div",8),l(1),n()),o&2){let t=_();a(),f(t.errorMessage)}}var W=class o{router=b(k);projectStateService=b(D);projectName="";projectPath="";isCreating=!1;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=!0,this.errorMessage=null,this.projectStateService.createProject(this.projectName.trim(),this.projectPath.trim()).subscribe({next:()=>{let r=this.projectName.trim();this.isCreating=!1,this.projectStateService.selectProject(r),this.router.navigate(["project",r])},error:r=>{this.errorMessage=r.error?.error??"Failed to create project",this.isCreating=!1}})}onCancel(){this.router.navigate(["/"])}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({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&&(i(0,"div",0)(1,"div",1)(2,"button",2),c("click",function(){return e.onCancel()}),i(3,"mat-icon"),l(4,"arrow_back"),n(),l(5," Back to projects "),n(),i(6,"h1",3),l(7,"New project"),n(),i(8,"p",4),l(9,"Point Coday to an existing directory on your machine."),n(),i(10,"div",5)(11,"app-text-input",6),c("valueChange",function(d){return e.projectName=d}),n(),i(12,"app-text-input",7),c("valueChange",function(d){return e.projectPath=d})("enterPressed",function(){return e.onCreate()}),n(),u(13,K,2,1,"div",8),n(),i(14,"div",9)(15,"button",10),c("click",function(){return e.onCancel()}),l(16,"Cancel"),n(),i(17,"button",11),c("click",function(){return e.onCreate()}),l(18),n()()()()),t&2&&(a(11),s("value",e.projectName)("isDisabled",e.isCreating)("autoFocus",!0),a(),s("value",e.projectPath)("isDisabled",e.isCreating),a(),g(e.errorMessage?13:-1),a(2),s("disabled",e.isCreating),a(2),s("disabled",!e.isValid()||e.isCreating),a(),E(" ",e.isCreating?"Creating\u2026":"Create project"," "))},dependencies:[V,O,F,z,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}"]})};export{W as ProjectNewComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as g}from"./chunk-QWMDAFBN.js";import{Ka as i,Tb as p,Ub as h,Wa as l,ca as s,vb as c,wb as u}from"./chunk-3JGMGRXW.js";var m="coday_oauth_callback",d=class r{route=s(g);message="Authentication in progress...";ngOnInit(){console.log("[OAuth Callback] Component initialized");let t=this.route.snapshot.queryParamMap.get("code"),e=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),a=this.route.snapshot.queryParamMap.get("error_description");if(console.log("[OAuth Callback] Code:",t,"State:",e,"Error:",o,"Opener:",!!window.opener),o){if(console.log("[OAuth Callback] OAuth error received:",o,a),!window.opener){console.warn("[OAuth Callback] No window.opener \u2014 using localStorage fallback for error"),localStorage.setItem(m,JSON.stringify({error:o,state:e,errorDescription:a})),this.message="Authentication failed. You can close this window.",setTimeout(()=>window.close(),1e3);return}try{window.opener.postMessage({error:o,state:e,errorDescription:a},window.location.origin),console.log("[OAuth Callback] Error postMessage sent successfully"),setTimeout(()=>{console.log("[OAuth Callback] Closing popup after error"),window.close()},1e3)}catch(n){console.error("[OAuth Callback] Error sending error postMessage:",n),alert("OAuth error: Failed to communicate with parent window")}return}if(!t){console.error("[OAuth Callback] Missing authorization code"),this.message="OAuth callback error: Missing authorization code.";return}if(!window.opener){console.warn("[OAuth Callback] No window.opener \u2014 using localStorage fallback"),localStorage.setItem(m,JSON.stringify({code:t,state:e})),this.message="Authentication complete. You can close this window.",setTimeout(()=>window.close(),1e3);return}try{console.log("[OAuth Callback] Sending postMessage to parent"),window.opener.postMessage({code:t,state:e},window.location.origin),console.log("[OAuth Callback] postMessage sent successfully"),setTimeout(()=>{console.log("[OAuth Callback] Closing popup"),window.close()},1e3)}catch(n){console.error("[OAuth Callback] Error sending postMessage:",n),alert("OAuth callback error: Failed to communicate with parent window")}}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=l({type:r,selectors:[["app-oauth-callback"]],decls:2,vars:1,template:function(e,o){e&1&&(c(0,"p"),p(1),u()),e&2&&(i(),h(o.message))},encapsulation:2})};export{m as a,d as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as G,c as F,e as
|
|
1
|
+
import{g as D}from"./chunk-GAZJZBKP.js";import{b as E,d as w}from"./chunk-QWMDAFBN.js";import{a as v}from"./chunk-AJOXSD6I.js";import{D as G,c as F,e as C,g as V,h as I,i as z,l as _,n as L,s as R,u as B}from"./chunk-XJUBZLY2.js";import{Bb as S,Db as u,Fb as g,Ka as a,Tb as o,Ub as k,Vb as O,Wa as N,a as p,b as x,ca as c,ga as b,ha as h,lb as M,ma as y,mb as P,rb as m,sb as n,ta as d,tb as t,ub as f}from"./chunk-3JGMGRXW.js";function A(i,r){i&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(i,r){if(i&1){let e=S();n(0,"form",7),u("ngSubmit",function(){b(e);let l=g();return h(l.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),f(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),f(10,"input",13),t(),n(11,"div",8)(12,"label",14),o(13,"Config path"),t(),f(14,"input",15),t(),n(15,"div",16)(16,"button",17),o(17),t(),n(18,"button",18),u("click",function(){b(e);let l=g();return h(l.cancel())}),o(19,"Cancel"),t()()()}if(i&2){let e=g();m("formGroup",e.form),a(6),m("formControl",e.nameControl),a(4),m("formControl",e.descriptionControl),a(4),m("formControl",e.configPathControl),a(2),m("disabled",e.nameControl.invalid||e.isSubmitting()),a(),O(" ",e.isEditMode()?"Save changes":"Create"," ")}}var T=class i{route=c(E);router=c(w);namespaceController=c(D);destroyRef=c(y);form=new z({name:new _("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new _("",{nonNullable:!0}),configPath:new _("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(!0),this.loadNamespace(r))}loadNamespace(r){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(r).pipe(v(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0),(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",x(p({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0})):this.namespaceController.createNamespace(p(p({name:this.nameControl.value.trim()},this.descriptionControl.value.trim()?{description:this.descriptionControl.value.trim()}:{}),this.configPathControl.value.trim()?{configPath:this.configPathControl.value.trim()}:{}))).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=N({type:i,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","type","text","placeholder","Optional description","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,s){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return s.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,A,2,0,"p",5)(9,$,20,6,"form",6),t()),e&2&&(a(7),k(s.isEditMode()?"Edit namespace":"New namespace"),a(),P(s.isLoading()?8:9))},dependencies:[G,L,F,V,I,R,B],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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-primary, #007aff);font-family:inherit}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{T as NamespaceFormComponent};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as Re,c as Le,e as Pe,f as Ve,g as We,h as B,j as Be}from"./chunk-53STPEYQ.js";import{g as Se,h as we,j as xe,k as Ee,l as Fe}from"./chunk-AK6F2DC7.js";import{c as ve,d as be,l as Ce,r as Oe,t as V,u as W,v as Me}from"./chunk-IXD43YQI.js";import{e as De,f as Ie,k as Ae,u as Te}from"./chunk-XJUBZLY2.js";import{A as ge,E as ye,K as ke,d as pe,r as me,t as ue,u as k,v as _e,x as fe,y as P}from"./chunk-B2QA6UZX.js";import{$b as ce,A as b,B as w,Bb as ae,Db as y,Fb as f,G as z,Gb as re,Hb as T,Ib as ne,Jb as le,Ka as d,Kb as p,Lb as m,Pa as $,Pb as oe,R as x,Rb as E,S as D,Sb as se,T as _,Tb as F,Ub as R,Wa as J,Xa as Z,_ as G,aa as C,ab as ee,ca as l,ga as q,h as v,ha as H,ia as j,jb as M,ka as Q,lb as I,mb as A,mc as de,oa as O,rb as te,sb as s,sc as he,t as S,ta as Y,tb as h,tc as c,ub as ie,uc as L,va as U,y as K,ya as X}from"./chunk-3JGMGRXW.js";var Ye=["trigger"],Ue=["panel"],Xe=[[["mat-select-trigger"]],"*"],$e=["mat-select-trigger","*"];function Je(r,u){if(r&1&&(s(0,"span",4),F(1),h()),r&2){let e=f();d(),R(e.placeholder)}}function Ze(r,u){r&1&&T(0)}function et(r,u){if(r&1&&(s(0,"span",11),F(1),h()),r&2){let e=f(2);d(),R(e.triggerValue)}}function tt(r,u){if(r&1&&(s(0,"span",5),I(1,Ze,1,0)(2,et,2,1,"span",11),h()),r&2){let e=f();d(),A(e.customTrigger?1:2)}}function it(r,u){if(r&1){let e=ae();s(0,"div",12,1),y("keydown",function(i){q(e);let a=f();return H(a._handleKeydown(i))}),T(2,1),h()}if(r&2){let e=f();se(e.panelClass),E("mat-select-panel-animations-enabled",!e._animationsDisabled)("mat-primary",(e._parentFormField==null?null:e._parentFormField.color)==="primary")("mat-accent",(e._parentFormField==null?null:e._parentFormField.color)==="accent")("mat-warn",(e._parentFormField==null?null:e._parentFormField.color)==="warn")("mat-undefined",!(e._parentFormField!=null&&e._parentFormField.color)),M("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var at=new C("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let r=l(Q);return()=>Ce(r)}}),rt=new C("MAT_SELECT_CONFIG"),nt=new C("MatSelectTrigger"),N=class{source;value;constructor(u,e){this.source=u,this.value=e}},Pt=(()=>{class r{_viewportRuler=l(ve);_changeDetectorRef=l(he);_elementRef=l(X);_dir=l(ge,{optional:!0});_idGenerator=l(ue);_renderer=l($);_parentFormField=l(we,{optional:!0});ngControl=l(Ie,{self:!0,optional:!0});_liveAnnouncer=l(me);_defaultOptions=l(rt,{optional:!0});_animationsDisabled=ke();_popoverLocation;_initialized=new v;_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,a=Ve(e,this.options,this.optionGroups),n=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=We(n.offsetTop,n.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new N(this,e)}_scrollStrategyFactory=l(at);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new v;_errorStateTracker;stateChanges=new v;disableAutomaticLabeling=!0;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=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=Y(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(De.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;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??!1;optionSelectionChanges=K(()=>{let e=this.options;return e?e.changes.pipe(x(e),D(()=>b(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(D(()=>this.optionSelectionChanges))});openedChange=new O;_openedStream=this.openedChange.pipe(w(e=>e),S(()=>{}));_closedStream=this.openedChange.pipe(w(e=>!e),S(()=>{}));selectionChange=new O;valueChange=new O;constructor(){let e=l(Ee),t=l(Ae,{optional:!0}),i=l(Te,{optional:!0}),a=l(new de("tabindex"),{optional:!0}),n=l(Oe,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Fe(e,this.ngControl,i,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this._popoverLocation=n?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new Be(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(_(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(_(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(x(null),_(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(),this._clearFromModal()}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._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(z(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(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&P(this._trackedModal,"aria-owns",t),fe(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;P(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_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",a=>{a.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":!1}_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,a=t===13||t===32,n=this._keyManager;if(!n.isTyping()&&a&&!k(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let g=this.selected;n.onKeydown(e);let o=this.selected;o&&g!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,n=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!n&&(i===13||i===32)&&t.activeItem&&!k(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!n&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let g=this.options.some(o=>!o.disabled&&!o.selected);this.options.forEach(o=>{o.disabled||(g?o.select():o.deselect())})}else{let g=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==g&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!k(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,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)Array.isArray(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!1;try{return(i.value!=null||this.canSelectNullableOptions)&&this._compareWith(i.value,e)}catch(a){return!1}});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,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof V?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 _e(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=b(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(_(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),b(...this.options.map(t=>t._stateChanges)).pipe(_(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=pe(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||r)};static \u0275cmp=J({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&ne(a,nt,5)(a,Pe,5)(a,Le,5),t&2){let n;p(n=m())&&(i.customTrigger=n.first),p(n=m())&&(i.options=n),p(n=m())&&(i.optionGroups=n)}},viewQuery:function(t,i){if(t&1&&le(Ye,5)(Ue,5)(W,5),t&2){let a;p(a=m())&&(i.trigger=a.first),p(a=m())&&(i.panel=a.first),p(a=m())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,i){t&1&&y("keydown",function(n){return i._handleKeydown(n)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(M("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()),E("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",c],disableRipple:[2,"disableRipple","disableRipple",c],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:L(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",c],placeholder:"placeholder",required:[2,"required","required",c],multiple:[2,"multiple","multiple",c],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",c],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",L],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",c]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[ce([{provide:Se,useExisting:r},{provide:Re,useExisting:r}]),U],ngContentSelectors:$e,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&&(re(Xe),s(0,"div",2,0),y("click",function(){return i.open()}),s(3,"div",3),I(4,Je,2,1,"span",4)(5,tt,3,1,"span",5),h(),s(6,"div",6)(7,"div",7),j(),s(8,"svg",8),ie(9,"path",9),h()()()(),ee(10,it,3,16,"ng-template",10),y("detach",function(){return i.close()})("backdropClick",function(){return i.close()})("overlayKeydown",function(n){return i._handleOverlayKeydown(n)})),t&2){let a=oe(1);d(3),M("id",i._valueId),d(),A(i.empty?4:5),d(6),te("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",i._popoverLocation)}},dependencies:[V,W],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{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))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-form-field-animations-enabled .mat-mdc-select-arrow{transition:transform 80ms linear}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return r})();var Vt=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275mod=Z({type:r});static \u0275inj=G({imports:[Me,B,ye,be,xe,B]})}return r})();export{Pt as a,Vt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-QSQYSFNQ.js";import"./chunk-QWMDAFBN.js";import"./chunk-3JGMGRXW.js";export{a as AgentosShellComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as R,f as z}from"./chunk-GAZJZBKP.js";import{b as F,d as N}from"./chunk-QWMDAFBN.js";import{c as Q}from"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import{a as M,b as I}from"./chunk-AJOXSD6I.js";import"./chunk-53STPEYQ.js";import"./chunk-AK6F2DC7.js";import"./chunk-IXD43YQI.js";import"./chunk-WPC6XC7P.js";import{D as H,c as B,e as u,g as L,h as j,i as G,l as C,n as J,s as A,u as $,v as q,w as K,x as U}from"./chunk-XJUBZLY2.js";import"./chunk-B2QA6UZX.js";import{Bb as v,Db as p,Fb as g,Ka as l,Tb as r,Ub as x,Vb as V,Wa as P,a as S,b as O,ca as c,ga as f,ha as _,kb as T,kc as D,lb as b,ma as k,mb as y,pb as w,qb as E,rb as s,sb as i,ta as d,tb as o,ub as h}from"./chunk-3JGMGRXW.js";function Y(a,t){a&1&&(i(0,"p",5),r(1,"Loading\u2026"),o())}function Z(a,t){if(a&1&&(i(0,"option",13),r(1),o()),a&2){let e=t.$implicit;s("value",e.type),l(),x(e.displayName)}}function ee(a,t){if(a&1){let e=v();i(0,"div",18)(1,"ds-json-schema-form",22),p("valueChange",function(m){f(e);let X=g(2);return _(X.onParamsChange(m))}),o()()}if(a&2){let e=g(2);l(),s("schema",t)("value",e.initialParams())}}function te(a,t){if(a&1){let e=v();i(0,"form",7),p("ngSubmit",function(){f(e);let m=g();return _(m.submit())}),i(1,"div",8)(2,"label",9),r(3,"Type "),i(4,"span",10),r(5,"*"),o()(),i(6,"select",11)(7,"option",12),r(8,"Select type"),o(),w(9,Z,2,2,"option",13,T().trackByType,!0),o()(),i(11,"div",8)(12,"label",14),r(13,"Name "),i(14,"span",10),r(15,"*"),o()(),h(16,"input",15),o(),i(17,"div",8)(18,"label",16),r(19,"Description"),o(),h(20,"textarea",17),o(),b(21,ee,2,2,"div",18),i(22,"div",19)(23,"button",20),r(24),o(),i(25,"button",21),p("click",function(){f(e);let m=g();return _(m.cancel())}),r(26,"Cancel"),o()()()}if(a&2){let e,n=g();s("formGroup",n.form),l(6),s("formControl",n.typeControl),l(3),E(n.integrationTypes()),l(7),s("formControl",n.nameControl),l(4),s("formControl",n.descriptionControl),l(),y((e=n.schema())?21:-1,e),l(2),s("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),l(),V(" ",n.isEditMode()?"Save changes":"Create"," ")}}var W=class a{route=c(F);router=c(N);destroyRef=c(k);integrationConfigController=c(R);integrationTypeController=c(z);namespaceId=this.route.snapshot.params.namespaceId;form=new G({name:new C("",{nonNullable:!0,validators:[u.required,u.minLength(1)]}),description:new C(null),type:new C("",{nonNullable:!0,validators:[u.required]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);paramsValue=d(null);initialParams=d(null);integrationTypes=I(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=I(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=D(()=>{let t=this.selectedType();return t?this.integrationTypes().find(n=>n.type===t)?.configSchema??null:null});existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("integrationId");t&&(this.isEditMode.set(!0),this.loadConfig(t))}loadConfig(t){this.isLoading.set(!0),this.integrationConfigController.getByIdIntegrationConfig(t).pipe(M(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}onParamsChange(t){this.paramsValue.set(t)}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0),(this.isEditMode()?this.integrationConfigController.updateIntegrationConfig(this.existingConfig.id??"",O(S({},this.existingConfig),{name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,integrationType:this.typeControl.value,parameters:this.paramsValue()})):this.integrationConfigController.createIntegrationConfig({name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,integrationType:this.typeControl.value,namespaceId:this.namespaceId,parameters:this.paramsValue()})).pipe(M(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos",this.namespaceId,"integrations"])}trackByType(t,e){return e.type}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=P({type:a,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],[3,"valueChange","schema","value"]],template:function(e,n){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),p("click",function(){return n.cancel()}),i(3,"span",3),r(4,"\u2190"),o(),r(5," Integrations "),o(),i(6,"h1",4),r(7),o()(),b(8,Y,2,0,"p",5)(9,te,27,7,"form",6),o()),e&2&&(l(7),x(n.isEditMode()?"Edit integration":"New integration"),l(),y(n.isLoading()?8:9))},dependencies:[H,J,K,U,B,q,L,j,A,$,Q],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-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-primary, #007aff);font-family:inherit}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:10px;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));background:var(--glass-bg, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px))}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{W as IntegrationFormComponent};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as Ee,c as Re,d as Te,e as De,f as Fe,g as Le,h as R}from"./chunk-53STPEYQ.js";import{h as Me}from"./chunk-AK6F2DC7.js";import{c as ve,d as ye,f as be,l as Oe,m as Ae,p as Se,s as we,v as Pe}from"./chunk-IXD43YQI.js";import{a as ke}from"./chunk-XJUBZLY2.js";import{A as fe,E as ge,I as Ce,K as E,c as ce,d as pe,e as ue,l as de,n as he,t as me,u as _,v as _e,x as k,y as f}from"./chunk-B2QA6UZX.js";import{$b as C,A as h,B as O,Cb as ee,Db as te,Fb as ie,G as I,Gb as oe,Hb as ne,I as V,Ib as ae,Jb as se,Kb as p,Lb as u,Ma as q,Na as Y,Pa as G,R as x,Rb as le,S as m,Sa as z,Sb as re,V as B,Wa as Q,Xa as U,Y as W,Ya as X,_ as H,aa as A,bb as Z,ca as s,e as d,ea as N,g as v,h as y,jb as P,ka as S,m as b,oa as c,pa as K,sc as M,t as F,tc as r,va as j,vb as J,wb as $,y as L,ya as w}from"./chunk-3JGMGRXW.js";var Ne=["panel"],Ke=["*"];function je(a,g){if(a&1&&(J(0,"div",1,0),ne(2),$()),a&2){let e=g.id,t=ie();re(t._classList),le("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),ee("id",t.id),P("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var T=class{source;option;constructor(g,e){this.source=g,this.option=e}},xe=new A("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1})}),bt=(()=>{class a{_changeDetectorRef=s(M);_elementRef=s(w);_defaults=s(xe);_animationsDisabled=E();_activeOptionChanges=d.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=!1;optionSelected=new c;opened=new c;closed=new c;optionActivated=new c;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=s(me).getId("mat-autocomplete-");inertGroups;constructor(){let e=s(ue);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new _e(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new T(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=Q({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,o){if(t&1&&ae(o,De,5)(o,Re,5),t&2){let n;p(n=u())&&(i.options=n),p(n=u())&&(i.optionGroups=n)}},viewQuery:function(t,i){if(t&1&&se(Y,7)(Ne,5),t&2){let o;p(o=u())&&(i.template=o.first),p(o=u())&&(i.panel=o.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",r],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",r],requireSelection:[2,"requireSelection","requireSelection",r],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",r],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",r]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[C([{provide:Ee,useExisting:a}])],ngContentSelectors:Ke,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(oe(),Z(0,je,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-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));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden,.cdk-overlay-pane:has(>.mat-mdc-autocomplete-hidden){visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return a})();var qe={provide:ke,useExisting:W(()=>Ge),multi:!0};var Ye=new A("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let a=s(S);return()=>Oe(a)}}),Ge=(()=>{class a{_environmentInjector=s(N);_element=s(w);_injector=s(S);_viewContainerRef=s(z);_zone=s(K);_changeDetectorRef=s(M);_dir=s(fe,{optional:!0});_formField=s(Me,{optional:!0,host:!0});_viewportRuler=s(ve);_scrollStrategy=s(Ye);_renderer=s(G);_animationsDisabled=E();_defaults=s(xe,{optional:!0});_overlayRef=null;_portal;_componentDestroyed=!1;_initialized=new y;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue=null;_valueOnAttach=null;_valueOnLastKeydown=null;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=d.EMPTY;_breakpointObserver=s(he);_handsetLandscapeSubscription=d.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption=null;_closeKeyEventStream=new y;_overlayPanelClass=de(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled=!1;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&f(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return h(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(O(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(O(()=>this._overlayAttached)):b()).pipe(F(e=>e instanceof Te?e:null))}optionSelections=L(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(x(e),m(()=>h(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(m(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new v(e=>{let t=o=>{let n=pe(o),l=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,D=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&n!==this._element.nativeElement&&!this._hasFocus()&&(!l||!l.contains(n))&&(!D||!D.contains(n))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(n)&&e.next(o)},i=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{i.forEach(o=>o())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e,i=t.keyCode,o=_(t);if(i===27&&!o&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&i===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let n=this.autocomplete._keyManager.activeItem,l=i===38||i===40;i===9||l&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):l&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(l||this.autocomplete._keyManager.activeItem!==n)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,i=t.value;if(t.type==="number"&&(i=i==""?null:parseFloat(i)),this._previousValue!==i){if(this._previousValue=i,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(i),!i)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let o=this.autocomplete.options?.find(n=>n.selected);if(o){let n=this._getDisplayValue(o.value);i!==n&&o.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let o=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(o)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return ce()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new v(i=>{q(()=>{i.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(B(()=>this._positionStrategy.reapplyLastPosition()),V(0))??b();return h(e,t).pipe(m(()=>this._zone.run(()=>{let i=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),i!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),I(1)).subscribe(i=>this._setValueAndClose(i))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,i=e?e.source:this._pendingAutoselectedOption;i?(this._clearPreviousSelectedOption(i),this._assignOptionValue(i.value),this._onChange(i.value),t._emitSelectEvent(i),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(i=>{i!==e&&i.selected&&i.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;k(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){if(!this.autocomplete)return;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new be(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=we(this._injector,this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Ce.HandsetLandscape).subscribe(o=>{o.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let i=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&i!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!_(e)||e.keyCode===38&&_(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=void 0}_getOverlayConfig(){return new Ae({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=Se(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPopoverLocation("inline");return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}],n;this.position==="above"?n=o:this.position==="below"?n=t:n=[...t,...o],e.withPositions(n)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let i=0;i<e.options.length;i++)if(!e.options.get(i).disabled){t=i;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,i=Fe(e,t.options,t.optionGroups);if(e===0&&i===1)t._setScrollTop(0);else if(t.panel){let o=t.options.toArray()[e];if(o){let n=o._getHostElement(),l=Le(n.offsetTop,n.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(l)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&f(this._trackedModal,"aria-owns",t),k(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;f(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||a)};static \u0275dir=X({type:a,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,i){t&1&&te("focusin",function(){return i._handleFocus()})("blur",function(){return i._onTouched()})("input",function(n){return i._handleInput(n)})("keydown",function(n){return i._handleKeydown(n)})("click",function(){return i._handleClick()}),t&2&&P("autocomplete",i.autocompleteAttribute)("role",i.autocompleteDisabled?null:"combobox")("aria-autocomplete",i.autocompleteDisabled?null:"list")("aria-activedescendant",i.panelOpen&&i.activeOption?i.activeOption.id:null)("aria-expanded",i.autocompleteDisabled?null:i.panelOpen.toString())("aria-controls",i.autocompleteDisabled||!i.panelOpen||i.autocomplete==null?null:i.autocomplete.id)("aria-haspopup",i.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",r]},exportAs:["matAutocompleteTrigger"],features:[C([qe]),j]})}return a})(),Ot=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=U({type:a});static \u0275inj=H({imports:[Pe,R,ye,R,ge]})}return a})();export{bt as a,Ge as b,Ot as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-IFXDK4GQ.js";import{d as T}from"./chunk-QWMDAFBN.js";import{b as q,g as E,m as D}from"./chunk-ZL64I3EB.js";import{a as U}from"./chunk-AJOXSD6I.js";import{Bb as w,Db as a,Fb as m,Ka as d,Pb as R,Tb as C,Ub as h,Wa as c,ab as I,ca as p,ga as y,ha as b,hc as M,kc as S,lb as _,ma as x,mb as f,oa as v,rb as u,sb as r,tb as o}from"./chunk-3JGMGRXW.js";function O(i,e){if(i&1&&(r(0,"span",3),C(1),o()),i&2){let t=m();d(),h(t.subtitle)}}var g=class i{user;editRequested=new v;deleteRequested=new v;menuItems=[{key:"edit",label:"Edit user",icon:"edit"},{key:"delete",label:"Delete user",icon:"delete",variant:"danger"}];get displayName(){let{firstname:e,lastname:t,email:n}=this.user;return[e,t].filter(Boolean).join(" ")||n||"\u2014"}get subtitle(){return this.user.email??this.user.externalId??""}onMenuAction(e){switch(e){case"edit":this.editRequested.emit(this.user);break;case"delete":confirm(`Delete user "${this.displayName}"?`)&&this.deleteRequested.emit(this.user);break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-item"]],inputs:{user:"user"},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"user-item"],[1,"user-item__body"],[1,"user-item__name"],[1,"user-item__subtitle"],[1,"user-item__actions"],[3,"itemSelected","items"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),C(3),o(),_(4,O,2,1,"span",3),o(),r(5,"div",4)(6,"ds-kebab-menu",5),a("itemSelected",function(l){return n.onMenuAction(l)}),o()()()),t&2&&(d(3),h(n.displayName),d(),f(n.subtitle?4:-1),d(2),u("items",n.menuItems))},dependencies:[D],styles:[".user-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-sizing:border-box;overflow:hidden;position:relative}.user-item__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.user-item__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__subtitle[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};function B(i,e){if(i&1){let t=w();r(0,"agentos-user-item",4),a("editRequested",function(s){y(t);let l=m(2);return b(l.navigateToEdit(s))})("deleteRequested",function(s){y(t);let l=m(2);return b(l.deleteUser(s))}),o()}i&2&&u("user",e)}function P(i,e){if(i&1&&_(0,B,1,1,"agentos-user-item",3),i&2){let t,n=e.$implicit,s=m();f((t=s.resolveUser(n.id))?0:-1,t)}}var k=class i{router=p(T);destroyRef=p(x);userAdminState=p(L);isLoading=this.userAdminState.isLoading;userItems=S(()=>this.userAdminState.users().map(e=>({id:e.id??"",name:[e.firstname,e.lastname].filter(Boolean).join(" ")||e.email||"\u2014",description:e.email})));get usersById(){return new Map(this.userAdminState.users().map(e=>[e.id??"",e]))}ngOnInit(){this.userAdminState.loadAll().pipe(U(this.destroyRef)).subscribe()}goBack(){this.router.navigate(["/agentos"])}navigateToCreate(){this.router.navigate(["/agentos/admin/users/new"])}navigateToEdit(e){this.router.navigate(["/agentos/admin/users",e.id??"","edit"])}deleteUser(e){this.userAdminState.deleteUser(e.id??"").pipe(U(this.destroyRef)).subscribe()}resolveUser(e){return this.usersById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-list"]],decls:4,vars:3,consts:[["userItemTpl",""],["title","Users","emptyMessage","No users found.","cardMinWidth","320px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"user"],[3,"editRequested","deleteRequested","user"]],template:function(t,n){if(t&1&&(r(0,"ds-entity-list",1),a("createRequested",function(){return n.navigateToCreate()}),r(1,"ds-icon-button",2),a("action",function(){return n.goBack()}),o()(),I(2,P,1,1,"ng-template",null,0,M)),t&2){let s=R(3);u("items",n.userItems())("showCreate",!0)("itemTemplate",s)}},dependencies:[E,g,q],encapsulation:2,changeDetection:0})};export{g as a,k as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as r}from"./chunk-QWMDAFBN.js";import{Wa as t,ub as o}from"./chunk-3JGMGRXW.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=t({type:n,selectors:[["agentos-shell"]],decls:1,vars:0,template:function(e,i){e&1&&o(0,"router-outlet")},dependencies:[r],styles:[".shell-loader[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;gap:1rem;color:var(--color-text-secondary, #6e6e73);font-size:.9rem}.shell-loader[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.spinner[_ngcontent-%COMP%]{width:32px;height:32px;border:3px solid var(--color-border, rgba(0, 0, 0, .1));border-top-color:var(--color-primary, #007aff);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}"]})};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as Ur,Ac as _e,B as K,Bc as cn,Cc as ge,D as Ye,Db as en,Dc as un,E as Ne,Ea as zr,G as he,Ia as Fr,K as Dr,L as Y,La as qr,Lc as Vt,M as xt,Ma as zt,Pa as Hr,Qa as pe,R as Nr,Ra as Br,S as j,Sa as Vr,T as Ze,Tc as ln,Ua as Gr,V as k,Va as et,W as b,Wa as Wr,X as _r,Xa as Qr,Ya as tt,Z as C,_ as Or,a as d,aa as M,b as O,ba as Z,ca as l,cb as Kr,d as m,da as Pr,e as br,ea as G,eb as Yr,f as Ir,fa as T,g as Ar,gb as Ft,h as oe,hb as qt,i as U,ib as Zr,ic as tn,jb as Jr,jc as R,k as P,ka as jt,kc as Ht,l as A,la as Lr,lc as rn,m as g,ma as kt,mc as nn,n as Er,na as xr,o as Ut,oa as fe,oc as on,p as Mr,pa as jr,ra as Je,sc as Bt,t as E,ta as w,tc as rt,u as Pt,ub as Xr,v as $,va as Xe,w as Lt,wa as $t,x as Tr,xa as kr,xc as an,y as Ke,ya as $r,zc as sn}from"./chunk-3JGMGRXW.js";var f="primary",He=Symbol("RouteTitle"),Yt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function se(t){return new Yt(t)}function Gt(t,n,e){for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i[0]===":")e[i.substring(1)]=o;else if(i!==o.path)return!1}return!0}function yn(t,n,e){let r=e.path.split("/"),i=r.indexOf("**");if(i===-1){if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let c={},u=t.slice(0,r.length);return Gt(r,u,c)?{consumed:u,posParams:c}:null}if(i!==r.lastIndexOf("**"))return null;let o=r.slice(0,i),s=r.slice(i+1);if(o.length+s.length>t.length||e.pathMatch==="full"&&n.hasChildren()&&e.path!=="**")return null;let a={};return!Gt(o,t.slice(0,o.length),a)||!Gt(s,t.slice(t.length-s.length),a)?null:{consumed:t,posParams:a}}function ct(t){return new Promise((n,e)=>{t.pipe(Y()).subscribe({next:r=>n(r),error:r=>e(r)})})}function yi(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!z(t[e],n[e]))return!1;return!0}function z(t,n){let e=t?Zt(t):void 0,r=n?Zt(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Rn(t[i],n[i]))return!1;return!0}function Zt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Rn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Ri(t){return t.length>0?t[t.length-1]:null}function ue(t){return Ut(t)?t:Yr(t)?A(Promise.resolve(t)):g(t)}function Cn(t){return Ut(t)?ct(t):Promise.resolve(t)}var Ci={exact:bn,subset:In},Sn={exact:Si,subset:wi,ignored:()=>!0},wn={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Jt={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function dn(t,n,e){return Ci[e.paths](t.root,n.root,e.matrixParams)&&Sn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Si(t,n){return z(t,n)}function bn(t,n,e){if(!ae(t.segments,n.segments)||!ot(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!bn(t.children[r],n.children[r],e))return!1;return!0}function wi(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Rn(t[e],n[e]))}function In(t,n,e){return An(t,n,n.segments,e)}function An(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ae(i,e)||n.hasChildren()||!ot(i,e,r))}else if(t.segments.length===e.length){if(!ae(t.segments,e)||!ot(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!In(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ae(t.segments,i)||!ot(t.segments,i,r)||!t.children[f]?!1:An(t.children[f],n,o,r)}}function ot(t,n,e){return n.every((r,i)=>Sn[e](t[i].parameters,r.parameters))}var N=class{root;queryParams;fragment;_queryParamMap;constructor(n=new v([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){return Ai.serialize(this)}},v=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return at(this)}},J=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=se(this.parameters),this._parameterMap}toString(){return Mn(this)}};function bi(t,n){return ae(t,n)&&t.every((e,r)=>z(e.parameters,n[r].parameters))}function ae(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Ii(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var te=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>new Q,providedIn:"root"})}return t})(),Q=class{parse(n){let e=new er(n);return new N(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Oe(n.root,!0)}`,r=Ti(n.queryParams),i=typeof n.fragment=="string"?`#${Ei(n.fragment)}`:"";return`${e}${r}${i}`}},Ai=new Q;function at(t){return t.segments.map(n=>Mn(n)).join("/")}function Oe(t,n){if(!t.hasChildren())return at(t);if(n){let e=t.children[f]?Oe(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Oe(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Ii(t,(r,i)=>i===f?[Oe(t.children[f],!1)]:[`${i}:${Oe(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${at(t)}/${e[0]}`:`${at(t)}/(${e.join("//")})`}}function En(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function nt(t){return En(t).replace(/%3B/gi,";")}function Ei(t){return encodeURI(t)}function Xt(t){return En(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function st(t){return decodeURIComponent(t)}function hn(t){return st(t.replace(/\+/g,"%20"))}function Mn(t){return`${Xt(t.path)}${Mi(t.parameters)}`}function Mi(t){return Object.entries(t).map(([n,e])=>`;${Xt(n)}=${Xt(e)}`).join("")}function Ti(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${nt(e)}=${nt(i)}`).join("&"):`${nt(e)}=${nt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Di=/^[^\/()?;#]+/;function Wt(t){let n=t.match(Di);return n?n[0]:""}var Ni=/^[^\/()?;=#]+/;function _i(t){let n=t.match(Ni);return n?n[0]:""}var Oi=/^[^=?&#]+/;function Ui(t){let n=t.match(Oi);return n?n[0]:""}var Pi=/^[^&#]+/;function Li(t){let n=t.match(Pi);return n?n[0]:""}var er=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new v([],{}):new v([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(n=0){if(n>50)throw new b(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0,n));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1,n)),(e.length>0||Object.keys(r).length>0)&&(i[f]=new v(e,r)),i}parseSegment(){let n=Wt(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new b(4009,!1);return this.capture(n),new J(st(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=_i(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Wt(this.remaining);i&&(r=i,this.capture(r))}n[st(e)]=st(r)}parseQueryParam(n){let e=Ui(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Li(this.remaining);s&&(r=s,this.capture(r))}let i=hn(e),o=hn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n,e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Wt(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new b(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):n&&(s=f);let a=this.parseChildren(e+1);r[s??f]=Object.keys(a).length===1&&a[f]?a[f]:new v([],a),this.consumeOptional("//")}return r}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new b(4011,!1)}};function Tn(t){return t.segments.length>0?new v([],{[f]:t}):t}function Dn(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=Dn(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new v(t.segments,n);return xi(e)}function xi(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new v(t.segments.concat(n.segments),n.children)}return t}function X(t){return t instanceof N}function Nn(t,n,e=null,r=null,i=new Q){let o=_n(t);return On(o,n,e,r,i)}function _n(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new v(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=Tn(r);return n??i}function On(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return Qt(o,o,o,e,r,i);let s=ji(n);if(s.toRoot())return Qt(o,o,new v([],{}),e,r,i);let a=ki(s,o,t),c=a.processChildren?Pe(a.segmentGroup,a.index,s.commands):Pn(a.segmentGroup,a.index,s.commands);return Qt(o,a.segmentGroup,c,e,r,i)}function ut(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function xe(t){return typeof t=="object"&&t!=null&&t.outlets}function fn(t,n,e){t||="\u0275";let r=new N;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function Qt(t,n,e,r,i,o){let s={};for(let[u,h]of Object.entries(r??{}))s[u]=Array.isArray(h)?h.map(p=>fn(u,p,o)):fn(u,h,o);let a;t===n?a=e:a=Un(t,n,e);let c=Tn(Dn(a));return new N(c,s,i)}function Un(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=Un(o,n,e)}),new v(t.segments,r)}var lt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ut(r[0]))throw new b(4003,!1);let i=r.find(xe);if(i&&i!==Ri(r))throw new b(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function ji(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new lt(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new lt(e,n,r)}var me=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ki(t,n,e){if(t.isAbsolute)return new me(n,!0,0);if(!e)return new me(n,!1,NaN);if(e.parent===null)return new me(e,!0,0);let r=ut(t.commands[0])?0:1,i=e.segments.length-1+r;return $i(e,i,t.numberOfDoubleDots)}function $i(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new b(4005,!1);i=r.segments.length}return new me(r,!1,i-o)}function zi(t){return xe(t[0])?t[0].outlets:{[f]:t}}function Pn(t,n,e){if(t??=new v([],{}),t.segments.length===0&&t.hasChildren())return Pe(t,n,e);let r=Fi(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new v(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new v(t.segments.slice(r.pathIndex),t.children),Pe(o,0,i)}else return r.match&&i.length===0?new v(t.segments,{}):r.match&&!t.hasChildren()?tr(t,n,e):r.match?Pe(t,0,i):tr(t,n,e)}function Pe(t,n,e){if(e.length===0)return new v(t.segments,{});{let r=zi(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Pe(t.children[f],n,e);return new v(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=Pn(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new v(t.segments,i)}}function Fi(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(xe(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!gn(c,u,s))return o;r+=2}else{if(!gn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function tr(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(xe(o)){let c=qi(o.outlets);return new v(r,c)}if(i===0&&ut(e[0])){let c=t.segments[n];r.push(new J(c.path,pn(e[0]))),i++;continue}let s=xe(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&ut(a)?(r.push(new J(s,pn(a))),i+=2):(r.push(new J(s,{})),i++)}return new v(r,{})}function qi(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=tr(new v([],{}),0,r))}),n}function pn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function gn(t,n,e){return t==e.path&&z(n,e.parameters)}var ye="imperative",S=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(S||{}),_=class{id;url;constructor(n,e){this.id=n,this.url=e}},ee=class extends _{type=S.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},x=class extends _{urlAfterRedirects;type=S.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},I=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(I||{}),Ce=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ce||{}),L=class extends _{reason;code;type=S.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function Ln(t){return t instanceof L&&(t.code===I.Redirect||t.code===I.SupersededByNewNavigation)}var q=class extends _{reason;code;type=S.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ce=class extends _{error;target;type=S.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},je=class extends _{urlAfterRedirects;state;type=S.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},dt=class extends _{urlAfterRedirects;state;type=S.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ht=class extends _{urlAfterRedirects;state;shouldActivate;type=S.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},ft=class extends _{urlAfterRedirects;state;type=S.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},pt=class extends _{urlAfterRedirects;state;type=S.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},gt=class{route;type=S.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},vt=class{route;type=S.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},mt=class{snapshot;type=S.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},yt=class{snapshot;type=S.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Rt=class{snapshot;type=S.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ct=class{snapshot;type=S.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Se=class{routerEvent;position;anchor;scrollBehavior;type=S.Scroll;constructor(n,e,r,i){this.routerEvent=n,this.position=e,this.anchor=r,this.scrollBehavior=i}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}},we=class{},ke=class{},be=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function Hi(t){return!(t instanceof we)&&!(t instanceof be)&&!(t instanceof ke)}var St=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new le(this.rootInjector)}},le=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new St(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(Z(G))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),wt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=rr(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=rr(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=nr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return nr(n,this._root).map(e=>e.value)}};function rr(t,n){if(t===n.value)return n;for(let e of n.children){let r=rr(t,e);if(r)return r}return null}function nr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=nr(t,e);if(r.length)return r.unshift(n),r}return[]}var D=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function ve(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var $e=class extends wt{snapshot;constructor(n,e){super(n),this.snapshot=e,hr(this,n)}toString(){return this.snapshot.toString()}};function xn(t,n){let e=Bi(t,n),r=new U([new J("",{})]),i=new U({}),o=new U({}),s=new U({}),a=new U(""),c=new H(r,i,s,a,o,f,t,e.root);return c.snapshot=e.root,new $e(new D(c,[]),e)}function Bi(t,n){let e={},r={},i={},s=new Ie([],e,i,"",r,f,t,null,{},n);return new ze("",new D(s,[]))}var H=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(E(u=>u[He]))??g(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(E(n=>se(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(E(n=>se(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function dr(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&kn(i)&&(r.resolve[He]=i.title),r}var Ie=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[He]}constructor(n,e,r,i,o,s,a,c,u,h){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u,this._environmentInjector=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=se(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},ze=class extends wt{url;constructor(n,e){super(e),this.url=n,hr(this,e)}toString(){return jn(this._root)}};function hr(t,n){n.value._routerState=t,n.children.forEach(e=>hr(t,e))}function jn(t){let n=t.children.length>0?` { ${t.children.map(jn).join(", ")} } `:"";return`${t.value}${n}`}function Kt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,z(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),z(n.params,e.params)||t.paramsSubject.next(e.params),yi(n.url,e.url)||t.urlSubject.next(e.url),z(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function ir(t,n){let e=z(t.params,n.params)&&bi(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||ir(t.parent,n.parent))}function kn(t){return typeof t.title=="string"||t.title===null}var $n=new M(""),fr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new fe;deactivateEvents=new fe;attachEvents=new fe;detachEvents=new fe;routerOutletData=on();parentContexts=l(le);location=l(Vr);changeDetector=l(Bt);inputBinder=l(Be,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new b(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new b(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new b(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new b(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new or(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=tt({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Xe]})}return t})(),or=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===H?this.route:n===le?this.childContexts:n===$n?this.outletData:this.parent.get(n,e)}},Be=new M(""),pr=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Pt([r.queryParams,r.params,r.data]).pipe(j(([o,s,a],c)=>(a=d(d(d({},o),s),a),c===0?g(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=an(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),gr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Wr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Xr(0,"router-outlet")},dependencies:[fr],encapsulation:2})}return t})();function vr(t){let n=t.children&&t.children.map(vr),e=n?O(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=gr),e}function Vi(t,n,e){let r=Fe(t,n._root,e?e._root:void 0);return new $e(r,n)}function Fe(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=Gi(t,n,e);return new D(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Fe(t,a)),s}}let r=Wi(n.value),i=n.children.map(o=>Fe(t,o));return new D(r,i)}}function Gi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Fe(t,r,i);return Fe(t,r)})}function Wi(t){return new H(new U(t.url),new U(t.params),new U(t.queryParams),new U(t.fragment),new U(t.data),t.outlet,t.component,t)}var Ae=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},zn="ngNavigationCancelingError";function bt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=X(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=Fn(!1,I.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function Fn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[zn]=!0,e.cancellationCode=n,e}function Qi(t){return qn(t)&&X(t.url)}function qn(t){return!!t&&t[zn]}var ar=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Kt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=ve(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=ve(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=ve(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=ve(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new Ct(o.value.snapshot))}),n.children.length&&this.forwardEvent(new yt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Kt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Kt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},It=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},Re=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Ki(t,n,e){let r=t._root,i=n?n._root:null;return Ue(r,i,e,[r.value])}function Yi(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Me(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Ur(t)?t:n.get(t):r}function Ue(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ve(n);return t.children.forEach(s=>{Zi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Le(a,e.getContext(s),i)),i}function Zi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=Ji(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new It(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ue(t,n,a?a.children:null,r,i):Ue(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Re(a.outlet.component,s))}else s&&Le(n,a,i),i.canActivateChecks.push(new It(r)),o.component?Ue(t,null,a?a.children:null,r,i):Ue(t,null,e,r,i);return i}function Ji(t,n,e){if(typeof e=="function")return T(n._environmentInjector,()=>e(t,n));switch(e){case"pathParamsChange":return!ae(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ae(t.url,n.url)||!z(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ir(t,n)||!z(t.queryParams,n.queryParams);default:return!ir(t,n)}}function Le(t,n,e){let r=ve(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Le(s,n.children.getContext(o),e):Le(s,null,e):Le(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new Re(n.outlet.component,i)):e.canDeactivateChecks.push(new Re(null,i)):e.canDeactivateChecks.push(new Re(null,i))}function Ve(t){return typeof t=="function"}function Xi(t){return typeof t=="boolean"}function eo(t){return t&&Ve(t.canLoad)}function to(t){return t&&Ve(t.canActivate)}function ro(t){return t&&Ve(t.canActivateChild)}function no(t){return t&&Ve(t.canDeactivate)}function io(t){return t&&Ve(t.canMatch)}function Hn(t){return t instanceof Mr||t?.name==="EmptyError"}var it=Symbol("INITIAL_VALUE");function Ee(){return j(t=>Pt(t.map(n=>n.pipe(he(1),Nr(it)))).pipe(E(n=>{for(let e of n)if(e!==!0){if(e===it)return it;if(e===!1||oo(e))return e}return!0}),K(n=>n!==it),he(1)))}function oo(t){return X(t)||t instanceof Ae}function Bn(t){return t.aborted?g(void 0).pipe(he(1)):new Ar(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function Vn(t){return Ze(Bn(t))}function ao(t){return $(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?g(O(d({},n),{guardsResult:!0})):so(o,e,r).pipe($(s=>s&&Xi(s)?co(e,i,t):g(s)),E(s=>O(d({},n),{guardsResult:s})))})}function so(t,n,e){return A(t).pipe($(r=>po(r.component,r.route,e,n)),Y(r=>r!==!0,!0))}function co(t,n,e){return A(n).pipe(Ne(r=>Tr(lo(r.route.parent,e),uo(r.route,e),fo(t,r.path),ho(t,r.route))),Y(r=>r!==!0,!0))}function uo(t,n){return t!==null&&n&&n(new Rt(t)),g(!0)}function lo(t,n){return t!==null&&n&&n(new mt(t)),g(!0)}function ho(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return g(!0);let r=e.map(i=>Ke(()=>{let o=n._environmentInjector,s=Me(i,o),a=to(s)?s.canActivate(n,t):T(o,()=>s(n,t));return ue(a).pipe(Y())}));return g(r).pipe(Ee())}function fo(t,n){let e=n[n.length-1],i=n.slice(0,n.length-1).reverse().map(o=>Yi(o)).filter(o=>o!==null).map(o=>Ke(()=>{let s=o.guards.map(a=>{let c=o.node._environmentInjector,u=Me(a,c),h=ro(u)?u.canActivateChild(e,t):T(c,()=>u(e,t));return ue(h).pipe(Y())});return g(s).pipe(Ee())}));return g(i).pipe(Ee())}function po(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return g(!0);let o=i.map(s=>{let a=n._environmentInjector,c=Me(s,a),u=no(c)?c.canDeactivate(t,n,e,r):T(a,()=>c(t,n,e,r));return ue(u).pipe(Y())});return g(o).pipe(Ee())}function go(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return g(!0);let s=o.map(a=>{let c=Me(a,t),u=eo(c)?c.canLoad(n,e):T(t,()=>c(n,e)),h=ue(u);return i?h.pipe(Vn(i)):h});return g(s).pipe(Ee(),Gn(r))}function Gn(t){return Ir(k(n=>{if(typeof n!="boolean")throw bt(t,n)}),E(n=>n===!0))}function vo(t,n,e,r,i,o){let s=n.canMatch;if(!s||s.length===0)return g(!0);let a=s.map(c=>{let u=Me(c,t),h=io(u)?u.canMatch(n,e,i):T(t,()=>u(n,e,i));return ue(h).pipe(Vn(o))});return g(a).pipe(Ee(),Gn(r))}var W=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype)}},qe=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype)}};function mo(t){throw new b(4e3,!1)}function yo(t){throw Fn(!1,I.GuardRejected)}var sr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){return m(this,null,function*(){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[f])throw mo(`${n.redirectTo}`);i=i.children[f]}})}applyRedirectCommands(n,e,r,i,o){return m(this,null,function*(){let s=yield Ro(e,i,o);if(s instanceof N)throw new qe(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new qe(a);return a})}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new N(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new v(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new b(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function Ro(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t;return ct(ue(T(e,()=>r(n))))}function Co(t,n){return t.providers&&!t._injector&&(t._injector=et(t.providers,n,`Route: ${t.path}`)),t._injector??n}function F(t){return t.outlet||f}function So(t,n){let e=t.filter(r=>F(r)===n);return e.push(...t.filter(r=>F(r)!==n)),e}var cr={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Wn(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function wo(t,n,e,r,i,o,s){let a=Qn(t,n,e);if(!a.matched)return g(a);let c=Wn(o(a));return r=Co(n,r),vo(r,n,e,i,c,s).pipe(E(u=>u===!0?a:d({},cr)))}function Qn(t,n,e){if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},cr):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||yn)(e,t,n);if(!i)return d({},cr);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function vn(t,n,e,r){return e.length>0&&Ao(t,e,r)?{segmentGroup:new v(n,Io(r,new v(e,t.children))),slicedSegments:[]}:e.length===0&&Eo(t,e,r)?{segmentGroup:new v(t.segments,bo(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new v(t.segments,t.children),slicedSegments:e}}function bo(t,n,e,r){let i={};for(let o of e)if(Et(t,n,o)&&!r[F(o)]){let s=new v([],{});i[F(o)]=s}return d(d({},r),i)}function Io(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&F(r)!==f){let i=new v([],{});e[F(r)]=i}return e}function Ao(t,n,e){return e.some(r=>Et(t,n,r)&&F(r)!==f)}function Eo(t,n,e){return e.some(r=>Et(t,n,r))}function Et(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Mo(t,n,e){return n.length===0&&!t.children[e]}var ur=class{};function To(t,n,e,r,i,o,s="emptyOnly",a){return m(this,null,function*(){return new lr(t,n,e,r,i,s,o,a).recognize()})}var Do=31,lr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,c){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new sr(this.urlSerializer,this.urlTree)}noMatchError(n){return new b(4002,`'${n.segmentGroup}'`)}recognize(){return m(this,null,function*(){let n=vn(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=yield this.match(n),i=new D(r,e),o=new ze("",i),s=Nn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}})}match(n){return m(this,null,function*(){let e=new Ie([],Object.freeze({}),Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,n,f,e),rootSnapshot:e}}catch(r){if(r instanceof qe)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof W?this.noMatchError(r):r}})}processSegmentGroup(n,e,r,i,o){return m(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=yield this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof D?[s]:[]})}processChildren(n,e,r,i){return m(this,null,function*(){let o=[];for(let c of Object.keys(r.children))c==="primary"?o.unshift(c):o.push(c);let s=[];for(let c of o){let u=r.children[c],h=So(e,c),p=yield this.processSegmentGroup(n,h,u,c,i);s.push(...p)}let a=Kn(s);return No(a),a})}processSegment(n,e,r,i,o,s,a){return m(this,null,function*(){for(let c of e)try{return yield this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a)}catch(u){if(u instanceof W||Hn(u))continue;throw u}if(Mo(r,i,o))return new ur;throw new W(r)})}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return m(this,null,function*(){if(F(r)!==s&&(s===f||!Et(i,o,r)))throw new W(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c);throw new W(i)})}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){return m(this,null,function*(){let{matched:c,parameters:u,consumedSegments:h,positionalParamSegments:p,remainingSegments:y}=Qn(e,i,o);if(!c)throw new W(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Do&&(this.allowRedirects=!1));let ne=this.createSnapshot(n,i,o,u,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let V=yield this.applyRedirects.applyRedirectCommands(h,i.redirectTo,p,Wn(ne),n),ie=yield this.applyRedirects.lineralizeSegments(i,V);return this.processSegment(n,r,e,ie.concat(y),s,!1,a)})}createSnapshot(n,e,r,i,o){let s=new Ie(r,i,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Oo(e),F(e),e.component??e._loadedComponent??null,e,Uo(e),n),a=dr(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}matchSegmentAgainstRoute(n,e,r,i,o,s){return m(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=Qe=>this.createSnapshot(n,r,Qe.consumedSegments,Qe.parameters,s),c=yield ct(wo(e,r,i,n,this.urlSerializer,a,this.abortSignal));if(r.path==="**"&&(e.children={}),!c?.matched)throw new W(e);n=r._injector??n;let{routes:u}=yield this.getChildConfig(n,r,i),h=r._loadedInjector??n,{parameters:p,consumedSegments:y,remainingSegments:ne}=c,V=this.createSnapshot(n,r,y,p,s),{segmentGroup:ie,slicedSegments:Te}=vn(e,y,ne,u);if(Te.length===0&&ie.hasChildren()){let Qe=yield this.processChildren(h,u,ie,V);return new D(V,Qe)}if(u.length===0&&Te.length===0)return new D(V,[]);let Ot=F(r)===o,De=yield this.processSegment(h,u,ie,Te,Ot?f:o,!0,V);return new D(V,De instanceof D?[De]:[])})}getChildConfig(n,e,r){return m(this,null,function*(){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(n).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield ct(go(n,e,r,this.urlSerializer,this.abortSignal))){let o=yield this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw yo(e)}return{routes:[],injector:n}})}};function No(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function _o(t){let n=t.value.routeConfig;return n&&n.path===""}function Kn(t){let n=[],e=new Set;for(let r of t){if(!_o(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Kn(r.children);n.push(new D(r.value,i))}return n.filter(r=>!e.has(r))}function Oo(t){return t.data||{}}function Uo(t){return t.resolve||{}}function Po(t,n,e,r,i,o,s){return $(a=>m(null,null,function*(){let{state:c,tree:u}=yield To(t,n,e,r,a.extractedUrl,i,o,s);return O(d({},a),{targetSnapshot:c,urlAfterRedirects:u})}))}function Lo(t){return $(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return g(n);let i=new Set(r.map(a=>a.route)),o=new Set;for(let a of i)if(!o.has(a))for(let c of Yn(a))o.add(c);let s=0;return A(o).pipe(Ne(a=>i.has(a)?xo(a,e,t):(a.data=dr(a,a.parent,t).resolve,g(void 0))),k(()=>s++),xt(1),$(a=>s===o.size?g(n):P))})}function Yn(t){let n=t.children.map(e=>Yn(e)).flat();return[t,...n]}function xo(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!kn(r)&&(i[He]=r.title),Ke(()=>(t.data=dr(t,t.parent,e).resolve,jo(i,t,n).pipe(E(o=>(t._resolvedData=o,t.data=d(d({},t.data),o),null)))))}function jo(t,n,e){let r=Zt(t);if(r.length===0)return g({});let i={};return A(r).pipe($(o=>ko(t[o],n,e).pipe(Y(),k(s=>{if(s instanceof Ae)throw bt(new Q,s);i[o]=s}))),xt(1),E(()=>i),Ye(o=>Hn(o)?P:Er(o)))}function ko(t,n,e){let r=n._environmentInjector,i=Me(t,r),o=i.resolve?i.resolve(n,e):T(r,()=>i(n,e));return ue(o)}function mn(t){return j(n=>{let e=t(n);return e?A(e).pipe(E(()=>n)):g(n)})}var mr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[He]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>l(Zn),providedIn:"root"})}return t})(),Zn=(()=>{class t extends mr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(Z(ln))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),re=new M("",{factory:()=>({})}),de=new M(""),Mt=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=l(tn);loadComponent(e,r){return m(this,null,function*(){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=m(this,null,function*(){try{let o=yield Cn(T(e,()=>r.loadComponent())),s=yield ei(Xn(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}});return this.componentLoaders.set(r,i),i})}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=m(this,null,function*(){try{let o=yield Jn(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r)}});return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Jn(t,n,e,r){return m(this,null,function*(){let i=yield Cn(T(e,()=>t.loadChildren())),o=yield ei(Xn(i)),s;o instanceof Gr||Array.isArray(o)?s=o:s=yield n.compileModuleAsync(o),r&&r(t);let a,c,u=!1,h;return Array.isArray(s)?(c=s,u=!0):(a=s.create(e).injector,h=s,c=a.get(de,[],{optional:!0,self:!0}).flat()),{routes:c.map(vr),injector:a,factory:h}})}function $o(t){return t&&typeof t=="object"&&"default"in t}function Xn(t){return $o(t)?t.default:t}function ei(t){return m(this,null,function*(){return t})}var Tt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>l(zo),providedIn:"root"})}return t})(),zo=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),yr=new M(""),Rr=new M("");function ti(t,n,e){let r=t.get(Rr),i=t.get(Lr);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(u=>setTimeout(u));let o,s=new Promise(u=>{o=u}),a=i.startViewTransition(()=>(o(),Fo(t)));a.updateCallbackDone.catch(u=>{}),a.ready.catch(u=>{}),a.finished.catch(u=>{});let{onViewTransitionCreated:c}=r;return c&&T(t,()=>c({transition:a,from:n,to:e})),s}function Fo(t){return new Promise(n=>{zt({read:()=>setTimeout(n)},{injector:t})})}var qo=()=>{},Cr=new M(""),Dt=(()=>{class t{currentNavigation=w(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=w(null);events=new oe;transitionAbortWithErrorSubject=new oe;configLoader=l(Mt);environmentInjector=l(G);destroyRef=l(kt);urlSerializer=l(te);rootContexts=l(le);location=l(ge);inputBindingEnabled=l(Be,{optional:!0})!==null;titleStrategy=l(mr);options=l(re,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=l(Tt);createViewTransition=l(yr,{optional:!0});navigationErrorHandler=l(Cr,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>g(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new gt(i)),r=i=>this.events.next(new vt(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;R(()=>{this.transitions?.next(O(d({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new U(null),this.transitions.pipe(K(r=>r!==null),j(r=>{let i=!1,o=new AbortController,s=()=>!i&&this.currentTransition?.id===r.id;return g(r).pipe(j(a=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",I.SupersededByNewNavigation),P;this.currentTransition=r;let c=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:c?O(d({},c),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let u=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!u&&h!=="reload")return this.events.next(new q(a.id,this.urlSerializer.serialize(a.rawUrl),"",Ce.IgnoredSameUrlNavigation)),a.resolve(!1),P;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return g(a).pipe(j(p=>(this.events.next(new ee(p.id,this.urlSerializer.serialize(p.extractedUrl),p.source,p.restoredState)),p.id!==this.navigationId?P:Promise.resolve(p))),Po(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),k(p=>{r.targetSnapshot=p.targetSnapshot,r.urlAfterRedirects=p.urlAfterRedirects,this.currentNavigation.update(y=>(y.finalUrl=p.urlAfterRedirects,y)),this.events.next(new ke)}),j(p=>A(r.routesRecognizeHandler.deferredHandle??g(void 0)).pipe(E(()=>p))),k(()=>{let p=new je(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(p)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:p,extractedUrl:y,source:ne,restoredState:V,extras:ie}=a,Te=new ee(p,this.urlSerializer.serialize(y),ne,V);this.events.next(Te);let Ot=xn(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=O(d({},a),{targetSnapshot:Ot,urlAfterRedirects:y,extras:O(d({},ie),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(De=>(De.finalUrl=y,De)),g(r)}else return this.events.next(new q(a.id,this.urlSerializer.serialize(a.extractedUrl),"",Ce.IgnoredByUrlHandlingStrategy)),a.resolve(!1),P}),E(a=>{let c=new dt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(c),this.currentTransition=r=O(d({},a),{guards:Ki(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),r}),ao(a=>this.events.next(a)),j(a=>{if(r.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw bt(this.urlSerializer,a.guardsResult);let c=new ht(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(c),!s())return P;if(!a.guardsResult)return this.cancelNavigationTransition(a,"",I.GuardRejected),P;if(a.guards.canActivateChecks.length===0)return g(a);let u=new ft(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(u),!s())return P;let h=!1;return g(a).pipe(Lo(this.paramsInheritanceStrategy),k({next:()=>{h=!0;let p=new pt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(p)},complete:()=>{h||this.cancelNavigationTransition(a,"",I.NoDataFromResolver)}}))}),mn(a=>{let c=h=>{let p=[];if(h.routeConfig?._loadedComponent)h.component=h.routeConfig?._loadedComponent;else if(h.routeConfig?.loadComponent){let y=h._environmentInjector;p.push(this.configLoader.loadComponent(y,h.routeConfig).then(ne=>{h.component=ne}))}for(let y of h.children)p.push(...c(y));return p},u=c(a.targetSnapshot.root);return u.length===0?g(a):A(Promise.all(u).then(()=>a))}),mn(()=>this.afterPreactivation()),j(()=>{let{currentSnapshot:a,targetSnapshot:c}=r,u=this.createViewTransition?.(this.environmentInjector,a.root,c.root);return u?A(u).pipe(E(()=>r)):g(r)}),he(1),j(a=>{let c=Vi(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);this.currentTransition=r=a=O(d({},a),{targetRouterState:c}),this.currentNavigation.update(h=>(h.targetRouterState=c,h)),this.events.next(new we);let u=r.beforeActivateHandler.deferredHandle;return u?A(u.then(()=>a)):g(a)}),k(a=>{new ar(e.routeReuseStrategy,r.targetRouterState,r.currentRouterState,c=>this.events.next(c),this.inputBindingEnabled).activate(this.rootContexts),s()&&(i=!0,this.currentNavigation.update(c=>(c.abort=qo,c)),this.lastSuccessfulNavigation.set(R(this.currentNavigation)),this.events.next(new x(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),Ze(Bn(o.signal).pipe(K(()=>!i&&!r.targetRouterState),k(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",I.Aborted)}))),k({complete:()=>{i=!0}}),Ze(this.transitionAbortWithErrorSubject.pipe(k(a=>{throw a}))),Dr(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",I.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Ye(a=>{if(i=!0,this.destroyed)return r.resolve(!1),P;if(qn(a))this.events.next(new L(r.id,this.urlSerializer.serialize(r.extractedUrl),a.message,a.cancellationCode)),Qi(a)?this.events.next(new be(a.url,a.navigationBehaviorOptions)):r.resolve(!1);else{let c=new ce(r.id,this.urlSerializer.serialize(r.extractedUrl),a,r.targetSnapshot??void 0);try{let u=T(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(u instanceof Ae){let{message:h,cancellationCode:p}=bt(this.urlSerializer,u);this.events.next(new L(r.id,this.urlSerializer.serialize(r.extractedUrl),h,p)),this.events.next(new be(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(c),a}catch(u){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(u)}}return P}))}))}cancelNavigationTransition(e,r,i){let o=new L(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=R(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ho(t){return t!==ye}var ri=new M("");var ni=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>l(Bo),providedIn:"root"})}return t})(),At=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}shouldDestroyInjector(n){return!0}},Bo=(()=>{class t extends At{static \u0275fac=(()=>{let e;return function(i){return(e||(e=$t(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nt=(()=>{class t{urlSerializer=l(te);options=l(re,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=l(ge);urlHandlingStrategy=l(Tt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new N;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof N?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=xn(null,l(G));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>l(Vo),providedIn:"root"})}return t})(),Vo=(()=>{class t extends Nt{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,r){e instanceof ee?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof je?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof we?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof L&&!Ln(e)?this.restoreHistory(r):e instanceof ce?this.restoreHistory(r,!0):e instanceof x&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=d(d({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=d(d({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=$t(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function _t(t,n){t.events.pipe(K(e=>e instanceof x||e instanceof L||e instanceof ce||e instanceof q),E(e=>e instanceof x||e instanceof q?0:(e instanceof L?e.code===I.Redirect||e.code===I.SupersededByNewNavigation:!1)?2:1),K(e=>e!==2),he(1)).subscribe(()=>{n()})}var B=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=l(Kr);stateManager=l(Nt);options=l(re,{optional:!0})||{};pendingTasks=l(xr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=l(Dt);urlSerializer=l(te);location=l(ge);urlHandlingStrategy=l(Tt);injector=l(G);_events=new oe;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=l(ni);injectorCleanup=l(ri,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=l(de,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!l(Be,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new br;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=R(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof L&&r.code!==I.Redirect&&r.code!==I.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof x)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof be){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=d({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Ho(i.source)},s);this.scheduleNavigation(a,ye,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}Hi(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ye,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i,o)=>{this.navigateToSyncWithBrowser(e,i,r,o)})}navigateToSyncWithBrowser(e,r,i,o){let s=i?.navigationId?i:null;if(i){let c=d({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(Je)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return R(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(vr),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,h=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":h=d(d({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let p;try{let y=i?i.snapshot:this.routerState.snapshot.root;p=_n(y)}catch(y){(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),p=this.currentUrlTree.root}return On(p,e,h,u??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=X(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,ye,null,r)}navigate(e,r={skipLocationChange:!1}){return Go(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch(r){return this.console.warn(_r(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=d({},wn):r===!1?i=d({},Jt):i=d(d({},Jt),r),X(e))return dn(this.currentUrlTree,e,i);let o=this.parseUrl(e);return dn(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((p,y)=>{a=p,c=y});let h=this.pendingTasks.add();return _t(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(Promise.reject.bind(Promise))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Go(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new b(4008,!1)}var Qo=(()=>{class t{router=l(B);stateManager=l(Nt);fragment=w("");queryParams=w({});path=w("");serializer=l(te);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof x&&this.updateState()})}updateState(){let{fragment:e,root:r,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new N(r)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ii=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=l(new nn("href"),{optional:!0});reactiveHref=rn(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return R(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return R(this._target)}_target=w(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return R(this._queryParams)}_queryParams=w(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return R(this._fragment)}_fragment=w(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return R(this._queryParamsHandling)}_queryParamsHandling=w(void 0);set state(e){this._state.set(e)}get state(){return R(this._state)}_state=w(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return R(this._info)}_info=w(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return R(this._relativeTo)}_relativeTo=w(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return R(this._preserveFragment)}_preserveFragment=w(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return R(this._skipLocationChange)}_skipLocationChange=w(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return R(this._replaceUrl)}_replaceUrl=w(!1);isAnchorElement;onChanges=new oe;applicationErrorHandler=l(Je);options=l(re,{optional:!0});reactiveRouterState=l(Qo);constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a;let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=w(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(X(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this._urlTree();if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}_urlTree=Ht(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i==="preserve"||i==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:X(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,r)=>this.computeHref(e)===this.computeHref(r)});get urlTree(){return R(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(r){return new(r||t)(pe(B),pe(H),kr("tabindex"),pe(Hr),pe($r),pe(_e))};static \u0275dir=tt({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&en("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Jr("href",i.reactiveHref(),Fr)("target",i._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",rt],skipLocationChange:[2,"skipLocationChange","skipLocationChange",rt],replaceUrl:[2,"replaceUrl","replaceUrl",rt],routerLink:"routerLink"},features:[Xe]})}return t})();var Ge=class{};var oi=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(K(e=>e instanceof x),Ne(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=et(o.providers,e,""));let s=o._injector??e;o._loadedNgModuleFactory&&!o._loadedInjector&&(o._loadedInjector=o._loadedNgModuleFactory.create(s).injector);let a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return A(i).pipe(Lt())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{if(e.destroyed)return g(null);let i;r.loadChildren&&r.canLoad===void 0?i=A(this.loader.loadChildren(e,r)):i=g(null);let o=i.pipe($(s=>s===null?g(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,r._loadedNgModuleFactory=s.factory,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return A([o,s]).pipe(Lt())}else return o})}static \u0275fac=function(r){return new(r||t)(Z(B),Z(G),Z(Ge),Z(Mt))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ai=new M(""),Ko=(()=>{class t{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=ye;restoredId=0;store={};urlSerializer=l(te);zone=l(jr);viewportScroller=l(Vt);transitions=l(Dt);constructor(e){this.options=e,this.options.scrollPositionRestoration||="disabled",this.options.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ee?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof x?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof q&&e.code===Ce.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof Se)||e.scrollBehavior==="manual")return;let r={behavior:"instant"};e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],r):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position,r):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,r){let i=R(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(()=>m(this,null,function*(){yield new Promise(o=>{setTimeout(o),typeof requestAnimationFrame<"u"&&requestAnimationFrame(o)}),this.zone.run(()=>{this.transitions.events.next(new Se(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,r,i))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(r){Br()};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();function Yo(t,...n){return Pr([{provide:de,multi:!0,useValue:t},[],{provide:H,useFactory:si},{provide:qt,multi:!0,useFactory:ci},n.map(e=>e.\u0275providers)])}function si(){return l(B).routerState.root}function We(t,n){return{\u0275kind:t,\u0275providers:n}}function ci(){let t=l(jt);return n=>{let e=t.get(Zr);if(n!==e.components[0])return;let r=t.get(B),i=t.get(ui);t.get(wr)===1&&r.initialNavigation(),t.get(hi,null,{optional:!0})?.setUpPreloading(),t.get(ai,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var ui=new M("",{factory:()=>new oe}),wr=new M("",{factory:()=>1});function li(){let t=[{provide:zr,useValue:!0},{provide:wr,useValue:0},Ft(()=>{let n=l(jt);return n.get(sn,Promise.resolve()).then(()=>new Promise(r=>{let i=n.get(B),o=n.get(ui);_t(i,()=>{r(!0)}),n.get(Dt).afterPreactivation=()=>(r(!0),o.closed?g(void 0):o),i.initialNavigation()}))})];return We(2,t)}function di(){let t=[Ft(()=>{l(B).setUpLocationChangeListener()}),{provide:wr,useValue:2}];return We(3,t)}var hi=new M("");function fi(t){return We(0,[{provide:hi,useExisting:oi},{provide:Ge,useExisting:t}])}function pi(){return We(8,[pr,{provide:Be,useExisting:pr}])}function gi(t){qr("NgRouterViewTransitions");let n=[{provide:yr,useValue:ti},{provide:Rr,useValue:d({skipNextTransition:!!t?.skipInitialTransition},t)}];return We(9,n)}var vi=[ge,{provide:te,useClass:Q},B,le,{provide:H,useFactory:si},Mt,[]],Zo=(()=>{class t{constructor(){}static forRoot(e,r){return{ngModule:t,providers:[vi,[],{provide:de,multi:!0,useValue:e},[],r?.errorHandler?{provide:Cr,useValue:r.errorHandler}:[],{provide:re,useValue:r||{}},r?.useHash?Xo():ea(),Jo(),r?.preloadingStrategy?fi(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?ta(r):[],r?.bindToComponentInputs?pi().\u0275providers:[],r?.enableViewTransitions?gi().\u0275providers:[],ra()]}}static forChild(e){return{ngModule:t,providers:[{provide:de,multi:!0,useValue:e}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Qr({type:t});static \u0275inj=Or({})}return t})();function Jo(){return{provide:ai,useFactory:()=>{let t=l(Vt),n=l(re);return n.scrollOffset&&t.setOffset(n.scrollOffset),new Ko(n)}}}function Xo(){return{provide:_e,useClass:un}}function ea(){return{provide:_e,useClass:cn}}function ta(t){return[t.initialNavigation==="disabled"?di().\u0275providers:[],t.initialNavigation==="enabledBlocking"?li().\u0275providers:[]]}var Sr=new M("");function ra(){return[{provide:Sr,useFactory:ci},{provide:qt,multi:!0,useExisting:Sr}]}export{x as a,H as b,fr as c,B as d,ii as e,Yo as f,Zo as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-MWWLTJ77.js";import"./chunk-QWMDAFBN.js";import"./chunk-3JGMGRXW.js";export{a as OAUTH_CALLBACK_STORAGE_KEY,b as OAuthCallbackComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N}from"./chunk-3U3QVZEU.js";import{a as J}from"./chunk-I5OT3IGD.js";import{d as F,e as $}from"./chunk-QWMDAFBN.js";import"./chunk-WNNKQ2DH.js";import"./chunk-KTPX26DH.js";import{f as U,g as z}from"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import{a as L,b as S}from"./chunk-AJOXSD6I.js";import"./chunk-53STPEYQ.js";import"./chunk-AK6F2DC7.js";import{d as K}from"./chunk-DRBOHCTP.js";import"./chunk-IXD43YQI.js";import{a as W,b as A}from"./chunk-WPC6XC7P.js";import"./chunk-XJUBZLY2.js";import{b as B}from"./chunk-XIQ3L6H6.js";import{O as V}from"./chunk-B2QA6UZX.js";import{B as x,Bb as k,Db as h,Fb as b,Ka as v,Pb as E,Tb as O,Wa as D,a as c,ab as I,ac as T,b as p,ca as m,ga as C,ha as j,hc as q,kc as w,ma as R,rb as P,sb as d,tb as _,ub as M}from"./chunk-3JGMGRXW.js";var ee=()=>[];function te(u,t){if(u&1){let o=k();d(0,"div",5)(1,"ds-entity-card",6),h("selected",function(r){C(o);let n=b();return j(n.onItemSelected(r))}),_(),d(2,"button",7),h("click",function(r){let n=C(o).$implicit,f=b();return r.stopPropagation(),j(f.onDeleteRequested(n.id))}),d(3,"mat-icon"),O(4,"close"),_()()()}if(u&2){let o=t.$implicit;v(),P("id",o.id)("name",o.name)("description",o.description)("badges",o.badges??T(4,ee))}}var g="__",Y=class u{router=m(F);projectStateService=m(B);dialog=m(K);destroyRef=m(R);notification=m(J);projects=S(this.projectStateService.projectList$);forcedProject=S(this.projectStateService.forcedProject$,{initialValue:null});projectItems=w(()=>{let t=this.projects();if(!t)return[];let o=t.filter(e=>!e.name.includes(g)),a=t.filter(e=>e.name.includes(g)),r=new Set(o.map(e=>e.name)),n=e=>e.split(g)[0]??null,f=new Set(a.map(e=>n(e.name)).filter(e=>e!==null&&r.has(e))),l=[],G=[...f].sort((e,i)=>e.localeCompare(i));for(let e of G){let i=o.find(s=>s.name===e);l.push(p(c({},this.toEntityListItem(i)),{groupKey:e,groupLabel:e}));let Z=a.filter(s=>n(s.name)===e).sort((s,y)=>s.name.localeCompare(y.name));for(let s of Z){let y=s.name.slice(e.length+g.length);l.push(p(c({},this.toEntityListItem(s)),{name:y,description:s.name,groupKey:e,groupLabel:e}))}}let H=[...o].filter(e=>!f.has(e.name)&&!e.volatile).sort((e,i)=>e.name.localeCompare(i.name));for(let e of H)l.push(p(c({},this.toEntityListItem(e)),{groupKey:"__standalone__",groupLabel:"Projects"}));let Q=[...o].filter(e=>!f.has(e.name)&&e.volatile).sort((e,i)=>e.name.localeCompare(i.name));for(let e of Q)l.push(p(c({},this.toEntityListItem(e)),{groupKey:"__volatile__",groupLabel:"Temporary"}));let X=a.filter(e=>{let i=n(e.name);return i!==null&&!r.has(i)}).sort((e,i)=>e.name.localeCompare(i.name));for(let e of X)l.push(p(c({},this.toEntityListItem(e)),{groupKey:"__orphaned__",groupLabel:"Orphaned worktrees"}));return l});showCreateButton=w(()=>!this.forcedProject());constructor(){}onItemSelected(t){this.projectStateService.selectProject(t),this.router.navigate(["project",t])}onCreateRequested(){this.router.navigate(["project","new"])}onDeleteRequested(t){let o=t.includes(g);this.dialog.open(N,{width:"400px",panelClass:"confirm-dialog-panel",data:c({title:"Delete project",message:`This will remove the project "${t}" from Coday and archive its configuration. The project source code on disk is not affected.`,confirmLabel:"Delete",cancelLabel:"Cancel",isDestructive:!0},o?{checkboxLabel:"Also remove git worktree from disk"}:{})}).afterClosed().pipe(x(r=>r?.confirmed===!0),L(this.destroyRef)).subscribe(r=>{this.notification.info("Deleting project\u2026"),this.projectStateService.deleteProject(t,r.checkboxChecked).pipe(L(this.destroyRef)).subscribe({next:()=>{this.notification.success(`Project "${t}" deleted`),this.router.url.includes(`/project/${encodeURIComponent(t)}`)&&this.router.navigate(["/"])},error:n=>{console.error("[PROJECT-LIST] Failed to delete project:",n),this.notification.error(n?.error?.error??"Failed to delete project")}})})}toEntityListItem(t){return{id:t.name,name:t.name,badges:t.volatile?[{label:"temp",variant:"warning"}]:[]}}static \u0275fac=function(o){return new(o||u)};static \u0275cmp=D({type:u,selectors:[["app-project-selection"]],decls:6,vars:4,consts:[["projectCard",""],[1,"project-page-layout"],["title","Projects","contentMaxWidth","1400px","searchPlaceholder","Filter projects\u2026","emptyMessage","No projects found.",3,"itemSelected","createRequested","items","itemTemplate","showCreate","autoFocusSearch"],["toolbar-start","","routerLink","/","title","Back to tasks",1,"project-list__logo"],["src","CODAY-Logo.png","alt","Coday"],[1,"project-card-wrapper"],[3,"selected","id","name","description","badges"],["mat-icon-button","","title","Delete project",1,"project-card-wrapper__delete",3,"click"]],template:function(o,a){if(o&1&&(d(0,"div",1)(1,"ds-entity-list",2),h("itemSelected",function(n){return a.onItemSelected(n)})("createRequested",function(){return a.onCreateRequested()}),d(2,"a",3),M(3,"img",4),_()()(),I(4,te,5,5,"ng-template",null,0,q)),o&2){let r=E(5);v(),P("items",a.projectItems())("itemTemplate",r)("showCreate",a.showCreateButton())("autoFocusSearch",!0)}},dependencies:[z,U,A,W,V,$],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.project-page-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.project-list__logo[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;border-radius:4px;opacity:.85;transition:opacity .15s ease;cursor:pointer}.project-list__logo[_ngcontent-%COMP%]:hover{opacity:1}.project-list__logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:40px;object-fit:contain;border-radius:4px}.project-card-wrapper[_ngcontent-%COMP%]{position:relative}.project-card-wrapper__delete[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:28px;height:28px;line-height:28px;padding:0;opacity:0;transition:opacity .15s ease;color:var(--color-text-secondary, #6e6e73)}.project-card-wrapper__delete[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.project-card-wrapper__delete[_ngcontent-%COMP%]:hover{color:var(--color-error, #ff3b30)}.project-card-wrapper[_ngcontent-%COMP%]:hover .project-card-wrapper__delete[_ngcontent-%COMP%]{opacity:1}"]})};export{Y as ProjectListComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-Q3YY3NFM.js";import"./chunk-IFXDK4GQ.js";import"./chunk-GAZJZBKP.js";import"./chunk-QWMDAFBN.js";import"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import"./chunk-AJOXSD6I.js";import"./chunk-53STPEYQ.js";import"./chunk-AK6F2DC7.js";import"./chunk-IXD43YQI.js";import"./chunk-WPC6XC7P.js";import"./chunk-XJUBZLY2.js";import"./chunk-B2QA6UZX.js";import"./chunk-3JGMGRXW.js";export{a as UserListComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E}from"./chunk-GAZJZBKP.js";import{b as w,d as M}from"./chunk-QWMDAFBN.js";import{b as k}from"./chunk-ZL64I3EB.js";import{a as I}from"./chunk-AJOXSD6I.js";import{Db as d,Jb as y,Ka as m,Kb as v,Lb as C,Ma as _,Rc as x,S as f,Tb as l,Wa as b,ca as n,ma as g,rb as p,sb as a,t as h,ta as c,tb as i}from"./chunk-3JGMGRXW.js";var H=["composerInput"],P=class u{http=n(x);router=n(M);route=n(w);config=n(E);destroyRef=n(g);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=c("");isCreating=c(!1);constructor(){_(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),I(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(H,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:3,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case (Enter)",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(s){return o.onInput(s)})("keydown",function(s){return o.onKeydown(s)}),i(),a(7,"div",6)(8,"span",7),l(9,"Enter to send\xA0\xA0\xB7\xA0\xA0Shift+Enter for new line"),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(m(5),p("value",o.inputValue())("disabled",o.isCreating()),m(5),p("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px #00000012;overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{P as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ee}from"./chunk-UORJVNGU.js";import{c as le}from"./chunk-WNNKQ2DH.js";import{b as Se}from"./chunk-O2IJMHBE.js";import{e as Pe,f as De,g as Oe,h as Ie,i as Fe,j as Te,k as ke,l as We}from"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import"./chunk-AJOXSD6I.js";import"./chunk-53STPEYQ.js";import{c as de,d as me,i as ce,j as ge,m as Ae,n as we}from"./chunk-AK6F2DC7.js";import{a as $,b as ee,d as te,e as ne,f as ie,g as oe,h as ae}from"./chunk-DRBOHCTP.js";import"./chunk-IXD43YQI.js";import{a as F,b as T}from"./chunk-WPC6XC7P.js";import{A as xe,C as ve,c as pe,g as ue,m as _e,o as fe,p as he,w as Ce,x as Me,y as ye,z as be}from"./chunk-XJUBZLY2.js";import{b as se}from"./chunk-XIQ3L6H6.js";import{O,Q as re,S as I}from"./chunk-B2QA6UZX.js";import{Bb as b,Cc as X,Db as c,Fb as m,Ka as d,Pb as L,Rb as A,Rc as Y,Tb as l,Ub as x,Vb as B,Wa as E,Wb as G,Xb as u,Yb as _,Z as j,Zb as f,ab as k,ac as Z,bc as K,ca as h,g as V,ga as g,ha as p,hc as J,jb as N,kc as Q,lb as M,mb as y,nb as W,ob as U,pb as P,qb as D,rb as C,sb as i,ta as S,tb as o,ub as z,yb as q,zb as H}from"./chunk-3JGMGRXW.js";var v=class s{http=h(Y);projectState=h(se);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${encodeURIComponent(t)}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new V(n=>{let a=new FileReader;a.onload=()=>{let r=a.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:r,mimeType:e.type},{params:{location:t}}).subscribe(n)},a.onerror=()=>n.error(a.error),a.readAsDataURL(e)})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=j({token:s,factory:s.\u0275fac,providedIn:"root"})};function Ne(s,t){s&1&&(i(0,"p",15),l(1,"No integrations defined \u2014 agent will have access to all tools."),o())}function Ue(s,t){if(s&1){let e=b();i(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),l(3,"Integration"),o(),i(4,"input",23),f("ngModelChange",function(a){let r=g(e).$implicit;return _(r.integration,a)||(r.integration=a),p(a)}),o()(),i(5,"mat-form-field",24)(6,"mat-label"),l(7,"Tools (comma-separated)"),o(),i(8,"input",25),f("ngModelChange",function(a){let r=g(e).$implicit;return _(r.tools,a)||(r.tools=a),p(a)}),o()(),i(9,"button",26),c("click",function(){let a=g(e).$index,r=m();return p(r.removeIntegrationRow(a))}),i(10,"mat-icon"),l(11,"delete"),o()()()}if(s&2){let e=t.$implicit;d(4),u("ngModel",e.integration),d(4),u("ngModel",e.tools)}}function ze(s,t){if(s&1&&(i(0,"p",30),l(1),o()),s&2){let e=m(2);d(),x(e.docUploadError)}}function qe(s,t){s&1&&(i(0,"p",15),l(1,"No mandatory documents defined."),o())}function He(s,t){if(s&1&&z(0,"option",35),s&2){let e=t.$implicit;C("value","documents/"+e)}}function Ge(s,t){if(s&1){let e=b();i(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),l(3,"Document path"),o(),i(4,"input",33),f("ngModelChange",function(a){let r=g(e).$index,R=m(2);return _(R.mandatoryDocs[r],a)||(R.mandatoryDocs[r]=a),p(a)}),o(),i(5,"datalist",34),P(6,He,1,1,"option",35,U),o()(),i(8,"button",26),c("click",function(){let a=g(e).$index,r=m(2);return p(r.removeDocRow(a))}),i(9,"mat-icon"),l(10,"delete"),o()()()}if(s&2){let e=t.$index,n=m(2);d(4),u("ngModel",n.mandatoryDocs[e]),N("list","docs-list-"+e),d(),C("id","docs-list-"+e),d(),D(n.availableDocuments)}}function Ze(s,t){if(s&1){let e=b();i(0,"div",6)(1,"span"),l(2,"Mandatory Documents"),o(),i(3,"button",27),c("click",function(){g(e);let a=m();return p(a.addDocRow())}),i(4,"mat-icon"),l(5,"add"),o()(),i(6,"label",28)(7,"mat-icon"),l(8,"upload_file"),o(),i(9,"input",29),c("change",function(a){g(e);let r=m();return p(r.onDocFileSelected(a))}),o()()(),M(10,ze,2,1,"p",30),M(11,qe,2,0,"p",15),P(12,Ge,11,3,"div",31,W)}if(s&2){let e=m();d(6),A("uploading",e.isUploadingDoc),d(3),C("disabled",e.isUploadingDoc),d(),y(e.docUploadError?10:-1),d(),y(e.mandatoryDocs.length===0?11:-1),d(),D(e.mandatoryDocs)}}function Ke(s,t){s&1&&(i(0,"p",15),l(1,"\u{1F4A1} Documents can be added after the agent is created."),o())}function Je(s,t){if(s&1){let e=b();i(0,"div",6),l(1,"Save to"),o(),i(2,"div",36)(3,"label",37)(4,"input",38),f("ngModelChange",function(a){g(e);let r=m();return _(r.location,a)||(r.location=a),p(a)}),o(),i(5,"div",39)(6,"div",40)(7,"span",41),l(8,"\u{1F464}"),o(),i(9,"span",42),l(10,"Project config"),o()(),i(11,"p",43),l(12),o()()(),i(13,"label",37)(14,"input",44),f("ngModelChange",function(a){g(e);let r=m();return _(r.location,a)||(r.location=a),p(a)}),o(),i(15,"div",39)(16,"div",40)(17,"span",41),l(18,"\u{1F4E6}"),o(),i(19,"span",42),l(20,"Colocated"),o()(),i(21,"p",43),l(22,"Next to coday.yaml in ./agents/ (committable)"),o()()()(),i(23,"p",15),l(24,"Storage location is permanent and cannot be changed after creation."),o()}if(s&2){let e=m();d(3),A("selected",e.location==="project"),d(),u("ngModel",e.location),d(8),G("~/.coday/projects/","{","name","}","/agents/ (not committed)"),d(),A("selected",e.location==="colocated"),d(),u("ngModel",e.location)}}function Qe(s,t){if(s&1&&(i(0,"div",17)(1,"span",6),l(2,"Storage Location"),o(),i(3,"span",45),l(4),o(),i(5,"p",15),l(6,"Cannot be changed after creation."),o()()),s&2){let e=m();d(3),A("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),d(),B(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ")}}function Xe(s,t){if(s&1&&(i(0,"div",18)(1,"mat-icon"),l(2,"error"),o(),i(3,"span"),l(4),o()()),s&2){let e=m();d(4),x(e.errorMessage)}}var w=class s{agentCrudApi=h(v);agentApi=h(Ee);dialogRef=h($);data=h(ee);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=!1;docUploadError="";location="project";isSaving=!1;errorMessage="";isEditMode=!1;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,n])=>({integration:e,tools:n?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments()}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]})}addDocRow(){this.mandatoryDocs.push("")}removeDocRow(t){this.mandatoryDocs.splice(t,1)}onDocFileSelected(t){let e=t.target,n=e.files?.[0];n&&(this.isUploadingDoc=!0,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,n).subscribe({next:a=>{this.isUploadingDoc=!1,this.mandatoryDocs.push(a.relativePath),this.loadAvailableDocuments(),e.value=""},error:a=>{this.isUploadingDoc=!1,this.docUploadError=a?.error?.error??a?.message??"Upload failed",e.value=""}}))}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""})}removeIntegrationRow(t){this.integrationRows.splice(t,1)}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",!1;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",!1;if(!this.description.trim())return this.errorMessage="Description is required",!1;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",!1;return!0}buildDefinition(){let t=this.mandatoryDocs.map(n=>n.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(n=>n.integration.trim()).map(n=>[n.integration.trim(),n.tools.split(",").map(a=>a.trim()).filter(Boolean)])):void 0;return{name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=!0,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=!1,this.agentApi.clearAllCache(),this.dialogRef.close(!0)},error:n=>{this.isSaving=!1,this.errorMessage=n?.error?.error||n?.message||"Failed to save agent"}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=E({type:s,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,n){e&1&&(i(0,"h2",0),l(1),o(),i(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),l(6,"Name"),o(),i(7,"input",3),f("ngModelChange",function(r){return _(n.name,r)||(n.name=r),r}),o(),i(8,"mat-hint"),l(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),o()(),i(10,"mat-form-field",2)(11,"mat-label"),l(12,"Description"),o(),i(13,"textarea",4),f("ngModelChange",function(r){return _(n.description,r)||(n.description=r),r}),o()(),i(14,"mat-form-field",2)(15,"mat-label"),l(16,"Instructions"),o(),i(17,"textarea",5),f("ngModelChange",function(r){return _(n.instructions,r)||(n.instructions=r),r}),o(),i(18,"mat-hint"),l(19,"System prompt / instructions sent to the AI model"),o()(),i(20,"div",6),l(21,"AI Configuration"),o(),i(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),l(25,"AI Provider"),o(),i(26,"input",9),f("ngModelChange",function(r){return _(n.aiProvider,r)||(n.aiProvider=r),r}),o()(),i(27,"mat-form-field",8)(28,"mat-label"),l(29,"Model Name"),o(),i(30,"input",10),f("ngModelChange",function(r){return _(n.modelName,r)||(n.modelName=r),r}),o()()(),i(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),l(34,"Temperature"),o(),i(35,"input",11),f("ngModelChange",function(r){return _(n.temperature,r)||(n.temperature=r),r}),o(),i(36,"mat-hint"),l(37,"Leave empty for model default"),o()(),i(38,"mat-form-field",8)(39,"mat-label"),l(40,"Max Output Tokens"),o(),i(41,"input",12),f("ngModelChange",function(r){return _(n.maxOutputTokens,r)||(n.maxOutputTokens=r),r}),o(),i(42,"mat-hint"),l(43,"Leave empty for model default"),o()()(),i(44,"mat-form-field",2)(45,"mat-label"),l(46,"OpenAI Assistant ID"),o(),i(47,"input",13),f("ngModelChange",function(r){return _(n.openaiAssistantId,r)||(n.openaiAssistantId=r),r}),o(),i(48,"mat-hint"),l(49,"If set, forces aiProvider to openai"),o()(),i(50,"div",6)(51,"span"),l(52,"Integrations"),o(),i(53,"button",14),c("click",function(){return n.addIntegrationRow()}),i(54,"mat-icon"),l(55,"add"),o()()(),M(56,Ne,2,0,"p",15),P(57,Ue,12,2,"div",16,W),M(59,Ze,14,5)(60,Ke,2,0,"p",15),M(61,Je,25,8),M(62,Qe,7,5,"div",17),M(63,Xe,5,1,"div",18),o()(),i(64,"mat-dialog-actions",19)(65,"button",20),c("click",function(){return n.cancel()}),l(66,"Cancel"),o(),i(67,"button",21),c("click",function(){return n.save()}),l(68),o()()),e&2&&(d(),x(n.isEditMode?"Edit Agent":"Create Agent"),d(6),u("ngModel",n.name),C("readonly",n.isEditMode),d(6),u("ngModel",n.description),d(4),u("ngModel",n.instructions),d(9),u("ngModel",n.aiProvider),d(4),u("ngModel",n.modelName),d(5),u("ngModel",n.temperature),d(6),u("ngModel",n.maxOutputTokens),d(6),u("ngModel",n.openaiAssistantId),d(9),y(n.integrationRows.length===0?56:-1),d(),D(n.integrationRows),d(2),y(n.isEditMode?59:60),d(2),y(n.isEditMode?-1:61),d(),y(n.isEditMode?62:-1),d(),y(n.errorMessage?63:-1),d(2),C("disabled",n.isSaving),d(2),C("disabled",n.isSaving),d(),B(" ",n.isSaving?"Saving...":"Save"," "))},dependencies:[ve,Ce,Me,pe,fe,he,ue,xe,be,ye,_e,ae,ne,oe,ie,I,re,O,we,Ae,ce,de,me,ge,T,F,Se,le],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media(max-width:768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"]})};var Ye=()=>[],$e=s=>({id:s});function et(s,t){if(s&1&&(i(0,"div",5),l(1),o()),s&2){let e=m();d(),x(e.errorMessage())}}function tt(s,t){if(s&1){let e=b();i(0,"ds-entity-card",7),c("selected",function(a){g(e);let r=m();return p(r.onEdit(a))}),q(1,8),i(2,"button",9),c("click",function(a){return a.stopPropagation()}),i(3,"mat-icon"),l(4,"more_vert"),o()(),H(),o()}if(s&2){let e=t.$implicit;m();let n=L(9);C("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??Z(6,Ye)),d(2),C("matMenuTriggerFor",n)("matMenuTriggerData",K(7,$e,e.id))}}function nt(s,t){if(s&1){let e=b();i(0,"button",10),c("click",function(){let a=g(e).id,r=m();return p(r.onEdit(a))}),i(1,"mat-icon"),l(2,"edit"),o(),l(3," Edit "),o(),i(4,"button",11),c("click",function(){let a=g(e).id,r=m();return p(r.onDelete(a))}),i(5,"mat-icon"),l(6,"delete"),o(),l(7," Delete "),o()}}var Be=class s{agentCrudApi=h(v);location=h(X);dialog=h(te);agents=S([]);isLoading=S(!1);errorMessage=S(null);agentItems=Q(()=>this.agents().map(t=>({id:t.name,name:t.name,description:t.description,badges:this.buildBadges(t),groupKey:t.source,groupLabel:t.source==="project"?"Project (~/.coday/)":"Colocated (next to coday.yaml)"})));ngOnInit(){this.loadAgents()}loadAgents(){this.isLoading.set(!0),this.errorMessage.set(null),this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents.set(t),this.isLoading.set(!1)},error:t=>{this.errorMessage.set(t?.error?.error??"Failed to load agents"),this.isLoading.set(!1)}})}onBack(){this.location.back()}onCreate(){this.dialog.open(w,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents()})}onEdit(t){this.agentCrudApi.getAgent(t).subscribe({next:e=>{this.dialog.open(w,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(a=>{a&&this.loadAgents()})},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load agent")})}onDelete(t){confirm(`Are you sure you want to delete agent "${t}"?`)&&this.agentCrudApi.deleteAgent(t).subscribe({next:()=>this.loadAgents(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete agent")})}buildBadges(t){return[t.source==="project"?{label:"project",variant:"info"}:{label:"colocated",variant:"success"}]}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=E({type:s,selectors:[["app-agent-list"]],decls:11,vars:4,consts:[["agentCard",""],["cardMenu","matMenu"],[1,"agent-list-page"],["title","Agents","cardMinWidth","260px","contentMaxWidth","1400px","searchPlaceholder","Filter agents\u2026","emptyMessage","No file-based agents found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],[1,"agent-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"agent-list__delete-item",3,"click"]],template:function(e,n){if(e&1&&(i(0,"div",2)(1,"ds-entity-list",3),c("createRequested",function(){return n.onCreate()}),i(2,"button",4),c("click",function(){return n.onBack()}),i(3,"mat-icon"),l(4,"chevron_left"),o()()(),M(5,et,2,1,"div",5),o(),k(6,tt,5,9,"ng-template",null,0,J),i(8,"mat-menu",null,1),k(10,nt,8,0,"ng-template",6),o()),e&2){let a=L(7);d(),C("items",n.agentItems())("showCreate",!0)("itemTemplate",a),d(4),y(n.errorMessage()?5:-1)}},dependencies:[Oe,De,Pe,I,O,T,F,We,Te,Ie,Fe,ke],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.agent-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.agent-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"]})};export{Be as AgentListComponent};
|