diffhub 0.1.18 → 0.1.19

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 (32) hide show
  1. package/.next/standalone/apps/cli/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/cli/.next/build-manifest.json +3 -3
  3. package/.next/standalone/apps/cli/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/apps/cli/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/apps/cli/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/apps/cli/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/apps/cli/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  15. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  16. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  18. package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next/standalone/apps/cli/.next/server/app/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/apps/cli/.next/server/chunks/_0~2y9d0._.js +1 -1
  21. package/.next/standalone/apps/cli/.next/server/chunks/ssr/_07okxca._.js +2 -2
  22. package/.next/standalone/apps/cli/.next/server/middleware-build-manifest.js +3 -3
  23. package/.next/standalone/apps/cli/.next/server/pages/404.html +1 -1
  24. package/.next/standalone/apps/cli/.next/server/pages/500.html +1 -1
  25. package/.next/standalone/apps/cli/.next/server/server-reference-manifest.js +1 -1
  26. package/.next/standalone/apps/cli/.next/server/server-reference-manifest.json +1 -1
  27. package/.next/standalone/apps/cli/.next/static/chunks/{0_c51bp34uyv_.js → 0bpt0-jke.pzj.js} +5 -5
  28. package/.next/standalone/apps/cli/package.json +1 -1
  29. package/package.json +1 -1
  30. /package/.next/standalone/apps/cli/.next/static/{97YS4C2mw92wvzoWra45x → X3k3ryHO5ngxx_6ANrAAl}/_buildManifest.js +0 -0
  31. /package/.next/standalone/apps/cli/.next/static/{97YS4C2mw92wvzoWra45x → X3k3ryHO5ngxx_6ANrAAl}/_clientMiddlewareManifest.js +0 -0
  32. /package/.next/standalone/apps/cli/.next/static/{97YS4C2mw92wvzoWra45x → X3k3ryHO5ngxx_6ANrAAl}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[37515,e=>e.a(async(t,r)=>{try{var a=e.i(2157),n=e.i(50227),i=e.i(77777),o=e.i(98355),s=e.i(34922),l=e.i(23318),u=e.i(57405),c=e.i(16781),d=t([o]);[o]=d.then?(await d)():d;let p=()=>null,h=new Set,f=null,g=[],w=null,R=null,v=!1,m=0,y=0,E=["split","stacked"],C=["dark","light"],A=async()=>{if((0,l.isCmuxRuntime)())try{let e=await (0,l.getMultiFileDiff)(),t=new Map(e.files.map(e=>[e.file,e])),r=[];for(let[a,n]of Object.entries(e.patchByFile)){let i=t.get(a);if(!i||(0,s.isLargeDiffFile)(i,Buffer.byteLength(n)))continue;let o=e.reviewKeyByFile[a];if(o)for(let e of E)for(let t of C)r.push({layout:e,patch:n,reviewKey:o,theme:t})}let a=0,n=async()=>{for(;a<r.length;){let e=a;a+=1;let t=r[e];if(!t)return;try{await (0,o.getOrPrerenderByReviewKey)(t.reviewKey,t.patch,t.layout,t.theme)}catch{}}},i=Math.min(4,r.length);await Promise.all(Array.from({length:i},()=>n()))}catch{}},T=async()=>{if(R){v=!0,await R;return}R=(async()=>{try{await (0,l.primeGitSnapshots)(),await A()}finally{R=null}})(),await R,v&&(v=!1,await T())},x=e=>{let t=(0,u.getGitDirectory)(e),r=[e].filter(a.existsSync),i="darwin"===process.platform||"win32"===process.platform,o=[],s=(t,r)=>{let a=r?(0,n.join)(t,r.toString()):t;if(!((e,t)=>{let r=(0,n.relative)(t,e).split(n.sep).join("/");if(!r||r.startsWith(".."))return!1;for(let e of[".next",".turbo","node_modules"])if(r===e||r.startsWith(`${e}/`))return!0;return!(!(".git"===r||r.startsWith(".git/"))||".git/HEAD"===r||".git/index"===r||".git/packed-refs"===r||".git/refs"===r||r.startsWith(".git/refs/"))})(a,e)){let e;e=f,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?(0,l.clearGitMemoryCache)(e??void 0):(0,l.invalidateGitCache)(e??void 0),w&&clearTimeout(w),w=setTimeout(()=>{w=null,(async()=>{try{"1"!==process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER&&await T()}catch(e){console.error("[diffhub] snapshot prime failed",{error:e})}finally{for(let e of(m+=1,y=Date.now(),h))e()}})()},150)}},c=(t,r)=>{console.error("[diffhub] file watcher error",r);let a=o.indexOf(t);-1!==a&&o.splice(a,1),0===o.length&&setTimeout(()=>{f===e&&0===g.length&&(console.log("[diffhub] attempting watcher recovery"),g=x(e))},5e3)};for(let e of r){let t=(0,a.watch)(e,{persistent:!0,recursive:i},(t,r)=>{s(e,r)});t.on("error",e=>c(t,e)),o.push(t)}{let e=[(0,n.join)(t,"HEAD"),(0,n.join)(t,"index"),(0,n.join)(t,"packed-refs")],r=[(0,n.join)(t,"refs","heads"),(0,n.join)(t,"refs","tags"),(0,n.join)(t,"refs","remotes")];for(let t of[...e,...r]){if(!(0,a.existsSync)(t))continue;let e=(0,a.watch)(t,{persistent:!0},(e,r)=>{s(t,r)});e.on("error",t=>c(e,t)),o.push(e)}}return o};e.s(["ensureFileWatch",0,()=>{let e=(0,c.getConfiguredRepoPath)();if(g.length>0&&f===e)return;let t=f;f=e,(()=>{if(w&&(clearTimeout(w),w=null),0===g.length)return;let e=g;for(let t of(g=[],e))t.close()})(),(t!==e||0===g.length)&&(g=x(e))},"getFileWatchSnapshot",0,()=>({changedAt:y,revision:m}),"waitForFileWatch",0,(e,t)=>{var r;let{promise:a,resolve:n}=(0,i.createDeferred)(),o=!1,s=null,l=p;if(e.aborted)return n("timeout"),a;let u=p,c=t=>{o||(o=!0,s&&(clearTimeout(s),s=null),l(),e.removeEventListener("abort",u),n(t))};return u=()=>{c("timeout")},e.addEventListener("abort",u,{once:!0}),r=()=>{c("change")},h.add(r),l=()=>{h.delete(r)},s=setTimeout(()=>{c("timeout")},t),a}]),r()}catch(e){r(e)}},!1),57106,e=>e.a(async(t,r)=>{try{var a=e.i(37515),n=t([a]);[a]=n.then?(await n)():n;let i=async e=>{if("1"===process.env.DIFFHUB_DISABLE_WATCH)return Response.json({error:"File watch disabled"},{status:503});try{await (0,a.ensureFileWatch)()}catch(e){return Response.json({error:String(e)},{status:500})}let t=(0,a.getFileWatchSnapshot)(),r=new URL(e.url).searchParams.get("revision"),n=null===r?null:Number.parseInt(r,10);if(!(null!==n&&Number.isFinite(n)&&n===t.revision))return Response.json({...t,changed:!1,ok:!0});let i=await (0,a.waitForFileWatch)(e.signal,25e3);return Response.json({...(0,a.getFileWatchSnapshot)(),changed:"change"===i,ok:!0})};e.s(["GET",0,i,"dynamic",0,"force-dynamic","runtime",0,"nodejs"]),r()}catch(e){r(e)}},!1),14916,e=>e.a(async(t,r)=>{try{var a=e.i(47909),n=e.i(74017),i=e.i(96250),o=e.i(59756),s=e.i(61916),l=e.i(74677),u=e.i(69741),c=e.i(16795),d=e.i(87718),p=e.i(95169),h=e.i(47587),f=e.i(66012),g=e.i(70101),w=e.i(26937),R=e.i(10372),v=e.i(93695);e.i(20232);var m=e.i(220),y=e.i(57106),E=t([y]);[y]=E.then?(await E)():E;let A=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/watch/route",pathname:"/api/watch",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/watch/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:x,serverHooks:S}=A;async function C(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),A.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/watch/route";a=a.replace(/\/index$/,"")||"/";let i=await A.prepare(e,t,{srcPage:a,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:y,params:E,nextConfig:C,parsedUrl:T,isDraftMode:x,prerenderManifest:S,routerServerContext:b,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,resolvedPathname:P,clientReferenceManifest:F,serverActionsManifest:O}=i,H=(0,u.normalizeAppPath)(a),D=!!(S.dynamicRoutes[H]||S.routes[P]),I=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,T,!1):t.end("This page could not be found"),null);if(D&&!x){let e=!!S.routes[P],t=S.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await I();throw new v.NoFallbackError}}let j=null;!D||A.isDev||x||(j=P,j="/index"===j?"/":j);let U=!0===A.isDev||!D,k=D&&!U;O&&F&&(0,l.setManifestsSingleton)({page:a,clientReferenceManifest:F,serverActionsManifest:O});let M=e.method||"GET",q=(0,s.getTracer)(),W=q.getActiveScopeSpan(),B=!!(null==b?void 0:b.isWrappedByNextServer),L=!!(0,o.getRequestMeta)(e,"minimalMode"),K=(0,o.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,S,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let $={params:E,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:K,cacheLifeProfiles:C.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>A.onRequestError(e,t,a,n,b)},sharedContext:{buildId:y}},G=new c.NodeNextRequest(e),X=new c.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,o=async e=>A.handle(V,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${M} ${a}`)}),l=async i=>{var s,l;let u=async({previousCacheEntry:n})=>{try{if(!L&&N&&_&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=$.renderOpts.fetchMetrics;let s=$.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=$.renderOpts.collectedTags;if(!D)return await (0,f.sendResponse)(G,X,a,$.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[R.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==n?void 0:n.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:a,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,b),t}},c=await A.handleResponse({req:e,nextConfig:C,cacheKey:j,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:L});if(!D)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",N?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),x&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,g.fromNodeOutgoingHttpHeaders)(c.value.headers);return L&&D||d.delete(R.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,w.getCacheControlHeader)(c.cacheControl)),await (0,f.sendResponse)(G,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&W?await l(W):(i=q.getActiveScopeSpan(),await q.withPropagatedContext(e.headers,()=>q.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${a}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,b),D)throw t;return await (0,f.sendResponse)(G,X,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:x})},"routeModule",0,A,"serverHooks",0,S,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,x]),r()}catch(e){r(e)}},!1)];
1
+ module.exports=[37515,e=>e.a(async(t,r)=>{try{var a=e.i(2157),n=e.i(50227),i=e.i(77777),o=e.i(98355),s=e.i(34922),l=e.i(23318),u=e.i(57405),c=e.i(16781),d=t([o]);[o]=d.then?(await d)():d;let p=()=>null,h=new Set,f=null,g=[],w=null,R=null,v=!1,m=0,y=0,E=["split","stacked"],C=["dark","light"],A=async()=>{if((0,l.isCmuxRuntime)())try{let e=await (0,l.getMultiFileDiff)(),t=new Map(e.files.map(e=>[e.file,e])),r=[];for(let[a,n]of Object.entries(e.patchByFile)){let i=t.get(a);if(!i||(0,s.isLargeDiffFile)(i,Buffer.byteLength(n)))continue;let o=e.reviewKeyByFile[a];if(o)for(let e of E)for(let t of C)r.push({layout:e,patch:n,reviewKey:o,theme:t})}let a=0,n=async()=>{for(;a<r.length;){let e=a;a+=1;let t=r[e];if(!t)return;try{await (0,o.getOrPrerenderByReviewKey)(t.reviewKey,t.patch,t.layout,t.theme)}catch{}}},i=Math.min(4,r.length);await Promise.all(Array.from({length:i},()=>n()))}catch{}},T=async()=>{if(R){v=!0,await R;return}R=(async()=>{try{await (0,l.primeGitSnapshots)(),await A()}finally{R=null}})(),await R,v&&(v=!1,await T())},x=e=>{let t=(0,u.getGitDirectory)(e),r=[e].filter(a.existsSync),i="darwin"===process.platform||"win32"===process.platform,o=[],s=(t,r)=>{let a=r?(0,n.join)(t,r.toString()):t;if(!((e,t)=>{let r=(0,n.relative)(t,e).split(n.sep).join("/");if(!r||r.startsWith(".."))return!1;for(let e of[".next",".turbo","node_modules"])if(r===e||r.startsWith(`${e}/`))return!0;return!(!(".git"===r||r.startsWith(".git/"))||".git/HEAD"===r||".git/index"===r||".git/packed-refs"===r||".git/refs"===r||r.startsWith(".git/refs/"))})(a,e)){let e;e=f,"1"===process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER?(0,l.clearGitMemoryCache)(e??void 0):(0,l.invalidateGitCache)(e??void 0),w&&clearTimeout(w),w=setTimeout(()=>{w=null,(async()=>{try{"1"!==process.env.DIFFHUB_EXTERNAL_SNAPSHOT_WRITER&&await T()}catch(e){console.error("[diffhub] snapshot prime failed",{error:e})}finally{for(let e of(m+=1,y=Date.now(),h))e()}})()},150)}},c=(t,r)=>{console.error("[diffhub] file watcher error",r);let a=o.indexOf(t);-1!==a&&o.splice(a,1),0===o.length&&setTimeout(()=>{f===e&&0===g.length&&(console.log("[diffhub] attempting watcher recovery"),g=x(e))},5e3)};for(let e of r){let t=(0,a.watch)(e,{persistent:!0,recursive:i},(t,r)=>{s(e,r)});t.on("error",e=>c(t,e)),o.push(t)}{let e=[(0,n.join)(t,"HEAD"),(0,n.join)(t,"index"),(0,n.join)(t,"packed-refs")],r=[(0,n.join)(t,"refs","heads"),(0,n.join)(t,"refs","tags"),(0,n.join)(t,"refs","remotes")];for(let t of[...e,...r]){if(!(0,a.existsSync)(t))continue;let e=(0,a.watch)(t,{persistent:!0},(e,r)=>{s(t,r)});e.on("error",t=>c(e,t)),o.push(e)}}return o};e.s(["ensureFileWatch",0,()=>{let e=(0,c.getConfiguredRepoPath)();if(g.length>0&&f===e)return;let t=f;f=e,(()=>{if(w&&(clearTimeout(w),w=null),0===g.length)return;let e=g;for(let t of(g=[],e))t.close()})(),(t!==e||0===g.length)&&(g=x(e))},"getFileWatchSnapshot",0,()=>({changedAt:y,revision:m}),"waitForFileWatch",0,(e,t)=>{var r;let{promise:a,resolve:n}=(0,i.createDeferred)(),o=!1,s=null,l=p;if(e.aborted)return n("timeout"),a;let u=p,c=t=>{o||(o=!0,s&&(clearTimeout(s),s=null),l(),e.removeEventListener("abort",u),n(t))};return u=()=>{c("timeout")},e.addEventListener("abort",u,{once:!0}),r=()=>{c("change")},h.add(r),l=()=>{h.delete(r)},s=setTimeout(()=>{c("timeout")},t),a}]),r()}catch(e){r(e)}},!1),57106,e=>e.a(async(t,r)=>{try{var a=e.i(37515),n=t([a]);[a]=n.then?(await n)():n;let i=async e=>{if("1"===process.env.DIFFHUB_DISABLE_WATCH)return Response.json({error:"File watch disabled"},{status:503});try{await (0,a.ensureFileWatch)()}catch(e){return Response.json({error:String(e)},{status:500})}let t=(0,a.getFileWatchSnapshot)(),r=new URL(e.url).searchParams.get("revision"),n=null===r?null:Number.parseInt(r,10);if(!(null!==n&&Number.isFinite(n)&&n===t.revision))return Response.json({...t,changed:null!==n&&Number.isFinite(n)&&n!==t.revision,ok:!0});let i=await (0,a.waitForFileWatch)(e.signal,25e3);return Response.json({...(0,a.getFileWatchSnapshot)(),changed:"change"===i,ok:!0})};e.s(["GET",0,i,"dynamic",0,"force-dynamic","runtime",0,"nodejs"]),r()}catch(e){r(e)}},!1),14916,e=>e.a(async(t,r)=>{try{var a=e.i(47909),n=e.i(74017),i=e.i(96250),o=e.i(59756),s=e.i(61916),l=e.i(74677),u=e.i(69741),c=e.i(16795),d=e.i(87718),p=e.i(95169),h=e.i(47587),f=e.i(66012),g=e.i(70101),w=e.i(26937),R=e.i(10372),v=e.i(93695);e.i(20232);var m=e.i(220),y=e.i(57106),E=t([y]);[y]=E.then?(await E)():E;let A=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/watch/route",pathname:"/api/watch",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/cli/app/api/watch/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:x,serverHooks:b}=A;async function C(e,t,r){r.requestMeta&&(0,o.setRequestMeta)(e,r.requestMeta),A.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/watch/route";a=a.replace(/\/index$/,"")||"/";let i=await A.prepare(e,t,{srcPage:a,multiZoneDraftMode:!1});if(!i)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:y,params:E,nextConfig:C,parsedUrl:T,isDraftMode:x,prerenderManifest:b,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,resolvedPathname:F,clientReferenceManifest:P,serverActionsManifest:O}=i,H=(0,u.normalizeAppPath)(a),D=!!(b.dynamicRoutes[H]||b.routes[F]),I=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,T,!1):t.end("This page could not be found"),null);if(D&&!x){let e=!!b.routes[F],t=b.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await I();throw new v.NoFallbackError}}let j=null;!D||A.isDev||x||(j=F,j="/index"===j?"/":j);let U=!0===A.isDev||!D,k=D&&!U;O&&P&&(0,l.setManifestsSingleton)({page:a,clientReferenceManifest:P,serverActionsManifest:O});let M=e.method||"GET",q=(0,s.getTracer)(),W=q.getActiveScopeSpan(),B=!!(null==S?void 0:S.isWrappedByNextServer),L=!!(0,o.getRequestMeta)(e,"minimalMode"),K=(0,o.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,b,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let $={params:E,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:K,cacheLifeProfiles:C.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>A.onRequestError(e,t,a,n,S)},sharedContext:{buildId:y}},G=new c.NodeNextRequest(e),X=new c.NodeNextResponse(t),V=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,o=async e=>A.handle(V,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${M} ${a}`)}),l=async i=>{var s,l;let u=async({previousCacheEntry:n})=>{try{if(!L&&N&&_&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=$.renderOpts.fetchMetrics;let s=$.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let l=$.renderOpts.collectedTags;if(!D)return await (0,f.sendResponse)(G,X,a,$.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[R.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==n?void 0:n.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:a,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,S),t}},c=await A.handleResponse({req:e,nextConfig:C,cacheKey:j,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:_,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:L});if(!D)return null;if((null==c||null==(s=c.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",N?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),x&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,g.fromNodeOutgoingHttpHeaders)(c.value.headers);return L&&D||d.delete(R.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,w.getCacheControlHeader)(c.cacheControl)),await (0,f.sendResponse)(G,X,new Response(c.value.body,{headers:d,status:c.value.status||200})),null};B&&W?await l(W):(i=q.getActiveScopeSpan(),await q.withPropagatedContext(e.headers,()=>q.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${a}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l),void 0,!B))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,h.getRevalidateReason)({isStaticGeneration:k,isOnDemandRevalidate:N})},!1,S),D)throw t;return await (0,f.sendResponse)(G,X,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:x})},"routeModule",0,A,"serverHooks",0,b,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,x]),r()}catch(e){r(e)}},!1)];
2
2
 
3
3
  //# sourceMappingURL=_0~2y9d0._.js.map
@@ -36,7 +36,7 @@ ${b.join("\n")}`})(f);await navigator.clipboard.writeText(a),F.current&&clearTim
36
36
  --diffs-fg-number-addition-override: ${e.addition};
37
37
  --diffs-fg-number-deletion-override: ${e.deletion};
38
38
  }
39
- `)},lineAnnotations:x,renderAnnotation:y,renderGutterUtility:z},a)})}else C=(0,o.jsx)(hr,{onRender:A,variant:h?"large":"auto",changes:g?.changes});else C=(0,o.jsx)("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No textual patch available for this file."});return(0,o.jsxs)("div",{"data-filename":a,className:"font-sans",children:[(0,o.jsx)(hb,{file:a,insertions:g?.insertions??0,deletions:g?.deletions??0,commentCount:f.length,repoPath:m,collapsed:i,active:j,onToggleCollapse:l,headingId:v,panelId:w}),(0,o.jsx)("div",{id:w,role:"region","aria-labelledby":v,hidden:B,children:C})]})}),hz=(0,g7.memo)(function({file:a,filePatch:b,layout:c,prerenderedHTML:d,deferPatchRendering:e,isLargeFile:f,forceRender:g,comments:h,fileStat:i,collapsed:j,active:k,onToggleCollapse:l,onVisible:m,repoPath:n,onAddComment:p,onDeleteComment:q}){let r=(0,g7.useRef)(null),[s,t]=(0,g7.useState)(null),u=e||f,[v,w]=(0,g7.useState)(()=>!u||g);!v&&(g||null!==s)&&w(!0);let x=(0,g7.useCallback)(()=>{w(!0)},[]),y=v||g||null!==s||!u,z=(0,g7.useRef)(m);(0,g7.useEffect)(()=>{z.current=m},[m]),(0,g7.useEffect)(()=>{let b=r.current;if(!b||"u"<typeof IntersectionObserver)return;let c=new IntersectionObserver(b=>{let[c]=b;if(c){var d;c.isIntersecting&&c.intersectionRatio>=.35&&(d=z.current,hn=a,ho=d,0===hp&&(hp=requestAnimationFrame(()=>{hp=0;let a=hn,b=ho;hn=null,ho=null,a&&b&&b(a)})))}},{rootMargin:"-52px 0px -55% 0px",threshold:[.35,.6]});return c.observe(b),()=>c.disconnect()},[a]);let A=hw(a),B=(0,g7.useMemo)(()=>{let a=k?"auto":"none";return j||y?{overflowAnchor:a}:{minHeight:Math.min(960,Math.max(128,22*(i?.changes??1))),overflowAnchor:a}},[k,j,i,y]);return(0,o.jsx)("section",{ref:r,id:A,"data-file-section":a,className:"scroll-mt-[52px]",style:B,children:(0,o.jsx)(hy,{file:a,filePatch:b,layout:c,prerenderedHTML:d?.[c],shouldRenderPatch:y,comments:h,fileStat:i,isLargeFile:f,collapsed:j,active:k,sectionId:A,onToggleCollapse:l,repoPath:n,commentTarget:s,onCommentTargetChange:t,onRenderPatch:x,onAddComment:p,onDeleteComment:q})})}),hA=({patchesByFile:a,prerenderedHTMLByFile:b,layout:c,comments:d,onAddComment:e,onDeleteComment:f,activeFileId:g,fileStats:h,collapsedFiles:i,onToggleCollapse:j,onActiveFileChange:k,forceRenderFiles:l,repoPath:m})=>{let n=(0,g7.useMemo)(()=>{let a=new Map;for(let b of h)a.set(b.file,b);return a},[h]),p=(0,g7.useMemo)(()=>(a=>{let b={files:[],folders:new Map};for(let c of a){let a=c.split("/"),d=b;for(let b=0;b<a.length-1;b+=1){let c=a[b];d.folders.has(c)||d.folders.set(c,{files:[],folders:new Map});let e=d.folders.get(c);e&&(d=e)}d.files.push(c)}let c=[],d=a=>{for(let[,b]of[...a.folders.entries()].toSorted((a,b)=>a[0].localeCompare(b[0])))d(b);let b=[...a.files].toSorted((a,b)=>{let c=a.split("/").at(-1)??a,d=b.split("/").at(-1)??b;return c.localeCompare(d)});c.push(...b)};return d(b),c})([...h.map(a=>a.file),...Object.keys(a).filter(a=>!n.has(a))]),[n,h,a]),q=(0,g7.useMemo)(()=>{let a=new Map;for(let b of d){let c=a.get(b.file);c?c.push(b):a.set(b.file,[b])}return a},[d]),r=p.length>=24&&0===Object.keys(b??{}).length,s=(0,g7.useMemo)(()=>{let a=new Map;for(let b of p)a.set(b,()=>j(b));return a},[p,j]);return 0===p.length?(0,o.jsxs)(he,{className:"h-full",children:[(0,o.jsxs)(hf,{children:[(0,o.jsx)(hh,{variant:"icon",children:(0,o.jsx)(hc,{})}),(0,o.jsx)(hi,{children:"No changes"}),(0,o.jsx)(hj,{children:"The working tree is clean relative to the base branch"})]}),(0,o.jsx)(hk,{children:(0,o.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,o.jsx)(a7,{children:"r"})," to refresh"]})})]}):(0,o.jsx)("div",{id:"diff-container",children:p.map(d=>{var h;let j=n.get(d),p=a[d]??"",t=void 0!==j&&(h=p.length,!j.binary&&(j.changes>=500||void 0!==h&&h>=5e5));return(0,o.jsx)(hz,{file:d,filePatch:p,layout:c,prerenderedHTML:b?.[d],deferPatchRendering:r,isLargeFile:t,forceRender:l?.has(d)??!1,comments:q.get(d)??hm,fileStat:j,collapsed:i.has(d),active:g===d,onToggleCollapse:s.get(d),onVisible:k,repoPath:m,onAddComment:e,onDeleteComment:f},d)})})},hB=[1e3,2e3,5e3],hC=(a,b,c)=>{let[d,e]=(0,q.useState)(b);return(0,q.useEffect)(()=>{try{let b=localStorage.getItem(a);null!==b&&(!c||c.includes(b))&&e(b)}catch{}},[a,c]),[d,(0,q.useCallback)(b=>{e(c=>{let d="function"==typeof b?b(c):b;try{localStorage.setItem(a,d)}catch{}return d})},[a])]},hD=["split","stacked"],hE=["all","uncommitted"],hF=({text:a,pulse:b=!1})=>(0,o.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,o.jsx)("div",{className:`text-muted-foreground text-sm${b?" animate-pulse":""}`,children:a})}),hG=a=>{let b=hw(a).replaceAll(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,"\\$&");return`#${b}`},hH=({notice:a})=>{let b="border-border bg-muted/40 text-muted-foreground";return"destructive"===a.tone?b="border-destructive/30 bg-destructive/10 text-destructive":"warning"===a.tone&&(b="border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400"),(0,o.jsx)("div",{className:`border-b px-4 py-2 text-xs ${b}`,children:(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"font-medium",children:a.label}),a.detail&&(0,o.jsx)("span",{className:"text-xs opacity-80",children:a.detail})]})})},hI=({filesData:a,deferredDiffData:b,diffError:c,syncNotice:d,layout:e,comments:f,onAddComment:g,onDeleteComment:h,selectedFile:i,collapsedFiles:j,forceRenderFiles:k,onToggleCollapse:l,onActiveFileChange:m,repoPath:n,diffWatchdogTripped:p,diffHintShown:q,onRetryDiff:r})=>null===a?(0,o.jsx)(hF,{text:"Loading diff…",pulse:!0}):0===a.files.length?(0,o.jsx)(hF,{text:"No changes"}):b?(0,o.jsxs)(o.Fragment,{children:[d&&(0,o.jsx)(hH,{notice:d}),(0,o.jsx)(hA,{patchesByFile:b.patchesByFile,prerenderedHTMLByFile:b.prerenderedHTMLByFile,layout:e,comments:f,onAddComment:g,onDeleteComment:h,activeFileId:i,fileStats:a.files,collapsedFiles:j,forceRenderFiles:k,onToggleCollapse:l,onActiveFileChange:m,repoPath:n})]}):c?(0,o.jsx)(hF,{text:c}):p?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[(0,o.jsx)("div",{className:"text-muted-foreground text-sm",children:"Still loading the diff…"}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."}),(0,o.jsx)(a6,{size:"sm",variant:"default",onClick:r,children:"Retry"})]}):q?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,o.jsx)("div",{className:"text-muted-foreground animate-pulse text-sm",children:`Loading diff${a?` (${a.files.length} files)…`:"…"}`}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."})]}):(0,o.jsx)(hF,{text:`Loading diff${a?` (${a.files.length} files)…`:"…"}`,pulse:!0});a.s(["DiffApp",0,({repoPath:a,defaultSidebarOpen:b=!0})=>{let[c,d]=(0,q.useState)(null),[e,f]=(0,q.useState)([]),[g,h]=(0,q.useState)(null),i=(0,q.useRef)(null),[j,k]=(0,q.useState)(null),[l,m]=hC("diffhub-layout","stacked",hD),{resolvedTheme:n}=(0,p.useTheme)(),r="light"===n?"light":"dark",s=(0,q.useRef)(l),t=(0,q.useRef)(r),[u,v]=(0,q.useState)(""),[w,x]=(0,q.useState)(256),[y,z]=(0,q.useState)(!1),[A,B]=(0,q.useState)(null),[C,D]=(0,q.useState)(null),[E,F]=(0,q.useState)(!1),[G,H]=hC("diffhub-diffMode","all",hE),I=(0,q.useRef)(G),J=(0,q.useRef)(null),K=(0,q.useRef)(null),L=(0,q.useRef)(null),M=(0,q.useRef)(null),N=(0,q.useRef)(!1),O=(0,q.useRef)(!1),P=(0,q.useRef)(()=>Promise.resolve()),Q=(0,q.useRef)(!1),R=(0,q.useRef)(!1),S=(0,q.useRef)(0),T=(0,q.useRef)(0),U=(0,q.useRef)(null),[V,W]=(0,q.useState)(!1),[X,Y]=(0,q.useState)(!1),[,Z]=(0,q.useTransition)(),[$,_]=(0,q.useState)(()=>new Set),[aa,ab]=(0,q.useState)(()=>new Set);(0,q.useEffect)(()=>{I.current=G},[G]),(0,q.useEffect)(()=>{_(new Set([]))},[a]);let ac=(0,q.useCallback)(b=>{_(c=>{let d=b(c);if(d===c)return c;try{localStorage.setItem(`diffhub-collapsed:${a}`,JSON.stringify([...d]))}catch{}return d})},[a]),ad=(0,q.useCallback)(()=>{let a=new URLSearchParams;"uncommitted"===I.current&&a.set("mode","uncommitted");let b=a.toString();return b?`?${b}`:""},[]),ae=(0,q.useCallback)(()=>{let a=new URLSearchParams;M.current&&a.set("generation",M.current),"uncommitted"===I.current&&a.set("mode","uncommitted"),a.set("layout",s.current),a.set("theme",t.current);let b=a.toString();return b?`?${b}`:""},[]),af=(0,q.useCallback)(async a=>{let b=M.current,c=L.current;U.current=Date.now(),W(!1),D(null),console.info("[diffhub] fetchDiff start",{fingerprint:c,generation:b,mode:I.current,requestId:a});let d=new AbortController,e=setTimeout(()=>{d.abort(Error("Diff request timed out"))},15e3);try{var f,g;let e,h,i=await fetch(`/api/diff${ae()}`,{signal:d.signal});if(!i.ok){let d=(await i.json().catch(()=>({error:"Failed to load diff"}))).error??`Failed to load diff (${i.status})`;console.error("[diffhub] fetchDiff non-ok response",{fingerprint:c,generation:b,mode:I.current,requestId:a,responseStatus:i.status,responseStatusText:i.statusText,serverError:d}),a===S.current&&D(d);return}let j=(f=await i.json(),g=c??"unknown",e=f.patchesByFile??Object.fromEntries((a=>{let b=new Map,c=/^diff --git a\/(.+?) b\/(.+)$/gm,d=[],e=c.exec(a);for(;e;)d.push({file:e[2],start:e.index}),e=c.exec(a);for(let[c,e]of d.entries()){let f=d[c+1]?.start??a.length,g=a.slice(e.start,f).trimEnd();b.set(e.file,g?`${g}
40
- `:"")}return b})(f.patch??"")),{baseBranch:f.baseBranch,branch:f.branch,generation:f.generation,mergeBase:f.mergeBase,patchesByFile:e,prerenderedHTMLByFile:f.prerenderedHTMLByFile,reviewKeysByFile:f.reviewKeysByFile??(h=f.generation,Object.fromEntries(Object.entries(e).map(([a,b])=>[a,`${h}:${(a=>{let b=0;for(let c=0;c<a.length;c+=1)b=Math.trunc(Math.imul(31,b)+(a.codePointAt(c)??0));return Math.abs(b).toString(36)})(`${a}:${b}`)}`]))),sourceFingerprint:g});if(a!==S.current||c!==L.current||b!==M.current){console.info("[diffhub] fetchDiff response stale",{fingerprint:c,generation:b,latestRequestId:S.current,requestId:a}),null!==M.current&&(T.current+=1,T.current>=3&&(console.warn("[diffhub] fetchDiff stale-drop limit reached, invalidating",{drops:T.current}),T.current=0,S.current+=1,K.current=null,k(null)),R.current=!0);return}T.current=0,console.info("[diffhub] fetchDiff success",{fileCount:Object.keys(j.patchesByFile).length,fingerprint:c,generation:j.generation,requestId:a}),Z(()=>k(j))}catch(d){console.error("[diffhub] fetchDiff threw",{error:d,fingerprint:c,generation:b,mode:I.current,requestId:a}),a===S.current&&D(d instanceof Error?d.message:String(d))}finally{clearTimeout(e)}},[ae,Z]),ag=(0,q.useCallback)(async()=>{if(R.current=!0,!Q.current){for(Q.current=!0,F(!0);R.current;)R.current=!1,S.current+=1,await af(S.current);Q.current=!1,F(!1)}},[af]);(0,q.useEffect)(()=>{(s.current!==l||t.current!==r)&&(s.current=l,t.current=r,S.current+=1,K.current=null,k(null),ag())},[l,r,ag]);let ah=(0,q.useRef)(j),ai=(0,q.useRef)(C);(0,q.useEffect)(()=>{ah.current=j},[j]),(0,q.useEffect)(()=>{ai.current=C},[C]);let aj=(0,q.useCallback)(a=>{ab(b=>{let c=null;for(let d of a)!d||b.has(d)||(c??=new Set(b)).add(d);return c??b})},[]),ak=(0,q.useCallback)(a=>{if(L.current=a.fingerprint,M.current=a.generation,0===a.files.length){i.current=null,S.current+=1,(0,q.startTransition)(()=>{h(null),k(null)}),D(null),K.current=a.fingerprint;return}let b=i.current;b&&a.files.some(a=>a.file===b)||(i.current=b=a.files[0]?.file??null,(0,q.startTransition)(()=>h(b))),aj([b]);let c=a.fingerprint!==K.current,d=ah.current?.generation===a.generation;(c||!d||null!==ai.current)&&(K.current=a.fingerprint,c&&(S.current+=1),ag())},[aj,ag]),al=(0,q.useCallback)(()=>{S.current+=1,K.current=null,L.current=null,M.current=null,k(null),D(null)},[]),am=(0,q.useCallback)(async(a=!1)=>{let b=()=>{a||z(!1),N.current=!1,O.current&&(O.current=!1,queueMicrotask(()=>{P.current(!0)}))};if(N.current){O.current=!0;return}N.current=!0,a||z(!0),B(null);let c=await Promise.all([fetch(`/api/files${ad()}`),fetch("/api/comments").then(async a=>{if(!a.ok)throw Error(`Failed to load comments (${a.status})`);return await a.json()}).catch(a=>(console.error("[diffhub] comments refresh failed",{error:a}),null))]).catch(a=>(B(a instanceof Error?a.message:String(a)),null));if(!c)return void b();let[e,g]=c;if(!e.ok){B((await e.json().catch(()=>({error:"Network error"}))).error??"Failed to load files"),b();return}let h=await e.json();(0,q.startTransition)(()=>{d(h),null!==g&&f(g)}),ak(h),b()},[ad,ak]);(0,q.useEffect)(()=>{P.current=am},[am]);let an=(0,q.useRef)(!1),ao=(0,q.useRef)(!1);(0,q.useEffect)(()=>{let a=null,b=()=>{an.current=!0,a&&clearTimeout(a),a=setTimeout(()=>{an.current=!1,ao.current&&(ao.current=!1,P.current(!0))},200)};return window.addEventListener("scroll",b,{passive:!0}),()=>{window.removeEventListener("scroll",b),a&&clearTimeout(a)}},[]);let ap=(0,q.useCallback)(()=>{if(an.current){ao.current=!0;return}P.current(!0)},[]),aq=(a=>{let[b,c]=(0,q.useState)("connecting"),d=(0,q.useEffectEvent)(a),e=(0,q.useRef)(null);return(0,q.useEffect)(()=>{let a=!1,b=0,f=null,g=new AbortController,h=async()=>{if(!a)try{let f=null===e.current?"":`?revision=${e.current}`,i=await fetch(`/api/watch${f}`,{cache:"no-store",signal:g.signal});if(a)return;if(!i.ok)throw Error(`Watch request failed with status ${i.status}`);let j=await i.json();if(a)return;b=0,c("live");let k=e.current;e.current=j.revision,j.changed&&null!==k&&j.revision!==k&&d(),a||queueMicrotask(()=>{a||h()})}catch(d){if(a||g.signal.aborted)return;if(console.error("[diffhub] file watch failed",{error:d,failureCount:b+=1}),b>10){console.error("[diffhub] file watch: max retries exceeded, stopping"),c("fallback");return}c(b>=hB.length?"fallback":"connecting"),f=setTimeout(()=>{f=null,a||h()},hB[Math.min(b-1,hB.length-1)])}};return c("connecting"),h(),()=>{a=!0,g.abort(),f&&clearTimeout(f)}},[]),b})(ap),ar=(0,q.useCallback)(()=>{am()},[am]),as=(0,q.useCallback)(()=>{W(!1),Y(!1),D(null),S.current+=1,K.current=null,k(null),ag()},[ag]);(0,q.useEffect)(()=>{am()},[am]),(0,q.useEffect)(()=>{let a=setInterval(ap,"live"===aq?3e4:5e3);return()=>clearInterval(a)},[aq,ap]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||j||C)return void W(!1);let a=setTimeout(()=>W(!0),2e4);return()=>clearTimeout(a)},[c,j,C]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||j||C)return void Y(!1);let a=setTimeout(()=>Y(!0),1e4);return()=>clearTimeout(a)},[c,j,C]);let at=(0,q.useCallback)((a,b=800)=>{J.current={file:a,until:Date.now()+b},i.current=a,(0,q.startTransition)(()=>h(a))},[]),au=(0,q.useCallback)((a,b="smooth")=>{at(a);let d=c?.files.map(a=>a.file)??[],e=d.indexOf(a);aj([a,d[e-1],d[e+1]]),ac(b=>{if(b.has(a)){let c=new Set(b);return c.delete(a),c}return b});let f=a=>{a.scrollIntoView({behavior:b,block:"start"})},g=document.querySelector(hG(a));if(g)return void f(g);let h=document.querySelector("#diff-container");if(!h)return;let i=new MutationObserver(()=>{let b=document.querySelector(hG(a));b&&(i.disconnect(),f(b))});i.observe(h,{childList:!0,subtree:!0}),setTimeout(()=>i.disconnect(),5e3)},[aj,c,at,ac]),av=(0,q.useCallback)(a=>{let b=J.current;if(b){if(Date.now()>b.until)J.current=null;else if(b.file!==a)return}i.current!==a&&(i.current=a,(0,q.startTransition)(()=>h(a)))},[]),aw=(0,q.useCallback)(a=>{at(a),ac(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[at,ac]),ax=(0,q.useCallback)(()=>{ac(()=>new Set((c?.files??[]).map(a=>a.file)))},[c,ac]),ay=(0,q.useCallback)(()=>{ac(()=>new Set)},[ac]);(0,q.useEffect)(()=>{let a=a=>{if(!(a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLInputElement)){if("s"!==a.key||a.metaKey||a.ctrlKey||m(a=>"split"===a?"stacked":"split"),"/"!==a.key&&"t"!==a.key.toLowerCase()||a.metaKey||a.ctrlKey||(a.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"c"===a.key.toLowerCase()&&!a.metaKey&&!a.ctrlKey&&g){if(a.shiftKey)return void ax();aw(g)}if("e"!==a.key.toLowerCase()||!a.shiftKey||a.metaKey||a.ctrlKey||ay(),"r"!==a.key||a.metaKey||a.ctrlKey||am(),"j"===a.key||"k"===a.key){let b=c?.files??[];if(0===b.length)return;let d=b.findIndex(a=>a.file===g),e="j"===a.key?b[d+1]:b[d-1];e&&au(e.file)}}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[ax,ay,c,am,au,g,m,aw]);let az=(0,q.useCallback)(a=>{I.current=a,H(a),al(),am(!1)},[al,am,H]),aA=(0,q.useCallback)(async(a,b,c,d,e)=>{let g=await fetch("/api/comments",{body:JSON.stringify({body:d,file:a,lineNumber:b,side:"deletions"===c?"left":"right",tag:e}),headers:{"Content-Type":"application/json"},method:"POST"});if(!g.ok)return console.error("[diffhub] add comment failed",{error:(await g.json().catch(()=>({error:"Failed to save comment"}))).error??`Failed to save comment (${g.status})`}),!1;let h=await g.json();return f(a=>[...a,h]),!0},[]),aB=(0,q.useCallback)(async a=>{let b=await fetch(`/api/comments?id=${a}`,{method:"DELETE"});return b.ok?(f(b=>b.filter(b=>b.id!==a)),!0):(console.error("[diffhub] delete comment failed",{error:(await b.json().catch(()=>({error:"Failed to delete comment"}))).error??`Failed to delete comment (${b.status})`}),!1)},[]),aC=A&&null!==c?{detail:A,label:"Background refresh failed",tone:"destructive"}:C&&j?{detail:C,label:"Diff refresh failed",tone:"destructive"}:"fallback"===aq?{detail:"Live watch is unavailable, so the app is polling every 5 seconds",label:"Polling fallback",tone:"warning"}:null;return A&&null===c?(0,o.jsx)(gH,{className:"min-h-svh",defaultOpen:b,children:(0,o.jsxs)(gK,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/10 px-6 py-4 text-sm text-destructive max-w-md text-center",children:[(0,o.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,o.jsx)("p",{className:"text-xs opacity-80",children:A})]}),(0,o.jsx)(a6,{variant:"outline",onClick:ar,children:"Retry"})]})}):(0,o.jsxs)(gH,{className:"min-h-svh",defaultOpen:b,style:{"--sidebar-width":`${w}px`},children:[(0,o.jsx)(g5,{files:c?.files??[],selectedFile:g,onSelectFile:au,comments:e,filterQuery:u,onFilterChange:v,isLoading:null===c,insertions:c?.insertions??0,deletions:c?.deletions??0,sidebarWidth:w,onSidebarWidthChange:x}),(0,o.jsxs)(gK,{className:"flex flex-col min-h-svh",children:[(0,o.jsx)("div",{className:"sticky top-0 z-20",children:(0,o.jsx)(gS,{branch:c?.branch??"…",baseBranch:c?.baseBranch??"main",refreshing:y||E,fileWatchState:aq,comments:e,diffMode:G,onDiffModeChange:az,layout:l,onLayoutChange:m,syncNotice:aC})}),(0,o.jsx)(hI,{filesData:c,deferredDiffData:j,diffError:C,syncNotice:aC,layout:l,comments:e,onAddComment:aA,onDeleteComment:aB,selectedFile:g,collapsedFiles:$,forceRenderFiles:aa,onToggleCollapse:aw,onActiveFileChange:av,repoPath:a,diffWatchdogTripped:V,diffHintShown:X,onRetryDiff:as})]})]})}],85340)}];
39
+ `)},lineAnnotations:x,renderAnnotation:y,renderGutterUtility:z},a)})}else C=(0,o.jsx)(hr,{onRender:A,variant:h?"large":"auto",changes:g?.changes});else C=(0,o.jsx)("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No textual patch available for this file."});return(0,o.jsxs)("div",{"data-filename":a,className:"font-sans",children:[(0,o.jsx)(hb,{file:a,insertions:g?.insertions??0,deletions:g?.deletions??0,commentCount:f.length,repoPath:m,collapsed:i,active:j,onToggleCollapse:l,headingId:v,panelId:w}),(0,o.jsx)("div",{id:w,role:"region","aria-labelledby":v,hidden:B,children:C})]})}),hz=(0,g7.memo)(function({file:a,filePatch:b,layout:c,prerenderedHTML:d,deferPatchRendering:e,isLargeFile:f,forceRender:g,comments:h,fileStat:i,collapsed:j,active:k,onToggleCollapse:l,onVisible:m,repoPath:n,onAddComment:p,onDeleteComment:q}){let r=(0,g7.useRef)(null),[s,t]=(0,g7.useState)(null),u=e||f,[v,w]=(0,g7.useState)(()=>!u||g);!v&&(g||null!==s)&&w(!0);let x=(0,g7.useCallback)(()=>{w(!0)},[]),y=v||g||null!==s||!u,z=(0,g7.useRef)(m);(0,g7.useEffect)(()=>{z.current=m},[m]),(0,g7.useEffect)(()=>{let b=r.current;if(!b||"u"<typeof IntersectionObserver)return;let c=new IntersectionObserver(b=>{let[c]=b;if(c){var d;c.isIntersecting&&c.intersectionRatio>=.35&&(d=z.current,hn=a,ho=d,0===hp&&(hp=requestAnimationFrame(()=>{hp=0;let a=hn,b=ho;hn=null,ho=null,a&&b&&b(a)})))}},{rootMargin:"-52px 0px -55% 0px",threshold:[.35,.6]});return c.observe(b),()=>c.disconnect()},[a]);let A=hw(a),B=(0,g7.useMemo)(()=>{let a=k?"auto":"none";return j||y?{overflowAnchor:a}:{minHeight:Math.min(960,Math.max(128,22*(i?.changes??1))),overflowAnchor:a}},[k,j,i,y]);return(0,o.jsx)("section",{ref:r,id:A,"data-file-section":a,className:"scroll-mt-[52px]",style:B,children:(0,o.jsx)(hy,{file:a,filePatch:b,layout:c,prerenderedHTML:d?.[c],shouldRenderPatch:y,comments:h,fileStat:i,isLargeFile:f,collapsed:j,active:k,sectionId:A,onToggleCollapse:l,repoPath:n,commentTarget:s,onCommentTargetChange:t,onRenderPatch:x,onAddComment:p,onDeleteComment:q})})}),hA=({patchesByFile:a,prerenderedHTMLByFile:b,layout:c,comments:d,onAddComment:e,onDeleteComment:f,activeFileId:g,fileStats:h,collapsedFiles:i,onToggleCollapse:j,onActiveFileChange:k,forceRenderFiles:l,repoPath:m})=>{let n=(0,g7.useMemo)(()=>{let a=new Map;for(let b of h)a.set(b.file,b);return a},[h]),p=(0,g7.useMemo)(()=>(a=>{let b={files:[],folders:new Map};for(let c of a){let a=c.split("/"),d=b;for(let b=0;b<a.length-1;b+=1){let c=a[b];d.folders.has(c)||d.folders.set(c,{files:[],folders:new Map});let e=d.folders.get(c);e&&(d=e)}d.files.push(c)}let c=[],d=a=>{for(let[,b]of[...a.folders.entries()].toSorted((a,b)=>a[0].localeCompare(b[0])))d(b);let b=[...a.files].toSorted((a,b)=>{let c=a.split("/").at(-1)??a,d=b.split("/").at(-1)??b;return c.localeCompare(d)});c.push(...b)};return d(b),c})([...h.map(a=>a.file),...Object.keys(a).filter(a=>!n.has(a))]),[n,h,a]),q=(0,g7.useMemo)(()=>{let a=new Map;for(let b of d){let c=a.get(b.file);c?c.push(b):a.set(b.file,[b])}return a},[d]),r=p.length>=24&&0===Object.keys(b??{}).length,s=(0,g7.useMemo)(()=>{let a=new Map;for(let b of p)a.set(b,()=>j(b));return a},[p,j]);return 0===p.length?(0,o.jsxs)(he,{className:"h-full",children:[(0,o.jsxs)(hf,{children:[(0,o.jsx)(hh,{variant:"icon",children:(0,o.jsx)(hc,{})}),(0,o.jsx)(hi,{children:"No changes"}),(0,o.jsx)(hj,{children:"The working tree is clean relative to the base branch"})]}),(0,o.jsx)(hk,{children:(0,o.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,o.jsx)(a7,{children:"r"})," to refresh"]})})]}):(0,o.jsx)("div",{id:"diff-container",children:p.map(d=>{var h;let j=n.get(d),p=a[d]??"",t=void 0!==j&&(h=p.length,!j.binary&&(j.changes>=500||void 0!==h&&h>=5e5));return(0,o.jsx)(hz,{file:d,filePatch:p,layout:c,prerenderedHTML:b?.[d],deferPatchRendering:r,isLargeFile:t,forceRender:l?.has(d)??!1,comments:q.get(d)??hm,fileStat:j,collapsed:i.has(d),active:g===d,onToggleCollapse:s.get(d),onVisible:k,repoPath:m,onAddComment:e,onDeleteComment:f},d)})})},hB=[1e3,2e3,5e3],hC=(a,b,c)=>{let[d,e]=(0,q.useState)(b);return(0,q.useEffect)(()=>{try{let b=localStorage.getItem(a);null!==b&&(!c||c.includes(b))&&e(b)}catch{}},[a,c]),[d,(0,q.useCallback)(b=>{e(c=>{let d="function"==typeof b?b(c):b;try{localStorage.setItem(a,d)}catch{}return d})},[a])]},hD=["split","stacked"],hE=["all","uncommitted"],hF=({text:a,pulse:b=!1})=>(0,o.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,o.jsx)("div",{className:`text-muted-foreground text-sm${b?" animate-pulse":""}`,children:a})}),hG=a=>{let b=hw(a).replaceAll(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,"\\$&");return`#${b}`},hH=({notice:a})=>{let b="border-border bg-muted/40 text-muted-foreground";return"destructive"===a.tone?b="border-destructive/30 bg-destructive/10 text-destructive":"warning"===a.tone&&(b="border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400"),(0,o.jsx)("div",{className:`border-b px-4 py-2 text-xs ${b}`,children:(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"font-medium",children:a.label}),a.detail&&(0,o.jsx)("span",{className:"text-xs opacity-80",children:a.detail})]})})},hI=({filesData:a,deferredDiffData:b,diffError:c,syncNotice:d,layout:e,comments:f,onAddComment:g,onDeleteComment:h,selectedFile:i,collapsedFiles:j,forceRenderFiles:k,onToggleCollapse:l,onActiveFileChange:m,repoPath:n,diffWatchdogTripped:p,diffHintShown:q,onRetryDiff:r})=>null===a?(0,o.jsx)(hF,{text:"Loading diff…",pulse:!0}):0===a.files.length?(0,o.jsx)(hF,{text:"No changes"}):b?(0,o.jsxs)(o.Fragment,{children:[d&&(0,o.jsx)(hH,{notice:d}),(0,o.jsx)(hA,{patchesByFile:b.patchesByFile,prerenderedHTMLByFile:b.prerenderedHTMLByFile,layout:e,comments:f,onAddComment:g,onDeleteComment:h,activeFileId:i,fileStats:a.files,collapsedFiles:j,forceRenderFiles:k,onToggleCollapse:l,onActiveFileChange:m,repoPath:n})]}):c?(0,o.jsx)(hF,{text:c}):p?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[(0,o.jsx)("div",{className:"text-muted-foreground text-sm",children:"Still loading the diff…"}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."}),(0,o.jsx)(a6,{size:"sm",variant:"default",onClick:r,children:"Retry"})]}):q?(0,o.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,o.jsx)("div",{className:"text-muted-foreground animate-pulse text-sm",children:`Loading diff${a?` (${a.files.length} files)…`:"…"}`}),(0,o.jsx)("div",{className:"text-muted-foreground text-xs opacity-80",children:"Large diffs take longer on first load."})]}):(0,o.jsx)(hF,{text:`Loading diff${a?` (${a.files.length} files)…`:"…"}`,pulse:!0});a.s(["DiffApp",0,({repoPath:a,defaultSidebarOpen:b=!0})=>{let[c,d]=(0,q.useState)(null),e=(0,q.useRef)(null),[f,g]=(0,q.useState)([]),h=(0,q.useRef)([]),[i,j]=(0,q.useState)(null),k=(0,q.useRef)(null),[l,m]=(0,q.useState)(null),[n,r]=hC("diffhub-layout","stacked",hD),{resolvedTheme:s}=(0,p.useTheme)(),t="light"===s?"light":"dark",u=(0,q.useRef)(n),v=(0,q.useRef)(t),[w,x]=(0,q.useState)(""),[y,z]=(0,q.useState)(256),[A,B]=(0,q.useState)(!1),[C,D]=(0,q.useState)(null),[E,F]=(0,q.useState)(null),[G,H]=(0,q.useState)(!1),[I,J]=hC("diffhub-diffMode","all",hE),K=(0,q.useRef)(I),L=(0,q.useRef)(null),M=(0,q.useRef)(null),N=(0,q.useRef)(null),O=(0,q.useRef)(null),P=(0,q.useRef)(!1),Q=(0,q.useRef)(!1),R=(0,q.useRef)(()=>Promise.resolve()),S=(0,q.useRef)(!1),T=(0,q.useRef)(!1),U=(0,q.useRef)(0),V=(0,q.useRef)(0),W=(0,q.useRef)(null),[X,Y]=(0,q.useState)(!1),[Z,$]=(0,q.useState)(!1),[,_]=(0,q.useTransition)(),aa=(0,q.useRef)(null),[ab,ac]=(0,q.useState)(()=>new Set),[ad,ae]=(0,q.useState)(()=>new Set);(0,q.useEffect)(()=>{K.current=I},[I]),(0,q.useEffect)(()=>{e.current=c},[c]),(0,q.useEffect)(()=>{h.current=f},[f]),(0,q.useEffect)(()=>{ac(new Set([]))},[a]);let af=(0,q.useCallback)(b=>{ac(c=>{let d=b(c);if(d===c)return c;try{localStorage.setItem(`diffhub-collapsed:${a}`,JSON.stringify([...d]))}catch{}return d})},[a]),ag=(0,q.useRef)(l),ah=(0,q.useRef)(E);(0,q.useEffect)(()=>{ag.current=l},[l]),(0,q.useEffect)(()=>{ah.current=E},[E]);let ai=(0,q.useCallback)(()=>{},[]);(0,q.useLayoutEffect)(()=>{aa.current});let aj=(0,q.useCallback)(()=>{let a=new URLSearchParams;"uncommitted"===K.current&&a.set("mode","uncommitted");let b=a.toString();return b?`?${b}`:""},[]),ak=(0,q.useCallback)(()=>{let a=new URLSearchParams;O.current&&a.set("generation",O.current),"uncommitted"===K.current&&a.set("mode","uncommitted"),a.set("layout",u.current),a.set("theme",v.current);let b=a.toString();return b?`?${b}`:""},[]),al=(0,q.useCallback)(async a=>{let b=O.current,c=N.current;W.current=Date.now(),Y(!1),F(null),console.info("[diffhub] fetchDiff start",{fingerprint:c,generation:b,mode:K.current,requestId:a});let d=new AbortController,e=setTimeout(()=>{d.abort(Error("Diff request timed out"))},15e3);try{var f,g;let e,h,i=await fetch(`/api/diff${ak()}`,{signal:d.signal});if(!i.ok){let d=(await i.json().catch(()=>({error:"Failed to load diff"}))).error??`Failed to load diff (${i.status})`;console.error("[diffhub] fetchDiff non-ok response",{fingerprint:c,generation:b,mode:K.current,requestId:a,responseStatus:i.status,responseStatusText:i.statusText,serverError:d}),a===U.current&&F(d);return}let j=(f=await i.json(),g=c??"unknown",e=f.patchesByFile??Object.fromEntries((a=>{let b=new Map,c=/^diff --git a\/(.+?) b\/(.+)$/gm,d=[],e=c.exec(a);for(;e;)d.push({file:e[2],start:e.index}),e=c.exec(a);for(let[c,e]of d.entries()){let f=d[c+1]?.start??a.length,g=a.slice(e.start,f).trimEnd();b.set(e.file,g?`${g}
40
+ `:"")}return b})(f.patch??"")),{baseBranch:f.baseBranch,branch:f.branch,generation:f.generation,mergeBase:f.mergeBase,patchesByFile:e,prerenderedHTMLByFile:f.prerenderedHTMLByFile,reviewKeysByFile:f.reviewKeysByFile??(h=f.generation,Object.fromEntries(Object.entries(e).map(([a,b])=>[a,`${h}:${(a=>{let b=0;for(let c=0;c<a.length;c+=1)b=Math.trunc(Math.imul(31,b)+(a.codePointAt(c)??0));return Math.abs(b).toString(36)})(`${a}:${b}`)}`]))),sourceFingerprint:g});if(a!==U.current||c!==N.current||b!==O.current){console.info("[diffhub] fetchDiff response stale",{fingerprint:c,generation:b,latestRequestId:U.current,requestId:a}),null!==O.current&&(V.current+=1,V.current>=3&&(console.warn("[diffhub] fetchDiff stale-drop limit reached, invalidating",{drops:V.current}),V.current=0,U.current+=1,M.current=null,null===ag.current&&m(null)),T.current=!0);return}V.current=0,console.info("[diffhub] fetchDiff success",{fileCount:Object.keys(j.patchesByFile).length,fingerprint:c,generation:j.generation,requestId:a}),ai(),_(()=>m(j))}catch(d){console.error("[diffhub] fetchDiff threw",{error:d,fingerprint:c,generation:b,mode:K.current,requestId:a}),a===U.current&&F(d instanceof Error?d.message:String(d))}finally{clearTimeout(e)}},[ak,ai,_]),am=(0,q.useCallback)(async()=>{if(T.current=!0,!S.current){for(S.current=!0,H(!0);T.current;)T.current=!1,U.current+=1,await al(U.current);S.current=!1,H(!1)}},[al]);(0,q.useEffect)(()=>{(u.current!==n||v.current!==t)&&(u.current=n,v.current=t,U.current+=1,M.current=null,F(null),am())},[n,t,am]);let an=(0,q.useCallback)(a=>{ae(b=>{let c=null;for(let d of a)!d||b.has(d)||(c??=new Set(b)).add(d);return c??b})},[]),ao=(0,q.useCallback)(a=>{if(N.current=a.fingerprint,O.current=a.generation,0===a.files.length){k.current=null,U.current+=1,(0,q.startTransition)(()=>{j(null),m(null)}),F(null),M.current=a.fingerprint;return}let b=k.current;b&&a.files.some(a=>a.file===b)||(k.current=b=a.files[0]?.file??null,(0,q.startTransition)(()=>j(b))),an([b]);let c=a.fingerprint!==M.current,d=ag.current?.generation===a.generation;(c||!d||null!==ah.current)&&(M.current=a.fingerprint,c&&(U.current+=1),am())},[an,am]),ap=(0,q.useCallback)(()=>{U.current+=1,M.current=null,N.current=null,O.current=null,m(null),F(null)},[]),aq=(0,q.useCallback)(async(a=!1)=>{var b,c;let f=()=>{a||B(!1),P.current=!1,Q.current&&(Q.current=!1,queueMicrotask(()=>{R.current(!0)}))};if(P.current){Q.current=!0;return}P.current=!0,a||B(!0),D(null);let i=await Promise.all([fetch(`/api/files${aj()}`),fetch("/api/comments").then(async a=>{if(!a.ok)throw Error(`Failed to load comments (${a.status})`);return await a.json()}).catch(a=>(console.error("[diffhub] comments refresh failed",{error:a}),null))]).catch(a=>(D(a instanceof Error?a.message:String(a)),null));if(!i)return void f();let[j,k]=i;if(!j.ok){D((await j.json().catch(()=>({error:"Network error"}))).error??"Failed to load files"),f();return}let l=await j.json(),m=(b=e.current,!(b&&b.baseBranch===l.baseBranch&&b.branch===l.branch&&b.deletions===l.deletions&&b.fingerprint===l.fingerprint&&b.generation===l.generation&&b.insertions===l.insertions&&b.files.length===l.files.length&&b.files.every((a,b)=>{let c=l.files[b];return void 0!==c&&a.binary===c.binary&&a.changes===c.changes&&a.deletions===c.deletions&&a.file===c.file&&a.insertions===c.insertions}))),n=null!==k&&(c=h.current,!(c.length===k.length&&c.every((a,b)=>{let c=k[b];return void 0!==c&&a.body===c.body&&a.createdAt===c.createdAt&&a.file===c.file&&a.id===c.id&&a.lineNumber===c.lineNumber&&a.side===c.side&&a.tag===c.tag})));(m||n)&&(ai(),m&&(e.current=l),n&&null!==k&&(h.current=k),(0,q.startTransition)(()=>{m&&d(l),n&&null!==k&&g(k)})),ao(l),f()},[aj,ai,ao]);(0,q.useEffect)(()=>{R.current=aq},[aq]);let ar=(0,q.useRef)(!1),as=(0,q.useRef)(!1);(0,q.useEffect)(()=>{let a=null,b=()=>{ar.current=!0,a&&clearTimeout(a),a=setTimeout(()=>{ar.current=!1,as.current&&(as.current=!1,R.current(!0))},200)};return window.addEventListener("scroll",b,{passive:!0}),()=>{window.removeEventListener("scroll",b),a&&clearTimeout(a)}},[]);let at=(0,q.useCallback)(()=>{if(ar.current){as.current=!0;return}R.current(!0)},[]),au=(a=>{let[b,c]=(0,q.useState)("connecting"),d=(0,q.useEffectEvent)(a),e=(0,q.useRef)(null);return(0,q.useEffect)(()=>{let a=!1,b=0,f=null,g=new AbortController,h=async()=>{if(!a)try{let f=null===e.current?"":`?revision=${e.current}`,i=await fetch(`/api/watch${f}`,{cache:"no-store",signal:g.signal});if(a)return;if(!i.ok)throw Error(`Watch request failed with status ${i.status}`);let j=await i.json();if(a)return;b=0,c("live");let k=e.current;e.current=j.revision,j.changed&&null!==k&&j.revision!==k&&d(),a||queueMicrotask(()=>{a||h()})}catch(d){if(a||g.signal.aborted)return;if(console.error("[diffhub] file watch failed",{error:d,failureCount:b+=1}),b>10){console.error("[diffhub] file watch: max retries exceeded, stopping"),c("fallback");return}c(b>=hB.length?"fallback":"connecting"),f=setTimeout(()=>{f=null,a||h()},hB[Math.min(b-1,hB.length-1)])}};return c("connecting"),h(),()=>{a=!0,g.abort(),f&&clearTimeout(f)}},[]),b})(at),av=(0,q.useCallback)(()=>{aq()},[aq]),aw=(0,q.useCallback)(()=>{Y(!1),$(!1),F(null),U.current+=1,M.current=null,null===ag.current&&m(null),am()},[am]);(0,q.useEffect)(()=>{aq()},[aq]),(0,q.useEffect)(()=>{let a=setInterval(at,"live"===au?3e4:5e3);return()=>clearInterval(a)},[au,at]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||l||E)return void Y(!1);let a=setTimeout(()=>Y(!0),2e4);return()=>clearTimeout(a)},[c,l,E]),(0,q.useEffect)(()=>{if(!c||0===c.files.length||l||E)return void $(!1);let a=setTimeout(()=>$(!0),1e4);return()=>clearTimeout(a)},[c,l,E]);let ax=(0,q.useCallback)((a,b=800)=>{L.current={file:a,until:Date.now()+b},k.current=a,(0,q.startTransition)(()=>j(a))},[]),ay=(0,q.useCallback)((a,b="smooth")=>{ax(a);let d=c?.files.map(a=>a.file)??[],e=d.indexOf(a);an([a,d[e-1],d[e+1]]),af(b=>{if(b.has(a)){let c=new Set(b);return c.delete(a),c}return b});let f=a=>{a.scrollIntoView({behavior:b,block:"start"})},g=document.querySelector(hG(a));if(g)return void f(g);let h=document.querySelector("#diff-container");if(!h)return;let i=new MutationObserver(()=>{let b=document.querySelector(hG(a));b&&(i.disconnect(),f(b))});i.observe(h,{childList:!0,subtree:!0}),setTimeout(()=>i.disconnect(),5e3)},[an,c,ax,af]),az=(0,q.useCallback)(a=>{let b=L.current;if(b){if(Date.now()>b.until)L.current=null;else if(b.file!==a)return}k.current!==a&&(k.current=a,(0,q.startTransition)(()=>j(a)))},[]),aA=(0,q.useCallback)(a=>{ax(a),af(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[ax,af]),aB=(0,q.useCallback)(()=>{af(()=>new Set((c?.files??[]).map(a=>a.file)))},[c,af]),aC=(0,q.useCallback)(()=>{af(()=>new Set)},[af]);(0,q.useEffect)(()=>{let a=a=>{if(!(a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLInputElement)){if("s"!==a.key||a.metaKey||a.ctrlKey||r(a=>"split"===a?"stacked":"split"),"/"!==a.key&&"t"!==a.key.toLowerCase()||a.metaKey||a.ctrlKey||(a.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"c"===a.key.toLowerCase()&&!a.metaKey&&!a.ctrlKey&&i){if(a.shiftKey)return void aB();aA(i)}if("e"!==a.key.toLowerCase()||!a.shiftKey||a.metaKey||a.ctrlKey||aC(),"r"!==a.key||a.metaKey||a.ctrlKey||aq(),"j"===a.key||"k"===a.key){let b=c?.files??[];if(0===b.length)return;let d=b.findIndex(a=>a.file===i),e="j"===a.key?b[d+1]:b[d-1];e&&ay(e.file)}}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[aB,aC,c,aq,ay,i,r,aA]);let aD=(0,q.useCallback)(a=>{K.current=a,J(a),ap(),aq(!1)},[ap,aq,J]),aE=(0,q.useCallback)(async(a,b,c,d,e)=>{let f=await fetch("/api/comments",{body:JSON.stringify({body:d,file:a,lineNumber:b,side:"deletions"===c?"left":"right",tag:e}),headers:{"Content-Type":"application/json"},method:"POST"});if(!f.ok)return console.error("[diffhub] add comment failed",{error:(await f.json().catch(()=>({error:"Failed to save comment"}))).error??`Failed to save comment (${f.status})`}),!1;let h=await f.json();return g(a=>[...a,h]),!0},[]),aF=(0,q.useCallback)(async a=>{let b=await fetch(`/api/comments?id=${a}`,{method:"DELETE"});return b.ok?(g(b=>b.filter(b=>b.id!==a)),!0):(console.error("[diffhub] delete comment failed",{error:(await b.json().catch(()=>({error:"Failed to delete comment"}))).error??`Failed to delete comment (${b.status})`}),!1)},[]),aG=C&&null!==c?{detail:C,label:"Background refresh failed",tone:"destructive"}:E&&l?{detail:E,label:"Diff refresh failed",tone:"destructive"}:"fallback"===au?{detail:"Live watch is unavailable, so the app is polling every 5 seconds",label:"Polling fallback",tone:"warning"}:null;return C&&null===c?(0,o.jsx)(gH,{className:"min-h-svh",defaultOpen:b,children:(0,o.jsxs)(gK,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/10 px-6 py-4 text-sm text-destructive max-w-md text-center",children:[(0,o.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,o.jsx)("p",{className:"text-xs opacity-80",children:C})]}),(0,o.jsx)(a6,{variant:"outline",onClick:av,children:"Retry"})]})}):(0,o.jsxs)(gH,{className:"min-h-svh",defaultOpen:b,style:{"--sidebar-width":`${y}px`},children:[(0,o.jsx)(g5,{files:c?.files??[],selectedFile:i,onSelectFile:ay,comments:f,filterQuery:w,onFilterChange:x,isLoading:null===c,insertions:c?.insertions??0,deletions:c?.deletions??0,sidebarWidth:y,onSidebarWidthChange:z}),(0,o.jsxs)(gK,{className:"flex flex-col min-h-svh",children:[(0,o.jsx)("div",{className:"sticky top-0 z-20",children:(0,o.jsx)(gS,{branch:c?.branch??"…",baseBranch:c?.baseBranch??"main",refreshing:A||G,fileWatchState:au,comments:f,diffMode:I,onDiffModeChange:aD,layout:n,onLayoutChange:r,syncNotice:aG})}),(0,o.jsx)(hI,{filesData:c,deferredDiffData:l,diffError:E,syncNotice:aG,layout:n,comments:f,onAddComment:aE,onDeleteComment:aF,selectedFile:i,collapsedFiles:ab,forceRenderFiles:ad,onToggleCollapse:aA,onActiveFileChange:az,repoPath:a,diffWatchdogTripped:X,diffHintShown:Z,onRetryDiff:aw})]})]})}],85340)}];
41
41
 
42
42
  //# sourceMappingURL=_07okxca._.js.map
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/97YS4C2mw92wvzoWra45x/_buildManifest.js",
11
- "static/97YS4C2mw92wvzoWra45x/_ssgManifest.js",
12
- "static/97YS4C2mw92wvzoWra45x/_clientMiddlewareManifest.js"
10
+ "static/X3k3ryHO5ngxx_6ANrAAl/_buildManifest.js",
11
+ "static/X3k3ryHO5ngxx_6ANrAAl/_ssgManifest.js",
12
+ "static/X3k3ryHO5ngxx_6ANrAAl/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0ijev3dgvkfb8.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0j4udl9rut-37.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/13t_ihnxxnv7q.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><script src="/_next/static/chunks/0dpr.umiw20gr.js" async=""></script><script src="/_next/static/chunks/11jy8da-iayqc.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>DiffHub</title><meta name="description" content="GitHub PR-style local diff viewer"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="bg-background antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[87710,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ThemeProvider\"]\n3:I[71249,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"DiffsWorkerProvider\",1]\n4:I[39756,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n6:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ViewportBoundary\"]\nc:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"MetadataBoundary\"]\ne:I[68027,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0j4udl9rut-37.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/029-i5m87mr_j.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0dpr.umiw20gr.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/11jy8da-iayqc.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"bg-background antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],false]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"97YS4C2mw92wvzoWra45x\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[27201,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"DiffHub\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"GitHub PR-style local diff viewer\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0j4udl9rut-37.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/13t_ihnxxnv7q.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><script src="/_next/static/chunks/0dpr.umiw20gr.js" async=""></script><script src="/_next/static/chunks/11jy8da-iayqc.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>DiffHub</title><meta name="description" content="GitHub PR-style local diff viewer"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="bg-background antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[87710,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ThemeProvider\"]\n3:I[71249,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"DiffsWorkerProvider\",1]\n4:I[39756,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\"]\n6:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"ViewportBoundary\"]\nc:I[97367,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"MetadataBoundary\"]\ne:I[68027,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0j4udl9rut-37.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/029-i5m87mr_j.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0dpr.umiw20gr.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/11jy8da-iayqc.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"glide_d2f847e3-module__jCZlzq__variable operatormono_ed74845e-module__g9tX8G__variable\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"bg-background antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"disableTransitionOnChange\":true,\"children\":[[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],false]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0j4udl9rut-37.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"X3k3ryHO5ngxx_6ANrAAl\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[27201,[\"/_next/static/chunks/13t_ihnxxnv7q.js\",\"/_next/static/chunks/029-i5m87mr_j.js\",\"/_next/static/chunks/0dpr.umiw20gr.js\",\"/_next/static/chunks/11jy8da-iayqc.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"DiffHub\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"GitHub PR-style local diff viewer\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"97YS4C2mw92wvzoWra45x\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0ijev3dgvkfb8.js"/><script src="/_next/static/chunks/075fg87~fo-89.js" async=""></script><script src="/_next/static/chunks/0mstyq17cbf8-.js" async=""></script><script src="/_next/static/chunks/turbopack-0j~ashtj9wbn4.js" async=""></script><script src="/_next/static/chunks/029-i5m87mr_j.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0ijev3dgvkfb8.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"X3k3ryHO5ngxx_6ANrAAl\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/029-i5m87mr_j.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"4aug2VO7/K4xtctviJUu30EJ11edqdKB6bBsa8vTFuE=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"68qj+Y+Ng0B0ZCbnmGVhcdB7Nq/o9rVvxBkJtpNhJIg=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "4aug2VO7/K4xtctviJUu30EJ11edqdKB6bBsa8vTFuE="
4
+ "encryptionKey": "68qj+Y+Ng0B0ZCbnmGVhcdB7Nq/o9rVvxBkJtpNhJIg="
5
5
  }