@futdevpro/ccap 1.1.2980 → 1.1.2988
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-dist/{agent-instances.module-WFXL2NDE.js → agent-instances.module-EZ3HLJRW.js} +2 -2
- package/client-dist/{ca.module-CVTI3AF7.js → ca.module-2NK5JZOQ.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-I2G2NBSY.js → cc-usage-dashboard.component-SLFNE2NX.js} +2 -2
- package/client-dist/{cc.module-EXDXYOJ4.js → cc.module-F7LHWQ3A.js} +2 -2
- package/client-dist/{chunk-ESPURNI3.js → chunk-2CZLQZAC.js} +2 -2
- package/client-dist/{chunk-N26D6SXG.js → chunk-35HAXCRL.js} +2 -2
- package/client-dist/{chunk-3HWZLIS3.js → chunk-4JZNUGDT.js} +2 -2
- package/client-dist/{chunk-SG5TSGOY.js → chunk-4ORBCWDZ.js} +2 -2
- package/client-dist/{chunk-Q2WNI354.js → chunk-565H5Q7X.js} +2 -2
- package/client-dist/{chunk-SBPFNYFT.js → chunk-5GCMRTM2.js} +2 -2
- package/client-dist/{chunk-WXN5C3BS.js → chunk-66YFYBOC.js} +2 -2
- package/client-dist/{chunk-HRSSMQBA.js → chunk-6CNO7CIR.js} +2 -2
- package/client-dist/{chunk-7XAV5GIW.js → chunk-6IVNYSN4.js} +2 -2
- package/client-dist/{chunk-ZOCMDQAW.js → chunk-6UTINZN6.js} +2 -2
- package/client-dist/{chunk-VSGHMHDK.js → chunk-7FDRE6FK.js} +2 -2
- package/client-dist/{chunk-FVNI46U2.js → chunk-ACLAVYA7.js} +2 -2
- package/client-dist/{chunk-4CXFWMLH.js → chunk-ALRGHRMX.js} +2 -2
- package/client-dist/{chunk-AQO5IW5B.js → chunk-CJXAN5QP.js} +2 -2
- package/client-dist/{chunk-ORFH2XGX.js → chunk-CK4L2E6A.js} +2 -2
- package/client-dist/{chunk-EP3IAFIL.js → chunk-CPOWA47I.js} +2 -2
- package/client-dist/{chunk-GH67BJ7J.js → chunk-CROOTWQ4.js} +2 -2
- package/client-dist/{chunk-4ANOVQQ6.js → chunk-CZK7PL4V.js} +2 -2
- package/client-dist/{chunk-TSGXTLGO.js → chunk-CZVHJQVK.js} +2 -2
- package/client-dist/{chunk-N7HJWJ2S.js → chunk-EZQXUBC4.js} +2 -2
- package/client-dist/{chunk-4OK5LJEU.js → chunk-HK3NW3BA.js} +2 -2
- package/client-dist/{chunk-VHZQSBXM.js → chunk-HKO57F7B.js} +2 -2
- package/client-dist/{chunk-GZRNNZID.js → chunk-I24ZZ4G3.js} +2 -2
- package/client-dist/{chunk-7EHVTWSO.js → chunk-I5LYGLY6.js} +2 -2
- package/client-dist/{chunk-CU2HMFAD.js → chunk-IMV4JDM4.js} +2 -2
- package/client-dist/{chunk-C75AJJFP.js → chunk-KOFPH2WQ.js} +2 -2
- package/client-dist/{chunk-LBMIDL4S.js → chunk-L2E2MBF2.js} +2 -2
- package/client-dist/{chunk-2CUMN334.js → chunk-LNDWBFCV.js} +2 -2
- package/client-dist/{chunk-2UXI7P2C.js → chunk-LOUIZXXC.js} +2 -2
- package/client-dist/{chunk-DPGBOTN3.js → chunk-LP2E4KMW.js} +2 -2
- package/client-dist/{chunk-2VU3GISV.js → chunk-M53FIKSO.js} +2 -2
- package/client-dist/{chunk-JGLBYLWW.js → chunk-MIWIPUJL.js} +2 -2
- package/client-dist/{chunk-OVD3GSH2.js → chunk-OJPFXL3T.js} +2 -2
- package/client-dist/{chunk-EPIK2P4Q.js → chunk-PUVXCR3N.js} +2 -2
- package/client-dist/{chunk-VEPJ3MZH.js → chunk-QM4JVUVN.js} +2 -2
- package/client-dist/{chunk-KB2F332Z.js → chunk-QYAK3VTE.js} +2 -2
- package/client-dist/{chunk-RWQ5B34I.js → chunk-RJEB2CGY.js} +2 -2
- package/client-dist/{chunk-AE5VAS75.js → chunk-RQSPYGNE.js} +2 -2
- package/client-dist/{chunk-MMFURH5P.js → chunk-RTAONMUA.js} +2 -2
- package/client-dist/{chunk-BGNEFOVG.js → chunk-SAWE7K3L.js} +2 -2
- package/client-dist/{chunk-RG67NB4W.js → chunk-SIC2VUD2.js} +2 -2
- package/client-dist/{chunk-WL7JJ44C.js → chunk-SMBU53NX.js} +2 -2
- package/client-dist/{chunk-I4M7XPFX.js → chunk-SUAZOLRE.js} +2 -2
- package/client-dist/{chunk-FSUMD4VQ.js → chunk-SYXQFJNU.js} +2 -2
- package/client-dist/{chunk-UBUKMZCP.js → chunk-TWUEQMEF.js} +2 -2
- package/client-dist/{chunk-RT7QOL2Q.js → chunk-VUMU4S4O.js} +2 -2
- package/client-dist/{chunk-AYDRWFG2.js → chunk-W4ICO22C.js} +2 -2
- package/client-dist/{chunk-6EPKNTJZ.js → chunk-W66474CE.js} +2 -2
- package/client-dist/{chunk-WDSKSHR7.js → chunk-WKXTPGKW.js} +2 -2
- package/client-dist/{chunk-RV3A7THL.js → chunk-X3CIXD4W.js} +2 -2
- package/client-dist/{chunk-4WGQS2HA.js → chunk-XC26T3JJ.js} +2 -2
- package/client-dist/{chunk-UHAAQJ2R.js → chunk-XDP5GOHT.js} +2 -2
- package/client-dist/{chunk-4PZ65LDL.js → chunk-XO6LJ5A6.js} +2 -2
- package/client-dist/{chunk-PGKNPYIE.js → chunk-ZI46JBHS.js} +2 -2
- package/client-dist/{chunk-5N64HGRY.js → chunk-ZJ3DCODZ.js} +2 -2
- package/client-dist/{chunk-5N64HGRY.js.map → chunk-ZJ3DCODZ.js.map} +1 -1
- package/client-dist/{chunk-PWAWM6DC.js → chunk-ZRLAS63L.js} +2 -2
- package/client-dist/{consultant.module-WHGIMF6M.js → consultant.module-ZRSJ2JPM.js} +2 -2
- package/client-dist/{crd.module-EH2RIMWD.js → crd.module-TDLM6M2Z.js} +2 -2
- package/client-dist/{dashboard.module-EROOHU4C.js → dashboard.module-VSWWQDEU.js} +2 -2
- package/client-dist/{do.module-PATPM2KZ.js → do.module-CCOHMJLG.js} +2 -2
- package/client-dist/{document-library.module-QBW7XGNT.js → document-library.module-QLZ4ZUUG.js} +2 -2
- package/client-dist/{embedding-eval.module-O4YXXNZE.js → embedding-eval.module-6KORAJ7D.js} +2 -2
- package/client-dist/{embedding-registry.module-DOWVA6RV.js → embedding-registry.module-GJJ5G2Y7.js} +2 -2
- package/client-dist/{err.module-AWN67SP6.js → err.module-4GLVR2GJ.js} +2 -2
- package/client-dist/{feedback.module-BWKJCSTU.js → feedback.module-U6CCHRVZ.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-24MRZ77I.js → host-runtime-mcp.module-EV5GZKTL.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-T4EERACF.js → live-dev-pipeline.module-MWG23KAS.js} +2 -2
- package/client-dist/{logs.module-O4MVHXRP.js → logs.module-YNDMPESQ.js} +2 -2
- package/client-dist/{main-NP3NWD3C.js → main-OGUDQHPL.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-M6TNRCRQ.js → master-control-remote-poc.module-37OSJYRO.js} +2 -2
- package/client-dist/{mobile-app.module-SW2L4EB3.js → mobile-app.module-2DXC7DFY.js} +2 -2
- package/client-dist/{model-registry.module-MMEFDY3Y.js → model-registry.module-Z64FRB5O.js} +2 -2
- package/client-dist/{oc.module-PVCITNSF.js → oc.module-6SHIJS3R.js} +2 -2
- package/client-dist/{orc.module-2S5XXXZI.js → orc.module-NBZZGOV3.js} +2 -2
- package/client-dist/{project-management.module-XD6NLN3S.js → project-management.module-TR33UVCV.js} +2 -2
- package/client-dist/project-source-routed.module-ZZ7SNTUN.js +2 -0
- package/client-dist/{scheduler.module-7YAZ6PYA.js → scheduler.module-M3LHP2DW.js} +2 -2
- package/client-dist/{session.module-QNFMZPFT.js → session.module-FIZ5NYKK.js} +2 -2
- package/client-dist/{set.module-QLYUFFRH.js → set.module-4E6WAYIQ.js} +2 -2
- package/client-dist/{setup.module-HSVFOBYN.js → setup.module-2AUXXLIR.js} +2 -2
- package/client-dist/{terminals.module-2NKJL3L6.js → terminals.module-GCGUOFVO.js} +2 -2
- package/client-dist/{voice-notes-poc.module-VBWYBFHH.js → voice-notes-poc.module-6LVDT3MA.js} +2 -2
- package/client-dist/{wfs.module-2ZF3S6F2.js → wfs.module-XQGZNMEP.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-ZBU2T4Q5.js +0 -2
- /package/client-dist/{agent-instances.module-WFXL2NDE.js.map → agent-instances.module-EZ3HLJRW.js.map} +0 -0
- /package/client-dist/{ca.module-CVTI3AF7.js.map → ca.module-2NK5JZOQ.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-I2G2NBSY.js.map → cc-usage-dashboard.component-SLFNE2NX.js.map} +0 -0
- /package/client-dist/{cc.module-EXDXYOJ4.js.map → cc.module-F7LHWQ3A.js.map} +0 -0
- /package/client-dist/{chunk-ESPURNI3.js.map → chunk-2CZLQZAC.js.map} +0 -0
- /package/client-dist/{chunk-N26D6SXG.js.map → chunk-35HAXCRL.js.map} +0 -0
- /package/client-dist/{chunk-3HWZLIS3.js.map → chunk-4JZNUGDT.js.map} +0 -0
- /package/client-dist/{chunk-SG5TSGOY.js.map → chunk-4ORBCWDZ.js.map} +0 -0
- /package/client-dist/{chunk-Q2WNI354.js.map → chunk-565H5Q7X.js.map} +0 -0
- /package/client-dist/{chunk-SBPFNYFT.js.map → chunk-5GCMRTM2.js.map} +0 -0
- /package/client-dist/{chunk-WXN5C3BS.js.map → chunk-66YFYBOC.js.map} +0 -0
- /package/client-dist/{chunk-HRSSMQBA.js.map → chunk-6CNO7CIR.js.map} +0 -0
- /package/client-dist/{chunk-7XAV5GIW.js.map → chunk-6IVNYSN4.js.map} +0 -0
- /package/client-dist/{chunk-ZOCMDQAW.js.map → chunk-6UTINZN6.js.map} +0 -0
- /package/client-dist/{chunk-VSGHMHDK.js.map → chunk-7FDRE6FK.js.map} +0 -0
- /package/client-dist/{chunk-FVNI46U2.js.map → chunk-ACLAVYA7.js.map} +0 -0
- /package/client-dist/{chunk-4CXFWMLH.js.map → chunk-ALRGHRMX.js.map} +0 -0
- /package/client-dist/{chunk-AQO5IW5B.js.map → chunk-CJXAN5QP.js.map} +0 -0
- /package/client-dist/{chunk-ORFH2XGX.js.map → chunk-CK4L2E6A.js.map} +0 -0
- /package/client-dist/{chunk-EP3IAFIL.js.map → chunk-CPOWA47I.js.map} +0 -0
- /package/client-dist/{chunk-GH67BJ7J.js.map → chunk-CROOTWQ4.js.map} +0 -0
- /package/client-dist/{chunk-4ANOVQQ6.js.map → chunk-CZK7PL4V.js.map} +0 -0
- /package/client-dist/{chunk-TSGXTLGO.js.map → chunk-CZVHJQVK.js.map} +0 -0
- /package/client-dist/{chunk-N7HJWJ2S.js.map → chunk-EZQXUBC4.js.map} +0 -0
- /package/client-dist/{chunk-4OK5LJEU.js.map → chunk-HK3NW3BA.js.map} +0 -0
- /package/client-dist/{chunk-VHZQSBXM.js.map → chunk-HKO57F7B.js.map} +0 -0
- /package/client-dist/{chunk-GZRNNZID.js.map → chunk-I24ZZ4G3.js.map} +0 -0
- /package/client-dist/{chunk-7EHVTWSO.js.map → chunk-I5LYGLY6.js.map} +0 -0
- /package/client-dist/{chunk-CU2HMFAD.js.map → chunk-IMV4JDM4.js.map} +0 -0
- /package/client-dist/{chunk-C75AJJFP.js.map → chunk-KOFPH2WQ.js.map} +0 -0
- /package/client-dist/{chunk-LBMIDL4S.js.map → chunk-L2E2MBF2.js.map} +0 -0
- /package/client-dist/{chunk-2CUMN334.js.map → chunk-LNDWBFCV.js.map} +0 -0
- /package/client-dist/{chunk-2UXI7P2C.js.map → chunk-LOUIZXXC.js.map} +0 -0
- /package/client-dist/{chunk-DPGBOTN3.js.map → chunk-LP2E4KMW.js.map} +0 -0
- /package/client-dist/{chunk-2VU3GISV.js.map → chunk-M53FIKSO.js.map} +0 -0
- /package/client-dist/{chunk-JGLBYLWW.js.map → chunk-MIWIPUJL.js.map} +0 -0
- /package/client-dist/{chunk-OVD3GSH2.js.map → chunk-OJPFXL3T.js.map} +0 -0
- /package/client-dist/{chunk-EPIK2P4Q.js.map → chunk-PUVXCR3N.js.map} +0 -0
- /package/client-dist/{chunk-VEPJ3MZH.js.map → chunk-QM4JVUVN.js.map} +0 -0
- /package/client-dist/{chunk-KB2F332Z.js.map → chunk-QYAK3VTE.js.map} +0 -0
- /package/client-dist/{chunk-RWQ5B34I.js.map → chunk-RJEB2CGY.js.map} +0 -0
- /package/client-dist/{chunk-AE5VAS75.js.map → chunk-RQSPYGNE.js.map} +0 -0
- /package/client-dist/{chunk-MMFURH5P.js.map → chunk-RTAONMUA.js.map} +0 -0
- /package/client-dist/{chunk-BGNEFOVG.js.map → chunk-SAWE7K3L.js.map} +0 -0
- /package/client-dist/{chunk-RG67NB4W.js.map → chunk-SIC2VUD2.js.map} +0 -0
- /package/client-dist/{chunk-WL7JJ44C.js.map → chunk-SMBU53NX.js.map} +0 -0
- /package/client-dist/{chunk-I4M7XPFX.js.map → chunk-SUAZOLRE.js.map} +0 -0
- /package/client-dist/{chunk-FSUMD4VQ.js.map → chunk-SYXQFJNU.js.map} +0 -0
- /package/client-dist/{chunk-UBUKMZCP.js.map → chunk-TWUEQMEF.js.map} +0 -0
- /package/client-dist/{chunk-RT7QOL2Q.js.map → chunk-VUMU4S4O.js.map} +0 -0
- /package/client-dist/{chunk-AYDRWFG2.js.map → chunk-W4ICO22C.js.map} +0 -0
- /package/client-dist/{chunk-6EPKNTJZ.js.map → chunk-W66474CE.js.map} +0 -0
- /package/client-dist/{chunk-WDSKSHR7.js.map → chunk-WKXTPGKW.js.map} +0 -0
- /package/client-dist/{chunk-RV3A7THL.js.map → chunk-X3CIXD4W.js.map} +0 -0
- /package/client-dist/{chunk-4WGQS2HA.js.map → chunk-XC26T3JJ.js.map} +0 -0
- /package/client-dist/{chunk-UHAAQJ2R.js.map → chunk-XDP5GOHT.js.map} +0 -0
- /package/client-dist/{chunk-4PZ65LDL.js.map → chunk-XO6LJ5A6.js.map} +0 -0
- /package/client-dist/{chunk-PGKNPYIE.js.map → chunk-ZI46JBHS.js.map} +0 -0
- /package/client-dist/{chunk-PWAWM6DC.js.map → chunk-ZRLAS63L.js.map} +0 -0
- /package/client-dist/{consultant.module-WHGIMF6M.js.map → consultant.module-ZRSJ2JPM.js.map} +0 -0
- /package/client-dist/{crd.module-EH2RIMWD.js.map → crd.module-TDLM6M2Z.js.map} +0 -0
- /package/client-dist/{dashboard.module-EROOHU4C.js.map → dashboard.module-VSWWQDEU.js.map} +0 -0
- /package/client-dist/{do.module-PATPM2KZ.js.map → do.module-CCOHMJLG.js.map} +0 -0
- /package/client-dist/{document-library.module-QBW7XGNT.js.map → document-library.module-QLZ4ZUUG.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-O4YXXNZE.js.map → embedding-eval.module-6KORAJ7D.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-DOWVA6RV.js.map → embedding-registry.module-GJJ5G2Y7.js.map} +0 -0
- /package/client-dist/{err.module-AWN67SP6.js.map → err.module-4GLVR2GJ.js.map} +0 -0
- /package/client-dist/{feedback.module-BWKJCSTU.js.map → feedback.module-U6CCHRVZ.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-24MRZ77I.js.map → host-runtime-mcp.module-EV5GZKTL.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-T4EERACF.js.map → live-dev-pipeline.module-MWG23KAS.js.map} +0 -0
- /package/client-dist/{logs.module-O4MVHXRP.js.map → logs.module-YNDMPESQ.js.map} +0 -0
- /package/client-dist/{main-NP3NWD3C.js.map → main-OGUDQHPL.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-M6TNRCRQ.js.map → master-control-remote-poc.module-37OSJYRO.js.map} +0 -0
- /package/client-dist/{mobile-app.module-SW2L4EB3.js.map → mobile-app.module-2DXC7DFY.js.map} +0 -0
- /package/client-dist/{model-registry.module-MMEFDY3Y.js.map → model-registry.module-Z64FRB5O.js.map} +0 -0
- /package/client-dist/{oc.module-PVCITNSF.js.map → oc.module-6SHIJS3R.js.map} +0 -0
- /package/client-dist/{orc.module-2S5XXXZI.js.map → orc.module-NBZZGOV3.js.map} +0 -0
- /package/client-dist/{project-management.module-XD6NLN3S.js.map → project-management.module-TR33UVCV.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-ZBU2T4Q5.js.map → project-source-routed.module-ZZ7SNTUN.js.map} +0 -0
- /package/client-dist/{scheduler.module-7YAZ6PYA.js.map → scheduler.module-M3LHP2DW.js.map} +0 -0
- /package/client-dist/{session.module-QNFMZPFT.js.map → session.module-FIZ5NYKK.js.map} +0 -0
- /package/client-dist/{set.module-QLYUFFRH.js.map → set.module-4E6WAYIQ.js.map} +0 -0
- /package/client-dist/{setup.module-HSVFOBYN.js.map → setup.module-2AUXXLIR.js.map} +0 -0
- /package/client-dist/{terminals.module-2NKJL3L6.js.map → terminals.module-GCGUOFVO.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-VBWYBFHH.js.map → voice-notes-poc.module-6LVDT3MA.js.map} +0 -0
- /package/client-dist/{wfs.module-2ZF3S6F2.js.map → wfs.module-XQGZNMEP.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-ALRGHRMX.js";import{a as K}from"./chunk-M53FIKSO.js";import{e as F}from"./chunk-ACLAVYA7.js";import{h as f,j as U}from"./chunk-66YFYBOC.js";import{I as D,p as H}from"./chunk-ZJ3DCODZ.js";import{C as _,R as L,a as w,aa as p,b as $,d as k,h as O,k as h,p as d,vb as g,xb as P,y as M}from"./chunk-TBMJSIBB.js";var C=O(H());var I=(()=>{class l{static GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES=["timestamp","createdAt","updatedAt","ts","time","sentAt","messageTimestamp","created_at","updated_at","lastMessageAt","last_message_at","startedAt","started_at","lastActivityAt","last_activity_at"];static GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES=["lastActivityAt","updatedAt","lastMessageAt","updated_at","last_activity_at","last_message_at","startedAt","started_at","createdAt","created_at"];static GATEWAY_SESSION_STARTED_FIELD_NAMES=["startedAt","started_at","createdAt","created_at"];static GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES=["lastMessageAt","last_message_at","lastOutputAt","last_output_at"];static extractTimestamp(t,s){for(let e of s){let n=t[e];if(typeof n=="string"&&n)return n;if(typeof n=="number"&&n>0){let o=n<1e12?n*1e3:n;return new Date(o).toISOString()}}}}return l})();var E=class l{static buildGatewaySessionsFetch(y){let t=y.response._firstSessionKeys,s=Array.isArray(t)?t:[],e=Array.isArray(y.response.sessions)?y.response.sessions:[],n=e.map(i=>l.mapRawSessionToListItem({raw:i,gatewayUrl:y.response.gatewayUrl}));return{listItems:l.sortListItemsByLastActivityDesc({items:n}),rawSessions:e,gatewayUrl:y.response.gatewayUrl,source:y.response.source,instanceId:y.response.instanceId,firstSessionKeys:s}}static mapRawSessionToListItem(y){let t=y.raw;return{sessionId:typeof t.key=="string"?t.key:typeof t.sessionId=="string"?t.sessionId:typeof t.id=="string"?t.id:String(t.key??t.sessionId??t.id??""),label:typeof t.label=="string"?t.label:typeof t.name=="string"?t.name:typeof t.title=="string"?t.title:void 0,workspacePath:typeof t.workspacePath=="string"?t.workspacePath:typeof t.cwd=="string"?t.cwd:"",status:typeof t.status=="string"?t.status:"unknown",statusMessage:typeof t.statusMessage=="string"?t.statusMessage:void 0,gatewayUrl:y.gatewayUrl,openclawAgentName:typeof t.agentName=="string"?t.agentName:typeof t.agent=="string"?t.agent:void 0,promptCount:typeof t.promptCount=="number"?t.promptCount:typeof t.messageCount=="number"?t.messageCount:0,toolCallCount:typeof t.toolCallCount=="number"?t.toolCallCount:0,lastActivityAt:I.extractTimestamp(t,I.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES),startedAt:I.extractTimestamp(t,I.GATEWAY_SESSION_STARTED_FIELD_NAMES),lastPrompt:typeof t.lastPrompt=="string"?t.lastPrompt:void 0,mode:typeof t.mode=="string"?t.mode:void 0,reasoningEffort:typeof t.reasoningEffort=="string"?t.reasoningEffort:typeof t.thinking=="string"?t.thinking:void 0,isArchived:typeof t.isArchived=="boolean"?t.isArchived:!1}}static sortListItemsByLastActivityDesc(y){return[...y.items].sort((t,s)=>{let e=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(s.lastActivityAt?new Date(s.lastActivityAt).getTime():0)-e})}};var N=(()=>{class l{baseUrl=`${D.api.baseUrl}/oc-session`;http=_(P);peiContext_DS=_(K);withCcapId(t){let s=this.peiContext_DS.activeCcapId_$();return s?t.set("ccapId",s):t}createSession(t){let s=this.withCcapId(new g);return d(this.http.post(this.baseUrl,t,{params:s}))}listSessions(t){let s=this.withCcapId(new g);return t?.status&&(s=s.set("status",t.status)),t?.workspacePath&&(s=s.set("workspacePath",t.workspacePath)),t?.gatewayUrl&&(s=s.set("gatewayUrl",t.gatewayUrl)),t?.includeArchived&&(s=s.set("includeArchived","1")),t?.limit!=null&&(s=s.set("limit",String(t.limit))),t?.offset!=null&&(s=s.set("offset",String(t.offset))),d(this.http.get(this.baseUrl,{params:s}))}listGatewaySessions(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions`,{params:s}))}getGatewaySessionHistory(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions/${t.sessionId}/history`,{params:s}))}sendGatewayPrompt(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/send`,{instanceId:t.instanceId,content:t.content,agentName:t.agentName}))}abortGatewaySession(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/abort`,{instanceId:t.instanceId}))}deleteGatewaySession(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.delete(`${this.baseUrl}/gateway-sessions/${t.sessionId}`,{params:s}))}getSession(t){let s=this.withCcapId(new g);return d(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:s}))}sendPrompt(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,{content:t.content},{params:s}))}reconnectSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/reconnect`,{},{params:s}))}stopExecution(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:s}))}terminateSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:s}))}updateSessionConfig(t){let o=t,{sessionId:s}=o,e=k(o,["sessionId"]),n=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${s}/config`,e,{params:n}))}setSessionArchived(t){let s=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:s}))}getSessionEvents(t){let s=this.withCcapId(new g);return t.eventType&&(s=s.set("eventType",t.eventType)),t.since&&(s=s.set("since",t.since)),t.sinceSequence!=null&&(s=s.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(s=s.set("limit",String(t.limit))),t.offset!=null&&(s=s.set("offset",String(t.offset))),t.latest&&(s=s.set("latest","1")),d(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:s}))}getSessionEventStreamUrl(t){let s=`${this.baseUrl}/${t.sessionId}/events/stream`,e=this.peiContext_DS.activeCcapId_$();return e?`${s}?ccapId=${encodeURIComponent(e)}`:s}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var lt=(()=>{class l{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);consoleMessages_$=p([]);assembledMessages_$=p([]);lastStatusUpdate_$=p(null);sessionUsage_$=p({inputTokens:0,outputTokens:0,costUsd:0});activeSessionId_$=p("");activeInstanceId_$=p("");gatewayFilter_$=p(null);extSessionMsg_AS=_(G);ocSession_AS=_(N);globalError_CS=_(U);socket_CS=_(F);ngZone=_(L);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;chatPollHandle=null;detailPollHandle=null;lastPolledHistoryFingerprint="";constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{this.handleSocketEvent(t)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(t=>{if(t){let s=this.activeSessionId_$();s&&(this.socket_CS.emit("oc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{})),this.backfillMissedEvents()}})}ngOnDestroy(){this.stopChatPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}setGatewayFilter(t){this.gatewayFilter_$.set(t),this.loadSessions().catch(()=>{})}setGatewayFilterOnly(t){this.gatewayFilter_$.set(t)}loadSessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let e=[...(yield this.ocSession_AS.listSessions({status:t?.status,workspacePath:t?.workspacePath,gatewayUrl:this.gatewayFilter_$()??void 0,includeArchived:t?.includeArchived})).sessions].sort((n,o)=>{let i=n.lastActivityAt?new Date(n.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(e)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}fetchGatewaySessionsForInstance(t){return h(this,null,function*(){let s=yield this.ocSession_AS.listGatewaySessions({instanceId:t.instanceId});return E.buildGatewaySessionsFetch({response:s})})}loadGatewaySessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let s=yield this.fetchGatewaySessionsForInstance({instanceId:t.instanceId});!s.listItems.length&&s.rawSessions.length>0&&this.pushConsoleMessage({type:"error",text:`Gateway returned ${s.rawSessions.length} sessions but mapping produced 0.
|
|
2
2
|
First session keys: ${s.firstSessionKeys.join(", ")}`}),this.sessions_$.set(s.listItems)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load gateway sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}loadSessionDetail(t){return h(this,null,function*(){let s=t.isSilent===!0;s||this.selectedSessionLoading_$.set(!0);try{let e=yield this.ocSession_AS.getSession({sessionId:t.sessionId});this.selectedSession_$.set(e),this.loadAssembledMessages({sessionId:t.sessionId}).catch(()=>{})}catch(e){if(!s){this.selectedSession_$.set(null);let n=e instanceof Error?e.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${n}`})}}finally{s||this.selectedSessionLoading_$.set(!1)}})}loadGatewaySessionHistory(t){return h(this,null,function*(){this.selectedSessionLoading_$.set(!0),this.consoleMessages_$.set([]);try{let s=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t.sessionId,instanceId:t.instanceId}),e=s,n=Array.isArray(e._rawKeys)?e._rawKeys:[],o=Array.isArray(s.history)?s.history:[],i=this.parseGatewayHistory(o),a=typeof e.messageCount=="number"?e.messageCount:0,r=Array.isArray(e._firstMessageKeys)?e._firstMessageKeys:[];i.length?this.consoleMessages_$.set(i):a>0?this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"error",text:`Gateway session has ${a} messages, but mapping failed.
|
|
3
3
|
Message keys: ${r.join(", ")||"unknown"}
|
|
4
4
|
Gateway response keys: ${n.join(", ")||"none"}`,timestamp:new Date().toISOString()}]):this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"info",text:"Gateway session loaded \u2014 session has no messages yet.",timestamp:new Date().toISOString()}]),this.selectedSession_$.set({session:{sessionId:t.sessionId,workspacePath:"",status:"unknown",promptCount:0,toolCallCount:0,isArchived:!1},runtime:{isLive:!1,runtimeStatus:null,outputBufferLength:0}}),this.lastPolledHistoryFingerprint=this.computeGatewayHistoryFingerprint(o),this.startChatPolling()}catch(s){this.selectedSession_$.set(null),this.pushConsoleMessage({type:"error",text:`Load gateway session history failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.selectedSessionLoading_$.set(!1)}})}loadSessionEvents(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.getSessionEvents({sessionId:t.sessionId,eventType:t.eventType,limit:t.limit??500,latest:!0});this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let e of s.events)this.pushConsoleMessageFromEvent(e)}catch(s){this.selectedSessionEvents_$.set([]),this.pushConsoleMessage({type:"error",text:`Load events failed: ${f.getErrorMessageForDisplay(s)}`})}})}createSession(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.createSession(t),e=String(s.session.sessionId||"");return yield this.loadSessions(),e}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(t){return h(this,null,function*(){this.pushConsoleMessage({type:"prompt",text:t.content});try{let s=this.activeInstanceId_$();s?yield this.ocSession_AS.sendGatewayPrompt({sessionId:t.sessionId,instanceId:s,content:t.content}):yield this.ocSession_AS.sendPrompt(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}reconnectSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.reconnectSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Reconnect failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(t){return h(this,null,function*(){try{yield this.ocSession_AS.stopExecution(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Stop execution failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}terminateSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.terminateSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Terminate failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setSessionArchived(t){return h(this,null,function*(){try{yield this.ocSession_AS.setSessionArchived(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(t){return h(this,null,function*(){try{yield this.ocSession_AS.updateSessionConfig(t);let s=this.selectedSession_$();if(s?.session.sessionId===t.sessionId){let e=w({},s.session);t.mode!=null&&(e.mode=t.mode),t.reasoningEffort!=null&&(e.reasoningEffort=t.reasoningEffort),t.openclawAgentName!=null&&(e.openclawAgentName=t.openclawAgentName),this.selectedSession_$.set($(w({},s),{session:e}))}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(t){let s=this.activeSessionId_$();s&&s!==t&&this.socket_CS.emit("oc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(t),t&&this.socket_CS.emit("oc-session:subscribe",{sessionId:t})}clearLiveOutput(){this.stopChatPolling(),this.consoleMessages_$.set([]),this.sessionUsage_$.set({inputTokens:0,outputTokens:0,costUsd:0}),this.lastKnownEventSequence=-1}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pushConsoleMessage(t){let s=t.type==="assistant"||t.type==="prompt"?t.text.trim():t.text,e={listKey:t.listKey??this.allocateConsoleListKey(),type:t.type,text:s,timestamp:t.timestamp??new Date().toISOString(),expandableContent:t.expandableContent,rawData:t.rawData},n=this.consoleMessages_$();this.consoleMessages_$.set([...n,e])}static CHAT_POLL_INTERVAL_MS=5*C.second;static DETAIL_POLL_INTERVAL_MS=10*C.second;startChatPolling(){this.stopChatPolling(),this.chatPollHandle=setInterval(()=>{this.pollChatHistory()},l.CHAT_POLL_INTERVAL_MS),this.detailPollHandle=setInterval(()=>{let t=this.activeSessionId_$();t&&this.loadSessionDetail({sessionId:t,isSilent:!0})},l.DETAIL_POLL_INTERVAL_MS)}stopChatPolling(){this.chatPollHandle&&(clearInterval(this.chatPollHandle),this.chatPollHandle=null),this.detailPollHandle&&(clearInterval(this.detailPollHandle),this.detailPollHandle=null),this.lastPolledHistoryFingerprint=""}computeGatewayHistoryFingerprint(t){let s=t.length;if(!s)return"0";let e=t[s-1],n=typeof e.id=="string"?e.id:typeof e.messageId=="string"?e.messageId:"",o=l.extractGatewayChatMessageTimestamp(e),i=this.extractTextFromMessage(e),a=400,r=i.length>a?i.slice(0,a):i;return`${s}${n}${o}${r}`}pollChatHistory(){return h(this,null,function*(){let t=this.activeSessionId_$(),s=this.activeInstanceId_$();if(!(!t||!s))try{let e=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t,instanceId:s}),n=Array.isArray(e.history)?e.history:[],o=this.computeGatewayHistoryFingerprint(n);if(o===this.lastPolledHistoryFingerprint)return;this.lastPolledHistoryFingerprint=o;let i=this.parseGatewayHistory(n);this.ngZone.run(()=>{this.consoleMessages_$.set(i)})}catch{}})}parseGatewayHistory(t){let s=[],e=new Map,n=[];for(let i of t){let a=i.content;if(Array.isArray(a))for(let r of a){let u=typeof r.type=="string"?r.type:"";if(u==="tool_use"||u==="toolCall"){let S=typeof r.id=="string"?r.id:"";S&&n.push(S)}if(u==="tool_result"){let S=typeof r.tool_use_id=="string"?r.tool_use_id:"";S&&e.set(S,this.extractTextFromContentBlock(r))}}}let o=0;for(let i of t){let a=typeof i.role=="string"?i.role:"";if(a==="toolResult"||a==="tool_result"){let r=this.extractTextFromMessage(i);o<n.length&&(e.set(n[o],r),o++)}}for(let i of t){let a=typeof i.role=="string"?i.role:"unknown",r=i.content,u=l.extractGatewayChatMessageTimestamp(i);if(a==="toolResult"||a==="tool_result")continue;if(typeof r=="string"){s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":"info",text:r,timestamp:u,rawData:i});continue}if(Array.isArray(r)){for(let c of r){let v=typeof c.type=="string"?c.type:"";if(v==="text")s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":"assistant",text:typeof c.text=="string"?c.text:"",timestamp:u,rawData:{_block:c,_message:{role:a,timestamp:u,contentBlockCount:r.length}}});else if(v==="tool_use"||v==="toolCall"){let b=typeof c.name=="string"?c.name:"unknown tool",T=typeof c.id=="string"?c.id:"",m=c.input??c.arguments,A=e.get(T);s.push({listKey:this.allocateConsoleListKey(),type:"tool",text:`${b}
|
|
@@ -6,4 +6,4 @@ ${JSON.stringify(m,null,2)}`,timestamp:u,expandableContent:A,rawData:{_block:c,_
|
|
|
6
6
|
`):A=JSON.stringify(c,null,2),s.push({listKey:this.allocateConsoleListKey(),type:"tool-result",text:A,timestamp:u,rawData:{_block:c}})}}else v==="thinking"?s.push({listKey:this.allocateConsoleListKey(),type:"info",text:typeof c.thinking=="string"?c.thinking:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}}):s.push({listKey:this.allocateConsoleListKey(),type:"info",text:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}})}continue}let S=typeof i.text=="string"?i.text:typeof i.message=="string"?i.message:JSON.stringify(i,null,2);s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":a==="tool"||a==="tool_result"||a==="tool_use"?"tool":"info",text:S,timestamp:u,rawData:i})}return s}backfillMissedEvents(){return h(this,null,function*(){let t=this.activeSessionId_$();if(!(!t||this.lastKnownEventSequence<0))try{let e=(yield this.ocSession_AS.getSessionEvents({sessionId:t,sinceSequence:this.lastKnownEventSequence})).events;if(!e.length)return;this.ngZone.run(()=>{let n=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...n,...e]);for(let o of e)this.pushConsoleMessageFromEvent(o);this.updateLastKnownSequence(e)})}catch(s){C.DyFM_Log.warn("CCAP_OcSession_DS | backfill failed",s)}})}updateLastKnownSequence(t){for(let s of t)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}handleSocketEvent(t){let s=t.event,e=t.payload;try{this.ngZone.run(()=>{switch(s){case"oc-session:status":this.handleStatusUpdate(e);break;case"oc-session:output":this.handleOutputChunk(e);break;case"oc-session:event":this.handleSessionEvent(e);break;case"oc-session:list-update":this.handleListUpdate(e);break;case"ext-session-msg:message":this.handleAssembledMessage(e);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(e);break}})}catch(n){C.DyFM_Log.error(`CCAP_OcSession_DS | socket event error | event: ${s}`,n)}}handleStatusUpdate(t){let s=t.sessionId??"",e=t.status??"",n=t.statusMessage;this.lastStatusUpdate_$.set({sessionId:s,status:e,statusMessage:n});let i=this.sessions_$().map(r=>r.sessionId===s?$(w({},r),{status:e,statusMessage:n}):r);this.sessions_$.set(i);let a=this.selectedSession_$();if(a?.session.sessionId===s){let r=e==="running"||e==="waiting-input";this.selectedSession_$.set($(w({},a),{session:$(w({},a.session),{status:e,statusMessage:n}),runtime:$(w({},a.runtime),{isLive:r,runtimeStatus:e})}))}if(e==="errored"){let r=n?`OC Session error (${s}): ${n}`:`OC Session error (${s}): session entered errored state`;this.globalError_CS.showError(new Error(r),"oc-session-status")}}handleOutputChunk(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.content??"",n=t.type??"response";e&&this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:e})}handleSessionEvent(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.event??{},n={sessionId:s,eventType:e.eventType??"",timestamp:e.timestamp??"",data:e.data??{},sequence:e.sequence??0};if(n.sequence<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n.sequence;let o=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...o,n]),this.pushConsoleMessageFromEvent(n)}handleListUpdate(t){this.loadSessions().catch(()=>{})}extractTextFromContentBlock(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
7
7
|
`):typeof t.text=="string"?t.text:JSON.stringify(t,null,2)}extractTextFromMessage(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
8
8
|
`):JSON.stringify(t,null,2)}pushConsoleMessageFromEvent(t){let s=t.data;switch(t.eventType){case"response-chunk":{let e=typeof s.content=="string"?s.content:"";e&&this.pushConsoleMessage({type:"assistant",text:e});break}case"response-complete":{let e=s.usage;if(e&&typeof e=="object"){let n=e,o=this.sessionUsage_$();this.sessionUsage_$.set({inputTokens:o.inputTokens+(typeof n.inputTokens=="number"?n.inputTokens:0),outputTokens:o.outputTokens+(typeof n.outputTokens=="number"?n.outputTokens:0),costUsd:o.costUsd+(typeof n.costUsd=="number"?n.costUsd:0)})}break}case"tool-call-start":{let e=typeof s.name=="string"?s.name:"unknown",n=s.input,o=n?this.summarizeToolInput(n):"",i=o?`${e}: ${o}`:e;this.pushConsoleMessage({type:"tool",text:i,rawData:s});break}case"tool-call-end":{let e=s.content??s.output,n=typeof e=="string"?e:JSON.stringify(e??{});this.pushConsoleMessage({type:"tool-result",text:n.length>200?n.substring(0,200)+"\u2026":n,expandableContent:n.length>200?n:void 0,rawData:s});break}case"error":{let e=s.message??s.content;typeof e=="string"&&e&&this.pushConsoleMessage({type:"error",text:e});break}case"connection-change":{let e=typeof s.state=="string"?s.state:"";e&&this.pushConsoleMessage({type:"info",text:`Gateway connection: ${e}`,rawData:s});break}default:break}}summarizeToolInput(t){if(typeof t=="string")return t.length>80?t.substring(0,80)+"\u2026":t;if(typeof t=="object"&&t!==null){let s=JSON.stringify(t);return s.length>80?s.substring(0,80)+"\u2026":s}return""}static extractGatewayChatMessageTimestamp(t){return I.extractTimestamp(t,I.GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES)??""}loadAssembledMessages(t){return h(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:t.sessionId,latest:!0});this.assembledMessages_$.set(s.messages)}catch(s){C.DyFM_Log.error(`CCAP_OcSession_DS | loadAssembledMessages failed | sessionId: ${t.sessionId}`,s)}})}handleAssembledMessage(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=t.message;if(!e||typeof e!="object")return;let n=e,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=typeof t.messageKey=="string"?t.messageKey:"";if(!e)return;let n=t.update;if(!n||typeof n!="object")return;let o=n,i=this.assembledMessages_$(),a=i.findIndex(S=>S.messageKey===e);if(a<0)return;let r=w({},i[a]);typeof o.bodyText=="string"&&(r.bodyText=o.bodyText),o.toolResult!==void 0&&(r.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(r.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(r.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let u=[...i];u[a]=r,this.assembledMessages_$.set(u)}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{I as a,lt as b};
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-35HAXCRL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E}from"./chunk-RV3A7THL.js";import{a as I}from"./chunk-N7HJWJ2S.js";import{e as v}from"./chunk-FVNI46U2.js";import{L,p as F,t as k,w as c}from"./chunk-5N64HGRY.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as E}from"./chunk-X3CIXD4W.js";import{a as I}from"./chunk-EZQXUBC4.js";import{e as v}from"./chunk-ACLAVYA7.js";import{L,p as F,t as k,w as c}from"./chunk-ZJ3DCODZ.js";import{C as $,a as _,aa as i,b as S,h as A,hb as T,k as o,y as P}from"./chunk-TBMJSIBB.js";var a=A(F());var D="model-test-run-progress",w="model-test-result-saved",M=5e3,q=(()=>{class d{runPollingInterval=null;modelTestRunProgressSocketSub=null;modelTestResultSavedSocketSub=null;lastListFilters=void 0;list_$=i([]);listLoading_$=i(!1);listLoadError_$=i(null);registryProviderIds_$=i([]);selectedEntryId_$=i("");entryDetail_$=i(null);entryDetailLoading_$=i(!1);entryDetailNotFound_$=i(!1);entryDetailLoadError_$=i(null);prompts_$=i([]);promptsLoading_$=i(!1);results_$=i([]);testRunId_$=i("");testRunStatus_$=i(null);testRunPollingActive_$=i(!1);testRunError_$=i(null);testRunSelectedModelIds_$=i([]);testRunPanelDismissed_$=i(!1);testRunPanelVisible_$=T(()=>{let t=this.testRunId_$(),e=this.testRunStatus_$();return!(!t||e==null||this.testRunPanelDismissed_$())});setupConfigForRegistry_$=i(null);syncing_$=i(!1);modelTestRunProgressCurrentTask_$=i(null);modelRegistry_AS=$(E);settings_AS=$(L);socket_CS=$(v);ngOnDestroy(){this.stopRunPolling(),this.stopModelTestRunProgressSocket(),this.stopModelTestResultSavedSocket()}loadList(t){return o(this,null,function*(){t!==void 0&&(this.lastListFilters=t),this.listLoading_$.set(!0),this.listLoadError_$.set(null);try{let s=(yield this.modelRegistry_AS.getList(t)).list??[];return this.list_$.set(s),s}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load list",e),this.listLoadError_$.set(e),[]}finally{this.listLoading_$.set(!1)}})}loadRegistryProviderIdsUnfiltered(){return o(this,null,function*(){try{let e=(yield this.modelRegistry_AS.getList({})).list??[],s=d.collectSortedUniqueProviderIds(e);this.registryProviderIds_$.set(s)}catch(t){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load registry provider ids for filter UI (unfiltered list)",t)}})}deleteRegistryEntry(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.deleteEntry(t),yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),!0}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntry failed",e),this.listLoadError_$.set(e),!1}})}deleteRegistryEntries(t){return o(this,null,function*(){this.listLoadError_$.set(null);try{let e=yield this.modelRegistry_AS.deleteEntries(t);return yield this.loadList(this.lastListFilters),yield this.loadRegistryProviderIdsUnfiltered(),e}catch(e){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | deleteRegistryEntries failed",e),this.listLoadError_$.set(e),null}})}static collectSortedUniqueProviderIds(t){let e=t.map(s=>s.provider??"").filter(s=>s!=="");return[...new Set(e)].sort()}setSelectedEntryId(t){this.selectedEntryId_$.set(t??"")}loadEntry(t){return o(this,null,function*(){this.entryDetailLoading_$.set(!0),this.entryDetailNotFound_$.set(!1),this.entryDetailLoadError_$.set(null),this.selectedEntryId_$()!==t&&(this.entryDetail_$.set(null),this.results_$.set([]));try{let r=((yield this.modelRegistry_AS.getList(this.lastListFilters)).list??[]).find(f=>f.id===t);if(!r)return this.entryDetail_$.set(null),this.entryDetailNotFound_$.set(!0),null;this.entryDetail_$.set(r);let n=r.reasoningLevelForTest?.trim()||"none",l=yield this.modelRegistry_AS.getTestResults({provider:r.provider,model:r.modelName,limit:200,reasoningLevel:n});return this.results_$.set(l.results??[]),r}catch(e){a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load entry",e);let s=e instanceof Error?e.message:String(e);return this.entryDetailLoadError_$.set(s),this.selectedEntryId_$()===t&&this.entryDetail_$.set(null),null}finally{this.entryDetailLoading_$.set(!1)}})}loadPrompts(){return o(this,null,function*(){this.promptsLoading_$.set(!0);try{let e=(yield this.modelRegistry_AS.getPrompts()).prompts??[];return this.prompts_$.set(e),e}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load prompts",t),this.prompts_$.set([]),[]}finally{this.promptsLoading_$.set(!1)}})}loadResults(t,e,s){return o(this,null,function*(){try{let n=(yield this.modelRegistry_AS.getTestResults({provider:t,model:e,limit:200,reasoningLevel:s})).results??[];return this.results_$.set(n),n}catch(r){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Failed to load results",r),[]}})}sync(){return o(this,null,function*(){this.syncing_$.set(!0),this.listLoadError_$.set(null);try{let t=yield this.modelRegistry_AS.sync();return yield Promise.all([this.loadSetupConfigForRegistry(),this.loadList(this.lastListFilters),this.loadRegistryProviderIdsUnfiltered()]),t}catch(t){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | Sync failed",t),this.listLoadError_$.set(t),null}finally{this.syncing_$.set(!1)}})}setEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{return yield this.modelRegistry_AS.setEnabled(t,e),yield this.loadList(this.lastListFilters),!0}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | setEnabled failed",s),this.listLoadError_$.set(s),!1}})}patchEntry(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);let s=this.selectedEntryId_$()===t,r=this.entryDetail_$();if(s&&r&&e.reasoningLevelForTest!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{reasoningLevelForTest:e.reasoningLevelForTest}):null),s&&r&&e.enabled!==void 0){let n=e.enabled;this.entryDetail_$.update(l=>l?S(_({},l),{enabled:n}):null)}s&&r&&e.capabilities!==void 0&&this.entryDetail_$.update(n=>n?S(_({},n),{capabilities:e.capabilities}):null);try{return yield this.modelRegistry_AS.patchEntry(t,e),yield this.loadList(this.lastListFilters),s&&(e.reasoningLevelForTest!==void 0&&e.enabled===void 0&&e.capabilities===void 0||(yield this.loadEntry(t))),!0}catch(n){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | patchEntry failed",n),this.listLoadError_$.set(n),s&&this.entryDetail_$()&&this.loadEntry(t),!1}})}setReasoningLevelForTest(t,e){return o(this,null,function*(){return this.patchEntry(t,{reasoningLevelForTest:e})})}bulkSetEnabled(t,e){return o(this,null,function*(){this.listLoadError_$.set(null);try{let s=yield this.modelRegistry_AS.bulkSetEnabled(t,e);return yield this.loadList(this.lastListFilters),s.updated}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | bulkSetEnabled failed",s),this.listLoadError_$.set(s),null}})}startTestRun(t,e){return o(this,null,function*(){this.testRunError_$.set(null);try{let s=yield this.modelRegistry_AS.startTestRun(t,e);return this.testRunPanelDismissed_$.set(!1),this.testRunSelectedModelIds_$.set([...t]),this.testRunId_$.set(s.runId),this.testRunStatus_$.set({runId:s.runId,status:c.pending,results:[]}),this.startModelTestRunProgressSocket(),this.startModelTestResultSavedSocket(),this.startRunPolling(s.runId),s.runId}catch(s){return a.DyFM_Error.logSimple("CCAP_ModelRegistryDS | startTestRun failed",s),this.testRunError_$.set(s),null}})}startRunPolling(t){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!0);let e=M;this.runPollingInterval=setInterval(()=>{this.pollRunStatus(t)},e),this.pollRunStatus(t)}clearRunPollingIntervalOnly(){this.runPollingInterval&&(clearInterval(this.runPollingInterval),this.runPollingInterval=null)}stopRunPolling(){this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1),this.testRunId_$.set(""),this.testRunStatus_$.set(null),this.testRunError_$.set(null),this.modelTestRunProgressCurrentTask_$.set(null),this.testRunSelectedModelIds_$.set([]),this.testRunPanelDismissed_$.set(!1)}dismissTestRunPanel(){this.testRunPanelDismissed_$.set(!0)}pollRunStatus(t){return o(this,null,function*(){try{let e=yield this.modelRegistry_AS.getTestRunStatus(t);this.testRunStatus_$.set(e),(e.status==="completed"||e.status==="failed")&&(this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1))}catch(e){this.testRunError_$.set(e),this.clearRunPollingIntervalOnly(),this.testRunPollingActive_$.set(!1)}})}startModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub||(this.modelTestRunProgressSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};if(e.type!==D)return;let s=e.runId,r=e.status,n=e.current,l=e.total,f=e.currentTask,m=e.error,u=e.failedTask,g=e.errorDetails;this.setTestRunProgressFromSocket({runId:typeof s=="string"?s:void 0,status:typeof r=="string"?r:void 0,current:typeof n=="number"?n:void 0,total:typeof l=="number"?l:void 0,currentTask:f,error:typeof m=="string"?m:void 0,failedTask:u,errorDetails:g})}))}stopModelTestRunProgressSocket(){this.modelTestRunProgressSocketSub&&(this.modelTestRunProgressSocketSub.unsubscribe(),this.modelTestRunProgressSocketSub=null)}startModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub||(this.modelTestResultSavedSocketSub=this.socket_CS.event$.subscribe(t=>{if(t.event!=="user-notification")return;let e=t.payload??{};e.type===w&&this.mergeResultFromSocket(e)}))}stopModelTestResultSavedSocket(){this.modelTestResultSavedSocketSub&&(this.modelTestResultSavedSocketSub.unsubscribe(),this.modelTestResultSavedSocketSub=null)}mergeResultFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseResultItemFromSocket(t);if(!r)return;let n=R=>`${R.provider}|${R.model}|${R.promptId}|${R.reasoningLevel??"none"}`,l=n(r),m=[...s.results.filter(R=>n(R)!==l),r],u=t.current,g=t.total,h=typeof u=="number"?u:s.progress?.current,y=typeof g=="number"?g:s.progress?.total;this.testRunStatus_$.set(S(_({},s),{results:m,progress:typeof y=="number"&&y>0&&typeof h=="number"?{current:Math.max(h,s.progress?.current??0),total:y}:s.progress}));let p=this.entryDetail_$();if(p&&r.provider===p.provider&&r.model===p.modelName){let b=this.results_$().filter(C=>n(C)!==l);this.results_$.set([r,...b])}}static parseResultItemFromSocket(t){let e=t.provider,s=t.model,r=t.promptId,n=t.score;return typeof e!="string"||typeof s!="string"||typeof r!="string"?null:{provider:e,model:s,promptId:r,reasoningLevel:typeof t.reasoningLevel=="string"?t.reasoningLevel:void 0,score:typeof n=="number"?n:0,analysis:typeof t.analysis=="string"?t.analysis:void 0,promptText:typeof t.promptText=="string"?t.promptText:void 0,modelOutput:typeof t.modelOutput=="string"?t.modelOutput:void 0,thinking:typeof t.thinking=="string"?t.thinking:void 0,generationTimeMs:typeof t.generationTimeMs=="number"?t.generationTimeMs:void 0,analyzerProvider:typeof t.analyzerProvider=="string"?t.analyzerProvider:void 0,analyzerModel:typeof t.analyzerModel=="string"?t.analyzerModel:void 0,inputTokens:typeof t.inputTokens=="number"?t.inputTokens:void 0,outputTokens:typeof t.outputTokens=="number"?t.outputTokens:void 0,thinkingTokens:typeof t.thinkingTokens=="number"?t.thinkingTokens:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0}}setTestRunProgressFromSocket(t){let e=this.testRunId_$();if(!e||t.runId!==e)return;let s=this.testRunStatus_$();if(!s)return;let r=d.parseRunStatusFromSocket(t.status,s.status),n=d.parseFailedTaskFromSocketPayload(t.failedTask),l=d.parseErrorDetailsFromSocketPayload(t.errorDetails),f=t.error!==void 0?t.error:s.error;this.testRunStatus_$.set(S(_({},s),{status:r,progress:typeof t.total=="number"&&t.total>0?{current:t.current??0,total:t.total}:s.progress,error:f,failedTask:n??s.failedTask,errorDetails:l??s.errorDetails}));let m=typeof t.status=="string"?t.status:"";if(m===c.completed||m===c.failed){this.modelTestRunProgressCurrentTask_$.set(null);return}let u=t.currentTask;if(u&&typeof u=="object"&&u!==null&&"promptId"in u){let g=u,h=g.promptId,y=g.provider,p=g.modelName;this.modelTestRunProgressCurrentTask_$.set({provider:typeof y=="string"?y:"",modelName:typeof p=="string"?p:"",promptId:typeof h=="string"?h:""});return}this.modelTestRunProgressCurrentTask_$.set(null)}static isPlainObjectRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}static parseFailedTaskFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.provider,r=e.model,n=e.promptId;if(!(typeof s!="string"||typeof r!="string"||typeof n!="string"))return{provider:s,model:r,promptId:n}}static parseErrorDetailsFromSocketPayload(t){if(!d.isPlainObjectRecord(t))return;let e=t,s=e.message;if(typeof s!="string")return;let r=e.errorCode,n=e.stack;return{message:s,errorCode:typeof r=="string"?r:void 0,stack:typeof n=="string"?n:void 0}}static parseRunStatusFromSocket(t,e){return typeof t!="string"?e:t===c.pending?c.pending:t===c.running?c.running:t===c.completed?c.completed:t===c.failed?c.failed:e}loadSetupConfigForRegistry(){return o(this,null,function*(){try{let t=yield this.settings_AS.getSection(k.llmProviders),e=typeof t.defaultLlmProvider=="string"?t.defaultLlmProvider:void 0,s=typeof t.defaultLlmModel=="string"?t.defaultLlmModel:void 0,r={},n=t.localAiSettings;if(Array.isArray(n))for(let f of n){if(f==null||typeof f!="object"||Array.isArray(f))continue;let m=f,u=m.key,g=m.name;if(typeof u!="string"||!u.trim())continue;let h=typeof g=="string"?g.trim():"",y=h.length>0?h:"Local AI",p=I.build({localAiKey:u.trim()});r[p]={label:y}}let l={defaultLlmProvider:e,defaultLlmModel:s,llmProviderConfig:Object.keys(r).length>0?r:void 0};return this.setupConfigForRegistry_$.set(l),l}catch{return this.setupConfigForRegistry_$.set(null),null}})}getCachedList(){return this.list_$()}getCachedEntryDetail(){return this.entryDetail_$()}getCachedPrompts(){return this.prompts_$()}getCachedResults(){return this.results_$()}getCachedSetupConfigForRegistry(){return this.setupConfigForRegistry_$()}static \u0275fac=function(e){return new(e||d)};static \u0275prov=P({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4JZNUGDT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as o}from"./chunk-ZJ3DCODZ.js";import{C as s,p as r,xb as a,y as n}from"./chunk-TBMJSIBB.js";var h=(()=>{class e{baseUrl=`${o.api.baseUrl}/oci-instance-data`;http=s(a);listInstances(){return r(this.http.get(`${this.baseUrl}/list`))}getByInstanceId(t){return r(this.http.get(`${this.baseUrl}/by-id/${t}`))}patchVisuals(t){let i={};return t.label!==void 0&&(i.label=t.label),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),r(this.http.patch(`${this.baseUrl}/by-id/${t.instanceId}`,i))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4ORBCWDZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as si,c as ai,d as Te}from"./chunk-4WGQS2HA.js";import{c as ri}from"./chunk-AE5VAS75.js";import{a as li}from"./chunk-KB2F332Z.js";import{a as oi}from"./chunk-RV3A7THL.js";import{a as ci}from"./chunk-WDSKSHR7.js";import{f as Xn,i as Kn,n as Qn,o as ei,p as ti,v as ni}from"./chunk-EO4DNTT4.js";import{a as Yt}from"./chunk-5UPNU54P.js";import{j as ii}from"./chunk-WXN5C3BS.js";import{p as ao}from"./chunk-5N64HGRY.js";import{$a as J,C as ke,Cb as Ct,D as Fe,Fa as g,G as jn,Ga as E,Ha as qt,Hb as Zn,Ia as Jt,J as B,K as P,Kb as Yn,L as oe,M as Je,T as Ze,Ta as He,U as me,Ua as Zt,W as _t,X as xt,Z as u,_ as Wn,a as ie,aa as se,ab as Z,b as Ne,da as A,fa as Ae,ga as R,h as so,hb as T,ja as V,jb as Jn,k as X,la as k,na as bt,oa as Se,pa as ye,qa as c,ra as p,sa as y,ua as z,ub as Ue,va as O,wa as _,xa as qn,y as Gn,ya as Ye}from"./chunk-TBMJSIBB.js";var{entries:xi,setPrototypeOf:pi,isFrozen:lo,getPrototypeOf:co,getOwnPropertyDescriptor:po}=Object,{freeze:Q,seal:ae,create:St}=Object,{apply:on,construct:rn}=typeof Reflect<"u"&&Reflect;Q||(Q=function(n){return n});ae||(ae=function(n){return n});on||(on=function(n,e){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];return n.apply(e,i)});rn||(rn=function(n){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return new n(...o)});var kt=ee(Array.prototype.forEach),uo=ee(Array.prototype.lastIndexOf),di=ee(Array.prototype.pop),Xe=ee(Array.prototype.push),mo=ee(Array.prototype.splice),yt=ee(String.prototype.toLowerCase),Xt=ee(String.prototype.toString),Kt=ee(String.prototype.match),Ke=ee(String.prototype.replace),ho=ee(String.prototype.indexOf),fo=ee(String.prototype.trim),re=ee(Object.prototype.hasOwnProperty),K=ee(RegExp.prototype.test),Qe=go(TypeError);function ee(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return on(t,n,o)}}function go(t){return function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return rn(t,e)}}function v(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;pi&&pi(t,null);let o=n.length;for(;o--;){let i=n[o];if(typeof i=="string"){let r=e(i);r!==i&&(lo(n)||(n[o]=r),i=r)}t[i]=!0}return t}function _o(t){for(let n=0;n<t.length;n++)re(t,n)||(t[n]=null);return t}function he(t){let n=St(null);for(let[e,o]of xi(t))re(t,e)&&(Array.isArray(o)?n[e]=_o(o):o&&typeof o=="object"&&o.constructor===Object?n[e]=he(o):n[e]=o);return n}function et(t,n){for(;t!==null;){let o=po(t,n);if(o){if(o.get)return ee(o.get);if(typeof o.value=="function")return ee(o.value)}t=co(t)}function e(){return null}return e}var ui=Q(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qt=Q(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),en=Q(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xo=Q(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tn=Q(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bo=Q(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mi=Q(["#text"]),hi=Q(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),nn=Q(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fi=Q(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wt=Q(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Co=ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ko=ae(/<%[\w\W]*|[\w\W]*%>/gm),wo=ae(/\$\{[\w\W]*/gm),So=ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),yo=ae(/^aria-[\-\w]+$/),bi=ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),To=ae(/^(?:\w+script|data):/i),vo=ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ci=ae(/^html$/i),Eo=ae(/^[a-z][.\w]*(-[.\w]+)+$/i),gi=Object.freeze({__proto__:null,ARIA_ATTR:yo,ATTR_WHITESPACE:vo,CUSTOM_ELEMENT:Eo,DATA_ATTR:So,DOCTYPE_NAME:Ci,ERB_EXPR:ko,IS_ALLOWED_URI:bi,IS_SCRIPT_OR_DATA:To,MUSTACHE_EXPR:Co,TMPLIT_EXPR:wo}),tt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ao=function(){return typeof window>"u"?null:window},Ro=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(o=e.getAttribute(i));let r="dompurify"+(o?"#"+o:"");try{return n.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},_i=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ki(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ao(),n=b=>ki(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==tt.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,o=e,i=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:d,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:S,trustedTypes:I}=t,L=l.prototype,le=et(L,"cloneNode"),st=et(L,"remove"),at=et(L,"nextSibling"),lt=et(L,"childNodes"),Le=et(L,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let G,ge="",{implementation:_e,createNodeIterator:Gi,createDocumentFragment:ji,getElementsByTagName:Wi}=e,{importNode:qi}=o,Y=_i();n.isSupported=typeof xi=="function"&&typeof Le=="function"&&_e&&_e.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:It,ERB_EXPR:Dt,TMPLIT_EXPR:Bt,DATA_ATTR:Ji,ARIA_ATTR:Zi,IS_SCRIPT_OR_DATA:Yi,ATTR_WHITESPACE:Cn,CUSTOM_ELEMENT:Xi}=gi,{IS_ALLOWED_URI:kn}=gi,U=null,wn=v({},[...ui,...Qt,...en,...tn,...mi]),j=null,Sn=v({},[...hi,...nn,...fi,...wt]),N=Object.seal(St(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,ct=null,we=Object.seal(St(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),yn=!0,Pt=!0,Tn=!1,vn=!0,Ie=!1,pt=!0,ve=!1,Ot=!1,zt=!1,De=!1,dt=!1,ut=!1,En=!0,An=!1,Ki="user-content-",Nt=!0,We=!1,Be={},de=null,Ft=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Rn=null,Mn=v({},["audio","video","img","source","image","track"]),Ht=null,$n=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml",Pe=xe,Ut=!1,Vt=null,Qi=v({},[mt,ht,xe],Xt),ft=v({},["mi","mo","mn","ms","mtext"]),gt=v({},["annotation-xml"]),eo=v({},["title","style","font","a","script"]),qe=null,to=["application/xhtml+xml","text/html"],no="text/html",H=null,Oe=null,io=e.createElement("form"),Ln=function(a){return a instanceof RegExp||a instanceof Function},Gt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oe&&Oe===a)){if((!a||typeof a!="object")&&(a={}),a=he(a),qe=to.indexOf(a.PARSER_MEDIA_TYPE)===-1?no:a.PARSER_MEDIA_TYPE,H=qe==="application/xhtml+xml"?Xt:yt,U=re(a,"ALLOWED_TAGS")?v({},a.ALLOWED_TAGS,H):wn,j=re(a,"ALLOWED_ATTR")?v({},a.ALLOWED_ATTR,H):Sn,Vt=re(a,"ALLOWED_NAMESPACES")?v({},a.ALLOWED_NAMESPACES,Xt):Qi,Ht=re(a,"ADD_URI_SAFE_ATTR")?v(he($n),a.ADD_URI_SAFE_ATTR,H):$n,Rn=re(a,"ADD_DATA_URI_TAGS")?v(he(Mn),a.ADD_DATA_URI_TAGS,H):Mn,de=re(a,"FORBID_CONTENTS")?v({},a.FORBID_CONTENTS,H):Ft,je=re(a,"FORBID_TAGS")?v({},a.FORBID_TAGS,H):he({}),ct=re(a,"FORBID_ATTR")?v({},a.FORBID_ATTR,H):he({}),Be=re(a,"USE_PROFILES")?a.USE_PROFILES:!1,yn=a.ALLOW_ARIA_ATTR!==!1,Pt=a.ALLOW_DATA_ATTR!==!1,Tn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,vn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ie=a.SAFE_FOR_TEMPLATES||!1,pt=a.SAFE_FOR_XML!==!1,ve=a.WHOLE_DOCUMENT||!1,De=a.RETURN_DOM||!1,dt=a.RETURN_DOM_FRAGMENT||!1,ut=a.RETURN_TRUSTED_TYPE||!1,zt=a.FORCE_BODY||!1,En=a.SANITIZE_DOM!==!1,An=a.SANITIZE_NAMED_PROPS||!1,Nt=a.KEEP_CONTENT!==!1,We=a.IN_PLACE||!1,kn=a.ALLOWED_URI_REGEXP||bi,Pe=a.NAMESPACE||xe,ft=a.MATHML_TEXT_INTEGRATION_POINTS||ft,gt=a.HTML_INTEGRATION_POINTS||gt,N=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Ln(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Ln(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(N.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Pt=!1),dt&&(De=!0),Be&&(U=v({},mi),j=St(null),Be.html===!0&&(v(U,ui),v(j,hi)),Be.svg===!0&&(v(U,Qt),v(j,nn),v(j,wt)),Be.svgFilters===!0&&(v(U,en),v(j,nn),v(j,wt)),Be.mathMl===!0&&(v(U,tn),v(j,fi),v(j,wt))),re(a,"ADD_TAGS")||(we.tagCheck=null),re(a,"ADD_ATTR")||(we.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?we.tagCheck=a.ADD_TAGS:(U===wn&&(U=he(U)),v(U,a.ADD_TAGS,H))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?we.attributeCheck=a.ADD_ATTR:(j===Sn&&(j=he(j)),v(j,a.ADD_ATTR,H))),a.ADD_URI_SAFE_ATTR&&v(Ht,a.ADD_URI_SAFE_ATTR,H),a.FORBID_CONTENTS&&(de===Ft&&(de=he(de)),v(de,a.FORBID_CONTENTS,H)),a.ADD_FORBID_CONTENTS&&(de===Ft&&(de=he(de)),v(de,a.ADD_FORBID_CONTENTS,H)),Nt&&(U["#text"]=!0),ve&&v(U,["html","head","body"]),U.table&&(v(U,["tbody"]),delete je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');G=a.TRUSTED_TYPES_POLICY,ge=G.createHTML("")}else G===void 0&&(G=Ro(I,i)),G!==null&&typeof ge=="string"&&(ge=G.createHTML(""));Q&&Q(a),Oe=a}},In=v({},[...Qt,...en,...xo]),Dn=v({},[...tn,...bo]),oo=function(a){let f=Le(a);(!f||!f.tagName)&&(f={namespaceURI:Pe,tagName:"template"});let x=yt(a.tagName),D=yt(f.tagName);return Vt[a.namespaceURI]?a.namespaceURI===ht?f.namespaceURI===xe?x==="svg":f.namespaceURI===mt?x==="svg"&&(D==="annotation-xml"||ft[D]):!!In[x]:a.namespaceURI===mt?f.namespaceURI===xe?x==="math":f.namespaceURI===ht?x==="math"&>[D]:!!Dn[x]:a.namespaceURI===xe?f.namespaceURI===ht&&!gt[D]||f.namespaceURI===mt&&!ft[D]?!1:!Dn[x]&&(eo[x]||!In[x]):!!(qe==="application/xhtml+xml"&&Vt[a.namespaceURI]):!1},ue=function(a){Xe(n.removed,{element:a});try{Le(a).removeChild(a)}catch{st(a)}},Ee=function(a,f){try{Xe(n.removed,{attribute:f.getAttributeNode(a),from:f})}catch{Xe(n.removed,{attribute:null,from:f})}if(f.removeAttribute(a),a==="is")if(De||dt)try{ue(f)}catch{}else try{f.setAttribute(a,"")}catch{}},Bn=function(a){let f=null,x=null;if(zt)a="<remove></remove>"+a;else{let F=Kt(a,/^[\r\n\t ]+/);x=F&&F[0]}qe==="application/xhtml+xml"&&Pe===xe&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let D=G?G.createHTML(a):a;if(Pe===xe)try{f=new S().parseFromString(D,qe)}catch{}if(!f||!f.documentElement){f=_e.createDocument(Pe,"template",null);try{f.documentElement.innerHTML=Ut?ge:D}catch{}}let q=f.body||f.documentElement;return a&&x&&q.insertBefore(e.createTextNode(x),q.childNodes[0]||null),Pe===xe?Wi.call(f,ve?"html":"body")[0]:ve?f.documentElement:q},Pn=function(a){return Gi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},jt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},On=function(a){return typeof d=="function"&&a instanceof d};function be(b,a,f){kt(b,x=>{x.call(n,a,f,Oe)})}let zn=function(a){let f=null;if(be(Y.beforeSanitizeElements,a,null),jt(a))return ue(a),!0;let x=H(a.nodeName);if(be(Y.uponSanitizeElement,a,{tagName:x,allowedTags:U}),pt&&a.hasChildNodes()&&!On(a.firstElementChild)&&K(/<[/\w!]/g,a.innerHTML)&&K(/<[/\w!]/g,a.textContent)||a.nodeType===tt.progressingInstruction||pt&&a.nodeType===tt.comment&&K(/<[/\w]/g,a.data))return ue(a),!0;if(!(we.tagCheck instanceof Function&&we.tagCheck(x))&&(!U[x]||je[x])){if(!je[x]&&Fn(x)&&(N.tagNameCheck instanceof RegExp&&K(N.tagNameCheck,x)||N.tagNameCheck instanceof Function&&N.tagNameCheck(x)))return!1;if(Nt&&!de[x]){let D=Le(a)||a.parentNode,q=lt(a)||a.childNodes;if(q&&D){let F=q.length;for(let ne=F-1;ne>=0;--ne){let Ce=le(q[ne],!0);Ce.__removalCount=(a.__removalCount||0)+1,D.insertBefore(Ce,at(a))}}}return ue(a),!0}return a instanceof l&&!oo(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&K(/<\/no(script|embed|frames)/i,a.innerHTML)?(ue(a),!0):(Ie&&a.nodeType===tt.text&&(f=a.textContent,kt([It,Dt,Bt],D=>{f=Ke(f,D," ")}),a.textContent!==f&&(Xe(n.removed,{element:a.cloneNode()}),a.textContent=f)),be(Y.afterSanitizeElements,a,null),!1)},Nn=function(a,f,x){if(ct[f]||En&&(f==="id"||f==="name")&&(x in e||x in io))return!1;if(!(Pt&&!ct[f]&&K(Ji,f))){if(!(yn&&K(Zi,f))){if(!(we.attributeCheck instanceof Function&&we.attributeCheck(f,a))){if(!j[f]||ct[f]){if(!(Fn(a)&&(N.tagNameCheck instanceof RegExp&&K(N.tagNameCheck,a)||N.tagNameCheck instanceof Function&&N.tagNameCheck(a))&&(N.attributeNameCheck instanceof RegExp&&K(N.attributeNameCheck,f)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(f,a))||f==="is"&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&K(N.tagNameCheck,x)||N.tagNameCheck instanceof Function&&N.tagNameCheck(x))))return!1}else if(!Ht[f]){if(!K(kn,Ke(x,Cn,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&a!=="script"&&ho(x,"data:")===0&&Rn[a])){if(!(Tn&&!K(Yi,Ke(x,Cn,"")))){if(x)return!1}}}}}}}return!0},Fn=function(a){return a!=="annotation-xml"&&Kt(a,Xi)},Hn=function(a){be(Y.beforeSanitizeAttributes,a,null);let{attributes:f}=a;if(!f||jt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},D=f.length;for(;D--;){let q=f[D],{name:F,namespaceURI:ne,value:Ce}=q,ze=H(F),Wt=Ce,W=F==="value"?Wt:fo(Wt);if(x.attrName=ze,x.attrValue=W,x.keepAttr=!0,x.forceKeepAttr=void 0,be(Y.uponSanitizeAttribute,a,x),W=x.attrValue,An&&(ze==="id"||ze==="name")&&(Ee(F,a),W=Ki+W),pt&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,W)){Ee(F,a);continue}if(ze==="attributename"&&Kt(W,"href")){Ee(F,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Ee(F,a);continue}if(!vn&&K(/\/>/i,W)){Ee(F,a);continue}Ie&&kt([It,Dt,Bt],Vn=>{W=Ke(W,Vn," ")});let Un=H(a.nodeName);if(!Nn(Un,ze,W)){Ee(F,a);continue}if(G&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!ne)switch(I.getAttributeType(Un,ze)){case"TrustedHTML":{W=G.createHTML(W);break}case"TrustedScriptURL":{W=G.createScriptURL(W);break}}if(W!==Wt)try{ne?a.setAttributeNS(ne,F,W):a.setAttribute(F,W),jt(a)?ue(a):di(n.removed)}catch{Ee(F,a)}}be(Y.afterSanitizeAttributes,a,null)},ro=function b(a){let f=null,x=Pn(a);for(be(Y.beforeSanitizeShadowDOM,a,null);f=x.nextNode();)be(Y.uponSanitizeShadowNode,f,null),zn(f),Hn(f),f.content instanceof r&&b(f.content);be(Y.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,x=null,D=null,q=null;if(Ut=!b,Ut&&(b="<!-->"),typeof b!="string"&&!On(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw Qe("dirty is not a string, aborting")}else throw Qe("toString is not a function");if(!n.isSupported)return b;if(Ot||Gt(a),n.removed=[],typeof b=="string"&&(We=!1),We){if(b.nodeName){let Ce=H(b.nodeName);if(!U[Ce]||je[Ce])throw Qe("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof d)f=Bn("<!---->"),x=f.ownerDocument.importNode(b,!0),x.nodeType===tt.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?f=x:f.appendChild(x);else{if(!De&&!Ie&&!ve&&b.indexOf("<")===-1)return G&&ut?G.createHTML(b):b;if(f=Bn(b),!f)return De?null:ut?ge:""}f&&zt&&ue(f.firstChild);let F=Pn(We?b:f);for(;D=F.nextNode();)zn(D),Hn(D),D.content instanceof r&&ro(D.content);if(We)return b;if(De){if(dt)for(q=ji.call(f.ownerDocument);f.firstChild;)q.appendChild(f.firstChild);else q=f;return(j.shadowroot||j.shadowrootmode)&&(q=qi.call(o,q,!0)),q}let ne=ve?f.outerHTML:f.innerHTML;return ve&&U["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&K(Ci,f.ownerDocument.doctype.name)&&(ne="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
|
|
1
|
+
import{b as si,c as ai,d as Te}from"./chunk-XC26T3JJ.js";import{c as ri}from"./chunk-RQSPYGNE.js";import{a as li}from"./chunk-QYAK3VTE.js";import{a as oi}from"./chunk-X3CIXD4W.js";import{a as ci}from"./chunk-WKXTPGKW.js";import{f as Xn,i as Kn,n as Qn,o as ei,p as ti,v as ni}from"./chunk-EO4DNTT4.js";import{a as Yt}from"./chunk-5UPNU54P.js";import{j as ii}from"./chunk-66YFYBOC.js";import{p as ao}from"./chunk-ZJ3DCODZ.js";import{$a as J,C as ke,Cb as Ct,D as Fe,Fa as g,G as jn,Ga as E,Ha as qt,Hb as Zn,Ia as Jt,J as B,K as P,Kb as Yn,L as oe,M as Je,T as Ze,Ta as He,U as me,Ua as Zt,W as _t,X as xt,Z as u,_ as Wn,a as ie,aa as se,ab as Z,b as Ne,da as A,fa as Ae,ga as R,h as so,hb as T,ja as V,jb as Jn,k as X,la as k,na as bt,oa as Se,pa as ye,qa as c,ra as p,sa as y,ua as z,ub as Ue,va as O,wa as _,xa as qn,y as Gn,ya as Ye}from"./chunk-TBMJSIBB.js";var{entries:xi,setPrototypeOf:pi,isFrozen:lo,getPrototypeOf:co,getOwnPropertyDescriptor:po}=Object,{freeze:Q,seal:ae,create:St}=Object,{apply:on,construct:rn}=typeof Reflect<"u"&&Reflect;Q||(Q=function(n){return n});ae||(ae=function(n){return n});on||(on=function(n,e){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];return n.apply(e,i)});rn||(rn=function(n){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return new n(...o)});var kt=ee(Array.prototype.forEach),uo=ee(Array.prototype.lastIndexOf),di=ee(Array.prototype.pop),Xe=ee(Array.prototype.push),mo=ee(Array.prototype.splice),yt=ee(String.prototype.toLowerCase),Xt=ee(String.prototype.toString),Kt=ee(String.prototype.match),Ke=ee(String.prototype.replace),ho=ee(String.prototype.indexOf),fo=ee(String.prototype.trim),re=ee(Object.prototype.hasOwnProperty),K=ee(RegExp.prototype.test),Qe=go(TypeError);function ee(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return on(t,n,o)}}function go(t){return function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return rn(t,e)}}function v(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;pi&&pi(t,null);let o=n.length;for(;o--;){let i=n[o];if(typeof i=="string"){let r=e(i);r!==i&&(lo(n)||(n[o]=r),i=r)}t[i]=!0}return t}function _o(t){for(let n=0;n<t.length;n++)re(t,n)||(t[n]=null);return t}function he(t){let n=St(null);for(let[e,o]of xi(t))re(t,e)&&(Array.isArray(o)?n[e]=_o(o):o&&typeof o=="object"&&o.constructor===Object?n[e]=he(o):n[e]=o);return n}function et(t,n){for(;t!==null;){let o=po(t,n);if(o){if(o.get)return ee(o.get);if(typeof o.value=="function")return ee(o.value)}t=co(t)}function e(){return null}return e}var ui=Q(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qt=Q(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),en=Q(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xo=Q(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tn=Q(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bo=Q(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mi=Q(["#text"]),hi=Q(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),nn=Q(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fi=Q(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wt=Q(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Co=ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ko=ae(/<%[\w\W]*|[\w\W]*%>/gm),wo=ae(/\$\{[\w\W]*/gm),So=ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),yo=ae(/^aria-[\-\w]+$/),bi=ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),To=ae(/^(?:\w+script|data):/i),vo=ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ci=ae(/^html$/i),Eo=ae(/^[a-z][.\w]*(-[.\w]+)+$/i),gi=Object.freeze({__proto__:null,ARIA_ATTR:yo,ATTR_WHITESPACE:vo,CUSTOM_ELEMENT:Eo,DATA_ATTR:So,DOCTYPE_NAME:Ci,ERB_EXPR:ko,IS_ALLOWED_URI:bi,IS_SCRIPT_OR_DATA:To,MUSTACHE_EXPR:Co,TMPLIT_EXPR:wo}),tt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ao=function(){return typeof window>"u"?null:window},Ro=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(o=e.getAttribute(i));let r="dompurify"+(o?"#"+o:"");try{return n.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},_i=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ki(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ao(),n=b=>ki(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==tt.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,o=e,i=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:d,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:S,trustedTypes:I}=t,L=l.prototype,le=et(L,"cloneNode"),st=et(L,"remove"),at=et(L,"nextSibling"),lt=et(L,"childNodes"),Le=et(L,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let G,ge="",{implementation:_e,createNodeIterator:Gi,createDocumentFragment:ji,getElementsByTagName:Wi}=e,{importNode:qi}=o,Y=_i();n.isSupported=typeof xi=="function"&&typeof Le=="function"&&_e&&_e.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:It,ERB_EXPR:Dt,TMPLIT_EXPR:Bt,DATA_ATTR:Ji,ARIA_ATTR:Zi,IS_SCRIPT_OR_DATA:Yi,ATTR_WHITESPACE:Cn,CUSTOM_ELEMENT:Xi}=gi,{IS_ALLOWED_URI:kn}=gi,U=null,wn=v({},[...ui,...Qt,...en,...tn,...mi]),j=null,Sn=v({},[...hi,...nn,...fi,...wt]),N=Object.seal(St(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,ct=null,we=Object.seal(St(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),yn=!0,Pt=!0,Tn=!1,vn=!0,Ie=!1,pt=!0,ve=!1,Ot=!1,zt=!1,De=!1,dt=!1,ut=!1,En=!0,An=!1,Ki="user-content-",Nt=!0,We=!1,Be={},de=null,Ft=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Rn=null,Mn=v({},["audio","video","img","source","image","track"]),Ht=null,$n=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml",Pe=xe,Ut=!1,Vt=null,Qi=v({},[mt,ht,xe],Xt),ft=v({},["mi","mo","mn","ms","mtext"]),gt=v({},["annotation-xml"]),eo=v({},["title","style","font","a","script"]),qe=null,to=["application/xhtml+xml","text/html"],no="text/html",H=null,Oe=null,io=e.createElement("form"),Ln=function(a){return a instanceof RegExp||a instanceof Function},Gt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Oe&&Oe===a)){if((!a||typeof a!="object")&&(a={}),a=he(a),qe=to.indexOf(a.PARSER_MEDIA_TYPE)===-1?no:a.PARSER_MEDIA_TYPE,H=qe==="application/xhtml+xml"?Xt:yt,U=re(a,"ALLOWED_TAGS")?v({},a.ALLOWED_TAGS,H):wn,j=re(a,"ALLOWED_ATTR")?v({},a.ALLOWED_ATTR,H):Sn,Vt=re(a,"ALLOWED_NAMESPACES")?v({},a.ALLOWED_NAMESPACES,Xt):Qi,Ht=re(a,"ADD_URI_SAFE_ATTR")?v(he($n),a.ADD_URI_SAFE_ATTR,H):$n,Rn=re(a,"ADD_DATA_URI_TAGS")?v(he(Mn),a.ADD_DATA_URI_TAGS,H):Mn,de=re(a,"FORBID_CONTENTS")?v({},a.FORBID_CONTENTS,H):Ft,je=re(a,"FORBID_TAGS")?v({},a.FORBID_TAGS,H):he({}),ct=re(a,"FORBID_ATTR")?v({},a.FORBID_ATTR,H):he({}),Be=re(a,"USE_PROFILES")?a.USE_PROFILES:!1,yn=a.ALLOW_ARIA_ATTR!==!1,Pt=a.ALLOW_DATA_ATTR!==!1,Tn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,vn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ie=a.SAFE_FOR_TEMPLATES||!1,pt=a.SAFE_FOR_XML!==!1,ve=a.WHOLE_DOCUMENT||!1,De=a.RETURN_DOM||!1,dt=a.RETURN_DOM_FRAGMENT||!1,ut=a.RETURN_TRUSTED_TYPE||!1,zt=a.FORCE_BODY||!1,En=a.SANITIZE_DOM!==!1,An=a.SANITIZE_NAMED_PROPS||!1,Nt=a.KEEP_CONTENT!==!1,We=a.IN_PLACE||!1,kn=a.ALLOWED_URI_REGEXP||bi,Pe=a.NAMESPACE||xe,ft=a.MATHML_TEXT_INTEGRATION_POINTS||ft,gt=a.HTML_INTEGRATION_POINTS||gt,N=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Ln(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Ln(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(N.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Pt=!1),dt&&(De=!0),Be&&(U=v({},mi),j=St(null),Be.html===!0&&(v(U,ui),v(j,hi)),Be.svg===!0&&(v(U,Qt),v(j,nn),v(j,wt)),Be.svgFilters===!0&&(v(U,en),v(j,nn),v(j,wt)),Be.mathMl===!0&&(v(U,tn),v(j,fi),v(j,wt))),re(a,"ADD_TAGS")||(we.tagCheck=null),re(a,"ADD_ATTR")||(we.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?we.tagCheck=a.ADD_TAGS:(U===wn&&(U=he(U)),v(U,a.ADD_TAGS,H))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?we.attributeCheck=a.ADD_ATTR:(j===Sn&&(j=he(j)),v(j,a.ADD_ATTR,H))),a.ADD_URI_SAFE_ATTR&&v(Ht,a.ADD_URI_SAFE_ATTR,H),a.FORBID_CONTENTS&&(de===Ft&&(de=he(de)),v(de,a.FORBID_CONTENTS,H)),a.ADD_FORBID_CONTENTS&&(de===Ft&&(de=he(de)),v(de,a.ADD_FORBID_CONTENTS,H)),Nt&&(U["#text"]=!0),ve&&v(U,["html","head","body"]),U.table&&(v(U,["tbody"]),delete je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');G=a.TRUSTED_TYPES_POLICY,ge=G.createHTML("")}else G===void 0&&(G=Ro(I,i)),G!==null&&typeof ge=="string"&&(ge=G.createHTML(""));Q&&Q(a),Oe=a}},In=v({},[...Qt,...en,...xo]),Dn=v({},[...tn,...bo]),oo=function(a){let f=Le(a);(!f||!f.tagName)&&(f={namespaceURI:Pe,tagName:"template"});let x=yt(a.tagName),D=yt(f.tagName);return Vt[a.namespaceURI]?a.namespaceURI===ht?f.namespaceURI===xe?x==="svg":f.namespaceURI===mt?x==="svg"&&(D==="annotation-xml"||ft[D]):!!In[x]:a.namespaceURI===mt?f.namespaceURI===xe?x==="math":f.namespaceURI===ht?x==="math"&>[D]:!!Dn[x]:a.namespaceURI===xe?f.namespaceURI===ht&&!gt[D]||f.namespaceURI===mt&&!ft[D]?!1:!Dn[x]&&(eo[x]||!In[x]):!!(qe==="application/xhtml+xml"&&Vt[a.namespaceURI]):!1},ue=function(a){Xe(n.removed,{element:a});try{Le(a).removeChild(a)}catch{st(a)}},Ee=function(a,f){try{Xe(n.removed,{attribute:f.getAttributeNode(a),from:f})}catch{Xe(n.removed,{attribute:null,from:f})}if(f.removeAttribute(a),a==="is")if(De||dt)try{ue(f)}catch{}else try{f.setAttribute(a,"")}catch{}},Bn=function(a){let f=null,x=null;if(zt)a="<remove></remove>"+a;else{let F=Kt(a,/^[\r\n\t ]+/);x=F&&F[0]}qe==="application/xhtml+xml"&&Pe===xe&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let D=G?G.createHTML(a):a;if(Pe===xe)try{f=new S().parseFromString(D,qe)}catch{}if(!f||!f.documentElement){f=_e.createDocument(Pe,"template",null);try{f.documentElement.innerHTML=Ut?ge:D}catch{}}let q=f.body||f.documentElement;return a&&x&&q.insertBefore(e.createTextNode(x),q.childNodes[0]||null),Pe===xe?Wi.call(f,ve?"html":"body")[0]:ve?f.documentElement:q},Pn=function(a){return Gi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},jt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},On=function(a){return typeof d=="function"&&a instanceof d};function be(b,a,f){kt(b,x=>{x.call(n,a,f,Oe)})}let zn=function(a){let f=null;if(be(Y.beforeSanitizeElements,a,null),jt(a))return ue(a),!0;let x=H(a.nodeName);if(be(Y.uponSanitizeElement,a,{tagName:x,allowedTags:U}),pt&&a.hasChildNodes()&&!On(a.firstElementChild)&&K(/<[/\w!]/g,a.innerHTML)&&K(/<[/\w!]/g,a.textContent)||a.nodeType===tt.progressingInstruction||pt&&a.nodeType===tt.comment&&K(/<[/\w]/g,a.data))return ue(a),!0;if(!(we.tagCheck instanceof Function&&we.tagCheck(x))&&(!U[x]||je[x])){if(!je[x]&&Fn(x)&&(N.tagNameCheck instanceof RegExp&&K(N.tagNameCheck,x)||N.tagNameCheck instanceof Function&&N.tagNameCheck(x)))return!1;if(Nt&&!de[x]){let D=Le(a)||a.parentNode,q=lt(a)||a.childNodes;if(q&&D){let F=q.length;for(let ne=F-1;ne>=0;--ne){let Ce=le(q[ne],!0);Ce.__removalCount=(a.__removalCount||0)+1,D.insertBefore(Ce,at(a))}}}return ue(a),!0}return a instanceof l&&!oo(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&K(/<\/no(script|embed|frames)/i,a.innerHTML)?(ue(a),!0):(Ie&&a.nodeType===tt.text&&(f=a.textContent,kt([It,Dt,Bt],D=>{f=Ke(f,D," ")}),a.textContent!==f&&(Xe(n.removed,{element:a.cloneNode()}),a.textContent=f)),be(Y.afterSanitizeElements,a,null),!1)},Nn=function(a,f,x){if(ct[f]||En&&(f==="id"||f==="name")&&(x in e||x in io))return!1;if(!(Pt&&!ct[f]&&K(Ji,f))){if(!(yn&&K(Zi,f))){if(!(we.attributeCheck instanceof Function&&we.attributeCheck(f,a))){if(!j[f]||ct[f]){if(!(Fn(a)&&(N.tagNameCheck instanceof RegExp&&K(N.tagNameCheck,a)||N.tagNameCheck instanceof Function&&N.tagNameCheck(a))&&(N.attributeNameCheck instanceof RegExp&&K(N.attributeNameCheck,f)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(f,a))||f==="is"&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&K(N.tagNameCheck,x)||N.tagNameCheck instanceof Function&&N.tagNameCheck(x))))return!1}else if(!Ht[f]){if(!K(kn,Ke(x,Cn,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&a!=="script"&&ho(x,"data:")===0&&Rn[a])){if(!(Tn&&!K(Yi,Ke(x,Cn,"")))){if(x)return!1}}}}}}}return!0},Fn=function(a){return a!=="annotation-xml"&&Kt(a,Xi)},Hn=function(a){be(Y.beforeSanitizeAttributes,a,null);let{attributes:f}=a;if(!f||jt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},D=f.length;for(;D--;){let q=f[D],{name:F,namespaceURI:ne,value:Ce}=q,ze=H(F),Wt=Ce,W=F==="value"?Wt:fo(Wt);if(x.attrName=ze,x.attrValue=W,x.keepAttr=!0,x.forceKeepAttr=void 0,be(Y.uponSanitizeAttribute,a,x),W=x.attrValue,An&&(ze==="id"||ze==="name")&&(Ee(F,a),W=Ki+W),pt&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,W)){Ee(F,a);continue}if(ze==="attributename"&&Kt(W,"href")){Ee(F,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Ee(F,a);continue}if(!vn&&K(/\/>/i,W)){Ee(F,a);continue}Ie&&kt([It,Dt,Bt],Vn=>{W=Ke(W,Vn," ")});let Un=H(a.nodeName);if(!Nn(Un,ze,W)){Ee(F,a);continue}if(G&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!ne)switch(I.getAttributeType(Un,ze)){case"TrustedHTML":{W=G.createHTML(W);break}case"TrustedScriptURL":{W=G.createScriptURL(W);break}}if(W!==Wt)try{ne?a.setAttributeNS(ne,F,W):a.setAttribute(F,W),jt(a)?ue(a):di(n.removed)}catch{Ee(F,a)}}be(Y.afterSanitizeAttributes,a,null)},ro=function b(a){let f=null,x=Pn(a);for(be(Y.beforeSanitizeShadowDOM,a,null);f=x.nextNode();)be(Y.uponSanitizeShadowNode,f,null),zn(f),Hn(f),f.content instanceof r&&b(f.content);be(Y.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,x=null,D=null,q=null;if(Ut=!b,Ut&&(b="<!-->"),typeof b!="string"&&!On(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw Qe("dirty is not a string, aborting")}else throw Qe("toString is not a function");if(!n.isSupported)return b;if(Ot||Gt(a),n.removed=[],typeof b=="string"&&(We=!1),We){if(b.nodeName){let Ce=H(b.nodeName);if(!U[Ce]||je[Ce])throw Qe("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof d)f=Bn("<!---->"),x=f.ownerDocument.importNode(b,!0),x.nodeType===tt.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?f=x:f.appendChild(x);else{if(!De&&!Ie&&!ve&&b.indexOf("<")===-1)return G&&ut?G.createHTML(b):b;if(f=Bn(b),!f)return De?null:ut?ge:""}f&&zt&&ue(f.firstChild);let F=Pn(We?b:f);for(;D=F.nextNode();)zn(D),Hn(D),D.content instanceof r&&ro(D.content);if(We)return b;if(De){if(dt)for(q=ji.call(f.ownerDocument);f.firstChild;)q.appendChild(f.firstChild);else q=f;return(j.shadowroot||j.shadowrootmode)&&(q=qi.call(o,q,!0)),q}let ne=ve?f.outerHTML:f.innerHTML;return ve&&U["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&K(Ci,f.ownerDocument.doctype.name)&&(ne="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
|
|
2
2
|
`+ne),Ie&&kt([It,Dt,Bt],Ce=>{ne=Ke(ne,Ce," ")}),G&&ut?G.createHTML(ne):ne},n.setConfig=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gt(b),Ot=!0},n.clearConfig=function(){Oe=null,Ot=!1},n.isValidAttribute=function(b,a,f){Oe||Gt({});let x=H(b),D=H(a);return Nn(x,D,f)},n.addHook=function(b,a){typeof a=="function"&&Xe(Y[b],a)},n.removeHook=function(b,a){if(a!==void 0){let f=uo(Y[b],a);return f===-1?void 0:mo(Y[b],f,1)[0]}return di(Y[b])},n.removeHooks=function(b){Y[b]=[]},n.removeAllHooks=function(){Y=_i()},n}var wi=ki();function cn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $e=cn();function Ri(t){$e=t}var Re={exec:()=>null};function M(t,n=""){let e=typeof t=="string"?t:t.source,o={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(te.caret,"$1"),e=e.replace(i,s),o},getRegex:()=>new RegExp(e,n)};return o}var Mo=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},$o=/^(?:[ \t]*(?:\n|$))+/,Lo=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Io=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Do=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Mi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$i=M(Mi).replace(/bull/g,pn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bo=M(Mi).replace(/bull/g,pn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),dn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Po=/^[^\n]+/,un=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Oo=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",un).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zo=M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pn).getRegex(),Rt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,No=M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",mn).replace("tag",Rt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Li=M(dn).replace("hr",rt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rt).getRegex(),Fo=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Li).getRegex(),hn={blockquote:Fo,code:Lo,def:Oo,fences:Io,heading:Do,hr:rt,html:No,lheading:$i,list:zo,newline:$o,paragraph:Li,table:Re,text:Po},Si=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rt).getRegex(),Ho=Ne(ie({},hn),{lheading:Bo,table:Si,paragraph:M(dn).replace("hr",rt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Si).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rt).getRegex()}),Uo=Ne(ie({},hn),{html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Re,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(dn).replace("hr",rt).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",$i).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Vo=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Go=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ii=/^( {2,}|\\)\n(?!\s*$)/,jo=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ve=/[\p{P}\p{S}]/u,Mt=/[\s\p{P}\p{S}]/u,fn=/[^\s\p{P}\p{S}]/u,Wo=M(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Mt).getRegex(),Di=/(?!~)[\p{P}\p{S}]/u,qo=/(?!~)[\s\p{P}\p{S}]/u,Jo=/(?:[^\s\p{P}\p{S}]|~)/u,Zo=M(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Mo?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Bi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Yo=M(Bi,"u").replace(/punct/g,Ve).getRegex(),Xo=M(Bi,"u").replace(/punct/g,Di).getRegex(),Pi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ko=M(Pi,"gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,Mt).replace(/punct/g,Ve).getRegex(),Qo=M(Pi,"gu").replace(/notPunctSpace/g,Jo).replace(/punctSpace/g,qo).replace(/punct/g,Di).getRegex(),er=M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,Mt).replace(/punct/g,Ve).getRegex(),tr=M(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ve).getRegex(),nr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ir=M(nr,"gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,Mt).replace(/punct/g,Ve).getRegex(),or=M(/\\(punct)/,"gu").replace(/punct/g,Ve).getRegex(),rr=M(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),sr=M(mn).replace("(?:-->|$)","-->").getRegex(),ar=M("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",sr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,lr=M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",vt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oi=M(/^!?\[(label)\]\[(ref)\]/).replace("label",vt).replace("ref",un).getRegex(),zi=M(/^!?\[(ref)\](?:\[\])?/).replace("ref",un).getRegex(),cr=M("reflink|nolink(?!\\()","g").replace("reflink",Oi).replace("nolink",zi).getRegex(),yi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,gn={_backpedal:Re,anyPunctuation:or,autolink:rr,blockSkip:Zo,br:Ii,code:Go,del:Re,delLDelim:Re,delRDelim:Re,emStrongLDelim:Yo,emStrongRDelimAst:Ko,emStrongRDelimUnd:er,escape:Vo,link:lr,nolink:zi,punctuation:Wo,reflink:Oi,reflinkSearch:cr,tag:ar,text:jo,url:Re},pr=Ne(ie({},gn),{link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",vt).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vt).getRegex()}),sn=Ne(ie({},gn),{emStrongRDelimAst:Qo,emStrongLDelim:Xo,delLDelim:tr,delRDelim:ir,url:M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",yi).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",yi).getRegex()}),dr=Ne(ie({},sn),{br:M(Ii).replace("{2,}","*").getRegex(),text:M(sn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Tt={normal:hn,gfm:Ho,pedantic:Uo},nt={normal:gn,gfm:sn,breaks:dr,pedantic:pr},ur={"&":"&","<":"<",">":">",'"':""","'":"'"},Ti=t=>ur[t];function fe(t,n){if(n){if(te.escapeTest.test(t))return t.replace(te.escapeReplace,Ti)}else if(te.escapeTestNoEncode.test(t))return t.replace(te.escapeReplaceNoEncode,Ti);return t}function vi(t){try{t=encodeURI(t).replace(te.percentDecode,"%")}catch{return null}return t}function Ei(t,n){let e=t.replace(te.findPipe,(r,s,d)=>{let l=!1,h=s;for(;--h>=0&&d[h]==="\\";)l=!l;return l?"|":" |"}),o=e.split(te.splitPipe),i=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),n)if(o.length>n)o.splice(n);else for(;o.length<n;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(te.slashPipe,"|");return o}function it(t,n,e){let o=t.length;if(o===0)return"";let i=0;for(;i<o;){let r=t.charAt(o-i-1);if(r===n&&!e)i++;else if(r!==n&&e)i++;else break}return t.slice(0,o-i)}function mr(t,n){if(t.indexOf(n[1])===-1)return-1;let e=0;for(let o=0;o<t.length;o++)if(t[o]==="\\")o++;else if(t[o]===n[0])e++;else if(t[o]===n[1]&&(e--,e<0))return o;return e>0?-2:-1}function hr(t,n=0){let e=n,o="";for(let i of t)if(i===" "){let r=4-e%4;o+=" ".repeat(r),e+=r}else o+=i,e++;return o}function Ai(t,n,e,o,i){let r=n.href,s=n.title||null,d=t[1].replace(i.other.outputLinkReplace,"$1");o.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:e,href:r,title:s,text:d,tokens:o.inlineTokens(d)};return o.state.inLink=!1,l}function fr(t,n,e){let o=t.match(e.other.indentCodeCompensation);if(o===null)return n;let i=o[1];return n.split(`
|
|
4
4
|
`).map(r=>{let s=r.match(e.other.beginningSpace);if(s===null)return r;let[d]=s;return d.length>=i.length?r.slice(i.length):r}).join(`
|
|
@@ -70,4 +70,4 @@ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error
|
|
|
70
70
|
`).slice(1).join(`
|
|
71
71
|
`).trim();return Te.looksLikeJson(i)?Te.formatJson(i):i});typeLabel_$=T(()=>{switch(this.view().kind){case w.userPrompt:return"User";case w.assistant:return"Assistant";case w.tool:return"Tool Call";case w.toolResult:return"Tool Result";case w.error:return"Error";case w.info:return"Info";case w.status:return"Status";case w.thinking:return"Thinking";case w.runIntent:return"Run intent";case w.iteration:return"Iteration";case w.statusUpdate:return"Status update";case w.raw:return"Raw";case w.result:return"Result";case w.toolGroup:return"Tool group";case w.subAgentGroup:return"Sub-agent";default:return String(this.view().kind)}});kindEnum=w;tts_$=T(()=>this.view().tts??null);ttsLoading_$=se(!1);showTtsButton_$=T(()=>{let e=this.tts_$();return e!==null&&!e.hasTtsAudio&&e.content.trim().length>0});autoReadEffect=Jn(()=>{if(this.isAutoPlayFired||this.view().kind!==w.assistant)return;let e=this.tts_$();!e||e.hasTtsAudio||e.content.trim().length===0||this.ttsLoading_$()||$t.shouldAutoPlay(e.sessionId,e.timestampIso)&&(this.isAutoPlayFired=!0,this.handleTtsPlayClick())});ttsAudioUrl_$=T(()=>{let e=this.tts_$();if(!e||!e.hasTtsAudio)return null;let o=this.voiceSttQaUi_DS.getTtsMessageAudioUrl(e.messageKey);return o.length>0?o:null});handleTtsPlayClick(){return X(this,null,function*(){let e=this.tts_$();if(!e||this.ttsLoading_$())return;this.ttsLoading_$.set(!0);let o,i,r;try{o=yield this.voiceSttQaUi_DS.getOrCreateTtsMessageAudio({sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestampIso}),i=URL.createObjectURL(o);let s=i;r=new Audio(i);try{yield r.play()}catch(d){URL.revokeObjectURL(s);let l=this.voiceSttQaUi_DS.getTtsMessageAudioUrl(e.messageKey);if(l.length===0)throw d;r=new Audio(l),yield r.play(),this.ttsCached.emit(e.messageKey);return}r.onended=()=>{URL.revokeObjectURL(s)},this.ttsCached.emit(e.messageKey)}catch(s){i!=null&&URL.revokeObjectURL(i);let d=yield t.diagnoseAudioBlobMagic(o),l=r?.error?.code===4,h=l&&d!=null&&!d.isMp3Magic&&(o?.type==="audio/mpeg"||o?.type===""),m={messageKey:e.messageKey,sessionId:e.sessionId,role:e.role,contentLength:e.content.length,timestampIso:e.timestampIso,blobSize:o?.size,blobType:o?.type,blobUrlCreated:i!=null,audioReadyState:r?.readyState,audioNetworkState:r?.networkState,audioErrorCode:r?.error?.code,audioErrorMessage:r?.error?.message,originalErrorName:s instanceof Error?s.name:typeof s,originalErrorMessage:s instanceof Error?s.message:String(s),payloadMagicHex:d?.magicHex,isMp3Magic:d?.isMp3Magic,isPayloadCorruptionLikely:h,diagnosticHint:h?"TTS provider returned non-MP3 payload despite audio/mpeg MIME \u2014 first bytes do not match MP3 magic (FF FB / FF F3 / FF F2 / 49 44 33). Provider/server-side audio generation likely corrupted.":l?"MEDIA_ERR_SRC_NOT_SUPPORTED \u2014 browser refused to decode the audio source. May be Chromium URL-safety-check (cycle 22 fallback path), unsupported codec, or rare format variant.":void 0},C=Object.assign(new Error(h?`TTS audio playback failed (payload corruption likely \u2014 non-MP3 magic ${d?.magicHex}): ${s instanceof Error?s.message:String(s)}`:`TTS audio playback failed: ${s instanceof Error?s.message:String(s)}`),{errorCode:"CCAP-TTS-PLAY-FAIL",additionalContent:m});this.globalError_CS.showError(C,"s-agent-console-message-bubble")}finally{this.ttsLoading_$.set(!1)}})}static diagnoseAudioBlobMagic(e){return X(this,null,function*(){if(e==null||e.size<4)return null;try{let i=yield e.slice(0,16).arrayBuffer(),r=new Uint8Array(i),s=[];for(let I=0;I<r.length;I++)s.push(r[I].toString(16).padStart(2,"0").toUpperCase());let d=s.join(" "),l=r[0],h=r[1],m=r[2];return{magicHex:d,isMp3Magic:l===255&&(h===251||h===243||h===242||h===250||h===244)||l===73&&h===68&&m===51}}catch{return null}})}handleToggleExpand(){this.isExpanded_$.update(e=>!e)}handleToggleAssistantBodyExpand(){this.isAssistantBodyExpanded_$.update(e=>!e)}handleToggleRawInfo(){this.isRawInfoOpen_$.update(e=>!e)}handleImageClick(e){window.open(e,"_blank")}handleAssistantMdClick(e){return X(this,null,function*(){yield xn.handleCodeCopyClick(e,o=>this.globalError_CS.copyToClipboard(o))})}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=Fe({type:t,selectors:[["app-s-agent-console-message-bubble"]],inputs:{view:[1,"view"]},outputs:{ttsCached:"ttsCached"},standalone:!0,features:[He],decls:10,vars:2,consts:[[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden",3,"class"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden",3,"class"],[1,"flex","justify-center","mb-1","group/msg"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden",3,"class"],[1,"bg-orange-500/5","border","border-orange-500/15","rounded-lg","overflow-hidden"],[1,"border","border-indigo-500/20","rounded-lg","overflow-hidden","bg-indigo-500/3"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4"],[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden"],[1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click"],["title","Tool call failed",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"text-orange-400","font-semibold","text-[11px]"],[1,"text-[10px]","text-neutral-400","select-none",3,"title"],[1,"flex-1"],[1,"text-neutral-600","text-[10px]"],["type","button","title","Raw details",3,"class"],["buttonTitle","Copy tool call","size","sm",3,"content"],[1,"text-[10px]","text-red-500/60","font-medium"],[1,"text-[10px]","text-green-500/60","font-medium"],["type","button","title","Raw details",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],[1,"mt-1.5","border-t","border-orange-500/10","pt-1.5"],[1,"mt-1.5","border-t","border-green-500/10","pt-1.5"],[1,"text-[9px]","text-neutral-600","uppercase","tracking-wider","mb-0.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/80","max-h-[300px]","overflow-y-auto"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","overflow-x-auto","break-words",3,"innerHTML"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","whitespace-pre-wrap","break-words",3,"innerHTML"],[1,"mt-1","flex","justify-end"],["buttonTitle","Copy result","size","sm",3,"content"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto"],[1,"mt-1.5","border-t","border-red-500/15","pt-1.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-red-400/90","max-h-[300px]","overflow-y-auto"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden"],[1,"flex","items-center","gap-1","mb-px"],[1,"font-bold","text-[10px]","text-neonGreen/60","uppercase"],[1,"flex","items-center","gap-0.5"],["buttonTitle","Copy prompt","size","sm",3,"content"],["type","button","title","Felolvas\xE1s (TTS)",3,"disabled","class"],[1,"flex","flex-wrap","gap-2","mb-1.5"],[1,"leading-snug","sm:leading-normal","whitespace-pre-wrap","break-words","text-neutral-100"],["controls","","aria-label","\xDCzenet felolvas\xE1sa",1,"max-w-full","h-8","min-w-[200px]","mt-1.5",3,"src"],["type","button","title","Felolvas\xE1s (TTS)",3,"click","disabled"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-blue-400/40","border-t-blue-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-3.5","h-3.5","shrink-0"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"src"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"click","src"],[1,"font-bold","text-[10px]","text-neonCyan/60","uppercase"],["buttonTitle","Copy message","size","sm",3,"content"],[1,"text-xs","leading-snug","sm:leading-normal","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-neutral-100"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-neutral-400/40","border-t-neutral-300"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"innerHTML"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"click","innerHTML"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors",3,"click"],[1,"inline-flex","items-center","gap-1.5","bg-teal-500/6","border","border-teal-500/15","rounded-full","px-3","py-0.5","max-w-[85%]","min-w-0"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","2",1,"w-3","h-3","text-teal-400/70","shrink-0","animate-spin"],["d","M8 2a6 6 0 0 1 6 6","stroke-linecap","round"],[1,"text-[10px]","text-teal-300/70","truncate","min-w-0"],[1,"text-[8px]","text-teal-400/40","shrink-0"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30",3,"click"],[1,"text-[7px]","text-teal-300/60","font-bold","leading-none"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden"],[1,"flex","items-center","gap-1.5","mb-0.5"],["title","Error",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"font-semibold","text-[10px]","text-red-400","uppercase","tracking-wider"],["buttonTitle","Copy error","size","sm",3,"content"],[1,"leading-relaxed","whitespace-pre-wrap","break-words","text-red-400"],[1,"font-semibold","text-[10px]","text-orange-300/70","uppercase","tracking-wider"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/70","max-h-[300px]","overflow-y-auto"],[1,"flex","items-center","gap-1.5","px-2.5","py-1","cursor-pointer","select-none","hover:bg-orange-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],[1,"text-[11px]","text-orange-300/90","font-medium"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-orange-400/50","transition-transform","[[open]>&]:rotate-90"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"px-2","pb-1.5","pt-0.5","space-y-0.5"],[3,"view"],[3,"ttsCached","view"],[1,"flex","items-center","gap-1.5","px-2.5","py-1.5","cursor-pointer","select-none","hover:bg-indigo-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","text-indigo-400","shrink-0"],["x","3","y","5","width","10","height","8","rx","2"],["cx","6","cy","9","r","1"],["cx","10","cy","9","r","1"],["d","M8 2v3"],["d","M6 2h4"],[1,"text-[10px]","text-indigo-400/60","font-medium","uppercase","tracking-wider","shrink-0"],[1,"text-[11px]","text-indigo-300/90","font-medium","truncate"],[1,"text-[9px]","text-indigo-400/40","shrink-0"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-indigo-400/40","shrink-0","transition-transform","[[open]>&]:rotate-90"],[1,"px-2","pb-2","pt-1","space-y-0.5","border-t","border-indigo-500/10"],[1,"font-semibold","text-[10px]","uppercase","tracking-wider"],[1,"text-[9px]","text-neutral-500"],["buttonTitle","Copy","size","sm",3,"content"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono",3,"class"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words",3,"class"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4",3,"click"],[1,"bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-2xl","w-full","max-w-2xl","max-h-[80vh]","flex","flex-col",2,"max-height","80dvh",3,"click"],[1,"flex","items-center","gap-2","px-4","py-2","border-b","border-neutral-700","shrink-0"],[1,"text-xs","font-semibold","text-neutral-300"],[1,"text-[10px]","text-neutral-400",3,"title"],["buttonTitle","Copy raw JSON","size","sm",3,"content"],["type","button",1,"text-neutral-500","hover:text-neutral-300","text-sm","transition-colors","px-1",3,"click"],[1,"flex-1","overflow-auto","p-4","space-y-4"],[1,"text-[9px]","text-neutral-500","uppercase","tracking-wide","mb-1"],[1,"text-[11px]","leading-relaxed","whitespace-pre-wrap","break-words","overflow-x-auto","font-mono","text-neutral-300"],[1,"mb-3","last:mb-0"],[1,"text-[8px]","text-neutral-600","mb-0.5"]],template:function(o,i){if(o&1&&A(0,Ir,16,15,"div",0)(1,Ur,17,14,"div",1)(2,ns,17,14,"div",1)(3,rs,8,3,"div",2)(4,ls,14,11,"div",3)(5,us,14,12,"div",0)(6,hs,10,2,"details",4)(7,_s,20,3,"details",5)(8,ys,15,16,"div",0)(9,Rs,17,11,"div",6),o&2){let r,s;k((r=i.view().kind)===i.kindEnum.tool?0:r===i.kindEnum.userPrompt?1:r===i.kindEnum.assistant?2:r===i.kindEnum.statusUpdate?3:r===i.kindEnum.error?4:r===i.kindEnum.toolResult?5:r===i.kindEnum.toolGroup?6:r===i.kindEnum.subAgentGroup?7:8),u(9),k((s=i.isRawInfoOpen_$()&&i.rawOverlayBundle_$())?9:-1,s)}},dependencies:()=>[t,Ue,si,Fi,ai,li],styles:[`@charset "UTF-8";
|
|
72
72
|
/*# sourceMappingURL=s-agent-console-message-bubble.component-QJSDQEWX.css.map */`]})}return t})();var Ms=[[["","sChatColumnHeader",""]],[["","sChatColumnScroll",""]],[["","sChatColumnOverlay",""]],[["","sChatColumnComposer",""]]],$s=["[sChatColumnHeader]","[sChatColumnScroll]","[sChatColumnOverlay]","[sChatColumnComposer]"],Ia=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275cmp=Fe({type:t,selectors:[["app-s-session-chat-column-layout"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],standalone:!0,features:[He],ngContentSelectors:$s,decls:8,vars:0,consts:[[1,"min-w-0","shrink-0"],[1,"relative","min-h-0","min-w-0","flex-1","flex","flex-col"],[1,"min-h-0","min-w-0","flex-1","overflow-y-auto","overflow-x-hidden"]],template:function(o,i){o&1&&(qn(Ms),c(0,"div",0),Ye(1),p(),c(2,"div",1)(3,"div",2),Ye(4,1),p(),Ye(5,2),p(),c(6,"div",0),Ye(7,3),p())},dependencies:[Ue],encapsulation:2})}return t})();var bn=so(ao());var Vi=(()=>{class t{mrg_AS=ke(oi);erg_AS=ke(ci);llmEntries_$=se([]);llmLoading_$=se(!1);llmLoadError_$=se(null);isLlmLoaded=!1;llmLoadPromise=null;embeddingEntries_$=se([]);embeddingLoading_$=se(!1);embeddingLoadError_$=se(null);isEmbeddingLoaded=!1;embeddingLoadPromise=null;enabledLlmModels_$=T(()=>this.llmEntries_$().filter(e=>e.enabled));enabledLlmProviders_$=T(()=>{let e=new Map;for(let o of this.enabledLlmModels_$())e.has(o.provider)||e.set(o.provider,t.llmProviderLabel(o.provider));return[...e.entries()].map(([o,i])=>({value:o,label:i}))});isLlmEmpty_$=T(()=>this.isLlmLoaded&&!this.llmLoading_$()&&this.enabledLlmModels_$().length===0);enabledEmbeddingModels_$=T(()=>this.embeddingEntries_$().filter(e=>e.enabled===!0));enabledEmbeddingProviders_$=T(()=>{let e=new Map;for(let o of this.enabledEmbeddingModels_$()){let i=o.embeddingBackend??"";i&&!e.has(i)&&e.set(i,t.embeddingBackendLabel(i))}return[...e.entries()].map(([o,i])=>({value:o,label:i}))});isEmbeddingEmpty_$=T(()=>this.isEmbeddingLoaded&&!this.embeddingLoading_$()&&this.enabledEmbeddingModels_$().length===0);ensureLoaded(e){return X(this,null,function*(){if(e==="llm"){if(this.isLlmLoaded&&!this.llmLoading_$())return;if(this.llmLoadPromise)return this.llmLoadPromise;this.llmLoadPromise=this.fetchLlm();try{yield this.llmLoadPromise}finally{this.llmLoadPromise=null}return}if(!(this.isEmbeddingLoaded&&!this.embeddingLoading_$())){if(this.embeddingLoadPromise)return this.embeddingLoadPromise;this.embeddingLoadPromise=this.fetchEmbedding();try{yield this.embeddingLoadPromise}finally{this.embeddingLoadPromise=null}}})}refresh(e){return X(this,null,function*(){e==="llm"?(this.isLlmLoaded=!1,yield this.fetchLlm()):(this.isEmbeddingLoaded=!1,yield this.fetchEmbedding())})}invalidate(e){e==="llm"?this.isLlmLoaded=!1:this.isEmbeddingLoaded=!1}getModelsForProvider(e,o){return e==="llm"?this.enabledLlmModels_$().filter(i=>i.provider===o).map(i=>i.modelName):this.enabledEmbeddingModels_$().filter(i=>i.embeddingBackend===o).map(i=>i.modelId??"")}fetchLlm(){return X(this,null,function*(){this.llmLoading_$.set(!0),this.llmLoadError_$.set(null);try{let e=yield this.mrg_AS.getList({enabled:!0});this.llmEntries_$.set(e.list),this.isLlmLoaded=!0}catch(e){this.llmLoadError_$.set(e),bn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchLlm failed",e)}finally{this.llmLoading_$.set(!1)}})}fetchEmbedding(){return X(this,null,function*(){this.embeddingLoading_$.set(!0),this.embeddingLoadError_$.set(null);try{let e=yield this.erg_AS.getList({enabled:!0});this.embeddingEntries_$.set(e.list),this.isEmbeddingLoaded=!0}catch(e){this.embeddingLoadError_$.set(e),bn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchEmbedding failed",e)}finally{this.embeddingLoading_$.set(!1)}})}static llmProviderLabel(e){return{"open-ai":"OpenAI",anthropic:"Anthropic",google:"Google",deepseek:"DeepSeek","fdp-ai":"FDPAI"}[e]??e}static embeddingBackendLabel(e){return{ollama:"Ollama","open-ai-compatible":"OpenAI-kompatibilis","open-ai-official":"OpenAI hivatalos","custom-http":"Custom HTTP"}[e]??e}static \u0275fac=function(o){return new(o||t)};static \u0275prov=Gn({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ls=(t,n)=>n.value;function Is(t,n){t&1&&(c(0,"div",0),y(1,"span",3),c(2,"span"),g(3,"Registry bet\xF6lt\xE9se\u2026"),p()())}function Ds(t,n){if(t&1&&(c(0,"p",4),g(1,"Nincs enged\xE9lyezett modell a registry-ben."),p(),c(2,"p"),g(3," Menj a "),c(4,"a",5),g(5,"Model Registry"),p(),g(6," oldalra, futtass "),c(7,"strong"),g(8,"Sync"),p(),g(9,"-et, majd az "),c(10,"code",6),g(11,"enabled"),p(),g(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);u(4),R("routerLink",e.registryRoute_$())}}function Bs(t,n){if(t&1&&(c(0,"p",4),g(1,"Nincs enged\xE9lyezett embedding modell."),p(),c(2,"p"),g(3," Menj az "),c(4,"a",5),g(5,"Embedding Registry"),p(),g(6," oldalra, futtass "),c(7,"strong"),g(8,"Sync"),p(),g(9,"-et, majd az "),c(10,"code",6),g(11,"enabled"),p(),g(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);u(4),R("routerLink",e.registryRoute_$())}}function Ps(t,n){if(t&1&&(c(0,"div",1),A(1,Ds,13,1)(2,Bs,13,1),p()),t&2){let e=_();u(),k(e.registryKind()==="llm"?1:2)}}function Os(t,n){if(t&1&&(c(0,"option",11),g(1),p()),t&2){let e=n.$implicit;R("value",e.value),u(),E(e.label)}}function zs(t,n){if(t&1){let e=z();c(0,"div",7)(1,"label",8),g(2),p(),c(3,"select",9),O("ngModelChange",function(i){B(e);let r=_(2);return P(r.handleProviderChange(i))}),c(4,"option",10),g(5,"\u2014 V\xE1lassz \u2014"),p(),Se(6,Os,2,2,"option",11,Ls),p()()}if(t&2){let e=_(2);u(2),E(e.providerLabel()),u(),R("ngModel",e.selectedProvider())("disabled",e.disabled()),u(3),ye(e.providerOptions_$())}}function Ns(t,n){if(t&1&&(c(0,"option",11),g(1),p()),t&2){let e=n.$implicit;R("value",e),u(),E(e)}}function Fs(t,n){t&1&&(c(0,"span",12),g(1,"A kiv\xE1lasztott providernek nincs enged\xE9lyezett modellje."),p())}function Hs(t,n){if(t&1){let e=z();c(0,"div",2),A(1,zs,8,3,"div",7),c(2,"div",7)(3,"label",8),g(4),p(),c(5,"select",9),O("ngModelChange",function(i){B(e);let r=_();return P(r.handleModelChange(i))}),c(6,"option",10),g(7,"\u2014 V\xE1lassz modellt \u2014"),p(),Se(8,Ns,2,2,"option",11,bt),p(),A(10,Fs,2,0,"span",12),p()()}if(t&2){let e=_();u(),k(e.showProviderSelect_$()?1:-1),u(3),E(e.modelLabel()),u(),R("ngModel",e.selectedModel())("disabled",e.disabled()||e.modelOptions_$().length===0),u(3),ye(e.modelOptions_$()),u(2),k(e.modelOptions_$().length===0&&(e.selectedProvider()||e.providerFilter())?10:-1)}}var Za=(()=>{class t{registrySsot_CS=ke(Vi);registryKind=me.required();selectedProvider=me("");selectedModel=me("");providerLabel=me("Provider");modelLabel=me("Modell");disabled=me(!1);providerFilter=me(void 0);providerChange=Ze();modelChange=Ze();isEmpty_$=T(()=>this.registryKind()==="llm"?this.registrySsot_CS.isLlmEmpty_$():this.registrySsot_CS.isEmbeddingEmpty_$());isLoading_$=T(()=>this.registryKind()==="llm"?this.registrySsot_CS.llmLoading_$():this.registrySsot_CS.embeddingLoading_$());providerOptions_$=T(()=>this.registryKind()==="llm"?this.registrySsot_CS.enabledLlmProviders_$():this.registrySsot_CS.enabledEmbeddingProviders_$());modelOptions_$=T(()=>{let e=this.providerFilter()??this.selectedProvider();return e?this.registrySsot_CS.getModelsForProvider(this.registryKind(),e):[]});registryRoute_$=T(()=>this.registryKind()==="llm"?"/model-registry":"/embedding-registry");showProviderSelect_$=T(()=>this.providerFilter()===void 0);ngOnInit(){this.registrySsot_CS.ensureLoaded(this.registryKind())}handleProviderChange(e){this.providerChange.emit(e)}handleModelChange(e){this.modelChange.emit(e)}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=Fe({type:t,selectors:[["app-s-registry-provider-model-select"]],inputs:{registryKind:[1,"registryKind"],selectedProvider:[1,"selectedProvider"],selectedModel:[1,"selectedModel"],providerLabel:[1,"providerLabel"],modelLabel:[1,"modelLabel"],disabled:[1,"disabled"],providerFilter:[1,"providerFilter"]},outputs:{providerChange:"providerChange",modelChange:"modelChange"},standalone:!0,features:[He],decls:3,vars:3,consts:[[1,"flex","items-center","gap-2","text-sm","text-zinc-400","py-1"],[1,"bg-red-900/30","border","border-red-600","rounded","px-3","py-2","text-sm","text-red-300","space-y-1"],[1,"flex","flex-col","gap-2"],[1,"animate-spin","inline-block","w-4","h-4","border-2","border-zinc-500","border-t-transparent","rounded-full"],[1,"font-semibold"],[1,"underline","text-blue-400","hover:text-blue-300",3,"routerLink"],[1,"text-xs","bg-zinc-800","px-1","rounded"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-zinc-400","uppercase","tracking-wide"],[1,"bg-zinc-800","border","border-zinc-600","rounded","px-2","py-1","text-sm","text-zinc-100",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value"],[1,"text-xs","text-zinc-500"]],template:function(o,i){o&1&&A(0,Is,4,0,"div",0)(1,Ps,3,1,"div",1)(2,Hs,11,5,"div",2),o&2&&(k(i.isLoading_$()?0:-1),u(),k(i.isEmpty_$()&&!i.isLoading_$()?1:-1),u(),k(!i.isEmpty_$()&&!i.isLoading_$()?2:-1))},dependencies:[Ue,ni,ei,ti,Qn,Xn,Kn,Yn,Zn],encapsulation:2})}return t})();export{xn as a,w as b,Ge as c,$t as d,Fi as e,Ra as f,Ia as g,Vi as h,Za as i};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-565H5Q7X.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{k as F}from"./chunk-SUAZOLRE.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5GCMRTM2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as _,K as T,N as D,p as U}from"./chunk-
|
|
1
|
+
import{I as _,K as T,N as D,p as U}from"./chunk-ZJ3DCODZ.js";import{C,Gb as H,a as b,aa as I,b as j,h as w,k as L,p as g,q as h,wb as d,xb as M,y as F}from"./chunk-TBMJSIBB.js";var y=[{prefix:"/setup",hint:"Setup \u2014 client/src/app/_modules/config/_modules/setup/"},{prefix:"/settings",hint:"Settings \u2014 client/src/app/_modules/config/_modules/settings/"},{prefix:"/model-registry",hint:"Model registry \u2014 client/src/app/_modules/model-registry/"},{prefix:"/embedding-registry",hint:"Embedding registry \u2014 client/src/app/_modules/ai-systems/_modules/embedding-registry/"},{prefix:"/embedding-eval",hint:"Embedding eval \u2014 client/src/app/_modules/embedding-eval/"},{prefix:"/session",hint:"CCAP Session UI \u2014 client/src/app/_modules/session/"},{prefix:"/errors",hint:"Errors list \u2014 client/src/app/_modules/system/_modules/errors/"},{prefix:"/feedback",hint:"Feedback \u2014 client/src/app/_modules/feedback/"},{prefix:"/logs",hint:"Logs \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/logs/"},{prefix:"/host-runtime-mcp",hint:"Host runtime MCP \u2014 client/src/app/_modules/dev/_modules/host-runtime-mcp/"},{prefix:"/voice-notes-poc",hint:"Voice notes POC \u2014 client/src/app/_modules/dev/_modules/poc/voice-notes-poc/"},{prefix:"/master-control-remote-poc",hint:"Master control remote POC \u2014 client/src/app/_modules/dev/_modules/poc/master-control-remote-poc/"},{prefix:"/workflow-settings",hint:"Workflow settings \u2014 client/src/app/_modules/config/_modules/workflow-settings/"},{prefix:"/coordinator",hint:"Coordinator \u2014 client/src/app/_modules/coordinator/"},{prefix:"/dark-office",hint:"Dark Office \u2014 client/src/app/_modules/dark-office/"},{prefix:"/project-management",hint:"Project management \u2014 client/src/app/_modules/project-management/"},{prefix:"/cc-session",hint:"CC Session UI \u2014 client/src/app/_modules/cc-session/"},{prefix:"/mobile-app",hint:"Mobile app \u2014 client/src/app/_modules/dev/_modules/poc/mobile-app/"},{prefix:"/oc-session",hint:"OC Session \u2014 client/src/app/_modules/oc/"},{prefix:"/ca-session",hint:"CA Session \u2014 client/src/app/_modules/ca-session/"},{prefix:"/consultant",hint:"Consultant \u2014 client/src/app/_modules/consultant/"},{prefix:"/agent-instances",hint:"Agent instances \u2014 client/src/app/_modules/agent-instances/"},{prefix:"/terminals",hint:"Terminals \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/terminals/"},{prefix:"/live-development-pipeline",hint:"Live Development Pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/system-status",hint:"Legacy route \u2192 redirects to /live-development-pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/",hint:"Dashboard (root) \u2014 client/src/app/_modules/dashboard/"}];var q="NG0203",S=class r{static isNg0203Message(n){return n.trim()===q}static buildDiagnostics(n){let t={route:n.context.route,url:n.context.url,userAgent:n.context.userAgent,timestamp:n.context.timestamp},e=r.parseStackFrames(n.stack),i=typeof n.context.route=="string"?n.context.route:"",o=r.resolveRouteFeatureHints(i),s=r.buildStaticGuidance(),l=r.buildToolSteps({clientSnapshot:t,clientSource:n.clientSource,stackFrames:e,routeFeatureHints:o});return{summary:"Angular NG0203: inject() was called outside an injection context (constructor, field initializer, factory, or runInInjectionContext).",clientSource:n.clientSource,clientSnapshot:t,stackFrames:e,routeFeatureHints:o,staticGuidance:s,toolSteps:l}}static formatDiagnosticsAppendix(n){let t;try{t=JSON.stringify(n,null,2)}catch{t='{"ng0203Diagnostics":"JSON stringify failed"}'}return`
|
|
2
2
|
|
|
3
3
|
[NG0203 diagnostics]
|
|
4
4
|
${t}`}static parseStackFrames(n){if(n==null||!n.trim())return[];let t=n.split(`
|
|
@@ -24,4 +24,4 @@ ${String(n)}`}function nt(r){if(r instanceof Error&&typeof r.stack=="string"&&r.
|
|
|
24
24
|
`),s=t!=null&&t.trim().length>0?t.trim():"(no stack)";return`${o}
|
|
25
25
|
|
|
26
26
|
${s}`}buildReportPayloadFromError(t,e){let i=this.getCurrentContext(),o=f.getErrorMessageForDisplay(t),s=r.enrichMessageForReport(t,o),l=f.getStackForReport(t),m=this.buildStackWithContext(l,i),R=r.extractErrorCode(t),E=r.extractAdditionalContent(t);return{message:s,stack:m,source:e??"client-app",errorCode:R,errorAdditionalContent:E,clientContext:i}}static enrichMessageForReport(t,e){if(!(t instanceof d))return e;let i=t.url?`URL: ${t.url}`:"URL: (?)",o=`status: ${t.status}`;return`${e} | ${i} | ${o}`}static extractErrorCode(t){if(t==null||typeof t!="object")return;let e=t;if(typeof e.errorCode=="string"&&e.errorCode.length>0)return e.errorCode;if(typeof e._errorCode=="string"&&e._errorCode.length>0)return e._errorCode}static extractAdditionalContent(t){if(t==null||typeof t!="object")return;let e=t;if(e.additionalContent!=null&&typeof e.additionalContent=="object")return e.additionalContent}buildReportPayloadFromParams(t){let e=this.getCurrentContext(),i=this.buildStackWithContext(t.stack,e);return{message:t.message,stack:i,source:t.source,clientContext:e}}showError(t,e){setTimeout(()=>{try{let i=f.getErrorMessageForDisplay(t),o=N.tryGetShortNotificationAffix({error:t});if(o.length>0&&(i=i+o),!(t instanceof d)&&!(this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0)&&x.matchesDisplayMessage(i)){t instanceof Error&&p.DyFM_Log.error("[CCAP]",e??"client-app",t);return}let s=this.getCurrentContext(),l;if(k.isNg0600Message(i))try{l=k.buildDiagnostics({stack:f.getStackForReport(t),context:{route:s.route,url:s.url,userAgent:s.userAgent,timestamp:s.timestamp},clientSource:e})}catch(a){p.DyFM_Log.error("CCAP NG0600 diagnostics failed",a)}let m;if(S.isNg0203Message(i))try{m=S.buildDiagnostics({stack:f.getStackForReport(t),context:{route:s.route,url:s.url,userAgent:s.userAgent,timestamp:s.timestamp},clientSource:e})}catch(a){p.DyFM_Log.error("CCAP NG0203 diagnostics failed",a)}let R=e!=null&&e.trim().length>0?e.trim():void 0,E={id:this.nextNotificationId++,error:t,displayMessage:i,timestamp:Date.now(),isDismissing:!1,clientSource:R,ng0600Diagnostics:l,ng0203Diagnostics:m};if(this.errors_$.update(a=>{let u=[...a,E];return u.length>r.maxNotifications?u.slice(u.length-r.maxNotifications):u}),setTimeout(()=>{this.dismissNotification(E.id)},r.autoDismissMs),t instanceof Error&&p.DyFM_Log.error("[CCAP]",e??"client-app",t),!(t instanceof d)){let a=this.buildReportPayloadFromError(t,e??"client-app"),u="";l!=null?u=k.formatDiagnosticsAppendix(l):m!=null&&(u=S.formatDiagnosticsAppendix(m));let X=u.length>0?`${a.stack??""}${u}`:a.stack??"",Y={message:a.message,stack:X,source:a.source,sessionId:a.sessionId,runId:a.runId,errorCode:a.errorCode,errorAdditionalContent:a.errorAdditionalContent,clientContext:a.clientContext};this.errors_AS.reportError(Y).catch(()=>{})}}catch(i){p.DyFM_Log.error("CCAP showError set failed",i)}},0)}selectError(t){let e=this.errors_$().find(i=>i.id===t);e!=null&&this.selectedNotificationForModal_$.set(e)}dismissNotification(t){let i=this.errors_$().find(o=>o.id===t);i==null||i.isDismissing||(this.errors_$.update(o=>o.map(s=>s.id===t?j(b({},s),{isDismissing:!0}):s)),setTimeout(()=>{this.errors_$.update(o=>o.filter(s=>s.id!==t))},r.exitAnimationMs))}dismissSelected(){this.selectedNotificationForModal_$.set(null)}dismissAll(){this.errors_$.set([]),this.selectedNotificationForModal_$.set(null)}copyToClipboard(t){return L(this,null,function*(){return(yield this.tryWriteTextWithNavigatorClipboard(t))?{ok:!0}:this.copyTextWithExecCommand(t)?{ok:!0}:{ok:!1,error:new Error("Clipboard copy failed (secure Clipboard API unavailable or denied, and legacy execCommand copy failed)")}})}tryWriteTextWithNavigatorClipboard(t){return L(this,null,function*(){let e=typeof navigator<"u"?navigator.clipboard:void 0;if(e==null||typeof e.writeText!="function")return!1;try{return yield e.writeText(t),!0}catch{return!1}})}copyTextWithExecCommand(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.margin="0",e.style.border="none",e.style.outline="none",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus(),e.select();let i=t.length;e.setSelectionRange(0,i);let o=!1;try{o=document.execCommand("copy")}catch{o=!1}return e.remove(),o}reportErrorOnly(t){if(!(this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0)&&(t.source==="client-socket"||x.matchesDisplayMessage(t.message)))return;let i=this.buildReportPayloadFromParams(t);this.errors_AS.reportError(i).catch(()=>{})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=F({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{S as a,k as b,c,$ as d,v as e,z as f,N as g,f as h,V as i,Ot as j};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-66YFYBOC.js.map
|