@whoz-oss/coday-client 0.0.0-workstream-forge.73 → 0.0.0-workstream-forge.75
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-U-Jlpf5A.js → chunk-13WTmKep.js} +1 -1
- package/browser/chunk-1nyEsjkY.js +1 -0
- package/browser/chunk-2hH5YbLe.js +2 -0
- package/browser/{chunk-BJYfeDyS.js → chunk-42jw_j0t.js} +1 -1
- package/browser/chunk-5lNA_LR4.js +1 -0
- package/browser/{chunk-DC-red0b.js → chunk-6Be7kW0o.js} +2 -2
- package/browser/{chunk-CGYwmx2k.js → chunk-6VeNGs2-.js} +2 -2
- package/browser/{chunk-Dj5AokGW.js → chunk-80hCpwon.js} +1 -1
- package/browser/chunk-93qYG1j4.js +1 -0
- package/browser/{chunk-DP19doHJ.js → chunk-AJHLyP2Q.js} +1 -1
- package/browser/chunk-AblS4pXb.js +1 -0
- package/browser/{chunk-Bqwy4m-Y.js → chunk-B0es9TQT.js} +6 -6
- package/browser/chunk-B1R1JDKX.js +1 -0
- package/browser/chunk-B1nDWA3v.js +1 -0
- package/browser/{chunk-CPNVaVDV.js → chunk-B9cQUPc7.js} +1 -1
- package/browser/{chunk-DGRABcKv.js → chunk-BCvr3olm.js} +1 -1
- package/browser/chunk-BJ3cmxps.js +10 -0
- package/browser/{chunk-CzVugV8O.js → chunk-BRFVbU6N.js} +1 -1
- package/browser/chunk-BYvnZ4jZ.js +1 -0
- package/browser/chunk-BcDCPUzh.js +1 -0
- package/browser/chunk-BlYydhGT.js +1 -0
- package/browser/chunk-BmMRXr--.js +1 -0
- package/browser/chunk-BnVoIxkm.js +1 -0
- package/browser/chunk-Bs4cz8et.js +1 -0
- package/browser/chunk-Buv4bUwG.js +1 -0
- package/browser/chunk-BwapsUV-.js +1 -0
- package/browser/chunk-C-7EKaLv.js +1 -0
- package/browser/{chunk-CqLbkkOq.js → chunk-C0RjV9YR.js} +1 -1
- package/browser/chunk-C2h53xO8.js +1 -0
- package/browser/chunk-C519Azc-.js +1 -0
- package/browser/{chunk-aHJ5fjgR.js → chunk-C5CsTmNj.js} +1 -1
- package/browser/chunk-C5jla22M.js +1 -0
- package/browser/{chunk-CtAo1iFU.js → chunk-C7774IZF.js} +1 -1
- package/browser/chunk-C8Lny5xG.js +2 -0
- package/browser/chunk-CBAzExoV.js +1 -0
- package/browser/chunk-CErujabN.js +1 -0
- package/browser/{chunk-BZnIXI7p.js → chunk-CFuJNk7Q.js} +1 -1
- package/browser/{chunk-BWiJRfaL.js → chunk-CIMARU-Z.js} +2 -2
- package/browser/chunk-CIPMuL5o.js +1 -0
- package/browser/chunk-CJy6YujN.js +1 -0
- package/browser/chunk-CLQWshBg.js +1 -0
- package/browser/chunk-CNbCiJwC.js +1 -0
- package/browser/chunk-CQzD4hlX.js +1 -0
- package/browser/chunk-CTep3Zcv.js +1 -0
- package/browser/chunk-CUD8zCnQ.js +1 -0
- package/browser/chunk-CX09OqPp.js +1 -0
- package/browser/{chunk-DgG4-JED.js → chunk-CY9LGSZW.js} +5 -5
- package/browser/{chunk-D1uj1j1h.js → chunk-Ccxus4_o.js} +1 -1
- package/browser/{chunk-DBGmgfRz.js → chunk-CoVye3Su.js} +1 -1
- package/browser/{chunk-Bw7mOGQ0.js → chunk-Cr26pdWO.js} +2 -2
- package/browser/chunk-CrIQg7gg.js +5 -0
- package/browser/chunk-CtRqtZpo.js +1 -0
- package/browser/chunk-Cw_eJAWw.js +1 -0
- package/browser/chunk-D0rG88ee.js +1 -0
- package/browser/{chunk-Cf88qpFd.js → chunk-D2VUzw11.js} +1 -1
- package/browser/chunk-D4rIP_px.js +1 -0
- package/browser/{chunk-DfJkYf_l.js → chunk-D6Uyjin9.js} +2 -2
- package/browser/{chunk-VXmB_Gsj.js → chunk-D9lhavsa.js} +1 -1
- package/browser/{chunk-CVTGi84a.js → chunk-DOfFWQHE.js} +1 -1
- package/browser/chunk-DSohMG90.js +1 -0
- package/browser/chunk-DVa9gI4Z.js +1 -0
- package/browser/{chunk-DV3DA8yQ.js → chunk-DYWO9D4-.js} +1 -1
- package/browser/chunk-DdV87KC5.js +1 -0
- package/browser/chunk-DgQbMek3.js +1 -0
- package/browser/{chunk-CNNQxvf2.js → chunk-DqyQME6K.js} +1 -1
- package/browser/{chunk-CBW_anQG.js → chunk-DrGGZMUF.js} +1 -1
- package/browser/{chunk-Chlz-3np.js → chunk-DsE7jEkK.js} +1 -1
- package/browser/{chunk-BV8xI1NJ.js → chunk-Dw-TsQE6.js} +1 -1
- package/browser/{chunk-C8fR7i5_.js → chunk-DwLys37P.js} +2 -2
- package/browser/chunk-EzRHT4mT.js +1 -0
- package/browser/chunk-Iomqh4vI.js +1 -0
- package/browser/chunk-MhUYxl3Z.js +1 -0
- package/browser/chunk-SyIy1dgS.js +1 -0
- package/browser/{chunk-BU44trIA.js → chunk-buMTi15H.js} +4 -4
- package/browser/chunk-cwPycVUY.js +1 -0
- package/browser/{chunk-CWt5h8ju.js → chunk-o7tHGyvk.js} +1 -1
- package/browser/{chunk-CiLEipE-.js → chunk-tzI8SDtI.js} +1 -1
- package/browser/chunk-zsOy-bBo.js +1 -0
- package/browser/index.html +1 -1
- package/browser/main-A4H3MFZY.js +1811 -0
- package/package.json +1 -1
- package/browser/chunk-0RuqPADs.js +0 -1
- package/browser/chunk-6YepH-5O.js +0 -2
- package/browser/chunk-9JaJzzEz.js +0 -1
- package/browser/chunk-B3E4lCwO.js +0 -1
- package/browser/chunk-BCsg_SXr.js +0 -1
- package/browser/chunk-BQ769TYC.js +0 -1
- package/browser/chunk-BZVF6eue.js +0 -1
- package/browser/chunk-BnetdSIx.js +0 -1
- package/browser/chunk-CCnLS_7R.js +0 -1
- package/browser/chunk-CHNNMNWy.js +0 -1
- package/browser/chunk-CLh5W9hn.js +0 -1
- package/browser/chunk-CPLthqBf.js +0 -1
- package/browser/chunk-CRfl_VGY.js +0 -1
- package/browser/chunk-C_0Pmi5K.js +0 -1
- package/browser/chunk-CaxVDVN-.js +0 -1
- package/browser/chunk-CfpVT0c9.js +0 -1
- package/browser/chunk-CgDdR6YD.js +0 -1
- package/browser/chunk-Civ9Xd2i.js +0 -1
- package/browser/chunk-ClRM_6Kb.js +0 -1
- package/browser/chunk-CrVY0VcK.js +0 -2
- package/browser/chunk-D9oBZ3ZS.js +0 -10
- package/browser/chunk-DgLuwHcL.js +0 -1
- package/browser/chunk-DpvdAKv3.js +0 -1
- package/browser/chunk-DwTmKs4U.js +0 -1
- package/browser/chunk-MTBsS9Vo.js +0 -5
- package/browser/chunk-OdzjbUFQ.js +0 -1
- package/browser/chunk-WyvYyBRz.js +0 -1
- package/browser/chunk-fu7B8Qao.js +0 -1
- package/browser/chunk-pzKtXjRC.js +0 -1
- package/browser/chunk-tpdbVrNB.js +0 -1
- package/browser/chunk-uLZ7t3T5.js +0 -1
- package/browser/chunk-vBUUKKqM.js +0 -1
- package/browser/chunk-wLYhbcw4.js +0 -1
- package/browser/main-4VVW3HZ3.js +0 -1811
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {an as ue,g,L,ci as me,ap as
|
|
1
|
+
import {an as ue,g,L,ci as me,ap as Cd,av as B,e as xw,k as ws,n as GC,o as pl,ai as tm,aj as KC,q as Rg,a3 as VI,S as Sg,J as Jw,t as rC,X as XE,ak as em,a6 as UI,v as bg,y as eC,z as oC,a5 as vl,aL as wo,aM as Zn$1,aO as wt$1,az as Xt,aW as C,cj as Pn,ce as _b,c8 as KT,af as Eg,ag as fT,c9 as kf,ck as Ff,ch as Ng,u as CC,T as Tg,ad as Hg,b$ as kC,A as Ug,D as Pg,E as EC,I as IC,aJ as Tr,aG as fe,cl as be,p as pe,l as le,bU as Od,b9 as T,b8 as B$1,be as A,b7 as u,bd as h,cm as M,d as O,ba as v,bb as m,c as b,cn as F,f,V,bc as R,co as H,cp as K,ca as _e,Y as x,Z as z$1,_ as Ue,am as qm,j as Gn,i as pr,a0 as jt,a2 as Nt,a1 as Vt,b0 as Qg,ac as gC}from'./main-A4H3MFZY.js';import {s as se}from'./chunk-DwLys37P.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-CFuJNk7Q.js';var Xe=["determinateSpinner"];function et(c,e){if(c&1&&(kf(),ws(0,"svg",11),Sg(1,"circle",12),pl()),c&2){let t=gC();Tg("viewBox",t._viewBox()),XE(),Hg("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Tg("r",t._circleRadius());}}var tt=new C("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,nt=10,yt=(()=>{class c{_elementRef=g(Xt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(tt),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-nt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=xw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&Pg(Xe,5),n&2){let o;EC(o=IC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Tg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),kC("mat-"+i.color),Hg("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),Ug("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",KT],diameter:[2,"diameter","diameter",KT],strokeWidth:[2,"strokeWidth","strokeWidth",KT]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(Eg(0,et,2,8,"ng-template",null,0,fT),ws(2,"div",2,1),kf(),ws(4,"svg",3),Sg(5,"circle",4),pl()(),Ff(),ws(6,"div",5)(7,"div",6)(8,"div",7),Ng(9,8),pl(),ws(10,"div",9),Ng(11,8),pl(),ws(12,"div",10),Ng(13,8),pl()()()),n&2){let o=CC(1);XE(4),Tg("viewBox",i._viewBox()),XE(),Hg("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Tg("r",i._circleRadius()),XE(4),bg("ngTemplateOutlet",o),XE(2),bg("ngTemplateOutlet",o),XE(2),bg("ngTemplateOutlet",o);}},dependencies:[_b],styles:[`.mat-mdc-progress-spinner {
|
|
2
2
|
--mat-progress-spinner-animation-multiplier: 1;
|
|
3
3
|
display: block;
|
|
4
4
|
overflow: hidden;
|
|
@@ -173,10 +173,10 @@ import {an as ue,g,L,ci as me,ap as wd,av as B,e as xw,k as ws,n as GC,o as pl,a
|
|
|
173
173
|
transform: rotate(-265deg);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
`],encapsulation:2})}return c})();var Et=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=wo({type:c});static \u0275inj=Zn$1({imports:[wt$1]})}return c})();var z=class c{destroy$=new ue;voices;currentUtterance=null;currentOnEndCallback=null;speakingSubject=new Tr(false);speaking$=this.speakingSubject.asObservable();volume=.8;rate=1.2;language="en-US";selectedVoice;preferencesService=g(L);constructor(){this.initializeSpeechSynthesis(),this.subscribeToPreferences();}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.stopSpeech();}initializeSpeechSynthesis(){if(!("speechSynthesis"in window)){console.warn("[VOICE-SERVICE] Speech synthesis not available"),this.voices=new Promise(e=>e([]));return}this.voices=new Promise((e,t)=>{let n=speechSynthesis.getVoices();if(n.length)e(n);else {let i=setTimeout(()=>{t("no voices found");},2e3);speechSynthesis.addEventListener("voiceschanged",()=>{let o=speechSynthesis.getVoices();o.length&&(clearTimeout(i),e(o));});}}),console.log("[VOICE-SERVICE] Speech synthesis initialized");}subscribeToPreferences(){this.preferencesService.voiceVolume$.pipe(
|
|
176
|
+
`],encapsulation:2})}return c})();var Et=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=wo({type:c});static \u0275inj=Zn$1({imports:[wt$1]})}return c})();var z=class c{destroy$=new ue;voices;currentUtterance=null;currentOnEndCallback=null;speakingSubject=new Tr(false);speaking$=this.speakingSubject.asObservable();volume=.8;rate=1.2;language="en-US";selectedVoice;preferencesService=g(L);constructor(){this.initializeSpeechSynthesis(),this.subscribeToPreferences();}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.stopSpeech();}initializeSpeechSynthesis(){if(!("speechSynthesis"in window)){console.warn("[VOICE-SERVICE] Speech synthesis not available"),this.voices=new Promise(e=>e([]));return}this.voices=new Promise((e,t)=>{let n=speechSynthesis.getVoices();if(n.length)e(n);else {let i=setTimeout(()=>{t("no voices found");},2e3);speechSynthesis.addEventListener("voiceschanged",()=>{let o=speechSynthesis.getVoices();o.length&&(clearTimeout(i),e(o));});}}),console.log("[VOICE-SERVICE] Speech synthesis initialized");}subscribeToPreferences(){this.preferencesService.voiceVolume$.pipe(Cd(this.destroy$)).subscribe(e=>{this.volume=e,console.log("[VOICE-SERVICE] Volume updated to:",e);}),this.preferencesService.voiceRate$.pipe(Cd(this.destroy$)).subscribe(e=>{this.rate=e,console.log("[VOICE-SERVICE] Rate updated to:",e);}),this.preferencesService.voiceLanguage$.pipe(Cd(this.destroy$)).subscribe(e=>{this.language=e,console.log("[VOICE-SERVICE] Language updated to:",e),this.updateSelectedVoiceForLanguage();}),this.preferencesService.selectedVoice$.pipe(Cd(this.destroy$)).subscribe(e=>{this.setSelectedVoice(e);}),this.volume=this.preferencesService.getVoiceVolume(),this.rate=this.preferencesService.getVoiceRate(),this.language=this.preferencesService.getVoiceLanguage(),this.setSelectedVoice(this.preferencesService.getSelectedVoice());}isReady(){return "speechSynthesis"in window&&this.selectedVoice!==void 0}isSpeaking(){return speechSynthesis.speaking}speak(e,t){return B(this,null,function*(){if(!this.selectedVoice)return console.warn("[VOICE-SERVICE] No voice selected"),false;if(!e.trim())return console.warn("[VOICE-SERVICE] No text to speak"),false;let n=this.extractPlainText(e);if(!n.trim())return console.warn("[VOICE-SERVICE] No text to speak after markdown cleaning"),false;this.stopSpeech();try{let i=new SpeechSynthesisUtterance(n);i.voice=this.selectedVoice,i.lang=this.selectedVoice.lang,i.volume=this.volume,i.rate=this.rate,this.currentOnEndCallback=t||null,t&&(i.onend=()=>{this.currentOnEndCallback===t&&(this.currentOnEndCallback=null,t());},i.onerror=()=>{this.currentOnEndCallback===t&&(this.currentOnEndCallback=null,t());}),this.currentUtterance=i,this.speakingSubject.next(!0);let o=i.onend,E=i.onerror;return i.onend=C=>{this.speakingSubject.next(!1),o&&o.call(i,C);},i.onerror=C=>{this.speakingSubject.next(!1),E&&E.call(i,C);},speechSynthesis.speak(i),console.log("[VOICE-SERVICE] Started speaking:",e.substring(0,50)+"..."),!0}catch(i){return console.error("[VOICE-SERVICE] Error speaking:",i),false}})}stopSpeech(){if(this.currentUtterance||speechSynthesis.speaking){if(speechSynthesis.cancel(),this.currentUtterance=null,this.currentOnEndCallback){let e=this.currentOnEndCallback;this.currentOnEndCallback=null,e();}this.speakingSubject.next(false),console.log("[VOICE-SERVICE] Speech stopped");}}ding(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),n=e.createGain();t.connect(n),n.connect(e.destination),t.frequency.setValueAtTime(800,e.currentTime),n.gain.setValueAtTime(.1,e.currentTime),n.gain.exponentialRampToValueAtTime(.01,e.currentTime+.1),t.start(e.currentTime),t.stop(e.currentTime+.1),console.log("[VOICE-SERVICE] Notification sound played");}catch(e){console.error("[VOICE-SERVICE] Notification sound failed:",e);}}getVoicesForLanguage(){return B(this,null,function*(){try{let e=this.language.slice(0,2),t=yield this.voices;if(!t||t.length===0)return console.warn("[VOICE-SERVICE] No voices available on system"),[];let n=t.filter(i=>i.lang.toLowerCase().startsWith(e)).sort((i,o)=>i.localService&&!o.localService?-1:!i.localService&&o.localService?1:i.name.localeCompare(o.name));return console.log("[VOICE-SERVICE] Found matching voices:",n.length,"for language:",e),n.map(i=>({name:i.name,lang:i.lang,localService:i.localService,default:i.default,displayName:this.formatVoiceDisplayName(i)}))}catch(e){return console.error("[VOICE-SERVICE] Error getting voices for language:",e),[]}})}formatVoiceDisplayName(e){let t=e.localService?"\u{1F3E0}":"\u2601\uFE0F",n=e.default?" \u2B50":"";return `${t} ${e.name} (${e.lang})${n}`}setSelectedVoice(e){return B(this,null,function*(){if(!e){this.selectedVoice=void 0;return}let[t,n]=e.split("|");if(!t||!n){this.selectedVoice=void 0;return}let i=(yield this.voices)?.find(o=>o.name===t&&o.lang===n);i?(this.selectedVoice=i,console.log("[VOICE-SERVICE] Selected voice:",i.name,i.lang)):(this.selectedVoice=void 0,console.warn("[VOICE-SERVICE] Voice not found:",t,n));})}updateSelectedVoiceForLanguage(){return B(this,null,function*(){let e=yield this.getVoicesForLanguage();if(e.length===0){console.warn("[VOICE-SERVICE] No voices available for language:",this.language),this.selectedVoice=void 0,this.preferencesService.setSelectedVoice(null);return}let t=this.preferencesService.getSelectedVoice();if(t){let[i,o]=t.split("|"),E=o?.slice(0,2),C=this.language.slice(0,2);if(E===C&&e.some(q=>q.name===i&&q.lang===o)){console.log("[VOICE-SERVICE] Keeping current voice for language:",t);return}}let n=e[0];if(n){let i=`${n.name}|${n.lang}`;this.preferencesService.setSelectedVoice(i),console.log("[VOICE-SERVICE] Auto-selected voice for language change:",n.displayName);}})}testSelectedVoice(){setTimeout(()=>{if(!this.selectedVoice){console.log("[VOICE-SERVICE] No voice selected for test");return}this.stopSpeech();let e=this.getTestText();e&&this.speak(e);},100);}getTestText(){let e=this.language.slice(0,2),t={fr:"Bonjour, ceci est un test de la voix s\xE9lectionn\xE9e.",en:"Hello, this is a test of the selected voice.",es:"Hola, esta es una prueba de la voz seleccionada.",de:"Hallo, dies ist ein Test der ausgew\xE4hlten Stimme.",it:"Ciao, questo \xE8 un test della voce selezionata.",pt:"Ol\xE1, este \xE9 um teste da voz selecionada.",ja:"\u3053\u3093\u306B\u3061\u306F\u3001\u3053\u308C\u306F\u9078\u629E\u3055\u308C\u305F\u97F3\u58F0\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002",ko:"\uC548\uB155\uD558\uC138\uC694, \uC774\uAC83\uC740 \uC120\uD0DD\uB41C \uC74C\uC131\uC758 \uD14C\uC2A4\uD2B8\uC785\uB2C8\uB2E4.",zh:"\u4F60\u597D\uFF0C\u8FD9\u662F\u6240\u9009\u8BED\u97F3\u7684\u6D4B\u8BD5\u3002",ru:"\u041F\u0440\u0438\u0432\u0435\u0442, \u044D\u0442\u043E \u0442\u0435\u0441\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0433\u043E\u043B\u043E\u0441\u0430.",ar:"\u0645\u0631\u062D\u0628\u0627\u060C \u0647\u0630\u0627 \u0627\u062E\u062A\u0628\u0627\u0631 \u0644\u0644\u0635\u0648\u062A \u0627\u0644\u0645\u062D\u062F\u062F."};return t[e]||t.en}extractPlainText(e){let t=e.replace(/[\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|⭐/gu,"").replace(/```[\s\S]*?```/g,"code block").replace(/`([^`]+)`/g,"$1").replace(/\*\*\*(.*?)\*\*\*/g,"$1").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/~~(.*?)~~/g,"$1").replace(/#{1,6}\s*(.*)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/https?:\/\/[^\s]+/g,"link").replace(/ /g," ").replace(/&/g,"and").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"');return t=this.addNaturalPunctuation(t),t.replace(/\s+/g," ").trim()}addNaturalPunctuation(e){return e.replace(/\n+/g,`
|
|
177
177
|
`).split(`
|
|
178
|
-
`).map(t=>this.addPeriodIfNeeded(t.trim())).filter(t=>t.length>0).join(" ")}addPeriodIfNeeded(e){return e?/[.!?;:]$/.test(e)?e:e+".":""}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};var rt=(c,e)=>e.code,at=(c,e)=>e.name+e.lang;function st(c,e){c&1&&(ws(0,"div",17)(1,"mat-icon",39),GC(2,"warning"),pl(),ws(3,"span",40),GC(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),pl()());}function ct(c,e){if(c&1&&(ws(0,"option",25),GC(1),pl()),c&2){let t=e.$implicit;bg("value",t.code),XE(),Qg("",t.flag," ",t.label);}}function lt(c,e){c&1&&(ws(0,"option",32),GC(1,"Loading voices..."),pl());}function dt(c,e){c&1&&(ws(0,"option",32),GC(1,"No voice available"),pl());}function pt(c,e){if(c&1&&(ws(0,"option",25),GC(1),pl()),c&2){let t=e.$implicit;bg("value",t.name+"|"+t.lang),XE(),vl(" ",t.displayName," ");}}var Ye=class c{destroy$=new ue;selectedTheme="light";selectedThemeVariant="industry";selectedVoiceLanguage="en-US";useEnterToSend=false;printTechnicalMessages=false;showTechnicalMessages=true;showWarningMessages=true;voiceInputMode="browser";voiceAnnounceEnabled=false;voiceMode="speech";voiceReadFullText=false;voiceVolume=80;voiceRate=120;agentNotificationEnabled=false;notificationSoundEnabled=true;browserNotificationEnabled=false;browserNotificationDenied=false;missionPreviewEnabled=false;availableVoices=[];selectedVoiceId=null;loadingVoices=false;voiceLanguageOptions=[{code:"fr-FR",label:"Fran\xE7ais",flag:"\u{1F1EB}\u{1F1F7}"},{code:"en-US",label:"English (US)",flag:"\u{1F1FA}\u{1F1F8}"},{code:"en-GB",label:"English (UK)",flag:"\u{1F1EC}\u{1F1E7}"},{code:"es-ES",label:"Espa\xF1ol",flag:"\u{1F1EA}\u{1F1F8}"},{code:"de-DE",label:"Deutsch",flag:"\u{1F1E9}\u{1F1EA}"},{code:"it-IT",label:"Italiano",flag:"\u{1F1EE}\u{1F1F9}"},{code:"pt-BR",label:"Portugu\xEAs",flag:"\u{1F1E7}\u{1F1F7}"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4",flag:"\u{1F1F0}\u{1F1F7}"},{code:"zh-CN",label:"\u4E2D\u6587 (\u7B80\u4F53)",flag:"\u{1F1E8}\u{1F1F3}"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",flag:"\u{1F1F7}\u{1F1FA}"},{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",flag:"\u{1F1F8}\u{1F1E6}"}];preferencesService=g(L);voiceSynthesisService=g(z);themeService=g(me);ngOnInit(){let e=this.themeService.getCurrentTheme();this.selectedTheme=e.mode,this.selectedThemeVariant=e.variant,this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.showTechnicalMessages=!this.preferencesService.getHideTechnicalMessages(),this.showWarningMessages=!this.preferencesService.getHideWarningMessages(),this.voiceInputMode=this.preferencesService.getVoiceInputMode(),this.voiceAnnounceEnabled=this.preferencesService.getVoiceAnnounceEnabled(),this.voiceMode=this.preferencesService.getVoiceMode(),this.voiceReadFullText=this.preferencesService.getVoiceReadFullText(),this.voiceVolume=Math.round(this.preferencesService.getVoiceVolume()*100),this.voiceRate=Math.round(this.preferencesService.getVoiceRate()*100),this.selectedVoiceId=this.preferencesService.getSelectedVoice(),this.agentNotificationEnabled=this.preferencesService.getAgentNotificationEnabled(),this.notificationSoundEnabled=this.preferencesService.getNotificationSoundEnabled(),this.browserNotificationEnabled=this.preferencesService.getBrowserNotificationEnabled(),this.missionPreviewEnabled=this.preferencesService.getMissionPreviewEnabled(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe(wd(this.destroy$)).subscribe(t=>{this.selectedTheme=t.mode,this.selectedThemeVariant=t.variant;}),this.preferencesService.voiceLanguage$.pipe(wd(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t;}),this.preferencesService.enterToSend$.pipe(wd(this.destroy$)).subscribe(t=>{this.useEnterToSend=t;}),this.preferencesService.printTechnicalMessages$.pipe(wd(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t;}),this.preferencesService.hideTechnicalMessages$.pipe(wd(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t;}),this.preferencesService.hideWarningMessages$.pipe(wd(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t;}),this.preferencesService.voiceInputMode$.pipe(wd(this.destroy$)).subscribe(t=>{this.voiceInputMode=t;}),this.preferencesService.voiceAnnounceEnabled$.pipe(wd(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t;}),this.preferencesService.voiceMode$.pipe(wd(this.destroy$)).subscribe(t=>{this.voiceMode=t;}),this.preferencesService.voiceReadFullText$.pipe(wd(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t;}),this.preferencesService.voiceVolume$.pipe(wd(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100);}),this.preferencesService.voiceRate$.pipe(wd(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100);}),this.preferencesService.selectedVoice$.pipe(wd(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t;}),this.preferencesService.voiceLanguage$.pipe(wd(this.destroy$)).subscribe(()=>{this.loadAvailableVoices();}),this.preferencesService.agentNotificationEnabled$.pipe(wd(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t;}),this.preferencesService.notificationSoundEnabled$.pipe(wd(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t;}),this.preferencesService.browserNotificationEnabled$.pipe(wd(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission();}),this.preferencesService.missionPreviewEnabled$.pipe(wd(this.destroy$)).subscribe(t=>{this.missionPreviewEnabled=t;});}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme({variant:this.selectedThemeVariant,mode:this.selectedTheme});}onVoiceLanguageChange(){console.log("[OPTIONS] Voice language changed to:",this.selectedVoiceLanguage),this.preferencesService.setVoiceLanguage(this.selectedVoiceLanguage);}onEnterToSendChange(){console.log("[OPTIONS] Enter to send changed to:",this.useEnterToSend),this.preferencesService.setEnterToSend(this.useEnterToSend);}onPrintTechnicalMessagesChange(){console.log("[OPTIONS] Print technical messages changed to:",this.printTechnicalMessages),this.preferencesService.setPrintTechnicalMessages(this.printTechnicalMessages);}onShowTechnicalMessagesChange(){let e=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",e,")"),this.preferencesService.setHideTechnicalMessages(e);}onShowWarningMessagesChange(){let e=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",e,")"),this.preferencesService.setHideWarningMessages(e);}onVoiceInputModeChange(e){let t=e.target.value;console.log("[OPTIONS] Voice input mode changed to:",t),this.preferencesService.setVoiceInputMode(t);}onVoiceAnnounceEnabledChange(){console.log("[OPTIONS] Voice announce enabled changed to:",this.voiceAnnounceEnabled),this.preferencesService.setVoiceAnnounceEnabled(this.voiceAnnounceEnabled);}onVoiceModeChange(){console.log("[OPTIONS] Voice mode changed to:",this.voiceMode),this.preferencesService.setVoiceMode(this.voiceMode);}onVoiceReadFullTextChange(){console.log("[OPTIONS] Voice read full text changed to:",this.voiceReadFullText),this.preferencesService.setVoiceReadFullText(this.voiceReadFullText);}onVoiceVolumeChange(){let e=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",e),this.preferencesService.setVoiceVolume(e);}onVoiceRateChange(){let e=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",e),this.preferencesService.setVoiceRate(e);}loadAvailableVoices(){return B(this,null,function*(){this.loadingVoices=true;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language");}catch(e){console.error("[OPTIONS] Error loading voices:",e),this.availableVoices=[];}finally{this.loadingVoices=false;}})}onSelectedVoiceChange(){console.log("[OPTIONS] Selected voice changed to:",this.selectedVoiceId),this.preferencesService.setSelectedVoice(this.selectedVoiceId);}testVoice(){console.log("[OPTIONS] Testing voice with current settings"),this.voiceSynthesisService.testSelectedVoice();}onAgentNotificationEnabledChange(){console.log("[OPTIONS] Agent notification enabled changed to:",this.agentNotificationEnabled),this.preferencesService.setAgentNotificationEnabled(this.agentNotificationEnabled);}onNotificationSoundEnabledChange(){console.log("[OPTIONS] Notification sound enabled changed to:",this.notificationSoundEnabled),this.preferencesService.setNotificationSoundEnabled(this.notificationSoundEnabled);}onBrowserNotificationEnabledChange(){console.log("[OPTIONS] Browser notification enabled changed to:",this.browserNotificationEnabled),this.preferencesService.setBrowserNotificationEnabled(this.browserNotificationEnabled);}onMissionPreviewEnabledChange(){console.log("[OPTIONS] Mission preview panel enabled changed to:",this.missionPreviewEnabled),this.preferencesService.setMissionPreviewEnabled(this.missionPreviewEnabled);}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission));}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-options-panel"]],decls:168,vars:37,consts:[[1,"options-content"],[1,"option-section"],[1,"section-title"],[1,"option-group"],[1,"radio-group"],[1,"option-radio"],["type","radio","name","theme","value","light",3,"ngModelChange","change","ngModel"],[1,"radio-mark"],["type","radio","name","theme","value","dark",3,"ngModelChange","change","ngModel"],["type","radio","name","theme","value","system",3,"ngModelChange","change","ngModel"],[1,"option-label"],["type","radio","name","enterBehavior",3,"ngModelChange","change","value","ngModel"],[1,"toggle-option"],["color","primary",3,"ngModelChange","change","ngModel"],[1,"option-label-with-hint"],[1,"option-hint"],["color","primary",3,"ngModelChange","change","ngModel","disabled"],[1,"notification-error"],["for","voice-input-mode-select",1,"option-label"],["id","voice-input-mode-select",1,"option-select",3,"change","value"],["value","browser"],["value","whisper"],["value","voice-message"],["for","voice-language-select",1,"option-label"],["id","voice-language-select",1,"option-select",3,"ngModelChange","change","ngModel"],[3,"value"],["type","radio","name","voiceAnnounce",3,"ngModelChange","change","value","ngModel"],["type","radio","name","voiceMode","value","speech",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceMode","value","notification",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceReadFull",3,"ngModelChange","change","value","ngModel"],["for","voice-select",1,"option-label"],["id","voice-select",1,"option-select",3,"ngModelChange","change","ngModel","disabled"],["value",""],["role","button","tabindex","0","title","Test voice with current settings",1,"test-voice-link",3,"click"],[1,"thread-name"],["for","voice-volume-slider",1,"option-label"],["id","voice-volume-slider","type","range","min","0","max","100","step","5",1,"option-slider",3,"ngModelChange","input","ngModel"],["for","voice-rate-slider",1,"option-label"],["id","voice-rate-slider","type","range","min","50","max","200","step","10",1,"option-slider",3,"ngModelChange","input","ngModel"],[1,"error-icon"],[1,"error-message"]],template:function(t,n){t&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),GC(4,"palette"),pl(),ws(5,"span"),GC(6,"Appearance"),pl()(),ws(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(11,"span",7),GC(12," Light "),pl(),ws(13,"label",5)(14,"input",8),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(15,"span",7),GC(16," Dark "),pl(),ws(17,"label",5)(18,"input",9),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(19,"span",7),GC(20," System "),pl()()()(),ws(21,"div",1)(22,"div",2)(23,"mat-icon"),GC(24,"chat_bubble_outline"),pl(),ws(25,"span"),GC(26,"Messaging"),pl()(),ws(27,"div",3)(28,"span",10),GC(29,"Send message behavior:"),pl(),ws(30,"div",4)(31,"label",5)(32,"input",11),tm("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Rg("change",function(){return n.onEnterToSendChange()}),pl(),VI(),Sg(33,"span",7),GC(34," Enter to send "),pl(),ws(35,"label",5)(36,"input",11),tm("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Rg("change",function(){return n.onEnterToSendChange()}),pl(),VI(),Sg(37,"span",7),GC(38," Enter for new line "),pl()()(),ws(39,"div",3)(40,"div",12)(41,"span",10),GC(42,"Show technical messages"),pl(),ws(43,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.showTechnicalMessages,o)||(n.showTechnicalMessages=o),o}),Rg("change",function(){return n.onShowTechnicalMessagesChange()}),pl(),VI(),pl()(),ws(44,"div",3)(45,"div",12)(46,"span",10),GC(47,"Show warning messages"),pl(),ws(48,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.showWarningMessages,o)||(n.showWarningMessages=o),o}),Rg("change",function(){return n.onShowWarningMessagesChange()}),pl(),VI(),pl()(),ws(49,"div",3)(50,"div",12)(51,"span",10),GC(52,"Include technical messages in print"),pl(),ws(53,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.printTechnicalMessages,o)||(n.printTechnicalMessages=o),o}),Rg("change",function(){return n.onPrintTechnicalMessagesChange()}),pl(),VI(),pl()()(),ws(54,"div",1)(55,"div",2)(56,"mat-icon"),GC(57,"rocket_launch"),pl(),ws(58,"span"),GC(59,"Mission Control"),pl()(),ws(60,"div",3)(61,"div",12)(62,"div",14)(63,"span",10),GC(64,"Side-by-side thread preview"),pl(),ws(65,"span",15),GC(66,"Click a mission card to open a preview panel. Recommended for large screens."),pl()(),ws(67,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.missionPreviewEnabled,o)||(n.missionPreviewEnabled=o),o}),Rg("change",function(){return n.onMissionPreviewEnabledChange()}),pl(),VI(),pl()()(),ws(68,"div",1)(69,"div",2)(70,"mat-icon"),GC(71,"notifications"),pl(),ws(72,"span"),GC(73,"Notifications"),pl()(),ws(74,"div",3)(75,"div",12)(76,"span",10),GC(77,"Notify when the agent answers or requests input"),pl(),ws(78,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.agentNotificationEnabled,o)||(n.agentNotificationEnabled=o),o}),Rg("change",function(){return n.onAgentNotificationEnabledChange()}),pl(),VI(),pl()(),ws(79,"div",3)(80,"div",12)(81,"span",10),GC(82,"Notification sound"),pl(),ws(83,"mat-slide-toggle",16),tm("ngModelChange",function(o){return KC(n.notificationSoundEnabled,o)||(n.notificationSoundEnabled=o),o}),Rg("change",function(){return n.onNotificationSoundEnabledChange()}),pl(),VI(),pl()(),ws(84,"div",3)(85,"div",12)(86,"span",10),GC(87,"Browser notification"),pl(),ws(88,"mat-slide-toggle",16),tm("ngModelChange",function(o){return KC(n.browserNotificationEnabled,o)||(n.browserNotificationEnabled=o),o}),Rg("change",function(){return n.onBrowserNotificationEnabledChange()}),pl(),VI(),pl(),Jw(89,st,5,0,"div",17),pl()(),ws(90,"div",1)(91,"div",2)(92,"mat-icon"),GC(93,"record_voice_over"),pl(),ws(94,"span"),GC(95,"Voice & Speech"),pl()(),ws(96,"div",3)(97,"label",18),GC(98,"Voice input method:"),pl(),ws(99,"select",19),Rg("change",function(o){return n.onVoiceInputModeChange(o)}),ws(100,"option",20),GC(101,"Browser (real-time)"),pl(),ws(102,"option",21),GC(103,"Whisper (higher accuracy)"),pl(),ws(104,"option",22),GC(105,"Voice message (send audio)"),pl()()(),ws(106,"div",3)(107,"label",23),GC(108,"Voice recognition language:"),pl(),ws(109,"select",24),tm("ngModelChange",function(o){return KC(n.selectedVoiceLanguage,o)||(n.selectedVoiceLanguage=o),o}),Rg("change",function(){return n.onVoiceLanguageChange()}),rC(110,ct,2,3,"option",25,rt),pl(),VI(),pl(),ws(112,"div",3)(113,"span",10),GC(114,"Automatic announcement:"),pl(),ws(115,"div",4)(116,"label",5)(117,"input",26),tm("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Rg("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),VI(),Sg(118,"span",7),GC(119," Enabled "),pl(),ws(120,"label",5)(121,"input",26),tm("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Rg("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),VI(),Sg(122,"span",7),GC(123," Disabled "),pl()()(),ws(124,"div",3)(125,"span",10),GC(126,"Voice mode:"),pl(),ws(127,"div",4)(128,"label",5)(129,"input",27),tm("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Rg("change",function(){return n.onVoiceModeChange()}),pl(),VI(),Sg(130,"span",7),GC(131," Voice synthesis "),pl(),ws(132,"label",5)(133,"input",28),tm("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Rg("change",function(){return n.onVoiceModeChange()}),pl(),VI(),Sg(134,"span",7),GC(135," Sound notification "),pl()()(),ws(136,"div",3)(137,"span",10),GC(138,"Message reading:"),pl(),ws(139,"div",4)(140,"label",5)(141,"input",29),tm("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Rg("change",function(){return n.onVoiceReadFullTextChange()}),pl(),VI(),Sg(142,"span",7),GC(143," Full message "),pl(),ws(144,"label",5)(145,"input",29),tm("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Rg("change",function(){return n.onVoiceReadFullTextChange()}),pl(),VI(),Sg(146,"span",7),GC(147," First paragraphs only "),pl()()(),ws(148,"div",3)(149,"label",30),GC(150,"Selected voice:"),pl(),ws(151,"select",31),tm("ngModelChange",function(o){return KC(n.selectedVoiceId,o)||(n.selectedVoiceId=o),o}),Rg("change",function(){return n.onSelectedVoiceChange()}),Jw(152,lt,2,0,"option",32),Jw(153,dt,2,0,"option",32),rC(154,pt,2,2,"option",25,at),pl(),VI(),Sg(156,"div",10),ws(157,"a",33),Rg("click",function(){return n.testVoice()}),ws(158,"span",34),GC(159,"Test voice"),pl()()(),ws(160,"div",3)(161,"label",35),GC(162),pl(),ws(163,"input",36),tm("ngModelChange",function(o){return KC(n.voiceVolume,o)||(n.voiceVolume=o),o}),Rg("input",function(){return n.onVoiceVolumeChange()}),pl(),VI(),pl(),ws(164,"div",3)(165,"label",37),GC(166),pl(),ws(167,"input",38),tm("ngModelChange",function(o){return KC(n.voiceRate,o)||(n.voiceRate=o),o}),Rg("input",function(){return n.onVoiceRateChange()}),pl(),VI(),pl()()()),t&2&&(XE(10),em("ngModel",n.selectedTheme),UI(),XE(4),em("ngModel",n.selectedTheme),UI(),XE(4),em("ngModel",n.selectedTheme),UI(),XE(14),bg("value",true),em("ngModel",n.useEnterToSend),UI(),XE(4),bg("value",false),em("ngModel",n.useEnterToSend),UI(),XE(7),em("ngModel",n.showTechnicalMessages),UI(),XE(5),em("ngModel",n.showWarningMessages),UI(),XE(5),em("ngModel",n.printTechnicalMessages),UI(),XE(14),em("ngModel",n.missionPreviewEnabled),UI(),XE(11),em("ngModel",n.agentNotificationEnabled),UI(),XE(5),em("ngModel",n.notificationSoundEnabled),bg("disabled",!n.agentNotificationEnabled),UI(),XE(5),em("ngModel",n.browserNotificationEnabled),bg("disabled",!n.agentNotificationEnabled||n.browserNotificationDenied),UI(),XE(),eC(n.browserNotificationDenied?89:-1),XE(10),bg("value",n.voiceInputMode),XE(10),em("ngModel",n.selectedVoiceLanguage),UI(),XE(),oC(n.voiceLanguageOptions),XE(7),bg("value",true),em("ngModel",n.voiceAnnounceEnabled),UI(),XE(4),bg("value",false),em("ngModel",n.voiceAnnounceEnabled),UI(),XE(8),em("ngModel",n.voiceMode),UI(),XE(4),em("ngModel",n.voiceMode),UI(),XE(8),bg("value",true),em("ngModel",n.voiceReadFullText),UI(),XE(4),bg("value",false),em("ngModel",n.voiceReadFullText),UI(),XE(6),em("ngModel",n.selectedVoiceId),bg("disabled",n.loadingVoices||n.availableVoices.length===0),UI(),XE(),eC(n.loadingVoices?152:-1),XE(),eC(!n.loadingVoices&&n.availableVoices.length===0?153:-1),XE(),oC(n.availableVoices),XE(8),vl("Volume: ",n.voiceVolume,"%"),XE(),em("ngModel",n.voiceVolume),UI(),XE(3),vl("Speed: ",n.voiceRate,"%"),XE(),em("ngModel",n.voiceRate),UI());},dependencies:[ti,Qn,ei,Ye$1,_n,At,mn,Zn,cn,wt,se],styles:['.options-content[_ngcontent-%COMP%]{padding:0;width:100%}.option-group[_ngcontent-%COMP%]{padding:0 1rem 1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border-light)}.option-group[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.option-label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:var(--color-text);font-size:.875rem}.toggle-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.toggle-option[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0;flex:1}.toggle-option[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{flex-shrink:0}.option-label-with-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1}.option-label-with-hint[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0}.option-label-with-hint[_ngcontent-%COMP%] .option-hint[_ngcontent-%COMP%]{font-size:.775rem;color:var(--color-text-secondary);line-height:1.4}.option-select[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-input-bg);color:var(--color-text);font-size:.875rem;cursor:pointer}.option-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px #7064fb1a}.option-select[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.option-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{padding:.5rem}.option-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:18px;height:18px;border:2px solid var(--color-border);border-radius:3px;margin-right:.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{content:"";width:10px;height:6px;border-left:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(-45deg);transition:all .2s ease;opacity:0}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]{background-color:var(--color-primary);border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]:after{border-left-color:#fff;border-bottom-color:#fff;opacity:1}.option-checkbox[_ngcontent-%COMP%]:hover .checkmark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%]:focus-within .checkmark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-section[_ngcontent-%COMP%]{padding-top:1rem;margin-top:1rem;border-top:2px solid var(--color-border)}.option-section[_ngcontent-%COMP%]:first-child{border-top:none;padding-top:0;margin-top:0}.section-title[_ngcontent-%COMP%]{margin:0 0 1rem;padding:0 1rem;font-size:.9rem;font-weight:600;color:var(--color-text);display:flex;align-items:center;gap:.5rem}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.option-radio[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{display:none}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid var(--color-border);border-radius:50%;margin-right:.5rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;position:relative}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]:after{content:"";width:8px;height:8px;border-radius:50%;background-color:var(--color-primary);transition:all .2s ease;opacity:0;transform:scale(0)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.option-radio[_ngcontent-%COMP%]:hover .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%]:focus-within .radio-mark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-slider[_ngcontent-%COMP%]{width:100%;height:6px;border-radius:3px;background:var(--color-bg-solid);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-webkit-slider-track{height:6px;border-radius:3px;background:var(--color-bg-secondary)}.option-slider[_ngcontent-%COMP%]::-moz-range-track{height:6px;border-radius:3px;background:var(--color-bg-secondary);border:none}.option-slider[_ngcontent-%COMP%]:focus{outline:none}.option-slider[_ngcontent-%COMP%]:focus::-webkit-slider-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.option-slider[_ngcontent-%COMP%]:focus::-moz-range-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.test-voice-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.test-voice-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 2px 8px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 1px 4px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:disabled{background:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;transform:none;box-shadow:none}.test-voice-link[_ngcontent-%COMP%]{text-decoration-thickness:1.5px;text-underline-offset:3px;background:transparent;border:none;padding:0;font-size:.775rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:underline}.test-voice-link[_ngcontent-%COMP%]:hover{color:var(--color-primary-hover, var(--color-primary));text-decoration-thickness:2px}.test-voice-link[_ngcontent-%COMP%]:active{opacity:.8}.test-voice-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.test-voice-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.notification-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.75rem;margin-top:.75rem;background-color:#d32f2f1a;border:1px solid rgba(211,47,47,.3);border-radius:6px;font-size:.8125rem;line-height:1.5}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#d32f2f;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:var(--color-text);flex:1}.notification-error[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;background-color:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:6px;display:flex;align-items:flex-start;gap:.5rem}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#f44336;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text);line-height:1.5;flex:1}'],changeDetection:1})};function Qe(c){let e=c.args??"",t;try{let n=JSON.parse(e);t=JSON.stringify(n,null,2);}catch(n){t=e;}return `\u{1F527} ${c.name}
|
|
178
|
+
`).map(t=>this.addPeriodIfNeeded(t.trim())).filter(t=>t.length>0).join(" ")}addPeriodIfNeeded(e){return e?/[.!?;:]$/.test(e)?e:e+".":""}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};var rt=(c,e)=>e.code,at=(c,e)=>e.name+e.lang;function st(c,e){c&1&&(ws(0,"div",17)(1,"mat-icon",39),GC(2,"warning"),pl(),ws(3,"span",40),GC(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),pl()());}function ct(c,e){if(c&1&&(ws(0,"option",25),GC(1),pl()),c&2){let t=e.$implicit;bg("value",t.code),XE(),Qg("",t.flag," ",t.label);}}function lt(c,e){c&1&&(ws(0,"option",32),GC(1,"Loading voices..."),pl());}function dt(c,e){c&1&&(ws(0,"option",32),GC(1,"No voice available"),pl());}function pt(c,e){if(c&1&&(ws(0,"option",25),GC(1),pl()),c&2){let t=e.$implicit;bg("value",t.name+"|"+t.lang),XE(),vl(" ",t.displayName," ");}}var Ye=class c{destroy$=new ue;selectedTheme="light";selectedThemeVariant="industry";selectedVoiceLanguage="en-US";useEnterToSend=false;printTechnicalMessages=false;showTechnicalMessages=true;showWarningMessages=true;voiceInputMode="browser";voiceAnnounceEnabled=false;voiceMode="speech";voiceReadFullText=false;voiceVolume=80;voiceRate=120;agentNotificationEnabled=false;notificationSoundEnabled=true;browserNotificationEnabled=false;browserNotificationDenied=false;missionPreviewEnabled=false;availableVoices=[];selectedVoiceId=null;loadingVoices=false;voiceLanguageOptions=[{code:"fr-FR",label:"Fran\xE7ais",flag:"\u{1F1EB}\u{1F1F7}"},{code:"en-US",label:"English (US)",flag:"\u{1F1FA}\u{1F1F8}"},{code:"en-GB",label:"English (UK)",flag:"\u{1F1EC}\u{1F1E7}"},{code:"es-ES",label:"Espa\xF1ol",flag:"\u{1F1EA}\u{1F1F8}"},{code:"de-DE",label:"Deutsch",flag:"\u{1F1E9}\u{1F1EA}"},{code:"it-IT",label:"Italiano",flag:"\u{1F1EE}\u{1F1F9}"},{code:"pt-BR",label:"Portugu\xEAs",flag:"\u{1F1E7}\u{1F1F7}"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4",flag:"\u{1F1F0}\u{1F1F7}"},{code:"zh-CN",label:"\u4E2D\u6587 (\u7B80\u4F53)",flag:"\u{1F1E8}\u{1F1F3}"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",flag:"\u{1F1F7}\u{1F1FA}"},{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",flag:"\u{1F1F8}\u{1F1E6}"}];preferencesService=g(L);voiceSynthesisService=g(z);themeService=g(me);ngOnInit(){let e=this.themeService.getCurrentTheme();this.selectedTheme=e.mode,this.selectedThemeVariant=e.variant,this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.showTechnicalMessages=!this.preferencesService.getHideTechnicalMessages(),this.showWarningMessages=!this.preferencesService.getHideWarningMessages(),this.voiceInputMode=this.preferencesService.getVoiceInputMode(),this.voiceAnnounceEnabled=this.preferencesService.getVoiceAnnounceEnabled(),this.voiceMode=this.preferencesService.getVoiceMode(),this.voiceReadFullText=this.preferencesService.getVoiceReadFullText(),this.voiceVolume=Math.round(this.preferencesService.getVoiceVolume()*100),this.voiceRate=Math.round(this.preferencesService.getVoiceRate()*100),this.selectedVoiceId=this.preferencesService.getSelectedVoice(),this.agentNotificationEnabled=this.preferencesService.getAgentNotificationEnabled(),this.notificationSoundEnabled=this.preferencesService.getNotificationSoundEnabled(),this.browserNotificationEnabled=this.preferencesService.getBrowserNotificationEnabled(),this.missionPreviewEnabled=this.preferencesService.getMissionPreviewEnabled(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe(Cd(this.destroy$)).subscribe(t=>{this.selectedTheme=t.mode,this.selectedThemeVariant=t.variant;}),this.preferencesService.voiceLanguage$.pipe(Cd(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t;}),this.preferencesService.enterToSend$.pipe(Cd(this.destroy$)).subscribe(t=>{this.useEnterToSend=t;}),this.preferencesService.printTechnicalMessages$.pipe(Cd(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t;}),this.preferencesService.hideTechnicalMessages$.pipe(Cd(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t;}),this.preferencesService.hideWarningMessages$.pipe(Cd(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t;}),this.preferencesService.voiceInputMode$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceInputMode=t;}),this.preferencesService.voiceAnnounceEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t;}),this.preferencesService.voiceMode$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceMode=t;}),this.preferencesService.voiceReadFullText$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t;}),this.preferencesService.voiceVolume$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100);}),this.preferencesService.voiceRate$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100);}),this.preferencesService.selectedVoice$.pipe(Cd(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t;}),this.preferencesService.voiceLanguage$.pipe(Cd(this.destroy$)).subscribe(()=>{this.loadAvailableVoices();}),this.preferencesService.agentNotificationEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t;}),this.preferencesService.notificationSoundEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t;}),this.preferencesService.browserNotificationEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission();}),this.preferencesService.missionPreviewEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.missionPreviewEnabled=t;});}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme({variant:this.selectedThemeVariant,mode:this.selectedTheme});}onVoiceLanguageChange(){console.log("[OPTIONS] Voice language changed to:",this.selectedVoiceLanguage),this.preferencesService.setVoiceLanguage(this.selectedVoiceLanguage);}onEnterToSendChange(){console.log("[OPTIONS] Enter to send changed to:",this.useEnterToSend),this.preferencesService.setEnterToSend(this.useEnterToSend);}onPrintTechnicalMessagesChange(){console.log("[OPTIONS] Print technical messages changed to:",this.printTechnicalMessages),this.preferencesService.setPrintTechnicalMessages(this.printTechnicalMessages);}onShowTechnicalMessagesChange(){let e=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",e,")"),this.preferencesService.setHideTechnicalMessages(e);}onShowWarningMessagesChange(){let e=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",e,")"),this.preferencesService.setHideWarningMessages(e);}onVoiceInputModeChange(e){let t=e.target.value;console.log("[OPTIONS] Voice input mode changed to:",t),this.preferencesService.setVoiceInputMode(t);}onVoiceAnnounceEnabledChange(){console.log("[OPTIONS] Voice announce enabled changed to:",this.voiceAnnounceEnabled),this.preferencesService.setVoiceAnnounceEnabled(this.voiceAnnounceEnabled);}onVoiceModeChange(){console.log("[OPTIONS] Voice mode changed to:",this.voiceMode),this.preferencesService.setVoiceMode(this.voiceMode);}onVoiceReadFullTextChange(){console.log("[OPTIONS] Voice read full text changed to:",this.voiceReadFullText),this.preferencesService.setVoiceReadFullText(this.voiceReadFullText);}onVoiceVolumeChange(){let e=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",e),this.preferencesService.setVoiceVolume(e);}onVoiceRateChange(){let e=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",e),this.preferencesService.setVoiceRate(e);}loadAvailableVoices(){return B(this,null,function*(){this.loadingVoices=true;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language");}catch(e){console.error("[OPTIONS] Error loading voices:",e),this.availableVoices=[];}finally{this.loadingVoices=false;}})}onSelectedVoiceChange(){console.log("[OPTIONS] Selected voice changed to:",this.selectedVoiceId),this.preferencesService.setSelectedVoice(this.selectedVoiceId);}testVoice(){console.log("[OPTIONS] Testing voice with current settings"),this.voiceSynthesisService.testSelectedVoice();}onAgentNotificationEnabledChange(){console.log("[OPTIONS] Agent notification enabled changed to:",this.agentNotificationEnabled),this.preferencesService.setAgentNotificationEnabled(this.agentNotificationEnabled);}onNotificationSoundEnabledChange(){console.log("[OPTIONS] Notification sound enabled changed to:",this.notificationSoundEnabled),this.preferencesService.setNotificationSoundEnabled(this.notificationSoundEnabled);}onBrowserNotificationEnabledChange(){console.log("[OPTIONS] Browser notification enabled changed to:",this.browserNotificationEnabled),this.preferencesService.setBrowserNotificationEnabled(this.browserNotificationEnabled);}onMissionPreviewEnabledChange(){console.log("[OPTIONS] Mission preview panel enabled changed to:",this.missionPreviewEnabled),this.preferencesService.setMissionPreviewEnabled(this.missionPreviewEnabled);}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission));}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-options-panel"]],decls:168,vars:37,consts:[[1,"options-content"],[1,"option-section"],[1,"section-title"],[1,"option-group"],[1,"radio-group"],[1,"option-radio"],["type","radio","name","theme","value","light",3,"ngModelChange","change","ngModel"],[1,"radio-mark"],["type","radio","name","theme","value","dark",3,"ngModelChange","change","ngModel"],["type","radio","name","theme","value","system",3,"ngModelChange","change","ngModel"],[1,"option-label"],["type","radio","name","enterBehavior",3,"ngModelChange","change","value","ngModel"],[1,"toggle-option"],["color","primary",3,"ngModelChange","change","ngModel"],[1,"option-label-with-hint"],[1,"option-hint"],["color","primary",3,"ngModelChange","change","ngModel","disabled"],[1,"notification-error"],["for","voice-input-mode-select",1,"option-label"],["id","voice-input-mode-select",1,"option-select",3,"change","value"],["value","browser"],["value","whisper"],["value","voice-message"],["for","voice-language-select",1,"option-label"],["id","voice-language-select",1,"option-select",3,"ngModelChange","change","ngModel"],[3,"value"],["type","radio","name","voiceAnnounce",3,"ngModelChange","change","value","ngModel"],["type","radio","name","voiceMode","value","speech",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceMode","value","notification",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceReadFull",3,"ngModelChange","change","value","ngModel"],["for","voice-select",1,"option-label"],["id","voice-select",1,"option-select",3,"ngModelChange","change","ngModel","disabled"],["value",""],["role","button","tabindex","0","title","Test voice with current settings",1,"test-voice-link",3,"click"],[1,"thread-name"],["for","voice-volume-slider",1,"option-label"],["id","voice-volume-slider","type","range","min","0","max","100","step","5",1,"option-slider",3,"ngModelChange","input","ngModel"],["for","voice-rate-slider",1,"option-label"],["id","voice-rate-slider","type","range","min","50","max","200","step","10",1,"option-slider",3,"ngModelChange","input","ngModel"],[1,"error-icon"],[1,"error-message"]],template:function(t,n){t&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),GC(4,"palette"),pl(),ws(5,"span"),GC(6,"Appearance"),pl()(),ws(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(11,"span",7),GC(12," Light "),pl(),ws(13,"label",5)(14,"input",8),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(15,"span",7),GC(16," Dark "),pl(),ws(17,"label",5)(18,"input",9),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(19,"span",7),GC(20," System "),pl()()()(),ws(21,"div",1)(22,"div",2)(23,"mat-icon"),GC(24,"chat_bubble_outline"),pl(),ws(25,"span"),GC(26,"Messaging"),pl()(),ws(27,"div",3)(28,"span",10),GC(29,"Send message behavior:"),pl(),ws(30,"div",4)(31,"label",5)(32,"input",11),tm("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Rg("change",function(){return n.onEnterToSendChange()}),pl(),VI(),Sg(33,"span",7),GC(34," Enter to send "),pl(),ws(35,"label",5)(36,"input",11),tm("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Rg("change",function(){return n.onEnterToSendChange()}),pl(),VI(),Sg(37,"span",7),GC(38," Enter for new line "),pl()()(),ws(39,"div",3)(40,"div",12)(41,"span",10),GC(42,"Show technical messages"),pl(),ws(43,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.showTechnicalMessages,o)||(n.showTechnicalMessages=o),o}),Rg("change",function(){return n.onShowTechnicalMessagesChange()}),pl(),VI(),pl()(),ws(44,"div",3)(45,"div",12)(46,"span",10),GC(47,"Show warning messages"),pl(),ws(48,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.showWarningMessages,o)||(n.showWarningMessages=o),o}),Rg("change",function(){return n.onShowWarningMessagesChange()}),pl(),VI(),pl()(),ws(49,"div",3)(50,"div",12)(51,"span",10),GC(52,"Include technical messages in print"),pl(),ws(53,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.printTechnicalMessages,o)||(n.printTechnicalMessages=o),o}),Rg("change",function(){return n.onPrintTechnicalMessagesChange()}),pl(),VI(),pl()()(),ws(54,"div",1)(55,"div",2)(56,"mat-icon"),GC(57,"rocket_launch"),pl(),ws(58,"span"),GC(59,"Mission Control"),pl()(),ws(60,"div",3)(61,"div",12)(62,"div",14)(63,"span",10),GC(64,"Side-by-side thread preview"),pl(),ws(65,"span",15),GC(66,"Click a mission card to open a preview panel. Recommended for large screens."),pl()(),ws(67,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.missionPreviewEnabled,o)||(n.missionPreviewEnabled=o),o}),Rg("change",function(){return n.onMissionPreviewEnabledChange()}),pl(),VI(),pl()()(),ws(68,"div",1)(69,"div",2)(70,"mat-icon"),GC(71,"notifications"),pl(),ws(72,"span"),GC(73,"Notifications"),pl()(),ws(74,"div",3)(75,"div",12)(76,"span",10),GC(77,"Notify when the agent answers or requests input"),pl(),ws(78,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.agentNotificationEnabled,o)||(n.agentNotificationEnabled=o),o}),Rg("change",function(){return n.onAgentNotificationEnabledChange()}),pl(),VI(),pl()(),ws(79,"div",3)(80,"div",12)(81,"span",10),GC(82,"Notification sound"),pl(),ws(83,"mat-slide-toggle",16),tm("ngModelChange",function(o){return KC(n.notificationSoundEnabled,o)||(n.notificationSoundEnabled=o),o}),Rg("change",function(){return n.onNotificationSoundEnabledChange()}),pl(),VI(),pl()(),ws(84,"div",3)(85,"div",12)(86,"span",10),GC(87,"Browser notification"),pl(),ws(88,"mat-slide-toggle",16),tm("ngModelChange",function(o){return KC(n.browserNotificationEnabled,o)||(n.browserNotificationEnabled=o),o}),Rg("change",function(){return n.onBrowserNotificationEnabledChange()}),pl(),VI(),pl(),Jw(89,st,5,0,"div",17),pl()(),ws(90,"div",1)(91,"div",2)(92,"mat-icon"),GC(93,"record_voice_over"),pl(),ws(94,"span"),GC(95,"Voice & Speech"),pl()(),ws(96,"div",3)(97,"label",18),GC(98,"Voice input method:"),pl(),ws(99,"select",19),Rg("change",function(o){return n.onVoiceInputModeChange(o)}),ws(100,"option",20),GC(101,"Browser (real-time)"),pl(),ws(102,"option",21),GC(103,"Whisper (higher accuracy)"),pl(),ws(104,"option",22),GC(105,"Voice message (send audio)"),pl()()(),ws(106,"div",3)(107,"label",23),GC(108,"Voice recognition language:"),pl(),ws(109,"select",24),tm("ngModelChange",function(o){return KC(n.selectedVoiceLanguage,o)||(n.selectedVoiceLanguage=o),o}),Rg("change",function(){return n.onVoiceLanguageChange()}),rC(110,ct,2,3,"option",25,rt),pl(),VI(),pl(),ws(112,"div",3)(113,"span",10),GC(114,"Automatic announcement:"),pl(),ws(115,"div",4)(116,"label",5)(117,"input",26),tm("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Rg("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),VI(),Sg(118,"span",7),GC(119," Enabled "),pl(),ws(120,"label",5)(121,"input",26),tm("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Rg("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),VI(),Sg(122,"span",7),GC(123," Disabled "),pl()()(),ws(124,"div",3)(125,"span",10),GC(126,"Voice mode:"),pl(),ws(127,"div",4)(128,"label",5)(129,"input",27),tm("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Rg("change",function(){return n.onVoiceModeChange()}),pl(),VI(),Sg(130,"span",7),GC(131," Voice synthesis "),pl(),ws(132,"label",5)(133,"input",28),tm("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Rg("change",function(){return n.onVoiceModeChange()}),pl(),VI(),Sg(134,"span",7),GC(135," Sound notification "),pl()()(),ws(136,"div",3)(137,"span",10),GC(138,"Message reading:"),pl(),ws(139,"div",4)(140,"label",5)(141,"input",29),tm("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Rg("change",function(){return n.onVoiceReadFullTextChange()}),pl(),VI(),Sg(142,"span",7),GC(143," Full message "),pl(),ws(144,"label",5)(145,"input",29),tm("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Rg("change",function(){return n.onVoiceReadFullTextChange()}),pl(),VI(),Sg(146,"span",7),GC(147," First paragraphs only "),pl()()(),ws(148,"div",3)(149,"label",30),GC(150,"Selected voice:"),pl(),ws(151,"select",31),tm("ngModelChange",function(o){return KC(n.selectedVoiceId,o)||(n.selectedVoiceId=o),o}),Rg("change",function(){return n.onSelectedVoiceChange()}),Jw(152,lt,2,0,"option",32),Jw(153,dt,2,0,"option",32),rC(154,pt,2,2,"option",25,at),pl(),VI(),Sg(156,"div",10),ws(157,"a",33),Rg("click",function(){return n.testVoice()}),ws(158,"span",34),GC(159,"Test voice"),pl()()(),ws(160,"div",3)(161,"label",35),GC(162),pl(),ws(163,"input",36),tm("ngModelChange",function(o){return KC(n.voiceVolume,o)||(n.voiceVolume=o),o}),Rg("input",function(){return n.onVoiceVolumeChange()}),pl(),VI(),pl(),ws(164,"div",3)(165,"label",37),GC(166),pl(),ws(167,"input",38),tm("ngModelChange",function(o){return KC(n.voiceRate,o)||(n.voiceRate=o),o}),Rg("input",function(){return n.onVoiceRateChange()}),pl(),VI(),pl()()()),t&2&&(XE(10),em("ngModel",n.selectedTheme),UI(),XE(4),em("ngModel",n.selectedTheme),UI(),XE(4),em("ngModel",n.selectedTheme),UI(),XE(14),bg("value",true),em("ngModel",n.useEnterToSend),UI(),XE(4),bg("value",false),em("ngModel",n.useEnterToSend),UI(),XE(7),em("ngModel",n.showTechnicalMessages),UI(),XE(5),em("ngModel",n.showWarningMessages),UI(),XE(5),em("ngModel",n.printTechnicalMessages),UI(),XE(14),em("ngModel",n.missionPreviewEnabled),UI(),XE(11),em("ngModel",n.agentNotificationEnabled),UI(),XE(5),em("ngModel",n.notificationSoundEnabled),bg("disabled",!n.agentNotificationEnabled),UI(),XE(5),em("ngModel",n.browserNotificationEnabled),bg("disabled",!n.agentNotificationEnabled||n.browserNotificationDenied),UI(),XE(),eC(n.browserNotificationDenied?89:-1),XE(10),bg("value",n.voiceInputMode),XE(10),em("ngModel",n.selectedVoiceLanguage),UI(),XE(),oC(n.voiceLanguageOptions),XE(7),bg("value",true),em("ngModel",n.voiceAnnounceEnabled),UI(),XE(4),bg("value",false),em("ngModel",n.voiceAnnounceEnabled),UI(),XE(8),em("ngModel",n.voiceMode),UI(),XE(4),em("ngModel",n.voiceMode),UI(),XE(8),bg("value",true),em("ngModel",n.voiceReadFullText),UI(),XE(4),bg("value",false),em("ngModel",n.voiceReadFullText),UI(),XE(6),em("ngModel",n.selectedVoiceId),bg("disabled",n.loadingVoices||n.availableVoices.length===0),UI(),XE(),eC(n.loadingVoices?152:-1),XE(),eC(!n.loadingVoices&&n.availableVoices.length===0?153:-1),XE(),oC(n.availableVoices),XE(8),vl("Volume: ",n.voiceVolume,"%"),XE(),em("ngModel",n.voiceVolume),UI(),XE(3),vl("Speed: ",n.voiceRate,"%"),XE(),em("ngModel",n.voiceRate),UI());},dependencies:[ti,Qn,ei,Ye$1,_n,At,mn,Zn,cn,wt,se],styles:['.options-content[_ngcontent-%COMP%]{padding:0;width:100%}.option-group[_ngcontent-%COMP%]{padding:0 1rem 1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border-light)}.option-group[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.option-label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:var(--color-text);font-size:.875rem}.toggle-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.toggle-option[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0;flex:1}.toggle-option[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{flex-shrink:0}.option-label-with-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1}.option-label-with-hint[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0}.option-label-with-hint[_ngcontent-%COMP%] .option-hint[_ngcontent-%COMP%]{font-size:.775rem;color:var(--color-text-secondary);line-height:1.4}.option-select[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-input-bg);color:var(--color-text);font-size:.875rem;cursor:pointer}.option-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px #7064fb1a}.option-select[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.option-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{padding:.5rem}.option-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:18px;height:18px;border:2px solid var(--color-border);border-radius:3px;margin-right:.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{content:"";width:10px;height:6px;border-left:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(-45deg);transition:all .2s ease;opacity:0}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]{background-color:var(--color-primary);border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]:after{border-left-color:#fff;border-bottom-color:#fff;opacity:1}.option-checkbox[_ngcontent-%COMP%]:hover .checkmark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%]:focus-within .checkmark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-section[_ngcontent-%COMP%]{padding-top:1rem;margin-top:1rem;border-top:2px solid var(--color-border)}.option-section[_ngcontent-%COMP%]:first-child{border-top:none;padding-top:0;margin-top:0}.section-title[_ngcontent-%COMP%]{margin:0 0 1rem;padding:0 1rem;font-size:.9rem;font-weight:600;color:var(--color-text);display:flex;align-items:center;gap:.5rem}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.option-radio[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{display:none}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid var(--color-border);border-radius:50%;margin-right:.5rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;position:relative}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]:after{content:"";width:8px;height:8px;border-radius:50%;background-color:var(--color-primary);transition:all .2s ease;opacity:0;transform:scale(0)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.option-radio[_ngcontent-%COMP%]:hover .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%]:focus-within .radio-mark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-slider[_ngcontent-%COMP%]{width:100%;height:6px;border-radius:3px;background:var(--color-bg-solid);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-webkit-slider-track{height:6px;border-radius:3px;background:var(--color-bg-secondary)}.option-slider[_ngcontent-%COMP%]::-moz-range-track{height:6px;border-radius:3px;background:var(--color-bg-secondary);border:none}.option-slider[_ngcontent-%COMP%]:focus{outline:none}.option-slider[_ngcontent-%COMP%]:focus::-webkit-slider-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.option-slider[_ngcontent-%COMP%]:focus::-moz-range-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.test-voice-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.test-voice-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 2px 8px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 1px 4px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:disabled{background:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;transform:none;box-shadow:none}.test-voice-link[_ngcontent-%COMP%]{text-decoration-thickness:1.5px;text-underline-offset:3px;background:transparent;border:none;padding:0;font-size:.775rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:underline}.test-voice-link[_ngcontent-%COMP%]:hover{color:var(--color-primary-hover, var(--color-primary));text-decoration-thickness:2px}.test-voice-link[_ngcontent-%COMP%]:active{opacity:.8}.test-voice-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.test-voice-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.notification-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.75rem;margin-top:.75rem;background-color:#d32f2f1a;border:1px solid rgba(211,47,47,.3);border-radius:6px;font-size:.8125rem;line-height:1.5}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#d32f2f;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:var(--color-text);flex:1}.notification-error[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;background-color:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:6px;display:flex;align-items:flex-start;gap:.5rem}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#f44336;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text);line-height:1.5;flex:1}'],changeDetection:1})};function Qe(c){let e=c.args??"",t;try{let n=JSON.parse(e);t=JSON.stringify(n,null,2);}catch(n){t=e;}return `\u{1F527} ${c.name}
|
|
179
179
|
|
|
180
|
-
${t}`}var Ge=class c{destroy$=new ue;currentProject=null;currentThread=null;messagesSubject=new Tr([]);isThinkingSubject=new Tr(false);currentChoiceSubject=new Tr(null);projectTitleSubject=new Tr("Coday");currentInviteEventSubject=new Tr(null);messageToRestoreSubject=new Tr("");threadUpdateEventSubject=new Tr(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new Tr("");subThreadEventsSubject=new ue;subThreadEvents$=this.subThreadEventsSubject.asObservable();subThreadEventBuffers=new Map;getBufferedSubThreadEvents(e){return this.subThreadEventBuffers.get(e)??[]}messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=g(fe);messageApi=g(be);userService=g(pe);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling();}setTabTitleService(e){this.tabTitleService=e;}connectToThread(e,t){this.currentProject=e,this.currentThread=t,this.eventStream.connectToThread(e,t);}loadHistoryFromRest(e){for(let t of e){let n=le(t);n&&this.handleEvent(n,true);}}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.subThreadEventBuffers.clear(),this.stopThinking();}sendMessage(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}let t=this.currentInviteEventSubject.value;if(t){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive(),this.currentInviteEventSubject.next(null);let n=t.buildAnswer(e);this.messageApi.sendMessage(n).subscribe({error:i=>{console.error("[CODAY] Send invite answer error:",i),this.currentInviteEventSubject.next(t),this.stopThinking();}});}else this.messageApi.sendFreeMessage(e).subscribe({error:n=>{console.error("[CODAY] Send error:",n);}});}sendChoice(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive();let t=this.currentChoiceEvent.buildAnswer(e);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(t).subscribe({next:()=>{},error:n=>{console.error("[CODAY-CHOICE] Choice error:",n),this.stopThinking();}});}else console.error("[CODAY-CHOICE] No choice event available for choice:",e);}deleteMessage(e){let t=this.messagesSubject.value.find(i=>i.id===e),n=this.extractTextContentFromMessage(t);return this.messageApi.deleteMessage(e).pipe(
|
|
180
|
+
${t}`}var Ge=class c{destroy$=new ue;currentProject=null;currentThread=null;messagesSubject=new Tr([]);isThinkingSubject=new Tr(false);currentChoiceSubject=new Tr(null);projectTitleSubject=new Tr("Coday");currentInviteEventSubject=new Tr(null);messageToRestoreSubject=new Tr("");threadUpdateEventSubject=new Tr(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new Tr("");subThreadEventsSubject=new ue;subThreadEvents$=this.subThreadEventsSubject.asObservable();subThreadEventBuffers=new Map;getBufferedSubThreadEvents(e){return this.subThreadEventBuffers.get(e)??[]}messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=g(fe);messageApi=g(be);userService=g(pe);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling();}setTabTitleService(e){this.tabTitleService=e;}connectToThread(e,t){this.currentProject=e,this.currentThread=t,this.eventStream.connectToThread(e,t);}loadHistoryFromRest(e){for(let t of e){let n=le(t);n&&this.handleEvent(n,true);}}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.subThreadEventBuffers.clear(),this.stopThinking();}sendMessage(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}let t=this.currentInviteEventSubject.value;if(t){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive(),this.currentInviteEventSubject.next(null);let n=t.buildAnswer(e);this.messageApi.sendMessage(n).subscribe({error:i=>{console.error("[CODAY] Send invite answer error:",i),this.currentInviteEventSubject.next(t),this.stopThinking();}});}else this.messageApi.sendFreeMessage(e).subscribe({error:n=>{console.error("[CODAY] Send error:",n);}});}sendChoice(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive();let t=this.currentChoiceEvent.buildAnswer(e);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(t).subscribe({next:()=>{},error:n=>{console.error("[CODAY-CHOICE] Choice error:",n),this.stopThinking();}});}else console.error("[CODAY-CHOICE] No choice event available for choice:",e);}deleteMessage(e){let t=this.messagesSubject.value.find(i=>i.id===e),n=this.extractTextContentFromMessage(t);return this.messageApi.deleteMessage(e).pipe(Od(i=>{i.success&&(this.removeMessagesFromIndex(e),n.trim()&&this.messageToRestoreSubject.next(n));}))}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}setThinkingForPendingMessage(){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive();}initializeEventHandling(){this.eventStream.events$.pipe(Cd(this.destroy$)).subscribe({next:e=>this.handleEvent(e),error:e=>console.error("[CODAY] Event stream error:",e),complete:()=>console.log("[CODAY] Event stream completed")});}handleEvent(e,t=false){if(e.threadId&&e.threadId!==this.currentThread){let n=this.subThreadEventBuffers.get(e.threadId);n?n.push(e):this.subThreadEventBuffers.set(e.threadId,[e]),this.subThreadEventsSubject.next(e);return}e instanceof T?this.handleMessageEvent(e):e instanceof B$1?this.handleTextChunkEvent(e):e instanceof A?this.handleTextEvent(e):e instanceof u?this.handleAnswerEvent(e):e instanceof h?this.handleErrorEvent(e):e instanceof M?this.handleWarnEvent(e):e instanceof O?this.handleThinkingEvent(e):e instanceof v?this.handleToolRequestEvent(e):e instanceof m?this.handleToolResponseEvent(e):e instanceof b?this.handleChoiceEvent(e,t):e instanceof F?this.handleHeartBeatEvent(e):e instanceof f?this.handleInviteEvent(e,t):e instanceof V?this.handleThreadUpdateEvent(e):e instanceof R?this.handleDelegationEvent(e):e instanceof H||e instanceof K||console.warn("[CODAY] Unhandled event type:",e.type);}handleDelegationEvent(e){if(console.log("[CODAY] DelegationEvent received:",e.subThreadId,e.agentName),this.messagesSubject.value.findIndex(i=>i.subThreadId===e.subThreadId)===-1){let i={id:e.timestamp,role:"system",speaker:e.agentName,content:[{type:"text",content:""}],timestamp:new Date,type:"delegation",subThreadId:e.subThreadId,delegationAgentName:e.agentName};this.addMessage(i);}}handleThreadUpdateEvent(e){this.threadUpdateEventSubject.next(e);}handleMessageEvent(e){e.role==="assistant"&&this.accumulatedChunks&&(this.accumulatedChunks="",this.streamingTextSubject.next(""));let t={id:e.timestamp,role:e.role,speaker:e.name,content:e.content,timestamp:e.date,type:"text"};this.addMessage(t);}handleTextChunkEvent(e){this.accumulatedChunks+=e.chunk,this.streamingTextSubject.next(this.accumulatedChunks);}handleTextEvent(e){let t={id:e.timestamp,role:e.speaker?"assistant":"system",speaker:e.speaker??"System",content:[{type:"text",content:e.text}],timestamp:e.date,type:e.speaker?"text":"technical"};this.addMessage(t);}handleAnswerEvent(e){let t=this.currentInviteEventSubject.value;if(t){let i=!!e.parentKey&&e.parentKey===t.timestamp,o=!e.parentKey&&e.date>=t.date;(i||o)&&this.currentInviteEventSubject.next(null);}if(this.currentChoiceEvent){let i=!!e.parentKey&&e.parentKey===this.currentChoiceEvent.timestamp,o=!e.parentKey&&e.date>=this.currentChoiceEvent.date;(i||o)&&(this.currentChoiceEvent=null,this.currentChoiceSubject.next(null));}if(e.silent)return;let n={id:e.timestamp,role:"user",speaker:e.name??this.userService.getUsername()??"User",content:[{type:"text",content:e.answer}],timestamp:e.date,type:"text",parentKey:e.parentKey,invite:e.invite};this.addMessage(n);}handleErrorEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Error: ${JSON.stringify(e.error)}`}],timestamp:e.date,type:"error"};this.addMessage(t);}handleWarnEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Warning: ${JSON.stringify(e.warning)}`}],timestamp:e.date,type:"warning"};this.addMessage(t);}handleThinkingEvent(e){this.currentInviteEventSubject.value||this.currentChoiceEvent||(this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive(),this.thinkingTimeout=setTimeout(()=>{this.isThinkingSubject.next(false),this.thinkingTimeout=null,this.tabTitleService?.setSystemInactive();},O.debounce+1e3));}handleToolRequestEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp,fullContent:Qe(e)};this.addMessage(t);}handleToolResponseEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp};this.addMessage(t);}handleChoiceEvent(e,t=false){this.stopThinking();let n={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite}],timestamp:e.date,type:"text"};if(this.addMessage(n),t||this.messagesSubject.value.some(y=>y.parentKey===e.timestamp||y.role==="user"&&y.timestamp>e.date||y.role==="assistant"&&y.timestamp>e.date))return;this.currentChoiceEvent=e,this.tabTitleService?.setSystemInactive();let E=e.options.map(y=>({value:y,label:y})),C=e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite;this.currentChoiceSubject.next({options:E,label:C,allowFreeText:e.allowFreeText});}handleHeartBeatEvent(e){}handleInviteEvent(e,t=false){if(this.stopThinking(),e.invite===_e)t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());else {let i={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.invite}],timestamp:e.date,type:"text"};this.addMessage(i),this.messagesSubject.value.some(C=>C.parentKey===e.timestamp||C.role==="user"&&C.timestamp>e.date||C.role==="assistant"&&C.timestamp>e.date)||t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());}}addMessage(e){let t=this.messagesSubject.value;t.some(n=>n.id===e.id)||this.messagesSubject.next([...t,e]);}removeMessagesFromIndex(e){let t=this.messagesSubject.value,n=t.findIndex(o=>o.id===e);if(n===-1||n===0)return;let i=t.slice(0,n);this.messagesSubject.next(i),this.stopThinking();}extractTextContentFromMessage(e){return e?e.content.filter(t=>t.type==="text").map(t=>t.content).join(`
|
|
181
181
|
|
|
182
182
|
`):""}clearThinkingTimeout(){this.thinkingTimeout&&(clearTimeout(this.thinkingTimeout),this.thinkingTimeout=null);}stopThinking(){this.clearThinkingTimeout(),this.isThinkingSubject.next(false),this.tabTitleService&&this.tabTitleService.setSystemInactive();}ngOnDestroy(){this.clearThinkingTimeout(),this.destroy$.next(),this.destroy$.complete(),this.currentInviteEventSubject.complete(),this.messageToRestoreSubject.complete(),this.threadUpdateEventSubject.complete(),this.streamingTextSubject.complete(),this.eventStream.disconnect();}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};function gt(c,e){if(c&1&&(ws(0,"div",3),GC(1),pl()),c&2){let t=gC();XE(),vl("\u274C ",t.errorMessage);}}var Ze=class c{dialogRef=g(z$1);data=g(Ue);jsonContent;errorMessage="";title;constructor(){this.jsonContent=this.data.initialContent,this.title=this.data.title||this.getDefaultTitle(this.data.configType,this.data.projectName);}getDefaultTitle(e,t){return e==="user"?"User Configuration":`Project Configuration: ${t||"Unknown"}`}onSave(){this.errorMessage="";let e;try{e=JSON.parse(this.jsonContent);}catch(t){this.errorMessage=`Invalid JSON syntax: ${t instanceof Error?t.message:"Unknown error"}`;return}this.dialogRef.close(e);}onCancel(){this.dialogRef.close();}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-json-editor"]],decls:13,vars:3,consts:[["mat-dialog-title",""],["mat-icon-button","","title","Close",1,"close-button",3,"click"],["spellcheck","false","placeholder","Enter JSON configuration...",1,"json-textarea",3,"ngModelChange","ngModel"],[1,"error-message"],["align","end"],["matButton","",3,"click"],["matButton","filled","color","primary",3,"click"]],template:function(t,n){t&1&&(ws(0,"div",0),GC(1),ws(2,"button",1),Rg("click",function(){return n.onCancel()}),ws(3,"mat-icon"),GC(4,"close"),pl()()(),ws(5,"mat-dialog-content")(6,"textarea",2),tm("ngModelChange",function(o){return KC(n.jsonContent,o)||(n.jsonContent=o),o}),pl(),VI(),Jw(7,gt,2,1,"div",3),pl(),ws(8,"mat-dialog-actions",4)(9,"button",5),Rg("click",function(){return n.onCancel()}),GC(10,"Cancel"),pl(),ws(11,"button",6),Rg("click",function(){return n.onSave()}),GC(12,"Save"),pl()()),t&2&&(XE(),vl(" ",n.title," "),XE(5),em("ngModel",n.jsonContent),UI(),XE(),eC(n.errorMessage?7:-1));},dependencies:[qm,ti,Ye$1,Zn,cn,wt,Gn,pr,jt,Nt,Vt],styles:["[mat-dialog-title][_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}[mat-dialog-title][_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin-left:auto}mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;min-height:400px}.json-textarea[_ngcontent-%COMP%]{flex:1;min-height:300px;max-height:80vh;padding:1rem;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.875rem;line-height:1.5;background:var(--color-code-bg);color:var(--color-text);border:1px solid var(--color-border);border-radius:4px;resize:vertical;outline:none;transition:border-color .2s}.json-textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.json-textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.6}.error-message[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:4px;font-size:.875rem;line-height:1.4;background:#dc26261a;color:#dc2626;border:1px solid rgba(220,38,38,.3)}"],changeDetection:1})};export{Et as E,Ge as G,Qe as Q,Ye as Y,Ze as Z,yt as y,z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {bS as Ea,a7 as ya,W as br,cE as Dd}from'./main-A4H3MFZY.js';function i(t,o,p){return t.pipe(Ea(()=>o().pipe(ya(()=>br(p)))),Dd({bufferSize:1,refCount:true}))}export{i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i}from'./chunk-
|
|
1
|
+
import {i}from'./chunk-cwPycVUY.js';import {l}from'./chunk-BJ3cmxps.js';import {g as g$1,df as N$1,aJ as Tr,aD as Ly,bS as Ea,a7 as ya,W as br,r as re,cE as Dd,bU as Od,w,Y as x}from'./main-A4H3MFZY.js';var g="none",N="me",O=class p{nsController=g$1(N$1);userState=g$1(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Ly([this.namespaceId$,this.refresh$]).pipe(Ea(([e])=>{let r=this.loadPlatformProviders().pipe(ya(()=>br([])));return e?Ly([r,this.loadNamespaceProviders(e).pipe(ya(()=>br([]))),this.loadUserProviders(e).pipe(ya(()=>br([]))),this.loadUserProviders("global").pipe(ya(()=>br([])))]).pipe(re(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Ly([r,this.loadNamespaceProviders("").pipe(ya(()=>br([]))),this.loadUserProviders("global").pipe(ya(()=>br([])))]).pipe(re(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),Dd({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):br([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(Od(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(Od(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=w({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(Od(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(Od(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {p}from'./chunk-
|
|
1
|
+
import {p}from'./chunk-BJ3cmxps.js';import {g,ao as V,H as py,d4 as y,e as xw,aw as hl,n as GC,ax as gl,X as XE,a8 as Yg}from'./main-A4H3MFZY.js';import'./chunk-D2VUzw11.js';import'./chunk-B0es9TQT.js';import'./chunk-D6Uyjin9.js';import'./chunk-CFuJNk7Q.js';var A=class r{route=g(V);http=g(py);config=g(y);message="Authentication in progress\u2026";ngOnInit(){let e=this.route.snapshot.queryParamMap.get("code"),t=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),i=this.route.snapshot.queryParamMap.get("error_description");if(o){console.warn("[AgentOS OAuth Callback] OAuth error:",o,i),this.notifyParentAndClose({success:false,error:i||o});return}if(!e){console.error("[AgentOS OAuth Callback] Missing authorization code"),this.message="OAuth callback error: missing authorization code.",this.notifyParentAndClose({success:false,error:"Missing authorization code"});return}this.http.post(`${this.config.basePath}/api/oauth/callback`,{code:e,state:t}).subscribe({next:()=>{console.log("[AgentOS OAuth Callback] Backend callback resolved"),this.notifyParentAndClose({success:true});},error:a=>{console.error("[AgentOS OAuth Callback] Backend callback failed:",a),this.notifyParentAndClose({success:false,error:a?.error?.message||a?.message||"Token exchange failed"});}});}notifyParentAndClose(e){if(this.message=e.success?"Authentication complete. You can close this window.":`Authentication failed: ${e.error??"unknown error"}. You can close this window.`,window.opener)try{window.opener.postMessage(e,window.location.origin);}catch(t){console.error("[AgentOS OAuth Callback] postMessage failed:",t),localStorage.setItem(p,JSON.stringify(e));}else console.warn("[AgentOS OAuth Callback] No window.opener \u2014 localStorage fallback"),localStorage.setItem(p,JSON.stringify(e));setTimeout(()=>window.close(),1e3);}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-oauth-callback"]],decls:2,vars:1,consts:[[2,"font-family","sans-serif","padding","2rem","text-align","center"]],template:function(t,o){t&1&&(hl(0,"p",0),GC(1),gl()),t&2&&(XE(),Yg(o.message));},encapsulation:2,changeDetection:1})};export{A as OAuthCallbackComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {I}from'./chunk-C2h53xO8.js';import {g,G,C as Ce,dm as k,df as N,aJ as Tr,a as Gi,bS as Ea,aD as Ly,r as re,b as U,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-A4H3MFZY.js';import {$ as $n,S as Se}from'./chunk-B0es9TQT.js';import'./chunk-D6Uyjin9.js';import'./chunk-CFuJNk7Q.js';var V=()=>[];function F(n,t){if(n&1){let o=lC();ws(0,"agentos-ai-model-item",4),Rg("editRequested",function(e){If(o);let s=gC(2);return wf(s.onEdit(e))})("deleteRequested",function(e){If(o);let s=gC(2);return wf(s.deleteModel(e))}),pl();}n&2&&bg("model",t);}function O(n,t){if(n&1&&Jw(0,F,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=gC();eC((o=e.resolveModel(i.id))?0:-1,o);}}var S=class n{router=g(G);destroyRef=g(Ce);aiModelController=g(k);aiProviderController=g(N);refresh$=new Tr(void 0);isLoading=Gi(true);data$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),Ly([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))));modelItems$=this.data$.pipe(re(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=xw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return i.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return i.goBack()}),pl()(),Eg(3,O,1,1,"ng-template",null,0,fT)),o&2){let e=CC(4);bg("items",uT(1,4,i.modelItems$)??rT(6,V))("loading",i.isLoading())("showCreate",true)("itemTemplate",e);}},dependencies:[$n,I,Se,xb],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{S as PlatformAiModelsComponent};
|
package/browser/index.html
CHANGED
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
<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)}@media print{html,body,app-root{height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;position:static!important}body{background:#fff!important;color:#000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important;font-size:11pt;line-height:1.6;padding:1rem!important}*{animation:none!important;transition:none!important;box-shadow:none!important;text-shadow:none!important}}*{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-HDA2O7OH.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-HDA2O7OH.css"></noscript></head>
|
|
32
32
|
<body>
|
|
33
33
|
<app-root></app-root>
|
|
34
|
-
<script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-
|
|
34
|
+
<script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-A4H3MFZY.js" type="module"></script></body>
|
|
35
35
|
</html>
|