@whoz-oss/coday-client 0.0.0-workstream-forge.163 → 0.0.0-workstream-forge.165
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/browser/{chunk-Cc6IKSyC.js → chunk-0VeqXZ9d.js} +1 -1
- package/browser/{chunk-CbxILJkh.js → chunk-2HHZ3LC4.js} +1 -1
- package/browser/{chunk-BUHpp4JE.js → chunk-8AFIbDZU.js} +1 -1
- package/browser/{chunk-CsSaiA1P.js → chunk-APy1T-1u.js} +1 -1
- package/browser/{chunk-O-V09dXj.js → chunk-B5ePzsIu.js} +1 -1
- package/browser/{chunk-33f1Bq4d.js → chunk-BB8Lzhwo.js} +1 -1
- package/browser/{chunk-CkucggC3.js → chunk-BEEjS55d.js} +1 -1
- package/browser/chunk-BJSbfkDj.js +1 -0
- package/browser/{chunk-BfnsSzkw.js → chunk-BONtS7al.js} +1 -1
- package/browser/{chunk-ILOTMMoB.js → chunk-BQblY_Kv.js} +1 -1
- package/browser/{chunk-CubEcxsT.js → chunk-BSqHjzXQ.js} +1 -1
- package/browser/{chunk-BVM48Akd.js → chunk-BcLZGu2F.js} +1 -1
- package/browser/{chunk-BdAw3RVr.js → chunk-Bf8bCumD.js} +1 -1
- package/browser/{chunk-DHFl5v8y.js → chunk-BqrOxZdE.js} +1 -1
- package/browser/{chunk-BJT1pT3j.js → chunk-BxXzXgnw.js} +1 -1
- package/browser/{chunk-Dnq1VkLC.js → chunk-C4KCDgok.js} +1 -1
- package/browser/{chunk-BO1HGYJ3.js → chunk-C7QOV3yc.js} +1 -1
- package/browser/{chunk-D0Fm138-.js → chunk-CG1SJzmH.js} +1 -1
- package/browser/{chunk-DAFgF2zk.js → chunk-CGnbW-VY.js} +1 -1
- package/browser/{chunk-LDlaL5qr.js → chunk-COXl1FiZ.js} +1 -1
- package/browser/{chunk-G9dv78Yj.js → chunk-CS1tczfK.js} +1 -1
- package/browser/{chunk-03YpIQRe.js → chunk-CTCRh-DP.js} +1 -1
- package/browser/{chunk-CV3K5zNT.js → chunk-CXv7Ai08.js} +1 -1
- package/browser/{chunk-CUjEhdzX.js → chunk-CcuY-VZC.js} +1 -1
- package/browser/{chunk-C1QfCycr.js → chunk-ClI63nto.js} +1 -1
- package/browser/{chunk-BPDyUW9C.js → chunk-CnRe9SoM.js} +1 -1
- package/browser/{chunk-DFXEWELG.js → chunk-Cs89O_uQ.js} +1 -1
- package/browser/{chunk-DqhsOOSW.js → chunk-CxLl2FLQ.js} +1 -1
- package/browser/{chunk-BQtSIe5T.js → chunk-D5UFWtax.js} +1 -1
- package/browser/{chunk-BVdMofRH.js → chunk-DGRsoYx_.js} +1 -1
- package/browser/{chunk-BIqQDrzJ.js → chunk-DXSN6VYs.js} +1 -1
- package/browser/{chunk-KPQ2pP66.js → chunk-DdWF9OO6.js} +1 -1
- package/browser/{chunk-C4HOlFhc.js → chunk-Dga8qADW.js} +1 -1
- package/browser/{chunk-O3MeTbDv.js → chunk-DzLt2p-b.js} +1 -1
- package/browser/{chunk-Cml5V2VG.js → chunk-EmHExSnw.js} +1 -1
- package/browser/{chunk-Bu3U66-H.js → chunk-Go1_Zu5R.js} +1 -1
- package/browser/{chunk-QZ9v-olu.js → chunk-PCe11EaT.js} +1 -1
- package/browser/{chunk-CDsD_Pfd.js → chunk-THLjXVP8.js} +1 -1
- package/browser/{chunk-Btu4vlJn.js → chunk-UMiCRMsh.js} +3 -3
- package/browser/chunk-cKHTB9X6.js +1 -0
- package/browser/{chunk-DhVxqqFl.js → chunk-cz67d1ar.js} +1 -1
- package/browser/{chunk-CDenpy3I.js → chunk-dkiNkKfC.js} +1 -1
- package/browser/{chunk-C6LQzD3M.js → chunk-fAeW8v1H.js} +1 -1
- package/browser/{chunk-HGFAbUg7.js → chunk-gX9pSFmE.js} +1 -1
- package/browser/{chunk-CDzMjHDI.js → chunk-sUX4ZlTt.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-ITBV6BE5.js → main-BNXY3UWS.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-BXDdc4SZ.js +0 -1
- package/browser/chunk-CrJHMDmB.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a8 as Ae,aE as gw,af as Wn,a3 as _}from'./main-BNXY3UWS.js';function i(t,o,p){return t.pipe(Ae(()=>o().pipe(Wn(()=>_(p)))),gw({bufferSize:1,refCount:true}))}export{i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {v}from'./chunk-33f1Bq4d.js';import {R,q,J}from'./chunk-HGFAbUg7.js';import {p,$ as $t,g as It,H as Me,s as se$1,a2 as F,M as Mi,j as Tg,U,K as x,J as w,a as Ef,z as za,L as dc,n as n_,S as Sf,f as fT,y as yb,I as Iv,h as hT,C as CT,m as mT,a5 as gT,N as iS,l as lc,k as MT,O as tv,Q as aS,d as yT,x as xf,a4 as lT,o as sg,q as ag,G as GT,u as uc}from'./main-ITBV6BE5.js';import {v as vt,a as ve,$,K as Kn,z as zn,Z as Zn,X as Xn,Y as Ye,c as bt,e as fn,L as Ln,W as Wn,b as pn,V as Vn}from'./chunk-Btu4vlJn.js';import'./chunk-CrJHMDmB.js';function se(i,t){i&1&&(za(0,"p",5),n_(1,"Loading\u2026"),Sf());}function ce(i,t){if(i&1&&(za(0,"label",23),lc(1,"input",24),iS(),za(2,"span"),n_(3),Sf()()),i&2){let e=t.$implicit,o=MT(3);yb(),tv("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),aS(),yb(2),Iv(e.label);}}function de(i,t){if(i&1&&(za(0,"fieldset",8)(1,"legend",22),n_(2,"Configuration scope"),Sf(),mT(3,ce,4,4,"label",23,lT().trackByScope,true),Sf()),i&2){let e=MT(2);tv("disabled",e.isEditMode()),yb(3),yT(e.scopeOptions);}}function ue(i,t){if(i&1&&(za(0,"option",13),n_(1),Sf()),i&2){let e=t.$implicit,o=MT(2);tv("value",e),yb(),Iv(o.authTypeLabel[e]);}}function pe(i,t){i&1&&n_(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(za(0,"span",11),n_(1,"*"),Sf());}function me(i,t){if(i&1&&(za(0,"p",28),n_(1),Sf()),i&2){let e=MT(2).$implicit;tv("id","as-hint-"+e.key),yb(),Iv(e.hint);}}function ge(i,t){if(i&1&&(lc(0,"input",27),iS(),fT(1,me,2,2,"p",28)),i&2){let e=MT().$implicit;GT("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),tv("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),uc("aria-describedby",e.hint?"as-hint-"+e.key:null),aS(),yb(),hT(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(za(0,"div",9)(1,"label",26),n_(2),fT(3,he,2,0,"span",11),Sf(),fT(4,ge,2,9),Sf()),i&2){let e,o=t.$implicit,l=MT(3);yb(),tv("for","as-cred-"+o.key),yb(),xf(" ",o.label," "),yb(),hT(o.required?3:-1),yb(),hT((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(za(0,"fieldset",18)(1,"legend",22),n_(2,"Credentials"),Sf(),za(3,"p",25),n_(4," Values are stored encrypted and masked on read. "),fT(5,pe,1,0),Sf(),mT(6,Ce,5,4,"div",9,lT().trackByField,true),Sf()),i&2){let e=MT(2);yb(5),hT(e.isEditMode()?5:-1),yb(),yT(e.credentialFields());}}function ye(i,t){if(i&1){let e=CT();za(0,"form",7),dc("ngSubmit",function(){sg(e);let l=MT();return ag(l.submit())}),fT(1,de,5,1,"fieldset",8),za(2,"div",9)(3,"label",10),n_(4,"Auth type "),za(5,"span",11),n_(6,"*"),Sf()(),za(7,"select",12),mT(8,ue,2,2,"option",13,gT),Sf(),iS(),Sf(),za(10,"div",9)(11,"label",14),n_(12,"Name "),za(13,"span",11),n_(14,"*"),Sf()(),lc(15,"input",15),iS(),Sf(),za(16,"div",9)(17,"label",16),n_(18,"Description"),Sf(),lc(19,"input",17),iS(),Sf(),fT(20,fe,8,1,"fieldset",18),za(21,"div",19)(22,"button",20),n_(23),Sf(),za(24,"button",21),dc("click",function(){sg(e);let l=MT();return ag(l.cancel())}),n_(25,"Cancel"),Sf()()();}if(i&2){let e=MT();tv("formGroup",e.form),yb(),hT(e.isPlatformMode?-1:1),yb(6),tv("formControl",e.authTypeControl),aS(),yb(),yT(e.authTypeOptions),yb(7),tv("formControl",e.nameControl),aS(),yb(4),tv("formControl",e.descriptionControl),aS(),yb(),hT(e.credentialFields().length>0?20:-1),yb(2),tv("disabled",e.form.invalid||e.isSubmitting()),yb(),xf(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=p($t);router=p(It);destroyRef=p(Me);state=p(R);namespaceRole=p(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?se$1(true):F(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new vt("",{nonNullable:true,validators:[ve.required,ve.minLength(1)]});descriptionControl=new vt(null);authTypeControl=new vt("ApiKeyAuthSetting",{nonNullable:true,validators:[ve.required]});scopeControl=new vt("namespace",{nonNullable:true});form=new $({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new vt("",{nonNullable:true});usernameControl=new vt("",{nonNullable:true});passwordControl=new vt("",{nonNullable:true});tokenControl=new vt("",{nonNullable:true});discoveryUrlControl=new vt("",{nonNullable:true});authorizationUrlControl=new vt("",{nonNullable:true});tokenUrlControl=new vt("",{nonNullable:true});clientIdControl=new vt("",{nonNullable:true});clientSecretControl=new vt("",{nonNullable:true});scopesControl=new vt("",{nonNullable:true});resourceUrlControl=new vt("",{nonNullable:true});selectedAuthType=F(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=Mi(()=>Se[this.selectedAuthType()]);isEditMode=se$1(false);isSubmitting=se$1(false);isLoading=se$1(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Tg(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return x(w({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Ef({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],template:function(e,o){e&1&&(za(0,"div",0)(1,"header",1)(2,"button",2),dc("click",function(){return o.cancel()}),za(3,"span",3),n_(4,"\u2190"),Sf(),n_(5," Auth Settings "),Sf(),za(6,"h1",4),n_(7),Sf()(),fT(8,se,2,0,"p",5)(9,ye,26,8,"form",6),Sf()),e&2&&(yb(7),Iv(o.isEditMode()?"Edit auth setting":"New auth setting"),yb(),hT(o.isLoading()?8:9));},dependencies:[Kn,zn,Zn,Xn,Ye,bt,fn,Ln,Wn,pn,Vn],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
|
|
1
|
+
import {v}from'./chunk-BB8Lzhwo.js';import {R,q,J}from'./chunk-gX9pSFmE.js';import {p,$ as $t,g as It,H as Me,s as se$1,a2 as F,M as Mi,j as Tg,U,K as x,J as w,a as Ef,z as za,L as dc,n as n_,S as Sf,f as fT,y as yb,I as Iv,h as hT,C as CT,m as mT,a5 as gT,N as iS,l as lc,k as MT,O as tv,Q as aS,d as yT,x as xf,a4 as lT,o as sg,q as ag,G as GT,u as uc}from'./main-BNXY3UWS.js';import {v as vt,a as ve,$,K as Kn,z as zn,Z as Zn,X as Xn,Y as Ye,c as bt,e as fn,L as Ln,W as Wn,b as pn,V as Vn}from'./chunk-UMiCRMsh.js';import'./chunk-cKHTB9X6.js';function se(i,t){i&1&&(za(0,"p",5),n_(1,"Loading\u2026"),Sf());}function ce(i,t){if(i&1&&(za(0,"label",23),lc(1,"input",24),iS(),za(2,"span"),n_(3),Sf()()),i&2){let e=t.$implicit,o=MT(3);yb(),tv("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),aS(),yb(2),Iv(e.label);}}function de(i,t){if(i&1&&(za(0,"fieldset",8)(1,"legend",22),n_(2,"Configuration scope"),Sf(),mT(3,ce,4,4,"label",23,lT().trackByScope,true),Sf()),i&2){let e=MT(2);tv("disabled",e.isEditMode()),yb(3),yT(e.scopeOptions);}}function ue(i,t){if(i&1&&(za(0,"option",13),n_(1),Sf()),i&2){let e=t.$implicit,o=MT(2);tv("value",e),yb(),Iv(o.authTypeLabel[e]);}}function pe(i,t){i&1&&n_(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(za(0,"span",11),n_(1,"*"),Sf());}function me(i,t){if(i&1&&(za(0,"p",28),n_(1),Sf()),i&2){let e=MT(2).$implicit;tv("id","as-hint-"+e.key),yb(),Iv(e.hint);}}function ge(i,t){if(i&1&&(lc(0,"input",27),iS(),fT(1,me,2,2,"p",28)),i&2){let e=MT().$implicit;GT("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),tv("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),uc("aria-describedby",e.hint?"as-hint-"+e.key:null),aS(),yb(),hT(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(za(0,"div",9)(1,"label",26),n_(2),fT(3,he,2,0,"span",11),Sf(),fT(4,ge,2,9),Sf()),i&2){let e,o=t.$implicit,l=MT(3);yb(),tv("for","as-cred-"+o.key),yb(),xf(" ",o.label," "),yb(),hT(o.required?3:-1),yb(),hT((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(za(0,"fieldset",18)(1,"legend",22),n_(2,"Credentials"),Sf(),za(3,"p",25),n_(4," Values are stored encrypted and masked on read. "),fT(5,pe,1,0),Sf(),mT(6,Ce,5,4,"div",9,lT().trackByField,true),Sf()),i&2){let e=MT(2);yb(5),hT(e.isEditMode()?5:-1),yb(),yT(e.credentialFields());}}function ye(i,t){if(i&1){let e=CT();za(0,"form",7),dc("ngSubmit",function(){sg(e);let l=MT();return ag(l.submit())}),fT(1,de,5,1,"fieldset",8),za(2,"div",9)(3,"label",10),n_(4,"Auth type "),za(5,"span",11),n_(6,"*"),Sf()(),za(7,"select",12),mT(8,ue,2,2,"option",13,gT),Sf(),iS(),Sf(),za(10,"div",9)(11,"label",14),n_(12,"Name "),za(13,"span",11),n_(14,"*"),Sf()(),lc(15,"input",15),iS(),Sf(),za(16,"div",9)(17,"label",16),n_(18,"Description"),Sf(),lc(19,"input",17),iS(),Sf(),fT(20,fe,8,1,"fieldset",18),za(21,"div",19)(22,"button",20),n_(23),Sf(),za(24,"button",21),dc("click",function(){sg(e);let l=MT();return ag(l.cancel())}),n_(25,"Cancel"),Sf()()();}if(i&2){let e=MT();tv("formGroup",e.form),yb(),hT(e.isPlatformMode?-1:1),yb(6),tv("formControl",e.authTypeControl),aS(),yb(),yT(e.authTypeOptions),yb(7),tv("formControl",e.nameControl),aS(),yb(4),tv("formControl",e.descriptionControl),aS(),yb(),hT(e.credentialFields().length>0?20:-1),yb(2),tv("disabled",e.form.invalid||e.isSubmitting()),yb(),xf(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=p($t);router=p(It);destroyRef=p(Me);state=p(R);namespaceRole=p(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?se$1(true):F(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new vt("",{nonNullable:true,validators:[ve.required,ve.minLength(1)]});descriptionControl=new vt(null);authTypeControl=new vt("ApiKeyAuthSetting",{nonNullable:true,validators:[ve.required]});scopeControl=new vt("namespace",{nonNullable:true});form=new $({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new vt("",{nonNullable:true});usernameControl=new vt("",{nonNullable:true});passwordControl=new vt("",{nonNullable:true});tokenControl=new vt("",{nonNullable:true});discoveryUrlControl=new vt("",{nonNullable:true});authorizationUrlControl=new vt("",{nonNullable:true});tokenUrlControl=new vt("",{nonNullable:true});clientIdControl=new vt("",{nonNullable:true});clientSecretControl=new vt("",{nonNullable:true});scopesControl=new vt("",{nonNullable:true});resourceUrlControl=new vt("",{nonNullable:true});selectedAuthType=F(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=Mi(()=>Se[this.selectedAuthType()]);isEditMode=se$1(false);isSubmitting=se$1(false);isLoading=se$1(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Tg(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return x(w({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Ef({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],template:function(e,o){e&1&&(za(0,"div",0)(1,"header",1)(2,"button",2),dc("click",function(){return o.cancel()}),za(3,"span",3),n_(4,"\u2190"),Sf(),n_(5," Auth Settings "),Sf(),za(6,"h1",4),n_(7),Sf()(),fT(8,se,2,0,"p",5)(9,ye,26,8,"form",6),Sf()),e&2&&(yb(7),Iv(o.isEditMode()?"Edit auth setting":"New auth setting"),yb(),hT(o.isLoading()?8:9));},dependencies:[Kn,zn,Zn,Xn,Ye,bt,fn,Ln,Wn,pn,Vn],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
|
|
2
2
|
export{le as AuthSettingFormComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,O,h as vi,x as xi,P,M}from'./chunk-Btu4vlJn.js';import {p,g as It,H as Me,ap as N,aj as k,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,as as Ms,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,o as sg,q as ag,x as xf,u as uc}from'./main-ITBV6BE5.js';var z=(o,t)=>t.key;function j(o,t){if(o&1&&(za(0,"p",3),n_(1),Sf()),o&2){let e=MT();yb(),Iv(e.deletion.error());}}function B(o,t){o&1&&(za(0,"p",4),n_(1,"Loading AI models\u2026"),Sf());}function K(o,t){o&1&&(za(0,"p",5),n_(1,"No platform AI models defined yet."),Sf());}function H(o,t){o&1&&(za(0,"p",4),n_(1,"No AI models match the current filter."),Sf());}function U(o,t){if(o&1){let e=CT();za(0,"button",21),dc("click",function(){sg(e);let a=MT().$implicit,c=MT(2);return ag(c.edit(a))}),n_(1,"Edit"),Sf();}if(o&2){let e=MT().$implicit;uc("aria-label","Edit "+e.title);}}function G(o,t){if(o&1){let e=CT();za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14),n_(6),Sf(),za(7,"td",15),n_(8),Sf(),za(9,"td",16),n_(10),Sf(),za(11,"td",17)(12,"div",18),fT(13,U,2,1,"button",19),za(14,"agentos-row-delete-action",20),dc("deleteRequested",function(){let a=sg(e).$implicit,c=MT(2);return ag(c.deletion.request(a.key))})("deleteConfirmed",function(){let a=sg(e).$implicit,c=MT(2);return ag(c.confirmDelete(a))})("deleteCancelled",function(){sg(e);let a=MT(2);return ag(a.deletion.cancel())}),Sf()()()();}if(o&2){let e=t.$implicit,l=MT(2);yb(2),Iv(e.title),yb(2),Iv(e.providerName),yb(2),xf(" ",e.model.apiModelName," "),yb(2),Iv(e.model.priority),yb(2),xf(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),yb(3),hT(l.deletion.confirmingId()!==e.key?13:-1),yb(),tv("rowKey",e.key)("rowLabel",e.title)("state",l.deletion);}}function J(o,t){if(o&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Provider"),Sf(),za(8,"th",10),n_(9,"API model name"),Sf(),za(10,"th",10),n_(11,"Priority"),Sf(),za(12,"th",10),n_(13,"Reasoning effort"),Sf(),za(14,"th",10)(15,"span",11),n_(16,"Actions"),Sf()()()(),za(17,"tbody",8),mT(18,G,15,9,"tr",9,z),Sf()()()),o&2){let e=MT();yb(18),yT(e.rowFilter.filteredRows());}}var V=class o{router=p(It);destroyRef=p(Me);aiModelController=p(N);aiProviderController=p(k);refresh$=new De(void 0);isLoading=se(true);deletion=i();rows=se([]);rowFilter=O(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),Ms([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))),U$1(this.destroyRef)).subscribe({next:([t,e])=>{let l=new Map(e.map(a=>[a.id??"",a.name]));this.rows.set(t.map((a,c)=>({key:a.id??`model:${c}`,model:a,title:a.alias??a.apiModelName,providerName:l.get(a.aiProviderId)??a.aiProviderId}))),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}edit(t){t.model.id&&this.router.navigate(["/agentos","admin","ai-models",t.model.id,"edit"]);}confirmDelete(t){t.model.id&&this.deletion.execute(t.key,{request$:this.aiModelController.deleteAiModel(t.model.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.title}" failed. Try again.`});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Ef({type:o,selectors:[["agentos-platform-ai-models"]],decls:9,vars:3,consts:[["title","Platform AI models","description","AI models shared across every namespace."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Priority"],["role","cell","data-label","Reasoning effort"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,l){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return l.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return l.openCreateForm()}),n_(3,"New AI model"),Sf()(),fT(4,j,2,1,"p",3),fT(5,B,2,0,"p",4)(6,K,2,0,"p",5)(7,H,2,0,"p",4)(8,J,20,0,"div",6)),e&2&&(yb(),tv("query",l.rowFilter.query()),yb(3),hT(l.deletion.error()?4:-1),yb(),hT(l.isLoading()?5:l.rows().length===0?6:l.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{V as PlatformAiModelsComponent};
|
|
1
|
+
import {i,O,h as vi,x as xi,P,M}from'./chunk-UMiCRMsh.js';import {p,g as It,H as Me,ap as N,aj as k,a7 as De,s as se,a8 as Ae,U as U$1,a as Ef,as as Ms,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,o as sg,q as ag,x as xf,u as uc}from'./main-BNXY3UWS.js';var z=(o,t)=>t.key;function j(o,t){if(o&1&&(za(0,"p",3),n_(1),Sf()),o&2){let e=MT();yb(),Iv(e.deletion.error());}}function B(o,t){o&1&&(za(0,"p",4),n_(1,"Loading AI models\u2026"),Sf());}function K(o,t){o&1&&(za(0,"p",5),n_(1,"No platform AI models defined yet."),Sf());}function H(o,t){o&1&&(za(0,"p",4),n_(1,"No AI models match the current filter."),Sf());}function U(o,t){if(o&1){let e=CT();za(0,"button",21),dc("click",function(){sg(e);let a=MT().$implicit,c=MT(2);return ag(c.edit(a))}),n_(1,"Edit"),Sf();}if(o&2){let e=MT().$implicit;uc("aria-label","Edit "+e.title);}}function G(o,t){if(o&1){let e=CT();za(0,"tr",9)(1,"td",12),n_(2),Sf(),za(3,"td",13),n_(4),Sf(),za(5,"td",14),n_(6),Sf(),za(7,"td",15),n_(8),Sf(),za(9,"td",16),n_(10),Sf(),za(11,"td",17)(12,"div",18),fT(13,U,2,1,"button",19),za(14,"agentos-row-delete-action",20),dc("deleteRequested",function(){let a=sg(e).$implicit,c=MT(2);return ag(c.deletion.request(a.key))})("deleteConfirmed",function(){let a=sg(e).$implicit,c=MT(2);return ag(c.confirmDelete(a))})("deleteCancelled",function(){sg(e);let a=MT(2);return ag(a.deletion.cancel())}),Sf()()()();}if(o&2){let e=t.$implicit,l=MT(2);yb(2),Iv(e.title),yb(2),Iv(e.providerName),yb(2),xf(" ",e.model.apiModelName," "),yb(2),Iv(e.model.priority),yb(2),xf(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),yb(3),hT(l.deletion.confirmingId()!==e.key?13:-1),yb(),tv("rowKey",e.key)("rowLabel",e.title)("state",l.deletion);}}function J(o,t){if(o&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Provider"),Sf(),za(8,"th",10),n_(9,"API model name"),Sf(),za(10,"th",10),n_(11,"Priority"),Sf(),za(12,"th",10),n_(13,"Reasoning effort"),Sf(),za(14,"th",10)(15,"span",11),n_(16,"Actions"),Sf()()()(),za(17,"tbody",8),mT(18,G,15,9,"tr",9,z),Sf()()()),o&2){let e=MT();yb(18),yT(e.rowFilter.filteredRows());}}var V=class o{router=p(It);destroyRef=p(Me);aiModelController=p(N);aiProviderController=p(k);refresh$=new De(void 0);isLoading=se(true);deletion=i();rows=se([]);rowFilter=O(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ae(()=>(this.isLoading.set(true),Ms([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))),U$1(this.destroyRef)).subscribe({next:([t,e])=>{let l=new Map(e.map(a=>[a.id??"",a.name]));this.rows.set(t.map((a,c)=>({key:a.id??`model:${c}`,model:a,title:a.alias??a.apiModelName,providerName:l.get(a.aiProviderId)??a.aiProviderId}))),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}edit(t){t.model.id&&this.router.navigate(["/agentos","admin","ai-models",t.model.id,"edit"]);}confirmDelete(t){t.model.id&&this.deletion.execute(t.key,{request$:this.aiModelController.deleteAiModel(t.model.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.title}" failed. Try again.`});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Ef({type:o,selectors:[["agentos-platform-ai-models"]],decls:9,vars:3,consts:[["title","Platform AI models","description","AI models shared across every namespace."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["type","button",1,"settings-table__new",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Priority"],["role","cell","data-label","Reasoning effort"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,l){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return l.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return l.openCreateForm()}),n_(3,"New AI model"),Sf()(),fT(4,j,2,1,"p",3),fT(5,B,2,0,"p",4)(6,K,2,0,"p",5)(7,H,2,0,"p",4)(8,J,20,0,"div",6)),e&2&&(yb(),tv("query",l.rowFilter.query()),yb(3),hT(l.deletion.error()?4:-1),yb(),hT(l.isLoading()?5:l.rows().length===0?6:l.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,P,M],styles:['.settings-table__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600;white-space:nowrap}.settings-table__new[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.settings-table__toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 1rem}.settings-table__toolbar[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{margin:0;flex:0 1 240px;min-width:80px}.settings-table__toolbar[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:auto}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:0 1 240px;min-width:80px}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{margin-left:0;white-space:nowrap}.settings-table__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.settings-table__error[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:.875rem;color:var(--color-error)}.settings-table__wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.settings-table__name[_ngcontent-%COMP%]{font-weight:500}.settings-table__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.settings-table__stacked[_ngcontent-%COMP%]{display:block}.settings-table__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.settings-table__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.settings-table__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.settings-table__actions[_ngcontent-%COMP%] .settings-table__delete[_ngcontent-%COMP%]{color:var(--color-error)}@media(max-width:760px){.settings-table__toolbar[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.settings-table__toolbar-actions[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;width:100%;margin-left:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] agentos-table-filter[_ngcontent-%COMP%]{flex:none;width:100%;min-width:0}.settings-table__toolbar-actions[_ngcontent-%COMP%] .settings-table__new[_ngcontent-%COMP%]{width:100%;min-height:44px}}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}.settings-table__confirm-label[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}']})};export{V as PlatformAiModelsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i,O,h as vi,x as xi,C as Ci,P,M}from'./chunk-Btu4vlJn.js';import {c}from'./chunk-LDlaL5qr.js';import {p,$ as $t,g as It,H as Me,s as se,ae as pw,af as Wn,U as U$1,K as x,J as w,ab as Ee,ag as Se,a as Ef,a3 as _,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,o as sg,q as ag}from'./main-ITBV6BE5.js';var U=(n,t)=>t.key;function B(n,t){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let e=MT();yb(),Iv(e.deletion.error());}}function W(n,t){n&1&&(za(0,"p",4),n_(1,"Loading scheduled prompts\u2026"),Sf());}function H(n,t){n&1&&(za(0,"p",5),n_(1,"No scheduled prompts available."),Sf());}function J(n,t){n&1&&(za(0,"p",4),n_(1,"No scheduled prompts match the current filter."),Sf());}function Y(n,t){if(n&1&&(za(0,"span",14),n_(1),Sf()),n&2){let e=MT().$implicit;yb(),Iv(e.prompt.description);}}function G(n,t){n&1&&(za(0,"ds-tag",20),n_(1,"Read-only"),Sf());}function Q(n,t){if(n&1){let e=CT();za(0,"button",24),dc("click",function(){sg(e);let l=MT(2).$implicit,c=MT(2);return ag(c.toggle(l))}),n_(1),Sf(),za(2,"button",24),dc("click",function(){sg(e);let l=MT(2).$implicit,c=MT(2);return ag(c.edit(l))}),n_(3,"Edit"),Sf();}if(n&2){let e=MT(2).$implicit;yb(),Iv(e.prompt.enabled?"Disable":"Enable");}}function X(n,t){if(n&1){let e=CT();fT(0,Q,4,1),za(1,"agentos-row-delete-action",23),dc("deleteRequested",function(){sg(e);let l=MT().$implicit,c=MT(2);return ag(c.deletion.request(l.key))})("deleteConfirmed",function(){sg(e);let l=MT().$implicit,c=MT(2);return ag(c.confirmDelete(l))})("deleteCancelled",function(){sg(e);let l=MT(3);return ag(l.deletion.cancel())}),Sf();}if(n&2){let e=MT().$implicit,o=MT(2);hT(o.deletion.confirmingId()!==e.key?0:-1),yb(),tv("rowKey",e.key)("rowLabel",e.prompt.name)("state",o.deletion);}}function Z(n,t){n&1&&(za(0,"button",22),n_(1,"Inherited"),Sf());}function ee(n,t){if(n&1&&(za(0,"tr",9)(1,"td",12)(2,"span",13),n_(3),Sf(),fT(4,Y,2,1,"span",14),Sf(),za(5,"td",15),n_(6),Sf(),za(7,"td",16)(8,"ds-tag",17),n_(9),Sf()(),za(10,"td",18)(11,"div",19)(12,"ds-tag",17),n_(13),Sf(),fT(14,G,2,0,"ds-tag",20),Sf()(),za(15,"td",21),fT(16,X,2,4)(17,Z,2,0,"button",22),Sf()()),n&2){let e=t.$implicit,o=MT(2);yb(3),Iv(e.prompt.name),yb(),hT(e.prompt.description?4:-1),yb(2),Iv(o.scheduleLabel(e.prompt)),yb(2),tv("variant",e.prompt.enabled?"accent":"outline"),yb(),Iv(e.prompt.enabled?"Enabled":"Disabled"),yb(3),tv("variant",e.scope==="platform"?"neutral":"accent"),yb(),Iv(e.scope==="platform"?"Platform":"Namespace"),yb(),hT(e.scope==="platform"?14:-1),yb(2),hT(e.scope==="namespace"?16:17);}}function te(n,t){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Schedule"),Sf(),za(8,"th",10),n_(9,"Status"),Sf(),za(10,"th",10),n_(11,"Scope"),Sf(),za(12,"th",10)(13,"span",11),n_(14,"Actions"),Sf()()()(),za(15,"tbody",8),mT(16,ee,18,9,"tr",9,U),Sf()()()),n&2){let e=MT();yb(16),yT(e.rowFilter.filteredRows());}}var K=class n{route=p($t);router=p(It);destroyRef=p(Me);state=p(c);namespaceId=this.route.snapshot.params.namespaceId;rows=se([]);isLoading=se(true);deletion=i();rowFilter=O(this.rows,t=>[t.prompt.name,t.prompt.description,this.scheduleLabel(t.prompt),t.prompt.enabled?"Enabled":"Disabled",t.scope].filter(Boolean).join(" "));constructor(){pw({platform:this.state.listPlatform().pipe(Wn(()=>_([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({platform:t,namespace:e})=>{this.rows.set([...t.map((o,l)=>({key:`platform:${o.id??l}`,prompt:o,scope:"platform"})),...e.map((o,l)=>({key:`namespace:${o.id??l}`,prompt:o,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"]);}edit(t){t.scope==="platform"||!t.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts",t.prompt.id,"edit"]);}toggle(t){if(t.scope==="platform")return;(t.prompt.enabled?this.state.disable(t.prompt.id??""):this.state.enable(t.prompt.id??"")).pipe(U$1(this.destroyRef)).subscribe(o=>this.rows.update(l=>l.map(c=>c.key===t.key?x(w({},c),{prompt:o}):c)));}confirmDelete(t){t.scope==="platform"||!t.prompt.id||this.deletion.execute(t.key,{request$:this.state.delete(t.prompt.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.rows.update(e=>e.filter(o=>o.key!==t.key)),errorMessage:`Deleting "${t.prompt.name}" failed. Try again.`});}scheduleLabel(t){let e=t.recurrence,o=e.unit===Ee.WEEK?"week":"month",l=e.unit===Ee.WEEK&&e.days?.length?` (${e.days.map(c=>Se[c]??c).join(", ")})`:"";return `Every ${o}${l} at ${e.timeUtc} UTC`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-scheduled-prompt-list"]],decls:9,vars:3,consts:[["title","Scheduled prompts","description","Scheduled prompts for this namespace, including schedules inherited from the platform."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\u2026",3,"queryChange","query"],["type","button",1,"scheduled-prompts__new",3,"click"],["role","alert",1,"scheduled-prompts__error"],["role","status",1,"scheduled-prompts__status"],[1,"scheduled-prompts__status"],[1,"scheduled-prompts__table-wrap"],["dsTable","","role","table","aria-label","Scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"scheduled-prompts__name"],[1,"scheduled-prompts__description"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Scope"],[1,"scheduled-prompts__tags"],["variant","outline"],["role","cell","data-label","Actions","data-actions","",1,"scheduled-prompts__actions"],["type","button","disabled",""],["deleteClass","scheduled-prompts__delete",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,o){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return o.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return o.openCreateForm()}),n_(3," New scheduled prompt "),Sf()(),fT(4,B,2,1,"p",3),fT(5,W,2,0,"p",4)(6,H,2,0,"p",5)(7,J,2,0,"p",4)(8,te,18,0,"div",6)),e&2&&(yb(),tv("query",o.rowFilter.query()),yb(3),hT(o.deletion.error()?4:-1),yb(),hT(o.isLoading()?5:o.rows().length===0?6:o.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.scheduled-prompts__new[_ngcontent-%COMP%]{white-space:nowrap;padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.scheduled-prompts__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.scheduled-prompts__error[_ngcontent-%COMP%]{margin:0 0 .75rem;color:var(--color-error)}.scheduled-prompts__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.scheduled-prompts__name[_ngcontent-%COMP%]{display:block;font-weight:500}.scheduled-prompts__description[_ngcontent-%COMP%]{display:block;color:var(--color-text-secondary);font-size:12px}.scheduled-prompts__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.scheduled-prompts__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.scheduled-prompts__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.scheduled-prompts__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.scheduled-prompts__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.scheduled-prompts__actions[_ngcontent-%COMP%] .scheduled-prompts__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}']})};export{K as ScheduledPromptListComponent};
|
|
1
|
+
import {i,O,h as vi,x as xi,C as Ci,P,M}from'./chunk-UMiCRMsh.js';import {c}from'./chunk-COXl1FiZ.js';import {p,$ as $t,g as It,H as Me,s as se,ae as pw,af as Wn,U as U$1,K as x,J as w,ab as Ee,ag as Se,a as Ef,a3 as _,z as za,L as dc,S as Sf,n as n_,f as fT,y as yb,O as tv,h as hT,k as MT,I as Iv,m as mT,d as yT,C as CT,o as sg,q as ag}from'./main-BNXY3UWS.js';var U=(n,t)=>t.key;function B(n,t){if(n&1&&(za(0,"p",3),n_(1),Sf()),n&2){let e=MT();yb(),Iv(e.deletion.error());}}function W(n,t){n&1&&(za(0,"p",4),n_(1,"Loading scheduled prompts\u2026"),Sf());}function H(n,t){n&1&&(za(0,"p",5),n_(1,"No scheduled prompts available."),Sf());}function J(n,t){n&1&&(za(0,"p",4),n_(1,"No scheduled prompts match the current filter."),Sf());}function Y(n,t){if(n&1&&(za(0,"span",14),n_(1),Sf()),n&2){let e=MT().$implicit;yb(),Iv(e.prompt.description);}}function G(n,t){n&1&&(za(0,"ds-tag",20),n_(1,"Read-only"),Sf());}function Q(n,t){if(n&1){let e=CT();za(0,"button",24),dc("click",function(){sg(e);let l=MT(2).$implicit,c=MT(2);return ag(c.toggle(l))}),n_(1),Sf(),za(2,"button",24),dc("click",function(){sg(e);let l=MT(2).$implicit,c=MT(2);return ag(c.edit(l))}),n_(3,"Edit"),Sf();}if(n&2){let e=MT(2).$implicit;yb(),Iv(e.prompt.enabled?"Disable":"Enable");}}function X(n,t){if(n&1){let e=CT();fT(0,Q,4,1),za(1,"agentos-row-delete-action",23),dc("deleteRequested",function(){sg(e);let l=MT().$implicit,c=MT(2);return ag(c.deletion.request(l.key))})("deleteConfirmed",function(){sg(e);let l=MT().$implicit,c=MT(2);return ag(c.confirmDelete(l))})("deleteCancelled",function(){sg(e);let l=MT(3);return ag(l.deletion.cancel())}),Sf();}if(n&2){let e=MT().$implicit,o=MT(2);hT(o.deletion.confirmingId()!==e.key?0:-1),yb(),tv("rowKey",e.key)("rowLabel",e.prompt.name)("state",o.deletion);}}function Z(n,t){n&1&&(za(0,"button",22),n_(1,"Inherited"),Sf());}function ee(n,t){if(n&1&&(za(0,"tr",9)(1,"td",12)(2,"span",13),n_(3),Sf(),fT(4,Y,2,1,"span",14),Sf(),za(5,"td",15),n_(6),Sf(),za(7,"td",16)(8,"ds-tag",17),n_(9),Sf()(),za(10,"td",18)(11,"div",19)(12,"ds-tag",17),n_(13),Sf(),fT(14,G,2,0,"ds-tag",20),Sf()(),za(15,"td",21),fT(16,X,2,4)(17,Z,2,0,"button",22),Sf()()),n&2){let e=t.$implicit,o=MT(2);yb(3),Iv(e.prompt.name),yb(),hT(e.prompt.description?4:-1),yb(2),Iv(o.scheduleLabel(e.prompt)),yb(2),tv("variant",e.prompt.enabled?"accent":"outline"),yb(),Iv(e.prompt.enabled?"Enabled":"Disabled"),yb(3),tv("variant",e.scope==="platform"?"neutral":"accent"),yb(),Iv(e.scope==="platform"?"Platform":"Namespace"),yb(),hT(e.scope==="platform"?14:-1),yb(2),hT(e.scope==="namespace"?16:17);}}function te(n,t){if(n&1&&(za(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),n_(5,"Name"),Sf(),za(6,"th",10),n_(7,"Schedule"),Sf(),za(8,"th",10),n_(9,"Status"),Sf(),za(10,"th",10),n_(11,"Scope"),Sf(),za(12,"th",10)(13,"span",11),n_(14,"Actions"),Sf()()()(),za(15,"tbody",8),mT(16,ee,18,9,"tr",9,U),Sf()()()),n&2){let e=MT();yb(16),yT(e.rowFilter.filteredRows());}}var K=class n{route=p($t);router=p(It);destroyRef=p(Me);state=p(c);namespaceId=this.route.snapshot.params.namespaceId;rows=se([]);isLoading=se(true);deletion=i();rowFilter=O(this.rows,t=>[t.prompt.name,t.prompt.description,this.scheduleLabel(t.prompt),t.prompt.enabled?"Enabled":"Disabled",t.scope].filter(Boolean).join(" "));constructor(){pw({platform:this.state.listPlatform().pipe(Wn(()=>_([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({platform:t,namespace:e})=>{this.rows.set([...t.map((o,l)=>({key:`platform:${o.id??l}`,prompt:o,scope:"platform"})),...e.map((o,l)=>({key:`namespace:${o.id??l}`,prompt:o,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"]);}edit(t){t.scope==="platform"||!t.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts",t.prompt.id,"edit"]);}toggle(t){if(t.scope==="platform")return;(t.prompt.enabled?this.state.disable(t.prompt.id??""):this.state.enable(t.prompt.id??"")).pipe(U$1(this.destroyRef)).subscribe(o=>this.rows.update(l=>l.map(c=>c.key===t.key?x(w({},c),{prompt:o}):c)));}confirmDelete(t){t.scope==="platform"||!t.prompt.id||this.deletion.execute(t.key,{request$:this.state.delete(t.prompt.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.rows.update(e=>e.filter(o=>o.key!==t.key)),errorMessage:`Deleting "${t.prompt.name}" failed. Try again.`});}scheduleLabel(t){let e=t.recurrence,o=e.unit===Ee.WEEK?"week":"month",l=e.unit===Ee.WEEK&&e.days?.length?` (${e.days.map(c=>Se[c]??c).join(", ")})`:"";return `Every ${o}${l} at ${e.timeUtc} UTC`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Ef({type:n,selectors:[["agentos-scheduled-prompt-list"]],decls:9,vars:3,consts:[["title","Scheduled prompts","description","Scheduled prompts for this namespace, including schedules inherited from the platform."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\u2026",3,"queryChange","query"],["type","button",1,"scheduled-prompts__new",3,"click"],["role","alert",1,"scheduled-prompts__error"],["role","status",1,"scheduled-prompts__status"],[1,"scheduled-prompts__status"],[1,"scheduled-prompts__table-wrap"],["dsTable","","role","table","aria-label","Scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"scheduled-prompts__name"],[1,"scheduled-prompts__description"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Scope"],[1,"scheduled-prompts__tags"],["variant","outline"],["role","cell","data-label","Actions","data-actions","",1,"scheduled-prompts__actions"],["type","button","disabled",""],["deleteClass","scheduled-prompts__delete",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,o){e&1&&(za(0,"ds-section-header",0)(1,"agentos-table-filter",1),dc("queryChange",function(c){return o.rowFilter.query.set(c)}),Sf(),za(2,"button",2),dc("click",function(){return o.openCreateForm()}),n_(3," New scheduled prompt "),Sf()(),fT(4,B,2,1,"p",3),fT(5,W,2,0,"p",4)(6,H,2,0,"p",5)(7,J,2,0,"p",4)(8,te,18,0,"div",6)),e&2&&(yb(),tv("query",o.rowFilter.query()),yb(3),hT(o.deletion.error()?4:-1),yb(),hT(o.isLoading()?5:o.rows().length===0?6:o.rowFilter.filteredRows().length===0?7:8));},dependencies:[vi,xi,Ci,P,M],styles:['.scheduled-prompts__new[_ngcontent-%COMP%]{white-space:nowrap;padding:7px 12px;border:1px solid var(--color-accent);border-radius:var(--radius-pill, 0);background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.scheduled-prompts__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.scheduled-prompts__error[_ngcontent-%COMP%]{margin:0 0 .75rem;color:var(--color-error)}.scheduled-prompts__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.scheduled-prompts__name[_ngcontent-%COMP%]{display:block;font-weight:500}.scheduled-prompts__description[_ngcontent-%COMP%]{display:block;color:var(--color-text-secondary);font-size:12px}.scheduled-prompts__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.scheduled-prompts__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.scheduled-prompts__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.scheduled-prompts__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.scheduled-prompts__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.scheduled-prompts__actions[_ngcontent-%COMP%] .scheduled-prompts__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){table.ds-table[_ngcontent-%COMP%]{position:relative;display:block;width:100%}table.ds-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding-top:12px}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{display:flex;flex-direction:column;padding:12px;background:var(--color-surface);border:1px solid var(--color-divider)}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(88px,30%) minmax(0,1fr);align-items:baseline;gap:4px 12px;padding:5px 0;border-bottom:0;overflow-wrap:anywhere;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-label][_ngcontent-%COMP%]:before{content:attr(data-label);content:attr(data-label) / "";color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]{display:block;margin-bottom:4px;padding:0 0 6px;border-bottom:0;font-size:15px}table.ds-table[_ngcontent-%COMP%] td[data-title][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding:10px 0 0;border-top:1px solid var(--color-divider);text-align:right}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%]:before{display:none}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] .settings-table__actions[_ngcontent-%COMP%]{flex-wrap:wrap;width:100%;white-space:normal}table.ds-table[_ngcontent-%COMP%] td[data-actions][_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:44px;padding:0 12px}}']})};export{K as ScheduledPromptListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i}from'./chunk-
|
|
1
|
+
import {i}from'./chunk-cKHTB9X6.js';import {l}from'./chunk-UMiCRMsh.js';import {p,aF as z,a7 as De,as as Ms,a8 as Ae,aE as gw,aA as j,a3 as _,K as x,J as w,Y as Le,Z as R$1,af as Wn}from'./main-BNXY3UWS.js';var q=["ApiKeyAuthSetting","BasicAuthAuthSetting","BearerTokenAuthSetting","OAuthDiscoverableAuthSetting","OAuthMcpDiscoverableAuthSetting","OAuthCustomAuthSetting","OAuthRegisteredAuthSetting"],J={ApiKeyAuthSetting:"API Key",BasicAuthAuthSetting:"Basic Auth (username / password)",BearerTokenAuthSetting:"Bearer Token",OAuthDiscoverableAuthSetting:"OAuth \u2014 Discovery URL",OAuthMcpDiscoverableAuthSetting:"OAuth \u2014 MCP Discoverable",OAuthCustomAuthSetting:"OAuth \u2014 Custom endpoints",OAuthRegisteredAuthSetting:"OAuth \u2014 Registered app"},E="none",C="me",I={ApiKeyAuthSetting:"API_KEY",BasicAuthAuthSetting:"BASIC_AUTH",BearerTokenAuthSetting:"BEARER_TOKEN",OAuthDiscoverableAuthSetting:"OAUTH_DISCOVERABLE",OAuthMcpDiscoverableAuthSetting:"OAUTH_MCP_DISCOVERABLE",OAuthCustomAuthSetting:"OAUTH_CUSTOM",OAuthRegisteredAuthSetting:"OAUTH_REGISTERED"},U={API_KEY:"ApiKeyAuthSetting",BASIC_AUTH:"BasicAuthAuthSetting",BEARER_TOKEN:"BearerTokenAuthSetting",OAUTH_DISCOVERABLE:"OAuthDiscoverableAuthSetting",OAUTH_MCP_DISCOVERABLE:"OAuthMcpDiscoverableAuthSetting",OAUTH_CUSTOM:"OAuthCustomAuthSetting",OAUTH_REGISTERED:"OAuthRegisteredAuthSetting"};function v(n){let t=I[n.authType];return t?x(w({},n),{authType:t}):n}function d(n){return B(n)}function O(n){return n.map(B)}function B(n){let t=n;if(typeof t.authType=="string"){let e=U[t.authType];if(e)return x(w({},t),{authType:e})}return n}var R=class n{controller=p(z);userState=p(l);refresh$=new De(void 0);namespaceId$=new De(null);vm$=Ms([this.namespaceId$,this.refresh$]).pipe(Ae(([t])=>{let e=this.loadPlatformSettings().pipe(Wn(()=>_([])));return t?Ms([e,this.loadNamespaceSettings(t).pipe(Wn(()=>_([]))),this.loadUserSettings(t).pipe(Wn(()=>_([]))),this.loadUserSettings("global").pipe(Wn(()=>_([])))]).pipe(j(([i,s,u,p])=>({platform:i,namespace:s,userOnNs:u,userGlobal:p}))):Ms([e,this.loadNamespaceSettings("").pipe(Wn(()=>_([]))),this.loadUserSettings("global").pipe(Wn(()=>_([])))]).pipe(j(([i,s,u])=>({platform:i,namespace:s,userOnNs:[],userGlobal:u})))}),gw({bufferSize:1,refCount:true}));setNamespace(t){this.namespaceId$.value!==t&&this.namespaceId$.next(t);}refresh(){this.refresh$.next();}loadUserSettings(t){let e=t==="global"?E:t;return this.controller.listAuthSetting(e,C).pipe(j(i=>O(i)))}userGlobal$=i(this.refresh$,()=>this.loadUserSettings("global"),[]);loadPlatformSettings(){return this.controller.listAuthSetting(E).pipe(j(t=>O(t)))}loadNamespaceSettings(t){return t?this.controller.listAuthSetting(t).pipe(j(e=>O(e))):_([])}getById(t,e){return this.controller.getByIdAuthSetting(t).pipe(j(i=>d(i)))}create(t,e,i){let u=this.userState.currentUser()?.id;if((e==="userOnNs"||e==="userGlobal")&&!u)throw new Error(`Cannot create ${e} auth setting before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(e==="namespace"&&(i===void 0||i===""))throw new Error("Cannot create namespace-scoped auth setting without a namespaceId");if(e==="userOnNs"&&!i)throw new Error("Cannot create userOnNs auth setting without a namespaceId");let p=v(x(w({},t),{namespaceId:e==="namespace"||e==="userOnNs"?i??void 0:void 0,userId:e==="userOnNs"||e==="userGlobal"?u:void 0}));return this.controller.createAuthSetting(p).pipe(j(_=>d(_)),Le(()=>this.refresh()))}update(t,e,i){let s=v(x(w({},e),{namespaceId:i.namespaceId,userId:i.userId,authType:i.authType}));return this.controller.updateAuthSetting(t,s).pipe(j(u=>d(u)),Le(()=>this.refresh()))}delete(t,e){return this.controller.deleteAuthSetting(t).pipe(Le(()=>this.refresh()))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=R$1({token:n,factory:n.\u0275fac,providedIn:"root"})};export{J,R,q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {$,v as vt,a as ve$1,K as Kn,z as zn,Z as Zn,X as Xn,Y as Ye,d as dn,F as Ft,c as bt,L as Ln,W as Wn$1,q as qt,t as Lt,b as pn,V as Vn,y as yn}from'./chunk-Btu4vlJn.js';import {p,$ as $t,g as It,H as Me,ap as N,aj as k,a2 as F,af as Wn,aq as Re,M as Mi,s as se$1,j as Tg,U,K as x,J as w,a as Ef,a3 as _,z as za,L as dc,n as n_,S as Sf,f as fT,y as yb,I as Iv,h as hT,C as CT,l as lc,N as iS,m as mT,a5 as gT,k as MT,O as tv,Q as aS,d as yT,x as xf,a4 as lT,ar as Cv,o as sg,q as ag}from'./main-ITBV6BE5.js';function ce(l,t){l&1&&(za(0,"p",5),n_(1,"Loading\u2026"),Sf());}function se(l,t){if(l&1&&lc(0,"input",11),l&2){let e=MT(2);tv("value",e.selectedProviderLabel());}}function pe(l,t){if(l&1&&(za(0,"option",52),n_(1),Sf()),l&2){let e=t.$implicit;tv("value",e.id),yb(),Cv("",e.name," (",e.apiType,")");}}function ue(l,t){if(l&1&&(za(0,"select",12)(1,"option",51),n_(2,"Select provider"),Sf(),mT(3,pe,2,3,"option",52,lT().trackByProvider,true),Sf(),iS()),l&2){let e=MT(2);tv("formControl",e.aiProviderIdControl),aS(),yb(3),yT(e.providers());}}function fe(l,t){if(l&1&&(za(0,"option",30),n_(1),Sf()),l&2){let e=t.$implicit;tv("ngValue",e),yb(),Iv(e.toLowerCase());}}function _e(l,t){l&1&&(za(0,"span",31),n_(1,"Not supported yet for Anthropic and Gemini providers."),Sf());}function ge(l,t){l&1&&(za(0,"span",31),n_(1," Sent as is to OpenAI-compatible providers, which reject levels the model does not support. Through Requesty, Claude models do not apply it faithfully. "),Sf());}function ve(l,t){l&1&&(za(0,"span",32),n_(1," OpenAI reasoning models (GPT-5.1 and later) reject a temperature other than 1 with an effort: leave Temperature empty or set it to 1. "),Sf());}function Ce(l,t){if(l&1){let e=CT();za(0,"form",7),dc("ngSubmit",function(){sg(e);let u=MT();return ag(u.submit())}),za(1,"div",8)(2,"label",9),n_(3," Provider "),za(4,"span",10),n_(5,"*"),Sf()(),fT(6,se,1,1,"input",11)(7,ue,5,1,"select",12),Sf(),za(8,"div",8)(9,"label",13),n_(10," API name "),za(11,"span",10),n_(12,"*"),Sf()(),lc(13,"input",14),iS(),Sf(),za(14,"div",8)(15,"label",15),n_(16,"Description"),Sf(),lc(17,"input",16),iS(),Sf(),za(18,"div",8)(19,"label",17),n_(20,"Alias"),Sf(),lc(21,"input",18),iS(),Sf(),za(22,"div",8)(23,"label",19),n_(24,"Priority"),Sf(),lc(25,"input",20),iS(),Sf(),za(26,"div",21)(27,"div",8)(28,"label",22),n_(29,"Temperature"),Sf(),lc(30,"input",23),iS(),Sf(),za(31,"div",8)(32,"label",24),n_(33,"Context window"),Sf(),lc(34,"input",25),iS(),Sf()(),za(35,"div",8)(36,"label",26),n_(37,"Max completion tokens"),Sf(),lc(38,"input",27),iS(),Sf(),za(39,"div",8)(40,"label",28),n_(41,"Reasoning effort"),Sf(),za(42,"select",29)(43,"option",30),n_(44,"Provider default"),Sf(),mT(45,fe,2,2,"option",30,gT),Sf(),iS(),fT(47,_e,2,0,"span",31)(48,ge,2,0,"span",31),fT(49,ve,2,0,"span",32),Sf(),za(50,"div",8)(51,"label",33),lc(52,"input",34),iS(),za(53,"span",35),n_(54,"Supports advanced execution"),Sf()(),za(55,"p",36),n_(56," Agents configured in ADVANCED execution mode fail to run on a model that does not support it. SIMPLE agents are not concerned. "),Sf()(),za(57,"fieldset",37)(58,"legend",38),n_(59," Pricing "),za(60,"span",39),n_(61,"(per million tokens \u2014 leave blank to skip cost monitoring)"),Sf()(),za(62,"div",21)(63,"div",8)(64,"label",40),n_(65,"Input"),Sf(),lc(66,"input",41),iS(),Sf(),za(67,"div",8)(68,"label",42),n_(69,"Output"),Sf(),lc(70,"input",43),iS(),Sf()(),za(71,"div",21)(72,"div",8)(73,"label",44),n_(74,"Cache write"),Sf(),lc(75,"input",45),iS(),Sf(),za(76,"div",8)(77,"label",46),n_(78,"Cache read"),Sf(),lc(79,"input",47),iS(),Sf()()(),za(80,"div",48)(81,"button",49),n_(82),Sf(),za(83,"button",50),dc("click",function(){sg(e);let u=MT();return ag(u.cancel())}),n_(84,"Cancel"),Sf()()();}if(l&2){let e=MT();tv("formGroup",e.form),yb(6),hT(e.isEditMode()?6:7),yb(7),tv("formControl",e.apiModelNameControl),aS(),yb(4),tv("formControl",e.descriptionControl),aS(),yb(4),tv("formControl",e.aliasControl),aS(),yb(4),tv("formControl",e.priorityControl),aS(),yb(5),tv("formControl",e.temperatureControl),aS(),yb(4),tv("formControl",e.contextWindowControl),aS(),yb(4),tv("formControl",e.maxCompletionTokensControl),aS(),yb(4),tv("formControl",e.reasoningEffortControl),aS(),yb(),tv("ngValue",null),yb(2),yT(e.reasoningEffortOptions),yb(2),hT(e.reasoningEffortUnsupported()?47:48),yb(2),hT(e.temperatureMayConflictWithEffort()?49:-1),yb(3),tv("formControl",e.supportsAdvancedExecutionControl),aS(),yb(5),tv("formGroup",e.pricingGroup),yb(9),aS(),yb(4),aS(),yb(5),aS(),yb(4),aS(),yb(2),tv("disabled",e.form.invalid||e.isSubmitting()),yb(),xf(" ",e.isEditMode()?"Save changes":"Create"," ");}}var he=["Anthropic","Gemini"],me=class l{route=p($t);router=p(It);destroyRef=p(Me);aiModelController=p(N);aiProviderController=p(k);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=F(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(Wn(()=>_([]))),{initialValue:[]});form=new $({aiProviderId:new vt("",{nonNullable:true,validators:[ve$1.required]}),apiModelName:new vt("",{nonNullable:true,validators:[ve$1.required,ve$1.minLength(1)]}),description:new vt(null),alias:new vt("",{nonNullable:true}),priority:new vt(0,{nonNullable:true}),temperature:new vt(null),contextWindow:new vt(null),maxCompletionTokens:new vt(null),reasoningEffort:new vt(null),supportsAdvancedExecution:new vt(false,{nonNullable:true}),pricing:new $({inputMTokens:new vt(null),outputMTokens:new vt(null),cacheWrite:new vt(null),cacheRead:new vt(null)})});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get contextWindowControl(){return this.form.controls.contextWindow}get maxCompletionTokensControl(){return this.form.controls.maxCompletionTokens}get reasoningEffortControl(){return this.form.controls.reasoningEffort}get supportsAdvancedExecutionControl(){return this.form.controls.supportsAdvancedExecution}get pricingGroup(){return this.form.controls.pricing}reasoningEffortOptions=Object.values(Re);selectedProviderId=F(this.form.controls.aiProviderId.valueChanges,{initialValue:this.form.controls.aiProviderId.value});reasoningEffortUnsupported=Mi(()=>{let t=this.providers().find(e=>e.id===this.selectedProviderId())?.apiType;return t!==void 0&&he.includes(t)});temperatureValue=F(this.form.controls.temperature.valueChanges,{initialValue:this.form.controls.temperature.value});reasoningEffortValue=F(this.form.controls.reasoningEffort.valueChanges,{initialValue:this.form.controls.reasoningEffort.value});temperatureMayConflictWithEffort=Mi(()=>{let t=this.temperatureValue();return this.reasoningEffortValue()!=null&&t!=null&&t!==1});isEditMode=se$1(false);isSubmitting=se$1(false);isLoading=se$1(false);selectedProviderLabel=Mi(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(p=>p.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;constructor(){Tg(()=>{this.reasoningEffortUnsupported()?(this.reasoningEffortControl.setValue(null),this.reasoningEffortControl.disable()):this.reasoningEffortControl.enable();});}ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(true),this.loadModel(t));}loadModel(t){this.isLoading.set(true),this.aiModelController.getByIdAiModel(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.contextWindowControl.setValue(e.contextWindow??null),this.maxCompletionTokensControl.setValue(e.maxCompletionTokens??null),this.reasoningEffortControl.setValue(e.reasoningEffort??null),this.supportsAdvancedExecutionControl.setValue(e.supportsAdvancedExecution??false),this.pricingGroup.setValue({inputMTokens:e.pricing?.inputMTokens??null,outputMTokens:e.pricing?.outputMTokens??null,cacheWrite:e.pricing?.cacheWrite??null,cacheRead:e.pricing?.cacheRead??null}),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let t=this.form.getRawValue(),e=t.pricing,u=e.inputMTokens!=null||e.outputMTokens!=null||e.cacheWrite!=null||e.cacheRead!=null?{isEmpty:false,inputMTokens:e.inputMTokens??void 0,outputMTokens:e.outputMTokens??void 0,cacheWrite:e.cacheWrite??void 0,cacheRead:e.cacheRead??void 0}:void 0,O=x(w({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,contextWindow:t.contextWindow??void 0,maxCompletionTokens:t.maxCompletionTokens??void 0,reasoningEffort:t.reasoningEffort??void 0,supportsAdvancedExecution:t.supportsAdvancedExecution,pricing:u});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",O):this.aiModelController.createAiModel(O)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"]);}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=Ef({type:l,selectors:[["agentos-ai-model-form"]],decls:10,vars:2,consts:[[1,"ai-model-form"],[1,"ai-model-form__header"],["type","button","title","Back to AI models",1,"ai-model-form__back",3,"click"],[1,"ai-model-form__back-icon"],[1,"ai-model-form__title"],[1,"ai-model-form__loading"],[1,"ai-model-form__form",3,"formGroup"],[1,"ai-model-form__form",3,"ngSubmit","formGroup"],[1,"ai-model-form__field"],["for","model-provider",1,"ai-model-form__label"],["aria-hidden","true"],["id","model-provider","type","text","readonly","","tabindex","-1",1,"ai-model-form__input","ai-model-form__input--readonly",3,"value"],["id","model-provider",1,"ai-model-form__select",3,"formControl"],["for","model-api-name",1,"ai-model-form__label"],["id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",1,"ai-model-form__input","ai-model-form__input--mono",3,"formControl"],["for","model-description",1,"ai-model-form__label"],["id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-alias",1,"ai-model-form__label"],["id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-priority",1,"ai-model-form__label"],["id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__row"],["for","model-temperature",1,"ai-model-form__label"],["id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",1,"ai-model-form__input",3,"formControl"],["for","model-context-window",1,"ai-model-form__label"],["id","model-context-window","type","number","placeholder","e.g. 128000","min","1","step","1",1,"ai-model-form__input",3,"formControl"],["for","model-max-completion-tokens",1,"ai-model-form__label"],["id","model-max-completion-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",1,"ai-model-form__input",3,"formControl"],["for","model-reasoning-effort",1,"ai-model-form__label"],["id","model-reasoning-effort",1,"ai-model-form__select",3,"formControl"],[3,"ngValue"],[1,"ai-model-form__hint"],[1,"ai-model-form__hint","ai-model-form__hint--warning"],[1,"ai-model-form__toggle-label"],["type","checkbox",1,"ai-model-form__toggle-checkbox",3,"formControl"],[1,"ai-model-form__toggle-text"],[1,"ai-model-form__toggle-hint"],[1,"ai-model-form__section",3,"formGroup"],[1,"ai-model-form__section-title"],[1,"ai-model-form__section-hint"],["for","pricing-input",1,"ai-model-form__label"],["id","pricing-input","type","number","placeholder","e.g. 2.50","min","0","step","0.01","formControlName","inputMTokens",1,"ai-model-form__input"],["for","pricing-output",1,"ai-model-form__label"],["id","pricing-output","type","number","placeholder","e.g. 10.00","min","0","step","0.01","formControlName","outputMTokens",1,"ai-model-form__input"],["for","pricing-cache-write",1,"ai-model-form__label"],["id","pricing-cache-write","type","number","placeholder","e.g. 3.75","min","0","step","0.01","formControlName","cacheWrite",1,"ai-model-form__input"],["for","pricing-cache-read",1,"ai-model-form__label"],["id","pricing-cache-read","type","number","placeholder","e.g. 0.30","min","0","step","0.01","formControlName","cacheRead",1,"ai-model-form__input"],[1,"ai-model-form__actions"],["type","submit",1,"ai-model-form__btn","ai-model-form__btn--primary",3,"disabled"],["type","button",1,"ai-model-form__btn",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,p){e&1&&(za(0,"div",0)(1,"header",1)(2,"button",2),dc("click",function(){return p.cancel()}),za(3,"span",3),n_(4,"\u2190"),Sf(),n_(5," AI models "),Sf(),za(6,"h1",4),n_(7),Sf()(),fT(8,ce,2,0,"p",5)(9,Ce,85,17,"form",6),Sf()),e&2&&(yb(7),Iv(p.isEditMode()?"Edit AI model":"New AI model"),yb(),hT(p.isLoading()?8:9));},dependencies:[Kn,zn,Zn,Xn,Ye,dn,Ft,bt,Ln,Wn$1,qt,Lt,pn,Vn,yn],styles:[".ai-model-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-model-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-model-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.ai-model-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-model-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-model-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.ai-model-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.ai-model-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-model-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ai-model-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-model-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.ai-model-form__input[_ngcontent-%COMP%], .ai-model-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:var(--radius-md, 0);border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-model-form__input[_ngcontent-%COMP%]:focus, .ai-model-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.ai-model-form__input[_ngcontent-%COMP%]::placeholder, .ai-model-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.ai-model-form__input--mono[_ngcontent-%COMP%]{font-family:monospace}.ai-model-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.ai-model-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.ai-model-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.ai-model-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.ai-model-form__section[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:var(--radius-md, 0);padding:1rem;margin:0;display:flex;flex-direction:column;gap:1rem}.ai-model-form__section-title[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--color-text);padding:0 .25rem}.ai-model-form__section-hint[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary);font-size:.8125rem}.ai-model-form__hint[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.8125rem}.ai-model-form__hint--warning[_ngcontent-%COMP%]{color:var(--color-warning)}.ai-model-form__input--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);cursor:default;background:var(--color-surface-muted, rgba(0, 0, 0, .03))}.ai-model-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-model-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:var(--radius-pill, 0);border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.ai-model-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.ai-model-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-model-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.ai-model-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{me as AiModelFormComponent};
|
|
1
|
+
import {$,v as vt,a as ve$1,K as Kn,z as zn,Z as Zn,X as Xn,Y as Ye,d as dn,F as Ft,c as bt,L as Ln,W as Wn$1,q as qt,t as Lt,b as pn,V as Vn,y as yn}from'./chunk-UMiCRMsh.js';import {p,$ as $t,g as It,H as Me,ap as N,aj as k,a2 as F,af as Wn,aq as Re,M as Mi,s as se$1,j as Tg,U,K as x,J as w,a as Ef,a3 as _,z as za,L as dc,n as n_,S as Sf,f as fT,y as yb,I as Iv,h as hT,C as CT,l as lc,N as iS,m as mT,a5 as gT,k as MT,O as tv,Q as aS,d as yT,x as xf,a4 as lT,ar as Cv,o as sg,q as ag}from'./main-BNXY3UWS.js';function ce(l,t){l&1&&(za(0,"p",5),n_(1,"Loading\u2026"),Sf());}function se(l,t){if(l&1&&lc(0,"input",11),l&2){let e=MT(2);tv("value",e.selectedProviderLabel());}}function pe(l,t){if(l&1&&(za(0,"option",52),n_(1),Sf()),l&2){let e=t.$implicit;tv("value",e.id),yb(),Cv("",e.name," (",e.apiType,")");}}function ue(l,t){if(l&1&&(za(0,"select",12)(1,"option",51),n_(2,"Select provider"),Sf(),mT(3,pe,2,3,"option",52,lT().trackByProvider,true),Sf(),iS()),l&2){let e=MT(2);tv("formControl",e.aiProviderIdControl),aS(),yb(3),yT(e.providers());}}function fe(l,t){if(l&1&&(za(0,"option",30),n_(1),Sf()),l&2){let e=t.$implicit;tv("ngValue",e),yb(),Iv(e.toLowerCase());}}function _e(l,t){l&1&&(za(0,"span",31),n_(1,"Not supported yet for Anthropic and Gemini providers."),Sf());}function ge(l,t){l&1&&(za(0,"span",31),n_(1," Sent as is to OpenAI-compatible providers, which reject levels the model does not support. Through Requesty, Claude models do not apply it faithfully. "),Sf());}function ve(l,t){l&1&&(za(0,"span",32),n_(1," OpenAI reasoning models (GPT-5.1 and later) reject a temperature other than 1 with an effort: leave Temperature empty or set it to 1. "),Sf());}function Ce(l,t){if(l&1){let e=CT();za(0,"form",7),dc("ngSubmit",function(){sg(e);let u=MT();return ag(u.submit())}),za(1,"div",8)(2,"label",9),n_(3," Provider "),za(4,"span",10),n_(5,"*"),Sf()(),fT(6,se,1,1,"input",11)(7,ue,5,1,"select",12),Sf(),za(8,"div",8)(9,"label",13),n_(10," API name "),za(11,"span",10),n_(12,"*"),Sf()(),lc(13,"input",14),iS(),Sf(),za(14,"div",8)(15,"label",15),n_(16,"Description"),Sf(),lc(17,"input",16),iS(),Sf(),za(18,"div",8)(19,"label",17),n_(20,"Alias"),Sf(),lc(21,"input",18),iS(),Sf(),za(22,"div",8)(23,"label",19),n_(24,"Priority"),Sf(),lc(25,"input",20),iS(),Sf(),za(26,"div",21)(27,"div",8)(28,"label",22),n_(29,"Temperature"),Sf(),lc(30,"input",23),iS(),Sf(),za(31,"div",8)(32,"label",24),n_(33,"Context window"),Sf(),lc(34,"input",25),iS(),Sf()(),za(35,"div",8)(36,"label",26),n_(37,"Max completion tokens"),Sf(),lc(38,"input",27),iS(),Sf(),za(39,"div",8)(40,"label",28),n_(41,"Reasoning effort"),Sf(),za(42,"select",29)(43,"option",30),n_(44,"Provider default"),Sf(),mT(45,fe,2,2,"option",30,gT),Sf(),iS(),fT(47,_e,2,0,"span",31)(48,ge,2,0,"span",31),fT(49,ve,2,0,"span",32),Sf(),za(50,"div",8)(51,"label",33),lc(52,"input",34),iS(),za(53,"span",35),n_(54,"Supports advanced execution"),Sf()(),za(55,"p",36),n_(56," Agents configured in ADVANCED execution mode fail to run on a model that does not support it. SIMPLE agents are not concerned. "),Sf()(),za(57,"fieldset",37)(58,"legend",38),n_(59," Pricing "),za(60,"span",39),n_(61,"(per million tokens \u2014 leave blank to skip cost monitoring)"),Sf()(),za(62,"div",21)(63,"div",8)(64,"label",40),n_(65,"Input"),Sf(),lc(66,"input",41),iS(),Sf(),za(67,"div",8)(68,"label",42),n_(69,"Output"),Sf(),lc(70,"input",43),iS(),Sf()(),za(71,"div",21)(72,"div",8)(73,"label",44),n_(74,"Cache write"),Sf(),lc(75,"input",45),iS(),Sf(),za(76,"div",8)(77,"label",46),n_(78,"Cache read"),Sf(),lc(79,"input",47),iS(),Sf()()(),za(80,"div",48)(81,"button",49),n_(82),Sf(),za(83,"button",50),dc("click",function(){sg(e);let u=MT();return ag(u.cancel())}),n_(84,"Cancel"),Sf()()();}if(l&2){let e=MT();tv("formGroup",e.form),yb(6),hT(e.isEditMode()?6:7),yb(7),tv("formControl",e.apiModelNameControl),aS(),yb(4),tv("formControl",e.descriptionControl),aS(),yb(4),tv("formControl",e.aliasControl),aS(),yb(4),tv("formControl",e.priorityControl),aS(),yb(5),tv("formControl",e.temperatureControl),aS(),yb(4),tv("formControl",e.contextWindowControl),aS(),yb(4),tv("formControl",e.maxCompletionTokensControl),aS(),yb(4),tv("formControl",e.reasoningEffortControl),aS(),yb(),tv("ngValue",null),yb(2),yT(e.reasoningEffortOptions),yb(2),hT(e.reasoningEffortUnsupported()?47:48),yb(2),hT(e.temperatureMayConflictWithEffort()?49:-1),yb(3),tv("formControl",e.supportsAdvancedExecutionControl),aS(),yb(5),tv("formGroup",e.pricingGroup),yb(9),aS(),yb(4),aS(),yb(5),aS(),yb(4),aS(),yb(2),tv("disabled",e.form.invalid||e.isSubmitting()),yb(),xf(" ",e.isEditMode()?"Save changes":"Create"," ");}}var he=["Anthropic","Gemini"],me=class l{route=p($t);router=p(It);destroyRef=p(Me);aiModelController=p(N);aiProviderController=p(k);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=F(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(Wn(()=>_([]))),{initialValue:[]});form=new $({aiProviderId:new vt("",{nonNullable:true,validators:[ve$1.required]}),apiModelName:new vt("",{nonNullable:true,validators:[ve$1.required,ve$1.minLength(1)]}),description:new vt(null),alias:new vt("",{nonNullable:true}),priority:new vt(0,{nonNullable:true}),temperature:new vt(null),contextWindow:new vt(null),maxCompletionTokens:new vt(null),reasoningEffort:new vt(null),supportsAdvancedExecution:new vt(false,{nonNullable:true}),pricing:new $({inputMTokens:new vt(null),outputMTokens:new vt(null),cacheWrite:new vt(null),cacheRead:new vt(null)})});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get contextWindowControl(){return this.form.controls.contextWindow}get maxCompletionTokensControl(){return this.form.controls.maxCompletionTokens}get reasoningEffortControl(){return this.form.controls.reasoningEffort}get supportsAdvancedExecutionControl(){return this.form.controls.supportsAdvancedExecution}get pricingGroup(){return this.form.controls.pricing}reasoningEffortOptions=Object.values(Re);selectedProviderId=F(this.form.controls.aiProviderId.valueChanges,{initialValue:this.form.controls.aiProviderId.value});reasoningEffortUnsupported=Mi(()=>{let t=this.providers().find(e=>e.id===this.selectedProviderId())?.apiType;return t!==void 0&&he.includes(t)});temperatureValue=F(this.form.controls.temperature.valueChanges,{initialValue:this.form.controls.temperature.value});reasoningEffortValue=F(this.form.controls.reasoningEffort.valueChanges,{initialValue:this.form.controls.reasoningEffort.value});temperatureMayConflictWithEffort=Mi(()=>{let t=this.temperatureValue();return this.reasoningEffortValue()!=null&&t!=null&&t!==1});isEditMode=se$1(false);isSubmitting=se$1(false);isLoading=se$1(false);selectedProviderLabel=Mi(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(p=>p.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;constructor(){Tg(()=>{this.reasoningEffortUnsupported()?(this.reasoningEffortControl.setValue(null),this.reasoningEffortControl.disable()):this.reasoningEffortControl.enable();});}ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(true),this.loadModel(t));}loadModel(t){this.isLoading.set(true),this.aiModelController.getByIdAiModel(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.contextWindowControl.setValue(e.contextWindow??null),this.maxCompletionTokensControl.setValue(e.maxCompletionTokens??null),this.reasoningEffortControl.setValue(e.reasoningEffort??null),this.supportsAdvancedExecutionControl.setValue(e.supportsAdvancedExecution??false),this.pricingGroup.setValue({inputMTokens:e.pricing?.inputMTokens??null,outputMTokens:e.pricing?.outputMTokens??null,cacheWrite:e.pricing?.cacheWrite??null,cacheRead:e.pricing?.cacheRead??null}),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let t=this.form.getRawValue(),e=t.pricing,u=e.inputMTokens!=null||e.outputMTokens!=null||e.cacheWrite!=null||e.cacheRead!=null?{isEmpty:false,inputMTokens:e.inputMTokens??void 0,outputMTokens:e.outputMTokens??void 0,cacheWrite:e.cacheWrite??void 0,cacheRead:e.cacheRead??void 0}:void 0,O=x(w({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,contextWindow:t.contextWindow??void 0,maxCompletionTokens:t.maxCompletionTokens??void 0,reasoningEffort:t.reasoningEffort??void 0,supportsAdvancedExecution:t.supportsAdvancedExecution,pricing:u});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",O):this.aiModelController.createAiModel(O)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"]);}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=Ef({type:l,selectors:[["agentos-ai-model-form"]],decls:10,vars:2,consts:[[1,"ai-model-form"],[1,"ai-model-form__header"],["type","button","title","Back to AI models",1,"ai-model-form__back",3,"click"],[1,"ai-model-form__back-icon"],[1,"ai-model-form__title"],[1,"ai-model-form__loading"],[1,"ai-model-form__form",3,"formGroup"],[1,"ai-model-form__form",3,"ngSubmit","formGroup"],[1,"ai-model-form__field"],["for","model-provider",1,"ai-model-form__label"],["aria-hidden","true"],["id","model-provider","type","text","readonly","","tabindex","-1",1,"ai-model-form__input","ai-model-form__input--readonly",3,"value"],["id","model-provider",1,"ai-model-form__select",3,"formControl"],["for","model-api-name",1,"ai-model-form__label"],["id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",1,"ai-model-form__input","ai-model-form__input--mono",3,"formControl"],["for","model-description",1,"ai-model-form__label"],["id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-alias",1,"ai-model-form__label"],["id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-priority",1,"ai-model-form__label"],["id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__row"],["for","model-temperature",1,"ai-model-form__label"],["id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",1,"ai-model-form__input",3,"formControl"],["for","model-context-window",1,"ai-model-form__label"],["id","model-context-window","type","number","placeholder","e.g. 128000","min","1","step","1",1,"ai-model-form__input",3,"formControl"],["for","model-max-completion-tokens",1,"ai-model-form__label"],["id","model-max-completion-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",1,"ai-model-form__input",3,"formControl"],["for","model-reasoning-effort",1,"ai-model-form__label"],["id","model-reasoning-effort",1,"ai-model-form__select",3,"formControl"],[3,"ngValue"],[1,"ai-model-form__hint"],[1,"ai-model-form__hint","ai-model-form__hint--warning"],[1,"ai-model-form__toggle-label"],["type","checkbox",1,"ai-model-form__toggle-checkbox",3,"formControl"],[1,"ai-model-form__toggle-text"],[1,"ai-model-form__toggle-hint"],[1,"ai-model-form__section",3,"formGroup"],[1,"ai-model-form__section-title"],[1,"ai-model-form__section-hint"],["for","pricing-input",1,"ai-model-form__label"],["id","pricing-input","type","number","placeholder","e.g. 2.50","min","0","step","0.01","formControlName","inputMTokens",1,"ai-model-form__input"],["for","pricing-output",1,"ai-model-form__label"],["id","pricing-output","type","number","placeholder","e.g. 10.00","min","0","step","0.01","formControlName","outputMTokens",1,"ai-model-form__input"],["for","pricing-cache-write",1,"ai-model-form__label"],["id","pricing-cache-write","type","number","placeholder","e.g. 3.75","min","0","step","0.01","formControlName","cacheWrite",1,"ai-model-form__input"],["for","pricing-cache-read",1,"ai-model-form__label"],["id","pricing-cache-read","type","number","placeholder","e.g. 0.30","min","0","step","0.01","formControlName","cacheRead",1,"ai-model-form__input"],[1,"ai-model-form__actions"],["type","submit",1,"ai-model-form__btn","ai-model-form__btn--primary",3,"disabled"],["type","button",1,"ai-model-form__btn",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,p){e&1&&(za(0,"div",0)(1,"header",1)(2,"button",2),dc("click",function(){return p.cancel()}),za(3,"span",3),n_(4,"\u2190"),Sf(),n_(5," AI models "),Sf(),za(6,"h1",4),n_(7),Sf()(),fT(8,ce,2,0,"p",5)(9,Ce,85,17,"form",6),Sf()),e&2&&(yb(7),Iv(p.isEditMode()?"Edit AI model":"New AI model"),yb(),hT(p.isLoading()?8:9));},dependencies:[Kn,zn,Zn,Xn,Ye,dn,Ft,bt,Ln,Wn$1,qt,Lt,pn,Vn,yn],styles:[".ai-model-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-model-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-model-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.ai-model-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-model-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-model-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.ai-model-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.ai-model-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-model-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ai-model-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-model-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.ai-model-form__input[_ngcontent-%COMP%], .ai-model-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:var(--radius-md, 0);border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-model-form__input[_ngcontent-%COMP%]:focus, .ai-model-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.ai-model-form__input[_ngcontent-%COMP%]::placeholder, .ai-model-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.ai-model-form__input--mono[_ngcontent-%COMP%]{font-family:monospace}.ai-model-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.ai-model-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.ai-model-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.ai-model-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.ai-model-form__section[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:var(--radius-md, 0);padding:1rem;margin:0;display:flex;flex-direction:column;gap:1rem}.ai-model-form__section-title[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--color-text);padding:0 .25rem}.ai-model-form__section-hint[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary);font-size:.8125rem}.ai-model-form__hint[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.8125rem}.ai-model-form__hint--warning[_ngcontent-%COMP%]{color:var(--color-warning)}.ai-model-form__input--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);cursor:default;background:var(--color-surface-muted, rgba(0, 0, 0, .03))}.ai-model-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-model-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:var(--radius-pill, 0);border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.ai-model-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.ai-model-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-model-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.ai-model-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{me as AiModelFormComponent};
|
package/browser/index.html
CHANGED
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
<style>:root{--color-bg:#f5f6f8;--color-bg-solid:#f5f6f8;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-text-tertiary:#a1a1a6;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-bg-hover:rgba(0, 0, 0, .04);--color-success:#34c759;--color-success-bg:#e3f5e1;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-surface:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-divider:rgba(0, 0, 0, .1)}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-MRPXDMCX.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-MRPXDMCX.css"></noscript></head>
|
|
34
34
|
<body>
|
|
35
35
|
<app-root></app-root>
|
|
36
|
-
<script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-
|
|
36
|
+
<script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-BNXY3UWS.js" type="module"></script></body>
|
|
37
37
|
</html>
|