@hienlh/ppm 0.13.55 → 0.13.57

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 (89) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/assets/skills/ppm/SKILL.md +1 -1
  3. package/assets/skills/ppm/references/http-api.md +2 -1
  4. package/bun.lock +2129 -0
  5. package/bunfig.toml +2 -0
  6. package/dist/web/assets/ai-settings-section-BH2UOQH-.js +1 -0
  7. package/dist/web/assets/{api-settings-BJTjIG4U.js → api-settings-uQKmeGkl.js} +1 -1
  8. package/dist/web/assets/architecture-PBZL5I3N-DLKD1Xjj.js +1 -0
  9. package/dist/web/assets/{audio-preview-B53oeW0y.js → audio-preview-B4ZHsV9k.js} +1 -1
  10. package/dist/web/assets/chat-tab-DJzZ5i7L.js +16 -0
  11. package/dist/web/assets/code-editor-BsCmjMzu.js +8 -0
  12. package/dist/web/assets/{conflict-editor-C3l3pgtV.js → conflict-editor-CXWlXO9Z.js} +1 -1
  13. package/dist/web/assets/{csv-preview-asMfgR0r.js → csv-preview-DgArUJhd.js} +1 -1
  14. package/dist/web/assets/{data-grid-overlay-editor-DGjqvYn6.js → data-grid-overlay-editor-CmduzuPM.js} +1 -1
  15. package/dist/web/assets/{database-viewer-DNYgu_Jv.js → database-viewer-VRJVJPQL.js} +1 -1
  16. package/dist/web/assets/{diff-viewer-Dec4mKgl.js → diff-viewer-KulvDlWa.js} +1 -1
  17. package/dist/web/assets/{esm-xVTUq__o.js → esm-JPvheKDJ.js} +1 -1
  18. package/dist/web/assets/{extension-webview-b7T0yAq2.js → extension-webview-BoHzYEwh.js} +1 -1
  19. package/dist/web/assets/{git-log-panel-CWTTJERX.js → git-log-panel-95S8tWSL.js} +1 -1
  20. package/dist/web/assets/gitGraph-HDMCJU4V-2a0r4GHr.js +1 -0
  21. package/dist/web/assets/{glide-data-grid-_9gGGfZy.js → glide-data-grid-D7NyiuHK.js} +6 -6
  22. package/dist/web/assets/{image-preview-CzXKlWft.js → image-preview-K9Z3rVNA.js} +1 -1
  23. package/dist/web/assets/index-DwvSM9vu.css +2 -0
  24. package/dist/web/assets/{index-1_isAfRS.js → index-heahuZzl.js} +8 -8
  25. package/dist/web/assets/info-3K5VOQVL-CWKw4e0V.js +1 -0
  26. package/dist/web/assets/{input-By_lZeCs.js → input-B78ol0hV.js} +1 -1
  27. package/dist/web/assets/keybindings-store-DWD9jyRg.js +1 -0
  28. package/dist/web/assets/{markdown-renderer-DWIBF9Jg.js → markdown-renderer-D2zxqOkH.js} +3 -3
  29. package/dist/web/assets/notification-store-DcY2JHZt.js +1 -0
  30. package/dist/web/assets/{number-overlay-editor-DtUBprPW.js → number-overlay-editor-DS-qf63L.js} +1 -1
  31. package/dist/web/assets/packet-RMMSAZCW-Ar00Wbhd.js +1 -0
  32. package/dist/web/assets/{panel-store-C9VAhbZz.js → panel-store-B1pOXkyS.js} +1 -1
  33. package/dist/web/assets/pdf-preview-BukxhJ6o.js +1 -0
  34. package/dist/web/assets/pie-UPGHQEXC-Q4ssDdib.js +1 -0
  35. package/dist/web/assets/{port-forwarding-tab-BmRMiN32.js → port-forwarding-tab-Cq1866z4.js} +1 -1
  36. package/dist/web/assets/{postgres-viewer-DuiEoUGK.js → postgres-viewer-JQEY1K99.js} +3 -3
  37. package/dist/web/assets/{project-store-DlbHpIq0.js → project-store-BnvrVKBw.js} +1 -1
  38. package/dist/web/assets/radar-KQ55EAFF-kq5v4OKX.js +1 -0
  39. package/dist/web/assets/{settings-store-DQUFTPk2.js → settings-store-CSDOihqv.js} +2 -2
  40. package/dist/web/assets/settings-tab-CMZVAcoh.js +1 -0
  41. package/dist/web/assets/{sql-query-editor-BA80nuKp.js → sql-query-editor-BAsdaqSY.js} +1 -1
  42. package/dist/web/assets/{sqlite-viewer-Bev2XJe7.js → sqlite-viewer-BN3gOamm.js} +1 -1
  43. package/dist/web/assets/system-monitor-tab-BI7MfACw.js +1 -0
  44. package/dist/web/assets/{tab-store-CIcbSn0c.js → tab-store-DzftzxTL.js} +1 -1
  45. package/dist/web/assets/{terminal-tab-Ca5kyUS7.js → terminal-tab-ScnvZlQ9.js} +1 -1
  46. package/dist/web/assets/{x-ClICkcxR.js → trash-2-DkIfBY8d.js} +1 -1
  47. package/dist/web/assets/treemap-KZPCXAKY-DChODgHt.js +1 -0
  48. package/dist/web/assets/use-blob-url-DCUIEzjB.js +1 -0
  49. package/dist/web/assets/{use-monaco-theme-BLIgarH5.js → use-monaco-theme-qx6SfVRk.js} +1 -1
  50. package/dist/web/assets/{vendor-mermaid-DkqjpqJK.js → vendor-mermaid-DCie7hiR.js} +2 -2
  51. package/dist/web/assets/{video-preview-Bvd0OaYA.js → video-preview-CHP7HPJ1.js} +1 -1
  52. package/dist/web/assets/x-DfF6D5Js.js +1 -0
  53. package/dist/web/index.html +15 -14
  54. package/dist/web/sw.js +1 -1
  55. package/package.json +1 -1
  56. package/packages/ext-git-graph/src/webview-html.ts +17 -11
  57. package/src/index.ts +0 -0
  58. package/src/server/routes/resources.ts +28 -1
  59. package/src/web/components/editor/pdf-preview.tsx +36 -3
  60. package/src/web/components/editor/use-blob-url.ts +18 -9
  61. package/src/web/components/system/system-monitor-group-row.tsx +133 -0
  62. package/src/web/components/system/system-monitor-tab.tsx +65 -73
  63. package/dist/web/assets/ai-settings-section-AxLbNnLW.js +0 -1
  64. package/dist/web/assets/architecture-PBZL5I3N-CkdUQjA_.js +0 -1
  65. package/dist/web/assets/chat-tab-Clzw7eDP.js +0 -16
  66. package/dist/web/assets/code-editor-BgU5lFVC.js +0 -8
  67. package/dist/web/assets/gitGraph-HDMCJU4V-D3UR56AG.js +0 -1
  68. package/dist/web/assets/index-CDPVPZHJ.css +0 -2
  69. package/dist/web/assets/info-3K5VOQVL-DUhLSKI2.js +0 -1
  70. package/dist/web/assets/keybindings-store-BicDU0b1.js +0 -1
  71. package/dist/web/assets/notification-store-D_2wCv0z.js +0 -1
  72. package/dist/web/assets/packet-RMMSAZCW-BIpeVUGW.js +0 -1
  73. package/dist/web/assets/pdf-preview-C51mDesS.js +0 -1
  74. package/dist/web/assets/pie-UPGHQEXC-CNoizzjb.js +0 -1
  75. package/dist/web/assets/radar-KQ55EAFF-7dns-ho5.js +0 -1
  76. package/dist/web/assets/settings-tab-p3lxp6_T.js +0 -1
  77. package/dist/web/assets/system-monitor-tab-DfpsOgL3.js +0 -1
  78. package/dist/web/assets/treemap-KZPCXAKY-D3DZCLoE.js +0 -1
  79. package/dist/web/assets/use-blob-url-VgTGpely.js +0 -1
  80. /package/dist/web/assets/{api-client-BK4NPNoY.js → api-client-DiZgVOok.js} +0 -0
  81. /package/dist/web/assets/{csv-parser-D1b_lg2T.js → csv-parser-D8VHWVA6.js} +0 -0
  82. /package/dist/web/assets/{data-grid-types-DzL5W2em.js → data-grid-types-C29KDkZJ.js} +0 -0
  83. /package/dist/web/assets/{dist-CohudVKa.js → dist-DeY41KFi.js} +0 -0
  84. /package/dist/web/assets/{dist-BM2EHhLH.js → dist-PPUhQONj.js} +0 -0
  85. /package/dist/web/assets/{katex-CHaeM9QC.js → katex-DUj5OG1J.js} +0 -0
  86. /package/dist/web/assets/{lib-LPmTkMu4.js → lib-DrypSCq8.js} +0 -0
  87. /package/dist/web/assets/{react-DHBl6KRc.js → react-CfveccaI.js} +0 -0
  88. /package/dist/web/assets/{utils-CSCvNZxE.js → utils-E0yyGxXt.js} +0 -0
  89. /package/dist/web/assets/{vendor-xterm-vh96p1Au.js → vendor-xterm-t3d5xZdz.js} +0 -0
