@futdevpro/ccap 1.1.2442 → 1.1.2456
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-JHRWVJU2.js → agent-instances.module-IDKJYNA6.js} +2 -2
- package/client-dist/{ca.module-ZETH5GE5.js → ca.module-NJI2WXHP.js} +2 -2
- package/client-dist/{cc.module-Q3OYCGPJ.js → cc.module-OALOPRDB.js} +3 -3
- package/client-dist/{cc.module-Q3OYCGPJ.js.map → cc.module-OALOPRDB.js.map} +3 -3
- package/client-dist/{chunk-BUEWADJF.js → chunk-2BEYYW4Q.js} +2 -2
- package/client-dist/{chunk-KXMTMJBV.js → chunk-2BSAVKJF.js} +2 -2
- package/client-dist/{chunk-DRAZKJ4Z.js → chunk-2HR3HRSH.js} +2 -2
- package/client-dist/{chunk-YIWPA5QC.js → chunk-2YH4QTS2.js} +2 -2
- package/client-dist/{chunk-WHKT7TFW.js → chunk-2YRLIGJ6.js} +3 -3
- package/client-dist/chunk-2YRLIGJ6.js.map +7 -0
- package/client-dist/{chunk-SLYK2Z4H.js → chunk-37OEKFV2.js} +2 -2
- package/client-dist/{chunk-MEZCJHBR.js → chunk-3FEQEZCR.js} +2 -2
- package/client-dist/{chunk-ENV5WOSE.js → chunk-3PBLZEB6.js} +2 -2
- package/client-dist/{chunk-XYLHNAZG.js → chunk-54F7FETI.js} +2 -2
- package/client-dist/{chunk-FKXHLHCK.js → chunk-76RJR7IV.js} +2 -2
- package/client-dist/{chunk-O7ZLUCIO.js → chunk-7ROTKIYT.js} +2 -2
- package/client-dist/{chunk-O7ZLUCIO.js.map → chunk-7ROTKIYT.js.map} +1 -1
- package/client-dist/{chunk-HAKTDNST.js → chunk-7X53ZYAD.js} +2 -2
- package/client-dist/{chunk-2HDSZO43.js → chunk-7ZJIAA2M.js} +2 -2
- package/client-dist/{chunk-AC63FZCO.js → chunk-AF6E3DD6.js} +2 -2
- package/client-dist/{chunk-FW46CP6V.js → chunk-BCWDPIT7.js} +2 -2
- package/client-dist/{chunk-RJ7A6HH3.js → chunk-C73NCVRW.js} +2 -2
- package/client-dist/{chunk-GKUXLIWX.js → chunk-CXY5JPOT.js} +2 -2
- package/client-dist/{chunk-UCRXY2OB.js → chunk-DKAX2XFQ.js} +2 -2
- package/client-dist/{chunk-7O7CLBVK.js → chunk-EXWI7B46.js} +2 -2
- package/client-dist/{chunk-KPLRGKEN.js → chunk-GA2RPCXU.js} +2 -2
- package/client-dist/{chunk-6VNZYMIJ.js → chunk-HGHIUCBF.js} +2 -2
- package/client-dist/{chunk-F6XK2KCD.js → chunk-HIT2WYBE.js} +2 -2
- package/client-dist/{chunk-A6PANPVD.js → chunk-ICYFLSET.js} +2 -2
- package/client-dist/{chunk-JV5E4PX3.js → chunk-IPQSBIAU.js} +2 -2
- package/client-dist/{chunk-DL2YCKXX.js → chunk-J7VTEMMD.js} +2 -2
- package/client-dist/{chunk-LGZINYA4.js → chunk-JMBVRBHP.js} +2 -2
- package/client-dist/{chunk-DQCDJ2H6.js → chunk-JW7UN6C6.js} +2 -2
- package/client-dist/{chunk-HLBBAA46.js → chunk-JZUDZHOK.js} +2 -2
- package/client-dist/{chunk-KSEKMVWJ.js → chunk-KMKNWEIP.js} +2 -2
- package/client-dist/{chunk-XLQ33NO6.js → chunk-KUHT7EGC.js} +2 -2
- package/client-dist/{chunk-KQSQE5DT.js → chunk-LRO56M4F.js} +2 -2
- package/client-dist/{chunk-WGRZLAHB.js → chunk-LZA3UROR.js} +2 -2
- package/client-dist/{chunk-RL3VLR4A.js → chunk-MRFNQSBO.js} +2 -2
- package/client-dist/{chunk-K3VQDVJZ.js → chunk-NKCVFWIR.js} +2 -2
- package/client-dist/{chunk-FM7RX6JO.js → chunk-NROVUUPP.js} +2 -2
- package/client-dist/{chunk-5HFYZCKD.js → chunk-OIODKTLQ.js} +2 -2
- package/client-dist/{chunk-5BRVPGPF.js → chunk-OTG32NBJ.js} +2 -2
- package/client-dist/{chunk-N2ZMGP2S.js → chunk-OUK2EQLW.js} +2 -2
- package/client-dist/{chunk-IOG6AFZJ.js → chunk-P4Q6MHQF.js} +2 -2
- package/client-dist/{chunk-5OSOUH7D.js → chunk-QG5SOLM6.js} +2 -2
- package/client-dist/{chunk-IWEPIHHA.js → chunk-R5WFZ5MP.js} +2 -2
- package/client-dist/{chunk-MOTEBZN6.js → chunk-RY2FGRDE.js} +2 -2
- package/client-dist/{chunk-ECXOG63K.js → chunk-SOIPLC5T.js} +2 -2
- package/client-dist/{chunk-LX5QTXPQ.js → chunk-T47O3GBU.js} +2 -2
- package/client-dist/{chunk-Q2WSWJMT.js → chunk-T4O64XJR.js} +2 -2
- package/client-dist/{chunk-WK2ASKXN.js → chunk-TM4NG2PY.js} +2 -2
- package/client-dist/{chunk-AYYVYJGJ.js → chunk-UQJ2FBDV.js} +2 -2
- package/client-dist/{chunk-O4VT3UOF.js → chunk-V3TCTP2F.js} +2 -2
- package/client-dist/{chunk-5OPIWSEM.js → chunk-VARZRXVO.js} +2 -2
- package/client-dist/{chunk-MGGC6LBV.js → chunk-VVPUBOY5.js} +2 -2
- package/client-dist/{chunk-73DMJCBV.js → chunk-WV423ZWI.js} +2 -2
- package/client-dist/{chunk-OLUWDGCE.js → chunk-Y36IQPHQ.js} +2 -2
- package/client-dist/{chunk-G6I74WWM.js → chunk-YE7XLSVE.js} +2 -2
- package/client-dist/{chunk-OLNHJ5AB.js → chunk-YGPDTSQJ.js} +2 -2
- package/client-dist/{chunk-QVND63PJ.js → chunk-Z3ISJM2S.js} +2 -2
- package/client-dist/{chunk-DQZ2IRQN.js → chunk-ZSZB7ON6.js} +2 -2
- package/client-dist/{consultant.module-ZFIDRZTS.js → consultant.module-6E7NJFPO.js} +2 -2
- package/client-dist/{crd.module-FSOR4S7D.js → crd.module-IWA3BYC5.js} +2 -2
- package/client-dist/{dashboard.module-NDQ6WYAG.js → dashboard.module-NWG3HJPL.js} +2 -2
- package/client-dist/{do.module-7A5CEEOL.js → do.module-KXOXBMTI.js} +2 -2
- package/client-dist/{document-library.module-QZFHDGNO.js → document-library.module-BROBQIPB.js} +2 -2
- package/client-dist/{embedding-eval.module-TKZNR4S2.js → embedding-eval.module-BKSJBVWZ.js} +2 -2
- package/client-dist/{embedding-registry.module-QPQHJCWM.js → embedding-registry.module-WVQUBRYF.js} +2 -2
- package/client-dist/{err.module-IYZAFSWF.js → err.module-QKIYUMFT.js} +2 -2
- package/client-dist/{feedback.module-IT7FJYEG.js → feedback.module-IELFI6VU.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-DMQX555A.js → host-runtime-mcp.module-WMGOBHOA.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-Z5NJUTR2.js → live-dev-pipeline.module-D7VQSCMU.js} +2 -2
- package/client-dist/{logs.module-UXJWKKBY.js → logs.module-KW5ZQWG3.js} +2 -2
- package/client-dist/{main-C72R2X2K.js → main-ISYO6QS7.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-NDJE3JBE.js → master-control-remote-poc.module-XYLHKDC5.js} +2 -2
- package/client-dist/{mobile-app.module-KONBTDHG.js → mobile-app.module-HA4FDDXM.js} +2 -2
- package/client-dist/{model-registry.module-4XIH36C7.js → model-registry.module-PF36XQF6.js} +2 -2
- package/client-dist/{oc.module-DYLOS64K.js → oc.module-UN2XISYM.js} +2 -2
- package/client-dist/{orc.module-LBT6XOYO.js → orc.module-HSP3PCSH.js} +2 -2
- package/client-dist/{project-management.module-LQ7LHXNN.js → project-management.module-4OY6XL2R.js} +2 -2
- package/client-dist/project-source-routed.module-7OQ5VTAV.js +2 -0
- package/client-dist/{scheduler.module-7LWV6Q4A.js → scheduler.module-KTCMG6F6.js} +2 -2
- package/client-dist/{session.module-GULKDOZS.js → session.module-EXPOWPOI.js} +2 -2
- package/client-dist/{set.module-VD5AOLP2.js → set.module-CEIQ33FO.js} +2 -2
- package/client-dist/{setup.module-VH3RTXG2.js → setup.module-LZNNFB2L.js} +2 -2
- package/client-dist/{terminals.module-FMPDXD47.js → terminals.module-UHVKFQXV.js} +2 -2
- package/client-dist/{voice-notes-poc.module-GVDUNB5G.js → voice-notes-poc.module-PB2K4MQ3.js} +2 -2
- package/client-dist/{wfs.module-T7X7U24D.js → wfs.module-ZB55ONHI.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js +24 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js.map +1 -1
- package/server/build/src/_modules/session-queue/_collections/adapters/cc-queue.adapter.d.ts +14 -0
- package/server/build/src/_modules/session-queue/_collections/adapters/cc-queue.adapter.d.ts.map +1 -1
- package/server/build/src/_modules/session-queue/_collections/adapters/cc-queue.adapter.js +41 -0
- package/server/build/src/_modules/session-queue/_collections/adapters/cc-queue.adapter.js.map +1 -1
- package/server/build/src/_modules/session-queue/_collections/adapters/cc-queue.adapter.spec.js +40 -0
- package/server/build/src/_modules/session-queue/_collections/adapters/cc-queue.adapter.spec.js.map +1 -1
- package/server/build/src/_modules/session-queue/_models/sq-delivery-adapter.interface.d.ts +11 -0
- package/server/build/src/_modules/session-queue/_models/sq-delivery-adapter.interface.d.ts.map +1 -1
- package/server/build/src/_modules/session-queue/_services/control-services/session-queue.control-service.d.ts +9 -0
- package/server/build/src/_modules/session-queue/_services/control-services/session-queue.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/session-queue/_services/control-services/session-queue.control-service.js +55 -0
- package/server/build/src/_modules/session-queue/_services/control-services/session-queue.control-service.js.map +1 -1
- package/client-dist/chunk-WHKT7TFW.js.map +0 -7
- package/client-dist/project-source-routed.module-YX6TEQ7Z.js +0 -2
- /package/client-dist/{agent-instances.module-JHRWVJU2.js.map → agent-instances.module-IDKJYNA6.js.map} +0 -0
- /package/client-dist/{ca.module-ZETH5GE5.js.map → ca.module-NJI2WXHP.js.map} +0 -0
- /package/client-dist/{chunk-BUEWADJF.js.map → chunk-2BEYYW4Q.js.map} +0 -0
- /package/client-dist/{chunk-KXMTMJBV.js.map → chunk-2BSAVKJF.js.map} +0 -0
- /package/client-dist/{chunk-DRAZKJ4Z.js.map → chunk-2HR3HRSH.js.map} +0 -0
- /package/client-dist/{chunk-YIWPA5QC.js.map → chunk-2YH4QTS2.js.map} +0 -0
- /package/client-dist/{chunk-SLYK2Z4H.js.map → chunk-37OEKFV2.js.map} +0 -0
- /package/client-dist/{chunk-MEZCJHBR.js.map → chunk-3FEQEZCR.js.map} +0 -0
- /package/client-dist/{chunk-ENV5WOSE.js.map → chunk-3PBLZEB6.js.map} +0 -0
- /package/client-dist/{chunk-XYLHNAZG.js.map → chunk-54F7FETI.js.map} +0 -0
- /package/client-dist/{chunk-FKXHLHCK.js.map → chunk-76RJR7IV.js.map} +0 -0
- /package/client-dist/{chunk-HAKTDNST.js.map → chunk-7X53ZYAD.js.map} +0 -0
- /package/client-dist/{chunk-2HDSZO43.js.map → chunk-7ZJIAA2M.js.map} +0 -0
- /package/client-dist/{chunk-AC63FZCO.js.map → chunk-AF6E3DD6.js.map} +0 -0
- /package/client-dist/{chunk-FW46CP6V.js.map → chunk-BCWDPIT7.js.map} +0 -0
- /package/client-dist/{chunk-RJ7A6HH3.js.map → chunk-C73NCVRW.js.map} +0 -0
- /package/client-dist/{chunk-GKUXLIWX.js.map → chunk-CXY5JPOT.js.map} +0 -0
- /package/client-dist/{chunk-UCRXY2OB.js.map → chunk-DKAX2XFQ.js.map} +0 -0
- /package/client-dist/{chunk-7O7CLBVK.js.map → chunk-EXWI7B46.js.map} +0 -0
- /package/client-dist/{chunk-KPLRGKEN.js.map → chunk-GA2RPCXU.js.map} +0 -0
- /package/client-dist/{chunk-6VNZYMIJ.js.map → chunk-HGHIUCBF.js.map} +0 -0
- /package/client-dist/{chunk-F6XK2KCD.js.map → chunk-HIT2WYBE.js.map} +0 -0
- /package/client-dist/{chunk-A6PANPVD.js.map → chunk-ICYFLSET.js.map} +0 -0
- /package/client-dist/{chunk-JV5E4PX3.js.map → chunk-IPQSBIAU.js.map} +0 -0
- /package/client-dist/{chunk-DL2YCKXX.js.map → chunk-J7VTEMMD.js.map} +0 -0
- /package/client-dist/{chunk-LGZINYA4.js.map → chunk-JMBVRBHP.js.map} +0 -0
- /package/client-dist/{chunk-DQCDJ2H6.js.map → chunk-JW7UN6C6.js.map} +0 -0
- /package/client-dist/{chunk-HLBBAA46.js.map → chunk-JZUDZHOK.js.map} +0 -0
- /package/client-dist/{chunk-KSEKMVWJ.js.map → chunk-KMKNWEIP.js.map} +0 -0
- /package/client-dist/{chunk-XLQ33NO6.js.map → chunk-KUHT7EGC.js.map} +0 -0
- /package/client-dist/{chunk-KQSQE5DT.js.map → chunk-LRO56M4F.js.map} +0 -0
- /package/client-dist/{chunk-WGRZLAHB.js.map → chunk-LZA3UROR.js.map} +0 -0
- /package/client-dist/{chunk-RL3VLR4A.js.map → chunk-MRFNQSBO.js.map} +0 -0
- /package/client-dist/{chunk-K3VQDVJZ.js.map → chunk-NKCVFWIR.js.map} +0 -0
- /package/client-dist/{chunk-FM7RX6JO.js.map → chunk-NROVUUPP.js.map} +0 -0
- /package/client-dist/{chunk-5HFYZCKD.js.map → chunk-OIODKTLQ.js.map} +0 -0
- /package/client-dist/{chunk-5BRVPGPF.js.map → chunk-OTG32NBJ.js.map} +0 -0
- /package/client-dist/{chunk-N2ZMGP2S.js.map → chunk-OUK2EQLW.js.map} +0 -0
- /package/client-dist/{chunk-IOG6AFZJ.js.map → chunk-P4Q6MHQF.js.map} +0 -0
- /package/client-dist/{chunk-5OSOUH7D.js.map → chunk-QG5SOLM6.js.map} +0 -0
- /package/client-dist/{chunk-IWEPIHHA.js.map → chunk-R5WFZ5MP.js.map} +0 -0
- /package/client-dist/{chunk-MOTEBZN6.js.map → chunk-RY2FGRDE.js.map} +0 -0
- /package/client-dist/{chunk-ECXOG63K.js.map → chunk-SOIPLC5T.js.map} +0 -0
- /package/client-dist/{chunk-LX5QTXPQ.js.map → chunk-T47O3GBU.js.map} +0 -0
- /package/client-dist/{chunk-Q2WSWJMT.js.map → chunk-T4O64XJR.js.map} +0 -0
- /package/client-dist/{chunk-WK2ASKXN.js.map → chunk-TM4NG2PY.js.map} +0 -0
- /package/client-dist/{chunk-AYYVYJGJ.js.map → chunk-UQJ2FBDV.js.map} +0 -0
- /package/client-dist/{chunk-O4VT3UOF.js.map → chunk-V3TCTP2F.js.map} +0 -0
- /package/client-dist/{chunk-5OPIWSEM.js.map → chunk-VARZRXVO.js.map} +0 -0
- /package/client-dist/{chunk-MGGC6LBV.js.map → chunk-VVPUBOY5.js.map} +0 -0
- /package/client-dist/{chunk-73DMJCBV.js.map → chunk-WV423ZWI.js.map} +0 -0
- /package/client-dist/{chunk-OLUWDGCE.js.map → chunk-Y36IQPHQ.js.map} +0 -0
- /package/client-dist/{chunk-G6I74WWM.js.map → chunk-YE7XLSVE.js.map} +0 -0
- /package/client-dist/{chunk-OLNHJ5AB.js.map → chunk-YGPDTSQJ.js.map} +0 -0
- /package/client-dist/{chunk-QVND63PJ.js.map → chunk-Z3ISJM2S.js.map} +0 -0
- /package/client-dist/{chunk-DQZ2IRQN.js.map → chunk-ZSZB7ON6.js.map} +0 -0
- /package/client-dist/{consultant.module-ZFIDRZTS.js.map → consultant.module-6E7NJFPO.js.map} +0 -0
- /package/client-dist/{crd.module-FSOR4S7D.js.map → crd.module-IWA3BYC5.js.map} +0 -0
- /package/client-dist/{dashboard.module-NDQ6WYAG.js.map → dashboard.module-NWG3HJPL.js.map} +0 -0
- /package/client-dist/{do.module-7A5CEEOL.js.map → do.module-KXOXBMTI.js.map} +0 -0
- /package/client-dist/{document-library.module-QZFHDGNO.js.map → document-library.module-BROBQIPB.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-TKZNR4S2.js.map → embedding-eval.module-BKSJBVWZ.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-QPQHJCWM.js.map → embedding-registry.module-WVQUBRYF.js.map} +0 -0
- /package/client-dist/{err.module-IYZAFSWF.js.map → err.module-QKIYUMFT.js.map} +0 -0
- /package/client-dist/{feedback.module-IT7FJYEG.js.map → feedback.module-IELFI6VU.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-DMQX555A.js.map → host-runtime-mcp.module-WMGOBHOA.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-Z5NJUTR2.js.map → live-dev-pipeline.module-D7VQSCMU.js.map} +0 -0
- /package/client-dist/{logs.module-UXJWKKBY.js.map → logs.module-KW5ZQWG3.js.map} +0 -0
- /package/client-dist/{main-C72R2X2K.js.map → main-ISYO6QS7.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-NDJE3JBE.js.map → master-control-remote-poc.module-XYLHKDC5.js.map} +0 -0
- /package/client-dist/{mobile-app.module-KONBTDHG.js.map → mobile-app.module-HA4FDDXM.js.map} +0 -0
- /package/client-dist/{model-registry.module-4XIH36C7.js.map → model-registry.module-PF36XQF6.js.map} +0 -0
- /package/client-dist/{oc.module-DYLOS64K.js.map → oc.module-UN2XISYM.js.map} +0 -0
- /package/client-dist/{orc.module-LBT6XOYO.js.map → orc.module-HSP3PCSH.js.map} +0 -0
- /package/client-dist/{project-management.module-LQ7LHXNN.js.map → project-management.module-4OY6XL2R.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-YX6TEQ7Z.js.map → project-source-routed.module-7OQ5VTAV.js.map} +0 -0
- /package/client-dist/{scheduler.module-7LWV6Q4A.js.map → scheduler.module-KTCMG6F6.js.map} +0 -0
- /package/client-dist/{session.module-GULKDOZS.js.map → session.module-EXPOWPOI.js.map} +0 -0
- /package/client-dist/{set.module-VD5AOLP2.js.map → set.module-CEIQ33FO.js.map} +0 -0
- /package/client-dist/{setup.module-VH3RTXG2.js.map → setup.module-LZNNFB2L.js.map} +0 -0
- /package/client-dist/{terminals.module-FMPDXD47.js.map → terminals.module-UHVKFQXV.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-GVDUNB5G.js.map → voice-notes-poc.module-PB2K4MQ3.js.map} +0 -0
- /package/client-dist/{wfs.module-T7X7U24D.js.map → wfs.module-ZB55ONHI.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-SOIPLC5T.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-7ROTKIYT.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-2BEYYW4Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as a}from"./chunk-WV423ZWI.js";var f=class{static extract(t){if(t.toolName)return t.toolName;if(t.rawData){let s=t.rawData.name??t.rawData.tool_name??t.rawData.last_tool_name;if(typeof s=="string")return s}let o=t.bodyText.indexOf(":");return o>0?t.bodyText.substring(0,o).trim():t.bodyText.trim()}};var b=class e{static DEFAULT_GROUPABLE_TOOLS=new Set(["Read","Bash","Grep","Glob"]);static DEFAULT_MIN_GROUP_SIZE=2;static groupSubAgentItems(t,o){let s=new Map;for(let r=0;r<t.length;r++){let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n);i&&s.set(i,{item:n,index:r})}}if(!s.size)return t;let c=new Map,d=new Set;for(let r=0;r<t.length;r++){let n=t[r];if(n.parentAgentId&&s.has(n.parentAgentId)){let i=c.get(n.parentAgentId)??[];i.push(n),c.set(n.parentAgentId,i),d.add(r)}}let l=[];for(let r=0;r<t.length;r++){if(d.has(r))continue;let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n),p=c.get(i)??[],g=[n,...p],I=e.buildSubAgentLabel(n),A=e.extractSubagentType(n),y=e.groupConsecutiveToolItems(g,o);l.push({listKey:e.newListKey(),kind:a.subAgentGroup,bodyText:I,groupItems:y,groupToolName:A||"Agent",rawData:n.rawData})}else l.push(n)}return l}static groupConsecutiveToolItems(t,o){let s=o?.groupableTools??e.DEFAULT_GROUPABLE_TOOLS,c=o?.minGroupSize??e.DEFAULT_MIN_GROUP_SIZE,d=[],l=[],r="",n=()=>{if(!l.length)return;let i=l.filter(p=>p.kind===a.tool).length;i>=c?d.push({listKey:e.newListKey(),kind:a.toolGroup,bodyText:`${r} \xD7 ${i}`,groupItems:l,groupToolName:r}):d.push(...l),l=[],r=""};for(let i of t){if(i.kind===a.tool){let p=f.extract(i);if(s.has(p)){r&&r!==p&&n(),r=p,l.push(i);continue}}if(i.kind===a.toolResult&&l.length){l.push(i);continue}n(),d.push(i)}return n(),d}static resolveAgentId(t){return t.toolCallId?t.toolCallId:t.rawData&&typeof t.rawData.id=="string"?t.rawData.id:""}static extractSubagentType(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.subagent_type;return typeof s=="string"?s:""}static extractDescription(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.description;return typeof s=="string"?s:""}static buildSubAgentLabel(t){let o=e.extractSubagentType(t),s=e.extractDescription(t);return o?`${o}: ${s||"..."}`:s||"Sub-agent"}static newListKey(){return globalThis.crypto.randomUUID()}};var u=function(e){return e.user="user",e.assistant="assistant",e.tool="tool",e.toolResult="tool-result",e.status="status",e.error="error",e.info="info",e.result="result",e.thinking="thinking",e.statusUpdate="status-update",e}(u||{});var h=class e{static fromAssembledMessage(t,o){let s=e.mapRoleToKind(t.messageRole),c=t.toolResult?{text:t.toolResult.text,expandableContent:t.toolResult.expandableContent,rawData:t.toolResult.rawData,isError:t.toolResult.isError}:void 0,d=t.messageRole===u.tool&&t.toolName==="Edit"&&!!t.expandableContent;return{listKey:t.messageKey,kind:s,bodyText:t.bodyText,timestampIso:t.timestamp,toolName:t.toolName,expandableContent:t.expandableContent,pairedResult:c,rawData:t.rawData,subtype:t.subtype,isUserAligned:t.isUserAligned,headerStatusDot:t.headerStatusDot==="error"?"error":void 0,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:d},tts:e.buildTts(t,o),toolCallId:t.toolCallId,parentAgentId:t.parentAgentId}}static buildTts(t,o){if(!(!o||!(t.messageRole===u.user||t.messageRole===u.assistant)||!t.bodyText.trim().length))return{messageKey:t.messageKey,sessionId:o.sessionId,role:t.messageRole,content:t.bodyText,timestampIso:t.timestamp,hasTtsAudio:o.cachedKeys.has(t.messageKey)}}static mapRoleToKind(t){switch(t){case u.user:return a.userPrompt;case u.assistant:return a.assistant;case u.tool:return a.tool;case u.toolResult:return a.toolResult;case u.status:return a.status;case u.error:return a.error;case u.info:return a.info;case u.result:return a.result;case u.thinking:return a.thinking;case u.statusUpdate:return a.statusUpdate;default:return a.info}}};export{b as a,h as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2BSAVKJF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as l}from"./chunk-7ROTKIYT.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-2HR3HRSH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Pl}from"./chunk-HAKTDNST.js";import{a as he,b as _e,c as Il,e as $a,h as ja,j as Fl,k as zn,l as Wn,m as Yn,o as Tl,p as vt}from"./chunk-O7ZLUCIO.js";import{F as Va,a as X,b as Z,c as Ka,f,h as ge,i as fe,k as Se}from"./chunk-TBMJSIBB.js";var Ht=f(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.DyNM_allButtonNewBorderRadius=Je.DyNM_ButtonNewBorderRadius=void 0;var qn=function(e){return e.full="full",e.rounded="rounded",e.smallRadius="smallRadius",e.square="square",e}(qn||(Je.DyNM_ButtonNewBorderRadius=qn={}));Je.DyNM_allButtonNewBorderRadius=Object.values(qn)});var Ut=f(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.DyNM_allButtonNewSizes=Qe.DyNM_ButtonNewSize=void 0;var Zn=function(e){return e.xs="xs",e.small="small",e.medium="medium",e.large="large",e.xl="xl",e}(Zn||(Qe.DyNM_ButtonNewSize=Zn={}));Qe.DyNM_allButtonNewSizes=Object.values(Zn)});var Kt=f(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.DyNM_allButtonNewStyleTypes=et.DyNM_ButtonNewStyleType=void 0;var Jn=function(e){return e.filled="filled",e.stroked="stroked",e.outstanding="outstanding",e.tonal="tonal",e.backgroundless="backgroundless",e}(Jn||(et.DyNM_ButtonNewStyleType=Jn={}));et.DyNM_allButtonNewStyleTypes=Object.values(Jn)});var St=f(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.DyNM_allMaterialColors=tt.DyNM_MaterialColor=void 0;var Qn=function(e){return e.primary="primary",e.accent="accent",e.warn="warn",e.none="",e}(Qn||(tt.DyNM_MaterialColor=Qn={}));tt.DyNM_allMaterialColors=Object.values(Qn)});var ti=f(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.DyNM_allButtonNewIconStyleTypes=ot.DyNM_ButtonNewIconStyleType=void 0;var ei=function(e){return e.rounded="rounded",e.outlined="outlined",e}(ei||(ot.DyNM_ButtonNewIconStyleType=ei={}));ot.DyNM_allButtonNewIconStyleTypes=Object.values(ei)});var ni=f(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.DyNM_ButtonNewStyle_Settings=void 0;var kl=Ht(),Xa=ti(),Ll=Ut(),Gl=Kt(),Hl=St(),oi=class{size=Ll.DyNM_ButtonNewSize.medium;color=Hl.DyNM_MaterialColor.primary;styleType=Gl.DyNM_ButtonNewStyleType.filled;borderRadius=kl.DyNM_ButtonNewBorderRadius.smallRadius;isIconButton;iconFill;iconStyle=Xa.DyNM_ButtonNewIconStyleType.rounded;constructor(t){t&&Object.assign(this,t),this.isIconButton&&!this.iconStyle&&(this.iconStyle=Xa.DyNM_ButtonNewIconStyleType.rounded)}};Vt.DyNM_ButtonNewStyle_Settings=oi});var Wa=f($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.DyNM_ButtonNewStyleSettingsPresets=void 0;var Le=Ht(),z=Ut(),Q=Kt(),za=St(),K=ni();$t.DyNM_ButtonNewStyleSettingsPresets={xs:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs}),xsIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,isIconButton:!0}),xsRounded:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),xsStroked:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked}),xsStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),xsBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),xsRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal}),small:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.small}),smallIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallTonalIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallRounded:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.small}),smallTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallStrokedRounded:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallBackgroundless:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,size:z.DyNM_ButtonNewSize.small}),icon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0}),backgroundlessSmallIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small,color:""}),backgroundlessIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,color:""}),smallBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),strokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),backgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),accent:new K.DyNM_ButtonNewStyle_Settings({color:za.DyNM_MaterialColor.accent}),strokedAccent:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,color:za.DyNM_MaterialColor.accent}),stroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked}),round:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),strokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),large:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.large}),largeStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.large}),largeStrokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.large}),largeTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.large}),largeIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),largeStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),xl:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl}),xlIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl,isIconButton:!0})}});var ii=f(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.DyNM_Container_Type=void 0;var Ya=function(e){return e.card="card",e.accordion="accordion",e.dynamo="dynamo",e.dynamoSmall="dynamo-small",e.none="none",e}(Ya||(jt.DyNM_Container_Type=Ya={}))});var ai=f(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DyNM_FieldAppearance=void 0;var qa=function(e){return e.fill="fill",e.outline="outline",e}(qa||(Xt.DyNM_FieldAppearance=qa={}))});var si=f(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.DyNM_Storage_Type=void 0;var Za=function(e){return e.session="session",e.local="local",e.none="",e}(Za||(zt.DyNM_Storage_Type=Za={}))});var Qa=f(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.DyNM_global_settings=void 0;var Ul=ii(),Kl=ai(),Ja=si();Wt.DyNM_global_settings={fieldAppearance:Kl.DyNM_FieldAppearance.outline,baseUrl:"/api",usageEndpoints:{startSession:"/usage/new-session",updateUsage:"/usage/update/{sessionId}",closeSession:"/usage/close-session/{sessionId}",getUsageData:"/usage/get/all"},alwaysLookForFieldAdder:!1,fieldErrorMessages:{required:"This field is required",email:"This is not a valid email format",mask:"This is not a valid format"},defaultStorage:Ja.DyNM_Storage_Type.session,storageEncryptionKey:"DEFAULT_DyFM_ENCRYPTION_KEY_CHANGE_THIS_XXXXXXX00000009999999999",defaultFormStorage:Ja.DyNM_Storage_Type.session,defaultFormContainerType:Ul.DyNM_Container_Type.none,formMessages:{required:"There are required fields to set!",invalid:"The form is not set correctly",submitSuccess:"Save was successful!",submitFailed:"Saving data has failed!"},questionDefaultOptions:{a:"No",b:"Yes"},fieldTooltipShowDelay:300,snackBarHideLabel:"Hide",log_settings:{api_calls:!0,messagesCS_debug:!1}}});var ri=f(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DyNM_Button_Type=void 0;var es=function(e){return e.default="default",e.big="big",e.stroked="stroked",e.bigStroked="big-stroked",e.small="small",e.smallStroked="small-stroked",e.round="round",e.strokedRound="stroked-round",e.bigStrokedRound="big-stroked-round",e.block="block",e.bigBlock="big-block",e.strokedBlock="stroked-block",e.bigStrokedBlock="big-stroked-block",e.outstanding="outstanding",e.icon="icon",e.iconSmall="icon-small",e.iconBig="icon-big",e.iconStroked="icon-stroked",e.iconSmallStroked="icon-small-stroked",e.iconBigStroked="icon-big-stroked",e.iconOutstanding="icon-outstanding",e}(es||(Yt.DyNM_Button_Type=es={}))});var os=f(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.DyNM_CheckboxLabelPosition=void 0;var ts=function(e){return e.before="before",e.after="after",e}(ts||(qt.DyNM_CheckboxLabelPosition=ts={}))});var is=f(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DyNM_Field_Type=void 0;var ns=function(e){return e.spacer="spacer",e.checkbox="checkbox",e.toggle="toggle",e.text="text",e.textList="textList",e.password="password",e.textarea="textarea",e.richtextarea="richtextarea",e.number="number",e.numberRange="numberRange",e.slider="slider",e.sliderRange="sliderRange",e.select="select",e.multiselect="multiselect",e.chipSelect="chipSelect",e.chipMultiselect="chipMultiselect",e.radioSelect="radioSelect",e.date="date",e.dateRange="dateRange",e.dateTime="dateTime",e.dateTimeRange="dateTimeRange",e.file="file",e.files="files",e.picture="picture",e.pictures="pictures",e.fieldAdder="fieldAdder",e.multifield="multifield",e}(ns||(Zt.DyNM_Field_Type=ns={}))});var ss=f(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DyNM_File_Type=void 0;var as=function(e){return e.arrayBuffer="arrayBuffer",e.binaryString="binaryString",e.dataUrl="dataUrl",e.text="text",e.blob="blob",e.file="file",e}(as||(Jt.DyNM_File_Type=as={}))});var ds=f(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DyNM_FormAccess=void 0;var rs=function(e){return e.readOnly="read-only",e.writeOnly="write-only",e.readNWrite="read-n-write",e}(rs||(Qt.DyNM_FormAccess=rs={}))});var ls=f(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.DyNM_FormResetData=void 0;var cs=function(e){return e.null="null",e.empty="empty",e.default="deafult",e.dataHandler="data-handler",e.init="init",e.stored="stored",e}(cs||(eo.DyNM_FormResetData=cs={}))});var us=f(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.DyNM_FormStoreOn=void 0;var ms=function(e){return e.close="close",e.change="change",e}(ms||(to.DyNM_FormStoreOn=ms={}))});var ci=f(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.DyNM_allMaterialTooltipPositions=nt.DyNM_MaterialTooltipPosition=void 0;var di=function(e){return e.above="above",e.below="below",e.before="before",e.after="after",e.left="left",e.right="right",e}(di||(nt.DyNM_MaterialTooltipPosition=di={}));nt.DyNM_allMaterialTooltipPositions=Object.values(di)});var gs=f(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.DyNM_PreconfiguredField_Type=void 0;var ps=function(e){return e.email="email",e.phone="phone",e}(ps||(oo.DyNM_PreconfiguredField_Type=ps={}))});var hs=f(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.DyNM_Validator_Type=void 0;var fs=function(e){return e.requiredCheckbox="requiredCheckbox",e}(fs||(no.DyNM_Validator_Type=fs={}))});var ys=f(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.DyNM_FXLayoutAlignPerDir=it.DyNM_FXLayoutAlignLayDir=void 0;var _s=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.spaceAround="space-around",e.spaceBetween="space-between",e}(_s||(it.DyNM_FXLayoutAlignLayDir=_s={})),Cs=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.stretch="stretch",e}(Cs||(it.DyNM_FXLayoutAlignPerDir=Cs={}))});var bs=f(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.DyNM_FXLayout=void 0;var xs=function(e){return e.row="row",e.column="column",e}(xs||(io.DyNM_FXLayout=xs={}))});var Ss=f(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.DyNM_HTMLInput_Type=void 0;var vs=function(e){return e.button="button",e.checkbox="checkbox",e.color="color",e.date="date",e.datetimeLocal="datetime-local",e.email="email",e.file="file",e.hidden="hidden",e.image="image",e.month="month",e.number="number",e.password="password",e.radio="radio",e.range="range",e.reset="reset",e.search="search",e.submit="submit",e.tel="tel",e.text="text",e.time="time",e.url="url",e.week="week",e}(vs||(ao.DyNM_HTMLInput_Type=vs={}))});var mi=f(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.DyNM_Button_Params=void 0;var Vl=vt(),Y=ri(),$l=St(),jl=ci(),Xl=jl.DyNM_MaterialTooltipPosition.above,zl=250,li=class{id;label;color=$l.DyNM_MaterialColor.primary;icon;description;descriptionPosition;descriptionDelay;type;disabled;dontRoute;routerLink;routerLinkQueryParams;iconAfter;buttonType;class;contentClass;classOnActive;contentClassOnActive;customClass;customContentClass;customClassOnActive;customContentClassOnActive;onClickEvents=[];useDisablerWhileEventsInProgress;constructor(t){t&&Object.assign(this,t),this.type||(this.icon&&!this.label?this.type=Y.DyNM_Button_Type.icon:this.type=Y.DyNM_Button_Type.default),this.id||(this.id=`${this.label}-${this.type}-${this.color}-button`),(this.description||this.type.includes("icon")&&this.label)&&(this.descriptionPosition||(this.descriptionPosition=Xl),this.descriptionDelay||(this.descriptionDelay=zl)),this.class=Wl(this.type,this.color)+(this.customClass??""),this.contentClass=ql(this.type,this.customContentClass)+(this.customContentClass??""),(this.customClassOnActive||this.routerLink)&&(this.classOnActive=Yl(this.type,this.color)+(this.customClassOnActive??""),this.contentClassOnActive=this.customContentClassOnActive??"")}executeEvents(t){return Se(this,null,function*(){yield Vl.DyFM_Array.asyncForEach(this.onClickEvents,o=>Se(this,null,function*(){yield o(t)}))})}};so.DyNM_Button_Params=li;function Wl(e,t,o=!0){let n="";switch(o?(n+="disabled:bg-neutral-800 ",n+="disabled:hover:bg-neutral-600 ",n+="disabled:text-neutral-600 ",n+="disabled:hover:text-neutral-900 "):(n+="disabled:bg-neutral-200 ",n+="disabled:hover:bg-neutral-400 ",n+="disabled:text-neutral-400 ",n+="disabled:hover:text-neutral-100 "),n+="disabled:cursor-not-allowed ",e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.stroked:n+="rounded-xl ";break;case Y.DyNM_Button_Type.small:case Y.DyNM_Button_Type.smallStroked:n+="rounded-md ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigStroked:n+="rounded-2xl ";break}return e.includes("stroked")?(e.includes("big")?n+="border-4 ":n+="border-2 ",n+=`border-${t}-500 `,n+=`text-${t}-500 `,o?(n+=`hover:bg-${t}-950 `,n+="disabled:border-neutral-600 "):(n+=`hover:bg-${t}-50 `,n+="disabled:border-neutral-400 ")):(n+=`bg-${t}-500 `,n+=`text-${t}C-500 `,o?(n+=`hover:bg-${t}-300 `,n+=`hover:text-${t}C-300 `):(n+=`hover:bg-${t}-700 `,n+=`hover:text-${t}C-700 `)),e.includes("round")&&(n+="rounded-full "),e.includes("icon")?n+="rounded-full ":n+="w-full ",e.includes("outstanding")&&(n+="outstanding ",n.includes("rounded-full")||(n+="rounded-full ")),n}function Yl(e,t,o=!0){let n=" ";return e.includes("stroked")?o?n+=`bg-${t}-950 `:n+=`bg-${t}-50 `:o?(n+=`bg-${t}-300 `,n+=`text-${t}C-300 `):(n+=`bg-${t}-700 `,n+=`text-${t}C-700 `),n}function ql(e,t){let o="flex ";switch(t?.includes("items-")||(o+="items-center "),t?.includes("justify-")||(o+="justify-center "),e.includes("icon")||(e.includes("big")?o+="text-2xl ":o+="text-md "),e.includes("icon")||(e.includes("small")?o+="mx-2 ":o+="mx-5 "),e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.block:o+="my-3 ";break;case Y.DyNM_Button_Type.stroked:case Y.DyNM_Button_Type.strokedBlock:o+="my-2.5 ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigBlock:case Y.DyNM_Button_Type.bigStroked:case Y.DyNM_Button_Type.bigStrokedBlock:o+="my-3 ";break;case Y.DyNM_Button_Type.round:o+="my-3 ";break;case Y.DyNM_Button_Type.strokedRound:o+="my-2.5 ";break;case Y.DyNM_Button_Type.outstanding:o+="my-3 ";break;case Y.DyNM_Button_Type.icon:o+="p-2 ",o+="text-2xl ";break;case Y.DyNM_Button_Type.iconStroked:o+="p-1.5 ",o+="text-2xl ";break;case Y.DyNM_Button_Type.iconSmall:case Y.DyNM_Button_Type.iconSmallStroked:o+="p-1 ",o+="text-lg ";break;case Y.DyNM_Button_Type.iconBig:o+="p-4 ",o+="text-4xl ";break;case Y.DyNM_Button_Type.iconBigStroked:o+="p-3 ",o+="text-4xl ";break;case Y.DyNM_Button_Type.iconOutstanding:o+="p-2.5 ";break}return o}});var Ms=f(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.DyNM_DataHandler=void 0;var at=vt(),ui=class e{name;get data(){return this.data_$()}lastLoadedBy;get;set;getPostProcesses=[];noId;waitsOnLoad=[];dependentDataHandlers=[];loopSafetyCollection=[];loopSafetyTimeout=at.second;loopSafety=10;debugLog;constructor(t,o){try{t.name||(t.name="Unnamed DataHandler "+ +new Date,at.DyFM_Log.warn(`DYNAMO DH.constructor (${this.name}) WARN:
|
|
1
|
+
import{c as Pl}from"./chunk-7X53ZYAD.js";import{a as he,b as _e,c as Il,e as $a,h as ja,j as Fl,k as zn,l as Wn,m as Yn,o as Tl,p as vt}from"./chunk-7ROTKIYT.js";import{F as Va,a as X,b as Z,c as Ka,f,h as ge,i as fe,k as Se}from"./chunk-TBMJSIBB.js";var Ht=f(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.DyNM_allButtonNewBorderRadius=Je.DyNM_ButtonNewBorderRadius=void 0;var qn=function(e){return e.full="full",e.rounded="rounded",e.smallRadius="smallRadius",e.square="square",e}(qn||(Je.DyNM_ButtonNewBorderRadius=qn={}));Je.DyNM_allButtonNewBorderRadius=Object.values(qn)});var Ut=f(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.DyNM_allButtonNewSizes=Qe.DyNM_ButtonNewSize=void 0;var Zn=function(e){return e.xs="xs",e.small="small",e.medium="medium",e.large="large",e.xl="xl",e}(Zn||(Qe.DyNM_ButtonNewSize=Zn={}));Qe.DyNM_allButtonNewSizes=Object.values(Zn)});var Kt=f(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.DyNM_allButtonNewStyleTypes=et.DyNM_ButtonNewStyleType=void 0;var Jn=function(e){return e.filled="filled",e.stroked="stroked",e.outstanding="outstanding",e.tonal="tonal",e.backgroundless="backgroundless",e}(Jn||(et.DyNM_ButtonNewStyleType=Jn={}));et.DyNM_allButtonNewStyleTypes=Object.values(Jn)});var St=f(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.DyNM_allMaterialColors=tt.DyNM_MaterialColor=void 0;var Qn=function(e){return e.primary="primary",e.accent="accent",e.warn="warn",e.none="",e}(Qn||(tt.DyNM_MaterialColor=Qn={}));tt.DyNM_allMaterialColors=Object.values(Qn)});var ti=f(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.DyNM_allButtonNewIconStyleTypes=ot.DyNM_ButtonNewIconStyleType=void 0;var ei=function(e){return e.rounded="rounded",e.outlined="outlined",e}(ei||(ot.DyNM_ButtonNewIconStyleType=ei={}));ot.DyNM_allButtonNewIconStyleTypes=Object.values(ei)});var ni=f(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.DyNM_ButtonNewStyle_Settings=void 0;var kl=Ht(),Xa=ti(),Ll=Ut(),Gl=Kt(),Hl=St(),oi=class{size=Ll.DyNM_ButtonNewSize.medium;color=Hl.DyNM_MaterialColor.primary;styleType=Gl.DyNM_ButtonNewStyleType.filled;borderRadius=kl.DyNM_ButtonNewBorderRadius.smallRadius;isIconButton;iconFill;iconStyle=Xa.DyNM_ButtonNewIconStyleType.rounded;constructor(t){t&&Object.assign(this,t),this.isIconButton&&!this.iconStyle&&(this.iconStyle=Xa.DyNM_ButtonNewIconStyleType.rounded)}};Vt.DyNM_ButtonNewStyle_Settings=oi});var Wa=f($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.DyNM_ButtonNewStyleSettingsPresets=void 0;var Le=Ht(),z=Ut(),Q=Kt(),za=St(),K=ni();$t.DyNM_ButtonNewStyleSettingsPresets={xs:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs}),xsIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,isIconButton:!0}),xsRounded:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),xsStroked:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked}),xsStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),xsBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),xsRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal}),small:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.small}),smallIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallTonalIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallRounded:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.small}),smallTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallStrokedRounded:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallBackgroundless:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,size:z.DyNM_ButtonNewSize.small}),icon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0}),backgroundlessSmallIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small,color:""}),backgroundlessIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,color:""}),smallBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),strokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),backgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),accent:new K.DyNM_ButtonNewStyle_Settings({color:za.DyNM_MaterialColor.accent}),strokedAccent:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,color:za.DyNM_MaterialColor.accent}),stroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked}),round:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),strokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),large:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.large}),largeStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.large}),largeStrokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.large}),largeTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.large}),largeIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),largeStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),xl:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl}),xlIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl,isIconButton:!0})}});var ii=f(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.DyNM_Container_Type=void 0;var Ya=function(e){return e.card="card",e.accordion="accordion",e.dynamo="dynamo",e.dynamoSmall="dynamo-small",e.none="none",e}(Ya||(jt.DyNM_Container_Type=Ya={}))});var ai=f(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DyNM_FieldAppearance=void 0;var qa=function(e){return e.fill="fill",e.outline="outline",e}(qa||(Xt.DyNM_FieldAppearance=qa={}))});var si=f(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.DyNM_Storage_Type=void 0;var Za=function(e){return e.session="session",e.local="local",e.none="",e}(Za||(zt.DyNM_Storage_Type=Za={}))});var Qa=f(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.DyNM_global_settings=void 0;var Ul=ii(),Kl=ai(),Ja=si();Wt.DyNM_global_settings={fieldAppearance:Kl.DyNM_FieldAppearance.outline,baseUrl:"/api",usageEndpoints:{startSession:"/usage/new-session",updateUsage:"/usage/update/{sessionId}",closeSession:"/usage/close-session/{sessionId}",getUsageData:"/usage/get/all"},alwaysLookForFieldAdder:!1,fieldErrorMessages:{required:"This field is required",email:"This is not a valid email format",mask:"This is not a valid format"},defaultStorage:Ja.DyNM_Storage_Type.session,storageEncryptionKey:"DEFAULT_DyFM_ENCRYPTION_KEY_CHANGE_THIS_XXXXXXX00000009999999999",defaultFormStorage:Ja.DyNM_Storage_Type.session,defaultFormContainerType:Ul.DyNM_Container_Type.none,formMessages:{required:"There are required fields to set!",invalid:"The form is not set correctly",submitSuccess:"Save was successful!",submitFailed:"Saving data has failed!"},questionDefaultOptions:{a:"No",b:"Yes"},fieldTooltipShowDelay:300,snackBarHideLabel:"Hide",log_settings:{api_calls:!0,messagesCS_debug:!1}}});var ri=f(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DyNM_Button_Type=void 0;var es=function(e){return e.default="default",e.big="big",e.stroked="stroked",e.bigStroked="big-stroked",e.small="small",e.smallStroked="small-stroked",e.round="round",e.strokedRound="stroked-round",e.bigStrokedRound="big-stroked-round",e.block="block",e.bigBlock="big-block",e.strokedBlock="stroked-block",e.bigStrokedBlock="big-stroked-block",e.outstanding="outstanding",e.icon="icon",e.iconSmall="icon-small",e.iconBig="icon-big",e.iconStroked="icon-stroked",e.iconSmallStroked="icon-small-stroked",e.iconBigStroked="icon-big-stroked",e.iconOutstanding="icon-outstanding",e}(es||(Yt.DyNM_Button_Type=es={}))});var os=f(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.DyNM_CheckboxLabelPosition=void 0;var ts=function(e){return e.before="before",e.after="after",e}(ts||(qt.DyNM_CheckboxLabelPosition=ts={}))});var is=f(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DyNM_Field_Type=void 0;var ns=function(e){return e.spacer="spacer",e.checkbox="checkbox",e.toggle="toggle",e.text="text",e.textList="textList",e.password="password",e.textarea="textarea",e.richtextarea="richtextarea",e.number="number",e.numberRange="numberRange",e.slider="slider",e.sliderRange="sliderRange",e.select="select",e.multiselect="multiselect",e.chipSelect="chipSelect",e.chipMultiselect="chipMultiselect",e.radioSelect="radioSelect",e.date="date",e.dateRange="dateRange",e.dateTime="dateTime",e.dateTimeRange="dateTimeRange",e.file="file",e.files="files",e.picture="picture",e.pictures="pictures",e.fieldAdder="fieldAdder",e.multifield="multifield",e}(ns||(Zt.DyNM_Field_Type=ns={}))});var ss=f(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DyNM_File_Type=void 0;var as=function(e){return e.arrayBuffer="arrayBuffer",e.binaryString="binaryString",e.dataUrl="dataUrl",e.text="text",e.blob="blob",e.file="file",e}(as||(Jt.DyNM_File_Type=as={}))});var ds=f(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DyNM_FormAccess=void 0;var rs=function(e){return e.readOnly="read-only",e.writeOnly="write-only",e.readNWrite="read-n-write",e}(rs||(Qt.DyNM_FormAccess=rs={}))});var ls=f(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.DyNM_FormResetData=void 0;var cs=function(e){return e.null="null",e.empty="empty",e.default="deafult",e.dataHandler="data-handler",e.init="init",e.stored="stored",e}(cs||(eo.DyNM_FormResetData=cs={}))});var us=f(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.DyNM_FormStoreOn=void 0;var ms=function(e){return e.close="close",e.change="change",e}(ms||(to.DyNM_FormStoreOn=ms={}))});var ci=f(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.DyNM_allMaterialTooltipPositions=nt.DyNM_MaterialTooltipPosition=void 0;var di=function(e){return e.above="above",e.below="below",e.before="before",e.after="after",e.left="left",e.right="right",e}(di||(nt.DyNM_MaterialTooltipPosition=di={}));nt.DyNM_allMaterialTooltipPositions=Object.values(di)});var gs=f(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.DyNM_PreconfiguredField_Type=void 0;var ps=function(e){return e.email="email",e.phone="phone",e}(ps||(oo.DyNM_PreconfiguredField_Type=ps={}))});var hs=f(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.DyNM_Validator_Type=void 0;var fs=function(e){return e.requiredCheckbox="requiredCheckbox",e}(fs||(no.DyNM_Validator_Type=fs={}))});var ys=f(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.DyNM_FXLayoutAlignPerDir=it.DyNM_FXLayoutAlignLayDir=void 0;var _s=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.spaceAround="space-around",e.spaceBetween="space-between",e}(_s||(it.DyNM_FXLayoutAlignLayDir=_s={})),Cs=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.stretch="stretch",e}(Cs||(it.DyNM_FXLayoutAlignPerDir=Cs={}))});var bs=f(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.DyNM_FXLayout=void 0;var xs=function(e){return e.row="row",e.column="column",e}(xs||(io.DyNM_FXLayout=xs={}))});var Ss=f(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.DyNM_HTMLInput_Type=void 0;var vs=function(e){return e.button="button",e.checkbox="checkbox",e.color="color",e.date="date",e.datetimeLocal="datetime-local",e.email="email",e.file="file",e.hidden="hidden",e.image="image",e.month="month",e.number="number",e.password="password",e.radio="radio",e.range="range",e.reset="reset",e.search="search",e.submit="submit",e.tel="tel",e.text="text",e.time="time",e.url="url",e.week="week",e}(vs||(ao.DyNM_HTMLInput_Type=vs={}))});var mi=f(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.DyNM_Button_Params=void 0;var Vl=vt(),Y=ri(),$l=St(),jl=ci(),Xl=jl.DyNM_MaterialTooltipPosition.above,zl=250,li=class{id;label;color=$l.DyNM_MaterialColor.primary;icon;description;descriptionPosition;descriptionDelay;type;disabled;dontRoute;routerLink;routerLinkQueryParams;iconAfter;buttonType;class;contentClass;classOnActive;contentClassOnActive;customClass;customContentClass;customClassOnActive;customContentClassOnActive;onClickEvents=[];useDisablerWhileEventsInProgress;constructor(t){t&&Object.assign(this,t),this.type||(this.icon&&!this.label?this.type=Y.DyNM_Button_Type.icon:this.type=Y.DyNM_Button_Type.default),this.id||(this.id=`${this.label}-${this.type}-${this.color}-button`),(this.description||this.type.includes("icon")&&this.label)&&(this.descriptionPosition||(this.descriptionPosition=Xl),this.descriptionDelay||(this.descriptionDelay=zl)),this.class=Wl(this.type,this.color)+(this.customClass??""),this.contentClass=ql(this.type,this.customContentClass)+(this.customContentClass??""),(this.customClassOnActive||this.routerLink)&&(this.classOnActive=Yl(this.type,this.color)+(this.customClassOnActive??""),this.contentClassOnActive=this.customContentClassOnActive??"")}executeEvents(t){return Se(this,null,function*(){yield Vl.DyFM_Array.asyncForEach(this.onClickEvents,o=>Se(this,null,function*(){yield o(t)}))})}};so.DyNM_Button_Params=li;function Wl(e,t,o=!0){let n="";switch(o?(n+="disabled:bg-neutral-800 ",n+="disabled:hover:bg-neutral-600 ",n+="disabled:text-neutral-600 ",n+="disabled:hover:text-neutral-900 "):(n+="disabled:bg-neutral-200 ",n+="disabled:hover:bg-neutral-400 ",n+="disabled:text-neutral-400 ",n+="disabled:hover:text-neutral-100 "),n+="disabled:cursor-not-allowed ",e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.stroked:n+="rounded-xl ";break;case Y.DyNM_Button_Type.small:case Y.DyNM_Button_Type.smallStroked:n+="rounded-md ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigStroked:n+="rounded-2xl ";break}return e.includes("stroked")?(e.includes("big")?n+="border-4 ":n+="border-2 ",n+=`border-${t}-500 `,n+=`text-${t}-500 `,o?(n+=`hover:bg-${t}-950 `,n+="disabled:border-neutral-600 "):(n+=`hover:bg-${t}-50 `,n+="disabled:border-neutral-400 ")):(n+=`bg-${t}-500 `,n+=`text-${t}C-500 `,o?(n+=`hover:bg-${t}-300 `,n+=`hover:text-${t}C-300 `):(n+=`hover:bg-${t}-700 `,n+=`hover:text-${t}C-700 `)),e.includes("round")&&(n+="rounded-full "),e.includes("icon")?n+="rounded-full ":n+="w-full ",e.includes("outstanding")&&(n+="outstanding ",n.includes("rounded-full")||(n+="rounded-full ")),n}function Yl(e,t,o=!0){let n=" ";return e.includes("stroked")?o?n+=`bg-${t}-950 `:n+=`bg-${t}-50 `:o?(n+=`bg-${t}-300 `,n+=`text-${t}C-300 `):(n+=`bg-${t}-700 `,n+=`text-${t}C-700 `),n}function ql(e,t){let o="flex ";switch(t?.includes("items-")||(o+="items-center "),t?.includes("justify-")||(o+="justify-center "),e.includes("icon")||(e.includes("big")?o+="text-2xl ":o+="text-md "),e.includes("icon")||(e.includes("small")?o+="mx-2 ":o+="mx-5 "),e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.block:o+="my-3 ";break;case Y.DyNM_Button_Type.stroked:case Y.DyNM_Button_Type.strokedBlock:o+="my-2.5 ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigBlock:case Y.DyNM_Button_Type.bigStroked:case Y.DyNM_Button_Type.bigStrokedBlock:o+="my-3 ";break;case Y.DyNM_Button_Type.round:o+="my-3 ";break;case Y.DyNM_Button_Type.strokedRound:o+="my-2.5 ";break;case Y.DyNM_Button_Type.outstanding:o+="my-3 ";break;case Y.DyNM_Button_Type.icon:o+="p-2 ",o+="text-2xl ";break;case Y.DyNM_Button_Type.iconStroked:o+="p-1.5 ",o+="text-2xl ";break;case Y.DyNM_Button_Type.iconSmall:case Y.DyNM_Button_Type.iconSmallStroked:o+="p-1 ",o+="text-lg ";break;case Y.DyNM_Button_Type.iconBig:o+="p-4 ",o+="text-4xl ";break;case Y.DyNM_Button_Type.iconBigStroked:o+="p-3 ",o+="text-4xl ";break;case Y.DyNM_Button_Type.iconOutstanding:o+="p-2.5 ";break}return o}});var Ms=f(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.DyNM_DataHandler=void 0;var at=vt(),ui=class e{name;get data(){return this.data_$()}lastLoadedBy;get;set;getPostProcesses=[];noId;waitsOnLoad=[];dependentDataHandlers=[];loopSafetyCollection=[];loopSafetyTimeout=at.second;loopSafety=10;debugLog;constructor(t,o){try{t.name||(t.name="Unnamed DataHandler "+ +new Date,at.DyFM_Log.warn(`DYNAMO DH.constructor (${this.name}) WARN:
|
|
2
2
|
Name is not set!`,`
|
|
3
3
|
|
|
4
4
|
`,new Error)),this.name=t.name,this.debugLog=t?.debugLog,t.loopSafety===void 0?t.loopSafety=10:this.loopSafety=t.loopSafety,t.get&&(this.get=t.get),t.set&&(this.set=t.set),this.noId=!!t.noId,o||(t.dependencyDataHandler&&this.addDependencyDataHandler(t.dependencyDataHandler,!0),t.dependentDataHandlers&&this.addDependentDataHandlers(t.dependentDataHandlers,!0)),t.getPostProcess&&this.getPostProcesses.push(t.getPostProcess)}catch(n){at.DyFM_Log.error(`Error creating DyNM_DataHandler (${t.name}):`,n)}}addDependencyDataHandler(t,o){try{if(!t)throw new Error(`DYNAMO DH.addDependencyDataHandler (${this.name}) ERROR:
|
|
@@ -112,4 +112,4 @@ This usually indicates:
|
|
|
112
112
|
2) Invalid encryption key,
|
|
113
113
|
3) Serialization failure.`),g}}return e})();rn.DyFM_Crypto=H0});var ld=f(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var U0=(_e(),fe(he));U0.__exportStar(cd(),ea)});var Fe=f(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.DyFM_AI_Provider=void 0;var md=function(e){return e.OpenAI="open-ai",e.Anthropic="anthropic",e.Google="google",e.LocalAI="local-ai",e.FdpAI="fdp-ai",e}(md||(dn.DyFM_AI_Provider=md={}))});var ud=f(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.DyFM_AI_ModelRef_Util=void 0;var K0=Fe(),ta=class e{static separator=":";static validProviders=new Set(Object.values(K0.DyFM_AI_Provider));static create(t,o){return`${t}${e.separator}${o}`}static parse(t){let o=t.indexOf(e.separator);if(o<0)throw new Error(`Ervenytelen modelRef formatum: "${t}" -- hianyzik a "${e.separator}" elvlaszto`);let n=t.substring(0,o),g=t.substring(o+1);if(!e.validProviders.has(n))throw new Error(`Ismeretlen AI provider: "${n}" a modelRef-ben: "${t}"`);if(!g)throw new Error(`Ures modell azonosito a modelRef-ben: "${t}"`);return{provider:n,model:g}}static getProvider(t){return e.parse(t).provider}static getModel(t){return e.parse(t).model}static isValid(t){if(!t)return!1;let o=t.indexOf(e.separator);if(o<0)return!1;let n=t.substring(0,o),g=t.substring(o+1);return e.validProviders.has(n)&&!!g}};cn.DyFM_AI_ModelRef_Util=ta});var gd=f(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.DyFM_AI_ModelType=void 0;var pd=function(e){return e.LLM="llm",e.Embedding="embedding",e.Chat="chat",e}(pd||(ln.DyFM_AI_ModelType=pd={}))});var hd=f(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.DyFM_AI_MessageRole=void 0;var fd=function(e){return e.system="system",e.user="user",e.assistant="assistant",e}(fd||(mn.DyFM_AI_MessageRole=fd={}))});var Rt=f(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.DyFM_AI_CallSettings=void 0;var oa=class{systemPrompt="";useModel;project;debugLog;temperature=0;maxTokens=2e3;topP=.75;frequencyPenalty=0;presencePenalty=0;constructor(t){t&&Object.assign(this,t)}};un.DyFM_AI_CallSettings=oa});var Cd=f(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0})});var xd=f(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0})});var vd=f(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0})});var Md=f(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0})});var Ad=f(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0})});var Bd=f(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0})});var Nd=f(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0})});var Bt=f(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.DyFM_AI_Settings=void 0;var na=class{provider;config;defaultSettings;constructor(t){t&&Object.assign(this,t)}};pn.DyFM_AI_Settings=na});var Et=f(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.DyFM_AI_UserProviderConfig=void 0;var ia=class{provider;encryptedApiKey;keySuffix;isActive;label;lastTestedAt;lastUsedAt;selectedModels;constructor(t){t&&Object.assign(this,t)}};gn.DyFM_AI_UserProviderConfig=ia});var wd=f(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});var Ce=(_e(),fe(he));Ce.__exportStar(ud(),de);Ce.__exportStar(Fe(),de);Ce.__exportStar(gd(),de);Ce.__exportStar(hd(),de);Ce.__exportStar(Rt(),de);Ce.__exportStar(Cd(),de);Ce.__exportStar(xd(),de);Ce.__exportStar(vd(),de);Ce.__exportStar(Md(),de);Ce.__exportStar(Ad(),de);Ce.__exportStar(Bd(),de);Ce.__exportStar(Nd(),de);Ce.__exportStar(Bt(),de);Ce.__exportStar(Et(),de)});var fn=f(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.DyFM_OAI_allEmbeddingModels=dt.DyFM_OAI_Model=void 0;var Nt=function(e){return e.gpt5="gpt-5",e.gpt51="gpt-5.1",e.gpt5_mini="gpt-5-mini",e.gpt5_nano="gpt-5-nano",e.gpt5_chatLatest="gpt-5-chat-latest",e.gpt51_chatLatest="gpt-5.1-chat-latest",e.gpt5_codex="gpt-5-codex",e.gpt51_codex="gpt-5.1-codex",e.gpt4o="gpt-4o",e.gpt4o_20240806="gpt-4o-2024-08-06",e.gpt4o_20240513="gpt-4o-2024-05-13",e.gpt4o_mini="gpt-4o-mini",e.gpt4o_mini20240718="gpt-4o-mini-2024-07-18",e.textEmbedding_3Small="text-embedding-3-small",e.textEmbedding_3Large="text-embedding-3-large",e.textEmbedding_ada002="text-embedding-ada-002",e}(Nt||(dt.DyFM_OAI_Model=Nt={}));dt.DyFM_OAI_allEmbeddingModels=[Nt.textEmbedding_3Small,Nt.textEmbedding_3Large,Nt.textEmbedding_ada002]});var Od=f(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.DyFM_OAI_EmbeddingModelDimensions=void 0;var aa=fn();hn.DyFM_OAI_EmbeddingModelDimensions={[aa.DyFM_OAI_Model.textEmbedding_3Small]:1536,[aa.DyFM_OAI_Model.textEmbedding_3Large]:3072,[aa.DyFM_OAI_Model.textEmbedding_ada002]:1536}});var ra=f(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.DyFM_OAI_CallSettings=void 0;var V0=Rt(),$0=fn(),sa=class extends V0.DyFM_AI_CallSettings{useModel=$0.DyFM_OAI_Model.gpt4o;constructor(t){super(t),t&&Object.assign(this,t)}};_n.DyFM_OAI_CallSettings=sa});var Fd=f(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0})});var Pd=f(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0})});var kd=f(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.DyFM_OAI_Settings=void 0;var j0=Bt(),X0=Fe(),z0=ra(),da=class extends j0.DyFM_AI_Settings{provider=X0.DyFM_AI_Provider.OpenAI;defaultSettings=new z0.DyFM_OAI_CallSettings;config={};constructor(t){super(t),t&&Object.assign(this,t)}};Cn.DyFM_OAI_Settings=da});var Ld=f(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.DyFM_OAI_UserProviderConfig=void 0;var W0=Et(),Y0=Fe(),ca=class extends W0.DyFM_AI_UserProviderConfig{provider=Y0.DyFM_AI_Provider.OpenAI;organization;project;constructor(t){super(t),t&&Object.assign(this,t)}};yn.DyFM_OAI_UserProviderConfig=ca});var Gd=f(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});var Ve=(_e(),fe(he));Ve.__exportStar(Od(),Te);Ve.__exportStar(fn(),Te);Ve.__exportStar(ra(),Te);Ve.__exportStar(Fd(),Te);Ve.__exportStar(Pd(),Te);Ve.__exportStar(kd(),Te);Ve.__exportStar(Ld(),Te)});var la=f(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.DyFM_AAI_Model=void 0;var Hd=function(e){return e.claude_3_5_sonnet_latest="claude-3-5-sonnet-latest",e.claude_3_5_sonnet_20241022="claude-3-5-sonnet-20241022",e.claude_3_5_haiku_latest="claude-3-5-haiku-latest",e.claude_3_opus_latest="claude-3-opus-latest",e.claude_3_sonnet_latest="claude-3-sonnet-latest",e.claude_3_haiku_latest="claude-3-haiku-latest",e}(Hd||(xn.DyFM_AAI_Model=Hd={}))});var Kd=f(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0})});var ua=f(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.DyFM_AAI_CallSettings=void 0;var q0=Rt(),Z0=la(),ma=class extends q0.DyFM_AI_CallSettings{useModel=Z0.DyFM_AAI_Model.claude_3_5_sonnet_latest;constructor(t){super(t),t&&Object.assign(this,t)}};bn.DyFM_AAI_CallSettings=ma});var Vd=f(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.DyFM_AAI_Settings=void 0;var J0=Bt(),Q0=Fe(),em=ua(),pa=class extends J0.DyFM_AI_Settings{provider=Q0.DyFM_AI_Provider.Anthropic;defaultSettings=new em.DyFM_AAI_CallSettings;config={};constructor(t){super(t),t&&Object.assign(this,t)}};vn.DyFM_AAI_Settings=pa});var $d=f(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.DyFM_AAI_UserProviderConfig=void 0;var tm=Et(),om=Fe(),ga=class extends tm.DyFM_AI_UserProviderConfig{provider=om.DyFM_AI_Provider.Anthropic;baseURL;constructor(t){super(t),t&&Object.assign(this,t)}};Sn.DyFM_AAI_UserProviderConfig=ga});var jd=f($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});var wt=(_e(),fe(he));wt.__exportStar(la(),$e);wt.__exportStar(Kd(),$e);wt.__exportStar(ua(),$e);wt.__exportStar(Vd(),$e);wt.__exportStar($d(),$e)});var fa=f(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.DyFM_FdpAI_Model=void 0;var Xd=function(e){return e.fdpBase1="fdp-base-1",e}(Xd||(Mn.DyFM_FdpAI_Model=Xd={}))});var Wd=f(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0})});var _a=f(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.DyFM_FdpAI_CallSettings=void 0;var nm=Rt(),im=fa(),ha=class extends nm.DyFM_AI_CallSettings{useModel=im.DyFM_FdpAI_Model.fdpBase1;constructor(t){super(t),t&&Object.assign(this,t)}};Dn.DyFM_FdpAI_CallSettings=ha});var Yd=f(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.DyFM_FdpAI_Settings=void 0;var am=Bt(),sm=Fe(),rm=_a(),Ca=class extends am.DyFM_AI_Settings{provider=sm.DyFM_AI_Provider.FdpAI;defaultSettings=new rm.DyFM_FdpAI_CallSettings;config={};constructor(t){super(t),t&&Object.assign(this,t)}};An.DyFM_FdpAI_Settings=Ca});var qd=f(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.DyFM_FdpAI_UserProviderConfig=void 0;var dm=Et(),cm=Fe(),ya=class extends dm.DyFM_AI_UserProviderConfig{provider=cm.DyFM_AI_Provider.FdpAI;baseURL;constructor(t){super(t),t&&Object.assign(this,t)}};Rn.DyFM_FdpAI_UserProviderConfig=ya});var Zd=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});var Ot=(_e(),fe(he));Ot.__exportStar(fa(),je);Ot.__exportStar(Wd(),je);Ot.__exportStar(_a(),je);Ot.__exportStar(Yd(),je);Ot.__exportStar(qd(),je)});var Qd=f(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.DyFM_Msg_Type=void 0;var Jd=function(e){return e.text="text",e.userToUser="user-to-user",e.userToAi="user-to-ai",e.aiToUser="ai-to-user",e.system="system",e.agentProcess="agent-process",e}(Jd||(Bn.DyFM_Msg_Type=Jd={}))});var tc=f(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.DyFM_Msg_Status=void 0;var ec=function(e){return e.draft="draft",e.sending="sending",e.sent="sent",e.delivered="delivered",e.read="read",e.failed="failed",e.deleted="deleted",e}(ec||(En.DyFM_Msg_Status=ec={}))});var nc=f(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.DyFM_Msg_DeliveryStatus=void 0;var oc=function(e){return e.pending="pending",e.delivered="delivered",e.failed="failed",e.read="read",e}(oc||(Nn.DyFM_Msg_DeliveryStatus=oc={}))});var ac=f(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.DyFM_Msg_ConversationType=void 0;var ic=function(e){return e.direct="direct",e.group="group",e.assistantChat="assistant-chat",e.agentProcess="agent-process",e.channel="channel",e}(ic||(wn.DyFM_Msg_ConversationType=ic={}))});var rc=f(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.DyFM_Msg_ParticipantRole=void 0;var sc=function(e){return e.owner="owner",e.admin="admin",e.member="member",e.assistant="assistant",e.agent="agent",e}(sc||(On.DyFM_Msg_ParticipantRole=sc={}))});var cc=f(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.DyFM_Msg_Provider_Type=void 0;var dc=function(e){return e.discord="discord",e.slack="slack",e.teams="teams",e.dynamo="dynamo",e.custom="custom",e}(dc||(In.DyFM_Msg_Provider_Type=dc={}))});var mc=f(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.DyFM_Msg_AttachmentType=void 0;var lc=function(e){return e.image="image",e.video="video",e.audio="audio",e.document="document",e.archive="archive",e.code="code",e.file="file",e}(lc||(Fn.DyFM_Msg_AttachmentType=lc={}))});var pc=f(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.DyFM_Msg_EventKey=void 0;var uc=function(e){return e.messageSent="msg:message-sent",e.messageUpdated="msg:message-updated",e.messageDeleted="msg:message-deleted",e.messageDelivered="msg:message-delivered",e.messageRead="msg:message-read",e.conversationCreated="msg:conversation-created",e.conversationUpdated="msg:conversation-updated",e.conversationDeleted="msg:conversation-deleted",e.participantAdded="msg:participant-added",e.participantRemoved="msg:participant-removed",e.typingStart="msg:typing-start",e.typingStop="msg:typing-stop",e.reactionAdded="msg:reaction-added",e.reactionRemoved="msg:reaction-removed",e.agentStepAdded="msg:agent-step-added",e.agentProcessComplete="msg:agent-process-complete",e}(uc||(Tn.DyFM_Msg_EventKey=uc={}))});var gc=f(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.DyFM_msgMessage_dataParams=ct.DyFM_Msg_Message=void 0;var lm=zn(),mm=Yn(),xa=class extends lm.DyFM_Metadata{conversationId;content;type;status;senderId;senderName;senderDisplayName;recipientIds;parentMessageId;threadId;threadInfo;attachments;mentions;reactions;aiProvider;aiModel;isAIGenerated;systemPrompt;agentProcessSteps;platformSource;platformMessageId;platformChannelId;sentAt;deliveredAt;readAt;editedAt;constructor(t){super(t),t&&Object.assign(this,t)}};ct.DyFM_Msg_Message=xa;ct.DyFM_msgMessage_dataParams=new mm.DyFM_DataModel_Params({dataName:"msg_message",properties:{conversationId:{key:"conversationId",type:"string",required:!0,index:!0},content:{key:"content",type:"string",required:!0},type:{key:"type",type:"string",required:!0},status:{key:"status",type:"string",required:!0,index:!0},senderId:{key:"senderId",type:"string",required:!0,index:!0},senderName:{key:"senderName",type:"string"},senderDisplayName:{key:"senderDisplayName",type:"string"},recipientIds:{key:"recipientIds",type:"string[]"},parentMessageId:{key:"parentMessageId",type:"string",index:!0},threadId:{key:"threadId",type:"string",index:!0},threadInfo:{key:"threadInfo",type:"object"},attachments:{key:"attachments",type:"object[]"},mentions:{key:"mentions",type:"object[]"},reactions:{key:"reactions",type:"object[]"},aiProvider:{key:"aiProvider",type:"string"},aiModel:{key:"aiModel",type:"string"},isAIGenerated:{key:"isAIGenerated",type:"boolean"},systemPrompt:{key:"systemPrompt",type:"string"},agentProcessSteps:{key:"agentProcessSteps",type:"object[]"},platformSource:{key:"platformSource",type:"string"},platformMessageId:{key:"platformMessageId",type:"string",index:!0},platformChannelId:{key:"platformChannelId",type:"string",index:!0},sentAt:{key:"sentAt",type:"Date",index:!0},deliveredAt:{key:"deliveredAt",type:"Date"},readAt:{key:"readAt",type:"Date"},editedAt:{key:"editedAt",type:"Date"}}})});var fc=f(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.DyFM_msgConversation_dataParams=lt.DyFM_Msg_Conversation=void 0;var um=zn(),pm=Yn(),ba=class extends um.DyFM_Metadata{title;type;participants;lastMessageId;lastMessageAt;lastMessagePreview;isArchived;isMuted;isPinned;platformSource;platformChannelId;platformChannelName;aiProvider;aiModel;systemPrompt;messageCount;unreadCount;constructor(t){super(t),t&&Object.assign(this,t)}};lt.DyFM_Msg_Conversation=ba;lt.DyFM_msgConversation_dataParams=new pm.DyFM_DataModel_Params({dataName:"msg_conversation",properties:{title:{key:"title",type:"string"},type:{key:"type",type:"string",required:!0,index:!0},participants:{key:"participants",type:"DyFM_Msg_Participant[]",required:!0,subObjectParams:{userId:{key:"userId",type:"string"},role:{key:"role",type:"string"},joinedAt:{key:"joinedAt",type:"Date"}}},lastMessageId:{key:"lastMessageId",type:"string"},lastMessageAt:{key:"lastMessageAt",type:"Date",index:!0},lastMessagePreview:{key:"lastMessagePreview",type:"string"},isArchived:{key:"isArchived",type:"boolean"},isMuted:{key:"isMuted",type:"boolean"},isPinned:{key:"isPinned",type:"boolean"},platformSource:{key:"platformSource",type:"string",index:!0},platformChannelId:{key:"platformChannelId",type:"string",index:!0},platformChannelName:{key:"platformChannelName",type:"string"},aiProvider:{key:"aiProvider",type:"string"},aiModel:{key:"aiModel",type:"string"},systemPrompt:{key:"systemPrompt",type:"string"},messageCount:{key:"messageCount",type:"number"},unreadCount:{key:"unreadCount",type:"number"}}})});var _c=f(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0})});var yc=f(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0})});var bc=f(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0})});var Sc=f(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0})});var Dc=f(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0})});var Ac=f(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.DyFM_msgModule_settings=mt.DyFM_MsgRoute=void 0;var se=function(e){return e.getConversations="getConversations",e.getConversation="getConversation",e.createConversation="createConversation",e.updateConversation="updateConversation",e.deleteConversation="deleteConversation",e.getMessages="getMessages",e.sendMessage="sendMessage",e.editMessage="editMessage",e.deleteMessage="deleteMessage",e.markAsRead="markAsRead",e.addReaction="addReaction",e.removeReaction="removeReaction",e.addParticipant="addParticipant",e.removeParticipant="removeParticipant",e.getAgentProcess="getAgentProcess",e}(se||(mt.DyFM_MsgRoute=se={}));mt.DyFM_msgModule_settings={mainRoute:"/messaging",endPoints:{[se.getConversations]:"/conversations",[se.getConversation]:"/conversations/:conversationId",[se.createConversation]:"/conversations/create",[se.updateConversation]:"/conversations/:conversationId",[se.deleteConversation]:"/conversations/:conversationId",[se.getMessages]:"/conversations/:conversationId/messages",[se.sendMessage]:"/conversations/:conversationId/messages/send",[se.editMessage]:"/messages/:messageId/edit",[se.deleteMessage]:"/messages/:messageId",[se.markAsRead]:"/messages/mark-read",[se.addReaction]:"/messages/:messageId/reactions",[se.removeReaction]:"/messages/:messageId/reactions/:emoji",[se.addParticipant]:"/conversations/:conversationId/participants",[se.removeParticipant]:"/conversations/:conversationId/participants/:userId",[se.getAgentProcess]:"/messages/:messageId/agent-process"}}});var Rc=f(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});var ce=(_e(),fe(he));ce.__exportStar(Qd(),ae);ce.__exportStar(tc(),ae);ce.__exportStar(nc(),ae);ce.__exportStar(ac(),ae);ce.__exportStar(rc(),ae);ce.__exportStar(cc(),ae);ce.__exportStar(mc(),ae);ce.__exportStar(pc(),ae);ce.__exportStar(gc(),ae);ce.__exportStar(fc(),ae);ce.__exportStar(_c(),ae);ce.__exportStar(yc(),ae);ce.__exportStar(bc(),ae);ce.__exportStar(Sc(),ae);ce.__exportStar(Dc(),ae);ce.__exportStar(Ac(),ae)});var Ec=f(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DyFM_Agt_ProcessStepType=void 0;var Bc=function(e){return e.collectContext="collect-context",e.analyze="analyze",e.reason="reason",e.plan="plan",e.toolUse="tool-use",e.retrieve="retrieve",e.generate="generate",e.validate="validate",e.error="error",e.complete="complete",e}(Bc||(Pn.DyFM_Agt_ProcessStepType=Bc={}))});var wc=f(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.DyFM_Agt_ToolStatus=void 0;var Nc=function(e){return e.pending="pending",e.running="running",e.success="success",e.failed="failed",e.cancelled="cancelled",e.timeout="timeout",e}(Nc||(kn.DyFM_Agt_ToolStatus=Nc={}))});var Ic=f(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0})});var Tc=f(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0})});var kc=f(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0})});var Lc=f(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});var It=(_e(),fe(he));It.__exportStar(Ec(),Xe);It.__exportStar(wc(),Xe);It.__exportStar(Ic(),Xe);It.__exportStar(Tc(),Xe);It.__exportStar(kc(),Xe)});var Gc=f(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.DyFM_fullTestRoute=te.DyFM_testModule_settings=te.DyFM_TestRoute=void 0;var me=function(e){return e.testGet="test-get",e.testPost="test-post",e.testPut="test-put",e.testPatch="test-patch",e.testDelete="test-delete",e.getServerStatus="get-server-status",e}(me||(te.DyFM_TestRoute=me={}));te.DyFM_testModule_settings={mainRoute:"/test",endPoints:X({},Object.fromEntries(Object.values(me).map(e=>[e,`/${e}`])))};te.DyFM_fullTestRoute={[me.testGet]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testGet],[me.testPost]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testPost],[me.testPut]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testPut],[me.testPatch]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testPatch],[me.testDelete]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testDelete],[me.getServerStatus]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.getServerStatus]}});var Hc=f(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});var gm=(_e(),fe(he));gm.__exportStar(Gc(),va)});var Uc=f(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.DyFM_usageModule_settings=pt.DyFM_UsageRoute=void 0;var ut=function(e){return e.newSession="newSession",e.closeSession="closeSession",e.updateUsage="updateUsage",e.getUsageData="getUsageData",e}(ut||(pt.DyFM_UsageRoute=ut={}));pt.DyFM_usageModule_settings={mainRoute:"/usage",endPoints:{[ut.newSession]:"/new-session",[ut.closeSession]:"/close-session/:sessionId",[ut.updateUsage]:"/update/:sessionId",[ut.getUsageData]:"/get/:range"}}});var Kc=f(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.DyFM_usageSession_dataParams=gt.DyFM_UsageSession=void 0;var fm=Yn(),hm=zn(),Sa=class extends hm.DyFM_Metadata{date;sessionStart;sessionEnd;address;issuer;locationData;usageData=[];totalSessionTime;loggedInAs;constructor(t){super(t),t&&(!t.date&&t.sessionStart&&(t.date=t.sessionStart.toISOString().substring(0,10)),Object.assign(this,t))}};gt.DyFM_UsageSession=Sa;gt.DyFM_usageSession_dataParams=new fm.DyFM_DataModel_Params({dataName:"usage_session",properties:{date:{key:"date",type:"string",required:!0,index:!0},sessionStart:{key:"sessionStart",type:"Date",required:!0,index:!0},sessionEnd:{key:"sessionEnd",type:"Date"},address:{key:"address",type:"string"},issuer:{key:"issuer",type:"string"},locationData:{key:"locationData",type:"IpApiLocation"},usageData:{key:"usageData",type:"UsageData[]"},totalSessionTime:{key:"totalSessionTime",type:"number"},loggedInAs:{key:"loggedInAs",type:"string"}}})});var Vc=f(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.DyFM_UsageData=void 0;var Ma=class{page;opened;timeSpentOnPage;actions=[];constructor(t){t&&Object.assign(this,t)}};Ln.DyFM_UsageData=Ma});var $c=f(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.DyFM_DailyUsageData=void 0;var Da=class{date;totalVisitTime=0;averageVisitTime=0;visitorsHun=0;visitorsElse=0;visitations=[];constructor(t){t&&Object.assign(this,t)}};Gn.DyFM_DailyUsageData=Da});var jc=f(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.DyFM_UsageAction=void 0;var Aa=class{action;time;constructor(t){t&&Object.assign(this,t)}};Hn.DyFM_UsageAction=Aa});var Xc=f(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});var Ft=(_e(),fe(he));Ft.__exportStar(Uc(),ze);Ft.__exportStar(Kc(),ze);Ft.__exportStar(Vc(),ze);Ft.__exportStar($c(),ze);Ft.__exportStar(jc(),ze)});var Wc=f(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.DyFM_Region=void 0;var zc=function(e){return e.europe="Europe",e.asia="Asia",e.africa="Africa",e.oceania="Oceania",e.americas="Americas",e}(zc||(Un.DyFM_Region=zc={}))});var qc=f(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.DyFM_SubRegion=void 0;var Yc=function(e){return e.northernEurope="Northern Europe",e.southernEurope="Southern Europe",e.westernEurope="Western Europe",e.easternEurope="Eastern Europe",e.northernAfrica="Northern Africa",e.subSaharanAfrica="Sub-Saharan Africa",e.northernAmerica="Northern America",e.latinAmericaAndTheCaribbean="Latin America and the Caribbean",e.southEasternAsia="South-eastern Asia",e.easternAsia="Eastern Asia",e.southernAsia="Southern Asia",e.westernAsia="Western Asia",e.centralAsia="Central Asia",e.australiaAndNewZealand="Australia and New Zealand",e.melanesia="Melanesia",e.micronesia="Micronesia",e.polynesia="Polynesia",e}(Yc||(Kn.DyFM_SubRegion=Yc={}))});var Jc=f(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.DyFM_SubdivisionRegionType=void 0;var Zc=function(e){return e[e.parish=0]="parish",e[e.emirate=1]="emirate",e[e.province=2]="province",e[e.dependency=3]="dependency",e[e.county=4]="county",e[e.city=5]="city",e[e.region=6]="region",e[e.state=7]="state",e[e.territory=8]="territory",e[e.autonomousRepublic=9]="autonomousRepublic",e[e.municipate=10]="municipate",e[e.rayon=11]="rayon",e[e.division=12]="division",e[e.district=13]="district",e[e.governorate=14]="governorate",e[e.department=15]="department",e[e.specialMunicipality=16]="specialMunicipality",e[e.federalDistrict=17]="federalDistrict",e[e.island=18]="island",e[e.town=19]="town",e[e.oblast=20]="oblast",e[e.commune=21]="commune",e[e.prefecture=22]="prefecture",e[e.economicPrefecture=23]="economicPrefecture",e[e.canton=24]="canton",e[e.autonomousRegion=25]="autonomousRegion",e[e.specialAdministrativeRegion=26]="specialAdministrativeRegion",e[e.capitalDistrict=27]="capitalDistrict",e[e.geographicalRegion=28]="geographicalRegion",e[e.capitalCity=29]="capitalCity",e[e.ruralMunicipality=30]="ruralMunicipality",e[e.urbanMunicipality=31]="urbanMunicipality",e[e.autonomousCommunity=32]="autonomousCommunity",e[e.autonomousCity=33]="autonomousCity",e[e.administration=34]="administration",e[e.regionalState=35]="regionalState",e[e.metropolitanRegion=36]="metropolitanRegion",e[e.overseasCollectivity=37]="overseasCollectivity",e}(Zc||(Vn.DyFM_SubdivisionRegionType=Zc={}))});var Qc=f($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.DyFM_Location=void 0;var _m=Wn(),Tt=Fl(),Ra=class{static getDistanceInKilometres(t,o){let g=Tt.DyFM_Trigonometry.angleToRadians(t.latitude),s=Tt.DyFM_Trigonometry.angleToRadians(o.latitude),C=Tt.DyFM_Trigonometry.angleToRadians(o.latitude-t.latitude),i=Tt.DyFM_Trigonometry.angleToRadians(o.longitude-t.longitude),l=Math.sin(C/2)*Math.sin(C/2)+Math.cos(g)*Math.cos(s)*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}static getLocationDegByKilometers(t,o,n){if(t==="latitude")return o/110.574;if(n)return o/(Math.cos(Tt.DyFM_Trigonometry.angleToRadians(n))*111.32);throw new _m.DyFM_Error({status:417,errorCode:"FSM-DSS-505",addECToUserMsg:!0,message:`When using getLocationDegByKilometers for longitude, you need to give latitude! (latiOrLong: ${t}, distanceInKm: ${o}, latitude: ${n})`,userMessage:"We encountered an uncought BackEnd Error, please contact the responsible development team."})}};$n.DyFM_Location=Ra});var tl=f(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0})});var nl=f(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0})});var al=f(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0})});var rl=f(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0})});var cl=f(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0})});var ml=f(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0})});var pl=f(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0})});var gl=f(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});var ye=(_e(),fe(he));ye.__exportStar(Wc(),le);ye.__exportStar(qc(),le);ye.__exportStar(Jc(),le);ye.__exportStar(Ni(),le);ye.__exportStar(ho(),le);ye.__exportStar(Qc(),le);ye.__exportStar(go(),le);ye.__exportStar(tl(),le);ye.__exportStar(nl(),le);ye.__exportStar(al(),le);ye.__exportStar(rl(),le);ye.__exportStar(cl(),le);ye.__exportStar(ml(),le);ye.__exportStar(pl(),le)});var re=ge(vt(),1);var T=ge(Ls(),1),ue=ge(Js(),1);var Cm=ge(ld(),1);var _l=ge(wd(),1),ym=ge(Gd(),1),xm=ge(jd(),1),bm=ge(Zd(),1),We=ge(Rc(),1),Ba=ge(Pl(),1),vm=ge(Lc(),1),Cl=ge(Hc(),1),Ea=ge(Xc(),1),yl=ge(gl(),1);var Af=(()=>{class e{subscriptions=[];markedSubscriptions={};polls=[];markedPolls={};ngOnDestroy(){this.subscriptions.forEach(o=>o.unsubscribe());for(let o in this.markedSubscriptions)this.markedSubscriptions[o]?.unsubscribe();this.polls.forEach(o=>o.stop());for(let o in this.markedPolls)this.markedPolls[o]?.stop()}addSubscription(o){this.subscriptions.push(o)}addSubscriptions(o){this.subscriptions.push(...o)}addMarkedSubscription(o,n){this.markedSubscriptions[o]?.unsubscribe(),this.markedSubscriptions[o]=n}addMarkedSubscriptions(o){for(let n in o)this.markedSubscriptions[n]?.unsubscribe(),this.markedSubscriptions[n]=o[n]}removeMarkedSubscription(o){this.markedSubscriptions[o]?.unsubscribe(),this.markedSubscriptions[o]=null}removeMarkedSubscriptions(o){o.forEach(n=>this.removeMarkedSubscription(n))}addNewPoll(o){this.polls.push(o)}addNewMarkedPoll(o,n){this.markedPolls[o]?.stop(),this.markedPolls[o]=n}removeMarkedPoll(o){this.markedPolls[o]?.stop(),this.markedPolls[o]=null}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Va({type:e})}return e})(),Pt=function(e){return e.info="info",e.success="success",e.warning="warning",e.error="error",e}(Pt||{});var Rf={[Pt.error]:{icon:"error",iconClass:"text-red-500",backgroundClass:"bg-red-50"},[Pt.info]:{icon:"info",iconClass:"text-blue-500",backgroundClass:"bg-blue-50"},[Pt.success]:{icon:"check_circle",iconClass:"text-green-500",backgroundClass:"bg-green-50"},[Pt.warning]:{icon:"warning",iconClass:"text-orange-500",backgroundClass:"bg-orange-50"}};var Sm="17.09",Bf=Sm.split(".")[0];var fl=class{static defaultDescriptionPosition=T.DyNM_MaterialTooltipPosition.above;static defaultDescriptionDelay=300;static definedButtonClasses={};static definedButtonContentClasses={};static getButtonStyleName(t){return[t.color,t.styleType,t.size,t.borderRadius,t.isIconButton?"icon":"",t.iconStyle,t.iconFill?"icon-fill":""].filter(n=>!!n).join("-")}static getButtonClasses(t){let o=this.getButtonStyleName(t);if(this.definedButtonClasses[o])return this.definedButtonClasses[o];{let n=this.assembleButtonClasses(t);return this.definedButtonClasses[o]=n,n}}static getButtonContentClasses(t){let o=this.getButtonStyleName(t);if(this.definedButtonContentClasses[o])return this.definedButtonContentClasses[o];{let n=this.assembleButtonContentClasses(t);return this.definedButtonContentClasses[o]=n,n}}static assembleButtonClasses(t){let o=[];return o.push(this.getButtonStyleName(t)),o.push(...this.getDefaultButtonClasses(t)),o.push("disabled:cursor-not-allowed"),o.push(...this.getColoringButtonClasses(t)),o.push(...this.getBorderRadiusClasses(t)),t.isIconButton||o.push("w-full"),o}static assembleButtonContentClasses(t){let o=["flex","items-center","justify-center"];return o.push(this.getButtonStyleName(t)),o.push(...this.getTextSizeButtonContentClasses(t)),t.iconFill&&o.push("dynamo-icon-fill"),t.isIconButton?o.push(...this.getIconMarginButtonContentClasses(t)):o.push(...this.getMarginButtonContentClasses(t)),o}static getDefaultButtonClasses(t){return t.styleType&&!(t.isIconButton||t.iconStyle!==T.DyNM_ButtonNewIconStyleType.outlined)&&![T.DyNM_ButtonNewStyleType.stroked,T.DyNM_ButtonNewStyleType.backgroundless].includes(t.styleType)?["disabled:bg-neutral-400/50","disabled:text-neutral-600","disabled:hover:bg-neutral-700/50","disabled:hover:text-neutral-200","dark:disabled:bg-neutral-600/50","dark:disabled:text-neutral-200","dark:disabled:hover:bg-neutral-600"]:[]}static getColoringButtonClasses(t){let o=[];switch(t.styleType){case T.DyNM_ButtonNewStyleType.stroked:return o.push("border-2",`border-${t.color}-500`,`text-${t.color}-500`,`hover:bg-${t.color}-500/10`,"disabled:border-neutral-500","disabled:bg-neutral-500/10","disabled:text-neutral-500","disabled:hover:bg-neutral-500/25"),T.DyNM_allMaterialColors.includes(t.color)||o.push(`dark:border-${t.color}-200`,`dark:text-${t.color}-200`,`dark:hover:bg-${t.color}-200`,`dark:hover:text-${t.color}C-200`,"dark:disabled:border-neutral-600"),o;case T.DyNM_ButtonNewStyleType.backgroundless:return o.push(`text-${t.color}-500`,`hover:bg-${t.color?t.color:"neutral"}-500/10`,"disabled:text-neutral-600","disabled:hover:bg-neutral-500/10"),T.DyNM_allMaterialColors.includes(t.color)||o.push(`dark:border-${t.color}-200`,`dark:text-${t.color}-200`,`dark:hover:bg-${t.color}-200`,`dark:hover:text-${t.color}C-200`),o;case T.DyNM_ButtonNewStyleType.tonal:return o.push(`text-${t.color}-600`,`dark:text-${t.color}-300`,`bg-${t.color}-100`,`dark:bg-${t.color}-800`,`hover:bg-${t.color}-200`,`dark:hover:bg-${t.color}-900`),T.DyNM_allMaterialColors.includes(t.color)||o.push(`dark:bg-${t.color}-200/50`,`dark:text-${t.color}C-500`),o;case T.DyNM_ButtonNewStyleType.filled:return[`bg-${t.color}-500`,`text-${t.color}C-500`,`hover:bg-${t.color}-700`,"disabled:bg-neutral-600","disabled:hover:bg-neutral-500/10"];default:return[]}}static getBorderRadiusClasses(t){if(t.isIconButton)return["rounded-full"];switch(t.borderRadius){case T.DyNM_ButtonNewBorderRadius.square:return["rounded-none"];case T.DyNM_ButtonNewBorderRadius.full:return["rounded-full"];case T.DyNM_ButtonNewBorderRadius.rounded:return["rounded-full"];default:switch(t.size){case T.DyNM_ButtonNewSize.xs:return["rounded-sm"];case T.DyNM_ButtonNewSize.small:return["rounded-lg"];case T.DyNM_ButtonNewSize.medium:return["rounded-2xl"];case T.DyNM_ButtonNewSize.large:return["rounded-3xl"];case T.DyNM_ButtonNewSize.xl:return["rounded-4xl"];default:return console.warn("CustomButtonSettingsModel: no border radius set. Default is rounded-lg."),["rounded-2xl"]}}}static getTextSizeButtonContentClasses(t){switch(t.size){case T.DyNM_ButtonNewSize.xs:return["text-xs"];case T.DyNM_ButtonNewSize.small:return["text-sm"];case T.DyNM_ButtonNewSize.medium:return["text-base"];case T.DyNM_ButtonNewSize.large:return["text-lg"];case T.DyNM_ButtonNewSize.xl:return["text-2xl"];default:return["text-base"]}}static getIconMarginButtonContentClasses(t){switch(t.size){case T.DyNM_ButtonNewSize.xs:return["m-0"];case T.DyNM_ButtonNewSize.small:return["m-0.5"];case T.DyNM_ButtonNewSize.medium:return["m-1"];case T.DyNM_ButtonNewSize.large:return["m-1.5"];case T.DyNM_ButtonNewSize.xl:return["m-2"];default:switch(t.styleType){case T.DyNM_ButtonNewStyleType.stroked:return["m-0.5"];case T.DyNM_ButtonNewStyleType.backgroundless:return["m-1.5"];default:return["m-1"]}}}static getMarginButtonContentClasses(t){switch(t.size){case T.DyNM_ButtonNewSize.xs:return t.styleType===T.DyNM_ButtonNewStyleType.stroked?["my-0","mx-2"]:["my-0.5","mx-2"];case T.DyNM_ButtonNewSize.small:return t.styleType===T.DyNM_ButtonNewStyleType.stroked?["my-1.5","mx-4"]:["my-2","mx-4"];case T.DyNM_ButtonNewSize.medium:return t.styleType===T.DyNM_ButtonNewStyleType.stroked?["my-3","mx-6"]:["my-3.5","mx-6"];case T.DyNM_ButtonNewSize.large:case T.DyNM_ButtonNewSize.xl:return t.styleType===T.DyNM_ButtonNewStyleType.stroked?["my-3.5","mx-7"]:["my-4","mx-7"];default:return console.warn("CustomButtonSettingsModel: no size set. Default is medium."),t.styleType===T.DyNM_ButtonNewStyleType.stroked?["my-3","mx-6"]:["my-3.5","mx-6"]}}static iconButtonSettingsValidation(t){t.style_$().isIconButton&&(t.label&&!t.description&&t.description!==null&&(t.description=t.label,console.warn(`CustomButtonSettingsModel: icon button has no description, but label is set. The label is set as description. Please set description for the icon button.
|
|
114
114
|
(${t.id})`)),t.icon||console.error(`CustomButtonSettingsModel: icon button has no icon set. Please set icon. (${t.id})`))}};var hl=class{static phoneCodeOptions=yl.DyFM_Regions?.phoneCodes.map(t=>{let o=t.code.includes("-")?t.code.split("-")[0]:t.code;return new T.DyNM_Select(`${t.country} (+${o})`,o)})};export{Af as a};
|
|
115
|
-
//# sourceMappingURL=chunk-
|
|
115
|
+
//# sourceMappingURL=chunk-2YH4QTS2.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let y=0;y<i.length;y++)c.add(m+y);this.parent.liveStderrLines_$.set(c)}let u=[...o,...i];if(u.length>r){let c=u.length-r,m=u.slice(c),y=this.parent.liveStderrLines_$(),b=new Set;for(let k of y){let $=k-c;$>=0&&b.add($)}this.parent.liveStderrLines_$.set(b),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(u)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:l.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(f(h({},i),{session:l.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(f(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){x.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(I.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let u=[...i];u[r]=a,this.parent.assembledMessages_$.set(u)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:l.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?l.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?l.buildEditExpandableContent(o):void 0,u=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:u||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,u=typeof a.type=="string"?a.type:"";if(u==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",y=a.content,b=typeof y=="string"?y:"",k=a.is_error===!0,$=m?`${m}: `:"",E=b.length>200?b.substring(0,200)+"\u2026":b||"tool result",K=k?`${$}ERROR \u2014 ${E}`:`${$}${E}`;this.parent.pushConsoleMessage({type:"tool-result",text:K,expandableContent:b.length>200?b:void 0,rawData:f(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(u==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var ne=(()=>{class l{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(w);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*C.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&w.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){C.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId});this.selectedSession_$.set(s)}catch(s){this.selectedSession_$.set(null);let n=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${n}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0});this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let n of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(n,!1,(t,o)=>{this.globalError_CS.showError(t,o)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${S.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${S.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${S.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${S.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${S.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${S.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${S.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(f(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=f(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${S.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.assembledMessages_$(),t=new Set(s.messages.map(i=>i.messageKey).filter(i=>typeof i=="string"&&i.length>0)),o=n.filter(i=>!t.has(i.messageKey));this.assembledMessages_$.set(I.sortAsc([...s.messages,...o])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){C.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(I.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){C.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(I.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...o,...t]);for(let i of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(i,!0,(r,a)=>{this.globalError_CS.showError(r,a)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";C.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},l.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{ne as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as q,b as O}from"./chunk-OIODKTLQ.js";import{a as R}from"./chunk-J7VTEMMD.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-P4Q6MHQF.js";import{e as P}from"./chunk-7X53ZYAD.js";import{h as y,j as L}from"./chunk-IPQSBIAU.js";import{p as D}from"./chunk-7ROTKIYT.js";import{C as v,R as T,a as h,aa as p,b as f,h as E,k as d,y as M}from"./chunk-TBMJSIBB.js";var S=E(D());var _=class c{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(c.compareAsc)}};var A=E(D());var k=(()=>{class c{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){A.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);A.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?c.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,u=o==="Edit"?c.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:u,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",u=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:u});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?f(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=c.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(f(h({},r),{session:f(h({},r.session),{status:n,statusMessage:t}),runtime:f(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(a),"cc-session-status")}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
|
|
2
|
+
`),r=3e3;if(t==="stderr"){let u=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let b=0;b<i.length;b++)u.add(m+b);this.parent.liveStderrLines_$.set(u)}let l=[...o,...i];if(l.length>r){let u=l.length-r,m=l.slice(u),b=this.parent.liveStderrLines_$(),I=new Set;for(let x of b){let $=x-u;$>=0&&I.add($)}this.parent.liveStderrLines_$.set(I),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:c.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(f(h({},i),{session:c.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(f(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){A.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(u=>u.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:c.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?c.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?c.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let u=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=u?this.toolUseIdToName.get(u)??"":"",b=a.content,I=typeof b=="string"?b:"",x=a.is_error===!0,$=m?`${m}: `:"",w=I.length>200?I.substring(0,200)+"\u2026":I||"tool result",K=x?`${$}ERROR \u2014 ${w}`:`${$}${w}`;this.parent.pushConsoleMessage({type:"tool-result",text:K,expandableContent:I.length>200?I:void 0,rawData:f(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let u=typeof a.text=="string"?a.text:"";if(u){let m=u.length>200?u.substring(0,200)+"\u2026":u;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:u.length>200?u:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:u},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||c)};static \u0275prov=M({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var ne=(()=>{class c{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(q);extSessionMsg_AS=v(R);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(k);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*S.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&k.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){S.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(f(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=f(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){S.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){S.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){S.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";S.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},c.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||c)};static \u0275prov=M({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{ne as a};
|
|
3
|
+
//# sourceMappingURL=chunk-2YRLIGJ6.js.map
|