@futdevpro/ccap 1.1.2984 → 1.1.2988
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/client-dist/{agent-instances.module-3ZLYZHLL.js → agent-instances.module-EZ3HLJRW.js} +2 -2
- package/client-dist/{ca.module-P2UO7VDD.js → ca.module-2NK5JZOQ.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-EJBH6IPF.js → cc-usage-dashboard.component-SLFNE2NX.js} +2 -2
- package/client-dist/{cc.module-SNBJVQML.js → cc.module-F7LHWQ3A.js} +2 -2
- package/client-dist/{chunk-LPGJBXIP.js → chunk-2CZLQZAC.js} +2 -2
- package/client-dist/{chunk-LEU5OG5E.js → chunk-35HAXCRL.js} +2 -2
- package/client-dist/{chunk-7WYIRD2K.js → chunk-4JZNUGDT.js} +2 -2
- package/client-dist/{chunk-6EGMSOHK.js → chunk-4ORBCWDZ.js} +2 -2
- package/client-dist/{chunk-DDMTMAFP.js → chunk-565H5Q7X.js} +2 -2
- package/client-dist/{chunk-3PGPW7FD.js → chunk-5GCMRTM2.js} +2 -2
- package/client-dist/{chunk-T2QHD2ZT.js → chunk-66YFYBOC.js} +2 -2
- package/client-dist/{chunk-YCLYE6AO.js → chunk-6CNO7CIR.js} +2 -2
- package/client-dist/{chunk-PUL2ZX7M.js → chunk-6IVNYSN4.js} +2 -2
- package/client-dist/{chunk-II7FANWT.js → chunk-6UTINZN6.js} +2 -2
- package/client-dist/{chunk-25BSNI43.js → chunk-7FDRE6FK.js} +2 -2
- package/client-dist/{chunk-DNFIYNPY.js → chunk-ACLAVYA7.js} +2 -2
- package/client-dist/{chunk-VJDDNWVB.js → chunk-ALRGHRMX.js} +2 -2
- package/client-dist/{chunk-DI3MPF5S.js → chunk-CJXAN5QP.js} +2 -2
- package/client-dist/{chunk-UFZQTWMV.js → chunk-CK4L2E6A.js} +2 -2
- package/client-dist/{chunk-JEYZMCOF.js → chunk-CPOWA47I.js} +2 -2
- package/client-dist/{chunk-KGVWTBSJ.js → chunk-CROOTWQ4.js} +2 -2
- package/client-dist/{chunk-WZADCIKD.js → chunk-CZK7PL4V.js} +2 -2
- package/client-dist/{chunk-X5MKTTVI.js → chunk-CZVHJQVK.js} +2 -2
- package/client-dist/{chunk-NDYDOLIU.js → chunk-EZQXUBC4.js} +2 -2
- package/client-dist/{chunk-I2WPA2HC.js → chunk-HK3NW3BA.js} +2 -2
- package/client-dist/{chunk-5RUZ6KJ5.js → chunk-HKO57F7B.js} +2 -2
- package/client-dist/{chunk-F7EU6GIH.js → chunk-I24ZZ4G3.js} +2 -2
- package/client-dist/{chunk-BLCYR3M4.js → chunk-I5LYGLY6.js} +2 -2
- package/client-dist/{chunk-OBYLGCFU.js → chunk-IMV4JDM4.js} +2 -2
- package/client-dist/{chunk-VM7HJMEE.js → chunk-KOFPH2WQ.js} +2 -2
- package/client-dist/{chunk-KXBT37MI.js → chunk-L2E2MBF2.js} +2 -2
- package/client-dist/{chunk-W5PNM77N.js → chunk-LNDWBFCV.js} +2 -2
- package/client-dist/{chunk-UVK2HWVQ.js → chunk-LOUIZXXC.js} +2 -2
- package/client-dist/{chunk-IHNJ5P7R.js → chunk-LP2E4KMW.js} +2 -2
- package/client-dist/{chunk-54H5R6JD.js → chunk-M53FIKSO.js} +2 -2
- package/client-dist/{chunk-XV57BACA.js → chunk-MIWIPUJL.js} +2 -2
- package/client-dist/{chunk-2DUU6CLZ.js → chunk-OJPFXL3T.js} +2 -2
- package/client-dist/{chunk-2GKUUPA3.js → chunk-PUVXCR3N.js} +2 -2
- package/client-dist/{chunk-5AZYUY2I.js → chunk-QM4JVUVN.js} +2 -2
- package/client-dist/{chunk-7VTSWPS6.js → chunk-QYAK3VTE.js} +2 -2
- package/client-dist/{chunk-G2C6MMPZ.js → chunk-RJEB2CGY.js} +2 -2
- package/client-dist/{chunk-56A4Z3VI.js → chunk-RQSPYGNE.js} +2 -2
- package/client-dist/{chunk-524HNDKB.js → chunk-RTAONMUA.js} +2 -2
- package/client-dist/{chunk-7JK6WJH4.js → chunk-SAWE7K3L.js} +2 -2
- package/client-dist/{chunk-7EWLWNUM.js → chunk-SIC2VUD2.js} +2 -2
- package/client-dist/{chunk-ADXSOA7I.js → chunk-SMBU53NX.js} +2 -2
- package/client-dist/{chunk-KDCNCCS4.js → chunk-SUAZOLRE.js} +2 -2
- package/client-dist/{chunk-WQJGSP26.js → chunk-SYXQFJNU.js} +2 -2
- package/client-dist/{chunk-WAKGC2JV.js → chunk-TWUEQMEF.js} +2 -2
- package/client-dist/{chunk-3SKHN6CV.js → chunk-VUMU4S4O.js} +2 -2
- package/client-dist/{chunk-4BDYCKEN.js → chunk-W4ICO22C.js} +2 -2
- package/client-dist/{chunk-4NI7SWFJ.js → chunk-W66474CE.js} +2 -2
- package/client-dist/{chunk-X4TJER6K.js → chunk-WKXTPGKW.js} +2 -2
- package/client-dist/{chunk-UAP53AU2.js → chunk-X3CIXD4W.js} +2 -2
- package/client-dist/{chunk-ZHS2VBCO.js → chunk-XC26T3JJ.js} +2 -2
- package/client-dist/{chunk-3K2O7PQQ.js → chunk-XDP5GOHT.js} +2 -2
- package/client-dist/{chunk-P4BBEPVX.js → chunk-XO6LJ5A6.js} +2 -2
- package/client-dist/{chunk-DXEUZEHM.js → chunk-ZI46JBHS.js} +2 -2
- package/client-dist/{chunk-VTI4UAO7.js → chunk-ZJ3DCODZ.js} +2 -2
- package/client-dist/{chunk-VTI4UAO7.js.map → chunk-ZJ3DCODZ.js.map} +1 -1
- package/client-dist/{chunk-EDEN2H5A.js → chunk-ZRLAS63L.js} +2 -2
- package/client-dist/{consultant.module-4VJDHLCF.js → consultant.module-ZRSJ2JPM.js} +2 -2
- package/client-dist/{crd.module-TPELVI4V.js → crd.module-TDLM6M2Z.js} +2 -2
- package/client-dist/{dashboard.module-WBXYFVIX.js → dashboard.module-VSWWQDEU.js} +2 -2
- package/client-dist/{do.module-QNTWU77F.js → do.module-CCOHMJLG.js} +2 -2
- package/client-dist/{document-library.module-ZMOC6NI5.js → document-library.module-QLZ4ZUUG.js} +2 -2
- package/client-dist/{embedding-eval.module-CYQKRRFE.js → embedding-eval.module-6KORAJ7D.js} +2 -2
- package/client-dist/{embedding-registry.module-RQS375G3.js → embedding-registry.module-GJJ5G2Y7.js} +2 -2
- package/client-dist/{err.module-P2X6CJ7U.js → err.module-4GLVR2GJ.js} +2 -2
- package/client-dist/{feedback.module-AXLJ4A5J.js → feedback.module-U6CCHRVZ.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-KZTR6FDB.js → host-runtime-mcp.module-EV5GZKTL.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-4V5I75CQ.js → live-dev-pipeline.module-MWG23KAS.js} +2 -2
- package/client-dist/{logs.module-Z6FFDCMF.js → logs.module-YNDMPESQ.js} +2 -2
- package/client-dist/{main-O2GTRDZO.js → main-OGUDQHPL.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-CFNAQZBI.js → master-control-remote-poc.module-37OSJYRO.js} +2 -2
- package/client-dist/{mobile-app.module-WXYUHAEA.js → mobile-app.module-2DXC7DFY.js} +2 -2
- package/client-dist/{model-registry.module-WPTYGKHC.js → model-registry.module-Z64FRB5O.js} +2 -2
- package/client-dist/{oc.module-M7AJBD6K.js → oc.module-6SHIJS3R.js} +2 -2
- package/client-dist/{orc.module-PD3JEE23.js → orc.module-NBZZGOV3.js} +2 -2
- package/client-dist/{project-management.module-DJDDZ4WF.js → project-management.module-TR33UVCV.js} +2 -2
- package/client-dist/project-source-routed.module-ZZ7SNTUN.js +2 -0
- package/client-dist/{scheduler.module-A4EK4LRY.js → scheduler.module-M3LHP2DW.js} +2 -2
- package/client-dist/{session.module-DNLRI5LR.js → session.module-FIZ5NYKK.js} +2 -2
- package/client-dist/{set.module-UDQXLUFX.js → set.module-4E6WAYIQ.js} +2 -2
- package/client-dist/{setup.module-U62VG2GJ.js → setup.module-2AUXXLIR.js} +2 -2
- package/client-dist/{terminals.module-DZOI3NYS.js → terminals.module-GCGUOFVO.js} +2 -2
- package/client-dist/{voice-notes-poc.module-EECKBW65.js → voice-notes-poc.module-6LVDT3MA.js} +2 -2
- package/client-dist/{wfs.module-DISKW4UO.js → wfs.module-XQGZNMEP.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-EQ5JFCS2.js +0 -2
- /package/client-dist/{agent-instances.module-3ZLYZHLL.js.map → agent-instances.module-EZ3HLJRW.js.map} +0 -0
- /package/client-dist/{ca.module-P2UO7VDD.js.map → ca.module-2NK5JZOQ.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-EJBH6IPF.js.map → cc-usage-dashboard.component-SLFNE2NX.js.map} +0 -0
- /package/client-dist/{cc.module-SNBJVQML.js.map → cc.module-F7LHWQ3A.js.map} +0 -0
- /package/client-dist/{chunk-LPGJBXIP.js.map → chunk-2CZLQZAC.js.map} +0 -0
- /package/client-dist/{chunk-LEU5OG5E.js.map → chunk-35HAXCRL.js.map} +0 -0
- /package/client-dist/{chunk-7WYIRD2K.js.map → chunk-4JZNUGDT.js.map} +0 -0
- /package/client-dist/{chunk-6EGMSOHK.js.map → chunk-4ORBCWDZ.js.map} +0 -0
- /package/client-dist/{chunk-DDMTMAFP.js.map → chunk-565H5Q7X.js.map} +0 -0
- /package/client-dist/{chunk-3PGPW7FD.js.map → chunk-5GCMRTM2.js.map} +0 -0
- /package/client-dist/{chunk-T2QHD2ZT.js.map → chunk-66YFYBOC.js.map} +0 -0
- /package/client-dist/{chunk-YCLYE6AO.js.map → chunk-6CNO7CIR.js.map} +0 -0
- /package/client-dist/{chunk-PUL2ZX7M.js.map → chunk-6IVNYSN4.js.map} +0 -0
- /package/client-dist/{chunk-II7FANWT.js.map → chunk-6UTINZN6.js.map} +0 -0
- /package/client-dist/{chunk-25BSNI43.js.map → chunk-7FDRE6FK.js.map} +0 -0
- /package/client-dist/{chunk-DNFIYNPY.js.map → chunk-ACLAVYA7.js.map} +0 -0
- /package/client-dist/{chunk-VJDDNWVB.js.map → chunk-ALRGHRMX.js.map} +0 -0
- /package/client-dist/{chunk-DI3MPF5S.js.map → chunk-CJXAN5QP.js.map} +0 -0
- /package/client-dist/{chunk-UFZQTWMV.js.map → chunk-CK4L2E6A.js.map} +0 -0
- /package/client-dist/{chunk-JEYZMCOF.js.map → chunk-CPOWA47I.js.map} +0 -0
- /package/client-dist/{chunk-KGVWTBSJ.js.map → chunk-CROOTWQ4.js.map} +0 -0
- /package/client-dist/{chunk-WZADCIKD.js.map → chunk-CZK7PL4V.js.map} +0 -0
- /package/client-dist/{chunk-X5MKTTVI.js.map → chunk-CZVHJQVK.js.map} +0 -0
- /package/client-dist/{chunk-NDYDOLIU.js.map → chunk-EZQXUBC4.js.map} +0 -0
- /package/client-dist/{chunk-I2WPA2HC.js.map → chunk-HK3NW3BA.js.map} +0 -0
- /package/client-dist/{chunk-5RUZ6KJ5.js.map → chunk-HKO57F7B.js.map} +0 -0
- /package/client-dist/{chunk-F7EU6GIH.js.map → chunk-I24ZZ4G3.js.map} +0 -0
- /package/client-dist/{chunk-BLCYR3M4.js.map → chunk-I5LYGLY6.js.map} +0 -0
- /package/client-dist/{chunk-OBYLGCFU.js.map → chunk-IMV4JDM4.js.map} +0 -0
- /package/client-dist/{chunk-VM7HJMEE.js.map → chunk-KOFPH2WQ.js.map} +0 -0
- /package/client-dist/{chunk-KXBT37MI.js.map → chunk-L2E2MBF2.js.map} +0 -0
- /package/client-dist/{chunk-W5PNM77N.js.map → chunk-LNDWBFCV.js.map} +0 -0
- /package/client-dist/{chunk-UVK2HWVQ.js.map → chunk-LOUIZXXC.js.map} +0 -0
- /package/client-dist/{chunk-IHNJ5P7R.js.map → chunk-LP2E4KMW.js.map} +0 -0
- /package/client-dist/{chunk-54H5R6JD.js.map → chunk-M53FIKSO.js.map} +0 -0
- /package/client-dist/{chunk-XV57BACA.js.map → chunk-MIWIPUJL.js.map} +0 -0
- /package/client-dist/{chunk-2DUU6CLZ.js.map → chunk-OJPFXL3T.js.map} +0 -0
- /package/client-dist/{chunk-2GKUUPA3.js.map → chunk-PUVXCR3N.js.map} +0 -0
- /package/client-dist/{chunk-5AZYUY2I.js.map → chunk-QM4JVUVN.js.map} +0 -0
- /package/client-dist/{chunk-7VTSWPS6.js.map → chunk-QYAK3VTE.js.map} +0 -0
- /package/client-dist/{chunk-G2C6MMPZ.js.map → chunk-RJEB2CGY.js.map} +0 -0
- /package/client-dist/{chunk-56A4Z3VI.js.map → chunk-RQSPYGNE.js.map} +0 -0
- /package/client-dist/{chunk-524HNDKB.js.map → chunk-RTAONMUA.js.map} +0 -0
- /package/client-dist/{chunk-7JK6WJH4.js.map → chunk-SAWE7K3L.js.map} +0 -0
- /package/client-dist/{chunk-7EWLWNUM.js.map → chunk-SIC2VUD2.js.map} +0 -0
- /package/client-dist/{chunk-ADXSOA7I.js.map → chunk-SMBU53NX.js.map} +0 -0
- /package/client-dist/{chunk-KDCNCCS4.js.map → chunk-SUAZOLRE.js.map} +0 -0
- /package/client-dist/{chunk-WQJGSP26.js.map → chunk-SYXQFJNU.js.map} +0 -0
- /package/client-dist/{chunk-WAKGC2JV.js.map → chunk-TWUEQMEF.js.map} +0 -0
- /package/client-dist/{chunk-3SKHN6CV.js.map → chunk-VUMU4S4O.js.map} +0 -0
- /package/client-dist/{chunk-4BDYCKEN.js.map → chunk-W4ICO22C.js.map} +0 -0
- /package/client-dist/{chunk-4NI7SWFJ.js.map → chunk-W66474CE.js.map} +0 -0
- /package/client-dist/{chunk-X4TJER6K.js.map → chunk-WKXTPGKW.js.map} +0 -0
- /package/client-dist/{chunk-UAP53AU2.js.map → chunk-X3CIXD4W.js.map} +0 -0
- /package/client-dist/{chunk-ZHS2VBCO.js.map → chunk-XC26T3JJ.js.map} +0 -0
- /package/client-dist/{chunk-3K2O7PQQ.js.map → chunk-XDP5GOHT.js.map} +0 -0
- /package/client-dist/{chunk-P4BBEPVX.js.map → chunk-XO6LJ5A6.js.map} +0 -0
- /package/client-dist/{chunk-DXEUZEHM.js.map → chunk-ZI46JBHS.js.map} +0 -0
- /package/client-dist/{chunk-EDEN2H5A.js.map → chunk-ZRLAS63L.js.map} +0 -0
- /package/client-dist/{consultant.module-4VJDHLCF.js.map → consultant.module-ZRSJ2JPM.js.map} +0 -0
- /package/client-dist/{crd.module-TPELVI4V.js.map → crd.module-TDLM6M2Z.js.map} +0 -0
- /package/client-dist/{dashboard.module-WBXYFVIX.js.map → dashboard.module-VSWWQDEU.js.map} +0 -0
- /package/client-dist/{do.module-QNTWU77F.js.map → do.module-CCOHMJLG.js.map} +0 -0
- /package/client-dist/{document-library.module-ZMOC6NI5.js.map → document-library.module-QLZ4ZUUG.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-CYQKRRFE.js.map → embedding-eval.module-6KORAJ7D.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-RQS375G3.js.map → embedding-registry.module-GJJ5G2Y7.js.map} +0 -0
- /package/client-dist/{err.module-P2X6CJ7U.js.map → err.module-4GLVR2GJ.js.map} +0 -0
- /package/client-dist/{feedback.module-AXLJ4A5J.js.map → feedback.module-U6CCHRVZ.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-KZTR6FDB.js.map → host-runtime-mcp.module-EV5GZKTL.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-4V5I75CQ.js.map → live-dev-pipeline.module-MWG23KAS.js.map} +0 -0
- /package/client-dist/{logs.module-Z6FFDCMF.js.map → logs.module-YNDMPESQ.js.map} +0 -0
- /package/client-dist/{main-O2GTRDZO.js.map → main-OGUDQHPL.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-CFNAQZBI.js.map → master-control-remote-poc.module-37OSJYRO.js.map} +0 -0
- /package/client-dist/{mobile-app.module-WXYUHAEA.js.map → mobile-app.module-2DXC7DFY.js.map} +0 -0
- /package/client-dist/{model-registry.module-WPTYGKHC.js.map → model-registry.module-Z64FRB5O.js.map} +0 -0
- /package/client-dist/{oc.module-M7AJBD6K.js.map → oc.module-6SHIJS3R.js.map} +0 -0
- /package/client-dist/{orc.module-PD3JEE23.js.map → orc.module-NBZZGOV3.js.map} +0 -0
- /package/client-dist/{project-management.module-DJDDZ4WF.js.map → project-management.module-TR33UVCV.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-EQ5JFCS2.js.map → project-source-routed.module-ZZ7SNTUN.js.map} +0 -0
- /package/client-dist/{scheduler.module-A4EK4LRY.js.map → scheduler.module-M3LHP2DW.js.map} +0 -0
- /package/client-dist/{session.module-DNLRI5LR.js.map → session.module-FIZ5NYKK.js.map} +0 -0
- /package/client-dist/{set.module-UDQXLUFX.js.map → set.module-4E6WAYIQ.js.map} +0 -0
- /package/client-dist/{setup.module-U62VG2GJ.js.map → setup.module-2AUXXLIR.js.map} +0 -0
- /package/client-dist/{terminals.module-DZOI3NYS.js.map → terminals.module-GCGUOFVO.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-EECKBW65.js.map → voice-notes-poc.module-6LVDT3MA.js.map} +0 -0
- /package/client-dist/{wfs.module-DISKW4UO.js.map → wfs.module-XQGZNMEP.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as Ce}from"./chunk-DXEUZEHM.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-DDMTMAFP.js";import{I as Ve}from"./chunk-VTI4UAO7.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
|
|
1
|
+
import{c as Ce}from"./chunk-ZI46JBHS.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-565H5Q7X.js";import{I as Ve}from"./chunk-ZJ3DCODZ.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
|
|
2
2
|
/*# sourceMappingURL=ses-graph-view.component-5NATWVIS.css.map */`]})}return i})();export{qe as a,ve as b,x as c,k as d,f as e,P as f,Ze as g,Gn as h};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-RJEB2CGY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-EZQXUBC4.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-ZJ3DCODZ.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-RQSPYGNE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as z,c as Ce}from"./chunk-5AZYUY2I.js";import{c as ge}from"./chunk-56A4Z3VI.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-T2QHD2ZT.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as z,c as Ce}from"./chunk-QM4JVUVN.js";import{c as ge}from"./chunk-RQSPYGNE.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-66YFYBOC.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
|
|
2
|
+
//# sourceMappingURL=chunk-RTAONMUA.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-4ORBCWDZ.js";import{M as m,t as g}from"./chunk-ZJ3DCODZ.js";import{C as y,N as h,a as i,aa as u,b as c,k as d,y as f}from"./chunk-TBMJSIBB.js";function I(){return{instanceId:crypto.randomUUID(),label:"default",gatewayUrl:"ws://127.0.0.1:18789",authToken:void 0,isPrimary:!1,autoConnect:!1,testState:"idle"}}function p(o){let l=[],s=o.gatewayUrl??"",t=(o.message??"").toLowerCase(),e=o.failureType??"";return s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push('A gateway wss:// (TLS) protokollt haszn\xE1l \u2014 ha self-signed certificate-et haszn\xE1l, enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),s.startsWith("ws://")&&!s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push("Ha a gateway TLS-t (wss://) haszn\xE1l, cser\xE9ld az URL-t ws:// helyett wss://-re."),e==="timeout"&&l.push("A gateway nem v\xE1laszolt id\u0151ben. Ellen\u0151rizd, hogy fut-e a gateway process \xE9s el\xE9rhet\u0151-e a megadott c\xEDmen."),e==="ws-error"&&!l.length&&l.push("Nem siker\xFClt csatlakozni. Ellen\u0151rizd: 1) fut-e a gateway, 2) helyes-e az URL \xE9s port, 3) nincs-e t\u0171zfal az \xFAtban."),(t.includes("econnrefused")||t.includes("connection refused"))&&l.push("A kapcsolat visszautas\xEDtva \u2014 a gateway nem hallgat a megadott c\xEDmen/porton."),(t.includes("certificate")||t.includes("cert")||t.includes("ssl")||t.includes("tls"))&&l.push('TLS tan\xFAs\xEDtv\xE1ny hiba \u2014 self-signed certificate eset\xE9n enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),l.length?`
|
|
2
2
|
|
|
3
3
|
`+l.join(`
|
|
4
4
|
`):""}var _=(()=>{class o extends m{ociData_AS=y(S);section_$=u({form:{instances:[]}});updateForm(s){this.section_$.update(t=>c(i({},t),{form:i(i({},t.form),s)}))}setSection(s){this.section_$.set(s)}getSectionId(){return g.openclawRegistry}getSection_$(){return this.section_$}doLoad(){return d(this,null,function*(){let s=new Map;for(let a of this.section_$().form.instances)s.set(a.instanceId,{testState:a.testState,testLatencyMs:a.testLatencyMs,testError:a.testError,testResultMessage:a.testResultMessage,authTokenEditMode:a.authTokenEditMode,pairState:a.pairState,pairError:a.pairError,pairMessage:a.pairMessage,pairResultMessage:a.pairResultMessage,connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt});let e=(yield this.settings_AS.getSection(g.openclawRegistry)).instances,n=Array.isArray(e)?e.map(a=>{let r=s.get(a.instanceId);return c(i({},a),{authToken:void 0,testState:r?.testState??"idle",testLatencyMs:r?.testLatencyMs,testError:r?.testError,testResultMessage:r?.testResultMessage,authTokenEditMode:r?.authTokenEditMode??!1,pairState:r?.pairState??"idle",pairError:r?.pairError,pairMessage:r?.pairMessage,pairResultMessage:r?.pairResultMessage,connectionStatus:r?.connectionStatus,lastConnectedAt:r?.lastConnectedAt})}):[];this.section_$.set({form:{instances:n}}),this.enrichWithOciStatus().catch(()=>{})})}enrichWithOciStatus(){return d(this,null,function*(){let s=yield this.ociData_AS.listInstances(),t=new Map;for(let e of s.list)t.set(e.instanceId,e);this.section_$.update(e=>c(i({},e),{form:{instances:e.form.instances.map(n=>{let a=t.get(n.instanceId);return a?c(i({},n),{connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt}):n})}}))})}buildSaveBody(){return{instances:this.section_$().form.instances.map(t=>({instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}))}}savingInstanceId_$=u(null);buildSaveBodyForInstance(s){let t=this.section_$().form.instances.find(e=>e.instanceId===s);return t?{openclawRegistrySaveScope:"instance",targetInstanceId:s,instances:[{instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}]}:{}}saveInstance(s){return d(this,null,function*(){this.savingInstanceId_$.set(s),this.saveError_$.set(null);try{let t=this.buildSaveBodyForInstance(s);yield this.doSave(t),yield this.load()}catch(t){this.saveError_$.set(o.getErrorMessage(t))}finally{this.savingInstanceId_$.set(null)}})}addInstance(){let s=I();this.section_$().form.instances.length||(s.isPrimary=!0),this.section_$.update(t=>c(i({},t),{form:{instances:[...t.form.instances,s]}}))}removeInstance(s){this.section_$.update(t=>{let e=t.form.instances.filter((a,r)=>r!==s);return(t.form.instances[s]?.isPrimary??!1)&&e.length>0&&(e[0]=c(i({},e[0]),{isPrimary:!0})),c(i({},t),{form:{instances:e}})})}updateInstance(s,t){this.section_$.update(e=>{let n=e.form.instances.map((a,r)=>r!==s?a:i(i({},a),t));return c(i({},e),{form:{instances:n}})})}setPrimary(s){this.section_$.update(t=>{let e=t.form.instances.map((n,a)=>c(i({},n),{isPrimary:a===s}));return c(i({},t),{form:{instances:e}})})}testConnection(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.updateInstance(s,{testState:"testing",testLatencyMs:void 0,testError:void 0,testResultMessage:void 0});try{let e=yield this.settings_AS.testOpenclawConnection({gatewayUrl:t.gatewayUrl,authToken:t.authToken,allowSelfSignedTls:t.allowSelfSignedTls,instanceId:t.instanceId});if(e.success){let n=e.checks,a=n?" | WS: OK | v3 Handshake: OK | Sessions: OK"+(typeof n.sessionCount=="number"?` (${n.sessionCount} session)`:""):"";this.updateInstance(s,{testState:"ok",testLatencyMs:e.latencyMs,testError:void 0,testResultMessage:`Gateway el\xE9rhet\u0151 \u2014 v\xE1laszid\u0151: ${e.latencyMs}ms${a}`})}else{let n=e.error?.context?.failureType?String(e.error.context.failureType):"unknown",a=p({failureType:n,gatewayUrl:typeof e.error?.context?.gatewayUrl=="string"?e.error.context.gatewayUrl:t.gatewayUrl,message:e.error?.message});this.updateInstance(s,{testState:"error",testLatencyMs:void 0,testError:e.error??new Error("Connection failed"),testResultMessage:`Kapcsol\xF3d\xE1s sikertelen (${n}): ${e.error?.message??"ismeretlen hiba"}${a}`})}}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=p({gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{testState:"error",testError:n??e,testResultMessage:`Teszt hiba: ${a}${r}`})}}})}pairingInstanceId_$=u(null);pairInstance(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.pairingInstanceId_$.set(t.instanceId),this.updateInstance(s,{pairState:"pairing",pairError:void 0,pairMessage:void 0});try{let e=yield this.settings_AS.pairOpenclawInstance({instanceId:t.instanceId});if(e.status==="paired")this.updateInstance(s,{pairState:"paired",pairingStatus:"paired",pairedAt:e.pairedAt,deviceTokenMasked:e.deviceTokenMasked,ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`Sikeresen p\xE1ros\xEDtva \u2014 device token megkapva${e.pairedAt?" ("+e.pairedAt+")":""}`});else if(e.status==="pending")this.updateInstance(s,{pairState:"pending",pairingStatus:"pending",ccapDeviceId:e.ccapDeviceId,pairingRequestId:e.pairingRequestId,pairMessage:e.message,pairError:void 0,pairResultMessage:`J\xF3v\xE1hagy\xE1sra v\xE1r a gateway-en \u2014 Device ID: ${e.ccapDeviceId??"N/A"}`});else if(e.status==="rejected")this.updateInstance(s,{pairState:"rejected",pairingStatus:"rejected",ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`A gateway elutas\xEDtotta a p\xE1ros\xEDt\xE1st: ${e.message??"ismeretlen ok"}`});else{let n=e.error?.context,a=p({failureType:typeof n?.failureType=="string"?n.failureType:void 0,gatewayUrl:typeof n?.gatewayUrl=="string"?n.gatewayUrl:t.gatewayUrl,message:e.message??e.error?.message});this.updateInstance(s,{pairState:"error",pairError:e.error??new Error(e.message??"Pairing failed"),pairMessage:e.message,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${e.message??e.error?.message??"ismeretlen hiba"}${a}`})}yield this.load()}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=n?.context,w=p({failureType:typeof r?.failureType=="string"?r.failureType:void 0,gatewayUrl:typeof r?.gatewayUrl=="string"?r.gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{pairState:"error",pairError:n??e,pairMessage:void 0,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${a}${w}`})}finally{this.pairingInstanceId_$.set(null)}}})}static \u0275fac=(()=>{let s;return function(e){return(s||(s=h(o)))(e||o)}})();static \u0275prov=f({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{_ as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-SAWE7K3L.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as l}from"./chunk-ZJ3DCODZ.js";import{C as d,aa as r,k as c,p as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var f=(()=>{class i{baseUrl=`${l.api.baseUrl}/agent-feedback`;http=d(n);listFeedback(e){let t=[];e?.type!==void 0&&e.type!==""&&t.push(`type=${encodeURIComponent(e.type)}`),e?.limit!==void 0&&t.push(`limit=${e.limit}`),e?.skip!==void 0&&t.push(`skip=${e.skip}`);let a=`${this.baseUrl}/list`,b=t.length?`${a}?${t.join("&")}`:a;return o(this.http.get(b))}deleteFeedback(e){return o(this.http.delete(`${this.baseUrl}/delete/${encodeURIComponent(e)}`))}deleteAllFeedback(){return o(this.http.delete(`${this.baseUrl}/delete-all`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var A=(()=>{class i{feedback_$=r([]);feedbackLoading_$=r(!1);feedbackLoadError_$=r(null);filterType_$=r(void 0);feedbackTotalCount_$=r(0);feedback_AS=d(f);loadFeedback(){return c(this,null,function*(){this.feedbackLoading_$.set(!0),this.feedbackLoadError_$.set(null);try{let e=this.filterType_$(),a=(yield this.feedback_AS.listFeedback({type:e})).feedback??[];this.feedback_$.set(a),e===void 0&&this.feedbackTotalCount_$.set(a.length)}catch(e){this.feedbackLoadError_$.set(e),this.feedback_$.set([])}finally{this.feedbackLoading_$.set(!1)}})}setFilterType(e){this.filterType_$.set(e),this.loadFeedback()}clearAll(){return c(this,null,function*(){try{yield this.feedback_AS.deleteAllFeedback(),this.feedbackTotalCount_$.set(0),yield this.loadFeedback()}catch(e){this.feedbackLoadError_$.set(e)}})}clearOne(e){return c(this,null,function*(){try{yield this.feedback_AS.deleteFeedback(e),this.feedback_$.update(t=>t.filter(a=>a._id!==e)),this.feedbackTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.feedbackLoadError_$.set(t)}})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SIC2VUD2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-6UTINZN6.js";import{p as m}from"./chunk-ZJ3DCODZ.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
|
|
2
|
+
//# sourceMappingURL=chunk-SMBU53NX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-66YFYBOC.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-ZJ3DCODZ.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
|
|
2
2
|
${$}
|
|
3
3
|
${ue}`}else{let y=e.slice(0,xe);o=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
|
|
4
4
|
`+y+(e.length>xe?`
|
|
@@ -36,4 +36,4 @@ ${JSON.stringify(s,null,2)}`;return x.toDisplaySafeString(o??l)}let t=e instance
|
|
|
36
36
|
|
|
37
37
|
Stack:
|
|
38
38
|
${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);this.quickInputFeedback=t?"Quick Input l\xE9trehozva!":"Quick Input sikertelen \u2014 nincs el\xE9rhet\u0151 projekt",t||this.globalError_CS.reportErrorOnly({message:"Send-to-Quick-Input returned false (likely: no available project or server-side validation reject)",source:"send-to-quick-input-no-result"})}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[Me],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[we],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,w as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-SUAZOLRE.js.map
|