@@ -1 +1 @@
1
- import{b as e}from"./vendor-markdown-0Mxgxy0L.js";import{t}from"./file-exclamation-point-B__2Hrd6.js";import"./api-client-BK4NPNoY.js";import{$ as n}from"./index-1_isAfRS.js";import{t as r}from"./use-blob-url-VgTGpely.js";var i=e();function a({filePath:e,projectName:a}){let{blobUrl:o,error:s}=r(e,a);return s?(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary`,children:[(0,i.jsx)(t,{className:`size-10 text-text-subtle`}),(0,i.jsx)(`p`,{className:`text-sm`,children:`Failed to load video.`})]}):o?(0,i.jsx)(`div`,{className:`flex items-center justify-center h-full p-4 bg-surface overflow-auto`,children:(0,i.jsx)(`video`,{src:o,controls:!0,className:`max-w-full max-h-full`})}):(0,i.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,i.jsx)(n,{className:`size-5 animate-spin text-text-subtle`})})}export{a as VideoPreview};
1
+ import{b as e}from"./vendor-markdown-0Mxgxy0L.js";import{t}from"./file-exclamation-point-B__2Hrd6.js";import"./api-client-DiZgVOok.js";import{$ as n}from"./index-heahuZzl.js";import{t as r}from"./use-blob-url-DCUIEzjB.js";var i=e();function a({filePath:e,projectName:a}){let{blobUrl:o,error:s}=r(e,a);return s?(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary`,children:[(0,i.jsx)(t,{className:`size-10 text-text-subtle`}),(0,i.jsx)(`p`,{className:`text-sm`,children:`Failed to load video.`})]}):o?(0,i.jsx)(`div`,{className:`flex items-center justify-center h-full p-4 bg-surface overflow-auto`,children:(0,i.jsx)(`video`,{src:o,controls:!0,className:`max-w-full max-h-full`})}):(0,i.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,i.jsx)(n,{className:`size-5 animate-spin text-text-subtle`})})}export{a as VideoPreview};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-BjHrJDVb.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
@@ -39,31 +39,32 @@
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-1_isAfRS.js"></script>
42
+ <script type="module" crossorigin src="/assets/index-heahuZzl.js"></script>
43
43
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-FhOqtrmT.js">
44
- <link rel="modulepreload" crossorigin href="/assets/vendor-mermaid-DkqjpqJK.js">
44
+ <link rel="modulepreload" crossorigin href="/assets/vendor-mermaid-DCie7hiR.js">
45
45
  <link rel="modulepreload" crossorigin href="/assets/vendor-markdown-0Mxgxy0L.js">
46
46
  <link rel="modulepreload" crossorigin href="/assets/vendor-ui-UXCWAcmi.js">
47
- <link rel="modulepreload" crossorigin href="/assets/utils-CSCvNZxE.js">
47
+ <link rel="modulepreload" crossorigin href="/assets/utils-E0yyGxXt.js">
48
48
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-BjHrJDVb.js">
49
- <link rel="modulepreload" crossorigin href="/assets/x-ClICkcxR.js">
50
- <link rel="modulepreload" crossorigin href="/assets/input-By_lZeCs.js">
51
- <link rel="modulepreload" crossorigin href="/assets/react-DHBl6KRc.js">
52
- <link rel="modulepreload" crossorigin href="/assets/api-client-BK4NPNoY.js">
53
- <link rel="modulepreload" crossorigin href="/assets/settings-store-DQUFTPk2.js">
49
+ <link rel="modulepreload" crossorigin href="/assets/x-DfF6D5Js.js">
50
+ <link rel="modulepreload" crossorigin href="/assets/input-B78ol0hV.js">
51
+ <link rel="modulepreload" crossorigin href="/assets/react-CfveccaI.js">
52
+ <link rel="modulepreload" crossorigin href="/assets/api-client-DiZgVOok.js">
53
+ <link rel="modulepreload" crossorigin href="/assets/settings-store-CSDOihqv.js">
54
54
  <link rel="modulepreload" crossorigin href="/assets/eye-off-BacF7RVS.js">
