@seqyuan/annovibe 0.8.136 → 0.8.138
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +11 -15
- package/.next/build-manifest.json +6 -6
- package/.next/diagnostics/framework.json +1 -1
- package/.next/prerender-manifest.json +33 -3
- package/.next/react-loadable-manifest.json +60 -60
- package/.next/required-server-files.js +45 -10
- package/.next/required-server-files.json +45 -10
- package/.next/routes-manifest.json +0 -30
- package/.next/server/app/_global-error/page.js +6 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.meta +24 -5
- package/.next/server/app/_global-error.rsc +19 -12
- package/.next/server/app/_global-error.segments/_full.segment.rsc +19 -12
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +25 -4
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +3 -1
- package/.next/server/app/_not-found/page.js +5 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.meta +24 -5
- package/.next/server/app/_not-found.rsc +24 -16
- package/.next/server/app/_not-found.segments/_full.segment.rsc +24 -16
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +30 -4
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/prepare/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +2 -2
- package/.next/server/app/api/agent/running/events/route.js +2 -2
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/runtime/route.js +1 -1
- package/.next/server/app/api/apps/[id]/[[...path]]/route.js +2 -2
- package/.next/server/app/api/apps/route.js +2 -2
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/auth/totp/route.js +1 -1
- package/.next/server/app/api/debug-models/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/file-tree/delete/route.js +1 -1
- package/.next/server/app/api/file-tree/mkdir/route.js +1 -1
- package/.next/server/app/api/file-tree/rename/route.js +1 -1
- package/.next/server/app/api/file-tree/reveal/route.js +1 -1
- package/.next/server/app/api/file-tree/write/route.js +1 -1
- package/.next/server/app/api/file-watch/route.js +3 -3
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/harness/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/im/cancel/route.js +1 -1
- package/.next/server/app/api/im/gateway-status/route.js +1 -1
- package/.next/server/app/api/im/project/route.js +1 -1
- package/.next/server/app/api/im/projects/route.js +1 -1
- package/.next/server/app/api/im/session-ids/route.js +1 -1
- package/.next/server/app/api/im/turn/route.js +3 -3
- package/.next/server/app/api/images/upload/route.js +1 -1
- package/.next/server/app/api/internal/runtime/route.js +1 -1
- package/.next/server/app/api/memory/dismiss/route.js +3 -3
- package/.next/server/app/api/memory/promote/route.js +3 -3
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/plot-kernels/route.js +1 -1
- package/.next/server/app/api/plot-kernels/save/route.js +1 -1
- package/.next/server/app/api/plot-kernels/status/route.js +1 -1
- package/.next/server/app/api/plot-kernels/stop/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/projects/browse/route.js +1 -1
- package/.next/server/app/api/projects/route.js +1 -1
- package/.next/server/app/api/search/route.js +1 -1
- package/.next/server/app/api/session-index/events/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +7 -8
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/media/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/shadowed/route.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +5 -5
- package/.next/server/app/api/skills/route.js +5 -5
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +2 -2
- package/.next/server/app/api/smoke/prompt-admission/route.js +1 -1
- package/.next/server/app/api/soul/route.js +1 -1
- package/.next/server/app/api/subagents/status/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/favicon.ico.meta +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/icon.svg.meta +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.meta +19 -4
- package/.next/server/app/index.rsc +33 -15
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +38 -5
- package/.next/server/app/index.segments/_full.segment.rsc +33 -15
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
- package/.next/server/app/login/page.js +5 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.meta +24 -5
- package/.next/server/app/login.rsc +29 -20
- package/.next/server/app/login.segments/_full.segment.rsc +29 -20
- package/.next/server/app/login.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +35 -8
- package/.next/server/app/page.js +14 -37
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/smoke/page.js +5 -6
- package/.next/server/app/smoke/page_client-reference-manifest.js +1 -1
- package/.next/server/app/smoke/session-stream/page.js +1 -2
- package/.next/server/app/smoke/session-stream/page_client-reference-manifest.js +1 -1
- package/.next/server/app/smoke/session-stream.html +1 -1
- package/.next/server/app/smoke/session-stream.meta +29 -6
- package/.next/server/app/smoke/session-stream.rsc +36 -20
- package/.next/server/app/smoke/session-stream.segments/_full.segment.rsc +36 -20
- package/.next/server/app/smoke/session-stream.segments/_tree.segment.rsc +5 -2
- package/.next/server/app/smoke/session-stream.segments/smoke/session-stream/__PAGE__.segment.rsc +43 -8
- package/.next/server/app/smoke.html +2 -2
- package/.next/server/app/smoke.meta +24 -5
- package/.next/server/app/smoke.rsc +37 -20
- package/.next/server/app/smoke.segments/_full.segment.rsc +37 -20
- package/.next/server/app/smoke.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/smoke.segments/smoke/__PAGE__.segment.rsc +43 -8
- package/.next/server/app-paths-manifest.json +11 -15
- package/.next/server/chunks/1367.js +1 -1
- package/.next/server/chunks/1681.js +1 -1
- package/.next/server/chunks/1688.js +3 -3
- package/.next/server/chunks/1761.js +1 -1
- package/.next/server/chunks/1813.js +23 -1
- package/.next/server/chunks/2242.js +1 -1
- package/.next/server/chunks/2325.js +28 -28
- package/.next/server/chunks/2671.js +2 -2
- package/.next/server/chunks/2970.js +46 -0
- package/.next/server/chunks/402.js +1 -1
- package/.next/server/chunks/42.js +44 -44
- package/.next/server/chunks/4367.js +1 -1
- package/.next/server/chunks/4406.js +1 -1
- package/.next/server/chunks/4779.js +1 -0
- package/.next/server/chunks/4980.js +1 -1
- package/.next/server/chunks/5193.js +3 -3
- package/.next/server/chunks/5715.js +1 -1
- package/.next/server/chunks/5851.js +1 -1
- package/.next/server/chunks/6346.js +1 -1
- package/.next/server/chunks/6429.js +15 -15
- package/.next/server/chunks/6644.js +108 -0
- package/.next/server/chunks/707.js +1 -1
- package/.next/server/chunks/716.js +1 -1
- package/.next/server/chunks/7307.js +1 -1
- package/.next/server/chunks/7365.js +1 -1
- package/.next/server/chunks/7603.js +1 -0
- package/.next/server/chunks/7765.js +1 -1
- package/.next/server/chunks/7890.js +1 -1
- package/.next/server/chunks/8305.js +264 -0
- package/.next/server/chunks/8363.js +1 -1
- package/.next/server/chunks/8797.js +1 -1
- package/.next/server/chunks/8973.js +1 -1
- package/.next/server/chunks/9868.js +1 -1
- package/.next/server/chunks/static/media/pdf.worker.min.94f8ceaf.mjs +6 -0
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +54 -6
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/prefetch-hints.json +86 -1
- package/.next/server/preview-props.json +5 -0
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{0b9a0da7-9075af772487e743.js → 0b9a0da7-373b544740862358.js} +1 -1
- package/.next/static/chunks/{1209.6d037cb2674eafa2.js → 1209.4f7491c863d512f0.js} +1 -1
- package/.next/static/chunks/2170a4aa.4301f7c49f3f0a6e.js +1 -0
- package/.next/static/chunks/2254-db22997b60e1dc27.js +1 -0
- package/.next/static/chunks/2619.8f686be8e2479c20.js +1 -0
- package/.next/static/chunks/{2623.d20fabd8e18197c6.js → 2623.a6bf38491c50cb6e.js} +2 -2
- package/.next/static/chunks/2693-421c2e9d9c92a666.js +173 -0
- package/.next/static/chunks/{2774.0811cda036dfeb94.js → 2774.ba50ba9e8b3ebf4a.js} +1 -1
- package/.next/static/chunks/2821.d15f14bd03d9d290.js +1 -0
- package/.next/static/chunks/{291-bfdfc8bcf5d0a962.js → 291-e0c3c616f67fe126.js} +1 -1
- package/.next/static/chunks/{3307.e638f7fa43f28bac.js → 3307.c87aab94f4464604.js} +1 -1
- package/.next/static/chunks/363642f4-a09fcaca7af039e5.js +1 -0
- package/.next/static/chunks/{3689.0336d97dde6c9084.js → 3689.93592a22c737d185.js} +1 -1
- package/.next/static/chunks/3794-fba3f76785a3c234.js +52 -0
- package/.next/static/chunks/{425.9a3434a28926566a.js → 425.8fe80c34648b01ec.js} +1 -1
- package/.next/static/chunks/{4453.91a357dc43c21745.js → 4453.ba05c4805425ceeb.js} +1 -1
- package/.next/static/chunks/4936-799f05324bb5c236.js +1 -0
- package/.next/static/chunks/4bd1b696-8cd12253b448cc13.js +1 -0
- package/.next/static/chunks/51fb665c.b01d5a04c27e9091.js +45 -0
- package/.next/static/chunks/{547.902a733488cfe3f7.js → 547.0f08d4931c0f04a2.js} +1 -1
- package/.next/static/chunks/{5567.540d7fc108ad6ee5.js → 5567.6674301d1337d738.js} +1 -1
- package/.next/static/chunks/5618-8aecfc54df369be5.js +22 -0
- package/.next/static/chunks/{58bb9007.1ccb6bba34b4c635.js → 58bb9007.3d4e7356b1e96b6a.js} +28 -28
- package/.next/static/chunks/6121.333d793734b9abf7.js +1 -0
- package/.next/static/chunks/6586.775a449050e0e9cc.js +138 -0
- package/.next/static/chunks/{6696.a41aec266e657d54.js → 6696.345b3cd62db13cb6.js} +1 -1
- package/.next/static/chunks/{7874.8db6929b94cdf697.js → 7874.7faccf8fab087120.js} +1 -1
- package/.next/static/chunks/8489.514938fd5e801cf7.js +36 -0
- package/.next/static/chunks/{8863.8b769013468d83d4.js → 8863.2ae457485a63aa22.js} +1 -1
- package/.next/static/chunks/90542734.6b9fbcabf095d1a0.js +1 -0
- package/.next/static/chunks/9867-1b73c62e8b604095.js +260 -0
- package/.next/static/chunks/app/_global-error/page-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/prepare/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/agent/runtime/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/apps/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/auth/totp/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/debug-models/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-tree/delete/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-tree/mkdir/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-tree/rename/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-tree/reveal/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-tree/write/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/file-watch/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/harness/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/home/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/im/cancel/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-status/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/im/project/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/im/projects/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/im/session-ids/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/im/turn/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/images/upload/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/internal/runtime/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/memory/dismiss/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/memory/promote/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/models/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/save/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/status/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/stop/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/projects/browse/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/projects/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/search/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/session-index/events/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/media/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/settings/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/skills/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/smoke/prompt-admission/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/soul/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/subagents/status/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/api/version/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/error-6309e3e4cdf79d40.js +3 -0
- package/.next/static/chunks/app/favicon.ico/route-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/app/global-error-7595c826cec2c048.js +3 -0
- package/.next/static/chunks/app/layout-31265427e43f6876.js +1 -0
- package/.next/static/chunks/app/page-2e2760a4cdaff534.js +22 -0
- package/.next/static/chunks/app/smoke/{page-32674afc320aa48b.js → page-82db33b4fdd2e0b4.js} +3 -3
- package/.next/static/chunks/framework-461b899b66554474.js +1 -0
- package/.next/static/chunks/main-4c5c62a3f03fc745.js +5 -0
- package/.next/static/chunks/main-app-a8a207cb34d209aa.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ebf7ae60150d40d4.js +1 -0
- package/.next/static/chunks/{webpack-0d1f7348ddb20bdc.js → webpack-36fa69ae1e15e7ce.js} +1 -1
- package/.next/static/css/{738b0b1c24aae500.css → d68ecb6695873888.css} +1 -1
- package/.next/static/media/pdf.worker.min.7a62f52c.mjs +6 -0
- package/.next/static/r3Awszl0kNf_sRFX-3vDi/_buildManifest.js +1 -0
- package/bin/annovibe-im-gateway.js +98 -21
- package/bin/pi-web.js +16 -9
- package/package.json +3 -3
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +0 -5
- package/.next/server/app/_global-error.segments/_head.segment.rsc +0 -5
- package/.next/server/app/_global-error.segments/_index.segment.rsc +0 -5
- package/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
- package/.next/server/app/_not-found.segments/_index.segment.rsc +0 -7
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
- package/.next/server/app/api/im/gateway-token/route.js +0 -1
- package/.next/server/app/api/im/gateway-token/route_client-reference-manifest.js +0 -1
- package/.next/server/app/api/sessions/[id]/kernel-state/route.js +0 -1
- package/.next/server/app/api/sessions/[id]/kernel-state/route_client-reference-manifest.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-artifact/route.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-artifact/route_client-reference-manifest.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-review/route.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-review/route_client-reference-manifest.js +0 -1
- package/.next/server/app/index.segments/_head.segment.rsc +0 -6
- package/.next/server/app/index.segments/_index.segment.rsc +0 -7
- package/.next/server/app/login.segments/_head.segment.rsc +0 -6
- package/.next/server/app/login.segments/_index.segment.rsc +0 -7
- package/.next/server/app/login.segments/login.segment.rsc +0 -5
- package/.next/server/app/smoke/session-stream.segments/_head.segment.rsc +0 -6
- package/.next/server/app/smoke/session-stream.segments/_index.segment.rsc +0 -7
- package/.next/server/app/smoke/session-stream.segments/smoke/session-stream.segment.rsc +0 -5
- package/.next/server/app/smoke/session-stream.segments/smoke.segment.rsc +0 -5
- package/.next/server/app/smoke.segments/_head.segment.rsc +0 -6
- package/.next/server/app/smoke.segments/_index.segment.rsc +0 -7
- package/.next/server/app/smoke.segments/smoke.segment.rsc +0 -5
- package/.next/server/chunks/2562.js +0 -12
- package/.next/server/chunks/4741.js +0 -18
- package/.next/server/chunks/63.js +0 -45
- package/.next/server/chunks/7303.js +0 -260
- package/.next/server/chunks/8304.js +0 -1
- package/.next/server/chunks/static/media/pdf.worker.min.c476e1a0.mjs +0 -6
- package/.next/static/chunks/2170a4aa.4213bb2183c9cdf9.js +0 -1
- package/.next/static/chunks/2254-fa3fcc88564ee18d.js +0 -1
- package/.next/static/chunks/2619.9aac8983f30c7c8a.js +0 -1
- package/.next/static/chunks/2693-52c358cf5d84b069.js +0 -173
- package/.next/static/chunks/2821.934bcf60fbdc28c6.js +0 -1
- package/.next/static/chunks/363642f4-dc35a7a659350f8e.js +0 -1
- package/.next/static/chunks/3794-123fdf632563f469.js +0 -32
- package/.next/static/chunks/4936-9558484c46c3ecc8.js +0 -1
- package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +0 -1
- package/.next/static/chunks/51fb665c.e2bfdae35ef4d790.js +0 -45
- package/.next/static/chunks/5618-5e2e47e6ed401a75.js +0 -22
- package/.next/static/chunks/6121.f3f43f1896ea0cd9.js +0 -1
- package/.next/static/chunks/6586.8c2a88c2a55300d2.js +0 -138
- package/.next/static/chunks/8489.45f22859734f514f.js +0 -36
- package/.next/static/chunks/90542734.ecc36ada79772529.js +0 -1
- package/.next/static/chunks/9867-b1d15d9354f100e7.js +0 -260
- package/.next/static/chunks/app/_global-error/page-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/prepare/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/running/events/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/agent/runtime/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/apps/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/auth/totp/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/debug-models/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-tree/delete/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-tree/mkdir/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-tree/rename/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-tree/reveal/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-tree/write/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/file-watch/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/harness/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/home/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/cancel/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-status/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-token/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/project/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/projects/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/session-ids/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/im/turn/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/images/upload/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/internal/runtime/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/memory/dismiss/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/memory/promote/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/models/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/save/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/status/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/stop/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/projects/browse/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/projects/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/search/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/session-index/events/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/media/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/workbench-artifact/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/workbench-review/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/new/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/settings/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/skills/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/smoke/prompt-admission/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/soul/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/subagents/status/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/api/version/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/favicon.ico/route-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/app/layout-101c4ccdf12880f0.js +0 -1
- package/.next/static/chunks/app/page-703d91d8bff67f70.js +0 -44
- package/.next/static/chunks/framework-594babcea68f40f6.js +0 -1
- package/.next/static/chunks/main-0371fd3122de9512.js +0 -5
- package/.next/static/chunks/main-app-8d81a93b58bb990f.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-a7f3f044c72f9137.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-dcc4d4b28dc1e9eb.js +0 -1
- package/.next/static/media/pdf.worker.min.29aaf158.mjs +0 -6
- package/.next/static/zeWki1Z47rqBkR2ph5H6N/_buildManifest.js +0 -1
- /package/.next/static/{zeWki1Z47rqBkR2ph5H6N → r3Awszl0kNf_sRFX-3vDi}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9867],{2112:(e,t,n)=>{function r(e){let t,n=[],r=/(^|\n)\s*`{1,3}show-widget`{0,3}\s*(?:\n\s*`{3}(?:json|html)?\s*)?\n?/g,a=0,l=!1;for(;null!==(t=r.exec(e));){l=!0;let s=e.slice(a,t.index).trim();s&&n.push({type:"text",content:s});let d=t.index+t[0].length,c=e.indexOf("```",d),u=e.indexOf("{",d);if(-1!==u&&u<=d+200&&(-1===c||u<c)){let t=function(e,t){let n=0,r=!1,i=!1;for(let o=t;o<e.length;o++){let t=e[o];if(i){i=!1;continue}if("\\"===t&&r){i=!0;continue}if('"'===t){r=!r;continue}if(!r&&("{"===t&&n++,"}"===t)&&0==--n)return o}return -1}(e,u);if(-1===t){let t=function(e){try{let t=i(e);if(t)return t}catch{}let t=e.indexOf('"widget_code"');if(-1===t)return null;let n=e.indexOf(":",t+13);if(-1===n)return null;let r=e.indexOf('"',n+1);if(-1===r)return null;let a=e.slice(r+1);(a=a.replace(/"\s*\}\s*$/,"")).endsWith("\\")&&(a=a.slice(0,-1));let l=e.match(/"title"\s*:\s*"([^"]*?)"/)?.[1],s=o(a.replace(/\\\\/g,"\0BACKSLASH\0").replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\"/g,'"').replace(/\\u([0-9a-fA-F]{4})/g,(e,t)=>String.fromCharCode(parseInt(t,16))).replace(/\x00BACKSLASH\x00/g,"\\"));return s.code.trim()?{title:l,code:s.code,showOverlay:s.truncated}:null}(e.slice(u));t&&n.push({type:"widget",...t,partial:!0}),a=e.length;break}let l=i(e.slice(u,t+1).trim());l&&n.push({type:"widget",...l});let s=t+1,d=e.slice(s,s+16).match(/^\s*\n?`{1,3}\s*/);d&&(s+=d[0].length),a=s,r.lastIndex=s;continue}if(-1!==c){let t=e.slice(d,c).trim(),o=i(t);o?n.push({type:"widget",...o}):t&&n.push({type:"text",content:t}),r.lastIndex=a=c+3}else{let t=i(e.slice(d).trim());if(t){let e=o(t.code);n.push({type:"widget",title:t.title,code:e.code,partial:!0,showOverlay:e.truncated})}a=e.length;break}}let s=e.slice(a).trim();return s&&n.push({type:"text",content:s}),!l&&0===n.length&&e.trim()&&n.push({type:"text",content:e}),n}function i(e){if(e.startsWith("{")){if(!e.endsWith("}"))return null;try{let t=JSON.parse(e),n=t.widget_code??t.code;if(n)return{title:t.title,code:n}}catch{}let t=function(e){try{return JSON.parse(e)}catch{}let t="",n=!1,r=!1,i=!1,o=!1,a=[],l=!1;for(let s=0;s<e.length;s++){let d=e[s];if(n){if(r){t+=d,r=!1;continue}if("\\"===d){t+=d,r=!0;continue}if('"'===d){let r=e.slice(s+1),c=/^\s*/.exec(r)?.[0]??"",u=r[c.length]??"",p=r.slice(c.length);i?":"===u?(t+=d,n=!1,l=!1,o=!1):t+='\\"':""===u||","===u||"}"===u||"]"===u?(t+=d,n=!1,l=!0,o=!1):/^"[\s\S]{0,100}?"\s*:/.test(p)?(t+=d+",",n=!1,l=!1,o=!0===a[a.length-1]):t+='\\"';continue}if("\n"===d||"\r"===d){t+="\\n";continue}if(" "===d){t+="\\t";continue}if(32>d.charCodeAt(0)){t+="\\u"+d.charCodeAt(0).toString(16).padStart(4,"0");continue}t+=d;continue}if(r){t+=d,r=!1;continue}if("\\"===d){t+=d,r=!0;continue}if('"'===d){l&&(t+=",",l=!1,o=!0===a[a.length-1]),i=o,o=!1,n=!0,t+=d;continue}if("{"===d||"["===d){l&&(t+=","),a.push("{"===d),o="{"===d,l=!1,t+=d;continue}if("}"===d||"]"===d){a.pop(),o=!1,l=!0,t+=d;continue}if(","===d){o=!0===a[a.length-1],l=!1,t+=d;continue}if(":"===d){l=!1,o=!1,t+=d;continue}if(/[0-9tfn-]/.test(d)){l&&(t+=","),t+=d;let n=e[s+1]??"";l=/[\s,}\]"'\\]/.test(n);continue}t+=d}try{return JSON.parse(t)}catch{return null}}(e);if(t){let e=t.widget_code??t.code;if("string"==typeof e&&e.trim())return{title:"string"==typeof t.title?t.title:void 0,code:e}}return null}return/^\s*<[a-zA-Z!][^>]*>/.test(e)||/<(!DOCTYPE|html|svg|canvas|script|style|div)/i.test(e)?{code:e}:null}function o(e){let t=e.lastIndexOf("<script");if(-1===t)return{code:e,truncated:!1};let n=e.slice(t);return/<script[\s\S]*?<\/script>/i.test(n)?{code:e,truncated:!1}:{code:e.slice(0,t).trim(),truncated:!0}}function a(e){return/`{1,3}show-widget/.test(e)}function l(e){return u(e)}function s(e){return u(e).replace(/\s+on[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>"']*)/gi,"").replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\/?>/gi,"").replace(/\s+(href|src|action)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>"']*))/gi,(e,t,n,r,i)=>{let o=(n??r??i??"").trim();return/^\s*(javascript|data)\s*:/i.test(o)?"":e})}n.d(t,{L$:()=>l,SR:()=>h,Xw:()=>s,aH:()=>r,f7:()=>g,qk:()=>a,sM:()=>f});let d=/<(iframe|object|embed|meta|link|base|form)[\s>][\s\S]*?<\/\1>/gi,c=/<(iframe|object|embed|meta|link|base)\b[^>]*\/?>/gi;function u(e){return e.replace(d,"").replace(c,"")}let p=["--bg","--bg-panel","--bg-hover","--bg-selected","--border","--text","--text-muted","--text-dim","--accent","--accent-hover"];function h(){if("u"<typeof document)return{};let e=getComputedStyle(document.documentElement),t={};for(let n of p){let r=e.getPropertyValue(n).trim();r&&(t[n]=r)}return t}function g(e){let t=Object.entries({"--bg":"#ffffff","--bg-panel":"#f5f5f5","--bg-hover":"#eeeeee","--bg-selected":"#e8e8e8","--border":"#e0e0e0","--text":"#1a1a1a","--text-muted":"#6b7280","--text-dim":"#9ca3af","--accent":"#2563eb","--accent-hover":"#1d4ed8",...e,"--font-mono":"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"}).map(([e,t])=>` ${e}: ${t};`).join("\n");return`
|
|
2
|
+
:root {
|
|
3
|
+
${t}
|
|
4
|
+
}
|
|
5
|
+
.dark { color-scheme: dark; }
|
|
6
|
+
body {
|
|
7
|
+
--color-background-primary: var(--bg, #fff);
|
|
8
|
+
--color-background-secondary: var(--bg-panel, #f5f5f5);
|
|
9
|
+
--color-background-tertiary: var(--bg-hover, #eee);
|
|
10
|
+
--color-text-primary: var(--text, #1a1a1a);
|
|
11
|
+
--color-text-secondary: var(--text-muted, #6b7280);
|
|
12
|
+
--color-text-tertiary: var(--text-dim, #9ca3af);
|
|
13
|
+
--color-border-tertiary: var(--border, #e0e0e0);
|
|
14
|
+
--color-border-secondary: var(--border, #e0e0e0);
|
|
15
|
+
--color-border-primary: var(--accent, #2563eb);
|
|
16
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
17
|
+
--border-radius-md: 8px;
|
|
18
|
+
--border-radius-lg: 12px;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
font-family: var(--font-sans);
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
line-height: 1.6;
|
|
24
|
+
color: var(--color-text-primary);
|
|
25
|
+
background: transparent;
|
|
26
|
+
}
|
|
27
|
+
* { box-sizing: border-box; }
|
|
28
|
+
svg { max-width: 100%; height: auto; display: block; }
|
|
29
|
+
a { color: var(--accent, #2563eb); }
|
|
30
|
+
button, input, select, textarea { font: inherit; }
|
|
31
|
+
button {
|
|
32
|
+
border: 1px solid var(--color-border-tertiary);
|
|
33
|
+
border-radius: var(--border-radius-md);
|
|
34
|
+
background: var(--color-background-secondary);
|
|
35
|
+
color: var(--color-text-primary);
|
|
36
|
+
padding: 5px 10px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
button:hover { background: var(--color-background-tertiary); }
|
|
40
|
+
input[type="range"] { accent-color: var(--accent, #2563eb); }
|
|
41
|
+
`}function f(e="",t=!1){return`<!DOCTYPE html>
|
|
42
|
+
<html class="${t?"dark":""}">
|
|
43
|
+
<head>
|
|
44
|
+
<meta charset="utf-8">
|
|
45
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
46
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline' https://cdnjs.cloudflare.com https://cdn.jsdelivr.net https://unpkg.com https://esm.sh; style-src 'unsafe-inline'; img-src * data: blob:; font-src * data:; connect-src 'none'">
|
|
47
|
+
<style>
|
|
48
|
+
${e}
|
|
49
|
+
</style>
|
|
50
|
+
</head>
|
|
51
|
+
<body>
|
|
52
|
+
<div id="__root" style="height:fit-content;"></div>
|
|
53
|
+
<script>
|
|
54
|
+
(function() {
|
|
55
|
+
var root = document.getElementById("__root");
|
|
56
|
+
var timer = null;
|
|
57
|
+
var first = true;
|
|
58
|
+
var lastHeight = 0;
|
|
59
|
+
|
|
60
|
+
function notifyReady() {
|
|
61
|
+
parent.postMessage({ type: "widget:ready" }, "*");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function reportHeight() {
|
|
65
|
+
if (timer) clearTimeout(timer);
|
|
66
|
+
timer = setTimeout(function() {
|
|
67
|
+
var rect = root.getBoundingClientRect();
|
|
68
|
+
var h = Math.ceil(Math.max(rect.height, document.body.scrollHeight, document.documentElement.scrollHeight));
|
|
69
|
+
if (h > 0 && h !== lastHeight) {
|
|
70
|
+
lastHeight = h;
|
|
71
|
+
parent.postMessage({ type: "widget:resize", height: h, first: first }, "*");
|
|
72
|
+
}
|
|
73
|
+
first = false;
|
|
74
|
+
}, 60);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function notifyError(message) {
|
|
78
|
+
try {
|
|
79
|
+
parent.postMessage({ type: "widget:error", message: String(message || "Widget render failed.") }, "*");
|
|
80
|
+
} catch (_) {}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function handleUpdate(html) {
|
|
84
|
+
try {
|
|
85
|
+
root.innerHTML = html;
|
|
86
|
+
reportHeight();
|
|
87
|
+
} catch (error) {
|
|
88
|
+
notifyError(error && error.message ? error.message : error);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function handleFinalize(html) {
|
|
93
|
+
try {
|
|
94
|
+
var tmp = document.createElement("div");
|
|
95
|
+
tmp.innerHTML = html;
|
|
96
|
+
var nodes = tmp.querySelectorAll("script");
|
|
97
|
+
var scripts = [];
|
|
98
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
99
|
+
var item = { src: nodes[i].src || "", text: nodes[i].textContent || "", attrs: [] };
|
|
100
|
+
for (var j = 0; j < nodes[i].attributes.length; j++) {
|
|
101
|
+
var attr = nodes[i].attributes[j];
|
|
102
|
+
if (attr.name !== "src" && attr.name !== "onload") item.attrs.push({ name: attr.name, value: attr.value });
|
|
103
|
+
}
|
|
104
|
+
scripts.push(item);
|
|
105
|
+
nodes[i].remove();
|
|
106
|
+
}
|
|
107
|
+
var visualHtml = tmp.innerHTML;
|
|
108
|
+
if (root.innerHTML !== visualHtml) root.innerHTML = visualHtml;
|
|
109
|
+
|
|
110
|
+
var cdnScripts = scripts.filter(function(s) { return !!s.src; });
|
|
111
|
+
var inlineScripts = scripts.filter(function(s) { return !s.src && s.text; });
|
|
112
|
+
function appendInline() {
|
|
113
|
+
for (var k = 0; k < inlineScripts.length; k++) {
|
|
114
|
+
var s = document.createElement("script");
|
|
115
|
+
s.textContent = inlineScripts[k].text;
|
|
116
|
+
for (var a = 0; a < inlineScripts[k].attrs.length; a++) {
|
|
117
|
+
s.setAttribute(inlineScripts[k].attrs[a].name, inlineScripts[k].attrs[a].value);
|
|
118
|
+
}
|
|
119
|
+
root.appendChild(s);
|
|
120
|
+
}
|
|
121
|
+
reportHeight();
|
|
122
|
+
setTimeout(function() { parent.postMessage({ type: "widget:scriptsReady" }, "*"); }, 50);
|
|
123
|
+
}
|
|
124
|
+
if (cdnScripts.length === 0) {
|
|
125
|
+
appendInline();
|
|
126
|
+
} else {
|
|
127
|
+
var pending = cdnScripts.length;
|
|
128
|
+
function done() { pending--; if (pending <= 0) appendInline(); }
|
|
129
|
+
for (var c = 0; c < cdnScripts.length; c++) {
|
|
130
|
+
var n = document.createElement("script");
|
|
131
|
+
n.src = cdnScripts[c].src;
|
|
132
|
+
n.onload = done;
|
|
133
|
+
n.onerror = done;
|
|
134
|
+
for (var d = 0; d < cdnScripts[c].attrs.length; d++) {
|
|
135
|
+
n.setAttribute(cdnScripts[c].attrs[d].name, cdnScripts[c].attrs[d].value);
|
|
136
|
+
}
|
|
137
|
+
root.appendChild(n);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
reportHeight();
|
|
141
|
+
setTimeout(reportHeight, 150);
|
|
142
|
+
setTimeout(reportHeight, 600);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
notifyError(error && error.message ? error.message : error);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function handleTheme(vars) {
|
|
149
|
+
Object.entries(vars || {}).forEach(function(_a) {
|
|
150
|
+
var key = _a[0], val = _a[1];
|
|
151
|
+
document.documentElement.style.setProperty(key, val);
|
|
152
|
+
});
|
|
153
|
+
if (typeof arguments[1] === "boolean") {
|
|
154
|
+
document.documentElement.className = arguments[1] ? "dark" : "";
|
|
155
|
+
}
|
|
156
|
+
reportHeight();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function captureRenderedWidget(requestId) {
|
|
160
|
+
try {
|
|
161
|
+
var html = root.innerHTML;
|
|
162
|
+
var styles = "";
|
|
163
|
+
var styleEls = document.querySelectorAll("style");
|
|
164
|
+
for (var si = 0; si < styleEls.length; si++) {
|
|
165
|
+
styles += styleEls[si].textContent || "";
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
var canvases = document.querySelectorAll("canvas");
|
|
169
|
+
var snapshots = [];
|
|
170
|
+
var placeholders = [];
|
|
171
|
+
var hidden = [];
|
|
172
|
+
for (var ci = 0; ci < canvases.length; ci++) {
|
|
173
|
+
try {
|
|
174
|
+
var canvas = canvases[ci];
|
|
175
|
+
var placeholder = document.createElement("img");
|
|
176
|
+
placeholder.setAttribute("data-canvas-export", String(ci));
|
|
177
|
+
placeholder.style.cssText = "width:" + canvas.offsetWidth + "px;height:" + canvas.offsetHeight + "px;display:block;";
|
|
178
|
+
canvas.parentNode.insertBefore(placeholder, canvas);
|
|
179
|
+
placeholders.push(placeholder);
|
|
180
|
+
hidden.push({ node: canvas, display: canvas.style.display });
|
|
181
|
+
canvas.style.display = "none";
|
|
182
|
+
snapshots.push({
|
|
183
|
+
dataUrl: canvas.toDataURL("image/png"),
|
|
184
|
+
width: canvas.offsetWidth,
|
|
185
|
+
height: canvas.offsetHeight,
|
|
186
|
+
});
|
|
187
|
+
} catch (_err) {
|
|
188
|
+
snapshots.push(null);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
html = root.innerHTML;
|
|
193
|
+
|
|
194
|
+
for (var pi = 0; pi < placeholders.length; pi++) {
|
|
195
|
+
placeholders[pi].remove();
|
|
196
|
+
}
|
|
197
|
+
for (var hi = 0; hi < hidden.length; hi++) {
|
|
198
|
+
hidden[hi].node.style.display = hidden[hi].display;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
parent.postMessage({
|
|
202
|
+
type: "widget:captured",
|
|
203
|
+
requestId: requestId,
|
|
204
|
+
html: html,
|
|
205
|
+
styles: styles,
|
|
206
|
+
canvases: snapshots,
|
|
207
|
+
bodyWidth: document.body.scrollWidth,
|
|
208
|
+
bodyHeight: document.body.scrollHeight,
|
|
209
|
+
}, "*");
|
|
210
|
+
} catch (_err) {
|
|
211
|
+
parent.postMessage({ type: "widget:captured", requestId: requestId, html: null }, "*");
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
var ro = new ResizeObserver(reportHeight);
|
|
216
|
+
ro.observe(root);
|
|
217
|
+
|
|
218
|
+
window.addEventListener("message", function(e) {
|
|
219
|
+
if (!e.data || typeof e.data.type !== "string") return;
|
|
220
|
+
switch (e.data.type) {
|
|
221
|
+
case "widget:update": handleUpdate(e.data.html || ""); break;
|
|
222
|
+
case "widget:finalize": handleFinalize(e.data.html || ""); break;
|
|
223
|
+
case "widget:theme": handleTheme(e.data.vars, e.data.isDark); break;
|
|
224
|
+
case "widget:capture": captureRenderedWidget(e.data.requestId); break;
|
|
225
|
+
case "widget:crossFilter":
|
|
226
|
+
window.dispatchEvent(new CustomEvent("widget-filter", { detail: e.data.payload }));
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
document.addEventListener("click", function(e) {
|
|
232
|
+
var a = e.target && e.target.closest ? e.target.closest("a[href]") : null;
|
|
233
|
+
if (!a) return;
|
|
234
|
+
var href = a.getAttribute("href");
|
|
235
|
+
if (!href || href.charAt(0) === "#") return;
|
|
236
|
+
e.preventDefault();
|
|
237
|
+
parent.postMessage({ type: "widget:link", href: href }, "*");
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
window.__widgetSendMessage = function(text) {
|
|
241
|
+
if (typeof text === "string" && text.length <= 500) {
|
|
242
|
+
parent.postMessage({ type: "widget:sendMessage", text: text }, "*");
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
window.__widgetPublish = function(topic, data) {
|
|
247
|
+
if (typeof topic === "string") {
|
|
248
|
+
parent.postMessage({ type: "widget:publish", topic: topic, data: data }, "*");
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
notifyReady();
|
|
253
|
+
})();
|
|
254
|
+
<\/script>
|
|
255
|
+
</body>
|
|
256
|
+
</html>`}},7834:(e,t,n)=>{n.d(t,{D:()=>r});function r(e){if(navigator.clipboard?.writeText)return navigator.clipboard.writeText(e);try{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),Promise.resolve()}catch{return Promise.reject()}}},8391:(e,t,n)=>{n.d(t,{T:()=>O});var r=n(95155),i=n(12115),o=n(18931),a=n(79204),l=n(50643),s=n(14988),d=n(77322),c=n(92509),u=n(96793),p=n(99947),h=n(72518);function g({code:e,language:t,showLineNumbers:n=!0,testAsyncDelayMs:o=0}){let{isDark:a}=(0,u.D)(),l=(0,i.useMemo)(()=>(0,h.Rd)(e,t,a),[e,a,t]),[s,d]=(0,i.useState)(()=>l?.tokens??null),[c,p]=(0,i.useState)(()=>l?"cache":"raw"),f=(0,i.useRef)(""),m=(0,i.useMemo)(()=>(0,h.nS)(e).tokens,[e]);(0,i.useEffect)(()=>{let n=`${e}:${t}:${a?"dark":"light"}`;f.current=n;let r=!1;if(l)return d(l.tokens),p(e=>"async"===e?e:"cache"),()=>{r=!0};let i=(0,h.wY)(e,t,a,e=>{if(!r&&f.current===n){let t=()=>{r||f.current!==n||(d(e.tokens),p("async"))};o>0?window.setTimeout(t,o):t()}});return i?(d(i.tokens),p("cache")):(d(null),p("raw")),()=>{r=!0}},[l,e,a,t,o]);let x=s??l?.tokens??m,y="async"===c?"async":l?"cache":c;return(0,r.jsx)("pre",{"data-highlight-source":y,"data-highlight-language":t||"text",style:{margin:0,padding:"10px 12px",fontSize:12.5,lineHeight:1.6,overflow:"auto",background:"var(--bg)",fontFamily:"var(--font-mono)"},children:(0,r.jsx)("code",{children:x.map((e,t)=>(0,r.jsxs)("span",{style:{display:"block"},children:[n&&(0,r.jsx)("span",{style:{display:"inline-block",width:"2rem",textAlign:"right",marginRight:"1rem",color:"var(--text-dim)",userSelect:"none",fontFamily:"var(--font-mono)"},children:t+1}),0===e.length?"\n":e.map((e,t)=>{let n=(0,h.tG)(e.fontStyle);return(0,r.jsx)("span",{style:{color:e.color??"inherit",...n},children:e.content},t)})]},t))})})}var f=n(7834);function m({code:e,language:t,variant:n,isStreaming:o=!1,testAsyncDelayMs:a=0,activeFilePath:l,agentRunning:s,onApplyToFile:d,onRunCode:c}){let[u,h]=(0,i.useState)(!1),[x,y]=(0,i.useState)(!1),v="chat"===n&&!o,b=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n").length,w=t||"text",j=o?(0,r.jsx)("pre",{"data-highlight-source":"raw","data-highlight-language":w,style:{margin:0,padding:"10px 12px",fontSize:12.5,lineHeight:1.6,overflow:"auto",background:"var(--bg)",fontFamily:"var(--font-mono)",whiteSpace:"pre-wrap",wordBreak:"break-all",color:"var(--text)"},children:(0,r.jsx)("code",{children:e})}):(0,r.jsx)(g,{code:e,language:w,showLineNumbers:"chat"===n,testAsyncDelayMs:a});return(0,r.jsxs)(p.NG,{className:`markdown-code-block markdown-code-block-${n}`,style:{marginTop:"file"===n?12:4,marginBottom:"file"===n?12:4},children:[(0,r.jsx)(p.iO,{title:w,actions:(0,r.jsxs)(r.Fragment,{children:[v&&l&&d&&(0,r.jsx)(p.Mi,{onClick:()=>d(e,t,l??void 0),title:`Write code to ${l}`,ariaLabel:`Write code to ${l}`,label:"apply",activeLabel:"apply",active:!1}),v&&!l&&d&&(0,r.jsx)(p.Mi,{onClick:()=>d(e,t),title:"Write code to a file",ariaLabel:"Write code to a file",label:"apply...",activeLabel:"apply",active:!1}),v&&c&&!s&&(0,r.jsx)(p.Mi,{onClick:()=>c(e,t),title:"Run code in terminal and show output",ariaLabel:"Run code in terminal",label:"run",activeLabel:"run",active:!1}),(0,r.jsx)(p.Mi,{onClick:()=>{let n=t||"",r=e.includes("```")?"````":"```",i=`${r}${n}
|
|
257
|
+
${e}
|
|
258
|
+
${r}`;(0,f.D)(i).then(()=>{y(!0),setTimeout(()=>y(!1),1500)})},title:"Copy as Markdown fence",ariaLabel:"Copy as Markdown fence",label:"markdown",activeLabel:"md copied",active:x}),(0,r.jsx)(p.Mi,{onClick:()=>{(0,f.D)(e).then(()=>{h(!0),setTimeout(()=>h(!1),1500)})},ariaLabel:"Copy code",label:"copy",activeLabel:"copied",active:u})]})}),(0,r.jsx)(p.oG,{totalLines:b,children:j})]})}function x({chart:e}){let{isDark:t}=(0,u.D)(),[o,a]=(0,i.useState)(null),[l,s]=(0,i.useState)(null),d=`mermaid-${(0,i.useId)().replace(/:/g,"")}`;return((0,i.useEffect)(()=>{let r=!1,i=e.trim();return(a(null),s(null),i)?(Promise.resolve().then(n.bind(n,43328)).then(({default:e})=>(e.initialize({startOnLoad:!1,securityLevel:"strict",theme:t?"dark":"default",suppressErrorRendering:!0}),e.parse(i,{suppressErrors:!0}).then(t=>{if(!t)throw Error("Invalid Mermaid syntax");return e.render(d,i)}))).then(e=>{r||a(e.svg)}).catch(e=>{r||s(e instanceof Error?e.message:String(e))}),()=>{r=!0}):void s("Empty Mermaid diagram")},[e,t,d]),l)?(0,r.jsxs)("div",{className:"mermaid-diagram mermaid-diagram-error",children:[(0,r.jsx)("div",{className:"mermaid-diagram-error-title",children:"Mermaid render failed"}),(0,r.jsx)("div",{className:"mermaid-diagram-error-message",children:l}),(0,r.jsx)("pre",{children:e})]}):(0,r.jsx)("div",{className:"mermaid-diagram",children:o?(0,r.jsx)("div",{className:"mermaid-diagram-canvas",dangerouslySetInnerHTML:{__html:o}}):(0,r.jsx)("div",{className:"mermaid-diagram-loading",children:"Rendering diagram..."})})}var y=n(40332),v=n(76577);function b({code:e,onAcceptDiff:t,agentRunning:n}){let o=(0,i.useMemo)(()=>(function(e){let t=e.split("\n"),n=[],r=null,i=1;for(let e of t){let t=/^\+\+\+ [ab]\/(.+)/.exec(e);if(t){r=t[1];continue}if(/^@@ /.test(e)){let t=/@@ -\d+(?:,\d+)? \+(\d+)/.exec(e);t&&(i=parseInt(t[1],10));continue}/^--- /.test(e)||(e.startsWith("+")&&!e.startsWith("+++")?n.push({type:"added",text:e.slice(1),lineNo:i++}):e.startsWith("-")&&!e.startsWith("---")?n.push({type:"removed",text:e.slice(1),lineNo:0}):e.startsWith(" ")?n.push({type:"unchanged",text:e.slice(1),lineNo:i++}):n.push({type:"unchanged",text:e,lineNo:i++}))}return{lines:n,filePath:r}})(e),[e]),a=(0,i.useMemo)(()=>(function(e){let t=0,n=0;for(let r of e)"added"===r.type&&t++,"removed"===r.type&&n++;return{added:t,removed:n}})(o.lines),[o.lines]);return(0,r.jsxs)(p.NG,{className:"markdown-code-block markdown-code-block-chat",style:{marginTop:4,marginBottom:4},children:[(0,r.jsx)(p.iO,{title:(0,r.jsxs)("span",{children:["diff ",o.filePath&&(0,r.jsx)("span",{style:{opacity:.7},children:o.filePath})," ",(0,r.jsxs)("span",{style:{color:"var(--text-dim)",fontWeight:400},children:["(",(0,r.jsxs)("span",{style:{color:"#16a34a"},children:["+",a.added]})," /"," ",(0,r.jsxs)("span",{style:{color:"#dc2626"},children:["-",a.removed]}),")"]})]}),actions:t&&!n?(0,r.jsx)(p.Mi,{onClick:()=>t(e,o.filePath),title:"Ask the agent to apply this diff",ariaLabel:"Ask the agent to apply this diff",label:"apply",activeLabel:"apply",active:!1}):void 0}),(0,r.jsx)(v.pg,{diff:o.lines,emptyLabel:"No changes detected"})]})}let w=new Set,j=new Map,k=null;function S(){return k||(k=Promise.all([n.e(2619),n.e(6586)]).then(n.bind(n,66586)).then(e=>{if(0===w.size){for(let t of Object.keys(e.bundledLanguages??{}))w.add(t.toLowerCase());for(let t of e.bundledLanguagesInfo??[]){let e=t.id.toLowerCase();for(let n of t.aliases??[])j.set(n.toLowerCase(),e)}}return e})),k}var C=n(2112),L=n(28999);function M(e){return e?.replace(/^language-/,"").trim()??""}function T(e){return/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//")}function $(e,t,n){let r;if(!n||n.startsWith("#")||T(n))return null;let i=(r=/^([^?#]*)(.*)$/.exec(n),r?.[1]??n);if(!i)return null;let o=function(e){try{return decodeURI(e)}catch{return e}}(i);return(0,L.HR)(o,t,e)}function W(e){return`/api/files/${(0,L.HG)(e)}?type=read`}function R({value:e,baseFilePath:t,cwd:n,onOpenLocalFile:i,onOpenFileAtLine:o}){let a=(0,r.jsx)("code",{style:{background:"var(--bg-selected)",padding:"1px 4px",borderRadius:3,fontFamily:"var(--font-mono)",fontSize:"0.9em"},children:e});return/^(?:\.{1,2}\/|\/|~\/|[\w@.-]+\/)[\w@./+-]+\.[A-Za-z0-9]{1,12}:\d+$/.test(e.trim())?(0,r.jsx)(I,{href:e,baseFilePath:t,cwd:n,onOpenLocalFile:i,onOpenFileAtLine:o,style:{textDecoration:"none"},children:a}):a}function E(e){let t=/^\s*!\[([^\]]*)\]\((.+)\)\s*$/.exec(e);if(!t)return null;let n=t[2]?.trim()??"";if(!n)return null;let r=/^(.+?)\s+(?:"[^"]*"|'[^']*')\s*$/.exec(n);return{alt:t[1]?.trim()||void 0,src:(r?.[1]??n).trim()}}function z({items:e,baseFilePath:t,cwd:n,onOpenLocalFile:i}){let o=1===e.length;return(0,r.jsx)("div",{className:"report-image-gallery",style:{display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"repeat(auto-fit, minmax(min(100%, 240px), 1fr))",gap:12,margin:"16px 0"},children:e.map((e,a)=>{let l=$(t,n,e.src),s=l?W(l):e.src,d=e.alt??e.caption??`Figure ${a+1}`,c=(0,r.jsx)("img",{src:s,alt:d,loading:"lazy",title:l??e.src,style:{display:"block",width:"100%",maxHeight:o?520:340,objectFit:"contain",border:"1px solid var(--border)",borderRadius:6,background:"var(--bg-panel)"}});return(0,r.jsxs)("figure",{style:{margin:0,minWidth:0},children:[l&&i?(0,r.jsx)("button",{type:"button",onClick:()=>i(l,(0,L.WP)(l)),title:`Open ${l}`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:c}):c,e.caption&&(0,r.jsx)("figcaption",{style:{marginTop:6,color:"var(--text-muted)",fontSize:12,lineHeight:1.45},children:e.caption})]},`${e.src}-${a}`)})})}function I({href:e,children:t,baseFilePath:n,cwd:i,onOpenLocalFile:o,onOpenFileAtLine:a,title:l,...s}){let d=e?/^(.*):(\d+)$/.exec(e.replace(/[?#].*$/,"")):null,c=d?d[1]:e,u=d?parseInt(d[2],10):void 0,p=$(n,i,c),h=!!p,g=!!e&&T(e),f=p&&u?`${W(p)}#L${u}`:h?W(p):e;return(0,r.jsx)("a",{...s,href:f,target:g?"_blank":void 0,rel:g?"noreferrer":void 0,onClick:e=>{if(!p)return;e.preventDefault();let t=(0,L.WP)(p);a?a(p,t,u):o&&o(p,t)},title:h?p:l,children:t})}function A({src:e,alt:t,title:n,baseFilePath:i,cwd:o,onOpenLocalFile:a,...l}){let s="string"==typeof e?e:void 0,d=$(i,o,s),c=d?W(d):s,u=(0,r.jsx)("img",{...l,src:c,alt:t??"",loading:"lazy",title:d??n,style:{...l.style??{},cursor:c?"zoom-in":l.style?.cursor}});return c?(0,r.jsx)("a",{href:c,target:"_blank",rel:"noreferrer",title:d??n??"Open image",style:{display:"inline-block",maxWidth:"100%"},onClick:e=>{d&&a&&(e.preventDefault(),a(d,(0,L.WP)(d)))},children:u}):u}function F({code:e,language:t,variant:n,isStreaming:i=!1,baseFilePath:o,cwd:a,onOpenLocalFile:l,onWidgetSendMessage:s,renderVisualCodeBlocks:d=!1,testAsyncCodeDelayMs:c=0,activeFilePath:u,agentRunning:p,onApplyToFile:h,onRunCode:g,onAcceptDiff:f}){let v,w,j,k;if("mermaid"===(v=t.trim().toLowerCase())||"mmd"===v)return(0,r.jsx)(x,{chart:e});if("diff"===(w=t.trim().toLowerCase())||"patch"===w||"unified-diff"===w)return(0,r.jsx)(b,{code:e,onAcceptDiff:f,agentRunning:p});if("show-widget"===t.trim().toLowerCase()){let t,n=(t=(0,C.aH)(`\`\`\`show-widget
|
|
259
|
+
${e}
|
|
260
|
+
\`\`\``).find(e=>"widget"===e.type),t?.type==="widget"?{title:t.title,code:t.code}:null);if(n)return(0,r.jsx)(y.u,{code:n.code,isStreaming:!1,title:n.title,onSendMessage:s})}if("report-gallery"===t.trim().toLowerCase()){let t=function(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=t.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.src&&e.src.trim()?[{src:e.src.trim(),alt:"string"==typeof e.alt&&e.alt.trim()?e.alt.trim():void 0,caption:"string"==typeof e.caption&&e.caption.trim()?e.caption.trim():void 0}]:[]);return n.length>0?n.slice(0,12):null}catch{return null}}(e);if(t)return(0,r.jsx)(z,{items:t,baseFilePath:o,cwd:a,onOpenLocalFile:l})}return d&&(j=t.trim().toLowerCase(),(k=e.trim())&&("svg"===j||"xml"===j&&/^<svg[\s>]/i.test(k)?/^<svg[\s>]/i.test(k):!("html"!==j||/<!doctype|<html[\s>]|<head[\s>]|<body[\s>]/i.test(k))&&/^<(style|svg|div|section|article|main|figure|canvas)\b/i.test(k)))?(0,r.jsx)(y.u,{code:e,isStreaming:!1,title:`${t||"visual"} preview`,onSendMessage:s}):(0,r.jsx)(m,{code:e,language:t,variant:n,isStreaming:i,testAsyncDelayMs:c,activeFilePath:u,agentRunning:p,onApplyToFile:h,onRunCode:g})}function H({children:e,className:t,node:n,baseFilePath:i,cwd:o,onOpenLocalFile:a,onWidgetSendMessage:l,renderVisualCodeBlocks:s=!1,isStreaming:d=!1,testAsyncCodeDelayMs:c=0,activeFilePath:u,agentRunning:p,onApplyToFile:h,onRunCode:g,onOpenFileAtLine:f,onAcceptDiff:m,...x}){let y=("string"==typeof e?e:Array.isArray(e)?e.map(e=>"string"==typeof e?e:"").join(""):"").replace(/\n$/,""),v=M(t);return"data-block"in x?(0,r.jsx)(F,{code:y,language:v,variant:"chat",isStreaming:d||!!x["data-incomplete"],baseFilePath:i,cwd:o,onOpenLocalFile:a,onWidgetSendMessage:l,renderVisualCodeBlocks:s,testAsyncCodeDelayMs:c,activeFilePath:u,agentRunning:p,onApplyToFile:h,onRunCode:g,onAcceptDiff:m}):(0,r.jsx)(R,{value:y,baseFilePath:i,cwd:o,onOpenLocalFile:a,onOpenFileAtLine:f})}function O({content:e,className:t="markdown-body",style:n,codeBlockVariant:p="chat",baseFilePath:g,cwd:f,onOpenLocalFile:m,onWidgetSendMessage:x,renderVisualCodeBlocks:y=!1,enableImageGallery:v=!1,isStreaming:b=!1,renderer:k="react-markdown",testAsyncCodeDelayMs:C=0,activeFilePath:L,agentRunning:T,onApplyToFile:$,onRunCode:W,onOpenFileAtLine:z,onAcceptDiff:P}){let B,N,{isDark:_}=(0,u.D)(),D=v?function(e){let t=e.split("\n"),n=[],r=0;for(;r<t.length;){if(!E(t[r])){n.push(t[r]),r+=1;continue}let e=[],i=r;for(;i<t.length;){let n=E(t[i]);if(!n)break;let r=i+1,o=r;for(;o<t.length&&!t[o].trim();)o+=1;let a=o<t.length?function(e){let t=/^\s*(?:_([^_]+)_|\*([^*]+)\*)\s*$/.exec(e);return(t?.[1]??t?.[2]??"").trim()||null}(t[o]):null;a&&(n.caption=a,r=o+1),e.push(n);let l=r;for(;l<t.length&&!t[l].trim();)l+=1;if(!E(t[l])){i=r;break}i=l}if(e.length>1||e.some(e=>e.caption)){n.push(["```report-gallery",JSON.stringify(e,null,2),"```"].join("\n")),r=i;continue}n.push(t[r]),r+=1}return n.join("\n")}(e):e,U=z?(B=D.split("\n"),N=!1,B.map(e=>/^\s*(```|~~~)/.test(e)?(N=!N,e):N||/\]\([^)]*$/.test(e)?e:e.replace(/(^|[\s([{"'])((?:\.{1,2}\/|\/|~\/|[\w@.-]+\/)[\w@./+-]+\.[A-Za-z0-9]{1,12}:\d+)\b/g,(e,t,n)=>`${t}[${n}](${n})`)).join("\n")):D,q=(0,i.useMemo)(()=>b?{cjk:s.h,math:d.D,mermaid:c.a}:{cjk:s.h,math:d.D,mermaid:c.a,code:function(e,t=[h.cx,h.aU]){return S(),{name:"shiki",type:"code-highlighter",getSupportedLanguages:()=>[...w],getThemes:()=>t,supportsLanguage(e){let t;return 0===w.size||null!==((t=e.trim().toLowerCase())?w.has(t)?t:j.get(t)??null:null)},highlight(t,n){let r=t.language,i=(0,h.wY)(t.code,r,e,e=>{n?.({tokens:e.tokens,bg:e.bg,fg:e.fg})});return i?{tokens:i.tokens,bg:i.bg,fg:i.fg}:(S(),null)}}}(_)},[_,b]);return"streamdown"!==k||g||v?(0,r.jsx)("div",{className:t,style:n,children:(0,r.jsx)(o.oz,{remarkPlugins:[a.A],components:{code({className:e,children:t,node:n}){let i=M(e),o=String(t),a=o.replace(/\n$/,"");return e?.includes("language-")||o.includes("\n")?(0,r.jsx)(F,{code:a,language:i,variant:p,isStreaming:b,baseFilePath:g,cwd:f,onOpenLocalFile:m,onWidgetSendMessage:x,renderVisualCodeBlocks:y,testAsyncCodeDelayMs:C,activeFilePath:L,agentRunning:T,onApplyToFile:$,onRunCode:W,onAcceptDiff:P}):(0,r.jsx)(R,{value:a,baseFilePath:g,cwd:f,onOpenLocalFile:m,onOpenFileAtLine:z})},pre:({children:e})=>(0,r.jsx)(r.Fragment,{children:e}),a:({href:e,children:t,node:n,...i})=>(0,r.jsx)(I,{...i,href:e,baseFilePath:g,cwd:f,onOpenLocalFile:m,onOpenFileAtLine:z,children:t}),img:({src:e,alt:t,node:n,...i})=>(0,r.jsx)(A,{...i,src:e,alt:t,baseFilePath:g,cwd:f,onOpenLocalFile:m})},children:U})}):(0,r.jsx)("div",{className:t,style:n,children:(0,r.jsx)(l.jH,{mode:b?"streaming":"static",isAnimating:!!b,plugins:q,components:{code:({children:e,className:t,node:n,...i})=>(0,r.jsx)(H,{...i,node:n,className:t,baseFilePath:g,cwd:f,onOpenLocalFile:m,onWidgetSendMessage:x,renderVisualCodeBlocks:y,isStreaming:b,testAsyncCodeDelayMs:C,activeFilePath:L,agentRunning:T,onApplyToFile:$,onRunCode:W,onOpenFileAtLine:z,onAcceptDiff:P,children:e}),a:({href:e,children:t,node:n,...i})=>(0,r.jsx)(I,{...i,href:e,baseFilePath:g,cwd:f,onOpenLocalFile:m,onOpenFileAtLine:z,children:t}),img:({src:e,alt:t,node:n,...i})=>(0,r.jsx)(A,{...i,src:e,alt:t,baseFilePath:g,cwd:f,onOpenLocalFile:m})},children:U})})}},17689:(e,t,n)=>{n.d(t,{Dm:()=>f});var r=n(95155),i=n(12115),o=n(55543),a=n(68515),l=n(31775),s=n(30259);function d({model:e,background:t="transparent",maxHeight:n=280}){return 0===e.resultImages.length&&0===e.collapsedPreviewPaths.length?null:(0,r.jsxs)("div",{style:{padding:"0 10px 10px",background:t},children:[e.resultImages.length>0&&(0,r.jsx)(s.O7,{images:e.resultImages,maxHeight:n}),e.collapsedPreviewPaths.length>0&&(0,r.jsx)(s.eR,{imagePaths:e.collapsedPreviewPaths,maxHeight:n})]})}function c({model:e,inputMaxHeight:t=280,inputBackground:n="var(--bg-subtle)",inputTextColor:i="var(--text-muted)",showBorderTop:o=!1}){let a=(0,r.jsx)(l.m,{text:e.inputText,maxHeight:t,collapsible:!0,textColor:i,background:n});return o?(0,r.jsx)("div",{style:{borderTop:"1px solid var(--border)"},children:a}):a}function u({model:e,result:t,showUnavailableWhenMissing:n=!1,unavailableLabel:i="Result not available"}){return t?(0,r.jsx)(s.qb,{text:e.displayResultText??"",isEmpty:e.resultIsEmpty,isError:t.isError??!1,images:e.resultImages,imagePaths:e.mergedImagePaths,toolDetails:t.details??null}):n?(0,r.jsx)("div",{style:{padding:"8px 10px",borderTop:"1px solid var(--border)",color:"var(--text-dim)",fontSize:12,fontStyle:"italic"},children:i}):null}var p=n(87559);function h({expanded:e,onToggle:t,tool:n,status:i,durationLabel:o,title:l,summary:s,titleTooltip:d,summaryTooltip:c,leading:u,titleStyle:g,buttonStyle:f}){return(0,r.jsx)(a.V,{expanded:e,onToggle:t,status:i,title:l??n.toolName,summary:s??(0,p.Wm)(n.input),durationLabel:o,leading:u,titleTooltip:d,summaryTooltip:c,buttonStyle:f,titleStyle:g})}function g({expanded:e,model:t,result:n,collapsedPreviewBackground:i="transparent",showCollapsedPreview:o=!0,showUnavailableWhenMissing:a=!1,unavailableLabel:l="Result not available",showInputBorderTop:s=!1}){return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c,{model:t,showBorderTop:s}),(0,r.jsx)(u,{model:t,result:n,showUnavailableWhenMissing:a,unavailableLabel:l})]}):o?(0,r.jsx)(d,{model:t,background:i}):null}function f({tool:e,result:t,status:n,durationLabel:a,cwd:l,title:d,summary:p,titleTooltip:m,summaryTooltip:x,leading:y,collapsedPreviewBackground:v="transparent",showCollapsedPreview:b=!0,showUnavailableWhenMissing:w=!1,unavailableLabel:j="Result not available",showInputBorderTop:k=!1,titleStyle:S,buttonStyle:C,containerStyle:L,notebookStyle:M=!1}){let[T,$]=(0,i.useState)(!1),W=(0,i.useMemo)(()=>(function({input:e,result:t,cwd:n}){let r=JSON.stringify(e??{},null,2),i=t?t.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n"):null,o=t?t.content.flatMap((e,n)=>"image"===e.type?[{...e,blockIndex:n,toolCallId:t.toolCallId}]:[]):[],a=(0,s.Ln)(i,o.length>0),l=null!==a&&("(no output)"===a.trim()||""===a.trim()),d=(0,s.qn)(r,n),c=(0,s.qn)(a,n),u=(0,s.Xz)([...c,...d]),p=c.length>0?c:d;return{inputText:r,displayResultText:a,resultImages:o,resultIsEmpty:l,inputImagePaths:d,resultImagePaths:c,mergedImagePaths:u,collapsedPreviewPaths:p}})({input:e.input,result:t,cwd:l}),[l,t,e.input]);if(M){let n={...W,inputText:function(e){if(e&&"object"==typeof e){for(let t of["command","cmd","script"])if("string"==typeof e[t])return e[t]}return"string"==typeof e?e:JSON.stringify(e??{},null,2)}(e.input)};return(0,r.jsxs)(o.t,{kind:"tool-call",style:{fontSize:12,minWidth:0,marginTop:2,marginBottom:6,...L},children:[(0,r.jsxs)("div",{style:{padding:"3px 10px",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontSize:11,color:"var(--text-dim)",display:"flex",alignItems:"center",gap:6},children:[(0,r.jsx)("span",{style:{fontWeight:500},children:e.toolName}),a&&(0,r.jsx)("span",{style:{opacity:.6},children:a})]}),(0,r.jsx)(c,{model:n,showBorderTop:!1,inputMaxHeight:260,inputBackground:"var(--bg)"}),t&&(0,r.jsx)(u,{model:W,result:t,showUnavailableWhenMissing:!1})]})}return(0,r.jsxs)(o.t,{kind:"tool-call",style:{fontSize:12,minWidth:0,...L},children:[(0,r.jsx)(h,{expanded:T,onToggle:()=>$(e=>!e),tool:e,status:n,durationLabel:a,title:d,summary:p,titleTooltip:m,summaryTooltip:x,leading:y,titleStyle:S,buttonStyle:C}),(0,r.jsx)(g,{expanded:T,model:W,result:t,collapsedPreviewBackground:v,showCollapsedPreview:b,showUnavailableWhenMissing:w,unavailableLabel:j,showInputBorderTop:k})]})}},18678:(e,t,n)=>{n.d(t,{Gb:()=>o,U1:()=>s,s2:()=>i});var r=n(95155);function i(e,t){return e?.isError?"error":e?"success":t?"running":"unknown"}function o(e){return"success"===e?"#16a34a":"error"===e?"#f87171":"running"===e?"#f59e0b":"var(--text-dim)"}function a(e){return"success"===e?"Done":"error"===e?"Error":"running"===e?"Running":"Unknown"}function l({status:e}){return"running"===e?(0,r.jsx)("span",{style:{width:6,height:6,borderRadius:999,background:o(e),animation:"pulse 1.2s ease-in-out infinite"}}):"success"===e?(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})}):"error"===e?(0,r.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"m18 6-12 12"}),(0,r.jsx)("path",{d:"m6 6 12 12"})]}):(0,r.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M12 8v5"}),(0,r.jsx)("path",{d:"M12 16h.01"})]})}function s({status:e}){let t=o(e);return(0,r.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,minHeight:18,padding:"0 6px",borderRadius:999,border:`1px solid color-mix(in srgb, ${t} 35%, transparent)`,background:`color-mix(in srgb, ${t} 10%, transparent)`,color:t,fontSize:10,fontWeight:600,whiteSpace:"nowrap",flexShrink:0},title:a(e),children:[(0,r.jsx)(l,{status:e}),(0,r.jsx)("span",{children:a(e)})]})}},28093:(e,t,n)=>{n.d(t,{pm:()=>c});var r=n(95155),i=n(12115),o=n(55543),a=n(84841),l=n(49006);function s({expanded:e,onToggle:t,durationLabel:n,isStreaming:i=!1,leading:o,label:d="Thinking",buttonStyle:c,labelStyle:u,durationStyle:p}){return(0,r.jsxs)(a.R,{expanded:e,onToggle:t,buttonStyle:{width:"100%",display:"flex",alignItems:"center",gap:7,minWidth:0,textAlign:"left",cursor:"pointer",border:"none",background:"transparent",color:"var(--text-muted)",...c},children:[o,(0,r.jsx)("span",{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1,...u},children:i?(0,r.jsx)(l.n,{children:d}):d}),n&&(0,r.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",fontVariantNumeric:"tabular-nums",flexShrink:0,...p},children:n})]})}function d({content:e,contentStyle:t}){return(0,r.jsx)(o.p,{style:{color:"var(--text-muted)",fontSize:12,lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",...t},children:(0,r.jsx)("div",{style:{padding:"8px 10px"},children:e})})}function c({content:e,durationLabel:t,isStreaming:n=!1,leading:a,label:l="Thinking",containerStyle:u,buttonStyle:p,labelStyle:h,durationStyle:g,contentStyle:f,deferred:m=!1,blockIndex:x,entryId:y,sessionId:v}){let[b,w]=(0,i.useState)(!1),[j,k]=(0,i.useState)(null),[S,C]=(0,i.useState)(!1),[L,M]=(0,i.useState)(null),T=m&&""===e.trim()&&null===j,$=async()=>{let e=!b;if(w(e),e&&T&&!S){if(!v||!y||void 0===x)return void M("Thinking is unavailable");C(!0),M(null);try{let e=new URLSearchParams({kind:"thinking",entryId:y,blockIndex:String(x)}),t=await fetch(`/api/sessions/${encodeURIComponent(v)}/media?${e.toString()}`,{cache:"no-store"}),n=await t.json();if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);k(n.thinking??"")}catch(e){M(e instanceof Error?e.message:String(e))}finally{C(!1)}}},W=j??e;return(0,r.jsxs)(o.t,{kind:"thinking",style:u,children:[(0,r.jsx)(s,{expanded:b,onToggle:$,durationLabel:t,isStreaming:n,leading:a,label:l,buttonStyle:p,labelStyle:h,durationStyle:g}),b&&(0,r.jsx)(d,{content:S?"Loading thinking…":L??W,contentStyle:f})]})}},28999:(e,t,n)=>{function r(e){return/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")?e.replace(/\\/g,"/"):e}n.d(t,{HG:()=>l,HR:()=>a,WP:()=>s,e_:()=>c,qP:()=>d});let i=/^[A-Za-z]:[\\/]/;function o(e){let t=r(e),n=t.startsWith("/")||i.test(t);if(i.test(t))return t;let o=[];for(let e of t.split("/"))if(e&&"."!==e){if(".."===e){o.length>0&&".."!==o[o.length-1]?o.pop():n||o.push(e);continue}o.push(e)}return`${n?"/":""}${o.join("/")}`}function a(e,t,n){let a=e.trim().replace(/^file:\/\//i,"").replace(/[),.;:!?]+$/g,"");if(!a||a.startsWith("//"))return null;if((a=r(a)).startsWith("~/")){let e=function(e){if(!e)return null;let t=r(e),n=t.match(/^(\/Users\/[^/]+|\/home\/[^/]+)(?:\/|$)/);if(n)return n[1];let i=t.match(/^([A-Za-z]:\/Users\/[^/]+)(?:\/|$)/);return i?i[1]:null}(t);return e?o(`${e}/${a.slice(2)}`):null}if(a.startsWith("/")||i.test(a))return o(a);if(n){let e=r(n),t=e.lastIndexOf("/"),i=t>=0?e.slice(0,t):"";return o(`${i}/${a}`)}return t?o(`${t.replace(/\/+$/,"")}/${a.replace(/^\.?\//,"")}`):null}function l(e){return r(e).split("/").filter(Boolean).map(encodeURIComponent).join("/")}function s(e){let t=r(e).replace(/\/+$/,"");return t.split("/").pop()??t}function d(e,t){if(!t)return e;let n=r(e),i=r(t).replace(/\/$/,"");return n.startsWith(i+"/")?n.slice(i.length+1):e}function c(e,t){return`${r(e).replace(/\/$/,"")}/${t}`}},30259:(e,t,n)=>{n.d(t,{O7:()=>y,eR:()=>v,qb:()=>b,qn:()=>g,h5:()=>p,Xz:()=>f,Ln:()=>m});var r=n(95155),i=n(12115);function o({imageData:e,mimeType:t,width:n,height:a,replayToken:l,saveTargetKind:s,saveDefaults:d}){let[c,u]=(0,i.useState)(d??{format:"pdf",dpi:300,width:800,height:600});(0,i.useEffect)(()=>{d||fetch("/api/settings").then(e=>e.ok?e.json():Promise.reject()).then(e=>{e.settings&&u({format:"png"===e.settings.saveFormat||"svg"===e.settings.saveFormat?e.settings.saveFormat:"pdf",dpi:e.settings.saveDpi??300,width:e.settings.saveWidth??800,height:e.settings.saveHeight??600})}).catch(()=>{})},[d]);let[p,h]=(0,i.useState)(c.format),[g,f]=(0,i.useState)(c.dpi),[m,x]=(0,i.useState)(c.width),[y,v]=(0,i.useState)(c.height),[b,w]=(0,i.useState)("idle"),[j,k]=(0,i.useState)(null),S=l&&"object"===s,C=async()=>{if(l){w("saving"),k(null);try{let e=await fetch("/api/plot-kernels/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({replayToken:l,format:p,dpi:g,width:m,height:y})});if(410===e.status)return void w("expired");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`HTTP ${e.status}`)}w("saved")}catch(e){w("error"),k(e instanceof Error?e.message:String(e))}}};return(0,r.jsxs)("div",{style:{position:"relative",display:"inline-block",maxWidth:"100%"},children:[(0,r.jsx)("img",{src:`data:${t};base64,${e}`,alt:"rendered plot",style:{maxWidth:"100%",height:"auto",borderRadius:6,border:"1px solid var(--border)"},width:n??void 0,height:a??void 0}),S&&(0,r.jsxs)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:"rgba(0,0,0,0.65)",padding:"6px 10px",display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",borderRadius:"0 0 6px 6px",fontSize:11,color:"#e5e7eb",opacity:0,transition:"opacity 0.15s"},className:"kernel-save-bar",onMouseEnter:e=>{e.currentTarget.style.opacity="1"},children:["saved"===b?(0,r.jsx)("span",{style:{color:"#34d399",fontWeight:600},children:"✓ Saved"}):"expired"===b?(0,r.jsx)("span",{style:{color:"#fbbf24"},children:"Save session expired. Re-render plot."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("select",{value:p,onChange:e=>h(e.target.value),style:{background:"rgba(255,255,255,0.12)",color:"#e5e7eb",border:"1px solid rgba(255,255,255,0.2)",borderRadius:4,padding:"2px 4px",fontSize:11,height:24},children:[(0,r.jsx)("option",{value:"pdf",children:"PDF"}),(0,r.jsx)("option",{value:"png",children:"PNG"}),(0,r.jsx)("option",{value:"svg",children:"SVG"})]}),(0,r.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:3},children:["DPI",(0,r.jsx)("input",{type:"number",value:g,onChange:e=>f(Number(e.target.value)||300),min:72,max:1200,style:{width:50,height:24,padding:"2px 4px",fontSize:11,background:"rgba(255,255,255,0.12)",color:"#e5e7eb",border:"1px solid rgba(255,255,255,0.2)",borderRadius:4}})]}),(0,r.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:3},children:["W",(0,r.jsx)("input",{type:"number",value:m,onChange:e=>x(Number(e.target.value)||800),min:100,max:8e3,style:{width:55,height:24,padding:"2px 4px",fontSize:11,background:"rgba(255,255,255,0.12)",color:"#e5e7eb",border:"1px solid rgba(255,255,255,0.2)",borderRadius:4}})]}),(0,r.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:3},children:["H",(0,r.jsx)("input",{type:"number",value:y,onChange:e=>v(Number(e.target.value)||600),min:100,max:8e3,style:{width:55,height:24,padding:"2px 4px",fontSize:11,background:"rgba(255,255,255,0.12)",color:"#e5e7eb",border:"1px solid rgba(255,255,255,0.2)",borderRadius:4}})]}),(0,r.jsx)("button",{type:"button",onClick:C,disabled:"saving"===b,style:{height:24,padding:"0 12px",borderRadius:4,background:"rgba(37,99,235,0.4)",border:"1px solid rgba(37,99,235,0.6)",color:"#fff",cursor:"pointer",fontSize:11,fontWeight:600,opacity:"saving"===b?.6:1},children:"saving"===b?"Saving...":"Save"})]}),"error"===b&&j&&(0,r.jsx)("span",{style:{color:"#f87171",marginLeft:4},children:j})]})]})}var a=n(31775),l=n(28999),s=n(46786);let d=/(?:file:\/\/)?(?:(?:[A-Za-z]:[\\/])|\/|~\/|\.{1,2}[\\/]|[A-Za-z0-9_.-]+[\\/])[^`"'<>|\s{}\[\]]+?\.(?:png|jpe?g|webp|gif|svg|bmp|avif|pdf)(?=$|[\s`"'<>|{}\[\]),.;:!?])/gi,c=/\.(?:png|jpe?g|webp|gif|svg|bmp|avif)$/i,u=/\.pdf$/i;function p(e){return e.path?h(e.path):e.source?.type==="base64"&&e.source.data?`data:${e.source.media_type??"image/png"};base64,${e.source.data}`:e.source?.type==="url"&&e.source.url?e.source.url:e.data?`data:${e.mimeType??"image/png"};base64,${e.data}`:null}function h(e){return`/api/files/${(0,l.HG)(e)}?type=read`}function g(e,t){if(!e)return[];let n=[],r=new Set,i=new Set;for(let t of e.matchAll(/!\[[^\]]*]\(([^)]+)\)/g))t[1]&&i.add(t[1].trim());let o=e=>{!e||r.has(e)||n.length>=24||(r.add(e),n.push(e))};for(let n of(d.lastIndex=0,e.matchAll(d))){let r=n[0];if(/^[a-z][a-z\d+.-]*:\/\//i.test(r)&&!/^file:\/\//i.test(r))continue;let a=e.slice(Math.max(0,n.index-12),n.index);if(/[A-Za-z][A-Za-z\d+.-]*:\/?$/.test(a)||r.startsWith("//")||i.has(r))continue;let s=(0,l.HR)(r,t);s&&(c.test(s)?o(s):u.test(s)&&o(s.replace(u,".png")))}return n}function f(e){let t=new Set,n=[];for(let r of e)t.has(r)||(t.add(r),n.push(r));return n}function m(e,t){return e&&t?e.replace(/\n?\[Current model does not support images\. The image will be omitted from this request\.\]\s*/g,"").trim():e}function x({image:e,maxHeight:t}){let n=(0,s.z)(),o=(0,i.useRef)(null),a=(0,i.useRef)(!1),[l,d]=(0,i.useState)(null),[c,u]=(0,i.useState)(!1),[p,g]=(0,i.useState)(null),f=(0,i.useCallback)(async()=>{if(!a.current||!l&&!c){if(a.current=!0,!n||void 0===e.blockIndex)return void g("Image unavailable");u(!0),g(null);try{let t=new URLSearchParams({kind:"image",blockIndex:String(e.blockIndex)});e.toolCallId&&t.set("toolCallId",e.toolCallId);let r=await fetch(`/api/sessions/${encodeURIComponent(n)}/media?${t.toString()}`,{cache:"no-store"}),i=await r.json();if(!r.ok)throw Error(i.error??`HTTP ${r.status}`);if(i.data)d(`data:${i.mimeType??e.mimeType??"image/png"};base64,${i.data}`);else if(i.path)d(h(i.path));else if(i.url)d(i.url);else throw Error("Image payload not found")}catch(e){g(e instanceof Error?e.message:String(e))}finally{u(!1)}}},[e.blockIndex,e.mimeType,e.toolCallId,c,n,l]);return((0,i.useEffect)(()=>{if(l||a.current||!o.current)return;if("u"<typeof IntersectionObserver)return void f();let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(e.disconnect(),f())},{rootMargin:"300px"});return e.observe(o.current),()=>e.disconnect()},[f,l]),l)?(0,r.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",title:"Open image",style:{display:"block",minWidth:0,border:"1px solid var(--border)",borderRadius:6,overflow:"hidden",background:"var(--bg)"},children:(0,r.jsx)("img",{src:l,alt:"",loading:"lazy",style:{display:"block",width:"100%",maxHeight:t,objectFit:"contain"}})}):(0,r.jsx)("button",{ref:o,type:"button",onClick:()=>{a.current=!1,f()},title:p??"Load image",style:{minHeight:88,padding:"12px 10px",border:"1px dashed var(--border)",borderRadius:6,background:"var(--bg)",color:p?"#f87171":"var(--text-dim)",fontSize:11.5,cursor:"pointer"},children:c?"Loading image…":p?"Image unavailable — click to retry":"Load image"})}function y({images:e,maxHeight:t=360}){return 0===e.length?null:(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:1===e.length?"minmax(0, 1fr)":"repeat(auto-fit, minmax(180px, 1fr))",gap:8,minWidth:0},children:e.map((e,n)=>{if(e.deferred&&!p(e))return(0,r.jsx)(x,{image:e,maxHeight:t},e.blockIndex??n);let i=p(e);return i?(0,r.jsx)("a",{href:i,target:"_blank",rel:"noreferrer",title:"Open image",style:{display:"block",minWidth:0,border:"1px solid var(--border)",borderRadius:6,overflow:"hidden",background:"var(--bg)"},children:(0,r.jsx)("img",{src:i,alt:"",loading:"lazy",style:{display:"block",width:"100%",maxHeight:t,objectFit:"contain"}})},n):null})})}function v({imagePaths:e,maxHeight:t=360}){let[n,o]=(0,i.useState)(()=>new Set),a=(0,i.useRef)(new Map),s=e.join("\0");(0,i.useEffect)(()=>{let t=new Set(e);a.current=new Map([...a.current].filter(([e])=>t.has(e))),o(e=>{let n=new Set([...e].filter(e=>t.has(e)));return n.size===e.size?e:n})},[e,s]),(0,i.useEffect)(()=>{if(![...n].some(e=>(a.current.get(e)??0)<3))return;let e=window.setTimeout(()=>{o(e=>{let t=new Set(e);for(let n of e)(a.current.get(n)??0)<3&&t.delete(n);return t})},2500);return()=>window.clearTimeout(e)},[n]);let d=e.filter(e=>!n.has(e));return 0===d.length?null:(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:1===d.length?"minmax(0, 1fr)":"repeat(auto-fit, minmax(180px, 1fr))",gap:8,minWidth:0},children:d.map(e=>{let n=h(e),i=(0,l.WP)(e);return(0,r.jsxs)("a",{href:n,target:"_blank",rel:"noreferrer",title:e,style:{display:"block",minWidth:0,border:"1px solid var(--border)",borderRadius:6,overflow:"hidden",background:"var(--bg)"},children:[(0,r.jsx)("img",{src:n,alt:i,loading:"lazy",onError:()=>{a.current.set(e,(a.current.get(e)??0)+1),o(t=>{let n=new Set(t);return n.add(e),n})},style:{display:"block",width:"100%",maxHeight:t,objectFit:"contain"}}),(0,r.jsx)("div",{style:{padding:"4px 6px",borderTop:"1px solid var(--border)",color:"var(--text-dim)",fontSize:10,fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]},e)})})}function b({text:e,isEmpty:t,isError:n,images:i,imagePaths:l,toolDetails:s}){let d=!t||e.trim().length>0;return(0,r.jsxs)("div",{style:{borderTop:`1px solid ${n?"rgba(248,113,113,0.3)":"rgba(34,197,94,0.15)"}`,background:n?"rgba(248,113,113,0.04)":"var(--bg-subtle)"},children:[i.length>0&&(0,r.jsx)("div",{style:{padding:"10px 10px 0",background:"var(--bg)"},children:s?.schema==="kernel-plot.render.v1"?(0,r.jsx)(o,{imageData:i[0].data??i[0].source?.data??"",mimeType:i[0].mimeType??i[0].source?.media_type??"image/png",width:null,height:null,replayToken:s.replayToken??null,saveTargetKind:s.saveTargetKind??null}):(0,r.jsx)(y,{images:i})}),l.length>0&&(0,r.jsx)("div",{style:{padding:"10px 10px 0",background:"var(--bg)"},children:(0,r.jsx)(v,{imagePaths:l})}),d&&(0,r.jsx)(a.m,{text:t?"(no output)":e,maxHeight:400,collapsible:!0,textColor:n?"#f87171":t?"var(--text-dim)":"var(--text-muted)",background:"var(--bg)",empty:t})]})}},31775:(e,t,n)=>{n.d(t,{m:()=>s});var r=n(95155),i=n(177),o=n.n(i);let a=/\x1B\[[0-?]*[ -/]*[@-~]/;var l=n(99947);function s({text:e,maxHeight:t=400,collapsible:n=!0,textColor:i="var(--text-muted)",background:d="var(--bg)",empty:c=!1}){let u=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),p=u.split("\n"),h=a.test(e)?(0,r.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:12,lineHeight:1.55,whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"auto",padding:"8px 10px",maxHeight:n?void 0:t,overflowY:n?void 0:"auto",background:d,color:i,opacity:c?.6:1,fontStyle:c?"italic":"normal"},children:(0,r.jsx)(o(),{children:e})}):(0,r.jsx)("pre",{style:{margin:0,padding:"8px 10px",fontSize:12,lineHeight:1.5,overflowX:"auto",maxHeight:n?void 0:t,overflowY:n?void 0:"auto",background:d,whiteSpace:"pre-wrap",wordBreak:"break-all",fontFamily:"var(--font-mono)",opacity:c?.6:1,fontStyle:c?"italic":"normal",color:i},children:u});return!n||p.length<=20?(0,r.jsx)(r.Fragment,{children:h}):(0,r.jsx)(l.oG,{totalLines:p.length,expandedMaxHeight:t,overlayBackground:d,footerBackground:d,children:h})}},40332:(e,t,n)=>{n.d(t,{u:()=>b});var r=n(95155),i=n(12115),o=n(96793),a=n(2112);let l=["--bg","--bg-panel","--bg-hover","--bg-selected","--border","--text","--text-muted","--text-dim","--accent","--accent-hover"];async function s(e){if(navigator.clipboard?.writeText)return void await navigator.clipboard.writeText(e);let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.inset="0",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand("copy");if(document.body.removeChild(t),!n)throw Error("Clipboard copy failed.")}async function d(e){let t=await c(e.code);if(t)return t;if(e.capture)return function(e){if(!e.html)throw Error("The widget did not provide capturable HTML.");let t=h({width:e.bodyWidth||640,height:e.bodyHeight||360}),n=function(e){let t=document.createElement("template");t.innerHTML=(0,a.L$)(e.html||"");let n=document.createElement("div");for(let r of(n.appendChild(t.content.cloneNode(!0)),Array.from(n.querySelectorAll("img[data-canvas-export]")))){let t=Number(r.getAttribute("data-canvas-export")),n=Number.isFinite(t)?e.canvases?.[t]:null;if(!n?.dataUrl){r.remove();continue}r.setAttribute("src",n.dataUrl),r.setAttribute("width",String(n.width)),r.setAttribute("height",String(n.height)),r.setAttribute("style",function(e,t){let n=new Map;for(let t of(e||"").split(";")){let[e,...r]=t.split(":");e?.trim()&&r.length>0&&n.set(e.trim(),r.join(":").trim())}for(let[e,r]of Object.entries(t))n.set(e,r);return Array.from(n.entries()).map(([e,t])=>e+":"+t).join(";")}(r.getAttribute("style"),{width:n.width+"px",height:n.height+"px",display:"block"}))}return u(n),Array.from(n.childNodes).map(e=>new XMLSerializer().serializeToString(e)).join("")}(e);if(!n.trim())throw Error("The widget capture was empty.");let r=[e.styles||"","#__widget_export_root{"+function(){if("u"<typeof document)return"";let e=getComputedStyle(document.documentElement);return l.map(t=>{let n=e.getPropertyValue(t).trim();return n?t+":"+n+";":""}).join("")}()+'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;font-size:14px;line-height:1.6;color:var(--text,#1a1a1a);background:transparent;}',"#__widget_export_root *{box-sizing:border-box;}\n#__widget_export_root svg{max-width:100%;height:auto;display:block;}"].join("\n");return f(m(['<svg xmlns="http://www.w3.org/2000/svg" width="'+t.width+'" height="'+t.height+'" viewBox="0 0 '+t.width+" "+t.height+'">',"<defs><style><![CDATA["+r.replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]></style></defs>",'<foreignObject x="0" y="0" width="100%" height="100%">','<div xmlns="http://www.w3.org/1999/xhtml" id="__widget_export_root" style="width:'+t.width+"px;min-height:"+t.height+'px;overflow:visible;">',n,"</div>","</foreignObject>","</svg>"].join("")),t.width,t.height)}(e.capture);throw Error("PNG export needs a rendered widget capture.")}async function c(e){var t;let n,r,i,o,l=function(e){let t=(0,a.L$)(e).trim();if(!/^<\s*(style|svg)\b/i.test(t))return null;let n=new DOMParser().parseFromString(t,"text/html"),r=Array.from(n.body.children),i=r.filter(e=>"svg"===e.tagName.toLowerCase()),o=r.filter(e=>"style"!==e.tagName.toLowerCase());if(1!==i.length||1!==o.length)return null;let l=i[0].cloneNode(!0),s=Array.from(n.body.querySelectorAll("style")).map(e=>e.textContent||"").join("\n").trim();if(s){let e=document.createElementNS("http://www.w3.org/2000/svg","style");e.textContent=s,l.insertBefore(e,l.firstChild)}return l}(e);if(!l)return null;u(l),l.setAttribute("xmlns","http://www.w3.org/2000/svg");let s=h((n=function(e){if(!e)return null;let t=e.trim().split(/[\s,]+/).map(Number);return 4!==t.length||t.some(e=>!Number.isFinite(e))||t[2]<=0||t[3]<=0?null:{width:t[2],height:t[3]}}((t=l).getAttribute("viewBox")),r=p(t.getAttribute("width"))??n?.width??640,i=n?n.height/n.width:.5625,o=p(t.getAttribute("height"))??n?.height??r*i,{width:r,height:o}));return l.setAttribute("width",String(s.width)),l.setAttribute("height",String(s.height)),l.getAttribute("viewBox")||l.setAttribute("viewBox","0 0 "+s.width+" "+s.height),f(m(new XMLSerializer().serializeToString(l)),s.width,s.height)}function u(e){for(let t of Array.from(e.querySelectorAll("script, iframe, object, embed, meta, link, base, form")))t.remove();for(let t of[e,...Array.from(e.querySelectorAll("*"))])for(let e of Array.from(t.attributes)){let n=e.name.toLowerCase(),r=e.value.trim();if(n.startsWith("on")){t.removeAttribute(e.name);continue}("href"===n||"src"===n||n.endsWith(":href"))&&/^\s*(javascript|data:text\/html)/i.test(r)&&t.removeAttribute(e.name)}}function p(e){if(!e||e.includes("%"))return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function h(e){let t=g(Math.ceil(e.width||640),240,2e3),n=g(Math.ceil(e.height||360),80,4e3),r=t*n;if(r>8e6){let e=Math.sqrt(8e6/r);t=Math.max(240,Math.floor(t*e)),n=Math.max(80,Math.floor(n*e))}return{width:t,height:n}}function g(e,t,n){return Math.min(Math.max(e,t),n)}function f(e,t,n){return new Promise((r,i)=>{let o=new Image,a=URL.createObjectURL(new Blob([e],{type:"image/svg+xml;charset=utf-8"}));o.onload=()=>{URL.revokeObjectURL(a);try{let e=document.createElement("canvas"),a=Math.min(window.devicePixelRatio||1,2);e.width=Math.ceil(t*a),e.height=Math.ceil(n*a),e.style.width=t+"px",e.style.height=n+"px";let l=e.getContext("2d");if(!l)throw Error("Canvas is not available.");l.scale(a,a),l.drawImage(o,0,0,t,n),e.toBlob(e=>{e?r(e):i(Error("Canvas export returned no image."))},"image/png")}catch(e){i(e instanceof Error?e:Error("PNG export failed."))}},o.onerror=()=>{URL.revokeObjectURL(a),i(Error("The browser could not render this widget as PNG."))},o.src=a})}function m(e){if("u"<typeof document)return e;let t=getComputedStyle(document.documentElement);return e.replace(/var\(\s*(--[a-zA-Z0-9_-]+)(?:\s*,\s*([^)]+))?\)/g,(e,n,r)=>t.getPropertyValue(n).trim()||r?.trim()||"#000")}let x=/cdnjs\.cloudflare\.com|cdn\.jsdelivr\.net|unpkg\.com|esm\.sh/,y=new Map;function v(e){return e.slice(0,200)}function b({code:e,isStreaming:t,title:n,showOverlay:l,onSendMessage:c}){let{isDark:u}=(0,o.D)(),p=(0,i.useRef)(null),h=(0,i.useRef)(null),g=(0,i.useRef)(null),f=(0,i.useRef)(new Map),m=(0,i.useRef)(""),[w,j]=(0,i.useState)(!1),[k,S]=(0,i.useState)(()=>y.get(v(e))??0),[C,L]=(0,i.useState)(!1),[M,T]=(0,i.useState)(!1),[$,W]=(0,i.useState)(null),[R,E]=(0,i.useState)(!1),[z,I]=(0,i.useState)(!1),[A,F]=(0,i.useState)(null),H=(0,i.useRef)(""),O=(0,i.useRef)((y.get(v(e))??0)>0),P=(0,i.useRef)(!1),B=(0,i.useRef)(u),[N,_]=(0,i.useState)(()=>(0,a.sM)((0,a.f7)({}),B.current)),D=(0,i.useCallback)(e=>{g.current&&clearTimeout(g.current),W(e),g.current=setTimeout(()=>W(null),1800)},[]),U=(0,i.useMemo)(()=>x.test(e),[e]);(0,i.useEffect)(()=>{_((0,a.sM)((0,a.f7)((0,a.SR)()),B.current))},[]),(0,i.useEffect)(()=>{F(null)},[e]),(0,i.useEffect)(()=>{function t(t){if(t.data&&"string"==typeof t.data.type&&(!p.current||t.source===p.current.contentWindow))switch(t.data.type){case"widget:ready":j(!0),F(null);break;case"widget:error":F(String(t.data.message??"Widget render failed.")),D("Widget failed");break;case"widget:captured":{let e=String(t.data.requestId??""),n=f.current.get(e);if(!n)break;clearTimeout(n.timeout),f.current.delete(e),n.resolve({html:"string"==typeof t.data.html?t.data.html:null,styles:"string"==typeof t.data.styles?t.data.styles:"",canvases:Array.isArray(t.data.canvases)?t.data.canvases:[],bodyWidth:"number"==typeof t.data.bodyWidth?t.data.bodyWidth:void 0,bodyHeight:"number"==typeof t.data.bodyHeight?t.data.bodyHeight:void 0});break}case"widget:resize":if("number"==typeof t.data.height&&t.data.height>0){let n=Math.min(t.data.height+2,2e3),r=v(e);if(P.current){S(e=>{let t=Math.max(e,n);return y.set(r,t),t});break}if(y.set(r,n),O.current)S(n);else{O.current=!0;let e=p.current;e&&(e.style.transition="none",e.offsetHeight),S(n),requestAnimationFrame(()=>{e&&(e.style.transition="height 0.2s ease-out")})}}break;case"widget:link":{let e=String(t.data.href??"");e&&!/^\s*(javascript|data)\s*:/i.test(e)&&window.open(e,"_blank","noopener,noreferrer");break}case"widget:sendMessage":{let e=String(t.data.text??"");e&&e.length<=500&&c?.(e);break}case"widget:publish":window.dispatchEvent(new CustomEvent("widget-cross-publish",{detail:{topic:t.data.topic,data:t.data.data,sourceIframe:p.current}}))}}return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[e,c,D]),(0,i.useEffect)(()=>{let e=f.current;return()=>{for(let t of(g.current&&clearTimeout(g.current),e.values()))clearTimeout(t.timeout),t.reject(Error("Widget renderer unmounted."));e.clear()}},[]),(0,i.useEffect)(()=>{function e(e){let t=e.detail;p.current?.contentWindow&&t?.sourceIframe!==p.current&&p.current.contentWindow.postMessage({type:"widget:crossFilter",payload:{topic:t?.topic,data:t?.data}},"*")}return window.addEventListener("widget-cross-publish",e),()=>window.removeEventListener("widget-cross-publish",e)},[]);let q=(0,i.useCallback)(e=>{let t=p.current;t?.contentWindow&&e!==m.current&&(m.current=e,t.contentWindow.postMessage({type:"widget:update",html:e},"*"))},[]);(0,i.useEffect)(()=>{if(!t||!w)return;let n=(0,a.Xw)(e);return h.current&&clearTimeout(h.current),h.current=setTimeout(()=>q(n),120),()=>{h.current&&clearTimeout(h.current)}},[e,t,w,q]),(0,i.useEffect)(()=>{if(t||!w||H.current===e)return;let n=(0,a.L$)(e),r=p.current;if(!r?.contentWindow)return;H.current=e,m.current=n,P.current=!0,I(!1),r.contentWindow.postMessage({type:"widget:finalize",html:n},"*");let i=setTimeout(()=>{P.current=!1,I(!0)},450);return()=>clearTimeout(i)},[t,w,e]),(0,i.useEffect)(()=>{if(!w)return;let e=()=>{p.current?.contentWindow?.postMessage({type:"widget:theme",vars:(0,a.SR)(),isDark:u},"*")};e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[w,u]),(0,i.useEffect)(()=>{if(!M)return;let e=document.body.style.overflow;document.body.style.overflow="hidden";let t=e=>{"Escape"===e.key&&T(!1)};return window.addEventListener("keydown",t),()=>{document.body.style.overflow=e,window.removeEventListener("keydown",t)}},[M]);let G=(0,i.useCallback)(()=>{let e=p.current?.contentWindow;return e?new Promise((t,n)=>{let r=`${Date.now()}-${Math.random().toString(36).slice(2)}`,i=setTimeout(()=>{f.current.delete(r),n(Error("Timed out waiting for widget capture."))},2500);f.current.set(r,{resolve:t,reject:n,timeout:i}),e.postMessage({type:"widget:capture",requestId:r},"*")}):Promise.reject(Error("Widget iframe is not ready."))},[]),V=(0,i.useCallback)(async()=>{try{let t;await s((t={widget_code:e},n?.trim()&&(t.title=n.trim()),"```show-widget\n"+JSON.stringify(t,null,2)+"\n```")),D("Copied source")}catch{D("Copy failed")}},[e,n,D]),Z=(0,i.useCallback)(async()=>{try{await s(e),D("Copied HTML/SVG")}catch{D("Copy failed")}},[e,D]),J=(0,i.useCallback)(async()=>{if(!t&&!R){E(!0),D("Exporting PNG...");try{var r,i;let t,o,a;try{t=await d({code:e})}catch{let n=await G();t=await d({code:e,capture:n})}r=t,i=`${((n||"widget").trim()||"widget").replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/^_+|_+$/g,"")||"widget"}.png`,o=URL.createObjectURL(r),(a=document.createElement("a")).href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o),D("Downloaded PNG")}catch(e){console.warn("[WidgetRenderer] PNG export failed:",e),D("PNG export unavailable")}finally{E(!1)}}},[e,n,t,R,G,D]),Y=l||U&&!t&&w&&!z,X={width:24,height:22,padding:0,background:"var(--bg-hover)",color:"var(--text-dim)",border:"1px solid var(--border)",borderRadius:3,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},K={...X,width:48,fontSize:10,whiteSpace:"nowrap"};return(0,r.jsxs)("div",{className:"widget-frame",style:{position:M?"fixed":"relative",inset:M?12:void 0,zIndex:M?1e3:void 0,marginTop:4*!M,marginBottom:4*!M,borderRadius:M?8:6,background:M?"var(--bg)":void 0,boxShadow:M?"0 24px 80px rgba(0, 0, 0, 0.35)":void 0,display:M?"flex":void 0,flexDirection:M?"column":void 0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 10px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderBottom:"none",borderRadius:`${M?8:6}px ${M?8:6}px 0 0`,fontSize:11,color:"var(--text-dim)",minHeight:26,flexShrink:0},children:[(0,r.jsx)("span",{style:{fontWeight:600,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n||"Widget"}),t&&(0,r.jsx)("span",{style:{fontSize:10,color:"var(--accent)",animation:"pulse 1.5s infinite",flexShrink:0},children:"streaming…"}),$&&(0,r.jsx)("span",{"aria-live":"polite",style:{marginLeft:"auto",fontSize:10,color:"var(--text-muted)",flexShrink:0},children:$}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginLeft:$?0:"auto",flexShrink:0},children:[(0,r.jsx)("button",{type:"button",onClick:V,title:"Copy show-widget source","aria-label":"Copy show-widget source",style:X,children:(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("polyline",{points:"16 18 22 12 16 6"}),(0,r.jsx)("polyline",{points:"8 6 2 12 8 18"})]})}),(0,r.jsx)("button",{type:"button",onClick:Z,title:"Copy widget HTML/SVG","aria-label":"Copy widget HTML/SVG",style:X,children:(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),(0,r.jsx)("button",{type:"button",onClick:J,disabled:t||R,title:t?"PNG export is available after streaming finishes":"Export widget as PNG","aria-label":"Export widget as PNG",style:{...X,...t||R?{opacity:.45,cursor:"not-allowed"}:null},children:R?(0,r.jsx)("span",{style:{fontSize:9},children:"..."}):(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,r.jsx)("polyline",{points:"7 10 12 15 17 10"}),(0,r.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}),(0,r.jsx)("button",{type:"button",onClick:()=>T(e=>!e),title:M?"Exit full screen":"View full screen","aria-label":M?"Exit full screen":"View full screen",style:X,children:M?(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("polyline",{points:"4 14 10 14 10 20"}),(0,r.jsx)("polyline",{points:"20 10 14 10 14 4"}),(0,r.jsx)("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),(0,r.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}):(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,r.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,r.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}),(0,r.jsx)("button",{type:"button",onClick:()=>L(e=>!e),title:C?"Show widget preview":"Show widget code","aria-pressed":C,style:K,children:C?"Preview":"Code"})]})]}),C&&(0,r.jsx)("pre",{style:{margin:0,padding:"8px 10px",fontSize:11,fontFamily:"var(--font-mono)",color:"var(--text-muted)",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:"0 0 6px 6px",overflow:"auto",maxHeight:M?"none":400,flex:M?1:void 0,whiteSpace:"pre-wrap"},children:e}),(0,r.jsx)("iframe",{ref:p,sandbox:"allow-scripts",srcDoc:N,title:n||"Widget",onLoad:()=>{j(!0),F(null)},style:{width:"100%",height:M?"calc(100vh - 50px)":k,minHeight:k>0?void 0:80,border:"1px solid var(--border)",borderRadius:`0 0 ${M?8:6}px ${M?8:6}px`,display:C?"none":"block",overflow:"hidden",background:"transparent",flex:M?1:void 0,transition:O.current?"height 0.2s ease-out":"none"}}),A&&!C&&(0,r.jsxs)("div",{style:{border:"1px solid var(--border)",borderTop:"none",borderRadius:`0 0 ${M?8:6}px ${M?8:6}px`,padding:"12px 14px",color:"var(--text-muted)",background:"var(--bg)",fontSize:12},children:["Widget preview failed: ",A]}),Y&&!C&&!A&&(0,r.jsx)("div",{className:"widget-shimmer",style:{position:"absolute",inset:0,top:26,pointerEvents:"none",borderRadius:"0 0 6px 6px"}})]})}},46786:(e,t,n)=>{n.d(t,{o:()=>a,z:()=>l});var r=n(95155),i=n(12115);let o=(0,i.createContext)(null);function a({sessionId:e,children:t}){return(0,r.jsx)(o.Provider,{value:e,children:t})}function l(){return(0,i.useContext)(o)}},49006:(e,t,n)=>{n.d(t,{n:()=>l,r:()=>s});var r=n(95155),i=n(12115);let o="smoke-reduced-motion-change";function a(){if("u"<typeof document)return null;let e=document.documentElement.dataset.smokeReducedMotion;return"true"===e||"false"!==e&&null}function l({children:e,duration:t=2,style:n,...s}){let[d,c]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{c(a()??e.matches)};t();let n=e=>{null===a()&&c(e.matches)},r=()=>t();return e.addEventListener("change",n),window.addEventListener(o,r),()=>{e.removeEventListener("change",n),window.removeEventListener(o,r)}},[]),d)?(0,r.jsx)("span",{...s,children:e}):(0,r.jsx)("span",{style:{display:"inline-block",backgroundImage:"linear-gradient(90deg, var(--text-dim) 25%, var(--text-muted) 50%, var(--text-dim) 75%)",backgroundSize:"200% 100%",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent",animation:`text-shimmer ${t}s linear infinite`,...n},...s,children:e})}function s({className:e,style:t,height:n=80}){let[l,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{d(a()??e.matches)};t();let n=e=>{null===a()&&d(e.matches)},r=()=>t();return e.addEventListener("change",n),window.addEventListener(o,r),()=>{e.removeEventListener("change",n),window.removeEventListener(o,r)}},[]);let c={borderRadius:6,background:"var(--bg-panel)",overflow:"hidden",height:n,...t};return l?(0,r.jsx)("div",{className:e,style:c}):(0,r.jsx)("div",{className:e,style:c,children:(0,r.jsx)("div",{style:{width:"100%",height:"100%",background:"linear-gradient(90deg, transparent 0%, var(--bg-hover) 50%, transparent 100%)",backgroundSize:"200% 100%",animation:"surface-shimmer 1.5s ease-in-out infinite"}})})}},55543:(e,t,n)=>{n.d(t,{p:()=>o,t:()=>i});var r=n(95155);function i({children:e,style:t,kind:n}){return(0,r.jsx)("div",{"data-disclosure-surface":"panel","data-disclosure-kind":n,style:{border:"1px solid var(--border)",borderRadius:6,overflow:"hidden",background:"var(--bg-panel)",...t},children:e})}function o({children:e,style:t}){return(0,r.jsx)("div",{"data-disclosure-surface":"body",style:{borderTop:"1px solid var(--border)",...t},children:e})}},68515:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(95155),i=n(84841),o=n(49006),a=n(18678);function l({expanded:e,onToggle:t,status:n,title:s,summary:d,durationLabel:c,leading:u,titleTooltip:p,summaryTooltip:h,buttonStyle:g,titleStyle:f,summaryStyle:m,durationStyle:x}){return(0,r.jsxs)(i.R,{expanded:e,onToggle:t,buttonStyle:g,children:[u,(0,r.jsx)("span",{title:p??s,style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexShrink:+!d,minWidth:0,flex:d?void 0:1,...f},children:"running"===n?(0,r.jsx)(o.n,{children:s}):s}),d?(0,r.jsx)("span",{title:h??d,style:{color:"var(--text-dim)",fontFamily:"var(--font-mono)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0,...m},children:"running"===n?(0,r.jsx)(o.n,{children:d}):d}):(0,r.jsx)("span",{style:{flex:1,minWidth:0}}),(0,r.jsx)(a.U1,{status:n}),c?(0,r.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",fontVariantNumeric:"tabular-nums",flexShrink:0,...x},children:c}):null]})}},72518:(e,t,n)=>{n.d(t,{aU:()=>o,cx:()=>i,nS:()=>x,Rd:()=>m,wY:()=>f,tG:()=>p});class r{#e;#t;constructor(e){this.#t=new Map,this.#e=e}get(e){if(!this.#t.has(e))return;let t=this.#t.get(e);return this.#t.delete(e),this.#t.set(e,t),t}set(e,t){for(this.#t.has(e)&&this.#t.delete(e);this.#t.size>=this.#e;){let e=this.#t.keys().next().value;if(void 0===e)break;this.#t.delete(e)}this.#t.set(e,t)}delete(e){this.#t.delete(e)}get size(){return this.#t.size}}let i="github-light",o="github-dark",a=new r(10),l=new r(200),s=new Set,d=new Map,c=null;function u(e,t,n){let r=e.slice(0,100),i=e.length>100?e.slice(-100):"";return`${t}:${n}:${e.length}:${r}:${i}`}function p(e){return void 0===e||0===e?{}:{fontStyle:1&e?"italic":void 0,fontWeight:2&e?700:void 0,textDecorationLine:4&e?"underline":void 0}}function h(){return c||(c=Promise.all([n.e(2619),n.e(6586)]).then(n.bind(n,66586)).then(e=>{if(0===s.size){for(let t of Object.keys(e.bundledLanguages??{}))s.add(t.toLowerCase());for(let t of e.bundledLanguagesInfo??[]){let e=t.id.toLowerCase();for(let n of t.aliases??[])d.set(n.toLowerCase(),e)}}return e})),c}async function g(e,t=i,n=o){let r=`${e}:${t}:${n}`,l=a.get(r);if(l)return l;let s=h().then(({createHighlighter:r})=>r({langs:[e],themes:[t,n]})).catch(e=>{throw a.delete(r),e});return a.set(r,s),s}function f(e,t,n,r){let a=m(e,t,n);if(a)return a;let c=n?o:i,p=t.trim().toLowerCase();if(!p)return null;let f=u(e,p,c);return h().then(()=>{let n,a=(n=t.trim().toLowerCase())?s.has(n)?n:d.get(n)??null:null;return a?g(a,i,o).then(t=>{let n=t.codeToTokens(e,{lang:a,theme:c}),i={bg:n.bg??"transparent",fg:n.fg??"inherit",tokens:n.tokens};return l.set(f,i),r(i),i}):null}).catch(e=>{console.warn("[Shiki] highlight failed:",e)}),null}function m(e,t,n){let r=t.trim().toLowerCase();if(!r)return null;let a=u(e,r,n?o:i);return l.get(a)??null}function x(e){return{bg:"transparent",fg:"inherit",tokens:e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n").map(e=>""===e?[]:[{color:"inherit",content:e}])}}},76577:(e,t,n)=>{n.d(t,{K$:()=>l,Ph:()=>a,Tg:()=>p,fj:()=>o,mK:()=>s,ml:()=>d,nG:()=>c,pg:()=>u,v7:()=>i});var r=n(95155);function i(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function o({children:e,style:t}){return(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",...t},children:e})}function a({children:e,style:t,bodyRef:n,onScroll:i}){return(0,r.jsx)("div",{ref:n,onScroll:i,style:{flex:1,overflow:"auto",background:"var(--bg)",...t},children:e})}function l({pathLabel:e,title:t,trailing:n,style:i}){return(0,r.jsxs)("div",{"data-file-viewer-surface":"status-bar",style:{display:"flex",alignItems:"center",gap:12,padding:"4px 16px",borderBottom:"1px solid var(--border)",fontSize:11,color:"var(--text-dim)",background:"var(--bg)",flexShrink:0,...i},children:[(0,r.jsx)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono)"},title:t??e,children:e}),n]})}function s({watching:e}){return(0,r.jsxs)("span",{title:e?"Live sync active":"Not watching",style:{display:"flex",alignItems:"center",gap:4,color:e?"#4ade80":"var(--text-dim)"},children:[(0,r.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:e?"#4ade80":"var(--border)",display:"inline-block",boxShadow:e?"0 0 4px #4ade80":"none"}}),e?"live":"static"]})}function d({children:e,onClick:t,title:n,disabled:i=!1,active:o=!1,emphasis:a="default",style:l}){let s="primary"==a,c="danger"==a;return(0,r.jsx)("button",{"data-file-viewer-surface":"toolbar-button",onClick:t,disabled:i,title:n,style:{padding:"2px 10px",fontSize:11,cursor:i?"not-allowed":"pointer",background:s?"var(--accent)":c?"rgba(239,68,68,0.1)":o?"var(--bg-selected)":"var(--bg-hover)",color:s?"#fff":c?"#ef4444":o?"var(--text)":"var(--text-muted)",border:`1px solid ${s?"var(--accent)":c?"rgba(239,68,68,0.3)":"var(--border)"}`,borderRadius:5,fontWeight:o||s||c?600:400,opacity:i?.6:1,...l},children:e})}function c({children:e,tone:t="muted",style:n}){return(0,r.jsx)("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",padding:24,color:"error"===t?"#f87171":"var(--text-muted)",fontSize:13,textAlign:"center",...n},children:e})}function u({diff:e,emptyLabel:t="No changes"}){if(!e.some(e=>"unchanged"!==e.type))return(0,r.jsx)("div",{style:{padding:"12px 16px",fontSize:12,color:"var(--text-dim)",fontFamily:"var(--font-mono)"},children:t});let n=new Set(e.flatMap((e,t)=>"unchanged"!==e.type?[t]:[])),i=new Set;for(let t of n)for(let n=Math.max(0,t-3);n<=Math.min(e.length-1,t+3);n++)i.add(n);let o=[],a=0;for(;a<e.length;)if(i.has(a)){let t=[];for(;a<e.length&&i.has(a);)t.push(e[a]),a++;o.push({hidden:!1,lines:t})}else{let t=0;for(;a<e.length&&!i.has(a);)t++,a++;o.push({hidden:!0,count:t})}let l=[],s=1;for(let t of e)"removed"===t.type?l.push(0):l.push(s++);let d=0;return(0,r.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:13,lineHeight:1.6},children:o.map((e,t)=>{if(e.hidden){let n=(0,r.jsxs)("div",{style:{padding:"2px 16px",color:"var(--text-dim)",background:"var(--bg-panel)",fontSize:11,borderTop:"1px solid var(--border)",borderBottom:"1px solid var(--border)"},children:["... ",e.count," unchanged lines ..."]},t);return d+=e.count,n}let n=e.lines.map((e,t)=>{let n=l[d+t],i="added"===e.type?"rgba(0,200,80,0.12)":"removed"===e.type?"rgba(240,60,60,0.14)":"transparent",o="added"===e.type?"+":"removed"===e.type?"-":" ",a="added"===e.type?"#4ade80":"removed"===e.type?"#f87171":"var(--text-dim)";return(0,r.jsxs)("div",{style:{display:"flex",background:i,borderLeft:"added"===e.type?"3px solid #4ade80":"removed"===e.type?"3px solid #f87171":"3px solid transparent"},children:[(0,r.jsx)("span",{style:{minWidth:44,padding:"0 8px 0 16px",textAlign:"right",color:"var(--text-dim)",userSelect:"none",fontSize:11,lineHeight:1.6,borderRight:"1px solid var(--border)",background:"var(--bg-panel)",flexShrink:0},children:"removed"===e.type?e.lineNo:n||""}),(0,r.jsx)("span",{style:{minWidth:16,padding:"0 6px",color:a,userSelect:"none",flexShrink:0,fontWeight:600},children:o}),(0,r.jsx)("span",{style:{flex:1,padding:"0 8px 0 0",whiteSpace:"pre",color:"var(--text)",overflowX:"auto"},children:e.text||"\xa0"})]},t)});return d+=e.lines.length,(0,r.jsx)("div",{children:n},t)})})}function p({options:e}){return(0,r.jsx)("div",{"data-file-viewer-surface":"segmented-toggle",style:{display:"flex",borderRadius:5,overflow:"hidden",border:"1px solid var(--border)"},children:e.map((e,t)=>(0,r.jsx)("button",{onClick:e.onClick,style:{padding:"2px 8px",fontSize:11,border:"none",borderLeft:0===t?"none":"1px solid var(--border)",cursor:"pointer",background:e.active?"var(--bg-selected)":"var(--bg-hover)",color:e.active?"var(--text)":"var(--text-muted)",fontWeight:e.active?600:400},children:e.label},e.key))})}},84841:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(95155);function i({expanded:e,onToggle:t,children:n,title:o,buttonStyle:a,chevronColor:l="var(--text-dim)",chevronStyle:s}){return(0,r.jsxs)("button",{type:"button",onClick:t,"aria-expanded":e,title:o,style:a,children:[n,(0,r.jsx)("span",{style:{display:"inline-flex",color:l,transform:e?"rotate(180deg)":"none",transition:"transform 0.15s",flexShrink:0,...s},children:(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"2 3.5 5 6.5 8 3.5"})})})]})}},87559:(e,t,n)=>{function r(e,t){for(let n of t){let t=e[n];if(null!=t&&""!==t)return String(t)}return null}function i(e,t=60){let n=e.replace(/\s+/g," ").trim();return n.length<=t?n:`${n.slice(0,Math.max(0,t-3))}...`}function o(e){let t=e.toLowerCase().split("__").filter(Boolean);return t[t.length-1]??e.toLowerCase()}function a(e,t=120){let n=Object.keys(e);return 0===n.length?"":"command"in e?String(e.command).slice(0,t):"cmd"in e?String(e.cmd).slice(0,t):"path"in e?String(e.path).slice(0,t):"file_path"in e?String(e.file_path).slice(0,t):"pattern"in e?String(e.pattern).slice(0,t):"query"in e?String(e.query).slice(0,t):String(e[n[0]]).slice(0,t)}function l(e){let t=e.toolName||"tool",n=o(t),a=e.input??{};if(["bash","execute","run","shell","exec_command","execute_command"].includes(n))return{canonicalName:n,kind:"terminal",label:"Shell",summary:i(r(a,["command","cmd"])??t,60)};if(["read","readfile","read_file"].includes(n))return{canonicalName:n,kind:"read",label:"Read",summary:i(r(a,["file_path","path"])??t,60)};if(["write","edit","write_file","create_file","notebook_edit"].includes(n)){let e,o=r(a,["file_path","path","notebook_path","filename"]);return{canonicalName:n,kind:"edit",label:"Edit",summary:i(o?(e=o.split(/[\\/]/).filter(Boolean))[e.length-1]??o:t,60)}}if(["search","grep","glob","find","find_files","websearch"].includes(n))return{canonicalName:n,kind:"search",label:"Search",summary:i(r(a,["pattern","query","glob"])??t,60)};if(["subagent","agent"].includes(n))return{canonicalName:n,kind:"agent",label:"Agent",summary:i([r(a,["agent","name","agentName"]),r(a,["prompt","task","message"])].filter(Boolean).join(": ")||t,60)};let l=r(a,["command","cmd","path","file_path","pattern","query","glob","prompt","description"])??function(e){try{return JSON.stringify(e)}catch{return String(e)}}(a)??t;return{canonicalName:n,kind:"tool",label:i(t,60),summary:i(l,60)}}n.d(t,{WI:()=>o,Wm:()=>a,wS:()=>l})},96793:(e,t,n)=>{n.d(t,{D:()=>s});var r=n(12115);let i=new Set;function o(e){return i.add(e),()=>{i.delete(e)}}function a(){return"u"<typeof document?"light":document.documentElement.classList.contains("dark")?"dark":"light"}function l(){return"light"}function s(){let e=(0,r.useSyncExternalStore)(o,a,l);return{theme:e,toggleTheme:(0,r.useCallback)(e=>{let t="dark"===a()?"light":"dark",n=()=>{"dark"===t?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark");try{localStorage.setItem("pi-theme",t)}catch{}i.forEach(e=>e())},r=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;if("function"!=typeof document.startViewTransition||r)return void n();let o=e?.x??window.innerWidth/2,l=e?.y??window.innerHeight/2,s=Math.hypot(Math.max(o,window.innerWidth-o),Math.max(l,window.innerHeight-l));document.startViewTransition(n).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${o}px ${l}px)`,`circle(${s}px at ${o}px ${l}px)`]},{duration:450,easing:"cubic-bezier(0.22, 0.61, 0.36, 1)",pseudoElement:"::view-transition-new(root)"})}).catch(()=>{})},[]),isDark:"dark"===e}}},99670:(e,t,n)=>{n.d(t,{kD:()=>C,Ld:()=>u,pR:()=>b,y0:()=>c,q:()=>y,cP:()=>v,o0:()=>w});var r=n(95155),i=n(12115),o=n(18678),a=n(55543),l=n(28093),s=n(68515),d=n(17689);function c({children:e,style:t,...n}){return(0,r.jsx)("div",{...n,style:{borderLeft:"2px solid var(--border)",paddingLeft:8,minWidth:0,...t},children:e})}function u({children:e,style:t,...n}){return(0,r.jsx)("div",{...n,style:{display:"flex",flexDirection:"column",gap:4,paddingTop:6,...t},children:e})}function p({name:e}){let t={width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};return"terminal"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("polyline",{points:"4 7 10 12 4 17"}),(0,r.jsx)("line",{x1:"12",y1:"17",x2:"20",y2:"17"})]}):"edit"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M12 20h9"}),(0,r.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]}):"read"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M4 19.5V5a2 2 0 0 1 2-2h11.5a1.5 1.5 0 0 1 0 3H6"}),(0,r.jsx)("path",{d:"M6 6v15h12"})]}):"search"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,r.jsx)("path",{d:"m20 20-4-4"})]}):"agent"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M12 8V4"}),(0,r.jsx)("rect",{x:"5",y:"8",width:"14",height:"11",rx:"3"}),(0,r.jsx)("path",{d:"M9 13h.01"}),(0,r.jsx)("path",{d:"M15 13h.01"}),(0,r.jsx)("path",{d:"M10 17h4"})]}):"thinking"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M9 18h6"}),(0,r.jsx)("path",{d:"M10 22h4"}),(0,r.jsx)("path",{d:"M8.5 14.5a6 6 0 1 1 7 0c-.8.6-1.5 1.6-1.5 2.5h-4c0-.9-.7-1.9-1.5-2.5Z"})]}):"success"===e?(0,r.jsx)("svg",{...t,children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})}):"error"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"m15 9-6 6"}),(0,r.jsx)("path",{d:"m9 9 6 6"})]}):"unknown"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M9.5 9a2.8 2.8 0 0 1 5 1.8c0 1.8-2.5 2.1-2.5 3.7"}),(0,r.jsx)("path",{d:"M12 18h.01"})]}):"chevron"===e?(0,r.jsx)("svg",{...t,children:(0,r.jsx)("polyline",{points:"8 10 12 14 16 10"})}):"running"===e?(0,r.jsxs)("svg",{...t,style:{animation:"spin 0.8s linear infinite"},children:[(0,r.jsx)("path",{d:"M21 12a9 9 0 0 1-9 9"}),(0,r.jsx)("path",{d:"M3 12a9 9 0 0 1 9-9"})]}):(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M12 3v18"}),(0,r.jsx)("path",{d:"M3 12h18"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}function h(e){if(void 0===e)return null;if(e<60)return`~${e}s`;let t=Math.floor(e/60),n=e%60;return`~${t}m${n?` ${n}s`:""}`}function g({expanded:e,total:t,summary:n,runningDescription:i,onToggle:o}){return(0,r.jsxs)("button",{type:"button",onClick:o,"aria-expanded":e,title:e?"Collapse process":"Expand process",style:{width:"100%",minHeight:30,display:"flex",alignItems:"center",gap:8,border:"1px solid var(--border)",borderRadius:6,background:e?"var(--bg-panel)":"transparent",color:"var(--text-muted)",padding:"5px 8px",cursor:"pointer",textAlign:"left",minWidth:0},children:[(0,r.jsx)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:22,height:18,borderRadius:5,background:"var(--bg-selected)",color:"var(--text-muted)",fontSize:11,fontFamily:"var(--font-mono)",flexShrink:0},children:t}),(0,r.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,fontSize:12,flex:1},children:n}),i&&(0,r.jsx)("span",{title:i,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220,minWidth:0,fontSize:11,flexShrink:1},children:i}),(0,r.jsx)("span",{style:{display:"inline-flex",color:"var(--text-dim)",flexShrink:0,transform:e?"rotate(180deg)":"none",transition:"transform 0.15s"},children:(0,r.jsx)(p,{name:"chevron"})})]})}function f({item:e,isStreaming:t=!1}){let n=h(e.duration);return(0,r.jsx)(l.pm,{content:e.content,durationLabel:n,isStreaming:t,deferred:e.deferred,blockIndex:e.blockIndex,entryId:e.entryId,sessionId:e.sessionId,leading:(0,r.jsx)("span",{style:{display:"inline-flex",color:"var(--text-dim)",flexShrink:0},children:(0,r.jsx)(p,{name:"thinking"})}),buttonStyle:{minHeight:28,padding:"5px 8px"}})}function m({item:e,cwd:t}){let[n,l]=(0,i.useState)(!1),d=e.tools.some(e=>"running"===e.status),c=e.tools.some(e=>"error"===e.status),u=e.tools.every(e=>"unknown"===e.status),h=d?"running":c?"error":u?"unknown":"success";return(0,r.jsxs)(a.t,{kind:"context-group",children:[(0,r.jsx)(s.V,{expanded:n,onToggle:()=>l(e=>!e),status:h,title:`${d?"Gathering context":"Gathered context"} (${e.tools.length})`,leading:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{display:"inline-flex",color:(0,o.Gb)(h),flexShrink:0},children:(0,r.jsx)(p,{name:h})}),(0,r.jsx)("span",{style:{display:"inline-flex",color:"var(--text-dim)",flexShrink:0},children:(0,r.jsx)(p,{name:"read"})})]}),buttonStyle:{width:"100%",minHeight:28,display:"flex",alignItems:"center",gap:7,padding:"5px 8px",border:"none",background:"transparent",color:"var(--text-muted)",cursor:"pointer",textAlign:"left",minWidth:0},titleStyle:{fontFamily:"inherit",fontWeight:400,fontSize:12}}),n&&(0,r.jsx)(a.p,{children:(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"4px 6px 6px"},children:e.tools.map(e=>(0,r.jsx)(x,{item:e,cwd:t,nested:!0},e.tool.toolCallId))})})]})}function x({item:e,cwd:t,nested:n}){let i=h(e.duration);return(0,r.jsx)(d.Dm,{tool:e.tool,result:e.result,status:e.status,durationLabel:i,cwd:t,title:e.meta.label,summary:e.meta.summary,titleTooltip:e.tool.toolName,summaryTooltip:e.meta.summary,leading:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{display:"inline-flex",color:(0,o.Gb)(e.status),flexShrink:0},children:(0,r.jsx)(p,{name:e.status})}),(0,r.jsx)("span",{style:{display:"inline-flex",color:"var(--text-dim)",flexShrink:0},children:(0,r.jsx)(p,{name:e.meta.kind})})]}),showCollapsedPreview:!1,showUnavailableWhenMissing:"unknown"===e.status,showInputBorderTop:!0,buttonStyle:{width:"100%",minHeight:28,display:"flex",alignItems:"center",gap:7,padding:"5px 8px",border:"none",background:"transparent",color:"var(--text-muted)",cursor:"pointer",textAlign:"left",minWidth:0},titleStyle:{color:"error"===e.status?"#f87171":"var(--text-muted)",maxWidth:120},containerStyle:{border:n?"1px solid color-mix(in srgb, var(--border) 70%, transparent)":"1px solid var(--border)",background:n?"var(--bg)":"var(--bg-panel)"}})}let y=g,v=f,b=m,w=x;var j=n(87559);let k=new Set(["read","read_file","readfile","search","grep","glob","find","find_files","ls","list","list_files"]),S=[];function C({tools:e,results:t,durations:n,thinkingBlocks:a=S,isStreaming:l,cwd:s}){let d,p,h,y,v=function(e=768){let[t,n]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=window.matchMedia(`(max-width: ${e}px)`),r=()=>n(t.matches);return r(),t.addEventListener?.("change",r),()=>t.removeEventListener?.("change",r)},[e]),t}(),b=(0,i.useMemo)(()=>{let r=[];return a.forEach((e,t)=>{r.push({type:"thinking",key:`thinking-${t}`,content:e.content,duration:e.duration,deferred:e.deferred,blockIndex:e.blockIndex,entryId:e.entryId,sessionId:e.sessionId})}),e.forEach(e=>{let i,a=t?.get(e.toolCallId);r.push({type:"tool",tool:e,result:a,status:(0,o.s2)(a,l),duration:n?.get(e.toolCallId),meta:{label:(i=(0,j.wS)(e)).label,summary:i.summary,kind:i.kind}})}),r},[n,l,t,a,e]),w=(0,i.useMemo)(()=>(function(e,t){let n=[],r=[],i=()=>{r.length>=3?n.push({type:"contextGroup",key:r.map(e=>e.tool.toolCallId).join(":"),tools:r}):n.push(...r),r=[]};for(let a of e){var o;if("tool"===a.type&&(o=a.tool,k.has((0,j.WI)(o.toolName)))&&(!t||"running"!==a.status)){r.push(a);continue}i(),n.push(a)}return i(),n})(b,l),[l,b]),L=b.filter(e=>"tool"===e.type),M=L.filter(e=>"running"===e.status),T=M.length>0,[$,W]=(0,i.useState)(null),R=!v&&(!!l||T),E=$??R,z=L.length+a.length,I=M[M.length-1]?.meta.summary;if(0===z)return null;let A=(d=L.filter(e=>"running"===e.status),p=L.filter(e=>"success"===e.status).length,h=L.filter(e=>"error"===e.status).length,y=L.filter(e=>"unknown"===e.status).length,[L.length>0?`${L.length} ${1===L.length?"tool":"tools"}`:null,a.length>0?`${a.length} ${1===a.length?"thought":"thoughts"}`:null,d.length>0?`${d.length} running`:null,p>0?`${p} completed`:null,h>0?`${h} failed`:null,y>0?`${y} unknown`:null].filter(Boolean));return(0,r.jsxs)(c,{children:[(0,r.jsx)(g,{expanded:E,total:z,summary:A.join(" \xb7 "),runningDescription:I,onToggle:()=>W(e=>!(e??R))}),E&&(0,r.jsx)(u,{children:w.map(e=>"thinking"===e.type?(0,r.jsx)(f,{item:e,isStreaming:!!l},e.key):"contextGroup"===e.type?(0,r.jsx)(m,{item:e,cwd:s},e.key):(0,r.jsx)(x,{item:e,cwd:s},e.tool.toolCallId))})]})}},99867:(e,t,n)=>{n.d(t,{D:()=>U});var r=n(95155),i=n(12115),o=n(8391),a=n(49006),l=n(28093),s=n(17689),d=n(18678),c=n(30259),u=n(40332),p=n(2112);function h({block:e,toolResults:t,isStreaming:n,streamingDuration:i,toolCallDurations:o,onSendMessage:a,renderVisualCodeBlocks:l,cwd:s,activeFilePath:d,agentRunning:u,onApplyToFile:p,onRunCode:f,onOpenFileAtLine:m,onAcceptDiff:v}){if("text"===e.type)return(0,r.jsx)(g,{block:e,isStreaming:n,onSendMessage:a,renderVisualCodeBlocks:l,cwd:s,activeFilePath:d,agentRunning:u,onApplyToFile:p,onRunCode:f,onOpenFileAtLine:m,onAcceptDiff:v});if("image"===e.type)return(0,r.jsx)(c.O7,{images:[e]});if("thinking"===e.type)return(0,r.jsx)(x,{block:e,duration:i,isStreaming:n});let b=t?.get(e.toolCallId),w=o?.get(e.toolCallId);return(0,r.jsx)(y,{block:e,result:b,duration:w,isStreaming:n,cwd:s})}function g({block:e,isStreaming:t,onSendMessage:n,renderVisualCodeBlocks:i,cwd:o,activeFilePath:a,agentRunning:l,onApplyToFile:s,onRunCode:d,onOpenFileAtLine:c,onAcceptDiff:h}){let x=e.text,y=(0,p.aH)(x);if(!y.some(e=>"widget"===e.type)){if(t&&(0,p.qk)(x)){let e=y.filter(e=>"text"===e.type).map(e=>e.content).join("\n\n");return(0,r.jsxs)(r.Fragment,{children:[e&&(0,r.jsx)(f,{text:e,isStreaming:t,onSendMessage:n,renderVisualCodeBlocks:i,cwd:o,activeFilePath:a,agentRunning:l,onApplyToFile:s,onRunCode:d,onOpenFileAtLine:c,onAcceptDiff:h}),(0,r.jsx)(m,{})]})}return(0,r.jsx)(f,{text:x,isStreaming:t,onSendMessage:n,renderVisualCodeBlocks:i,cwd:o,activeFilePath:a,agentRunning:l,onApplyToFile:s,onRunCode:d,onOpenFileAtLine:c,onAcceptDiff:h})}return(0,r.jsx)(r.Fragment,{children:y.map((e,p)=>"text"===e.type?(0,r.jsx)(f,{text:e.content,isStreaming:t,onSendMessage:n,renderVisualCodeBlocks:i,cwd:o,activeFilePath:a,agentRunning:l,onApplyToFile:s,onRunCode:d,onOpenFileAtLine:c,onAcceptDiff:h},p):(0,r.jsx)(u.u,{code:e.code,isStreaming:!!e.partial,title:e.title,showOverlay:e.showOverlay,onSendMessage:n},p))})}function f({text:e,isStreaming:t,onSendMessage:n,renderVisualCodeBlocks:a,cwd:l,activeFilePath:s,agentRunning:d,onApplyToFile:u,onRunCode:p,onOpenFileAtLine:h,onAcceptDiff:g}){let m=(0,i.useMemo)(()=>(0,c.qn)(e,l),[l,e]);return(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8*(m.length>0)},children:[(0,r.jsx)(o.T,{content:e,cwd:l,onWidgetSendMessage:n,renderVisualCodeBlocks:a,isStreaming:t,renderer:"streamdown",activeFilePath:s,agentRunning:d,onApplyToFile:u,onRunCode:p,onOpenFileAtLine:h,onAcceptDiff:g}),m.length>0&&(0,r.jsx)(c.eR,{imagePaths:m})]})}function m(){return(0,r.jsx)(a.r,{height:88,style:{border:"1px solid var(--border)"}})}function x({block:e,duration:t,isStreaming:n}){return(0,r.jsx)(l.pm,{content:e.thinking,durationLabel:void 0!==t?`${t}s`:null,isStreaming:n,buttonStyle:{width:"100%",padding:"6px 10px",fontSize:12},containerStyle:{fontSize:13},contentStyle:{background:"var(--bg-panel)"}})}function y({block:e,result:t,duration:n,isStreaming:i,cwd:o}){let a=(0,d.s2)(t,i),l=(0,d.Gb)(a),c="bash"===e.toolName;return(0,r.jsx)(s.Dm,{tool:e,result:t,status:a,durationLabel:void 0!==n?`${n}s`:null,cwd:o,titleStyle:{color:l},collapsedPreviewBackground:`color-mix(in srgb, ${l} 5%, transparent)`,buttonStyle:{display:"flex",alignItems:"center",gap:7,width:"100%",padding:"6px 10px",background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontSize:12,textAlign:"left",minWidth:0},containerStyle:{border:`1px solid color-mix(in srgb, ${l} 38%, transparent)`,background:`color-mix(in srgb, ${l} 8%, transparent)`},notebookStyle:c})}var v=n(7834);function b(e=768){let[t,n]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=window.matchMedia(`(max-width: ${e}px)`),r=()=>n(t.matches);return r(),t.addEventListener?.("change",r),()=>t.removeEventListener?.("change",r)},[e]),t}function w({children:e,hovered:t,onHoverChange:n,style:i}){return(0,r.jsx)("div",{style:i,onMouseEnter:()=>n?.(!0),onMouseLeave:()=>n?.(!1),"data-message-hovered":t?"true":"false",children:e})}function j({children:e,justify:t="flex-start",style:n}){let i=b();return(0,r.jsx)("div",{"data-message-surface":"footer",style:{display:"flex",alignItems:"center",justifyContent:t,gap:i?4:6,marginTop:4,...n},children:e})}function k({children:e,alignEnd:t=!1,style:n}){return(0,r.jsx)("span",{"data-message-surface":"timestamp",style:{fontSize:10,color:"var(--text-dim)",marginLeft:t?"auto":void 0,...n},children:e})}function S({children:e,visible:t,style:n}){return(0,r.jsx)("div",{style:{display:"flex",gap:3,opacity:+!!t,pointerEvents:t?"auto":"none",transition:"opacity 0.12s",...n},children:e})}function C({children:e,onClick:t,disabled:n=!1,title:i,active:o=!1,style:a,onMouseEnterColor:l="var(--accent)",onMouseLeaveColor:s="var(--text-dim)",iconOnlyOnMobile:d=!1}){let c=b();return(0,r.jsx)("button",{onClick:t,disabled:n,title:i,style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",height:22,background:"none",border:"none",borderRadius:5,color:o?"var(--accent)":"var(--text-dim)",cursor:n?"not-allowed":"pointer",fontSize:11,fontWeight:400,whiteSpace:"nowrap",transition:"color 0.12s",...a},onMouseEnter:e=>{n||(e.currentTarget.style.color=l)},onMouseLeave:e=>{n||(e.currentTarget.style.color=s)},children:d&&c&&Array.isArray(e)?e[0]:e})}function L({children:e,hovered:t,onHoverChange:n}){let i=b();return(0,r.jsx)(w,{hovered:t,onHoverChange:n,style:{marginBottom:i?12:16,display:"flex",flexDirection:"column",alignItems:"flex-end"},children:e})}function M({children:e}){let t=b();return(0,r.jsx)("div",{style:{display:"flex",alignItems:"flex-end",gap:t?4:6,maxWidth:t?"92%":"85%"},children:(0,r.jsx)("div",{style:{flex:1,minWidth:0,background:"var(--user-bg)",border:"1px solid rgba(59,130,246,0.2)",borderRadius:12,padding:t?"7px 10px":"8px 12px",fontSize:14,lineHeight:1.6,color:"var(--text)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e})})}function T({children:e,hasBody:t=!1}){let n=b();return(0,r.jsx)("div",{style:{display:"flex",gap:n?4:6,flexWrap:"wrap",marginBottom:t?n?6:8:0},children:e})}function $({children:e,hovered:t,onHoverChange:n}){let i=b();return(0,r.jsx)(w,{hovered:t,onHoverChange:n,style:{marginBottom:i?12:16},children:e})}function W({children:e}){let t=b();return(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:t?6:8},children:e})}function R({children:e,accent:t="default"}){let n="subagent"===t;return(0,r.jsx)("div",{"data-message-surface":"custom-card","data-message-accent":t,style:{padding:"8px 14px",borderRadius:8,border:`1px solid ${n?"rgba(99,102,241,0.25)":"var(--border)"}`,background:n?"rgba(99,102,241,0.05)":"var(--bg-panel)",fontSize:13,lineHeight:1.6,color:"var(--text-muted)"},children:e})}function E({icon:e,children:t}){return(0,r.jsxs)("div",{"data-message-surface":"custom-icon-row",style:{display:"flex",alignItems:"flex-start",gap:8},children:[(0,r.jsx)("span",{style:{flexShrink:0,fontSize:14},children:e}),(0,r.jsx)("div",{style:{flex:1,minWidth:0},children:t})]})}function z({text:e,title:t="Copy message",style:n}){let[o,a]=(0,i.useState)(!1),l=b();return(0,r.jsxs)("button",{onClick:()=>{(0,v.D)(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})},title:t,style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",height:22,background:"none",border:"none",borderRadius:5,color:o?"var(--accent)":"var(--text-dim)",cursor:"pointer",fontSize:11,fontWeight:400,whiteSpace:"nowrap",transition:"color 0.12s",...n},onMouseEnter:e=>{o||(e.currentTarget.style.color="var(--accent)")},onMouseLeave:e=>{o||(e.currentTarget.style.color="var(--text-dim)")},children:[o?(0,r.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})}):(0,r.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),(0,r.jsx)("span",{style:l?{display:"none"}:void 0,children:o?"Copied":"Copy"})]})}function I({provider:e,model:t,modelNames:n,isStreaming:i=!1,estimatedTokens:o=0,tps:a=null}){let l=e&&t?n?.[`${e}:${t}`]??n?.[t]??t:null;return(0,r.jsxs)("div",{style:{fontSize:11,color:"var(--text-dim)",marginBottom:4,display:"flex",alignItems:"center",gap:6},children:[l&&(0,r.jsx)("span",{children:l}),i&&o>0&&(0,r.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,color:"var(--text)"},title:"预估 token 数(流式接收中)",children:[(0,r.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:2,fontSize:11,fontWeight:400},children:[(0,r.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"5",y1:"1.5",x2:"5",y2:"8.5"}),(0,r.jsx)("polyline",{points:"2 6 5 8.5 8 6"})]}),o]}),null!==a&&(0,r.jsxs)("span",{style:{marginLeft:6,padding:"1px 6px",borderRadius:4,background:a>=50?"#53b3cb":a>=30?"#9bc53d":a>=15?"#f9c22e":"#e01a4f",color:"#fff",fontSize:11,fontWeight:400},children:[a.toFixed(1)," t/s"]})]})]})}var A=n(99670);function F({files:e,onOpenFile:t}){return 0===e.length?null:(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:5,margin:"4px 0 2px"},children:[(0,r.jsx)("span",{style:{fontSize:10,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:"0.06em"},children:"Files"}),e.map(e=>{let n=e.relativePath.split("/").pop()??e.relativePath;return(0,r.jsxs)("button",{type:"button",title:e.filePath,onClick:()=>t?.(e.filePath,n),style:{display:"inline-flex",alignItems:"center",gap:4,maxWidth:260,padding:"2px 7px",fontSize:10.5,color:"var(--text-muted)",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:999,cursor:t?"pointer":"default"},children:[(0,r.jsxs)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[(0,r.jsx)("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),(0,r.jsx)("polyline",{points:"14 2 14 8 20 8"})]}),(0,r.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono)"},children:e.relativePath})]},e.filePath)})]})}var H=n(31775);let O=new Set(["write","edit","multi_edit","str_replace_editor","create_file"]);function P(e){let t=0;for(let n of e){if("text"===n.type){t+=n.text.length;continue}if("thinking"===n.type){t+=n.thinking.length;continue}"toolCall"===n.type&&(t+=JSON.stringify(n.input??{}).length)}return t}let B=[],N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(e){return e.toString().padStart(2,"0")}function D(e){if(!e)return null;let t=new Date(e),n=new Date,r=t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate(),i=`${_(t.getHours())}:${_(t.getMinutes())}`;if(r)return i;let o=[`${N[t.getMonth()]} ${t.getDate()}`];t.getFullYear()!==n.getFullYear()&&o.push(String(t.getFullYear()));let a=o.join(", ");return`${a} ${i}`}function U({message:e,isStreaming:t,toolResults:n,modelNames:i,entryId:o,sessionId:a,onFork:l,forking:s,onNavigate:d,prevAssistantEntryId:c,onEditContent:u,onSendMessage:p,showTimestamp:h,prevTimestamp:g,renderVisualCodeBlocks:f,cwd:m,onOpenImage:x,activeFilePath:y,agentRunning:v,onApplyToFile:b,onRunCode:w,onOpenFileAtLine:j,onAcceptDiff:k,compactionShadowCount:S,onLoadShadowed:C,forkFresh:L}){return"user"===e.role?(0,r.jsx)(q,{message:e,entryId:o,onFork:l,forking:s,onNavigate:d,prevAssistantEntryId:c,onEditContent:u,onOpenImage:x,compactionShadowCount:S,onLoadShadowed:C}):"assistant"===e.role?(0,r.jsx)(G,{message:e,isStreaming:t,toolResults:n,modelNames:i,entryId:o,sessionId:a,onSendMessage:p,showTimestamp:h,prevTimestamp:g,renderVisualCodeBlocks:f,cwd:m,activeFilePath:y,agentRunning:v,onApplyToFile:b,onRunCode:w,onOpenFileAtLine:j,onAcceptDiff:k,forkFresh:L}):"bashExecution"===e.role?(0,r.jsx)(V,{message:e}):"toolResult"===e.role?null:"custom"===e.role?(0,r.jsx)(Z,{message:e,showTimestamp:h}):null}function q({message:e,entryId:t,onFork:n,forking:a,onNavigate:l,prevAssistantEntryId:s,onEditContent:d,onOpenImage:u,compactionShadowCount:p,onLoadShadowed:h}){let[g,f]=(0,i.useState)(!1),[m,x]=(0,i.useState)(null),[y,v]=(0,i.useState)(!1),b="string"==typeof e.content?e.content:e.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n"),w="string"==typeof e.content?[]:e.content.filter(e=>"image"===e.type),$=w.flatMap(e=>{let t=(0,c.h5)(e);return t?[{src:t}]:[]}),W=D(e.timestamp),R=!!t&&!!n,E=!!s&&!!l;return(0,r.jsxs)(L,{hovered:g,onHoverChange:f,children:[(0,r.jsxs)(M,{children:[w.length>0&&(0,r.jsx)(T,{hasBody:!!b,children:w.map((e,t)=>{let n=(0,c.h5)(e);if(!n)return null;let i=e.path&&n.startsWith("/api/files/");return(0,r.jsx)("a",{href:n,target:i||!u?"_blank":void 0,rel:i||!u?"noreferrer":void 0,title:"Open image",style:{display:"block",cursor:"zoom-in"},onClick:e=>{u&&(e.preventDefault(),u(n,void 0,$))},children:(0,r.jsx)("img",{src:n,alt:"",style:{maxWidth:240,maxHeight:240,borderRadius:6,objectFit:"contain",display:"block",border:"1px solid rgba(59,130,246,0.15)"}})},t)})}),b]}),null!=p&&p>0&&(0,r.jsx)("div",{style:{marginTop:4,textAlign:"left"},children:null===m?(0,r.jsx)("button",{onClick:()=>{y||null!==m||(v(!0),(t&&h?h(t):Promise.resolve([])).then(e=>x(e)).catch(()=>x([])).finally(()=>v(!1)))},disabled:y,style:{padding:"5px 12px",fontSize:12,color:"var(--accent)",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:6,cursor:y?"wait":"pointer"},children:y?"Loading…":`Show ${p} compacted message${1===p?"":"s"}`}):(0,r.jsxs)("div",{style:{border:"1px solid var(--border)",borderRadius:7,background:"var(--bg-panel)",padding:"8px 10px",maxHeight:360,overflowY:"auto"},children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[(0,r.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Compacted history"}),(0,r.jsx)("button",{onClick:()=>x(null),style:{padding:"2px 8px",fontSize:11,color:"var(--text-dim)",background:"transparent",border:"1px solid var(--border)",borderRadius:5,cursor:"pointer"},children:"Hide"})]}),0===m.length&&(0,r.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)"},children:"No earlier messages to show."}),m.map((e,t)=>{let n,i="string"==typeof(n=e.content)?n:Array.isArray(n)?n.filter(e=>!!e&&"object"==typeof e&&"text"===e.type&&"string"==typeof e.text).map(e=>e.text).join("\n"):"";if(!i.trim())return null;let a="user"===e.role?"User":"assistant"===e.role?"Assistant":"Tool";return(0,r.jsxs)("div",{style:{marginBottom:8,paddingBottom:8,borderBottom:t===m.length-1?"none":"1px solid var(--border)"},children:[(0,r.jsx)("div",{style:{fontSize:10,color:"var(--text-dim)",marginBottom:2},children:a}),(0,r.jsx)(o.T,{content:i,style:{fontSize:12.5}})]},t)})]})}),(0,r.jsxs)(j,{justify:"flex-end",style:{marginTop:3},children:[(0,r.jsx)(S,{visible:g,children:(0,r.jsx)(z,{text:b})}),(R||E)&&(0,r.jsxs)(S,{visible:g||!!a,children:[E&&(0,r.jsxs)(C,{iconOnlyOnMobile:!0,onClick:()=>{l(s),d?.(b)},title:"Edit from here — branches within this session",children:[(0,r.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("polyline",{points:"15 10 20 15 15 20"}),(0,r.jsx)("path",{d:"M4 4v7a4 4 0 0 0 4 4h12"})]}),"Edit from here"]}),R&&(0,r.jsxs)(C,{iconOnlyOnMobile:!0,onClick:()=>{n(t)},disabled:a,active:!!a,title:a?"Creating new session…":"New session — creates an independent copy from here",children:[(0,r.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),(0,r.jsx)("circle",{cx:"18",cy:"6",r:"3"}),(0,r.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,r.jsx)("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),a?"Creating…":"New session"]})]}),W&&(0,r.jsx)(k,{children:W})]})]})}function G({message:e,isStreaming:t,toolResults:n,modelNames:o,entryId:a,sessionId:l,onSendMessage:s,showTimestamp:d,prevTimestamp:c,renderVisualCodeBlocks:u,cwd:p,activeFilePath:g,agentRunning:f,onApplyToFile:m,onRunCode:x,onOpenFileAtLine:y,onAcceptDiff:v,forkFresh:b}){var w,L;let M,T=d?D(e.timestamp):null,R=e.content??B,[E,H]=(0,i.useState)(!1),N=(0,i.useRef)(null),_=(0,i.useRef)(new Map),U=(0,i.useRef)(R),[q,V]=(0,i.useState)(null),[Z,J]=(0,i.useState)(new Map);U.current=R;let Y=(0,i.useMemo)(()=>{if(!e.timestamp||!c)return;let t=Math.round((e.timestamp-c)/1e3);return t>0?t:void 0},[e.timestamp,c]),X=(0,i.useMemo)(()=>(function(e,t){let n=new Map;if(!e||!t)return n;for(let[r,i]of e){if(!i.timestamp)continue;let e=Math.round((i.timestamp-t)/1e3);e>0&&n.set(r,e)}return n})(n,e.timestamp),[n,e.timestamp]),K=(0,i.useMemo)(()=>(function(e,t,n,r={}){let i=[],o=[],a=[];for(let[l,s]of e.entries()){if("thinking"===s.type){o.push({content:s.thinking,duration:t.get(l)??n,...s.deferred?{deferred:!0,blockIndex:l,entryId:r.entryId,sessionId:r.sessionId??void 0}:{}});continue}if("toolCall"===s.type){i.push(s);continue}a.push(s)}return{tools:i,thinkingBlocks:o,visibleBlocks:a}})(R,Z,Y,{entryId:a,sessionId:l}),[R,Z,Y,a,l]),Q=(0,i.useMemo)(()=>(function(e,t,n){if(!e?.length)return[];let r=new Set,i=[];for(let o of e){if("toolCall"!==o.type||!O.has(o.toolName))continue;let e=t?.get(o.toolCallId);if(!e||e.isError)continue;let a=function(e){if(!e)return null;let t=e.file_path??e.path??e.filePath??e.target_file;return"string"==typeof t&&t.trim()?t:null}(o.input);if(!a)continue;let l=function(e,t){let n=e.trim().replace(/\\/g,"/");return n.startsWith("/")||/^[A-Za-z]:\//.test(n)||!t?n:`${t.replace(/\/+$/,"")}/${n.replace(/^\.\//,"")}`}(a,n);if(r.has(l))continue;r.add(l);let s=n?`${n.replace(/\/+$/,"")}/`:"",d=s&&l.startsWith(s)?l.slice(s.length):l;i.push({filePath:l,relativePath:d})}return i})(R,n,p),[R,n,p]),ee=(0,i.useMemo)(()=>R.filter(e=>"text"===e.type).map(e=>e.text).join("\n"),[R]),et=(0,i.useMemo)(()=>Math.round(P(R)/4),[R]);return(0,i.useEffect)(()=>{if(!t){let e=Date.now();J(t=>{let n=new Map(t);for(let[t,r]of _.current)n.has(t)||n.set(t,Math.round((e-r)/1e3));return n}),N.current=null,V(null);return}let e=setInterval(()=>{let e=U.current,t=Date.now();e.forEach((e,n)=>{_.current.has(n)||_.current.set(n,t)}),J(n=>{let r=!1,i=new Map(n);for(let n=0;n<e.length-1;n++)if(!i.has(n)&&_.current.has(n)){let e=_.current.get(n),o=_.current.get(n+1)??t;i.set(n,Math.round((o-e)/1e3)),r=!0}return r?i:n});let n=P(e);if(0===n)return;null===N.current&&(N.current=t);let r=(t-N.current)/1e3;r>.5&&V(n/4/r)},300);return()=>clearInterval(e)},[t]),(0,r.jsxs)($,{hovered:E,onHoverChange:H,children:[(0,r.jsx)(I,{provider:e.provider,model:e.model,modelNames:o,isStreaming:t,estimatedTokens:et,tps:q}),(0,r.jsxs)(W,{children:[!t&&"error"===e.stopReason&&e.errorMessage?.trim()&&(0,r.jsxs)("div",{role:"alert","data-message-surface":"assistant-error",style:{border:"1px solid rgba(248,113,113,0.35)",borderRadius:6,background:"rgba(248,113,113,0.07)",padding:"8px 10px",color:"#f87171",fontSize:12,lineHeight:1.5,overflowWrap:"anywhere"},children:[(0,r.jsx)("strong",{style:{display:"block",marginBottom:2,fontWeight:600},children:"Model response failed"}),e.errorMessage.trim(),(w=e.errorMessage,/unknown system error -122\b|\berrno\s*-?122\b|\bEDQUOT\b|disk quota exceeded/i.test(w)&&(0,r.jsxs)("div",{style:{marginTop:6,color:"var(--text-muted)"},children:["This is EDQUOT (disk quota exceeded, errno 122), not a missing file. Free space/quota in your home directory and retry. Useful checks: ",(0,r.jsx)("code",{children:"quota -s"}),", ",(0,r.jsx)("code",{children:"df -h ~"}),", ",(0,r.jsx)("code",{children:"df -i ~"}),", ",(0,r.jsx)("code",{children:"du -sh ~/.pi ~/.npm ~/.cache"}),"."]}))]}),(K.tools.length>0||K.thinkingBlocks.length>0)&&(0,r.jsx)(A.kD,{tools:K.tools,results:n,durations:X,thinkingBlocks:K.thinkingBlocks,isStreaming:t,cwd:p}),K.visibleBlocks.map((e,i)=>(0,r.jsx)(h,{block:e,toolResults:n,isStreaming:t,toolCallDurations:X,onSendMessage:s,renderVisualCodeBlocks:u,cwd:p,activeFilePath:g,agentRunning:f,onApplyToFile:m,onRunCode:x,onOpenFileAtLine:y,onAcceptDiff:v},i))]}),!t&&(0,r.jsx)(F,{files:Q,onOpenFile:y?(e,t)=>y(e,t):void 0}),(0,r.jsxs)(j,{style:{gap:8},children:[e.usage&&!t&&(0,r.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)"},children:(L=e.usage,M=[],L.input&&M.push(`${L.input.toLocaleString()} in`),L.output&&M.push(`${L.output.toLocaleString()} out`),L.cacheRead&&M.push(`${L.cacheRead.toLocaleString()} cache`),M.join(" \xb7 "))}),ee&&!t&&(0,r.jsx)(S,{visible:E,children:(0,r.jsx)(z,{text:ee})}),b?.show&&!t&&(0,r.jsxs)(r.Fragment,{children:[b.error&&(0,r.jsx)("span",{style:{fontSize:11,color:"#f87171"},children:b.error}),(0,r.jsxs)(C,{onClick:b.onFork,disabled:b.busy,title:"Fork 新会话 — 携带精简摘要,避免每次提问都等待模型 prefill 变慢",children:[(0,r.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),(0,r.jsx)("circle",{cx:"18",cy:"6",r:"3"}),(0,r.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,r.jsx)("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),b.busy?"Forking…":"Fork 新会话"]})]}),T&&(0,r.jsx)(k,{alignEnd:!0,children:T})]})]})}function V({message:e}){let t=D(e.timestamp),n=void 0!==e.exitCode&&0!==e.exitCode,i=e.cancelled?"cancelled":void 0!==e.exitCode?`exit ${e.exitCode}`:null;return(0,r.jsxs)("div",{style:{marginBottom:12},children:[(0,r.jsxs)("div",{style:{border:"1px solid var(--border)",borderRadius:8,overflow:"hidden",background:"var(--bg-panel)"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:7,padding:"6px 10px",borderBottom:"1px solid var(--border)",fontFamily:"var(--font-mono)",fontSize:12,lineHeight:1.45},children:[(0,r.jsx)("span",{style:{color:"var(--accent)",flexShrink:0},children:"$"}),(0,r.jsx)("span",{style:{flex:1,minWidth:0,whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--text)"},children:e.command}),e.excludeFromContext&&(0,r.jsx)("span",{title:"Output is not sent to the model on the next turn",style:{flexShrink:0,padding:"0 5px",fontSize:9.5,color:"var(--text-dim)",border:"1px solid var(--border)",borderRadius:3},children:"not in context"}),i&&(0,r.jsx)("span",{style:{flexShrink:0,fontSize:10.5,color:n?"#f87171":"var(--text-dim)"},children:i})]}),(0,r.jsx)(H.m,{text:e.output||"(no output)",maxHeight:360,collapsible:!0,background:"var(--bg)",textColor:n?"#f87171":"var(--text-muted)"}),e.truncated&&e.fullOutputPath&&(0,r.jsxs)("div",{style:{padding:"4px 10px",fontSize:10.5,color:"var(--text-dim)",borderTop:"1px solid var(--border)"},children:["Output truncated \xb7 ",e.fullOutputPath]})]}),t&&(0,r.jsx)(j,{justify:"flex-end",style:{marginTop:3},children:(0,r.jsx)(k,{children:t})})]})}function Z({message:e,showTimestamp:t}){if(!e.display)return null;let n=t?D(e.timestamp):null,i="string"==typeof e.content?e.content:e.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n"),a="subagent-notify"===e.customType,l="branch-summary"===e.customType,s=i.match(/^Background task (completed|failed|paused):\s*\*\*(.+?)\*\*/),d=s?"completed"===s[1]?"✅":"failed"===s[1]?"❌":"⏸":l?"⑂":a?"\uD83E\uDD16":"ℹ";return(0,r.jsxs)("div",{style:{marginBottom:12},children:[(0,r.jsx)(R,{accent:a?"subagent":"default",children:(0,r.jsx)(E,{icon:d,children:(0,r.jsx)("div",{"data-message-surface":"custom-body",children:(0,r.jsx)(o.T,{content:i,style:{fontSize:13}})})})}),(n||s)&&(0,r.jsxs)(j,{justify:"flex-end",style:{marginTop:3},children:[s&&(0,r.jsx)(k,{children:s[2]}),n&&(0,r.jsx)(k,{children:n})]})]})}},99947:(e,t,n)=>{n.d(t,{NG:()=>a,oG:()=>s,iO:()=>l,Mi:()=>d});var r=n(95155),i=n(12115);function o({children:e,totalLines:t,className:n,collapsedMaxHeight:a="15.5rem",expandedMaxHeight:l,overlayBackground:s="var(--bg)",footerBackground:d="var(--bg-panel)"}){let[c,u]=(0,i.useState)(!1);return t<=20?(0,r.jsx)(r.Fragment,{children:e}):(0,r.jsxs)("div",{className:n,children:[(0,r.jsxs)("div",{style:{position:"relative",...c?{maxHeight:l,overflowY:l?"auto":"visible",overflowX:"hidden"}:{maxHeight:a,overflow:"hidden"}},children:[e,!c&&(0,r.jsx)("div",{style:{position:"absolute",insetInline:0,bottom:0,height:"3.5rem",background:`linear-gradient(to top, ${s} 0%, transparent 100%)`,pointerEvents:"none"}})]}),(0,r.jsx)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":c,style:{display:"flex",alignItems:"center",gap:4,width:"100%",minHeight:28,padding:"4px 8px",justifyContent:"center",background:d,border:"none",borderTop:"1px solid var(--border)",color:"var(--text-dim)",cursor:"pointer",fontSize:11},children:c?"Collapse":`Show all ${t} lines`})]})}function a({children:e,className:t,style:n}){return(0,r.jsx)("div",{className:t,style:{borderRadius:6,overflow:"hidden",border:"1px solid var(--border)",...n},children:e})}function l({title:e,actions:t,style:n}){return(0,r.jsxs)("div",{style:{padding:"3px 10px",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontSize:11,color:"var(--text-dim)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:8,...n},children:[(0,r.jsx)("span",{children:e}),t?(0,r.jsx)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:t}):null]})}function s({children:e,totalLines:t,expandedMaxHeight:n,overlayBackground:i,footerBackground:a}){return(0,r.jsx)(o,{totalLines:t,expandedMaxHeight:n,overlayBackground:i,footerBackground:a,children:e})}function d({onClick:e,label:t,activeLabel:n,active:i=!1,title:o,ariaLabel:a}){return(0,r.jsx)("button",{type:"button",onClick:e,title:o,"aria-label":a,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontSize:11},children:i&&n?n:t})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21,64,186,222,394,552,976,1004,1097,1327,1541,1900,1921,1938,1960,2007,2053,2138,2234,2314,2469,2752,2835,2922,2929,2976,3230,3374,3502,3679,3785,3851,3955,4037,4368,4494,4813,4896,5177,5218,5221,5907,5987,6202,6442,6450,6709,6710,6780,6819,6849,6919,6988,7035,7067,7070,7253,7473,7483,7505,7758,7778,7812,7851,8167,8197,8658,8743,8933,9043,9156,9240,9579,9626,9742,9787,9968],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|