@hienlh/ppm 0.18.9 → 0.18.10

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.
Files changed (73) hide show
  1. package/.spike/group-protected-probe.ts +21 -0
  2. package/.spike/tunnel.err +22 -42
  3. package/.spike/w.err +26 -94
  4. package/CHANGELOG.md +12 -0
  5. package/assets/skills/ppm/SKILL.md +1 -1
  6. package/assets/skills/ppm/references/http-api.md +1 -1
  7. package/dist/web/assets/{ai-resource-editor-DFCuNe-P.js → ai-resource-editor-mdDKG-rw.js} +1 -1
  8. package/dist/web/assets/{chat-tab-flMPLoKb.js → chat-tab-C060A94y.js} +3 -3
  9. package/dist/web/assets/{code-editor-C2VQbXzw.js → code-editor-WELegzdp.js} +2 -2
  10. package/dist/web/assets/{conflict-editor-CdH_h0vD.js → conflict-editor-fRTU3f1o.js} +1 -1
  11. package/dist/web/assets/{csv-preview-CY_454vd.js → csv-preview-D1d0cxOJ.js} +1 -1
  12. package/dist/web/assets/{database-viewer-BCZOTrPT.js → database-viewer-DevnWTV4.js} +1 -1
  13. package/dist/web/assets/{diff-viewer-BwfMN-nW.js → diff-viewer-DGxVg1pD.js} +1 -1
  14. package/dist/web/assets/{docx-preview-D3Sdh_aT.js → docx-preview-Cx-zLwAw.js} +1 -1
  15. package/dist/web/assets/{explorer-body-BKOMM566.js → explorer-body-j_4hVc34.js} +1 -1
  16. package/dist/web/assets/{explorer-window-content-Bbzijk8t.js → explorer-window-content-DdrGwk3w.js} +1 -1
  17. package/dist/web/assets/{extension-webview-CuOQrHIS.js → extension-webview-BH_mWYMe.js} +1 -1
  18. package/dist/web/assets/format-bytes-BE_W3UBg.js +1 -0
  19. package/dist/web/assets/{git-log-panel-DcV7PhqW.js → git-log-panel-CfpXRJcP.js} +1 -1
  20. package/dist/web/assets/{glide-data-grid-Cehfgrzc.js → glide-data-grid-n4ox_uev.js} +1 -1
  21. package/dist/web/assets/{group-chat-tab-BVPYxjz-.js → group-chat-tab-dYuuknLN.js} +1 -1
  22. package/dist/web/assets/{image-preview-D-Ok10eZ.js → image-preview-Ss38ex8g.js} +1 -1
  23. package/dist/web/assets/index-BiTiXgBZ.css +2 -0
  24. package/dist/web/assets/{index-CerSxGdf.js → index-Ch8l9de-.js} +5 -5
  25. package/dist/web/assets/{keybindings-store-aIY40k2o.js → keybindings-store-CDfTjwZX.js} +1 -1
  26. package/dist/web/assets/{markdown-renderer-pVzBdkpl.js → markdown-renderer-B317vEys.js} +1 -1
  27. package/dist/web/assets/{markdown-renderer-I89kyQhe.js → markdown-renderer-CpRlpLHw.js} +1 -1
  28. package/dist/web/assets/{mobile-explorer-sheet-5Uj9ZMM9.js → mobile-explorer-sheet-D1Bv9UCT.js} +1 -1
  29. package/dist/web/assets/{notification-store-DJ-OtAG3.js → notification-store-KwTAZT8b.js} +1 -1
  30. package/dist/web/assets/overview-panel-BxDohIEa.js +1 -0
  31. package/dist/web/assets/{pdf-preview-Di5xHFyT.js → pdf-preview-dwRe54ht.js} +1 -1
  32. package/dist/web/assets/{postgres-viewer-CR6VpTrX.js → postgres-viewer-BWZLW7kI.js} +1 -1
  33. package/dist/web/assets/process-table-CI-fnVsy.js +1 -0
  34. package/dist/web/assets/resolve-theme-B9ABAH_3.js +1 -0
  35. package/dist/web/assets/{settings-tab-jbiQwozX.js → settings-tab-mPxrKkfm.js} +1 -1
  36. package/dist/web/assets/{sql-query-editor-BPYsJDsn.js → sql-query-editor-BwPjEaP9.js} +1 -1
  37. package/dist/web/assets/{sqlite-viewer-Bq9ZJA2y.js → sqlite-viewer-Cs-_D942.js} +1 -1
  38. package/dist/web/assets/{system-monitor-body-CKEYWyN9.js → system-monitor-body-CV7-0hZG.js} +2 -2
  39. package/dist/web/assets/{system-monitor-tab-WjhFFHyM.js → system-monitor-tab-Ce-8Axhh.js} +1 -1
  40. package/dist/web/assets/{system-monitor-window-content-CMiISeoC.js → system-monitor-window-content-CetwYOQy.js} +1 -1
  41. package/dist/web/assets/{team-member-sheet-oY5EkH53.js → team-member-sheet-CjgaQjsZ.js} +2 -2
  42. package/dist/web/assets/{team-member-window-content-yCBeI_5X.js → team-member-window-content-DNJiYWS7.js} +1 -1
  43. package/dist/web/assets/{terminal-tab-BxHtMR7h.js → terminal-tab-DF7521sT.js} +1 -1
  44. package/dist/web/assets/{tool-cards-BcGrk1zk.js → tool-cards-DCAXGDJI.js} +2 -2
  45. package/dist/web/assets/{use-monaco-theme-CGucu3fb.js → use-monaco-theme-DSCdlrjO.js} +1 -1
  46. package/dist/web/assets/{use-open-team-member-DdrRXj-M.js → use-open-team-member-H4k74HnV.js} +1 -1
  47. package/dist/web/assets/{use-websocket-C-Rxv8JN.js → use-websocket-iJfc7EbK.js} +1 -1
  48. package/dist/web/assets/{video-preview-DYAbbmd0.js → video-preview-B0ZWpX0F.js} +1 -1
  49. package/dist/web/index.html +3 -3
  50. package/dist/web/sw.js +1 -1
  51. package/package.json +1 -1
  52. package/src/web/components/system/build-kill-request.ts +28 -1
  53. package/src/web/components/system/chart-scale.ts +3 -3
  54. package/src/web/components/system/kill-confirm-dialog.tsx +44 -28
  55. package/src/web/components/system/metric-chart-canvas.tsx +1 -2
  56. package/src/web/components/system/process-columns-grid.ts +39 -29
  57. package/src/web/components/system/process-group-row.tsx +31 -8
  58. package/src/web/components/system/process-row.tsx +6 -7
  59. package/src/web/components/system/process-table-model.ts +4 -22
  60. package/src/web/components/system/process-table-toolbar.tsx +12 -43
  61. package/src/web/components/system/process-table.tsx +22 -63
  62. package/src/web/components/system/sortable-header.tsx +33 -8
  63. package/src/web/components/system/system-monitor-body.tsx +1 -1
  64. package/src/web/components/system/use-column-widths.ts +91 -0
  65. package/src/web/components/system/use-process-kill.ts +100 -0
  66. package/src/web/styles/globals.css +5 -3
  67. package/src/web/theme/builtin/aurora.ts +8 -5
  68. package/dist/web/assets/format-bytes-Dk7B73B7.js +0 -1
  69. package/dist/web/assets/index-DRA_OpWY.css +0 -2
  70. package/dist/web/assets/overview-panel-Cgi3UPY1.js +0 -1
  71. package/dist/web/assets/process-table-DL6shbzt.js +0 -1
  72. package/dist/web/assets/resolve-theme-IdhSR-gx.js +0 -1
  73. package/src/web/components/system/sparkline-canvas.tsx +0 -63
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-renderer-I89kyQhe.js","assets/vendor-mermaid-DrwG0NYt.js","assets/rolldown-runtime-FhOqtrmT.js","assets/vendor-ui-CaeeFO0B.js","assets/vendor-markdown-Ls5AcU91.js","assets/markdown-renderer-pVzBdkpl.js","assets/index-CerSxGdf.js","assets/button-BA_fJOtX.js","assets/utils-DoY4yTP-.js","assets/createLucideIcon-D8pyde1A.js","assets/eye-off-CUdzgmX8.js","assets/bot-CunPuEdW.js","assets/context-menu-Cq0u3SK9.js","assets/chevron-right-BLOtX8Vy.js","assets/circle-hjUGru6R.js","assets/clock-CvhF4DJP.js","assets/sparkles-Dqsf3hq6.js","assets/copy-DKn11Pye.js","assets/database-BH0urvbs.js","assets/download-zCATy4x4.js","assets/plus-BM-Ty0fp.js","assets/x-BcqfTY_7.js","assets/api-client-BSB14J4w.js","assets/react-I_EwPIZi.js","assets/mobile-bottom-sheet-BUOJgiaZ.js","assets/use-is-mobile-BXGVvczu.js","assets/api-settings-kQHV6pYZ.js","assets/project-store-B8BkHXy5.js","assets/panel-store-DCD82zc1.js","assets/settings-store-C20lqh0G.js","assets/tab-store-DAsvpx4t.js","assets/apply-theme-BH_d4amk.js","assets/resolve-theme-IdhSR-gx.js","assets/index-DRA_OpWY.css","assets/image-gallery-CGvlv8zR.js","assets/run-in-terminal-CyS5Itj-.js","assets/edit-diff-preview-gq6ALf2B.js","assets/libesm-CPh1Av0r.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{n as i,t as a}from"./circle-question-mark-CzR7YRc-.js";import{t as o}from"./bot-CunPuEdW.js";import{t as s}from"./chevron-right-BLOtX8Vy.js";import{t as c}from"./clock-CvhF4DJP.js";import{t as l}from"./code-DDPoqVri.js";import{n as u,t as d}from"./sparkles-Dqsf3hq6.js";import{q as f}from"./vendor-mermaid-DrwG0NYt.js";import{t as p}from"./utils-DoY4yTP-.js";import{t as m}from"./tab-store-DAsvpx4t.js";import{$n as h,Bn as g,Cr as _,Dr as v,En as y,It as b,Mn as x,Sr as S,en as ee,r as C,sr as w,vr as T,zn as E}from"./index-CerSxGdf.js";import{t as D}from"./use-blob-url-BKyVxOZw.js";import{r as O,t as k}from"./image-gallery-CGvlv8zR.js";var A=r(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),j=r(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),M=r(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),N=r(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),P=r(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),te=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),F=r(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),I=e(t(),1),L=n(),ne=(0,I.lazy)(()=>f(()=>import(`./markdown-renderer-I89kyQhe.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35])));function R({content:e,maxHeight:t=`max-h-48`}){return(0,L.jsx)(I.Suspense,{fallback:(0,L.jsx)(`div`,{className:`animate-pulse h-4 bg-muted rounded`}),children:(0,L.jsx)(ne,{content:e,className:`text-text-secondary overflow-auto ${t}`})})}var z={task_assignment:{label:`task`,className:`bg-primary/20 text-primary`},idle_notification:{label:`idle`,className:`bg-warning/20 text-warning`},completion:{label:`done`,className:`bg-success/20 text-success`},shutdown_request:{label:`shutdown`,className:`bg-error/20 text-error`},shutdown_approved:{label:`shutdown ✓`,className:`bg-text-3/20 text-text-3`},shutdown_response:{label:`shutdown reply`,className:`bg-text-3/20 text-text-3`},plan_approval_request:{label:`plan review`,className:`bg-primary/20 text-primary`},plan_approval_response:{label:`plan reply`,className:`bg-primary/20 text-primary`}},re=new Set([`to`,`message`,`summary`,`notify_when_idle`,`recipient`,`content`,`type`]),B=e=>typeof e==`string`?e:e==null?``:String(e);function V(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;return typeof t.type!=`string`||!t.type?null:{type:t.type,request_id:typeof t.request_id==`string`?t.request_id:void 0,approve:typeof t.approve==`boolean`?t.approve:void 0,reason:typeof t.reason==`string`?t.reason:void 0,feedback:typeof t.feedback==`string`?t.feedback:void 0}}function ie(e){let t=e.trim();if(!t.startsWith(`{`))return null;try{return V(JSON.parse(t))}catch{return null}}function H(e){let t=B(e.to)||B(e.recipient),n=e.message??e.content,r=V(n)??ie(B(n)),i=r?``:B(n),a=B(e.type),o=r?.type||(a&&a!==`message`?a:`message`),s=B(e.summary).trim(),c=Object.entries(e).filter(([e])=>!re.has(e)).map(([e,t])=>({key:e,value:typeof t==`string`?t:JSON.stringify(t)??``}));return{to:t,summary:s||void 0,text:i,firstLine:i.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-renderer-CpRlpLHw.js","assets/vendor-mermaid-DrwG0NYt.js","assets/rolldown-runtime-FhOqtrmT.js","assets/vendor-ui-CaeeFO0B.js","assets/vendor-markdown-Ls5AcU91.js","assets/markdown-renderer-B317vEys.js","assets/index-Ch8l9de-.js","assets/button-BA_fJOtX.js","assets/utils-DoY4yTP-.js","assets/createLucideIcon-D8pyde1A.js","assets/eye-off-CUdzgmX8.js","assets/bot-CunPuEdW.js","assets/context-menu-Cq0u3SK9.js","assets/chevron-right-BLOtX8Vy.js","assets/circle-hjUGru6R.js","assets/clock-CvhF4DJP.js","assets/sparkles-Dqsf3hq6.js","assets/copy-DKn11Pye.js","assets/database-BH0urvbs.js","assets/download-zCATy4x4.js","assets/plus-BM-Ty0fp.js","assets/x-BcqfTY_7.js","assets/api-client-BSB14J4w.js","assets/react-I_EwPIZi.js","assets/mobile-bottom-sheet-BUOJgiaZ.js","assets/use-is-mobile-BXGVvczu.js","assets/api-settings-kQHV6pYZ.js","assets/project-store-B8BkHXy5.js","assets/panel-store-DCD82zc1.js","assets/settings-store-C20lqh0G.js","assets/tab-store-DAsvpx4t.js","assets/apply-theme-BH_d4amk.js","assets/resolve-theme-B9ABAH_3.js","assets/index-BiTiXgBZ.css","assets/image-gallery-CGvlv8zR.js","assets/run-in-terminal-CyS5Itj-.js","assets/edit-diff-preview-gq6ALf2B.js","assets/libesm-CPh1Av0r.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{n as i,t as a}from"./circle-question-mark-CzR7YRc-.js";import{t as o}from"./bot-CunPuEdW.js";import{t as s}from"./chevron-right-BLOtX8Vy.js";import{t as c}from"./clock-CvhF4DJP.js";import{t as l}from"./code-DDPoqVri.js";import{n as u,t as d}from"./sparkles-Dqsf3hq6.js";import{q as f}from"./vendor-mermaid-DrwG0NYt.js";import{t as p}from"./utils-DoY4yTP-.js";import{t as m}from"./tab-store-DAsvpx4t.js";import{$n as h,Bn as g,Cr as _,Dr as v,En as y,It as b,Mn as x,Sr as S,en as ee,r as C,sr as w,vr as T,zn as E}from"./index-Ch8l9de-.js";import{t as D}from"./use-blob-url-BKyVxOZw.js";import{r as O,t as k}from"./image-gallery-CGvlv8zR.js";var A=r(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),j=r(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),M=r(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),N=r(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),P=r(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),te=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),F=r(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),I=e(t(),1),L=n(),ne=(0,I.lazy)(()=>f(()=>import(`./markdown-renderer-CpRlpLHw.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35])));function R({content:e,maxHeight:t=`max-h-48`}){return(0,L.jsx)(I.Suspense,{fallback:(0,L.jsx)(`div`,{className:`animate-pulse h-4 bg-muted rounded`}),children:(0,L.jsx)(ne,{content:e,className:`text-text-secondary overflow-auto ${t}`})})}var z={task_assignment:{label:`task`,className:`bg-primary/20 text-primary`},idle_notification:{label:`idle`,className:`bg-warning/20 text-warning`},completion:{label:`done`,className:`bg-success/20 text-success`},shutdown_request:{label:`shutdown`,className:`bg-error/20 text-error`},shutdown_approved:{label:`shutdown ✓`,className:`bg-text-3/20 text-text-3`},shutdown_response:{label:`shutdown reply`,className:`bg-text-3/20 text-text-3`},plan_approval_request:{label:`plan review`,className:`bg-primary/20 text-primary`},plan_approval_response:{label:`plan reply`,className:`bg-primary/20 text-primary`}},re=new Set([`to`,`message`,`summary`,`notify_when_idle`,`recipient`,`content`,`type`]),B=e=>typeof e==`string`?e:e==null?``:String(e);function V(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;return typeof t.type!=`string`||!t.type?null:{type:t.type,request_id:typeof t.request_id==`string`?t.request_id:void 0,approve:typeof t.approve==`boolean`?t.approve:void 0,reason:typeof t.reason==`string`?t.reason:void 0,feedback:typeof t.feedback==`string`?t.feedback:void 0}}function ie(e){let t=e.trim();if(!t.startsWith(`{`))return null;try{return V(JSON.parse(t))}catch{return null}}function H(e){let t=B(e.to)||B(e.recipient),n=e.message??e.content,r=V(n)??ie(B(n)),i=r?``:B(n),a=B(e.type),o=r?.type||(a&&a!==`message`?a:`message`),s=B(e.summary).trim(),c=Object.entries(e).filter(([e])=>!re.has(e)).map(([e,t])=>({key:e,value:typeof t==`string`?t:JSON.stringify(t)??``}));return{to:t,summary:s||void 0,text:i,firstLine:i.split(`
3
3
  `).map(e=>e.trim()).find(e=>e.length>0)??``,protocol:r??void 0,kind:o,notifyWhenIdle:e.notify_when_idle===!0,extras:c}}function U(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(Array.isArray(t)){let e=B(t.find(e=>e&&typeof e==`object`&&e.type===`text`)?.text);if(!e)return null;try{t=JSON.parse(e)}catch{return null}}if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;if(typeof n.success!=`boolean`)return null;let r=n.pin&&typeof n.pin==`object`?n.pin:null;return{ok:n.success,detail:B(n.message)||B(n.error)||void 0,peer:r&&B(r.name)||void 0,ref:r&&B(r.ref)||void 0}}function ae({kind:e}){if(e===`message`)return null;let t=z[e];return(0,L.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] ${t?.className??`bg-panel-2 text-text-3`}`,children:t?.label??e})}function oe({name:e,input:t}){let n=H(t),r=n.summary||n.firstLine||(n.protocol?n.kind:``),a=r.length>72?`${r.slice(0,72)}…`:r;return(0,L.jsxs)(L.Fragment,{children:[e,` `,(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[(0,L.jsx)(i,{className:`size-3 inline`}),` `,n.to||`unknown`,a?` · ${a}`:``]}),n.notifyWhenIdle&&(0,L.jsx)(c,{className:`size-3 inline ml-1 text-text-3`})]})}function se({input:e}){let t=H(e);return(0,L.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,L.jsx)(`span`,{className:`text-text-subtle`,children:`To`}),(0,L.jsx)(`span`,{className:`font-medium text-text-primary`,children:t.to||`unknown`}),(0,L.jsx)(ae,{kind:t.kind}),t.notifyWhenIdle&&(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] bg-panel-2 text-text-3`,children:[(0,L.jsx)(c,{className:`size-3`}),` notify when idle`]})]}),!!t.text&&(0,L.jsx)(R,{content:t.text,maxHeight:`max-h-40`}),t.protocol&&(0,L.jsxs)(`div`,{className:`space-y-0.5 text-text-secondary`,children:[t.protocol.approve!=null&&(0,L.jsxs)(`p`,{children:[t.protocol.approve?`Approved`:`Rejected`,t.protocol.request_id?(0,L.jsxs)(`span`,{className:`text-text-subtle font-mono`,children:[` · `,t.protocol.request_id]}):null]}),!!t.protocol.reason&&(0,L.jsx)(`p`,{className:`text-text-subtle`,children:t.protocol.reason}),!!t.protocol.feedback&&(0,L.jsx)(`p`,{className:`text-text-subtle`,children:t.protocol.feedback})]}),t.extras.length>0&&(0,L.jsx)(`div`,{className:`space-y-0.5`,children:t.extras.map(e=>(0,L.jsxs)(`p`,{className:`text-text-subtle`,children:[(0,L.jsx)(`span`,{className:`font-mono`,children:e.key}),`: `,e.value]},e.key))})]})}function ce({output:e}){let[t,n]=(0,I.useState)(!1),r=U(e);return r?(0,L.jsxs)(`div`,{className:`border-t border-border pt-1.5 space-y-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[r.ok?(0,L.jsx)(S,{className:`size-3 text-success shrink-0`}):(0,L.jsx)(A,{className:`size-3 text-error shrink-0`}),(0,L.jsx)(`span`,{className:r.ok?`text-success`:`text-error`,children:r.ok?`Delivered`:`Not delivered`}),!!r.detail&&(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[`· `,r.detail]}),!!r.ref&&(0,L.jsxs)(`span`,{className:`text-text-3 font-mono text-[10px]`,children:[`[`,r.ref,`]`]})]}),(0,L.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-1 text-[10px] text-text-subtle hover:text-text-secondary transition-colors`,children:[(0,L.jsx)(l,{className:`size-3`}),t?`Hide`:`Show`,` raw`]}),t&&(0,L.jsx)(`pre`,{className:`overflow-x-auto text-text-subtle font-mono max-h-40 whitespace-pre-wrap break-all text-[10px]`,children:e})]}):null}var le=new Set([`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.bmp`,`.avif`,`.ico`]);function ue(e){let t=e.lastIndexOf(`.`);return t===-1?!1:le.has(e.slice(t).toLowerCase())}var de=/^\[image(?: · [\d.]+(?:B|KB|MB))?\]$/;function fe(e){if(!e.startsWith(`[`))return!1;let t;try{t=JSON.parse(e)}catch{return!1}return Array.isArray(t)?t.some(e=>{let t=e;return t?.type===`text`&&typeof t.text==`string`&&de.test(t.text)}):!1}var pe=`Async agent launched successfully`;function me(e){return!!e&&e.includes(pe)}var he=`text-[var(--img-meta-label)] @max-[470px]:hidden`,ge=[`60%`,`45%`,`80%`];function _e({aspect:e,actions:t}){return(0,L.jsxs)(`div`,{className:`grid grid-cols-[132px_1fr] items-start gap-[14px] overflow-hidden rounded-lg border border-border bg-panel p-[14px] @max-[470px]:grid-cols-[64px_1fr] @max-[470px]:gap-[11px] @max-[470px]:p-[11px]`,children:[(0,L.jsx)(`div`,{className:`img-skeleton rounded-lg`,style:{aspectRatio:e}}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[9px]`,children:[(0,L.jsx)(`div`,{className:`img-skeleton h-[13px] w-2/5 rounded @max-[470px]:hidden`}),(0,L.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-[14px] gap-y-[4px] font-mono text-[11.5px] @max-[470px]:grid-cols-[1fr]`,children:[`dimensions`,`size`,`path`].map((e,t)=>(0,L.jsxs)(I.Fragment,{children:[(0,L.jsx)(`dt`,{className:he,children:e}),(0,L.jsx)(`dd`,{className:`flex items-center`,children:(0,L.jsx)(`span`,{className:`img-skeleton h-[11px] rounded`,style:{width:ge[t]}})})]},e))}),t]})]})}function ve({code:e,onRetry:t}){return(0,L.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border bg-panel px-2.5 py-2 font-mono text-[12px] text-text-2`,children:[(0,L.jsx)(_,{className:`size-3 shrink-0`}),(0,L.jsxs)(`span`,{className:`truncate`,children:[`preview unavailable`,e?` · ${e}`:``]}),(0,L.jsx)(`button`,{type:`button`,onClick:t,className:`ml-auto shrink-0 text-accent`,children:`retry`})]})}var ye=.62;function be(e,t){let n=e.w/e.h;if(n>2.4)return{variant:`band`,aspect:n,fit:`contain`};let r=Math.max(ye,n),i=t/r;return e.w<t&&e.h<i?{variant:`split`,aspect:r,fit:`native`}:{variant:`split`,aspect:r,fit:n<.62?`contain`:`cover`}}function xe(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}function Se(e,t){let n=`${e.w} × ${e.h} px`;return t===`native`?`${n} · shown 1:1`:n}var W=new Map;function Ce(e){return W.get(e)}function we(e,t){W.set(e,t)}var Te=4/5,G=`text-[var(--img-meta-label)] @max-[470px]:hidden`,K=`truncate text-text @max-[470px]:text-text-2`,q=`h-[30px] @max-[470px]:h-[36px] shrink-0 rounded-[7px] px-[9px] font-mono text-[11.5px] text-text-2 bg-[var(--img-ghost)] border border-[var(--img-ghost-border)] backdrop-blur-[6px] transition-colors can-hover:hover:bg-[var(--img-ghost-hover)] can-hover:hover:border-[var(--img-ghost-hover-border)] can-hover:hover:text-text`;function Ee({filePath:e,projectName:t}){let[n,r]=(0,I.useState)(0),{blobUrl:i,blob:a,error:o,errorCode:s}=D(e,t,void 0,n),[c,l]=(0,I.useState)(()=>Ce(e)),[u,d]=(0,I.useState)(!1),[f,h]=(0,I.useState)(!1),g=C(e=>e.open),{openTab:_}=m(b(e=>({openTab:e.openTab}))),v=p(e);(0,I.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>h(!1),1200);return()=>clearTimeout(e)},[f]);let y=t=>{let n={w:t.naturalWidth,h:t.naturalHeight};if(!n.w||!n.h)return d(!0);we(e,n),l(n)},x=()=>{d(!1),r(e=>e+1)};if(o||u)return(0,L.jsx)(`div`,{className:`border-t border-border pt-1.5`,children:(0,L.jsx)(ve,{code:u?void 0:s??void 0,onRetry:x})});let S=c?be(c,132):null,w=S?.aspect??Te,T=(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-[6px]`,children:[(0,L.jsxs)(`button`,{type:`button`,onClick:E,className:q,children:[(0,L.jsx)(`span`,{className:`@max-[470px]:hidden`,children:`open in editor`}),(0,L.jsx)(`span`,{className:`hidden @max-[470px]:inline`,children:`open`})]}),(0,L.jsx)(`button`,{type:`button`,onClick:A,className:q,children:f?`copied`:`copy path`}),(0,L.jsx)(`button`,{type:`button`,onClick:j,className:q,children:`full size`})]});function E(){t&&_({type:`editor`,title:v,metadata:{filePath:e,projectName:t},projectId:t,closable:!0})}function A(){ee(e).then(()=>h(!0))}function j(e){i&&g(i,v,O(e.currentTarget))}if(!i||!S||!c)return(0,L.jsxs)(`div`,{className:`@container border-t border-border pt-1.5`,children:[i&&(0,L.jsx)(`img`,{src:i,alt:``,className:`hidden`,onLoad:e=>y(e.currentTarget),onError:()=>d(!0)}),(0,L.jsx)(_e,{aspect:w,actions:T})]});let M=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{className:G,children:`dimensions`}),(0,L.jsx)(`dd`,{className:K,children:Se(c,S.fit)}),a&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{className:G,children:`size`}),(0,L.jsxs)(`dd`,{className:K,children:[xe(a.size),a.type?` · ${a.type}`:``]})]}),(0,L.jsx)(`dt`,{className:G,children:`path`}),(0,L.jsx)(`dd`,{dir:`rtl`,className:`${K} text-left`,children:e})]}),N=(0,L.jsx)(`img`,{src:i,alt:v,[k]:``,onLoad:e=>y(e.currentTarget),onError:()=>d(!0),className:S.fit===`cover`?`size-full object-cover`:S.fit===`contain`?`size-full object-contain`:`max-h-full max-w-full`});return(0,L.jsx)(`div`,{className:`@container border-t border-border pt-1.5`,children:(0,L.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg border border-border p-[14px] @max-[470px]:p-[11px]`,children:[(0,L.jsx)(`img`,{"aria-hidden":`true`,alt:``,src:i,className:`absolute inset-0 size-full object-cover`,style:{filter:`var(--img-backdrop)`,transform:`scale(1.3)`}}),(0,L.jsx)(`div`,{className:`absolute inset-0`,style:{background:`var(--img-veil)`}}),S.variant===`band`?(0,L.jsxs)(`div`,{className:`relative grid gap-[11px]`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:j,title:`Open ${v}`,className:`img-checkerboard w-full cursor-zoom-in overflow-hidden rounded-lg border border-[var(--img-plate-border)]`,style:{aspectRatio:S.aspect},children:N}),(0,L.jsx)(`dl`,{className:`grid grid-cols-[auto_auto_1fr] gap-x-[18px] font-mono text-[11.5px] [&_dt]:hidden`,children:M}),T]}):(0,L.jsxs)(`div`,{className:`relative grid grid-cols-[132px_1fr] items-start gap-[14px] @max-[470px]:grid-cols-[64px_1fr] @max-[470px]:gap-[11px]`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:j,title:`Open ${v}`,className:`cursor-zoom-in overflow-hidden rounded-lg border border-[var(--img-plate-border)] bg-[var(--img-plate)] shadow-[var(--img-plate-shadow)] ${S.fit===`cover`?``:`img-checkerboard flex items-center justify-center`}`,style:{aspectRatio:S.aspect},children:N}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[9px]`,children:[(0,L.jsx)(`p`,{className:`truncate text-[13px] font-semibold text-text @max-[470px]:hidden`,children:v}),(0,L.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-[14px] gap-y-[4px] font-mono text-[11.5px] @max-[470px]:grid-cols-[1fr]`,children:M}),T]})]})]})})}function J(e,t){if(e!==`Agent`&&e!==`Task`)return null;let n=t.name;return typeof n==`string`&&n.trim()?n.trim():null}function De(e,t,n=!1){if(t&&(e===`Bash`||e===`PowerShell`))return{Icon:x,cls:`bg-error/15 text-error`};if(n)return{Icon:y,cls:`bg-accent-2/15 text-accent-2`};switch(e){case`Read`:case`Glob`:case`LS`:return{Icon:P,cls:`bg-accent-wash text-primary`};case`Grep`:case`Search`:case`WebSearch`:case`ToolSearch`:return{Icon:g,cls:`bg-accent-wash text-primary`};case`WebFetch`:case`Fetch`:return{Icon:w,cls:`bg-info/15 text-info`};case`Edit`:case`MultiEdit`:case`NotebookEdit`:return{Icon:M,cls:`bg-accent-2/15 text-accent-2`};case`Write`:return{Icon:N,cls:`bg-success/15 text-success`};case`Bash`:case`PowerShell`:return{Icon:x,cls:`bg-panel-2 text-text-2`};case`TodoWrite`:return{Icon:te,cls:`bg-warning/15 text-warning`};case`Task`:case`Agent`:return{Icon:o,cls:`bg-accent-wash text-primary`};case`SendMessage`:return{Icon:E,cls:`bg-info/15 text-info`};case`AskUserQuestion`:return{Icon:a,cls:`bg-accent-wash text-primary`};case`ExitPlanMode`:return{Icon:j,cls:`bg-accent-wash text-primary`};case`Skill`:return{Icon:d,cls:`bg-accent-2/15 text-accent-2`};default:return{Icon:l,cls:`bg-panel-2 text-text-2`}}}function Oe(e){let t=e.type===`approval_request`;return{toolName:e.type===`tool_use`?e.tool:t?e.tool??`Tool`:`Tool`,input:e.type===`tool_use`?e.input:t?e.input??{}:{}}}function Y(e){if(e.type!==`tool_use`||e.tool!==`Read`)return null;let t=e.input?.file_path;return typeof t!=`string`||!/^(\/|[A-Za-z]:[/\\])/.test(t)?null:ue(t)?t:null}function X({tool:e,result:t,completed:n,projectName:r,bashPartialOutput:i}){let[a,o]=(0,I.useState)(()=>{let n=(e.type,e.tool),r=t?.type===`tool_result`&&!!t.isError;return(n===`Edit`||n===`MultiEdit`)&&!r?!0:!!Y(e)});if(e.type===`error`)return(0,L.jsxs)(`div`,{className:`flex items-center gap-2 rounded bg-error/10 border border-error/20 px-2 py-1.5 text-xs text-error`,children:[(0,L.jsx)(_,{className:`size-3`}),(0,L.jsx)(`span`,{children:e.message})]});let{toolName:c,input:l}=Oe(e),u=t?.type===`tool_result`,d=u&&!!t.isError,f=c===`AskUserQuestion`&&!!l?.answers,p=e.type===`approval_request`&&e.approved!=null,m=(c===`Agent`||c===`Task`)&&e.type===`tool_use`,g=m?e.children:void 0,y=g&&g.length>0,b=m&&e.type===`tool_use`?e.bgStatus:void 0,x=m&&(b!=null||u&&!d&&me(String(t.output??``)))&&b==null,ee=b===`failed`||b===`stopped`,C=x?!1:u||f||p||n,w=[`Edit`,`MultiEdit`,`Write`,`NotebookEdit`].includes(c),T=Y(e),E=u&&fe(String(t.output??``)),D=e.type===`tool_use`?e.toolUseId:void 0,O=(c===`Bash`||c===`PowerShell`)&&!u&&D?i?.current?.get(D):void 0,k=!!O;(0,I.useEffect)(()=>{k&&!a&&o(!0)},[k]);let j=(0,I.useRef)(!1);(0,I.useEffect)(()=>{d&&(c===`Edit`||c===`MultiEdit`)&&!j.current&&(j.current=!0,o(!1))},[d,c]);let{Icon:M,cls:N}=De(c,d,!!J(c,l)),P=c===`AskUserQuestion`||c===`ExitPlanMode`||m;return(0,L.jsxs)(`div`,{"data-tool-ref":D,className:`rounded-[11px] border overflow-hidden text-xs bg-panel ${P?`border-accent-wash-border`:`border-border`}`,children:[(0,L.jsxs)(`button`,{onClick:()=>o(!a),className:`flex items-center gap-2.5 px-2.5 py-2 w-full text-left hover:bg-panel-2/40 transition-colors min-w-0`,children:[(0,L.jsx)(`span`,{className:`inline-flex items-center justify-center size-6 rounded-[7px] shrink-0 ${N}`,children:(0,L.jsx)(M,{className:`size-3.5`})}),(0,L.jsx)(`span`,{className:`truncate text-text font-medium`,children:(0,L.jsx)(ke,{name:c,input:l})}),(0,L.jsxs)(`span`,{className:`ml-auto flex items-center gap-2 shrink-0`,children:[k&&(0,L.jsxs)(`span`,{className:`text-[10px] text-warning`,children:[O.lineCount,` line`,O.lineCount===1?``:`s`,` streaming…`]}),y&&!k&&(0,L.jsxs)(`span`,{className:`text-[10px] text-text-3 font-mono`,children:[g.length,` steps`]}),x&&(0,L.jsx)(`span`,{className:`text-[10px] text-primary`,children:`running…`}),d||ee?(0,L.jsx)(A,{className:`size-3.5 text-error`}):C?(0,L.jsx)(S,{className:`size-3.5 text-success`}):(0,L.jsx)(h,{className:`size-3.5 text-primary animate-spin`}),a?(0,L.jsx)(v,{className:`size-3 text-text-3`}):(0,L.jsx)(s,{className:`size-3 text-text-3`})]})]}),a&&(0,L.jsxs)(`div`,{className:`px-2 pb-2 space-y-1.5 select-text`,children:[(e.type===`tool_use`||e.type===`approval_request`)&&(0,L.jsx)(Ae,{name:c,input:l,projectName:r,toolUseId:D}),O&&(0,L.jsx)(Pe,{content:O.content,lineCount:O.lineCount}),y&&(0,L.jsx)(Q,{events:g,projectName:r}),T&&(0,L.jsx)(Ee,{filePath:T,projectName:r??``}),u&&!(w&&!d)&&!(E&&!d)&&(0,L.jsx)(Me,{toolName:c,output:t.output})]})]})}function ke({name:e,input:t}){let n=e=>String(e??``);switch(e){case`Read`:case`Write`:case`Edit`:case`MultiEdit`:case`NotebookEdit`:return(0,L.jsxs)(L.Fragment,{children:[e,` `,(0,L.jsx)(`span`,{className:`text-text-subtle`,children:p(n(t.file_path))})]});case`Bash`:case`PowerShell`:{let r=t.description?n(t.description):n(t.command);return(0,L.jsxs)(L.Fragment,{children:[e,` `,(0,L.jsx)(`span`,{className:`text-text-subtle${t.description?``:` font-mono`}`,children:$(r,60)})]})}case`Glob`:return(0,L.jsxs)(L.Fragment,{children:[e,` `,(0,L.jsx)(`span`,{className:`font-mono text-text-subtle`,children:n(t.pattern)})]});case`Grep`:return(0,L.jsxs)(L.Fragment,{children:[e,` `,(0,L.jsx)(`span`,{className:`font-mono text-text-subtle`,children:$(n(t.pattern),40)})]});case`WebSearch`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(g,{className:`size-3 inline`}),` `,e,` `,(0,L.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.query),50)})]});case`WebFetch`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w,{className:`size-3 inline`}),` `,e,` `,(0,L.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.url),50)})]});case`ToolSearch`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(g,{className:`size-3 inline`}),` `,e,` `,(0,L.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.query),50)})]});case`Agent`:case`Task`:{let r=J(e,t),i=$(n(t.description||t.prompt),r?44:60);return(0,L.jsxs)(L.Fragment,{children:[!r&&(0,L.jsx)(o,{className:`size-3 inline`}),` `,e,` `,r&&(0,L.jsx)(`span`,{className:`text-text-primary font-medium`,children:r}),(0,L.jsx)(`span`,{className:`text-text-subtle`,children:r?` · ${i}`:i})]})}case`SendMessage`:return(0,L.jsx)(oe,{name:e,input:t});case`TodoWrite`:{let n=Array.isArray(t.todos)?t.todos:[],r=n.filter(e=>e.status===`completed`).length;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`size-3 inline`}),` `,e,` `,(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[r,`/`,n.length,` done`]})]})}case`AskUserQuestion`:{let n=Array.isArray(t.questions)?t.questions:[],r=!!t.answers;return(0,L.jsxs)(L.Fragment,{children:[e,` `,(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[n.length,` question`,n.length===1?``:`s`,r?` ✓`:``]})]})}case`ScheduleWakeup`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(c,{className:`size-3 inline`}),` `,e,` `,(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[`in `,Re(Number(t.delaySeconds)),t.reason?` — ${$(n(t.reason),50)}`:``]})]});case`TaskCreate`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`size-3 inline`}),` `,e,` `,(0,L.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.subject),60)})]});case`TaskUpdate`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`size-3 inline`}),` `,e,` `,(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[`#`,n(t.taskId),` → `,n(t.status)]})]});case`TaskStop`:return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`size-3 inline`}),` `,e,` `,(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[`#`,n(t.taskId),` stopped`]})]});default:return(0,L.jsx)(L.Fragment,{children:e})}}function Ae({name:e,input:t,projectName:n,toolUseId:r}){let i=e=>String(e??``),{openTab:a}=m(b(e=>({openTab:e.openTab}))),o=e=>{n&&a({type:`editor`,title:p(e),metadata:{filePath:e,projectName:n},projectId:n,closable:!0})},s=(e,t,r)=>{a({type:`git-diff`,title:`Diff ${p(e)}`,metadata:{filePath:e,projectName:n,original:t,modified:r},projectId:n??null,closable:!0})};switch(e){case`Bash`:case`PowerShell`:return(0,L.jsxs)(`div`,{className:`space-y-1`,children:[!!t.description&&(0,L.jsx)(`p`,{className:`text-text-subtle italic`,children:i(t.description)}),(0,L.jsx)(`pre`,{className:`font-mono text-text-secondary overflow-x-auto whitespace-pre-wrap break-all`,children:i(t.command)})]});case`Read`:case`Write`:case`Edit`:case`MultiEdit`:case`NotebookEdit`:{let n=i(t.notebook_path||t.file_path),a=e===`Edit`&&(!!t.old_string||!!t.new_string),c=e=>r?`${r}-${e}`:void 0;return(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`font-mono text-text-secondary break-all hover:text-primary hover:underline text-left flex items-center gap-1 min-w-0`,onClick:()=>o(n),title:`Open file in editor`,children:[(0,L.jsx)(T,{className:`size-3 shrink-0`}),n]}),a&&(0,L.jsxs)(`button`,{type:`button`,className:`text-text-subtle hover:text-primary hover:underline flex items-center gap-1 shrink-0 whitespace-nowrap`,onClick:()=>s(n,i(t.old_string),i(t.new_string)),title:`View diff in new tab`,children:[(0,L.jsx)(u,{className:`size-3 shrink-0`}),`View Diff`]})]}),a&&(0,L.jsx)(`div`,{"data-edit-ref":c(0),children:(0,L.jsx)(Le,{oldStr:i(t.old_string),newStr:i(t.new_string),filePath:n})}),e===`MultiEdit`&&Array.isArray(t.edits)&&(0,L.jsx)(`div`,{className:`space-y-1.5`,children:t.edits.map((e,t)=>(0,L.jsxs)(`div`,{"data-edit-ref":c(t),className:`space-y-0.5`,children:[(0,L.jsxs)(`p`,{className:`text-text-subtle text-[10px]`,children:[`Edit `,t+1]}),(0,L.jsx)(Le,{oldStr:i(e.old_string),newStr:i(e.new_string),filePath:n})]},t))}),e===`Write`&&!!t.content&&(0,L.jsx)(`pre`,{"data-edit-ref":c(0),className:`font-mono text-text-subtle overflow-x-auto max-h-32 whitespace-pre-wrap`,children:$(i(t.content),300)})]})}case`Glob`:return(0,L.jsxs)(`p`,{className:`font-mono text-text-secondary`,children:[i(t.pattern),t.path?` in ${i(t.path)}`:``]});case`Grep`:return(0,L.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,L.jsxs)(`p`,{className:`font-mono text-text-secondary`,children:[`/`,i(t.pattern),`/`]}),!!t.path&&(0,L.jsxs)(`p`,{className:`text-text-subtle`,children:[`in `,i(t.path)]})]});case`TodoWrite`:return(0,L.jsx)(je,{todos:t.todos??[]});case`Agent`:case`Task`:{let n=J(e,t);return(0,L.jsxs)(`div`,{className:`space-y-1`,children:[!!n&&(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,L.jsx)(`span`,{className:`text-text-subtle`,children:`Name`}),(0,L.jsx)(`span`,{className:`font-medium text-text-primary`,children:n}),(0,L.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] bg-accent-2/15 text-accent-2`,children:`teammate`}),t.isolation===`worktree`&&(0,L.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] bg-panel-2 text-text-3`,children:`worktree`})]}),!!t.description&&(0,L.jsx)(`p`,{className:`text-text-secondary font-medium`,children:i(t.description)}),!!t.subagent_type&&(0,L.jsxs)(`p`,{className:`text-text-subtle`,children:[`Type: `,i(t.subagent_type)]}),!!t.prompt&&(0,L.jsx)(R,{content:i(t.prompt),maxHeight:`max-h-48`})]})}case`SendMessage`:return(0,L.jsx)(se,{input:t});case`ToolSearch`:return(0,L.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,L.jsx)(`p`,{className:`font-mono text-text-secondary`,children:i(t.query)}),!!t.max_results&&(0,L.jsxs)(`p`,{className:`text-text-subtle`,children:[`Max results: `,i(t.max_results)]})]});case`WebFetch`:return(0,L.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,L.jsxs)(`a`,{href:i(t.url),target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-primary hover:underline break-all flex items-center gap-1`,children:[(0,L.jsx)(w,{className:`size-3 shrink-0`}),i(t.url)]}),!!t.prompt&&(0,L.jsx)(`p`,{className:`text-text-subtle`,children:$(i(t.prompt),100)})]});case`AskUserQuestion`:{let e=t.questions??[],n=t.answers??{};return(0,L.jsx)(`div`,{className:`space-y-2`,children:e.map((e,t)=>(0,L.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,L.jsxs)(`p`,{className:`text-text-primary font-medium`,children:[e.header?`${e.header}: `:``,e.question]}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.options.map((t,r)=>(0,L.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-xs border ${(n[e.question]??``).split(`, `).includes(t.label)?`border-primary bg-primary/20 text-text-primary`:`border-border text-text-subtle`}`,children:t.label},r))}),n[e.question]&&(0,L.jsxs)(`p`,{className:`text-foreground text-xs`,children:[`Answer: `,n[e.question]]})]},t))})}case`ScheduleWakeup`:{let e=Number(t.delaySeconds)||0;return(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsxs)(`p`,{className:`text-text-secondary`,children:[(0,L.jsx)(c,{className:`size-3 inline mr-1`}),`Wake in `,(0,L.jsx)(`span`,{className:`font-medium text-text-primary`,children:Re(e)}),(0,L.jsxs)(`span`,{className:`text-text-subtle`,children:[` (`,e,`s)`]})]}),!!t.reason&&(0,L.jsx)(`p`,{className:`text-text-secondary italic`,children:i(t.reason)}),!!t.prompt&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-text-subtle text-[10px] mb-0.5`,children:`Prompt on wake`}),(0,L.jsx)(R,{content:i(t.prompt),maxHeight:`max-h-48`})]})]})}case`TaskCreate`:return(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`p`,{className:`text-text-primary font-medium`,children:i(t.subject)}),!!t.description&&(0,L.jsx)(`p`,{className:`text-text-subtle`,children:i(t.description)}),!!t.activeForm&&(0,L.jsx)(`p`,{className:`text-text-subtle italic`,children:i(t.activeForm)})]});case`TaskUpdate`:return(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsxs)(`span`,{className:`font-mono text-text-secondary`,children:[`#`,i(t.taskId)]}),(0,L.jsx)(Z,{status:i(t.status)})]});case`TaskStop`:return(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsxs)(`span`,{className:`font-mono text-text-secondary`,children:[`#`,i(t.taskId)]}),(0,L.jsx)(Z,{status:`stopped`})]});default:return(0,L.jsx)(`pre`,{className:`overflow-x-auto text-text-secondary font-mono whitespace-pre-wrap break-all`,children:JSON.stringify(t,null,2)})}}function Z({status:e}){return(0,L.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] border ${e===`completed`?`text-success border-success/30 bg-success/10`:e===`in_progress`?`text-warning border-warning/30 bg-warning/10`:`text-text-subtle border-border bg-surface`}`,children:e})}function je({todos:e}){return(0,L.jsx)(`div`,{className:`space-y-0.5`,children:e.map((e,t)=>(0,L.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,L.jsx)(`span`,{className:`shrink-0 mt-0.5 ${e.status===`completed`?`text-success`:e.status===`in_progress`?`text-warning`:`text-text-subtle`}`,children:e.status===`completed`?`✓`:e.status===`in_progress`?`▶`:`○`}),(0,L.jsx)(`span`,{className:e.status===`completed`?`line-through text-text-subtle`:`text-text-secondary`,children:e.content})]},t))})}function Me({toolName:e,output:t}){let[n,r]=(0,I.useState)(!1),i=(0,I.useMemo)(()=>{if(e!==`Agent`&&e!==`Task`)return null;try{let e=JSON.parse(t);if(Array.isArray(e)){let t=e.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(`
4
4
 
5
5
  `);if(t)return t}if(typeof e==`string`)return e}catch{if(t&&!t.startsWith(`[{`))return t}return null},[e,t]);return e===`SendMessage`&&U(t)?(0,L.jsx)(ce,{output:t}):i?(0,L.jsxs)(`div`,{className:`border-t border-border pt-1.5 space-y-1`,children:[(0,L.jsx)(R,{content:i,maxHeight:`max-h-60`}),(0,L.jsxs)(`button`,{type:`button`,onClick:()=>r(!n),className:`flex items-center gap-1 text-[10px] text-text-subtle hover:text-text-secondary transition-colors`,children:[(0,L.jsx)(l,{className:`size-3`}),n?`Hide`:`Show`,` raw`]}),n&&(0,L.jsx)(`pre`,{className:`overflow-x-auto text-text-subtle font-mono max-h-40 whitespace-pre-wrap break-all text-[10px]`,children:t})]}):(0,L.jsx)(Ne,{output:t})}function Ne({output:e}){let t=e.split(`
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{t as n}from"./settings-store-C20lqh0G.js";import{t as r}from"./resolve-theme-IdhSR-gx.js";import{r as i,t as a}from"./apply-theme-BH_d4amk.js";import{o}from"./index-CerSxGdf.js";var s=e(t(),1);function c(){let e=n(e=>e.themeStyle),t=n(e=>e.themeMode),c=n(e=>e.customThemeId),l=n(e=>e.customThemes),u=()=>o(i()??r(e,t,l,c)),[d,f]=(0,s.useState)(u);return(0,s.useEffect)(()=>{f(u());let e=()=>f(u());return window.addEventListener(a,e),()=>window.removeEventListener(a,e)},[e,t,c,l]),d}export{c as t};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{t as n}from"./settings-store-C20lqh0G.js";import{t as r}from"./resolve-theme-B9ABAH_3.js";import{r as i,t as a}from"./apply-theme-BH_d4amk.js";import{o}from"./index-Ch8l9de-.js";var s=e(t(),1);function c(){let e=n(e=>e.themeStyle),t=n(e=>e.themeMode),c=n(e=>e.customThemeId),l=n(e=>e.customThemes),u=()=>o(i()??r(e,t,l,c)),[d,f]=(0,s.useState)(u);return(0,s.useEffect)(()=>{f(u());let e=()=>f(u());return window.addEventListener(a,e),()=>window.removeEventListener(a,e)},[e,t,c,l]),d}export{c as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{t as n}from"./react-I_EwPIZi.js";import{n as r}from"./use-is-mobile-BXGVvczu.js";import{ot as i}from"./index-CerSxGdf.js";var a=e(t(),1),o=n(e=>({payload:null,open:t=>e({payload:t}),close:()=>e({payload:null})}));function s(){let e=r(),t=i(e=>e.open),n=o(e=>e.open);return(0,a.useCallback)(r=>{e?n(r):t(`team-member`,r)},[e,n,t])}export{o as n,s as t};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{t as n}from"./react-I_EwPIZi.js";import{n as r}from"./use-is-mobile-BXGVvczu.js";import{ot as i}from"./index-Ch8l9de-.js";var a=e(t(),1),o=n(e=>({payload:null,open:t=>e({payload:t}),close:()=>e({payload:null})}));function s(){let e=r(),t=i(e=>e.open),n=o(e=>e.open);return(0,a.useCallback)(r=>{e?n(r):t(`team-member`,r)},[e,n,t])}export{o as n,s as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{i as n}from"./index-CerSxGdf.js";var r=e(t(),1);function i({url:e,onMessage:t,autoConnect:i=!0}){let a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let r=new n(e);return a.current=r,t&&r.onMessage(t),i&&r.connect(),()=>{r.disconnect(),a.current=null}},[e,i]),{send:(0,r.useCallback)(e=>{a.current?.send(e)},[]),connect:(0,r.useCallback)(()=>{a.current?.connect()},[]),disconnect:(0,r.useCallback)(()=>{a.current?.disconnect()},[])}}export{i as t};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{i as n}from"./index-Ch8l9de-.js";var r=e(t(),1);function i({url:e,onMessage:t,autoConnect:i=!0}){let a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let r=new n(e);return a.current=r,t&&r.onMessage(t),i&&r.connect(),()=>{r.disconnect(),a.current=null}},[e,i]),{send:(0,r.useCallback)(e=>{a.current?.send(e)},[]),connect:(0,r.useCallback)(()=>{a.current?.connect()},[]),disconnect:(0,r.useCallback)(()=>{a.current?.disconnect()},[])}}export{i as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import"./vendor-ui-CaeeFO0B.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{t as i}from"./download-zCATy4x4.js";import{t as a}from"./file-exclamation-point-COAwgNGw.js";import"./api-client-BSB14J4w.js";import{t as o}from"./button-BA_fJOtX.js";import{$n as s,Bt as c,Hn as l,Ht as u,Ln as d,Lt as f,On as p,Rt as m,Ut as h,Vn as g,Vt as _,Wn as v,qt as y,zt as b}from"./index-CerSxGdf.js";import{a as ee,i as te,n as x,r as S,t as C}from"./media-url-CylYQld1.js";import{o as w}from"./can-open-in-ppm-omBzUBBq.js";var T=r(`flip-horizontal-2`,[[`path`,{d:`m3 7 5 5-5 5V7`,key:`couhi7`}],[`path`,{d:`m21 7-5 5 5 5V7`,key:`6ouia7`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 14v2`,key:`8jcxud`}],[`path`,{d:`M12 8v2`,key:`1woqiv`}],[`path`,{d:`M12 2v2`,key:`tus03m`}]]),E=r(`flip-vertical-2`,[[`path`,{d:`m17 3-5 5-5-5h10`,key:`1ftt6x`}],[`path`,{d:`m17 21-5-5-5 5h10`,key:`1m0wmu`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}]]),D=r(`maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),O=r(`minimize`,[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]),k=r(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),A=r(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),j=r(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),M=r(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),N=e(t(),1),P={rotation:0,flipH:!1,flipV:!1};function F(e){return{...e,rotation:(e.rotation+90)%360}}function I(e){return{...e,rotation:(e.rotation+270)%360}}function L(e){return e.rotation===0&&!e.flipH&&!e.flipV}function R(e){let t=[];return e.rotation&&t.push(`rotate(${e.rotation}deg)`),e.flipH&&t.push(`scaleX(-1)`),e.flipV&&t.push(`scaleY(-1)`),t.length?t.join(` `):`none`}function z(e,t){return e.rotation===90||e.rotation===270?{maxWidth:t.height,maxHeight:t.width}:{maxWidth:t.width,maxHeight:t.height}}var B=[[`Space / K`,`Play / pause`],[`← / →`,`Seek 5s`],[`J / L or Shift+← / →`,`Seek 10s`],[`↑ / ↓`,`Volume`],[`M`,`Mute`],[`F`,`Fullscreen`],[`< / >`,`Speed`],[`R / Shift+R`,`Rotate`]];function ne(e){return(0,N.useCallback)(t=>{let n=t.target;if(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable||t.ctrlKey||t.metaKey||t.altKey)return;let r=!0;switch(t.key){case` `:case`k`:case`K`:e.togglePlay();break;case`ArrowLeft`:e.seekBy(t.shiftKey?-10:-5);break;case`ArrowRight`:e.seekBy(t.shiftKey?10:5);break;case`j`:case`J`:e.seekBy(-10);break;case`l`:case`L`:e.seekBy(10);break;case`ArrowUp`:e.volumeBy(.1);break;case`ArrowDown`:e.volumeBy(-.1);break;case`m`:case`M`:e.toggleMute();break;case`f`:case`F`:e.toggleFullscreen();break;case`<`:case`,`:e.speedStep(-1);break;case`>`:case`.`:e.speedStep(1);break;case`r`:e.rotate(1);break;case`R`:e.rotate(-1);break;default:r=!1}r&&t.preventDefault()},[e])}var V=n(),H=[.25,.5,.75,1,1.25,1.5,2,3];function U({speed:e,onSpeed:t,transform:n,onRotate:r,onFlipH:i,onFlipV:a,onResetTransform:s}){return(0,V.jsxs)(f,{children:[(0,V.jsx)(y,{asChild:!0,children:(0,V.jsxs)(o,{variant:`ghost`,size:`icon`,className:`size-11 shrink-0 relative`,"aria-label":`Playback settings`,children:[(0,V.jsx)(d,{className:`size-5`}),e!==1&&(0,V.jsxs)(`span`,{className:`absolute -top-0.5 -right-0.5 text-[10px] leading-none px-1 rounded bg-primary text-primary-foreground tabular-nums`,children:[e,`x`]})]})}),(0,V.jsxs)(m,{align:`end`,className:`w-60 max-h-[70vh] overflow-y-auto`,children:[(0,V.jsx)(c,{children:`Speed`}),(0,V.jsx)(_,{value:String(e),onValueChange:e=>t(Number(e)),children:(0,V.jsx)(`div`,{className:`grid grid-cols-4 gap-1 px-1 pb-1`,children:H.map(e=>(0,V.jsxs)(u,{value:String(e),className:`justify-center pl-2 min-h-11 text-xs tabular-nums data-[state=checked]:bg-accent [&>span:first-child]:hidden`,children:[e,`x`]},e))})}),(0,V.jsx)(h,{}),(0,V.jsx)(c,{children:`Orientation`}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),r(1)},children:[(0,V.jsx)(g,{className:`size-4`}),` Rotate right `,(0,V.jsx)(`span`,{className:`ml-auto text-xs text-text-subtle`,children:`R`})]}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),r(-1)},children:[(0,V.jsx)(l,{className:`size-4`}),` Rotate left `,(0,V.jsx)(`span`,{className:`ml-auto text-xs text-text-subtle`,children:`⇧R`})]}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),i()},children:[(0,V.jsx)(T,{className:`size-4`}),` Flip horizontal `,n.flipH&&(0,V.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),a()},children:[(0,V.jsx)(E,{className:`size-4`}),` Flip vertical `,n.flipV&&(0,V.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),!L(n)&&(0,V.jsxs)(b,{className:`min-h-11`,onSelect:s,children:[(0,V.jsx)(p,{className:`size-4`}),` Reset orientation`]}),(0,V.jsx)(h,{}),(0,V.jsx)(c,{children:`Keyboard`}),(0,V.jsx)(`div`,{className:`px-2 pb-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs text-text-secondary`,children:B.map(([e,t])=>(0,V.jsxs)(`div`,{className:`contents`,children:[(0,V.jsx)(`kbd`,{className:`font-mono text-text-subtle whitespace-nowrap`,children:e}),(0,V.jsx)(`span`,{children:t})]},e))})]})]})}function re(e){let t=e.muted||e.volume===0?M:e.volume<.5?j:A,n=t=>e.onSeek(Number(t.target.value));return(0,V.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 bg-surface border-t border-border`,children:[(0,V.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-11 shrink-0`,onClick:e.onTogglePlay,"aria-label":e.playing?`Pause`:`Play`,children:e.playing?(0,V.jsx)(k,{className:`size-5`}):(0,V.jsx)(v,{className:`size-5`})}),(0,V.jsxs)(`span`,{className:`text-xs tabular-nums text-text-secondary shrink-0 min-w-[4.5rem] text-center`,children:[W(e.position),e.duration?` / ${W(e.duration)}`:``]}),e.duration?(0,V.jsx)(`input`,{type:`range`,min:0,max:e.duration,step:.1,value:Math.min(e.position,e.duration),"aria-label":`Seek`,className:`flex-1 h-11 accent-primary cursor-pointer min-w-0`,onChange:t=>e.onScrub(Number(t.target.value)),onPointerUp:n,onKeyUp:n,onTouchEnd:n}):(0,V.jsx)(`div`,{className:`flex-1`}),(0,V.jsxs)(`div`,{className:`flex items-center shrink-0`,children:[(0,V.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-11`,onClick:e.onToggleMute,"aria-label":e.muted?`Unmute`:`Mute`,children:(0,V.jsx)(t,{className:`size-5`})}),(0,V.jsx)(`input`,{type:`range`,min:0,max:1,step:.05,value:e.muted?0:e.volume,"aria-label":`Volume`,className:`hidden sm:block w-20 h-11 accent-primary cursor-pointer`,onChange:t=>e.onVolume(Number(t.target.value))})]}),(0,V.jsx)(U,{speed:e.speed,onSpeed:e.onSpeed,transform:e.transform,onRotate:e.onRotate,onFlipH:e.onFlipH,onFlipV:e.onFlipV,onResetTransform:e.onResetTransform}),(0,V.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-11 shrink-0`,onClick:e.onToggleFullscreen,"aria-label":e.fullscreen?`Exit fullscreen`:`Fullscreen`,children:e.fullscreen?(0,V.jsx)(O,{className:`size-5`}):(0,V.jsx)(D,{className:`size-5`})})]})}function W(e){let t=Math.max(0,Math.floor(Number.isFinite(e)?e:0)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=n?String(r).padStart(2,`0`):String(r);return`${n?`${n}:`:``}${a}:${String(i).padStart(2,`0`)}`}function G({filePath:e,projectName:t,mode:n,probeDuration:r=null,onNativeError:i}){let a=(0,N.useRef)(null),c=(0,N.useRef)(null),l=(0,N.useRef)(null),u=(0,N.useRef)(!0),[d]=(0,N.useState)(C),[f,p]=(0,N.useState)(0),[m,h]=(0,N.useState)(0),[g,_]=(0,N.useState)(null),[v,y]=(0,N.useState)(!1),[b,x]=(0,N.useState)(!0),[w,T]=(0,N.useState)(null),[E,D]=(0,N.useState)(1),[O,k]=(0,N.useState)(!1),[A,j]=(0,N.useState)(1),[M,L]=(0,N.useState)(P),[B,U]=(0,N.useState)(!1),[W,G]=(0,N.useState)({width:0,height:0}),[K,q]=(0,N.useState)(null),J=n===`transcode`,Y=J?ee(e,t,f,d):S(e,t),X=J?r:g,ie=w??(J?f+m:m);(0,N.useEffect)(()=>{h(0),x(!0),q(null)},[Y]),(0,N.useEffect)(()=>{p(0),_(null),L(P)},[e,n]),(0,N.useEffect)(()=>{let e=l.current;e&&(e.volume=E,e.muted=O)},[E,O]),(0,N.useEffect)(()=>{let e=l.current;e&&(e.playbackRate=A)},[A,Y]),(0,N.useEffect)(()=>{let n=l.current,r=()=>{J&&te(e,t,d)};return window.addEventListener(`pagehide`,r),()=>{window.removeEventListener(`pagehide`,r),n&&!n.isConnected&&(n.pause(),n.removeAttribute(`src`),n.load(),r())}},[e,t,J,d]),(0,N.useEffect)(()=>{let e=()=>U(document.fullscreenElement===a.current);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,N.useEffect)(()=>{let e=c.current;if(!e)return;let t=new ResizeObserver(()=>G({width:e.clientWidth,height:e.clientHeight}));return t.observe(e),()=>t.disconnect()},[]);let Z=(0,N.useCallback)(e=>{let t=l.current,n=Math.max(0,X?Math.min(e,X-.5):e);if(T(null),!J){t&&(t.currentTime=n);return}Math.abs(n-(f+(t?.currentTime??0)))<.5||p(n)},[X,J,f]),Q=(0,N.useMemo)(()=>({togglePlay:()=>{let e=l.current;e&&(u.current=e.paused,e.paused?e.play().catch(()=>{}):e.pause())},seekBy:e=>Z((J?f:0)+(l.current?.currentTime??0)+e),toggleFullscreen:()=>{document.fullscreenElement?document.exitFullscreen():a.current?.requestFullscreen?.()},toggleMute:()=>k(e=>!e),volumeBy:e=>{k(!1),D(t=>Math.min(1,Math.max(0,Math.round((t+e)*100)/100)))},speedStep:e=>j(t=>{let n=H.indexOf(t);return H[Math.min(H.length-1,Math.max(0,(n===-1?3:n)+e))]??1}),rotate:e=>L(t=>e===1?F(t):I(t))}),[Z,J,f]),ae=ne(Q),$=z(M,W),oe=()=>{q(null),p(e=>e+.001)};return(0,V.jsxs)(`div`,{ref:a,"data-testid":`video-player`,tabIndex:0,onKeyDown:ae,className:`flex flex-col h-full bg-black outline-none focus-visible:ring-1 focus-visible:ring-primary/60`,children:[(0,V.jsxs)(`div`,{ref:c,className:`relative flex-1 min-h-0 flex items-center justify-center overflow-hidden`,onClick:e=>{a.current?.focus(),e.detail===1&&Q.togglePlay()},onDoubleClick:Q.toggleFullscreen,children:[(0,V.jsx)(`video`,{ref:l,src:Y,autoPlay:!0,playsInline:!0,preload:J?`auto`:`metadata`,style:{transform:R(M),maxWidth:$.maxWidth||void 0,maxHeight:$.maxHeight||void 0},onLoadedMetadata:e=>{let t=e.currentTarget;t.playbackRate=A,t.volume=E,t.muted=O,!J&&Number.isFinite(t.duration)&&_(t.duration),J&&!u.current&&t.pause()},onPlay:()=>y(!0),onPause:()=>y(!1),onWaiting:()=>x(!0),onPlaying:()=>x(!1),onCanPlay:()=>x(!1),onTimeUpdate:e=>h(e.currentTarget.currentTime),onEnded:()=>{y(!1),u.current=!1},onError:()=>{J?q(`Transcoding failed. ffmpeg may have stopped or the file is corrupt.`):i?.()}}),b&&!K&&(0,V.jsx)(s,{className:`absolute size-8 animate-spin text-white/80 pointer-events-none`}),K&&(0,V.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 bg-black/85 text-text-secondary p-4 text-center`,onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:[(0,V.jsx)(`p`,{className:`text-sm`,children:K}),(0,V.jsx)(o,{variant:`outline`,size:`sm`,className:`h-11 px-4`,onClick:oe,children:`Retry`})]})]}),(0,V.jsx)(re,{playing:v,position:ie,duration:X,volume:E,muted:O,speed:A,transform:M,fullscreen:B,onTogglePlay:Q.togglePlay,onScrub:T,onSeek:Z,onVolume:e=>{D(e),k(e===0)},onToggleMute:Q.toggleMute,onSpeed:j,onRotate:Q.rotate,onFlipH:()=>L(e=>({...e,flipH:!e.flipH})),onFlipV:()=>L(e=>({...e,flipV:!e.flipV})),onResetTransform:()=>L(P),onToggleFullscreen:Q.toggleFullscreen})]})}var K=new Set([`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`mov`]);function q({filePath:e,projectName:t}){let n=w(e),[r,i]=(0,N.useState)(()=>K.has(n)?{kind:`native`}:{kind:`probing`});return(0,N.useEffect)(()=>{i(K.has(w(e))?{kind:`native`}:{kind:`probing`})},[e]),(0,N.useEffect)(()=>{if(r.kind!==`probing`)return;let n=!1;return x(e,t).then(e=>{n||i(e.transcodable?{kind:`transcode`,probe:e}:{kind:`unsupported`,probe:e})}).catch(()=>{n||i({kind:`unsupported`,probe:null})}),()=>{n=!0}},[r.kind,e,t]),r.kind===`probing`?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,V.jsx)(s,{className:`size-5 animate-spin text-text-subtle`})}):r.kind===`transcode`?(0,V.jsx)(G,{filePath:e,projectName:t,mode:`transcode`,probeDuration:r.probe.duration}):r.kind===`unsupported`?(0,V.jsx)(J,{filePath:e,projectName:t,probe:r.probe}):(0,V.jsx)(G,{filePath:e,projectName:t,mode:`native`,onNativeError:()=>i({kind:`probing`})})}function J({filePath:e,projectName:t,probe:n}){let r=[n?.video?.codec,n?.audio?.codec].filter(Boolean).join(` + `);return(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary p-6 text-center`,children:[(0,V.jsx)(a,{className:`size-10 text-text-subtle`}),(0,V.jsxs)(`p`,{className:`text-sm`,children:[`This video cannot be played in the browser`,r?` (${r})`:``,`.`]}),(0,V.jsxs)(`p`,{className:`text-xs text-text-subtle max-w-sm`,children:[`Install `,(0,V.jsx)(`code`,{children:`ffmpeg`}),` on the PPM server (e.g. `,(0,V.jsx)(`code`,{children:`winget install ffmpeg`}),`, `,(0,V.jsx)(`code`,{children:`brew install ffmpeg`}),`,`,` `,(0,V.jsx)(`code`,{children:`apt install ffmpeg`}),`) and restart PPM to transcode it on the fly.`]}),(0,V.jsx)(o,{asChild:!0,variant:`outline`,size:`sm`,className:`h-11 px-4`,children:(0,V.jsxs)(`a`,{href:`${S(e,t)}&download=true`,download:!0,children:[(0,V.jsx)(i,{className:`size-4 mr-2`}),` Download file`]})})]})}export{q as VideoPreview};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import"./vendor-ui-CaeeFO0B.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{t as i}from"./download-zCATy4x4.js";import{t as a}from"./file-exclamation-point-COAwgNGw.js";import"./api-client-BSB14J4w.js";import{t as o}from"./button-BA_fJOtX.js";import{$n as s,Bt as c,Hn as l,Ht as u,Ln as d,Lt as f,On as p,Rt as m,Ut as h,Vn as g,Vt as _,Wn as v,qt as y,zt as b}from"./index-Ch8l9de-.js";import{a as ee,i as te,n as x,r as S,t as C}from"./media-url-CylYQld1.js";import{o as w}from"./can-open-in-ppm-omBzUBBq.js";var T=r(`flip-horizontal-2`,[[`path`,{d:`m3 7 5 5-5 5V7`,key:`couhi7`}],[`path`,{d:`m21 7-5 5 5 5V7`,key:`6ouia7`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 14v2`,key:`8jcxud`}],[`path`,{d:`M12 8v2`,key:`1woqiv`}],[`path`,{d:`M12 2v2`,key:`tus03m`}]]),E=r(`flip-vertical-2`,[[`path`,{d:`m17 3-5 5-5-5h10`,key:`1ftt6x`}],[`path`,{d:`m17 21-5-5-5 5h10`,key:`1m0wmu`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}]]),D=r(`maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),O=r(`minimize`,[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]),k=r(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),A=r(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),j=r(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),M=r(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),N=e(t(),1),P={rotation:0,flipH:!1,flipV:!1};function F(e){return{...e,rotation:(e.rotation+90)%360}}function I(e){return{...e,rotation:(e.rotation+270)%360}}function L(e){return e.rotation===0&&!e.flipH&&!e.flipV}function R(e){let t=[];return e.rotation&&t.push(`rotate(${e.rotation}deg)`),e.flipH&&t.push(`scaleX(-1)`),e.flipV&&t.push(`scaleY(-1)`),t.length?t.join(` `):`none`}function z(e,t){return e.rotation===90||e.rotation===270?{maxWidth:t.height,maxHeight:t.width}:{maxWidth:t.width,maxHeight:t.height}}var B=[[`Space / K`,`Play / pause`],[`← / →`,`Seek 5s`],[`J / L or Shift+← / →`,`Seek 10s`],[`↑ / ↓`,`Volume`],[`M`,`Mute`],[`F`,`Fullscreen`],[`< / >`,`Speed`],[`R / Shift+R`,`Rotate`]];function ne(e){return(0,N.useCallback)(t=>{let n=t.target;if(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable||t.ctrlKey||t.metaKey||t.altKey)return;let r=!0;switch(t.key){case` `:case`k`:case`K`:e.togglePlay();break;case`ArrowLeft`:e.seekBy(t.shiftKey?-10:-5);break;case`ArrowRight`:e.seekBy(t.shiftKey?10:5);break;case`j`:case`J`:e.seekBy(-10);break;case`l`:case`L`:e.seekBy(10);break;case`ArrowUp`:e.volumeBy(.1);break;case`ArrowDown`:e.volumeBy(-.1);break;case`m`:case`M`:e.toggleMute();break;case`f`:case`F`:e.toggleFullscreen();break;case`<`:case`,`:e.speedStep(-1);break;case`>`:case`.`:e.speedStep(1);break;case`r`:e.rotate(1);break;case`R`:e.rotate(-1);break;default:r=!1}r&&t.preventDefault()},[e])}var V=n(),H=[.25,.5,.75,1,1.25,1.5,2,3];function U({speed:e,onSpeed:t,transform:n,onRotate:r,onFlipH:i,onFlipV:a,onResetTransform:s}){return(0,V.jsxs)(f,{children:[(0,V.jsx)(y,{asChild:!0,children:(0,V.jsxs)(o,{variant:`ghost`,size:`icon`,className:`size-11 shrink-0 relative`,"aria-label":`Playback settings`,children:[(0,V.jsx)(d,{className:`size-5`}),e!==1&&(0,V.jsxs)(`span`,{className:`absolute -top-0.5 -right-0.5 text-[10px] leading-none px-1 rounded bg-primary text-primary-foreground tabular-nums`,children:[e,`x`]})]})}),(0,V.jsxs)(m,{align:`end`,className:`w-60 max-h-[70vh] overflow-y-auto`,children:[(0,V.jsx)(c,{children:`Speed`}),(0,V.jsx)(_,{value:String(e),onValueChange:e=>t(Number(e)),children:(0,V.jsx)(`div`,{className:`grid grid-cols-4 gap-1 px-1 pb-1`,children:H.map(e=>(0,V.jsxs)(u,{value:String(e),className:`justify-center pl-2 min-h-11 text-xs tabular-nums data-[state=checked]:bg-accent [&>span:first-child]:hidden`,children:[e,`x`]},e))})}),(0,V.jsx)(h,{}),(0,V.jsx)(c,{children:`Orientation`}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),r(1)},children:[(0,V.jsx)(g,{className:`size-4`}),` Rotate right `,(0,V.jsx)(`span`,{className:`ml-auto text-xs text-text-subtle`,children:`R`})]}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),r(-1)},children:[(0,V.jsx)(l,{className:`size-4`}),` Rotate left `,(0,V.jsx)(`span`,{className:`ml-auto text-xs text-text-subtle`,children:`⇧R`})]}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),i()},children:[(0,V.jsx)(T,{className:`size-4`}),` Flip horizontal `,n.flipH&&(0,V.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,V.jsxs)(b,{className:`min-h-11`,onSelect:e=>{e.preventDefault(),a()},children:[(0,V.jsx)(E,{className:`size-4`}),` Flip vertical `,n.flipV&&(0,V.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),!L(n)&&(0,V.jsxs)(b,{className:`min-h-11`,onSelect:s,children:[(0,V.jsx)(p,{className:`size-4`}),` Reset orientation`]}),(0,V.jsx)(h,{}),(0,V.jsx)(c,{children:`Keyboard`}),(0,V.jsx)(`div`,{className:`px-2 pb-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs text-text-secondary`,children:B.map(([e,t])=>(0,V.jsxs)(`div`,{className:`contents`,children:[(0,V.jsx)(`kbd`,{className:`font-mono text-text-subtle whitespace-nowrap`,children:e}),(0,V.jsx)(`span`,{children:t})]},e))})]})]})}function re(e){let t=e.muted||e.volume===0?M:e.volume<.5?j:A,n=t=>e.onSeek(Number(t.target.value));return(0,V.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 bg-surface border-t border-border`,children:[(0,V.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-11 shrink-0`,onClick:e.onTogglePlay,"aria-label":e.playing?`Pause`:`Play`,children:e.playing?(0,V.jsx)(k,{className:`size-5`}):(0,V.jsx)(v,{className:`size-5`})}),(0,V.jsxs)(`span`,{className:`text-xs tabular-nums text-text-secondary shrink-0 min-w-[4.5rem] text-center`,children:[W(e.position),e.duration?` / ${W(e.duration)}`:``]}),e.duration?(0,V.jsx)(`input`,{type:`range`,min:0,max:e.duration,step:.1,value:Math.min(e.position,e.duration),"aria-label":`Seek`,className:`flex-1 h-11 accent-primary cursor-pointer min-w-0`,onChange:t=>e.onScrub(Number(t.target.value)),onPointerUp:n,onKeyUp:n,onTouchEnd:n}):(0,V.jsx)(`div`,{className:`flex-1`}),(0,V.jsxs)(`div`,{className:`flex items-center shrink-0`,children:[(0,V.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-11`,onClick:e.onToggleMute,"aria-label":e.muted?`Unmute`:`Mute`,children:(0,V.jsx)(t,{className:`size-5`})}),(0,V.jsx)(`input`,{type:`range`,min:0,max:1,step:.05,value:e.muted?0:e.volume,"aria-label":`Volume`,className:`hidden sm:block w-20 h-11 accent-primary cursor-pointer`,onChange:t=>e.onVolume(Number(t.target.value))})]}),(0,V.jsx)(U,{speed:e.speed,onSpeed:e.onSpeed,transform:e.transform,onRotate:e.onRotate,onFlipH:e.onFlipH,onFlipV:e.onFlipV,onResetTransform:e.onResetTransform}),(0,V.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-11 shrink-0`,onClick:e.onToggleFullscreen,"aria-label":e.fullscreen?`Exit fullscreen`:`Fullscreen`,children:e.fullscreen?(0,V.jsx)(O,{className:`size-5`}):(0,V.jsx)(D,{className:`size-5`})})]})}function W(e){let t=Math.max(0,Math.floor(Number.isFinite(e)?e:0)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=n?String(r).padStart(2,`0`):String(r);return`${n?`${n}:`:``}${a}:${String(i).padStart(2,`0`)}`}function G({filePath:e,projectName:t,mode:n,probeDuration:r=null,onNativeError:i}){let a=(0,N.useRef)(null),c=(0,N.useRef)(null),l=(0,N.useRef)(null),u=(0,N.useRef)(!0),[d]=(0,N.useState)(C),[f,p]=(0,N.useState)(0),[m,h]=(0,N.useState)(0),[g,_]=(0,N.useState)(null),[v,y]=(0,N.useState)(!1),[b,x]=(0,N.useState)(!0),[w,T]=(0,N.useState)(null),[E,D]=(0,N.useState)(1),[O,k]=(0,N.useState)(!1),[A,j]=(0,N.useState)(1),[M,L]=(0,N.useState)(P),[B,U]=(0,N.useState)(!1),[W,G]=(0,N.useState)({width:0,height:0}),[K,q]=(0,N.useState)(null),J=n===`transcode`,Y=J?ee(e,t,f,d):S(e,t),X=J?r:g,ie=w??(J?f+m:m);(0,N.useEffect)(()=>{h(0),x(!0),q(null)},[Y]),(0,N.useEffect)(()=>{p(0),_(null),L(P)},[e,n]),(0,N.useEffect)(()=>{let e=l.current;e&&(e.volume=E,e.muted=O)},[E,O]),(0,N.useEffect)(()=>{let e=l.current;e&&(e.playbackRate=A)},[A,Y]),(0,N.useEffect)(()=>{let n=l.current,r=()=>{J&&te(e,t,d)};return window.addEventListener(`pagehide`,r),()=>{window.removeEventListener(`pagehide`,r),n&&!n.isConnected&&(n.pause(),n.removeAttribute(`src`),n.load(),r())}},[e,t,J,d]),(0,N.useEffect)(()=>{let e=()=>U(document.fullscreenElement===a.current);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,N.useEffect)(()=>{let e=c.current;if(!e)return;let t=new ResizeObserver(()=>G({width:e.clientWidth,height:e.clientHeight}));return t.observe(e),()=>t.disconnect()},[]);let Z=(0,N.useCallback)(e=>{let t=l.current,n=Math.max(0,X?Math.min(e,X-.5):e);if(T(null),!J){t&&(t.currentTime=n);return}Math.abs(n-(f+(t?.currentTime??0)))<.5||p(n)},[X,J,f]),Q=(0,N.useMemo)(()=>({togglePlay:()=>{let e=l.current;e&&(u.current=e.paused,e.paused?e.play().catch(()=>{}):e.pause())},seekBy:e=>Z((J?f:0)+(l.current?.currentTime??0)+e),toggleFullscreen:()=>{document.fullscreenElement?document.exitFullscreen():a.current?.requestFullscreen?.()},toggleMute:()=>k(e=>!e),volumeBy:e=>{k(!1),D(t=>Math.min(1,Math.max(0,Math.round((t+e)*100)/100)))},speedStep:e=>j(t=>{let n=H.indexOf(t);return H[Math.min(H.length-1,Math.max(0,(n===-1?3:n)+e))]??1}),rotate:e=>L(t=>e===1?F(t):I(t))}),[Z,J,f]),ae=ne(Q),$=z(M,W),oe=()=>{q(null),p(e=>e+.001)};return(0,V.jsxs)(`div`,{ref:a,"data-testid":`video-player`,tabIndex:0,onKeyDown:ae,className:`flex flex-col h-full bg-black outline-none focus-visible:ring-1 focus-visible:ring-primary/60`,children:[(0,V.jsxs)(`div`,{ref:c,className:`relative flex-1 min-h-0 flex items-center justify-center overflow-hidden`,onClick:e=>{a.current?.focus(),e.detail===1&&Q.togglePlay()},onDoubleClick:Q.toggleFullscreen,children:[(0,V.jsx)(`video`,{ref:l,src:Y,autoPlay:!0,playsInline:!0,preload:J?`auto`:`metadata`,style:{transform:R(M),maxWidth:$.maxWidth||void 0,maxHeight:$.maxHeight||void 0},onLoadedMetadata:e=>{let t=e.currentTarget;t.playbackRate=A,t.volume=E,t.muted=O,!J&&Number.isFinite(t.duration)&&_(t.duration),J&&!u.current&&t.pause()},onPlay:()=>y(!0),onPause:()=>y(!1),onWaiting:()=>x(!0),onPlaying:()=>x(!1),onCanPlay:()=>x(!1),onTimeUpdate:e=>h(e.currentTarget.currentTime),onEnded:()=>{y(!1),u.current=!1},onError:()=>{J?q(`Transcoding failed. ffmpeg may have stopped or the file is corrupt.`):i?.()}}),b&&!K&&(0,V.jsx)(s,{className:`absolute size-8 animate-spin text-white/80 pointer-events-none`}),K&&(0,V.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 bg-black/85 text-text-secondary p-4 text-center`,onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:[(0,V.jsx)(`p`,{className:`text-sm`,children:K}),(0,V.jsx)(o,{variant:`outline`,size:`sm`,className:`h-11 px-4`,onClick:oe,children:`Retry`})]})]}),(0,V.jsx)(re,{playing:v,position:ie,duration:X,volume:E,muted:O,speed:A,transform:M,fullscreen:B,onTogglePlay:Q.togglePlay,onScrub:T,onSeek:Z,onVolume:e=>{D(e),k(e===0)},onToggleMute:Q.toggleMute,onSpeed:j,onRotate:Q.rotate,onFlipH:()=>L(e=>({...e,flipH:!e.flipH})),onFlipV:()=>L(e=>({...e,flipV:!e.flipV})),onResetTransform:()=>L(P),onToggleFullscreen:Q.toggleFullscreen})]})}var K=new Set([`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`mov`]);function q({filePath:e,projectName:t}){let n=w(e),[r,i]=(0,N.useState)(()=>K.has(n)?{kind:`native`}:{kind:`probing`});return(0,N.useEffect)(()=>{i(K.has(w(e))?{kind:`native`}:{kind:`probing`})},[e]),(0,N.useEffect)(()=>{if(r.kind!==`probing`)return;let n=!1;return x(e,t).then(e=>{n||i(e.transcodable?{kind:`transcode`,probe:e}:{kind:`unsupported`,probe:e})}).catch(()=>{n||i({kind:`unsupported`,probe:null})}),()=>{n=!0}},[r.kind,e,t]),r.kind===`probing`?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,V.jsx)(s,{className:`size-5 animate-spin text-text-subtle`})}):r.kind===`transcode`?(0,V.jsx)(G,{filePath:e,projectName:t,mode:`transcode`,probeDuration:r.probe.duration}):r.kind===`unsupported`?(0,V.jsx)(J,{filePath:e,projectName:t,probe:r.probe}):(0,V.jsx)(G,{filePath:e,projectName:t,mode:`native`,onNativeError:()=>i({kind:`probing`})})}function J({filePath:e,projectName:t,probe:n}){let r=[n?.video?.codec,n?.audio?.codec].filter(Boolean).join(` + `);return(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary p-6 text-center`,children:[(0,V.jsx)(a,{className:`size-10 text-text-subtle`}),(0,V.jsxs)(`p`,{className:`text-sm`,children:[`This video cannot be played in the browser`,r?` (${r})`:``,`.`]}),(0,V.jsxs)(`p`,{className:`text-xs text-text-subtle max-w-sm`,children:[`Install `,(0,V.jsx)(`code`,{children:`ffmpeg`}),` on the PPM server (e.g. `,(0,V.jsx)(`code`,{children:`winget install ffmpeg`}),`, `,(0,V.jsx)(`code`,{children:`brew install ffmpeg`}),`,`,` `,(0,V.jsx)(`code`,{children:`apt install ffmpeg`}),`) and restart PPM to transcode it on the fly.`]}),(0,V.jsx)(o,{asChild:!0,variant:`outline`,size:`sm`,className:`h-11 px-4`,children:(0,V.jsxs)(`a`,{href:`${S(e,t)}&download=true`,download:!0,children:[(0,V.jsx)(i,{className:`size-4 mr-2`}),` Download file`]})})]})}export{q as VideoPreview};
@@ -39,7 +39,7 @@
39
39
  <link rel="preconnect" href="https://fonts.googleapis.com" />
40
40
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
41
41
  <link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600;700&family=Geist:wght@400;500;600;700&display=swap" rel="stylesheet" />
42
- <script type="module" crossorigin src="/assets/index-CerSxGdf.js"></script>
42
+ <script type="module" crossorigin src="/assets/index-Ch8l9de-.js"></script>
43
43
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-FhOqtrmT.js">
44
44
  <link rel="modulepreload" crossorigin href="/assets/vendor-mermaid-DrwG0NYt.js">
45
45
  <link rel="modulepreload" crossorigin href="/assets/vendor-markdown-Ls5AcU91.js">
@@ -69,8 +69,8 @@
69
69
  <link rel="modulepreload" crossorigin href="/assets/settings-store-C20lqh0G.js">
70
70
  <link rel="modulepreload" crossorigin href="/assets/tab-store-DAsvpx4t.js">
71
71
  <link rel="modulepreload" crossorigin href="/assets/apply-theme-BH_d4amk.js">
72
- <link rel="modulepreload" crossorigin href="/assets/resolve-theme-IdhSR-gx.js">
73
- <link rel="stylesheet" crossorigin href="/assets/index-DRA_OpWY.css">
72
+ <link rel="modulepreload" crossorigin href="/assets/resolve-theme-B9ABAH_3.js">
73
+ <link rel="stylesheet" crossorigin href="/assets/index-BiTiXgBZ.css">
74
74
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
75
75
  <body class="text-text font-sans antialiased" style="background: var(--bg)">
76
76
  <!-- FOUC guard: apply the persisted theme mode before first paint.
package/dist/web/sw.js CHANGED
@@ -1 +1 @@
1
- try{self[`workbox:core:7.3.0`]&&_()}catch{}var e=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n},t=class extends Error{constructor(t,n){let r=e(t,n);super(r),this.name=t,this.details=n}},n={googleAnalytics:`googleAnalytics`,precache:`precache-v2`,prefix:`workbox`,runtime:`runtime`,suffix:typeof registration<`u`?registration.scope:``},r=e=>[n.prefix,e,n.suffix].filter(e=>e&&e.length>0).join(`-`),i=e=>{for(let t of Object.keys(n))e(t)},a={updateDetails:e=>{i(t=>{typeof e[t]==`string`&&(n[t]=e[t])})},getGoogleAnalyticsName:e=>e||r(n.googleAnalytics),getPrecacheName:e=>e||r(n.precache),getPrefix:()=>n.prefix,getRuntimeName:e=>e||r(n.runtime),getSuffix:()=>n.suffix};function o(e,t){let n=t();return e.waitUntil(n),n}try{self[`workbox:precaching:7.3.0`]&&_()}catch{}var s=`__WB_REVISION__`;function c(e){if(!e)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(typeof e==`string`){let t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}let{revision:n,url:r}=e;if(!r)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(!n){let e=new URL(r,location.href);return{cacheKey:e.href,url:e.href}}let i=new URL(r,location.href),a=new URL(r,location.href);return i.searchParams.set(s,n),{cacheKey:i.href,url:a.href}}var l=class{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type===`install`&&t&&t.originalRequest&&t.originalRequest instanceof Request){let e=t.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}},u=class{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{let n=t?.cacheKey||this._precacheController.getCacheKeyForURL(e.url);return n?new Request(n,{headers:e.headers}):e},this._precacheController=e}},d;function f(){if(d===void 0){let e=new Response(``);if(`body`in e)try{new Response(e.body),d=!0}catch{d=!1}d=!1}return d}async function p(e,n){let r=null;if(e.url&&(r=new URL(e.url).origin),r!==self.location.origin)throw new t(`cross-origin-copy-response`,{origin:r});let i=e.clone(),a={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=n?n(a):a,s=f()?i.body:await i.blob();return new Response(s,o)}var m=e=>new URL(String(e),location.href).href.replace(RegExp(`^${location.origin}`),``);function h(e,t){let n=new URL(e);for(let e of t)n.searchParams.delete(e);return n.href}async function g(e,t,n,r){let i=h(t.url,n);if(t.url===i)return e.match(t,r);let a=Object.assign(Object.assign({},r),{ignoreSearch:!0}),o=await e.keys(t,a);for(let t of o)if(i===h(t.url,n))return e.match(t,r)}var v=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},y=new Set;async function b(){for(let e of y)await e()}function x(e){return new Promise(t=>setTimeout(t,e))}try{self[`workbox:strategies:7.3.0`]&&_()}catch{}function S(e){return typeof e==`string`?new Request(e):e}var C=class{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new v,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(let e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:n}=this,r=S(e);if(r.mode===`navigate`&&n instanceof FetchEvent&&n.preloadResponse){let e=await n.preloadResponse;if(e)return e}let i=this.hasCallback(`fetchDidFail`)?r.clone():null;try{for(let e of this.iterateCallbacks(`requestWillFetch`))r=await e({request:r.clone(),event:n})}catch(e){if(e instanceof Error)throw new t(`plugin-error-request-will-fetch`,{thrownErrorMessage:e.message})}let a=r.clone();try{let e;e=await fetch(r,r.mode===`navigate`?void 0:this._strategy.fetchOptions);for(let t of this.iterateCallbacks(`fetchDidSucceed`))e=await t({event:n,request:a,response:e});return e}catch(e){throw i&&await this.runCallbacks(`fetchDidFail`,{error:e,event:n,originalRequest:i.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){let t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){let t=S(e),n,{cacheName:r,matchOptions:i}=this._strategy,a=await this.getCacheKey(t,`read`),o=Object.assign(Object.assign({},i),{cacheName:r});n=await caches.match(a,o);for(let e of this.iterateCallbacks(`cachedResponseWillBeUsed`))n=await e({cacheName:r,matchOptions:i,cachedResponse:n,request:a,event:this.event})||void 0;return n}async cachePut(e,n){let r=S(e);await x(0);let i=await this.getCacheKey(r,`write`);if(!n)throw new t(`cache-put-with-no-response`,{url:m(i.url)});let a=await this._ensureResponseSafeToCache(n);if(!a)return!1;let{cacheName:o,matchOptions:s}=this._strategy,c=await self.caches.open(o),l=this.hasCallback(`cacheDidUpdate`),u=l?await g(c,i.clone(),[`__WB_REVISION__`],s):null;try{await c.put(i,l?a.clone():a)}catch(e){if(e instanceof Error)throw e.name===`QuotaExceededError`&&await b(),e}for(let e of this.iterateCallbacks(`cacheDidUpdate`))await e({cacheName:o,oldResponse:u,newResponse:a.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){let n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(let e of this.iterateCallbacks(`cacheKeyWillBeUsed`))r=S(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if(typeof t[e]==`function`){let n=this._pluginStateMap.get(t);yield r=>{let i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){let e=this._extendLifetimePromises.splice(0),t=(await Promise.allSettled(e)).find(e=>e.status===`rejected`);if(t)throw t.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(let e of this.iterateCallbacks(`cacheWillUpdate`))if(t=await e({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}},w=class{constructor(e={}){this.cacheName=a.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,n=typeof e.request==`string`?new Request(e.request):e.request,r=`params`in e?e.params:void 0,i=new C(this,{event:t,request:n,params:r}),a=this._getResponse(i,n,t);return[a,this._awaitComplete(a,i,n,t)]}async _getResponse(e,n,r){await e.runCallbacks(`handlerWillStart`,{event:r,request:n});let i;try{if(i=await this._handle(n,e),!i||i.type===`error`)throw new t(`no-response`,{url:n.url})}catch(t){if(t instanceof Error){for(let a of e.iterateCallbacks(`handlerDidError`))if(i=await a({error:t,event:r,request:n}),i)break}if(!i)throw t}for(let t of e.iterateCallbacks(`handlerWillRespond`))i=await t({event:r,request:n,response:i});return i}async _awaitComplete(e,t,n,r){let i,a;try{i=await e}catch{}try{await t.runCallbacks(`handlerDidRespond`,{event:r,request:n,response:i}),await t.doneWaiting()}catch(e){e instanceof Error&&(a=e)}if(await t.runCallbacks(`handlerDidComplete`,{event:r,request:n,response:i,error:a}),t.destroy(),a)throw a}},T=class e extends w{constructor(t={}){t.cacheName=a.getPrecacheName(t.cacheName),super(t),this._fallbackToNetwork=t.fallbackToNetwork!==!1,this.plugins.push(e.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){return await t.cacheMatch(e)||(t.event&&t.event.type===`install`?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,n){let r,i=n.params||{};if(this._fallbackToNetwork){let t=i.integrity,a=e.integrity,o=!a||a===t;r=await n.fetch(new Request(e,{integrity:e.mode===`no-cors`?void 0:a||t})),t&&o&&e.mode!==`no-cors`&&(this._useDefaultCacheabilityPluginIfNeeded(),await n.cachePut(e,r.clone()))}else throw new t(`missing-precache-entry`,{cacheName:this.cacheName,url:e.url});return r}async _handleInstall(e,n){this._useDefaultCacheabilityPluginIfNeeded();let r=await n.fetch(e);if(!await n.cachePut(e,r.clone()))throw new t(`bad-precaching-response`,{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let t=null,n=0;for(let[r,i]of this.plugins.entries())i!==e.copyRedirectedCacheableResponsesPlugin&&(i===e.defaultPrecacheCacheabilityPlugin&&(t=r),i.cacheWillUpdate&&n++);n===0?this.plugins.push(e.defaultPrecacheCacheabilityPlugin):n>1&&t!==null&&this.plugins.splice(t,1)}};T.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:e}){return!e||e.status>=400?null:e}},T.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:e}){return e.redirected?await p(e):e}};var E=class{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new T({cacheName:a.getPrecacheName(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||=(self.addEventListener(`install`,this.install),self.addEventListener(`activate`,this.activate),!0)}addToCacheList(e){let n=[];for(let r of e){typeof r==`string`?n.push(r):r&&r.revision===void 0&&n.push(r.url);let{cacheKey:e,url:i}=c(r),a=typeof r!=`string`&&r.revision?`reload`:`default`;if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==e)throw new t(`add-to-cache-list-conflicting-entries`,{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:e});if(typeof r!=`string`&&r.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==r.integrity)throw new t(`add-to-cache-list-conflicting-integrities`,{url:i});this._cacheKeysToIntegrities.set(e,r.integrity)}if(this._urlsToCacheKeys.set(i,e),this._urlsToCacheModes.set(i,a),n.length>0){let e=`Workbox is precaching URLs without revision info: ${n.join(`, `)}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return o(e,async()=>{let t=new l;this.strategy.plugins.push(t);for(let[t,n]of this._urlsToCacheKeys){let r=this._cacheKeysToIntegrities.get(n),i=this._urlsToCacheModes.get(t),a=new Request(t,{integrity:r,cache:i,credentials:`same-origin`});await Promise.all(this.strategy.handleAll({params:{cacheKey:n},request:a,event:e}))}let{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return o(e,async()=>{let e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),n=new Set(this._urlsToCacheKeys.values()),r=[];for(let i of t)n.has(i.url)||(await e.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){let n=this.getCacheKeyForURL(e);if(!n)throw new t(`non-precached-url`,{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:n},t.params),this.strategy.handle(t))}},D,O=()=>(D||=new E,D);try{self[`workbox:routing:7.3.0`]&&_()}catch{}var k=e=>e&&typeof e==`object`?e:{handle:e},A=class{constructor(e,t,n=`GET`){this.handler=k(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=k(e)}},j=class extends A{constructor(e,t,n){super(({url:t})=>{let n=e.exec(t.href);if(n&&!(t.origin!==location.origin&&n.index!==0))return n.slice(1)},t,n)}},M=class{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener(`fetch`,(e=>{let{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener(`message`,(e=>{if(e.data&&e.data.type===`CACHE_URLS`){let{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(t=>{typeof t==`string`&&(t=[t]);let n=new Request(...t);return this.handleRequest({request:n,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){let n=new URL(e.url,location.href);if(!n.protocol.startsWith(`http`))return;let r=n.origin===location.origin,{params:i,route:a}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n}),o=a&&a.handler,s=e.method;if(!o&&this._defaultHandlerMap.has(s)&&(o=this._defaultHandlerMap.get(s)),!o)return;let c;try{c=o.handle({url:n,request:e,event:t,params:i})}catch(e){c=Promise.reject(e)}let l=a&&a.catchHandler;return c instanceof Promise&&(this._catchHandler||l)&&(c=c.catch(async r=>{if(l)try{return await l.handle({url:n,request:e,event:t,params:i})}catch(e){e instanceof Error&&(r=e)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw r})),c}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){let i=this._routes.get(n.method)||[];for(let a of i){let i,o=a.match({url:e,sameOrigin:t,request:n,event:r});if(o)return i=o,(Array.isArray(i)&&i.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o==`boolean`)&&(i=void 0),{route:a,params:i}}return{}}setDefaultHandler(e,t=`GET`){this._defaultHandlerMap.set(t,k(e))}setCatchHandler(e){this._catchHandler=k(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t(`unregister-route-but-not-found-with-method`,{method:e.method});let n=this._routes.get(e.method).indexOf(e);if(n>-1)this._routes.get(e.method).splice(n,1);else throw new t(`unregister-route-route-not-registered`)}},N,P=()=>(N||(N=new M,N.addFetchListener(),N.addCacheListener()),N);function F(e,n,r){let i;if(typeof e==`string`){let t=new URL(e,location.href);i=new A(({url:e})=>e.href===t.href,n,r)}else if(e instanceof RegExp)i=new j(e,n,r);else if(typeof e==`function`)i=new A(e,n,r);else if(e instanceof A)i=e;else throw new t(`unsupported-route-type`,{moduleName:`workbox-routing`,funcName:`registerRoute`,paramName:`capture`});return P().registerRoute(i),i}function I(e,t=[]){for(let n of[...e.searchParams.keys()])t.some(e=>e.test(n))&&e.searchParams.delete(n);return e}function*L(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:n=`index.html`,cleanURLs:r=!0,urlManipulation:i}={}){let a=new URL(e,location.href);a.hash=``,yield a.href;let o=I(a,t);if(yield o.href,n&&o.pathname.endsWith(`/`)){let e=new URL(o.href);e.pathname+=n,yield e.href}if(r){let e=new URL(o.href);e.pathname+=`.html`,yield e.href}if(i){let e=i({url:a});for(let t of e)yield t.href}}var R=class extends A{constructor(e,t){super(({request:n})=>{let r=e.getURLsToCacheKeys();for(let i of L(n.url,t)){let t=r.get(i);if(t)return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}},e.strategy)}};function z(e){F(new R(O(),e))}function B(e){O().precache(e)}function V(e,t){B(e),z(t)}V([{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},{"revision":"05b1ca9f034f6ab93b1408db818a62a7","url":"index.html"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"0797b652383bb69d817f1695b75742ec","url":"donate-qr.png"},{"revision":"eb9818b9094675c0c5d303168f273345","url":"monacoeditorwork/ts.worker.bundle.js"},{"revision":"9af0be92dcefdc1f1290441cb5ff5d9b","url":"monacoeditorwork/json.worker.bundle.js"},{"revision":"a261b429c39dbb75ae97972d7d005e6d","url":"monacoeditorwork/html.worker.bundle.js"},{"revision":"79953d804e1bbacecfd79b85fd679016","url":"monacoeditorwork/editor.worker.bundle.js"},{"revision":"fdcba0d09aac31df7a0bc652f6e739bd","url":"monacoeditorwork/css.worker.bundle.js"},{"revision":null,"url":"assets/zig-CtAjaIiF.js"},{"revision":null,"url":"assets/zenscript-DFMywo_P.js"},{"revision":null,"url":"assets/yaml-CQiMLVcZ.js"},{"revision":null,"url":"assets/xsl-CU0ZndUO.js"},{"revision":null,"url":"assets/xml-DhrxbATj.js"},{"revision":null,"url":"assets/x-BcqfTY_7.js"},{"revision":null,"url":"assets/wolfram-6SXLUqao.js"},{"revision":null,"url":"assets/wit-P6u7mfwy.js"},{"revision":null,"url":"assets/wikitext-DYQDUYf2.js"},{"revision":null,"url":"assets/wgsl-D-YUAWkP.js"},{"revision":null,"url":"assets/wenyan-Bc5Pnm9l.js"},{"revision":null,"url":"assets/wasm-iWe7Fzjc.js"},{"revision":null,"url":"assets/wasm-DQE71XTB.js"},{"revision":null,"url":"assets/vyper-Cnd9s5j-.js"},{"revision":null,"url":"assets/vue-vine-CxSG2ojf.js"},{"revision":null,"url":"assets/vue-html-DEYRkS1V.js"},{"revision":null,"url":"assets/vue-D6f-rprj.js"},{"revision":null,"url":"assets/vitesse-light-C7DHrJCK.js"},{"revision":null,"url":"assets/vitesse-dark-B9CkIB6r.js"},{"revision":null,"url":"assets/vitesse-black-DkXP6Sv-.js"},{"revision":null,"url":"assets/viml-Y42h_ExQ.js"},{"revision":null,"url":"assets/video-preview-DYAbbmd0.js"},{"revision":null,"url":"assets/vhdl-B9ZX-sUL.js"},{"revision":null,"url":"assets/vesper-CY3qd7E_.js"},{"revision":null,"url":"assets/verilog-CvV6RHPD.js"},{"revision":null,"url":"assets/vendor-xterm-DkTCHfhq.css"},{"revision":null,"url":"assets/vendor-xterm-CU6zIYMB.js"},{"revision":null,"url":"assets/vendor-ui-CaeeFO0B.js"},{"revision":null,"url":"assets/vendor-mermaid-DrwG0NYt.js"},{"revision":null,"url":"assets/vendor-markdown-Ls5AcU91.js"},{"revision":null,"url":"assets/vb-BxJT2RAy.js"},{"revision":null,"url":"assets/vala-DwebjH3H.js"},{"revision":null,"url":"assets/v-xTGhWZuD.js"},{"revision":null,"url":"assets/utils-DoY4yTP-.js"},{"revision":null,"url":"assets/use-websocket-C-Rxv8JN.js"},{"revision":null,"url":"assets/use-open-team-member-DdrRXj-M.js"},{"revision":null,"url":"assets/use-monaco-theme-CGucu3fb.js"},{"revision":null,"url":"assets/use-is-mobile-BXGVvczu.js"},{"revision":null,"url":"assets/use-blob-url-BKyVxOZw.js"},{"revision":null,"url":"assets/typst-CcHSKFZj.js"},{"revision":null,"url":"assets/typespec-B7QlHMZ_.js"},{"revision":null,"url":"assets/typescript-MpLarYn1.js"},{"revision":null,"url":"assets/twig-DOePpLOL.js"},{"revision":null,"url":"assets/turtle-B-WBIOa6.js"},{"revision":null,"url":"assets/tsx-CjFg0lgw.js"},{"revision":null,"url":"assets/tsv-CraRcWdU.js"},{"revision":null,"url":"assets/ts-tags-pt-Ug0hK.js"},{"revision":null,"url":"assets/treemap-KZPCXAKY-Be3KNmns.js"},{"revision":null,"url":"assets/tool-cards-BcGrk1zk.js"},{"revision":null,"url":"assets/toml-CirbOgDP.js"},{"revision":null,"url":"assets/tokyo-night-RKsj2-tv.js"},{"revision":null,"url":"assets/tex-0loAoXJG.js"},{"revision":null,"url":"assets/terraform-BzZw4T1z.js"},{"revision":null,"url":"assets/terminal-tab-BxHtMR7h.js"},{"revision":null,"url":"assets/templ-MlpvJx4a.js"},{"revision":null,"url":"assets/team-member-window-content-yCBeI_5X.js"},{"revision":null,"url":"assets/team-member-sheet-oY5EkH53.js"},{"revision":null,"url":"assets/tcl-DwCHCB1K.js"},{"revision":null,"url":"assets/tasl-Cu-TRTKx.js"},{"revision":null,"url":"assets/talonscript-CFIidoBA.js"},{"revision":null,"url":"assets/table-CHmxuh6M.js"},{"revision":null,"url":"assets/tab-store-DAsvpx4t.js"},{"revision":null,"url":"assets/systemd-Dz-bNsDQ.js"},{"revision":null,"url":"assets/system-verilog-GbHpszs3.js"},{"revision":null,"url":"assets/system-monitor-window-content-CMiISeoC.js"},{"revision":null,"url":"assets/system-monitor-tab-WjhFFHyM.js"},{"revision":null,"url":"assets/system-monitor-body-CKEYWyN9.js"},{"revision":null,"url":"assets/synthwave-84-cg9264l9.js"},{"revision":null,"url":"assets/swift-BnGb6Lgc.js"},{"revision":null,"url":"assets/svelte--YWjlOrK.js"},{"revision":null,"url":"assets/surrealql-DE5_63MS.js"},{"revision":null,"url":"assets/stylus-DdP992aO.js"},{"revision":null,"url":"assets/stata-BuuClVDg.js"},{"revision":null,"url":"assets/ssh-config-CLCtNkkd.js"},{"revision":null,"url":"assets/sqlite-viewer-Bq9ZJA2y.js"},{"revision":null,"url":"assets/sql-query-editor-BPYsJDsn.js"},{"revision":null,"url":"assets/sql-BcVs-eX4.js"},{"revision":null,"url":"assets/splunk-BXfw5ZLy.js"},{"revision":null,"url":"assets/sparql-N2VclEsF.js"},{"revision":null,"url":"assets/sparkles-Dqsf3hq6.js"},{"revision":null,"url":"assets/soy-oVDnPzzh.js"},{"revision":null,"url":"assets/solidity-DOgi1N4w.js"},{"revision":null,"url":"assets/solarized-light-BoKQZaYU.js"},{"revision":null,"url":"assets/solarized-dark-CF83zRXM.js"},{"revision":null,"url":"assets/snazzy-light-Bc6Q2G89.js"},{"revision":null,"url":"assets/smalltalk-CORtd03t.js"},{"revision":null,"url":"assets/slack-ochin-mdkc1ldu.js"},{"revision":null,"url":"assets/slack-dark-B1eg0_m2.js"},{"revision":null,"url":"assets/shield-off-DULFtyLS.js"},{"revision":null,"url":"assets/shield-check-C5laObJv.js"},{"revision":null,"url":"assets/shellsession-BKBIqTlM.js"},{"revision":null,"url":"assets/shellscript-BkIl4ApC.js"},{"revision":null,"url":"assets/shaderlab-XkqfIfO8.js"},{"revision":null,"url":"assets/settings-tab-jbiQwozX.js"},{"revision":null,"url":"assets/settings-store-C20lqh0G.js"},{"revision":null,"url":"assets/send-to-chat-BcO39BDR.js"},{"revision":null,"url":"assets/sdbl-iISFvIep.js"},{"revision":null,"url":"assets/scss-_nWV0bsb.js"},{"revision":null,"url":"assets/scheme-DS7TUbN7.js"},{"revision":null,"url":"assets/scala-sXSwsNyq.js"},{"revision":null,"url":"assets/save-C4z1p51e.js"},{"revision":null,"url":"assets/sass-Bz7NVxDb.js"},{"revision":null,"url":"assets/sas-CoOOEbOO.js"},{"revision":null,"url":"assets/rust-Dy2qsphD.js"},{"revision":null,"url":"assets/run-in-terminal-CyS5Itj-.js"},{"revision":null,"url":"assets/ruby-ieATBhWm.js"},{"revision":null,"url":"assets/rst-BRpofyNs.js"},{"revision":null,"url":"assets/rosmsg-CdaZFgI8.js"},{"revision":null,"url":"assets/rose-pine-moon-CoHDmsIw.js"},{"revision":null,"url":"assets/rose-pine-hvkvQzvU.js"},{"revision":null,"url":"assets/rose-pine-dawn-D7lwhUei.js"},{"revision":null,"url":"assets/ron-BtVTWW4b.js"},{"revision":null,"url":"assets/rolldown-runtime-FhOqtrmT.js"},{"revision":null,"url":"assets/riscv-BbbBYJBo.js"},{"revision":null,"url":"assets/resolve-theme-IdhSR-gx.js"},{"revision":null,"url":"assets/rel-BXKWIElA.js"},{"revision":null,"url":"assets/regexp-Bero1BN2.js"},{"revision":null,"url":"assets/reg-BqOKrIOw.js"},{"revision":null,"url":"assets/red-BMXMywmL.js"},{"revision":null,"url":"assets/react-I_EwPIZi.js"},{"revision":null,"url":"assets/razor-wY_6wUeC.js"},{"revision":null,"url":"assets/raku-BwutWhBF.js"},{"revision":null,"url":"assets/radar-KQ55EAFF-JJ6O1Er_.js"},{"revision":null,"url":"assets/racket-CzRQrGc4.js"},{"revision":null,"url":"assets/r-BlqnNkHS.js"},{"revision":null,"url":"assets/qss-dNZ2btnl.js"},{"revision":null,"url":"assets/qmldir-CtZMwhcW.js"},{"revision":null,"url":"assets/qml-DRDkUp75.js"},{"revision":null,"url":"assets/python-C7TlkHhK.js"},{"revision":null,"url":"assets/purescript-DvgJgPdy.js"},{"revision":null,"url":"assets/puppet-D2Dkv62u.js"},{"revision":null,"url":"assets/pug-C2kdkhQ6.js"},{"revision":null,"url":"assets/proto-wr-TpAK_.js"},{"revision":null,"url":"assets/prolog-DOn5lR1e.js"},{"revision":null,"url":"assets/project-store-B8BkHXy5.js"},{"revision":null,"url":"assets/process-table-DL6shbzt.js"},{"revision":null,"url":"assets/prisma-BE8GR1lH.js"},{"revision":null,"url":"assets/powershell-LFy3MUTP.js"},{"revision":null,"url":"assets/powerquery-Db7SXLbO.js"},{"revision":null,"url":"assets/postgres-viewer-CR6VpTrX.js"},{"revision":null,"url":"assets/postcss-CBKY1FTZ.js"},{"revision":null,"url":"assets/polar-rcjs3i9R.js"},{"revision":null,"url":"assets/poimandres-G5YoaIFf.js"},{"revision":null,"url":"assets/po-CFJcWgjr.js"},{"revision":null,"url":"assets/plus-BM-Ty0fp.js"},{"revision":null,"url":"assets/plsql-cfqEtMD3.js"},{"revision":null,"url":"assets/plastic-Bf_zE5KL.js"},{"revision":null,"url":"assets/pkl-CuOV7SsU.js"},{"revision":null,"url":"assets/pie-UPGHQEXC-SLS6i76l.js"},{"revision":null,"url":"assets/php-CDsOOxXn.js"},{"revision":null,"url":"assets/perl-AMNGIneF.js"},{"revision":null,"url":"assets/pdf-preview-Di5xHFyT.js"},{"revision":null,"url":"assets/pascal-i5niy3e7.js"},{"revision":null,"url":"assets/panel-store-DCD82zc1.js"},{"revision":null,"url":"assets/packet-RMMSAZCW-BIhk1mvp.js"},{"revision":null,"url":"assets/overview-panel-Cgi3UPY1.js"},{"revision":null,"url":"assets/openscad-BLMdTUU8.js"},{"revision":null,"url":"assets/one-light-BPGUJeYI.js"},{"revision":null,"url":"assets/one-dark-pro-B1cviILi.js"},{"revision":null,"url":"assets/odin-Cyjw8woZ.js"},{"revision":null,"url":"assets/ocaml-vvoHTak0.js"},{"revision":null,"url":"assets/objective-cpp-DVkIA8A0.js"},{"revision":null,"url":"assets/objective-c-Cl9KU86S.js"},{"revision":null,"url":"assets/nushell-DUh4UGx1.js"},{"revision":null,"url":"assets/number-overlay-editor-D9SkFg1Y.js"},{"revision":null,"url":"assets/notification-store-DJ-OtAG3.js"},{"revision":null,"url":"assets/nord-CaBmcxFC.js"},{"revision":null,"url":"assets/nix-BgiorKFd.js"},{"revision":null,"url":"assets/nim-DLa8R3NS.js"},{"revision":null,"url":"assets/night-owl-_GD204Wr.js"},{"revision":null,"url":"assets/night-owl-light-DNgkw3kl.js"},{"revision":null,"url":"assets/nginx-Qb9pUk1g.js"},{"revision":null,"url":"assets/nextflow-groovy-CJXsuXGB.js"},{"revision":null,"url":"assets/nextflow-DR8PhpF8.js"},{"revision":null,"url":"assets/narrat-CXww2YQL.js"},{"revision":null,"url":"assets/move-kwBhnhrG.js"},{"revision":null,"url":"assets/moonbit-AAzI-Hd-.js"},{"revision":null,"url":"assets/monokai-dci_PdCm.js"},{"revision":null,"url":"assets/mojo-t90PR-Y2.js"},{"revision":null,"url":"assets/mobile-explorer-sheet-5Uj9ZMM9.js"},{"revision":null,"url":"assets/mobile-bottom-sheet-BUOJgiaZ.js"},{"revision":null,"url":"assets/mipsasm-Bjer5HwK.js"},{"revision":null,"url":"assets/min-light-Cx6vFiEX.js"},{"revision":null,"url":"assets/min-dark-CMJwqJqB.js"},{"revision":null,"url":"assets/mermaid-BYc0-B0U.js"},{"revision":null,"url":"assets/media-url-CylYQld1.js"},{"revision":null,"url":"assets/mdx-Cr2TR5fj.js"},{"revision":null,"url":"assets/mdc-D690aU2C.js"},{"revision":null,"url":"assets/matlab-C-He_NTH.js"},{"revision":null,"url":"assets/material-theme-palenight-CY5hgm7h.js"},{"revision":null,"url":"assets/material-theme-ocean-EMOpLpa2.js"},{"revision":null,"url":"assets/material-theme-lighter-JbgOgV3n.js"},{"revision":null,"url":"assets/material-theme-darker-BDGty7YH.js"},{"revision":null,"url":"assets/material-theme-CWYOVxsP.js"},{"revision":null,"url":"assets/marko--UOicMGo.js"},{"revision":null,"url":"assets/markdown-renderer-pVzBdkpl.js"},{"revision":null,"url":"assets/markdown-renderer-I89kyQhe.js"},{"revision":null,"url":"assets/markdown-p5mNledS.js"},{"revision":null,"url":"assets/make-GYq4qVbx.js"},{"revision":null,"url":"assets/luau-C9TsYwNt.js"},{"revision":null,"url":"assets/lua-CcKiU6HW.js"},{"revision":null,"url":"assets/logo-CrIjcMZT.js"},{"revision":null,"url":"assets/log-Bo5z9bNz.js"},{"revision":null,"url":"assets/llvm-DvWiVwvU.js"},{"revision":null,"url":"assets/liquid-CVSvu_Wn.js"},{"revision":null,"url":"assets/light-plus-BfS7gPcj.js"},{"revision":null,"url":"assets/libesm-CPh1Av0r.js"},{"revision":null,"url":"assets/lib-DgNcCtj3.js"},{"revision":null,"url":"assets/less-Xj6Ka0fF.js"},{"revision":null,"url":"assets/lean-UAm1HOKl.js"},{"revision":null,"url":"assets/latex-D6TOl-L2.js"},{"revision":null,"url":"assets/laserwave-DfAPJ1tt.js"},{"revision":null,"url":"assets/kusto--serPb0x.js"},{"revision":null,"url":"assets/kotlin-DWughK73.js"},{"revision":null,"url":"assets/keybindings-store-aIY40k2o.js"},{"revision":null,"url":"assets/kdl-Bn8R1REF.js"},{"revision":null,"url":"assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2"},{"revision":null,"url":"assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2"},{"revision":null,"url":"assets/KaTeX_Size2-Regular-Dy4dx90m.woff2"},{"revision":null,"url":"assets/KaTeX_Size1-Regular-mCD8mA8B.woff2"},{"revision":null,"url":"assets/KaTeX_Script-Regular-D3wIWfF6.woff2"},{"revision":null,"url":"assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2"},{"revision":null,"url":"assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2"},{"revision":null,"url":"assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2"},{"revision":null,"url":"assets/KaTeX_Math-Italic-t53AETM-.woff2"},{"revision":null,"url":"assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2"},{"revision":null,"url":"assets/KaTeX_Main-Regular-B22Nviop.woff2"},{"revision":null,"url":"assets/KaTeX_Main-Italic-NWA7e6Wa.woff2"},{"revision":null,"url":"assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2"},{"revision":null,"url":"assets/KaTeX_Main-Bold-Cx986IdX.woff2"},{"revision":null,"url":"assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2"},{"revision":null,"url":"assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2"},{"revision":null,"url":"assets/KaTeX_AMS-Regular-BQhdFMY1.woff2"},{"revision":null,"url":"assets/kanagawa-wave-CyGoWN4d.js"},{"revision":null,"url":"assets/kanagawa-lotus-yQgHUGwU.js"},{"revision":null,"url":"assets/kanagawa-dragon-BculT_Y1.js"},{"revision":null,"url":"assets/just-BGdHchwS.js"},{"revision":null,"url":"assets/julia-IOQNJAB7.js"},{"revision":null,"url":"assets/jsx-tJp2Cyqu.js"},{"revision":null,"url":"assets/jssm-Db17uybX.js"},{"revision":null,"url":"assets/jsonnet-C5pdZVuo.js"},{"revision":null,"url":"assets/jsonl-JvhrmQJI.js"},{"revision":null,"url":"assets/jsonc-C5MjoWGx.js"},{"revision":null,"url":"assets/json5-BQ2vpqjp.js"},{"revision":null,"url":"assets/json-BjZ3dAk6.js"},{"revision":null,"url":"assets/jison-CciJg2NW.js"},{"revision":null,"url":"assets/jinja-CWsQj2y0.js"},{"revision":null,"url":"assets/javascript-C-M7sa2e.js"},{"revision":null,"url":"assets/java-CnmpcjcT.js"},{"revision":null,"url":"assets/ini-DEE_vSHQ.js"},{"revision":null,"url":"assets/info-3K5VOQVL-lRlrTlkb.js"},{"revision":null,"url":"assets/index-DRA_OpWY.css"},{"revision":null,"url":"assets/index-CerSxGdf.js"},{"revision":null,"url":"assets/imba-C_JJXckG.js"},{"revision":null,"url":"assets/image-preview-D-Ok10eZ.js"},{"revision":null,"url":"assets/image-gallery-CGvlv8zR.js"},{"revision":null,"url":"assets/hy-BrWBHtHY.js"},{"revision":null,"url":"assets/hxml-Dc3jBXuf.js"},{"revision":null,"url":"assets/hurl-WDC6sSBz.js"},{"revision":null,"url":"assets/http-G1K2FozA.js"},{"revision":null,"url":"assets/html-NLWdst5q.js"},{"revision":null,"url":"assets/html-derivative-CJf_Le2z.js"},{"revision":null,"url":"assets/houston-C6ASpUjT.js"},{"revision":null,"url":"assets/horizon-DtdQ6qjv.js"},{"revision":null,"url":"assets/horizon-bright-BXSF_uKq.js"},{"revision":null,"url":"assets/hlsl-CRuQLBSa.js"},{"revision":null,"url":"assets/hjson-BXwae2M1.js"},{"revision":null,"url":"assets/hcl-Bi3ho6yC.js"},{"revision":null,"url":"assets/haxe-B7fSduTQ.js"},{"revision":null,"url":"assets/haskell-C4Tw-TDa.js"},{"revision":null,"url":"assets/handlebars-398uCI13.js"},{"revision":null,"url":"assets/haml-DKeIPQWM.js"},{"revision":null,"url":"assets/hack-DG151vit.js"},{"revision":null,"url":"assets/gruvbox-light-soft-CX-fYc64.js"},{"revision":null,"url":"assets/gruvbox-light-medium-APHsh6Mo.js"},{"revision":null,"url":"assets/gruvbox-light-hard-CLQCq2-w.js"},{"revision":null,"url":"assets/gruvbox-dark-soft-Cwq0dWVj.js"},{"revision":null,"url":"assets/gruvbox-dark-medium-Dp1eeid2.js"},{"revision":null,"url":"assets/gruvbox-dark-hard-C8QZ3gzY.js"},{"revision":null,"url":"assets/group-chat-tab-BVPYxjz-.js"},{"revision":null,"url":"assets/groovy-BHAgLTeO.js"},{"revision":null,"url":"assets/graphql-BK75fiXl.js"},{"revision":null,"url":"assets/go-DiRVJ22U.js"},{"revision":null,"url":"assets/gnuplot-D7bRdY_M.js"},{"revision":null,"url":"assets/gn-Cv5WEzHc.js"},{"revision":null,"url":"assets/glsl-DbkxE1TN.js"},{"revision":null,"url":"assets/glimmer-ts-C_Njj0nK.js"},{"revision":null,"url":"assets/glimmer-js-1-6JMJlj.js"},{"revision":null,"url":"assets/glide-data-grid-nthEL3fk.css"},{"revision":null,"url":"assets/glide-data-grid-Cehfgrzc.js"},{"revision":null,"url":"assets/gleam-DwSyXJWP.js"},{"revision":null,"url":"assets/github-light-high-contrast-Dt0HJq50.js"},{"revision":null,"url":"assets/github-light-default-B-cHtJJV.js"},{"revision":null,"url":"assets/github-light-D4PqBHGZ.js"},{"revision":null,"url":"assets/github-dark-nW2F-RLd.js"},{"revision":null,"url":"assets/github-dark-high-contrast-CW5ZgIDh.js"},{"revision":null,"url":"assets/github-dark-dimmed-Cv9lj6f-.js"},{"revision":null,"url":"assets/github-dark-default-BK_1Qgb8.js"},{"revision":null,"url":"assets/gitGraph-HDMCJU4V-D4hYLNJU.js"},{"revision":null,"url":"assets/git-rebase-C5Gql6Ma.js"},{"revision":null,"url":"assets/git-log-panel-DcV7PhqW.js"},{"revision":null,"url":"assets/git-commit-DH6mY3Km.js"},{"revision":null,"url":"assets/gherkin-CLFpoVYJ.js"},{"revision":null,"url":"assets/genie-CowkJhej.js"},{"revision":null,"url":"assets/gdshader-D-RM-SQk.js"},{"revision":null,"url":"assets/gdscript-prYHMgtD.js"},{"revision":null,"url":"assets/gdresource-BGRvoWfC.js"},{"revision":null,"url":"assets/fsharp-CZsYmiw9.js"},{"revision":null,"url":"assets/fortran-free-form-DKWSTamT.js"},{"revision":null,"url":"assets/fortran-fixed-form-CXLIv8Ox.js"},{"revision":null,"url":"assets/format-bytes-Dk7B73B7.js"},{"revision":null,"url":"assets/fluent-CDxb_sgw.js"},{"revision":null,"url":"assets/fish-Byy9dusu.js"},{"revision":null,"url":"assets/file-exclamation-point-COAwgNGw.js"},{"revision":null,"url":"assets/fennel-WuBw6IR1.js"},{"revision":null,"url":"assets/eye-off-CUdzgmX8.js"},{"revision":null,"url":"assets/extension-webview-CuOQrHIS.js"},{"revision":null,"url":"assets/explorer-window-content-Bbzijk8t.js"},{"revision":null,"url":"assets/explorer-body-BKOMM566.js"},{"revision":null,"url":"assets/everforest-light-CTgsVNMr.js"},{"revision":null,"url":"assets/everforest-dark-uC8QYotQ.js"},{"revision":null,"url":"assets/esm-CZs9WVDO.js"},{"revision":null,"url":"assets/erlang-BCBe8nCc.js"},{"revision":null,"url":"assets/erb-WI7jUaB6.js"},{"revision":null,"url":"assets/emacs-lisp-Ao5SW8ay.js"},{"revision":null,"url":"assets/elm-Bfs2qNPR.js"},{"revision":null,"url":"assets/elixir-D466WCFm.js"},{"revision":null,"url":"assets/edit-diff-preview-gq6ALf2B.js"},{"revision":null,"url":"assets/edge-Bhqk64zS.js"},{"revision":null,"url":"assets/dream-maker-DZAPbPTi.js"},{"revision":null,"url":"assets/dracula-soft-BYqvXm6Z.js"},{"revision":null,"url":"assets/dracula-C3m-w12D.js"},{"revision":null,"url":"assets/download-zCATy4x4.js"},{"revision":null,"url":"assets/dotenv-D6Pl6aOU.js"},{"revision":null,"url":"assets/docx-preview-D3Sdh_aT.js"},{"revision":null,"url":"assets/docker-DNsAo_qO.js"},{"revision":null,"url":"assets/dist-Di6G_5jU.js"},{"revision":null,"url":"assets/dist-DB1Oaqcc.js"},{"revision":null,"url":"assets/diff-viewer-BwfMN-nW.js"},{"revision":null,"url":"assets/diff-BtOXapES.js"},{"revision":null,"url":"assets/desktop-CN0IXPrP.js"},{"revision":null,"url":"assets/dax-BNHD-QBA.js"},{"revision":null,"url":"assets/database-viewer-BCZOTrPT.js"},{"revision":null,"url":"assets/database-BH0urvbs.js"},{"revision":null,"url":"assets/data-grid-types-CYvF-xK5.js"},{"revision":null,"url":"assets/data-grid-overlay-editor-D9il5DZS.js"},{"revision":null,"url":"assets/dart-CWQcdkXk.js"},{"revision":null,"url":"assets/dark-plus-Cj7rVwh-.js"},{"revision":null,"url":"assets/d-BALR-QuP.js"},{"revision":null,"url":"assets/cypher-rZkKwqZc.js"},{"revision":null,"url":"assets/cue-BrxRmilg.js"},{"revision":null,"url":"assets/csv-preview-CY_454vd.js"},{"revision":null,"url":"assets/csv-parser-CnS0wqr6.js"},{"revision":null,"url":"assets/csv-l1g_V5MV.js"},{"revision":null,"url":"assets/css-CqZqBD05.js"},{"revision":null,"url":"assets/csharp-CEmCZv9Q.js"},{"revision":null,"url":"assets/crystal-Vlwf2UMP.js"},{"revision":null,"url":"assets/createLucideIcon-D8pyde1A.js"},{"revision":null,"url":"assets/cpp-DHGV24J2.js"},{"revision":null,"url":"assets/coq-DHX_3IIo.js"},{"revision":null,"url":"assets/copy-DKn11Pye.js"},{"revision":null,"url":"assets/context-menu-Cq0u3SK9.js"},{"revision":null,"url":"assets/conflict-editor-CdH_h0vD.js"},{"revision":null,"url":"assets/common-lisp-KMlIwq5I.js"},{"revision":null,"url":"assets/coffee-CWGNOxds.js"},{"revision":null,"url":"assets/codeql-Bb229zuY.js"},{"revision":null,"url":"assets/codeowners-CQyVz4Qf.js"},{"revision":null,"url":"assets/code-editor-C2VQbXzw.js"},{"revision":null,"url":"assets/code-DDPoqVri.js"},{"revision":null,"url":"assets/cobol-BWSGjmWb.js"},{"revision":null,"url":"assets/cmake-CwerJun_.js"},{"revision":null,"url":"assets/clojure-DloMkd8K.js"},{"revision":null,"url":"assets/clock-CvhF4DJP.js"},{"revision":null,"url":"assets/clarity-F39L0xMJ.js"},{"revision":null,"url":"assets/circle-question-mark-CzR7YRc-.js"},{"revision":null,"url":"assets/circle-hjUGru6R.js"},{"revision":null,"url":"assets/chevron-right-BLOtX8Vy.js"},{"revision":null,"url":"assets/chat-tab-flMPLoKb.js"},{"revision":null,"url":"assets/catppuccin-mocha-NI2lfXzU.js"},{"revision":null,"url":"assets/catppuccin-macchiato-BJ7DfVEF.js"},{"revision":null,"url":"assets/catppuccin-latte-Dw40AcqA.js"},{"revision":null,"url":"assets/catppuccin-frappe-DIt_xR7m.js"},{"revision":null,"url":"assets/can-open-in-ppm-omBzUBBq.js"},{"revision":null,"url":"assets/cairo-BbIHl2iE.js"},{"revision":null,"url":"assets/cadence-B0GBC8OF.js"},{"revision":null,"url":"assets/c3-BZ_Z0RrR.js"},{"revision":null,"url":"assets/c-BpmrTvJh.js"},{"revision":null,"url":"assets/button-BA_fJOtX.js"},{"revision":null,"url":"assets/bsl-CVsbb6ap.js"},{"revision":null,"url":"assets/bot-CunPuEdW.js"},{"revision":null,"url":"assets/blade-CGkj2MUI.js"},{"revision":null,"url":"assets/bird2-Co7SeAI8.js"},{"revision":null,"url":"assets/bicep-fkeSA62l.js"},{"revision":null,"url":"assets/bibtex-CpXgZ9M_.js"},{"revision":null,"url":"assets/berry-CCT2pZcQ.js"},{"revision":null,"url":"assets/beancount-Xgvy6YRl.js"},{"revision":null,"url":"assets/bat-0X7DtGI-.js"},{"revision":null,"url":"assets/ballerina-C82NkRtj.js"},{"revision":null,"url":"assets/ayu-mirage-DyElQHtm.js"},{"revision":null,"url":"assets/ayu-light-D8PVj-e6.js"},{"revision":null,"url":"assets/ayu-dark-CpTORmLc.js"},{"revision":null,"url":"assets/awk-BQEGWxvX.js"},{"revision":null,"url":"assets/aurora-x-BJTLETG_.js"},{"revision":null,"url":"assets/audio-preview-CZLmhf__.js"},{"revision":null,"url":"assets/astro-BlFEeGYr.js"},{"revision":null,"url":"assets/asm-BzQdSvTe.js"},{"revision":null,"url":"assets/asciidoc-s_yVuR3t.js"},{"revision":null,"url":"assets/architecture-PBZL5I3N-C7ra20CE.js"},{"revision":null,"url":"assets/ara-BGN8GAYn.js"},{"revision":null,"url":"assets/apply-theme-BH_d4amk.js"},{"revision":null,"url":"assets/applescript-Dm9NI6KR.js"},{"revision":null,"url":"assets/apl-b9KVk-O4.js"},{"revision":null,"url":"assets/api-themes-CrK0tkW_.js"},{"revision":null,"url":"assets/api-settings-nblja3Rk.js"},{"revision":null,"url":"assets/api-settings-kQHV6pYZ.js"},{"revision":null,"url":"assets/api-client-CzABTreM.js"},{"revision":null,"url":"assets/api-client-BSB14J4w.js"},{"revision":null,"url":"assets/apex-B4-aoQ3K.js"},{"revision":null,"url":"assets/apache-CX1NU_Tl.js"},{"revision":null,"url":"assets/angular-ts-QXHpgB1C.js"},{"revision":null,"url":"assets/angular-html-Ctz0zN01.js"},{"revision":null,"url":"assets/andromeeda-D6qUCKJo.js"},{"revision":null,"url":"assets/ai-resource-editor-DFCuNe-P.js"},{"revision":null,"url":"assets/ada-DpuV9KwV.js"},{"revision":null,"url":"assets/actionscript-3-BDDHKqa4.js"},{"revision":null,"url":"assets/abap-MRbmsXOs.js"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":"26dccd02a2ef7522892015154f5e3680","url":"manifest.webmanifest"}]);
1
+ try{self[`workbox:core:7.3.0`]&&_()}catch{}var e=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n},t=class extends Error{constructor(t,n){let r=e(t,n);super(r),this.name=t,this.details=n}},n={googleAnalytics:`googleAnalytics`,precache:`precache-v2`,prefix:`workbox`,runtime:`runtime`,suffix:typeof registration<`u`?registration.scope:``},r=e=>[n.prefix,e,n.suffix].filter(e=>e&&e.length>0).join(`-`),i=e=>{for(let t of Object.keys(n))e(t)},a={updateDetails:e=>{i(t=>{typeof e[t]==`string`&&(n[t]=e[t])})},getGoogleAnalyticsName:e=>e||r(n.googleAnalytics),getPrecacheName:e=>e||r(n.precache),getPrefix:()=>n.prefix,getRuntimeName:e=>e||r(n.runtime),getSuffix:()=>n.suffix};function o(e,t){let n=t();return e.waitUntil(n),n}try{self[`workbox:precaching:7.3.0`]&&_()}catch{}var s=`__WB_REVISION__`;function c(e){if(!e)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(typeof e==`string`){let t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}let{revision:n,url:r}=e;if(!r)throw new t(`add-to-cache-list-unexpected-type`,{entry:e});if(!n){let e=new URL(r,location.href);return{cacheKey:e.href,url:e.href}}let i=new URL(r,location.href),a=new URL(r,location.href);return i.searchParams.set(s,n),{cacheKey:i.href,url:a.href}}var l=class{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type===`install`&&t&&t.originalRequest&&t.originalRequest instanceof Request){let e=t.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}},u=class{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{let n=t?.cacheKey||this._precacheController.getCacheKeyForURL(e.url);return n?new Request(n,{headers:e.headers}):e},this._precacheController=e}},d;function f(){if(d===void 0){let e=new Response(``);if(`body`in e)try{new Response(e.body),d=!0}catch{d=!1}d=!1}return d}async function p(e,n){let r=null;if(e.url&&(r=new URL(e.url).origin),r!==self.location.origin)throw new t(`cross-origin-copy-response`,{origin:r});let i=e.clone(),a={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=n?n(a):a,s=f()?i.body:await i.blob();return new Response(s,o)}var m=e=>new URL(String(e),location.href).href.replace(RegExp(`^${location.origin}`),``);function h(e,t){let n=new URL(e);for(let e of t)n.searchParams.delete(e);return n.href}async function g(e,t,n,r){let i=h(t.url,n);if(t.url===i)return e.match(t,r);let a=Object.assign(Object.assign({},r),{ignoreSearch:!0}),o=await e.keys(t,a);for(let t of o)if(i===h(t.url,n))return e.match(t,r)}var v=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},y=new Set;async function b(){for(let e of y)await e()}function x(e){return new Promise(t=>setTimeout(t,e))}try{self[`workbox:strategies:7.3.0`]&&_()}catch{}function S(e){return typeof e==`string`?new Request(e):e}var C=class{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new v,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(let e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){let{event:n}=this,r=S(e);if(r.mode===`navigate`&&n instanceof FetchEvent&&n.preloadResponse){let e=await n.preloadResponse;if(e)return e}let i=this.hasCallback(`fetchDidFail`)?r.clone():null;try{for(let e of this.iterateCallbacks(`requestWillFetch`))r=await e({request:r.clone(),event:n})}catch(e){if(e instanceof Error)throw new t(`plugin-error-request-will-fetch`,{thrownErrorMessage:e.message})}let a=r.clone();try{let e;e=await fetch(r,r.mode===`navigate`?void 0:this._strategy.fetchOptions);for(let t of this.iterateCallbacks(`fetchDidSucceed`))e=await t({event:n,request:a,response:e});return e}catch(e){throw i&&await this.runCallbacks(`fetchDidFail`,{error:e,event:n,originalRequest:i.clone(),request:a.clone()}),e}}async fetchAndCachePut(e){let t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){let t=S(e),n,{cacheName:r,matchOptions:i}=this._strategy,a=await this.getCacheKey(t,`read`),o=Object.assign(Object.assign({},i),{cacheName:r});n=await caches.match(a,o);for(let e of this.iterateCallbacks(`cachedResponseWillBeUsed`))n=await e({cacheName:r,matchOptions:i,cachedResponse:n,request:a,event:this.event})||void 0;return n}async cachePut(e,n){let r=S(e);await x(0);let i=await this.getCacheKey(r,`write`);if(!n)throw new t(`cache-put-with-no-response`,{url:m(i.url)});let a=await this._ensureResponseSafeToCache(n);if(!a)return!1;let{cacheName:o,matchOptions:s}=this._strategy,c=await self.caches.open(o),l=this.hasCallback(`cacheDidUpdate`),u=l?await g(c,i.clone(),[`__WB_REVISION__`],s):null;try{await c.put(i,l?a.clone():a)}catch(e){if(e instanceof Error)throw e.name===`QuotaExceededError`&&await b(),e}for(let e of this.iterateCallbacks(`cacheDidUpdate`))await e({cacheName:o,oldResponse:u,newResponse:a.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){let n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(let e of this.iterateCallbacks(`cacheKeyWillBeUsed`))r=S(await e({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(let t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(let n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(let t of this._strategy.plugins)if(typeof t[e]==`function`){let n=this._pluginStateMap.get(t);yield r=>{let i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){let e=this._extendLifetimePromises.splice(0),t=(await Promise.allSettled(e)).find(e=>e.status===`rejected`);if(t)throw t.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(let e of this.iterateCallbacks(`cacheWillUpdate`))if(t=await e({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}},w=class{constructor(e={}){this.cacheName=a.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){let[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});let t=e.event,n=typeof e.request==`string`?new Request(e.request):e.request,r=`params`in e?e.params:void 0,i=new C(this,{event:t,request:n,params:r}),a=this._getResponse(i,n,t);return[a,this._awaitComplete(a,i,n,t)]}async _getResponse(e,n,r){await e.runCallbacks(`handlerWillStart`,{event:r,request:n});let i;try{if(i=await this._handle(n,e),!i||i.type===`error`)throw new t(`no-response`,{url:n.url})}catch(t){if(t instanceof Error){for(let a of e.iterateCallbacks(`handlerDidError`))if(i=await a({error:t,event:r,request:n}),i)break}if(!i)throw t}for(let t of e.iterateCallbacks(`handlerWillRespond`))i=await t({event:r,request:n,response:i});return i}async _awaitComplete(e,t,n,r){let i,a;try{i=await e}catch{}try{await t.runCallbacks(`handlerDidRespond`,{event:r,request:n,response:i}),await t.doneWaiting()}catch(e){e instanceof Error&&(a=e)}if(await t.runCallbacks(`handlerDidComplete`,{event:r,request:n,response:i,error:a}),t.destroy(),a)throw a}},T=class e extends w{constructor(t={}){t.cacheName=a.getPrecacheName(t.cacheName),super(t),this._fallbackToNetwork=t.fallbackToNetwork!==!1,this.plugins.push(e.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){return await t.cacheMatch(e)||(t.event&&t.event.type===`install`?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,n){let r,i=n.params||{};if(this._fallbackToNetwork){let t=i.integrity,a=e.integrity,o=!a||a===t;r=await n.fetch(new Request(e,{integrity:e.mode===`no-cors`?void 0:a||t})),t&&o&&e.mode!==`no-cors`&&(this._useDefaultCacheabilityPluginIfNeeded(),await n.cachePut(e,r.clone()))}else throw new t(`missing-precache-entry`,{cacheName:this.cacheName,url:e.url});return r}async _handleInstall(e,n){this._useDefaultCacheabilityPluginIfNeeded();let r=await n.fetch(e);if(!await n.cachePut(e,r.clone()))throw new t(`bad-precaching-response`,{url:e.url,status:r.status});return r}_useDefaultCacheabilityPluginIfNeeded(){let t=null,n=0;for(let[r,i]of this.plugins.entries())i!==e.copyRedirectedCacheableResponsesPlugin&&(i===e.defaultPrecacheCacheabilityPlugin&&(t=r),i.cacheWillUpdate&&n++);n===0?this.plugins.push(e.defaultPrecacheCacheabilityPlugin):n>1&&t!==null&&this.plugins.splice(t,1)}};T.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:e}){return!e||e.status>=400?null:e}},T.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:e}){return e.redirected?await p(e):e}};var E=class{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new T({cacheName:a.getPrecacheName(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||=(self.addEventListener(`install`,this.install),self.addEventListener(`activate`,this.activate),!0)}addToCacheList(e){let n=[];for(let r of e){typeof r==`string`?n.push(r):r&&r.revision===void 0&&n.push(r.url);let{cacheKey:e,url:i}=c(r),a=typeof r!=`string`&&r.revision?`reload`:`default`;if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==e)throw new t(`add-to-cache-list-conflicting-entries`,{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:e});if(typeof r!=`string`&&r.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==r.integrity)throw new t(`add-to-cache-list-conflicting-integrities`,{url:i});this._cacheKeysToIntegrities.set(e,r.integrity)}if(this._urlsToCacheKeys.set(i,e),this._urlsToCacheModes.set(i,a),n.length>0){let e=`Workbox is precaching URLs without revision info: ${n.join(`, `)}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return o(e,async()=>{let t=new l;this.strategy.plugins.push(t);for(let[t,n]of this._urlsToCacheKeys){let r=this._cacheKeysToIntegrities.get(n),i=this._urlsToCacheModes.get(t),a=new Request(t,{integrity:r,cache:i,credentials:`same-origin`});await Promise.all(this.strategy.handleAll({params:{cacheKey:n},request:a,event:e}))}let{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return o(e,async()=>{let e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),n=new Set(this._urlsToCacheKeys.values()),r=[];for(let i of t)n.has(i.url)||(await e.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){let t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){let t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){let n=this.getCacheKeyForURL(e);if(!n)throw new t(`non-precached-url`,{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:n},t.params),this.strategy.handle(t))}},D,O=()=>(D||=new E,D);try{self[`workbox:routing:7.3.0`]&&_()}catch{}var k=e=>e&&typeof e==`object`?e:{handle:e},A=class{constructor(e,t,n=`GET`){this.handler=k(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=k(e)}},j=class extends A{constructor(e,t,n){super(({url:t})=>{let n=e.exec(t.href);if(n&&!(t.origin!==location.origin&&n.index!==0))return n.slice(1)},t,n)}},M=class{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener(`fetch`,(e=>{let{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener(`message`,(e=>{if(e.data&&e.data.type===`CACHE_URLS`){let{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(t=>{typeof t==`string`&&(t=[t]);let n=new Request(...t);return this.handleRequest({request:n,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){let n=new URL(e.url,location.href);if(!n.protocol.startsWith(`http`))return;let r=n.origin===location.origin,{params:i,route:a}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n}),o=a&&a.handler,s=e.method;if(!o&&this._defaultHandlerMap.has(s)&&(o=this._defaultHandlerMap.get(s)),!o)return;let c;try{c=o.handle({url:n,request:e,event:t,params:i})}catch(e){c=Promise.reject(e)}let l=a&&a.catchHandler;return c instanceof Promise&&(this._catchHandler||l)&&(c=c.catch(async r=>{if(l)try{return await l.handle({url:n,request:e,event:t,params:i})}catch(e){e instanceof Error&&(r=e)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw r})),c}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){let i=this._routes.get(n.method)||[];for(let a of i){let i,o=a.match({url:e,sameOrigin:t,request:n,event:r});if(o)return i=o,(Array.isArray(i)&&i.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o==`boolean`)&&(i=void 0),{route:a,params:i}}return{}}setDefaultHandler(e,t=`GET`){this._defaultHandlerMap.set(t,k(e))}setCatchHandler(e){this._catchHandler=k(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t(`unregister-route-but-not-found-with-method`,{method:e.method});let n=this._routes.get(e.method).indexOf(e);if(n>-1)this._routes.get(e.method).splice(n,1);else throw new t(`unregister-route-route-not-registered`)}},N,P=()=>(N||(N=new M,N.addFetchListener(),N.addCacheListener()),N);function F(e,n,r){let i;if(typeof e==`string`){let t=new URL(e,location.href);i=new A(({url:e})=>e.href===t.href,n,r)}else if(e instanceof RegExp)i=new j(e,n,r);else if(typeof e==`function`)i=new A(e,n,r);else if(e instanceof A)i=e;else throw new t(`unsupported-route-type`,{moduleName:`workbox-routing`,funcName:`registerRoute`,paramName:`capture`});return P().registerRoute(i),i}function I(e,t=[]){for(let n of[...e.searchParams.keys()])t.some(e=>e.test(n))&&e.searchParams.delete(n);return e}function*L(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:n=`index.html`,cleanURLs:r=!0,urlManipulation:i}={}){let a=new URL(e,location.href);a.hash=``,yield a.href;let o=I(a,t);if(yield o.href,n&&o.pathname.endsWith(`/`)){let e=new URL(o.href);e.pathname+=n,yield e.href}if(r){let e=new URL(o.href);e.pathname+=`.html`,yield e.href}if(i){let e=i({url:a});for(let t of e)yield t.href}}var R=class extends A{constructor(e,t){super(({request:n})=>{let r=e.getURLsToCacheKeys();for(let i of L(n.url,t)){let t=r.get(i);if(t)return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}},e.strategy)}};function z(e){F(new R(O(),e))}function B(e){O().precache(e)}function V(e,t){B(e),z(t)}V([{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},{"revision":"eb971c9e3161994e076eea0db2d0ff4f","url":"index.html"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"0797b652383bb69d817f1695b75742ec","url":"donate-qr.png"},{"revision":"eb9818b9094675c0c5d303168f273345","url":"monacoeditorwork/ts.worker.bundle.js"},{"revision":"9af0be92dcefdc1f1290441cb5ff5d9b","url":"monacoeditorwork/json.worker.bundle.js"},{"revision":"a261b429c39dbb75ae97972d7d005e6d","url":"monacoeditorwork/html.worker.bundle.js"},{"revision":"79953d804e1bbacecfd79b85fd679016","url":"monacoeditorwork/editor.worker.bundle.js"},{"revision":"fdcba0d09aac31df7a0bc652f6e739bd","url":"monacoeditorwork/css.worker.bundle.js"},{"revision":null,"url":"assets/zig-CtAjaIiF.js"},{"revision":null,"url":"assets/zenscript-DFMywo_P.js"},{"revision":null,"url":"assets/yaml-CQiMLVcZ.js"},{"revision":null,"url":"assets/xsl-CU0ZndUO.js"},{"revision":null,"url":"assets/xml-DhrxbATj.js"},{"revision":null,"url":"assets/x-BcqfTY_7.js"},{"revision":null,"url":"assets/wolfram-6SXLUqao.js"},{"revision":null,"url":"assets/wit-P6u7mfwy.js"},{"revision":null,"url":"assets/wikitext-DYQDUYf2.js"},{"revision":null,"url":"assets/wgsl-D-YUAWkP.js"},{"revision":null,"url":"assets/wenyan-Bc5Pnm9l.js"},{"revision":null,"url":"assets/wasm-iWe7Fzjc.js"},{"revision":null,"url":"assets/wasm-DQE71XTB.js"},{"revision":null,"url":"assets/vyper-Cnd9s5j-.js"},{"revision":null,"url":"assets/vue-vine-CxSG2ojf.js"},{"revision":null,"url":"assets/vue-html-DEYRkS1V.js"},{"revision":null,"url":"assets/vue-D6f-rprj.js"},{"revision":null,"url":"assets/vitesse-light-C7DHrJCK.js"},{"revision":null,"url":"assets/vitesse-dark-B9CkIB6r.js"},{"revision":null,"url":"assets/vitesse-black-DkXP6Sv-.js"},{"revision":null,"url":"assets/viml-Y42h_ExQ.js"},{"revision":null,"url":"assets/video-preview-B0ZWpX0F.js"},{"revision":null,"url":"assets/vhdl-B9ZX-sUL.js"},{"revision":null,"url":"assets/vesper-CY3qd7E_.js"},{"revision":null,"url":"assets/verilog-CvV6RHPD.js"},{"revision":null,"url":"assets/vendor-xterm-DkTCHfhq.css"},{"revision":null,"url":"assets/vendor-xterm-CU6zIYMB.js"},{"revision":null,"url":"assets/vendor-ui-CaeeFO0B.js"},{"revision":null,"url":"assets/vendor-mermaid-DrwG0NYt.js"},{"revision":null,"url":"assets/vendor-markdown-Ls5AcU91.js"},{"revision":null,"url":"assets/vb-BxJT2RAy.js"},{"revision":null,"url":"assets/vala-DwebjH3H.js"},{"revision":null,"url":"assets/v-xTGhWZuD.js"},{"revision":null,"url":"assets/utils-DoY4yTP-.js"},{"revision":null,"url":"assets/use-websocket-iJfc7EbK.js"},{"revision":null,"url":"assets/use-open-team-member-H4k74HnV.js"},{"revision":null,"url":"assets/use-monaco-theme-DSCdlrjO.js"},{"revision":null,"url":"assets/use-is-mobile-BXGVvczu.js"},{"revision":null,"url":"assets/use-blob-url-BKyVxOZw.js"},{"revision":null,"url":"assets/typst-CcHSKFZj.js"},{"revision":null,"url":"assets/typespec-B7QlHMZ_.js"},{"revision":null,"url":"assets/typescript-MpLarYn1.js"},{"revision":null,"url":"assets/twig-DOePpLOL.js"},{"revision":null,"url":"assets/turtle-B-WBIOa6.js"},{"revision":null,"url":"assets/tsx-CjFg0lgw.js"},{"revision":null,"url":"assets/tsv-CraRcWdU.js"},{"revision":null,"url":"assets/ts-tags-pt-Ug0hK.js"},{"revision":null,"url":"assets/treemap-KZPCXAKY-Be3KNmns.js"},{"revision":null,"url":"assets/tool-cards-DCAXGDJI.js"},{"revision":null,"url":"assets/toml-CirbOgDP.js"},{"revision":null,"url":"assets/tokyo-night-RKsj2-tv.js"},{"revision":null,"url":"assets/tex-0loAoXJG.js"},{"revision":null,"url":"assets/terraform-BzZw4T1z.js"},{"revision":null,"url":"assets/terminal-tab-DF7521sT.js"},{"revision":null,"url":"assets/templ-MlpvJx4a.js"},{"revision":null,"url":"assets/team-member-window-content-DNJiYWS7.js"},{"revision":null,"url":"assets/team-member-sheet-CjgaQjsZ.js"},{"revision":null,"url":"assets/tcl-DwCHCB1K.js"},{"revision":null,"url":"assets/tasl-Cu-TRTKx.js"},{"revision":null,"url":"assets/talonscript-CFIidoBA.js"},{"revision":null,"url":"assets/table-CHmxuh6M.js"},{"revision":null,"url":"assets/tab-store-DAsvpx4t.js"},{"revision":null,"url":"assets/systemd-Dz-bNsDQ.js"},{"revision":null,"url":"assets/system-verilog-GbHpszs3.js"},{"revision":null,"url":"assets/system-monitor-window-content-CetwYOQy.js"},{"revision":null,"url":"assets/system-monitor-tab-Ce-8Axhh.js"},{"revision":null,"url":"assets/system-monitor-body-CV7-0hZG.js"},{"revision":null,"url":"assets/synthwave-84-cg9264l9.js"},{"revision":null,"url":"assets/swift-BnGb6Lgc.js"},{"revision":null,"url":"assets/svelte--YWjlOrK.js"},{"revision":null,"url":"assets/surrealql-DE5_63MS.js"},{"revision":null,"url":"assets/stylus-DdP992aO.js"},{"revision":null,"url":"assets/stata-BuuClVDg.js"},{"revision":null,"url":"assets/ssh-config-CLCtNkkd.js"},{"revision":null,"url":"assets/sqlite-viewer-Cs-_D942.js"},{"revision":null,"url":"assets/sql-query-editor-BwPjEaP9.js"},{"revision":null,"url":"assets/sql-BcVs-eX4.js"},{"revision":null,"url":"assets/splunk-BXfw5ZLy.js"},{"revision":null,"url":"assets/sparql-N2VclEsF.js"},{"revision":null,"url":"assets/sparkles-Dqsf3hq6.js"},{"revision":null,"url":"assets/soy-oVDnPzzh.js"},{"revision":null,"url":"assets/solidity-DOgi1N4w.js"},{"revision":null,"url":"assets/solarized-light-BoKQZaYU.js"},{"revision":null,"url":"assets/solarized-dark-CF83zRXM.js"},{"revision":null,"url":"assets/snazzy-light-Bc6Q2G89.js"},{"revision":null,"url":"assets/smalltalk-CORtd03t.js"},{"revision":null,"url":"assets/slack-ochin-mdkc1ldu.js"},{"revision":null,"url":"assets/slack-dark-B1eg0_m2.js"},{"revision":null,"url":"assets/shield-off-DULFtyLS.js"},{"revision":null,"url":"assets/shield-check-C5laObJv.js"},{"revision":null,"url":"assets/shellsession-BKBIqTlM.js"},{"revision":null,"url":"assets/shellscript-BkIl4ApC.js"},{"revision":null,"url":"assets/shaderlab-XkqfIfO8.js"},{"revision":null,"url":"assets/settings-tab-mPxrKkfm.js"},{"revision":null,"url":"assets/settings-store-C20lqh0G.js"},{"revision":null,"url":"assets/send-to-chat-BcO39BDR.js"},{"revision":null,"url":"assets/sdbl-iISFvIep.js"},{"revision":null,"url":"assets/scss-_nWV0bsb.js"},{"revision":null,"url":"assets/scheme-DS7TUbN7.js"},{"revision":null,"url":"assets/scala-sXSwsNyq.js"},{"revision":null,"url":"assets/save-C4z1p51e.js"},{"revision":null,"url":"assets/sass-Bz7NVxDb.js"},{"revision":null,"url":"assets/sas-CoOOEbOO.js"},{"revision":null,"url":"assets/rust-Dy2qsphD.js"},{"revision":null,"url":"assets/run-in-terminal-CyS5Itj-.js"},{"revision":null,"url":"assets/ruby-ieATBhWm.js"},{"revision":null,"url":"assets/rst-BRpofyNs.js"},{"revision":null,"url":"assets/rosmsg-CdaZFgI8.js"},{"revision":null,"url":"assets/rose-pine-moon-CoHDmsIw.js"},{"revision":null,"url":"assets/rose-pine-hvkvQzvU.js"},{"revision":null,"url":"assets/rose-pine-dawn-D7lwhUei.js"},{"revision":null,"url":"assets/ron-BtVTWW4b.js"},{"revision":null,"url":"assets/rolldown-runtime-FhOqtrmT.js"},{"revision":null,"url":"assets/riscv-BbbBYJBo.js"},{"revision":null,"url":"assets/resolve-theme-B9ABAH_3.js"},{"revision":null,"url":"assets/rel-BXKWIElA.js"},{"revision":null,"url":"assets/regexp-Bero1BN2.js"},{"revision":null,"url":"assets/reg-BqOKrIOw.js"},{"revision":null,"url":"assets/red-BMXMywmL.js"},{"revision":null,"url":"assets/react-I_EwPIZi.js"},{"revision":null,"url":"assets/razor-wY_6wUeC.js"},{"revision":null,"url":"assets/raku-BwutWhBF.js"},{"revision":null,"url":"assets/radar-KQ55EAFF-JJ6O1Er_.js"},{"revision":null,"url":"assets/racket-CzRQrGc4.js"},{"revision":null,"url":"assets/r-BlqnNkHS.js"},{"revision":null,"url":"assets/qss-dNZ2btnl.js"},{"revision":null,"url":"assets/qmldir-CtZMwhcW.js"},{"revision":null,"url":"assets/qml-DRDkUp75.js"},{"revision":null,"url":"assets/python-C7TlkHhK.js"},{"revision":null,"url":"assets/purescript-DvgJgPdy.js"},{"revision":null,"url":"assets/puppet-D2Dkv62u.js"},{"revision":null,"url":"assets/pug-C2kdkhQ6.js"},{"revision":null,"url":"assets/proto-wr-TpAK_.js"},{"revision":null,"url":"assets/prolog-DOn5lR1e.js"},{"revision":null,"url":"assets/project-store-B8BkHXy5.js"},{"revision":null,"url":"assets/process-table-CI-fnVsy.js"},{"revision":null,"url":"assets/prisma-BE8GR1lH.js"},{"revision":null,"url":"assets/powershell-LFy3MUTP.js"},{"revision":null,"url":"assets/powerquery-Db7SXLbO.js"},{"revision":null,"url":"assets/postgres-viewer-BWZLW7kI.js"},{"revision":null,"url":"assets/postcss-CBKY1FTZ.js"},{"revision":null,"url":"assets/polar-rcjs3i9R.js"},{"revision":null,"url":"assets/poimandres-G5YoaIFf.js"},{"revision":null,"url":"assets/po-CFJcWgjr.js"},{"revision":null,"url":"assets/plus-BM-Ty0fp.js"},{"revision":null,"url":"assets/plsql-cfqEtMD3.js"},{"revision":null,"url":"assets/plastic-Bf_zE5KL.js"},{"revision":null,"url":"assets/pkl-CuOV7SsU.js"},{"revision":null,"url":"assets/pie-UPGHQEXC-SLS6i76l.js"},{"revision":null,"url":"assets/php-CDsOOxXn.js"},{"revision":null,"url":"assets/perl-AMNGIneF.js"},{"revision":null,"url":"assets/pdf-preview-dwRe54ht.js"},{"revision":null,"url":"assets/pascal-i5niy3e7.js"},{"revision":null,"url":"assets/panel-store-DCD82zc1.js"},{"revision":null,"url":"assets/packet-RMMSAZCW-BIhk1mvp.js"},{"revision":null,"url":"assets/overview-panel-BxDohIEa.js"},{"revision":null,"url":"assets/openscad-BLMdTUU8.js"},{"revision":null,"url":"assets/one-light-BPGUJeYI.js"},{"revision":null,"url":"assets/one-dark-pro-B1cviILi.js"},{"revision":null,"url":"assets/odin-Cyjw8woZ.js"},{"revision":null,"url":"assets/ocaml-vvoHTak0.js"},{"revision":null,"url":"assets/objective-cpp-DVkIA8A0.js"},{"revision":null,"url":"assets/objective-c-Cl9KU86S.js"},{"revision":null,"url":"assets/nushell-DUh4UGx1.js"},{"revision":null,"url":"assets/number-overlay-editor-D9SkFg1Y.js"},{"revision":null,"url":"assets/notification-store-KwTAZT8b.js"},{"revision":null,"url":"assets/nord-CaBmcxFC.js"},{"revision":null,"url":"assets/nix-BgiorKFd.js"},{"revision":null,"url":"assets/nim-DLa8R3NS.js"},{"revision":null,"url":"assets/night-owl-_GD204Wr.js"},{"revision":null,"url":"assets/night-owl-light-DNgkw3kl.js"},{"revision":null,"url":"assets/nginx-Qb9pUk1g.js"},{"revision":null,"url":"assets/nextflow-groovy-CJXsuXGB.js"},{"revision":null,"url":"assets/nextflow-DR8PhpF8.js"},{"revision":null,"url":"assets/narrat-CXww2YQL.js"},{"revision":null,"url":"assets/move-kwBhnhrG.js"},{"revision":null,"url":"assets/moonbit-AAzI-Hd-.js"},{"revision":null,"url":"assets/monokai-dci_PdCm.js"},{"revision":null,"url":"assets/mojo-t90PR-Y2.js"},{"revision":null,"url":"assets/mobile-explorer-sheet-D1Bv9UCT.js"},{"revision":null,"url":"assets/mobile-bottom-sheet-BUOJgiaZ.js"},{"revision":null,"url":"assets/mipsasm-Bjer5HwK.js"},{"revision":null,"url":"assets/min-light-Cx6vFiEX.js"},{"revision":null,"url":"assets/min-dark-CMJwqJqB.js"},{"revision":null,"url":"assets/mermaid-BYc0-B0U.js"},{"revision":null,"url":"assets/media-url-CylYQld1.js"},{"revision":null,"url":"assets/mdx-Cr2TR5fj.js"},{"revision":null,"url":"assets/mdc-D690aU2C.js"},{"revision":null,"url":"assets/matlab-C-He_NTH.js"},{"revision":null,"url":"assets/material-theme-palenight-CY5hgm7h.js"},{"revision":null,"url":"assets/material-theme-ocean-EMOpLpa2.js"},{"revision":null,"url":"assets/material-theme-lighter-JbgOgV3n.js"},{"revision":null,"url":"assets/material-theme-darker-BDGty7YH.js"},{"revision":null,"url":"assets/material-theme-CWYOVxsP.js"},{"revision":null,"url":"assets/marko--UOicMGo.js"},{"revision":null,"url":"assets/markdown-renderer-CpRlpLHw.js"},{"revision":null,"url":"assets/markdown-renderer-B317vEys.js"},{"revision":null,"url":"assets/markdown-p5mNledS.js"},{"revision":null,"url":"assets/make-GYq4qVbx.js"},{"revision":null,"url":"assets/luau-C9TsYwNt.js"},{"revision":null,"url":"assets/lua-CcKiU6HW.js"},{"revision":null,"url":"assets/logo-CrIjcMZT.js"},{"revision":null,"url":"assets/log-Bo5z9bNz.js"},{"revision":null,"url":"assets/llvm-DvWiVwvU.js"},{"revision":null,"url":"assets/liquid-CVSvu_Wn.js"},{"revision":null,"url":"assets/light-plus-BfS7gPcj.js"},{"revision":null,"url":"assets/libesm-CPh1Av0r.js"},{"revision":null,"url":"assets/lib-DgNcCtj3.js"},{"revision":null,"url":"assets/less-Xj6Ka0fF.js"},{"revision":null,"url":"assets/lean-UAm1HOKl.js"},{"revision":null,"url":"assets/latex-D6TOl-L2.js"},{"revision":null,"url":"assets/laserwave-DfAPJ1tt.js"},{"revision":null,"url":"assets/kusto--serPb0x.js"},{"revision":null,"url":"assets/kotlin-DWughK73.js"},{"revision":null,"url":"assets/keybindings-store-CDfTjwZX.js"},{"revision":null,"url":"assets/kdl-Bn8R1REF.js"},{"revision":null,"url":"assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2"},{"revision":null,"url":"assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2"},{"revision":null,"url":"assets/KaTeX_Size2-Regular-Dy4dx90m.woff2"},{"revision":null,"url":"assets/KaTeX_Size1-Regular-mCD8mA8B.woff2"},{"revision":null,"url":"assets/KaTeX_Script-Regular-D3wIWfF6.woff2"},{"revision":null,"url":"assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2"},{"revision":null,"url":"assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2"},{"revision":null,"url":"assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2"},{"revision":null,"url":"assets/KaTeX_Math-Italic-t53AETM-.woff2"},{"revision":null,"url":"assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2"},{"revision":null,"url":"assets/KaTeX_Main-Regular-B22Nviop.woff2"},{"revision":null,"url":"assets/KaTeX_Main-Italic-NWA7e6Wa.woff2"},{"revision":null,"url":"assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2"},{"revision":null,"url":"assets/KaTeX_Main-Bold-Cx986IdX.woff2"},{"revision":null,"url":"assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2"},{"revision":null,"url":"assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2"},{"revision":null,"url":"assets/KaTeX_AMS-Regular-BQhdFMY1.woff2"},{"revision":null,"url":"assets/kanagawa-wave-CyGoWN4d.js"},{"revision":null,"url":"assets/kanagawa-lotus-yQgHUGwU.js"},{"revision":null,"url":"assets/kanagawa-dragon-BculT_Y1.js"},{"revision":null,"url":"assets/just-BGdHchwS.js"},{"revision":null,"url":"assets/julia-IOQNJAB7.js"},{"revision":null,"url":"assets/jsx-tJp2Cyqu.js"},{"revision":null,"url":"assets/jssm-Db17uybX.js"},{"revision":null,"url":"assets/jsonnet-C5pdZVuo.js"},{"revision":null,"url":"assets/jsonl-JvhrmQJI.js"},{"revision":null,"url":"assets/jsonc-C5MjoWGx.js"},{"revision":null,"url":"assets/json5-BQ2vpqjp.js"},{"revision":null,"url":"assets/json-BjZ3dAk6.js"},{"revision":null,"url":"assets/jison-CciJg2NW.js"},{"revision":null,"url":"assets/jinja-CWsQj2y0.js"},{"revision":null,"url":"assets/javascript-C-M7sa2e.js"},{"revision":null,"url":"assets/java-CnmpcjcT.js"},{"revision":null,"url":"assets/ini-DEE_vSHQ.js"},{"revision":null,"url":"assets/info-3K5VOQVL-lRlrTlkb.js"},{"revision":null,"url":"assets/index-Ch8l9de-.js"},{"revision":null,"url":"assets/index-BiTiXgBZ.css"},{"revision":null,"url":"assets/imba-C_JJXckG.js"},{"revision":null,"url":"assets/image-preview-Ss38ex8g.js"},{"revision":null,"url":"assets/image-gallery-CGvlv8zR.js"},{"revision":null,"url":"assets/hy-BrWBHtHY.js"},{"revision":null,"url":"assets/hxml-Dc3jBXuf.js"},{"revision":null,"url":"assets/hurl-WDC6sSBz.js"},{"revision":null,"url":"assets/http-G1K2FozA.js"},{"revision":null,"url":"assets/html-NLWdst5q.js"},{"revision":null,"url":"assets/html-derivative-CJf_Le2z.js"},{"revision":null,"url":"assets/houston-C6ASpUjT.js"},{"revision":null,"url":"assets/horizon-DtdQ6qjv.js"},{"revision":null,"url":"assets/horizon-bright-BXSF_uKq.js"},{"revision":null,"url":"assets/hlsl-CRuQLBSa.js"},{"revision":null,"url":"assets/hjson-BXwae2M1.js"},{"revision":null,"url":"assets/hcl-Bi3ho6yC.js"},{"revision":null,"url":"assets/haxe-B7fSduTQ.js"},{"revision":null,"url":"assets/haskell-C4Tw-TDa.js"},{"revision":null,"url":"assets/handlebars-398uCI13.js"},{"revision":null,"url":"assets/haml-DKeIPQWM.js"},{"revision":null,"url":"assets/hack-DG151vit.js"},{"revision":null,"url":"assets/gruvbox-light-soft-CX-fYc64.js"},{"revision":null,"url":"assets/gruvbox-light-medium-APHsh6Mo.js"},{"revision":null,"url":"assets/gruvbox-light-hard-CLQCq2-w.js"},{"revision":null,"url":"assets/gruvbox-dark-soft-Cwq0dWVj.js"},{"revision":null,"url":"assets/gruvbox-dark-medium-Dp1eeid2.js"},{"revision":null,"url":"assets/gruvbox-dark-hard-C8QZ3gzY.js"},{"revision":null,"url":"assets/group-chat-tab-dYuuknLN.js"},{"revision":null,"url":"assets/groovy-BHAgLTeO.js"},{"revision":null,"url":"assets/graphql-BK75fiXl.js"},{"revision":null,"url":"assets/go-DiRVJ22U.js"},{"revision":null,"url":"assets/gnuplot-D7bRdY_M.js"},{"revision":null,"url":"assets/gn-Cv5WEzHc.js"},{"revision":null,"url":"assets/glsl-DbkxE1TN.js"},{"revision":null,"url":"assets/glimmer-ts-C_Njj0nK.js"},{"revision":null,"url":"assets/glimmer-js-1-6JMJlj.js"},{"revision":null,"url":"assets/glide-data-grid-nthEL3fk.css"},{"revision":null,"url":"assets/glide-data-grid-n4ox_uev.js"},{"revision":null,"url":"assets/gleam-DwSyXJWP.js"},{"revision":null,"url":"assets/github-light-high-contrast-Dt0HJq50.js"},{"revision":null,"url":"assets/github-light-default-B-cHtJJV.js"},{"revision":null,"url":"assets/github-light-D4PqBHGZ.js"},{"revision":null,"url":"assets/github-dark-nW2F-RLd.js"},{"revision":null,"url":"assets/github-dark-high-contrast-CW5ZgIDh.js"},{"revision":null,"url":"assets/github-dark-dimmed-Cv9lj6f-.js"},{"revision":null,"url":"assets/github-dark-default-BK_1Qgb8.js"},{"revision":null,"url":"assets/gitGraph-HDMCJU4V-D4hYLNJU.js"},{"revision":null,"url":"assets/git-rebase-C5Gql6Ma.js"},{"revision":null,"url":"assets/git-log-panel-CfpXRJcP.js"},{"revision":null,"url":"assets/git-commit-DH6mY3Km.js"},{"revision":null,"url":"assets/gherkin-CLFpoVYJ.js"},{"revision":null,"url":"assets/genie-CowkJhej.js"},{"revision":null,"url":"assets/gdshader-D-RM-SQk.js"},{"revision":null,"url":"assets/gdscript-prYHMgtD.js"},{"revision":null,"url":"assets/gdresource-BGRvoWfC.js"},{"revision":null,"url":"assets/fsharp-CZsYmiw9.js"},{"revision":null,"url":"assets/fortran-free-form-DKWSTamT.js"},{"revision":null,"url":"assets/fortran-fixed-form-CXLIv8Ox.js"},{"revision":null,"url":"assets/format-bytes-BE_W3UBg.js"},{"revision":null,"url":"assets/fluent-CDxb_sgw.js"},{"revision":null,"url":"assets/fish-Byy9dusu.js"},{"revision":null,"url":"assets/file-exclamation-point-COAwgNGw.js"},{"revision":null,"url":"assets/fennel-WuBw6IR1.js"},{"revision":null,"url":"assets/eye-off-CUdzgmX8.js"},{"revision":null,"url":"assets/extension-webview-BH_mWYMe.js"},{"revision":null,"url":"assets/explorer-window-content-DdrGwk3w.js"},{"revision":null,"url":"assets/explorer-body-j_4hVc34.js"},{"revision":null,"url":"assets/everforest-light-CTgsVNMr.js"},{"revision":null,"url":"assets/everforest-dark-uC8QYotQ.js"},{"revision":null,"url":"assets/esm-CZs9WVDO.js"},{"revision":null,"url":"assets/erlang-BCBe8nCc.js"},{"revision":null,"url":"assets/erb-WI7jUaB6.js"},{"revision":null,"url":"assets/emacs-lisp-Ao5SW8ay.js"},{"revision":null,"url":"assets/elm-Bfs2qNPR.js"},{"revision":null,"url":"assets/elixir-D466WCFm.js"},{"revision":null,"url":"assets/edit-diff-preview-gq6ALf2B.js"},{"revision":null,"url":"assets/edge-Bhqk64zS.js"},{"revision":null,"url":"assets/dream-maker-DZAPbPTi.js"},{"revision":null,"url":"assets/dracula-soft-BYqvXm6Z.js"},{"revision":null,"url":"assets/dracula-C3m-w12D.js"},{"revision":null,"url":"assets/download-zCATy4x4.js"},{"revision":null,"url":"assets/dotenv-D6Pl6aOU.js"},{"revision":null,"url":"assets/docx-preview-Cx-zLwAw.js"},{"revision":null,"url":"assets/docker-DNsAo_qO.js"},{"revision":null,"url":"assets/dist-Di6G_5jU.js"},{"revision":null,"url":"assets/dist-DB1Oaqcc.js"},{"revision":null,"url":"assets/diff-viewer-DGxVg1pD.js"},{"revision":null,"url":"assets/diff-BtOXapES.js"},{"revision":null,"url":"assets/desktop-CN0IXPrP.js"},{"revision":null,"url":"assets/dax-BNHD-QBA.js"},{"revision":null,"url":"assets/database-viewer-DevnWTV4.js"},{"revision":null,"url":"assets/database-BH0urvbs.js"},{"revision":null,"url":"assets/data-grid-types-CYvF-xK5.js"},{"revision":null,"url":"assets/data-grid-overlay-editor-D9il5DZS.js"},{"revision":null,"url":"assets/dart-CWQcdkXk.js"},{"revision":null,"url":"assets/dark-plus-Cj7rVwh-.js"},{"revision":null,"url":"assets/d-BALR-QuP.js"},{"revision":null,"url":"assets/cypher-rZkKwqZc.js"},{"revision":null,"url":"assets/cue-BrxRmilg.js"},{"revision":null,"url":"assets/csv-preview-D1d0cxOJ.js"},{"revision":null,"url":"assets/csv-parser-CnS0wqr6.js"},{"revision":null,"url":"assets/csv-l1g_V5MV.js"},{"revision":null,"url":"assets/css-CqZqBD05.js"},{"revision":null,"url":"assets/csharp-CEmCZv9Q.js"},{"revision":null,"url":"assets/crystal-Vlwf2UMP.js"},{"revision":null,"url":"assets/createLucideIcon-D8pyde1A.js"},{"revision":null,"url":"assets/cpp-DHGV24J2.js"},{"revision":null,"url":"assets/coq-DHX_3IIo.js"},{"revision":null,"url":"assets/copy-DKn11Pye.js"},{"revision":null,"url":"assets/context-menu-Cq0u3SK9.js"},{"revision":null,"url":"assets/conflict-editor-fRTU3f1o.js"},{"revision":null,"url":"assets/common-lisp-KMlIwq5I.js"},{"revision":null,"url":"assets/coffee-CWGNOxds.js"},{"revision":null,"url":"assets/codeql-Bb229zuY.js"},{"revision":null,"url":"assets/codeowners-CQyVz4Qf.js"},{"revision":null,"url":"assets/code-editor-WELegzdp.js"},{"revision":null,"url":"assets/code-DDPoqVri.js"},{"revision":null,"url":"assets/cobol-BWSGjmWb.js"},{"revision":null,"url":"assets/cmake-CwerJun_.js"},{"revision":null,"url":"assets/clojure-DloMkd8K.js"},{"revision":null,"url":"assets/clock-CvhF4DJP.js"},{"revision":null,"url":"assets/clarity-F39L0xMJ.js"},{"revision":null,"url":"assets/circle-question-mark-CzR7YRc-.js"},{"revision":null,"url":"assets/circle-hjUGru6R.js"},{"revision":null,"url":"assets/chevron-right-BLOtX8Vy.js"},{"revision":null,"url":"assets/chat-tab-C060A94y.js"},{"revision":null,"url":"assets/catppuccin-mocha-NI2lfXzU.js"},{"revision":null,"url":"assets/catppuccin-macchiato-BJ7DfVEF.js"},{"revision":null,"url":"assets/catppuccin-latte-Dw40AcqA.js"},{"revision":null,"url":"assets/catppuccin-frappe-DIt_xR7m.js"},{"revision":null,"url":"assets/can-open-in-ppm-omBzUBBq.js"},{"revision":null,"url":"assets/cairo-BbIHl2iE.js"},{"revision":null,"url":"assets/cadence-B0GBC8OF.js"},{"revision":null,"url":"assets/c3-BZ_Z0RrR.js"},{"revision":null,"url":"assets/c-BpmrTvJh.js"},{"revision":null,"url":"assets/button-BA_fJOtX.js"},{"revision":null,"url":"assets/bsl-CVsbb6ap.js"},{"revision":null,"url":"assets/bot-CunPuEdW.js"},{"revision":null,"url":"assets/blade-CGkj2MUI.js"},{"revision":null,"url":"assets/bird2-Co7SeAI8.js"},{"revision":null,"url":"assets/bicep-fkeSA62l.js"},{"revision":null,"url":"assets/bibtex-CpXgZ9M_.js"},{"revision":null,"url":"assets/berry-CCT2pZcQ.js"},{"revision":null,"url":"assets/beancount-Xgvy6YRl.js"},{"revision":null,"url":"assets/bat-0X7DtGI-.js"},{"revision":null,"url":"assets/ballerina-C82NkRtj.js"},{"revision":null,"url":"assets/ayu-mirage-DyElQHtm.js"},{"revision":null,"url":"assets/ayu-light-D8PVj-e6.js"},{"revision":null,"url":"assets/ayu-dark-CpTORmLc.js"},{"revision":null,"url":"assets/awk-BQEGWxvX.js"},{"revision":null,"url":"assets/aurora-x-BJTLETG_.js"},{"revision":null,"url":"assets/audio-preview-CZLmhf__.js"},{"revision":null,"url":"assets/astro-BlFEeGYr.js"},{"revision":null,"url":"assets/asm-BzQdSvTe.js"},{"revision":null,"url":"assets/asciidoc-s_yVuR3t.js"},{"revision":null,"url":"assets/architecture-PBZL5I3N-C7ra20CE.js"},{"revision":null,"url":"assets/ara-BGN8GAYn.js"},{"revision":null,"url":"assets/apply-theme-BH_d4amk.js"},{"revision":null,"url":"assets/applescript-Dm9NI6KR.js"},{"revision":null,"url":"assets/apl-b9KVk-O4.js"},{"revision":null,"url":"assets/api-themes-CrK0tkW_.js"},{"revision":null,"url":"assets/api-settings-nblja3Rk.js"},{"revision":null,"url":"assets/api-settings-kQHV6pYZ.js"},{"revision":null,"url":"assets/api-client-CzABTreM.js"},{"revision":null,"url":"assets/api-client-BSB14J4w.js"},{"revision":null,"url":"assets/apex-B4-aoQ3K.js"},{"revision":null,"url":"assets/apache-CX1NU_Tl.js"},{"revision":null,"url":"assets/angular-ts-QXHpgB1C.js"},{"revision":null,"url":"assets/angular-html-Ctz0zN01.js"},{"revision":null,"url":"assets/andromeeda-D6qUCKJo.js"},{"revision":null,"url":"assets/ai-resource-editor-mdDKG-rw.js"},{"revision":null,"url":"assets/ada-DpuV9KwV.js"},{"revision":null,"url":"assets/actionscript-3-BDDHKqa4.js"},{"revision":null,"url":"assets/abap-MRbmsXOs.js"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":"26dccd02a2ef7522892015154f5e3680","url":"manifest.webmanifest"}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.18.9",
3
+ "version": "0.18.10",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,4 +1,9 @@
1
- import type { KillProcessRequest, ProcessInfo } from "../../../types/system-metrics";
1
+ import type { KillProcessRequest, ProcessGroup, ProcessInfo } from "../../../types/system-metrics";
2
+
3
+ /** What the confirm dialog is about to end: one row, or a whole app group. */
4
+ export type KillTarget =
5
+ | { kind: "process"; proc: ProcessInfo }
6
+ | { kind: "group"; group: ProcessGroup; members: ProcessInfo[] };
2
7
 
3
8
  /** Builds the kill request body from a process row's own identity fields — pulled out
4
9
  * of the dialog's confirm handler so the payload shape is unit-testable without
@@ -7,3 +12,25 @@ import type { KillProcessRequest, ProcessInfo } from "../../../types/system-metr
7
12
  export function buildKillRequest(proc: ProcessInfo, tree: boolean): KillProcessRequest {
8
13
  return { pid: proc.pid, startedAt: proc.startedAt, tree };
9
14
  }
15
+
16
+ /**
17
+ * Requests that end every member of a group.
18
+ *
19
+ * An ancestor roll-up ("root:<pid>") is ended with ONE tree kill on its root — the
20
+ * server walks the same descendant set it grouped by, so this is atomic on Windows
21
+ * (`taskkill /T`) and cannot miss a child that forked between snapshot and click.
22
+ * An orphan bucket ("exe:<name>") has no common ancestor, so each member is a
23
+ * separate single-process kill. Protected members are never included: the caller
24
+ * disables the button when any exist, and the server would 403 anyway.
25
+ */
26
+ export function buildGroupKillRequests(group: ProcessGroup, members: ProcessInfo[]): KillProcessRequest[] {
27
+ const root = group.rootPid !== null ? members.find((m) => m.pid === group.rootPid) : undefined;
28
+ if (root) return [buildKillRequest(root, true)];
29
+ return members.map((m) => buildKillRequest(m, false));
30
+ }
31
+
32
+ /** A group can be ended only when none of its members is refused by the guard —
33
+ * the PPM instance and system groups stay un-endable as a whole. */
34
+ export function isGroupProtected(members: ProcessInfo[]): boolean {
35
+ return members.some((m) => m.protected);
36
+ }
@@ -1,8 +1,8 @@
1
1
  /** Shared scale resolution for the canvas charts: a fixed ceiling (percentage axes)
2
2
  * or autoscale to the max of the visible window (byte-rate axes) — pulled out of
3
- * `sparkline-canvas.tsx`/`metric-chart-canvas.tsx` so it is unit-testable without a
4
- * canvas context. This is the fix for the bug where a 3% CPU reading rendered as a
5
- * full-height sparkline: the old code always did `Math.max(...data, 1)`. */
3
+ * `metric-chart-canvas.tsx` so it is unit-testable without a canvas context. A
4
+ * percentage axis must be pinned to 100, otherwise a 3% CPU reading autoscales to a
5
+ * full-height line. */
6
6
  export function resolveScaleMax(data: number[], maxValue?: number): number {
7
7
  if (maxValue !== undefined) return maxValue;
8
8
  return Math.max(...data, 1);