55
55
  <link rel="modulepreload" crossorigin href="/assets/chevron-down-BMo4cBth.js">
56
56
  <link rel="modulepreload" crossorigin href="/assets/globe-CQ8NAYvi.js">
57
+ <link rel="modulepreload" crossorigin href="/assets/trash-2-DkIfBY8d.js">
57
58
  <link rel="modulepreload" crossorigin href="/assets/refresh-cw-CRD2qr4U.js">
58
- <link rel="modulepreload" crossorigin href="/assets/api-settings-BJTjIG4U.js">
59
- <link rel="modulepreload" crossorigin href="/assets/ai-settings-section-AxLbNnLW.js">
59
+ <link rel="modulepreload" crossorigin href="/assets/api-settings-uQKmeGkl.js">
60
+ <link rel="modulepreload" crossorigin href="/assets/ai-settings-section-BH2UOQH-.js">
60
61
  <link rel="modulepreload" crossorigin href="/assets/database-Dc8mr-dP.js">
61
62
  <link rel="modulepreload" crossorigin href="/assets/chevron-right-CD8e6Aj4.js">
62
63
  <link rel="modulepreload" crossorigin href="/assets/search-D90WJ5fo.js">
63
- <link rel="modulepreload" crossorigin href="/assets/panel-store-C9VAhbZz.js">
64
- <link rel="modulepreload" crossorigin href="/assets/project-store-DlbHpIq0.js">
65
- <link rel="modulepreload" crossorigin href="/assets/tab-store-CIcbSn0c.js">
66
- <link rel="stylesheet" crossorigin href="/assets/index-CDPVPZHJ.css">
64
+ <link rel="modulepreload" crossorigin href="/assets/panel-store-B1pOXkyS.js">
65
+ <link rel="modulepreload" crossorigin href="/assets/project-store-BnvrVKBw.js">
66
+ <link rel="modulepreload" crossorigin href="/assets/tab-store-DzftzxTL.js">
67
+ <link rel="stylesheet" crossorigin href="/assets/index-DwvSM9vu.css">
67
68
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
68
69
  <body class="bg-[#0f1419] text-[#e5e7eb] font-sans antialiased">
69
70
  <div id="portal" style="position: fixed; left: 0; top: 0; z-index: 9999;" /></div>
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":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"63bd4ab1b5c42a305941a3a738963ffd","url":"index.html"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":null,"url":"assets/project-store-DlbHpIq0.js"},{"revision":null,"url":"assets/utils-CSCvNZxE.js"},{"revision":null,"url":"assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2"},{"revision":null,"url":"assets/KaTeX_AMS-Regular-BQhdFMY1.woff2"},{"revision":null,"url":"assets/table-2wDtM4_B.js"},{"revision":null,"url":"assets/katex-CHaeM9QC.js"},{"revision":null,"url":"assets/extension-webview-b7T0yAq2.js"},{"revision":null,"url":"assets/arrow-down-D825m4vm.js"},{"revision":null,"url":"assets/api-settings-BJTjIG4U.js"},{"revision":null,"url":"assets/pie-UPGHQEXC-CNoizzjb.js"},{"revision":null,"url":"assets/code-editor-BgU5lFVC.js"},{"revision":null,"url":"assets/chat-tab-Clzw7eDP.js"},{"revision":null,"url":"assets/esm-xVTUq__o.js"},{"revision":null,"url":"assets/audio-preview-B53oeW0y.js"},{"revision":null,"url":"assets/settings-tab-p3lxp6_T.js"},{"revision":null,"url":"assets/sql-query-editor-BA80nuKp.js"},{"revision":null,"url":"assets/keybindings-store-BicDU0b1.js"},{"revision":null,"url":"assets/KaTeX_Main-Regular-B22Nviop.woff2"},{"revision":null,"url":"assets/port-forwarding-tab-BmRMiN32.js"},{"revision":null,"url":"assets/radar-KQ55EAFF-7dns-ho5.js"},{"revision":null,"url":"assets/chevron-down-BMo4cBth.js"},{"revision":null,"url":"assets/react-DHBl6KRc.js"},{"revision":null,"url":"assets/conflict-editor-C3l3pgtV.js"},{"revision":null,"url":"assets/sqlite-viewer-Bev2XJe7.js"},{"revision":null,"url":"assets/github.min-D2BCvnWf.css"},{"revision":null,"url":"assets/treemap-KZPCXAKY-D3DZCLoE.js"},{"revision":null,"url":"assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2"},{"revision":null,"url":"assets/dist-CohudVKa.js"},{"revision":null,"url":"assets/glide-data-grid-nthEL3fk.css"},{"revision":null,"url":"assets/settings-store-DQUFTPk2.js"},{"revision":null,"url":"assets/use-blob-url-VgTGpely.js"},{"revision":null,"url":"assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2"},{"revision":null,"url":"assets/terminal-tab-Ca5kyUS7.js"},{"revision":null,"url":"assets/vendor-markdown-0Mxgxy0L.js"},{"revision":null,"url":"assets/vendor-xterm-vh96p1Au.js"},{"revision":null,"url":"assets/wifi-LJEyIdXf.js"},{"revision":null,"url":"assets/tab-store-CIcbSn0c.js"},{"revision":null,"url":"assets/KaTeX_Main-Italic-NWA7e6Wa.woff2"},{"revision":null,"url":"assets/video-preview-Bvd0OaYA.js"},{"revision":null,"url":"assets/notification-store-D_2wCv0z.js"},{"revision":null,"url":"assets/use-monaco-theme-BLIgarH5.js"},{"revision":null,"url":"assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2"},{"revision":null,"url":"assets/panel-store-C9VAhbZz.js"},{"revision":null,"url":"assets/chevron-right-CD8e6Aj4.js"},{"revision":null,"url":"assets/data-grid-types-DzL5W2em.js"},{"revision":null,"url":"assets/index-CDPVPZHJ.css"},{"revision":null,"url":"assets/text-wrap-AZErifCu.js"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2"},{"revision":null,"url":"assets/globe-CQ8NAYvi.js"},{"revision":null,"url":"assets/data-grid-overlay-editor-DGjqvYn6.js"},{"revision":null,"url":"assets/glide-data-grid-_9gGGfZy.js"},{"revision":null,"url":"assets/gitGraph-HDMCJU4V-D3UR56AG.js"},{"revision":null,"url":"assets/rolldown-runtime-FhOqtrmT.js"},{"revision":null,"url":"assets/code-DiNmA3eR.js"},{"revision":null,"url":"assets/refresh-cw-CRD2qr4U.js"},{"revision":null,"url":"assets/search-D90WJ5fo.js"},{"revision":null,"url":"assets/vendor-ui-UXCWAcmi.js"},{"revision":null,"url":"assets/packet-RMMSAZCW-BIpeVUGW.js"},{"revision":null,"url":"assets/file-exclamation-point-B__2Hrd6.js"},{"revision":null,"url":"assets/KaTeX_Math-Italic-t53AETM-.woff2"},{"revision":null,"url":"assets/github-dark-dimmed.min-BrpRStFV.css"},{"revision":null,"url":"assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2"},{"revision":null,"url":"assets/KaTeX_Script-Regular-D3wIWfF6.woff2"},{"revision":null,"url":"assets/arrow-up-Rcw6_KKu.js"},{"revision":null,"url":"assets/database-Dc8mr-dP.js"},{"revision":null,"url":"assets/eye-off-BacF7RVS.js"},{"revision":null,"url":"assets/vendor-mermaid-DkqjpqJK.js"},{"revision":null,"url":"assets/postgres-viewer-DuiEoUGK.js"},{"revision":null,"url":"assets/lib-LPmTkMu4.js"},{"revision":null,"url":"assets/KaTeX_Main-Bold-Cx986IdX.woff2"},{"revision":null,"url":"assets/pdf-preview-C51mDesS.js"},{"revision":null,"url":"assets/markdown-renderer-DWIBF9Jg.js"},{"revision":null,"url":"assets/KaTeX_Size2-Regular-Dy4dx90m.woff2"},{"revision":null,"url":"assets/index-1_isAfRS.js"},{"revision":null,"url":"assets/git-log-panel-CWTTJERX.js"},{"revision":null,"url":"assets/system-monitor-tab-DfpsOgL3.js"},{"revision":null,"url":"assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2"},{"revision":null,"url":"assets/diff-viewer-Dec4mKgl.js"},{"revision":null,"url":"assets/KaTeX_Size1-Regular-mCD8mA8B.woff2"},{"revision":null,"url":"assets/architecture-PBZL5I3N-CkdUQjA_.js"},{"revision":null,"url":"assets/database-viewer-DNYgu_Jv.js"},{"revision":null,"url":"assets/number-overlay-editor-DtUBprPW.js"},{"revision":null,"url":"assets/csv-preview-asMfgR0r.js"},{"revision":null,"url":"assets/createLucideIcon-BjHrJDVb.js"},{"revision":null,"url":"assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2"},{"revision":null,"url":"assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2"},{"revision":null,"url":"assets/input-By_lZeCs.js"},{"revision":null,"url":"assets/api-client-BK4NPNoY.js"},{"revision":null,"url":"assets/sparkles-KCOEy7QI.js"},{"revision":null,"url":"assets/ai-settings-section-AxLbNnLW.js"},{"revision":null,"url":"assets/image-preview-CzXKlWft.js"},{"revision":null,"url":"assets/vendor-xterm-BrP-ENHg.css"},{"revision":null,"url":"assets/info-3K5VOQVL-DUhLSKI2.js"},{"revision":null,"url":"assets/x-ClICkcxR.js"},{"revision":null,"url":"assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2"},{"revision":null,"url":"assets/dist-BM2EHhLH.js"},{"revision":null,"url":"assets/csv-parser-D1b_lg2T.js"},{"revision":"d0f94ce046cf8cf09605ee7664dac557","url":"monacoeditorwork/html.worker.bundle.js"},{"revision":"a424156a79b9c1b907db93aa3180585a","url":"monacoeditorwork/editor.worker.bundle.js"},{"revision":"b3a7f967560c9816492a1567b3f7f0dc","url":"monacoeditorwork/css.worker.bundle.js"},{"revision":"a5d8a1acfc29c2a4c882a54ffc93def3","url":"monacoeditorwork/json.worker.bundle.js"},{"revision":"948e060affb598c339be40d69e1f6f9c","url":"monacoeditorwork/ts.worker.bundle.js"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"26dccd02a2ef7522892015154f5e3680","url":"manifest.webmanifest"}]),self.addEventListener(`push`,e=>{e.waitUntil(self.clients.matchAll({type:`window`,includeUncontrolled:!0}).then(t=>{if(t.some(e=>e.visibilityState===`visible`))return;let n=e.data?.json()??{title:`PPM`,body:`Chat completed`};return self.registration.showNotification(n.title,{body:n.body,icon:`/icon-192.svg`,badge:`/icon-192.svg`,tag:`ppm-chat-done`,silent:!1,data:{url:self.location.origin}})}))}),self.addEventListener(`notificationclick`,e=>{e.notification.close(),e.waitUntil(self.clients.matchAll({type:`window`,includeUncontrolled:!0}).then(t=>{for(let e of t)if(e.url.includes(self.location.origin)&&`focus`in e)return e.focus();return self.clients.openWindow(e.notification.data?.url||`/`)}))});
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":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"7ba9552006481c2e532e4da9edf90db8","url":"index.html"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":null,"url":"assets/react-CfveccaI.js"},{"revision":null,"url":"assets/settings-tab-CMZVAcoh.js"},{"revision":null,"url":"assets/index-heahuZzl.js"},{"revision":null,"url":"assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2"},{"revision":null,"url":"assets/database-viewer-VRJVJPQL.js"},{"revision":null,"url":"assets/api-settings-uQKmeGkl.js"},{"revision":null,"url":"assets/KaTeX_AMS-Regular-BQhdFMY1.woff2"},{"revision":null,"url":"assets/project-store-BnvrVKBw.js"},{"revision":null,"url":"assets/table-2wDtM4_B.js"},{"revision":null,"url":"assets/markdown-renderer-D2zxqOkH.js"},{"revision":null,"url":"assets/packet-RMMSAZCW-Ar00Wbhd.js"},{"revision":null,"url":"assets/video-preview-CHP7HPJ1.js"},{"revision":null,"url":"assets/arrow-down-D825m4vm.js"},{"revision":null,"url":"assets/pdf-preview-BukxhJ6o.js"},{"revision":null,"url":"assets/postgres-viewer-JQEY1K99.js"},{"revision":null,"url":"assets/use-blob-url-DCUIEzjB.js"},{"revision":null,"url":"assets/KaTeX_Main-Regular-B22Nviop.woff2"},{"revision":null,"url":"assets/notification-store-DcY2JHZt.js"},{"revision":null,"url":"assets/chevron-down-BMo4cBth.js"},{"revision":null,"url":"assets/sql-query-editor-BAsdaqSY.js"},{"revision":null,"url":"assets/dist-DeY41KFi.js"},{"revision":null,"url":"assets/diff-viewer-KulvDlWa.js"},{"revision":null,"url":"assets/pie-UPGHQEXC-Q4ssDdib.js"},{"revision":null,"url":"assets/github.min-D2BCvnWf.css"},{"revision":null,"url":"assets/radar-KQ55EAFF-kq5v4OKX.js"},{"revision":null,"url":"assets/settings-store-CSDOihqv.js"},{"revision":null,"url":"assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2"},{"revision":null,"url":"assets/info-3K5VOQVL-CWKw4e0V.js"},{"revision":null,"url":"assets/glide-data-grid-nthEL3fk.css"},{"revision":null,"url":"assets/esm-JPvheKDJ.js"},{"revision":null,"url":"assets/lib-DrypSCq8.js"},{"revision":null,"url":"assets/chat-tab-DJzZ5i7L.js"},{"revision":null,"url":"assets/glide-data-grid-D7NyiuHK.js"},{"revision":null,"url":"assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2"},{"revision":null,"url":"assets/panel-store-B1pOXkyS.js"},{"revision":null,"url":"assets/git-log-panel-95S8tWSL.js"},{"revision":null,"url":"assets/vendor-markdown-0Mxgxy0L.js"},{"revision":null,"url":"assets/wifi-LJEyIdXf.js"},{"revision":null,"url":"assets/KaTeX_Main-Italic-NWA7e6Wa.woff2"},{"revision":null,"url":"assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2"},{"revision":null,"url":"assets/chevron-right-CD8e6Aj4.js"},{"revision":null,"url":"assets/vendor-mermaid-DCie7hiR.js"},{"revision":null,"url":"assets/trash-2-DkIfBY8d.js"},{"revision":null,"url":"assets/text-wrap-AZErifCu.js"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2"},{"revision":null,"url":"assets/conflict-editor-CXWlXO9Z.js"},{"revision":null,"url":"assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2"},{"revision":null,"url":"assets/globe-CQ8NAYvi.js"},{"revision":null,"url":"assets/utils-E0yyGxXt.js"},{"revision":null,"url":"assets/rolldown-runtime-FhOqtrmT.js"},{"revision":null,"url":"assets/use-monaco-theme-qx6SfVRk.js"},{"revision":null,"url":"assets/input-B78ol0hV.js"},{"revision":null,"url":"assets/code-DiNmA3eR.js"},{"revision":null,"url":"assets/refresh-cw-CRD2qr4U.js"},{"revision":null,"url":"assets/search-D90WJ5fo.js"},{"revision":null,"url":"assets/vendor-ui-UXCWAcmi.js"},{"revision":null,"url":"assets/file-exclamation-point-B__2Hrd6.js"},{"revision":null,"url":"assets/KaTeX_Math-Italic-t53AETM-.woff2"},{"revision":null,"url":"assets/data-grid-types-C29KDkZJ.js"},{"revision":null,"url":"assets/katex-DUj5OG1J.js"},{"revision":null,"url":"assets/index-DwvSM9vu.css"},{"revision":null,"url":"assets/github-dark-dimmed.min-BrpRStFV.css"},{"revision":null,"url":"assets/number-overlay-editor-DS-qf63L.js"},{"revision":null,"url":"assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2"},{"revision":null,"url":"assets/KaTeX_Script-Regular-D3wIWfF6.woff2"},{"revision":null,"url":"assets/arrow-up-Rcw6_KKu.js"},{"revision":null,"url":"assets/ai-settings-section-BH2UOQH-.js"},{"revision":null,"url":"assets/database-Dc8mr-dP.js"},{"revision":null,"url":"assets/keybindings-store-DWD9jyRg.js"},{"revision":null,"url":"assets/eye-off-BacF7RVS.js"},{"revision":null,"url":"assets/image-preview-K9Z3rVNA.js"},{"revision":null,"url":"assets/system-monitor-tab-BI7MfACw.js"},{"revision":null,"url":"assets/KaTeX_Main-Bold-Cx986IdX.woff2"},{"revision":null,"url":"assets/port-forwarding-tab-Cq1866z4.js"},{"revision":null,"url":"assets/KaTeX_Size2-Regular-Dy4dx90m.woff2"},{"revision":null,"url":"assets/vendor-xterm-t3d5xZdz.js"},{"revision":null,"url":"assets/api-client-DiZgVOok.js"},{"revision":null,"url":"assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2"},{"revision":null,"url":"assets/KaTeX_Size1-Regular-mCD8mA8B.woff2"},{"revision":null,"url":"assets/x-DfF6D5Js.js"},{"revision":null,"url":"assets/treemap-KZPCXAKY-DChODgHt.js"},{"revision":null,"url":"assets/createLucideIcon-BjHrJDVb.js"},{"revision":null,"url":"assets/data-grid-overlay-editor-CmduzuPM.js"},{"revision":null,"url":"assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2"},{"revision":null,"url":"assets/gitGraph-HDMCJU4V-2a0r4GHr.js"},{"revision":null,"url":"assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2"},{"revision":null,"url":"assets/extension-webview-BoHzYEwh.js"},{"revision":null,"url":"assets/sparkles-KCOEy7QI.js"},{"revision":null,"url":"assets/audio-preview-B4ZHsV9k.js"},{"revision":null,"url":"assets/architecture-PBZL5I3N-DLKD1Xjj.js"},{"revision":null,"url":"assets/code-editor-BsCmjMzu.js"},{"revision":null,"url":"assets/sqlite-viewer-BN3gOamm.js"},{"revision":null,"url":"assets/csv-parser-D8VHWVA6.js"},{"revision":null,"url":"assets/csv-preview-DgArUJhd.js"},{"revision":null,"url":"assets/tab-store-DzftzxTL.js"},{"revision":null,"url":"assets/vendor-xterm-BrP-ENHg.css"},{"revision":null,"url":"assets/terminal-tab-ScnvZlQ9.js"},{"revision":null,"url":"assets/dist-PPUhQONj.js"},{"revision":null,"url":"assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2"},{"revision":"d0f94ce046cf8cf09605ee7664dac557","url":"monacoeditorwork/html.worker.bundle.js"},{"revision":"a424156a79b9c1b907db93aa3180585a","url":"monacoeditorwork/editor.worker.bundle.js"},{"revision":"b3a7f967560c9816492a1567b3f7f0dc","url":"monacoeditorwork/css.worker.bundle.js"},{"revision":"a5d8a1acfc29c2a4c882a54ffc93def3","url":"monacoeditorwork/json.worker.bundle.js"},{"revision":"948e060affb598c339be40d69e1f6f9c","url":"monacoeditorwork/ts.worker.bundle.js"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-512.svg"},{"revision":"a0fb34fc84eb148d51812cd62669f20d","url":"icon-192.svg"},{"revision":"26dccd02a2ef7522892015154f5e3680","url":"manifest.webmanifest"}]),self.addEventListener(`push`,e=>{e.waitUntil(self.clients.matchAll({type:`window`,includeUncontrolled:!0}).then(t=>{if(t.some(e=>e.visibilityState===`visible`))return;let n=e.data?.json()??{title:`PPM`,body:`Chat completed`};return self.registration.showNotification(n.title,{body:n.body,icon:`/icon-192.svg`,badge:`/icon-192.svg`,tag:`ppm-chat-done`,silent:!1,data:{url:self.location.origin}})}))}),self.addEventListener(`notificationclick`,e=>{e.notification.close(),e.waitUntil(self.clients.matchAll({type:`window`,includeUncontrolled:!0}).then(t=>{for(let e of t)if(e.url.includes(self.location.origin)&&`focus`in e)return e.focus();return self.clients.openWindow(e.notification.data?.url||`/`)}))});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.13.55",
3
+ "version": "0.13.57",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -1472,26 +1472,32 @@ function renderCommitList() {
1472
1472
  msgCol.className = 'col-message';
1473
1473
  let badges = '';
1474
1474
  if (commit.refs) {
1475
- // Merge remote+local refs: if origin/X and X both exist, show one "synced" badge
1476
- const localNames = new Set(commit.refs.filter(r => r.type === 'head' || r.type === 'local').map(r => r.name));
1475
+ // Known remote prefixes from repo info (e.g. "origin/", "upstream/")
1476
+ const remotePrefixes = state.remotes.map(r => r.name + '/');
1477
+ // Re-classify refs using known remotes (parser may misclassify local branches with "/" as remote)
1478
+ const classified = commit.refs.map(ref => {
1479
+ if (ref.type === 'head' || ref.type === 'tag' || ref.type === 'stash') return ref;
1480
+ const isActualRemote = remotePrefixes.some(p => ref.name.startsWith(p));
1481
+ return { ...ref, type: isActualRemote ? 'remote' : 'local' };
1482
+ });
1483
+ // Merge remote+local: if origin/X and X both exist, show one synced badge
1484
+ const localNames = new Set(classified.filter(r => r.type === 'head' || r.type === 'local').map(r => r.name));
1477
1485
  const mergedRemotes = new Set();
1478
- commit.refs.forEach(ref => {
1486
+ classified.forEach(ref => {
1479
1487
  if (ref.type === 'remote') {
1480
- // Strip remote prefix (e.g. "origin/main" → "main")
1481
- const slashIdx = ref.name.indexOf('/');
1482
- const branchName = slashIdx >= 0 ? ref.name.slice(slashIdx + 1) : ref.name;
1488
+ const prefix = remotePrefixes.find(p => ref.name.startsWith(p));
1489
+ const branchName = prefix ? ref.name.slice(prefix.length) : ref.name;
1483
1490
  if (localNames.has(branchName)) {
1484
- mergedRemotes.add(ref.name); // skip this remote, local badge covers it
1491
+ mergedRemotes.add(ref.name);
1485
1492
  }
1486
1493
  }
1487
1494
  });
1488
- commit.refs.forEach(ref => {
1495
+ classified.forEach(ref => {
1489
1496
  if (ref.type === 'tag' && !state.settings.showTags) return;
1490
1497
  if (ref.type === 'remote' && !state.settings.showRemoteBranches) return;
1491
- if (mergedRemotes.has(ref.name)) return; // merged into local badge
1492
- // For local/head refs that have a matching remote, add sync icon
1498
+ if (mergedRemotes.has(ref.name)) return;
1493
1499
  const isSynced = (ref.type === 'head' || ref.type === 'local') &&
1494
- commit.refs.some(r => r.type === 'remote' && r.name.endsWith('/' + ref.name));
1500
+ classified.some(r => r.type === 'remote' && remotePrefixes.some(p => r.name === p + ref.name));
1495
1501
  const syncIcon = isSynced ? '<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-1px"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></svg> ' : '';
1496
1502
  badges += '<span class="ref-badge ref-' + ref.type + '">' + syncIcon + escHtml(ref.name) + '</span>';
1497
1503
  });
package/src/index.ts CHANGED
File without changes
@@ -1,6 +1,6 @@
1
1
  import { Hono } from "hono";
2
2
  import { resourceMonitor, type ResourceSnapshot } from "../../services/resource-monitor.service.ts";
3
- import { ok } from "../../types/api.ts";
3
+ import { ok, err } from "../../types/api.ts";
4
4
 
5
5
  export const resourceRoutes = new Hono();
6
6
 
@@ -17,6 +17,33 @@ resourceRoutes.get("/resources/history", (c) => {
17
17
  return c.json(ok(resourceMonitor.getHistory()));
18
18
  });
19
19
 
20
+ /** POST /resources/kill/:pid — send SIGTERM to a process in PPM's tree */
21
+ resourceRoutes.post("/resources/kill/:pid", async (c) => {
22
+ const pid = parseInt(c.req.param("pid"), 10);
23
+ if (isNaN(pid) || pid <= 0) {
24
+ return c.json(err("Invalid PID"), 400);
25
+ }
26
+ // Safety: only allow killing processes in PPM's own tree
27
+ const snapshot = resourceMonitor.getLatest();
28
+ if (!snapshot) {
29
+ return c.json(err("No resource data available"), 400);
30
+ }
31
+ const allPids = snapshot.groups.flatMap((g) => g.processes.map((p) => p.pid));
32
+ if (!allPids.includes(pid)) {
33
+ return c.json(err("PID not in PPM process tree"), 403);
34
+ }
35
+ // Don't allow killing the server itself
36
+ if (pid === process.pid) {
37
+ return c.json(err("Cannot kill PPM server process"), 403);
38
+ }
39
+ try {
40
+ process.kill(pid, "SIGTERM");
41
+ return c.json(ok({ pid, signal: "SIGTERM" }));
42
+ } catch (e: any) {
43
+ return c.json(err(`Failed to kill PID ${pid}: ${e.message}`), 500);
44
+ }
45
+ });
46
+
20
47
  /** GET /resources/stream — SSE stream of snapshots every 3s */
21
48
  resourceRoutes.get("/resources/stream", (c) => {
22
49
  if (sseClientCount >= MAX_SSE_CLIENTS) {
@@ -1,9 +1,42 @@
1
- import { useCallback } from "react";
1
+ import { useCallback, useEffect, useRef, useState } from "react";
2
2
  import { Loader2, FileWarning, ExternalLink } from "lucide-react";
3
3
  import { useBlobUrl } from "./use-blob-url";
4
4
 
5
5
  export function PdfPreview({ filePath, projectName }: { filePath: string; projectName: string }) {
6
- const { blobUrl, error } = useBlobUrl(filePath, projectName, "application/pdf");
6
+ const [refreshKey, setRefreshKey] = useState(0);
7
+ const iframeRef = useRef<HTMLIFrameElement>(null);
8
+ const scrollYRef = useRef(0);
9
+
10
+ const { blobUrl, error } = useBlobUrl(filePath, projectName, "application/pdf", refreshKey);
11
+
12
+ // Auto-reload: listen for file:changed WS events
13
+ useEffect(() => {
14
+ const handler = (e: Event) => {
15
+ const detail = (e as CustomEvent).detail;
16
+ if (detail.projectName !== projectName || detail.path !== filePath) return;
17
+ // Save scroll position before re-fetch (best-effort for browser PDF viewer)
18
+ try {
19
+ const win = iframeRef.current?.contentWindow;
20
+ if (win) scrollYRef.current = win.scrollY || 0;
21
+ } catch { /* cross-origin or plugin restriction */ }
22
+ setRefreshKey((k) => k + 1);
23
+ };
24
+ window.addEventListener("file:changed", handler);
25
+ return () => window.removeEventListener("file:changed", handler);
26
+ }, [filePath, projectName]);
27
+
28
+ // Restore scroll after new blob loads
29
+ useEffect(() => {
30
+ if (!blobUrl || !iframeRef.current || scrollYRef.current === 0) return;
31
+ const iframe = iframeRef.current;
32
+ const saved = scrollYRef.current;
33
+ const onLoad = () => {
34
+ try { iframe.contentWindow?.scrollTo(0, saved); } catch { /* ignore */ }
35
+ scrollYRef.current = 0;
36
+ };
37
+ iframe.addEventListener("load", onLoad);
38
+ return () => iframe.removeEventListener("load", onLoad);
39
+ }, [blobUrl]);
7
40
 
8
41
  const openInNewTab = useCallback(() => { if (blobUrl) window.open(blobUrl, "_blank"); }, [blobUrl]);
9
42
 
@@ -26,7 +59,7 @@ export function PdfPreview({ filePath, projectName }: { filePath: string; projec
26
59
  <ExternalLink className="size-3" /> Open in new tab
27
60
  </button>
28
61
  </div>
29
- <iframe src={blobUrl} title={filePath} className="flex-1 w-full border-none" />
62
+ <iframe ref={iframeRef} src={blobUrl} title={filePath} className="flex-1 w-full border-none" />
30
63
  </div>
31
64
  );
32
65
  }
@@ -1,18 +1,21 @@
1
- import { useEffect, useState } from "react";
1
+ import { useEffect, useRef, useState } from "react";
2
2
  import { projectUrl, getAuthToken } from "@/lib/api-client";
3
3
 
4
4
  /** Shared hook: fetch a project file as a blob URL via /files/raw endpoint.
5
- * Detects absolute paths (external files) and uses /api/fs/raw instead. */
5
+ * Detects absolute paths (external files) and uses /api/fs/raw instead.
6
+ * Pass a changing `refreshKey` to re-fetch without unmounting. */
6
7
  export function useBlobUrl(
7
8
  filePath: string,
8
9
  projectName: string,
9
10
  mimeOverride?: string,
11
+ refreshKey = 0,
10
12
  ) {
11
13
  const [blobUrl, setBlobUrl] = useState<string | null>(null);
12
14
  const [error, setError] = useState(false);
15
+ const urlRef = useRef<string | null>(null);
13
16
 
14
17
  useEffect(() => {
15
- let revoke: string | undefined;
18
+ let cancelled = false;
16
19
  const isExternal = /^(\/|[A-Za-z]:[/\\])/.test(filePath);
17
20
  const url = isExternal
18
21
  ? `/api/fs/raw?path=${encodeURIComponent(filePath)}`
@@ -24,16 +27,22 @@ export function useBlobUrl(
24
27
  return r.blob();
25
28
  })
26
29
  .then((blob) => {
30
+ if (cancelled) return;
27
31
  const final = mimeOverride ? new Blob([blob], { type: mimeOverride }) : blob;
28
32
  const u = URL.createObjectURL(final);
29
- revoke = u;
33
+ // Revoke old URL only after new one is ready (avoids blank flash)
34
+ if (urlRef.current) URL.revokeObjectURL(urlRef.current);
35
+ urlRef.current = u;
30
36
  setBlobUrl(u);
31
37
  })
32
- .catch(() => setError(true));
33
- return () => {
34
- if (revoke) URL.revokeObjectURL(revoke);
35
- };
36
- }, [filePath, projectName, mimeOverride]);
38
+ .catch(() => { if (!cancelled) setError(true); });
39
+ return () => { cancelled = true; };
40
+ }, [filePath, projectName, mimeOverride, refreshKey]);
41
+
42
+ // Revoke on unmount
43
+ useEffect(() => () => {
44
+ if (urlRef.current) URL.revokeObjectURL(urlRef.current);
45
+ }, []);
37
46
 
38
47
  return { blobUrl, error };
39
48
  }
@@ -0,0 +1,133 @@
1
+ import { memo, useMemo } from "react";
2
+ import { ChevronRight, ChevronDown, HelpCircle, X, ArrowUp, ArrowDown } from "lucide-react";
3
+ import type { ResourceGroup } from "@/hooks/use-resource-monitor";
4
+ import { SparklineCanvas } from "./sparkline-canvas";
5
+ import { cn } from "@/lib/utils";
6
+
7
+ export type SortKey = "cpu" | "ram" | null;
8
+ export type SortDir = "asc" | "desc";
9
+
10
+ function cpuColor(cpu: number) {
11
+ if (cpu > 80) return "text-red-500";
12
+ if (cpu > 50) return "text-yellow-500";
13
+ return "text-green-500";
14
+ }
15
+
16
+ function formatRam(mb: number) {
17
+ return mb < 1024 ? `${mb.toFixed(0)} MB` : `${(mb / 1024).toFixed(1)} GB`;
18
+ }
19
+
20
+ export interface GroupRowProps {
21
+ group: ResourceGroup;
22
+ Icon: React.ElementType;
23
+ isExpanded: boolean;
24
+ sparkData: number[];
25
+ isMobile: boolean;
26
+ sortKey: SortKey;
27
+ sortDir: SortDir;
28
+ onToggle: () => void;
29
+ onKill: (pid: number) => void;
30
+ }
31
+
32
+ export const GroupRow = memo(function GroupRow({
33
+ group, Icon, isExpanded, sparkData, isMobile, sortKey, sortDir, onToggle, onKill,
34
+ }: GroupRowProps) {
35
+ const Chevron = isExpanded ? ChevronDown : ChevronRight;
36
+
37
+ const sortedProcesses = useMemo(() => {
38
+ if (!sortKey) return group.processes;
39
+ return [...group.processes].sort((a, b) => {
40
+ const av = sortKey === "cpu" ? a.cpu : a.ramMB;
41
+ const bv = sortKey === "cpu" ? b.cpu : b.ramMB;
42
+ return sortDir === "asc" ? av - bv : bv - av;
43
+ });
44
+ }, [group.processes, sortKey, sortDir]);
45
+
46
+ return (
47
+ <>
48
+ <tr
49
+ className="hover:bg-surface-hover cursor-pointer transition-colors"
50
+ onClick={onToggle}
51
+ >
52
+ <td className="py-1.5 px-3">
53
+ <div className="flex items-center gap-1.5">
54
+ <Chevron className="size-3 text-text-subtle shrink-0" />
55
+ <Icon className="size-3.5 text-text-secondary shrink-0" />
56
+ <span className="truncate">{group.label}</span>
57
+ <span className="text-text-subtle">({group.processes.length})</span>
58
+ </div>
59
+ </td>
60
+ <td className={cn("text-right py-1.5 px-2", cpuColor(group.cpu))}>
61
+ {group.cpu.toFixed(1)}%
62
+ </td>
63
+ <td className="text-right py-1.5 px-2 text-text-secondary">
64
+ {formatRam(group.ramMB)}
65
+ </td>
66
+ {!isMobile && (
67
+ <td className="py-1.5 px-2">
68
+ {sparkData.length > 1 && (
69
+ <SparklineCanvas data={sparkData} width={120} height={20} />
70
+ )}
71
+ </td>
72
+ )}
73
+ </tr>
74
+ {isExpanded && sortedProcesses.map((proc) => (
75
+ <tr key={proc.pid} className="text-text-subtle group/proc hover:bg-surface-hover transition-colors">
76
+ <td className="py-1 px-3 pl-10">
77
+ <div className="flex items-start gap-1.5">
78
+ <span className="text-text-subtle shrink-0">{proc.pid}</span>
79
+ <span className="break-all text-text-secondary" title={proc.command}>
80
+ {proc.command}
81
+ </span>
82
+ </div>
83
+ </td>
84
+ <td className="text-right py-1 px-2 align-top">{proc.cpu.toFixed(1)}%</td>
85
+ <td className="text-right py-1 px-2 align-top">{formatRam(proc.ramMB)}</td>
86
+ {!isMobile && (
87
+ <td className="align-top py-1 px-2">
88
+ <button
89
+ onClick={(e) => { e.stopPropagation(); onKill(proc.pid); }}
90
+ className="opacity-0 group-hover/proc:opacity-100 p-0.5 rounded hover:bg-red-500/20 hover:text-red-500 transition-all"
91
+ title={`End process ${proc.pid}`}
92
+ >
93
+ <X className="size-3" />
94
+ </button>
95
+ </td>
96
+ )}
97
+ </tr>
98
+ ))}
99
+ </>
100
+ );
101
+ });
102
+
103
+ // ── Sortable column header ─────────────────────────────────────────────
104
+
105
+ export function SortableHeader({ label, field, activeKey, activeDir, onClick, className }: {
106
+ label: string;
107
+ field: "cpu" | "ram";
108
+ activeKey: SortKey;
109
+ activeDir: SortDir;
110
+ onClick: (field: "cpu" | "ram") => void;
111
+ className?: string;
112
+ }) {
113
+ const isActive = activeKey === field;
114
+ const Arrow = isActive ? (activeDir === "asc" ? ArrowUp : ArrowDown) : null;
115
+
116
+ return (
117
+ <th
118
+ className={cn(
119
+ "text-right py-1.5 px-2 font-medium cursor-pointer select-none hover:text-text-primary transition-colors",
120
+ isActive && "text-text-primary",
121
+ className,
122
+ )}
123
+ onClick={() => onClick(field)}
124
+ >
125
+ <div className="flex items-center justify-end gap-0.5">
126
+ <span>{label}</span>
127
+ {Arrow && <Arrow className="size-3" />}
128
+ </div>
129
+ </th>
130
+ );
131
+ }
132
+
133
+ export { cpuColor, formatRam };