@pi-chamber/web 0.3.1 → 0.3.2

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 (59) hide show
  1. package/bin/lib/cli-startup.js +53 -10
  2. package/bin/lib/cli-startup.test.js +42 -0
  3. package/dist/assets/{CommitSection-C336377Z.js → CommitSection-DLIvjYbM.js} +1 -1
  4. package/dist/assets/{DiagramEditor-gHLCXHtr.js → DiagramEditor-Tw3ZWHML.js} +1 -1
  5. package/dist/assets/{DiagramView-DlHzRRBc.js → DiagramView-CK6R7taL.js} +1 -1
  6. package/dist/assets/{DiffView-5wHwK-lg.js → DiffView-vrxi5oWp.js} +2 -2
  7. package/dist/assets/{FilesView-5bswI3JZ.js → FilesView-BD_h3EVr.js} +6 -6
  8. package/dist/assets/{GitView-BfykGpGh.js → GitView-BwNKqK0K.js} +4 -4
  9. package/dist/assets/{JsonTreeView-HVwQS7qG.js → JsonTreeView-CmY7QgEX.js} +1 -1
  10. package/dist/assets/{MarkdownRendererImpl-kjd4e0N8.js → MarkdownRendererImpl-CpI-25Xk.js} +1 -1
  11. package/dist/assets/{PatchDiff-Dlm4RU8n.js → PatchDiff-CrIWbYj7.js} +1 -1
  12. package/dist/assets/{PierreDiffViewer-St32rXlD.js → PierreDiffViewer-B410mdbq.js} +2 -2
  13. package/dist/assets/{SessionSwitcherDropdown-D5bWfZNA.js → SessionSwitcherDropdown-DROjbyIu.js} +93 -93
  14. package/dist/assets/SettingsView-CsJItYZh.js +4 -0
  15. package/dist/assets/{SettingsWindow-Ck_uhTnx.js → SettingsWindow-C9s4AX72.js} +1 -1
  16. package/dist/assets/{ToolOutputDialog-BCONUv3r.js → ToolOutputDialog-b_R4tAZu.js} +6 -6
  17. package/dist/assets/{ToolPartDiffPreview-BdVuk2kc.js → ToolPartDiffPreview-CfnliaE9.js} +1 -1
  18. package/dist/assets/{VirtualizedFileDiff-BsAZM0jo.js → VirtualizedFileDiff-CQz2fSZI.js} +4 -4
  19. package/dist/assets/{collapsible-Wnmq-13H.js → collapsible-CR4U9tjw.js} +1 -1
  20. package/dist/assets/{computeVirtualFileMetrics-skbyL2Az.js → computeVirtualFileMetrics-C7vXPUYT.js} +2 -2
  21. package/dist/assets/{contextFileOpenGuard-BsxQITMZ.js → contextFileOpenGuard-DtTHRnq1.js} +1 -1
  22. package/dist/assets/{index-8TL2HlaR.js → index-BAqpUCjs.js} +4 -4
  23. package/dist/assets/{index-Bfp6eYap.js → index-DZG82DE1.js} +1 -1
  24. package/dist/assets/{isDiffPlainText-dZkfk3yG.js → isDiffPlainText-zTq-4A04.js} +1 -1
  25. package/dist/assets/{isFilePlainText-UL_tMQZx.js → isFilePlainText-CLgIdzE5.js} +1 -1
  26. package/dist/assets/{main-CHQfoyRP.js → main-BVWtJYSk.js} +2 -2
  27. package/dist/assets/main-DXYHsqzA.js +133 -0
  28. package/dist/assets/{markdownCore-qX3mJFkL.js → markdownCore-CN0pApQE.js} +2 -2
  29. package/dist/assets/{miniChat-3QtCNwHl.js → miniChat-BrbRq5NQ.js} +2 -2
  30. package/dist/assets/{mobile-B_CyfRAX.js → mobile-DTPtCn5N.js} +2 -2
  31. package/dist/assets/{renderElectronMiniChatApp-OToslrv-.js → renderElectronMiniChatApp-CM8qBaye.js} +1 -1
  32. package/dist/assets/{renderMobileApp-BD_wep_I.js → renderMobileApp-KS_pt-qc.js} +4 -4
  33. package/dist/assets/{runtimeSurface-CkdOpqo7.js → runtimeSurface-CkHYYg0E.js} +1 -1
  34. package/dist/assets/{useInlineCommentController-DVif5Fr8.js → useInlineCommentController-CwNNjgc7.js} +2 -2
  35. package/dist/assets/usePanelSlide-DkorgQJ5.js +56 -0
  36. package/dist/assets/{useWindowTitle-BZVlLMCy.js → useWindowTitle-B9wt_3ZQ.js} +3 -3
  37. package/dist/assets/{vendor-codemirror-language-data-C-924Z4o.js → vendor-codemirror-language-data-x89A7Wy0.js} +2 -2
  38. package/dist/assets/{web-components-BG-6PEN4.js → web-components-BEPfE4kU.js} +4 -4
  39. package/dist/index.html +3 -3
  40. package/dist/mini-chat.html +2 -2
  41. package/dist/mobile.html +2 -2
  42. package/package.json +1 -1
  43. package/server/index.js +33 -0
  44. package/server/lib/pi/routes.js +5 -1
  45. package/server/lib/pi/session-daemon/DOCUMENTATION.md +1 -1
  46. package/server/lib/pi/session-daemon/session-daemon.js +111 -9
  47. package/server/lib/pi/session-daemon/session-daemon.test.js +75 -0
  48. package/server/lib/pi/settings-store.js +17 -0
  49. package/server/lib/pi/settings-store.test.js +33 -0
  50. package/server/lib/server/core-routes.js +36 -4
  51. package/server/lib/server/tunnel-service.DOCUMENTATION.md +74 -0
  52. package/server/lib/server/tunnel-service.js +228 -0
  53. package/server/lib/server/tunnel-service.test.js +61 -0
  54. package/server/lib/ui-auth/DOCUMENTATION.md +2 -0
  55. package/server/lib/ui-auth/ui-auth.js +5 -1
  56. package/server/lib/ui-auth/ui-auth.test.js +17 -0
  57. package/dist/assets/SettingsView-FGe5TEQq.js +0 -4
  58. package/dist/assets/main-DbnYXZeK.js +0 -133
  59. package/dist/assets/usePanelSlide-C_PJmPXW.js +0 -56
@@ -1,10 +1,10 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-capacitor-app-BrDJj9I_.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-capacitor-core-B4EWRrHz.js"])))=>i.map(i=>d[i]);
2
- import{h as E,d6 as T,d7 as j,av as se,d8 as ne,cU as ie,d9 as re,aa as k,b as Z,da as ae,db as le,dc as P,dd as ce,de}from"./SessionSwitcherDropdown-D5bWfZNA.js";import{aq as ue,m as B,r as U,q as ee,u as d,W as te,a3 as ge,a as G,ar as fe,N as oe,i as x,b as me,M as $,T as pe,e as ye,as as V,an as he,at as Se,ao as we}from"./index-8TL2HlaR.js";import{_ as be}from"./vendor-vite-runtime-DD1OZmLC.js";import{R as A}from"./vendor-react-DYyjh7Q0.js";const Me=[];function H(){return[...Me].reverse()}const De={getLastAssistantMessage(){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),null;const t=P();if(!t||t.length===0)return console.log("[ERROR] No messages in current session"),null;for(let s=t.length-1;s>=0;s--){const n=t[s];if(n.role==="assistant"){const a=(T(n.id)||[]).map(u=>{const m={id:u.id,type:u.type};return u.type==="text"?(m.text=u.text,m.textLength=u.text?.length||0):u.type==="tool"?(m.tool=u.tool,m.state=u.state?.status):(u.type==="step-start"||u.type==="step-finish")&&(m.isStepMarker=!0),m}),g=a.some(u=>u.type==="text"&&u.text&&u.text.trim().length>0),r=a.some(u=>u.type==="tool"),l=a.some(u=>u.type==="step-start"||u.type==="step-finish"),h=a.length===0,p=!g&&!r&&(!h||l),f={messageId:n.id,role:n.role,timestamp:n.time?.created||0,partsCount:a.length,parts:a,isEmpty:h,isEmptyResponse:p,raw:n};return console.log("[INSPECT] Last Assistant Message:",f),console.log("[SUMMARY] Summary:",{messageId:f.messageId,partsCount:f.partsCount,isEmpty:f.isEmpty,isEmptyResponse:f.isEmptyResponse,hasText:g,hasTools:r,hasStepMarkers:l,onlyStepMarkers:l&&!g&&!r}),f.isEmpty&&console.warn("[WARNING] Message has NO parts!"),f.isEmptyResponse&&(console.warn("[WARNING] Message has parts but NO meaningful content (empty text, no tools)!"),l&&!g&&!r&&(console.warn("[CRITICAL] CLAUDE EMPTY RESPONSE BUG: Only step-start/step-finish markers, no actual content!"),console.log("This is a known issue with Claude models (anthropic provider)"),console.log("Recommendation: Send a follow-up message or try a different model"))),f}}return console.log("[ERROR] No assistant messages found in current session"),null},truncateString(e,o=80){return!e||typeof e!="string"||e.length<=o?e:e.substring(0,o)+"…"},truncateMessages(e){return e.map(o=>({...o,parts:(T(o.id)||[]).map(t=>{const s={...t};return"text"in t&&(s.text=this.truncateString(t.text)),"textPreview"in t&&(s.textPreview=this.truncateString(t.textPreview)),t.state&&(s.state={...t.state},"output"in t.state&&(s.state.output=this.truncateString(t.state.output)),"error"in t.state&&(s.state.error=this.truncateString(t.state.error)),t.state.metadata&&"preview"in t.state.metadata&&(s.state.metadata={...t.state.metadata,preview:this.truncateString(t.state.metadata.preview)})),s})}))},getAllMessages(e=!1){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),[];const s=P();return console.log(`[MESSAGES] Total messages in session: ${s.length}`),s.forEach((n,c)=>{const a=T(n.id)||[];console.log(`[${c}] ${n.role} - ${n.id} - ${a.length} parts`)}),e?this.truncateMessages(s):s},async getAppStatus(){const e=B.getState(),o=E.getState(),t=Z.getState(),s=e.currentDirectory||null,n=k.getDirectory()??null,c=ae(),a=new Set,g={};c.forEach(i=>{const y=i.directory;typeof y=="string"&&y.trim().length>0?(a.add(y),g[y]=(g[y]??0)+1):g["(none)"]=(g["(none)"]??0)+1});const r=(()=>{if(typeof window>"u")return{available:!1};try{return{available:!0,lastDirectory:window.localStorage.getItem("lastDirectory"),homeDirectory:window.localStorage.getItem("homeDirectory")}}catch(i){return{available:!1,error:i instanceof Error?i.message:String(i)}}})(),l=ee(),h=typeof window<"u"&&!!window.__PICHAMBER_ELECTRON__,p=async i=>{try{return await i.json()}catch{return null}},f=async i=>{try{return await i.text()}catch{return null}},u=async i=>{try{const y=await U(i);return y.ok?await p(y):{status:y.status}}catch(y){return{error:y instanceof Error?y.message:String(y)}}};let m=null,D=null,I=null,w=null;try{const i=await k.getSdkClient().path.get(s?{directory:s}:void 0);m=i.error?{error:i.error}:i.data}catch(i){m={error:i instanceof Error?i.message:String(i)}}try{const i=await k.getSdkClient().project.current(s?{directory:s}:void 0);D=i.error?{error:i.error}:i.data}catch(i){D={error:i instanceof Error?i.message:String(i)}}I=await u("/api/pi/ui-settings");try{const i=await U("/api/health"),y=i.headers.get("content-type")||"",L=await f(i),O=y.toLowerCase().includes("application/json");let M=null;if(O&&L)try{const R=JSON.parse(L);R&&typeof R=="object"&&!Array.isArray(R)&&(M=R)}catch{M=null}w={status:i.status,ok:i.ok,contentType:y,type:O?"json":"html",openCodePort:M?.openCodePort??null,openCodeRunning:M?.openCodeRunning??null,openCodeSecureConnection:M?.openCodeSecureConnection??null,openCodeAuthSource:M?.openCodeAuthSource??null,isOpenCodeReady:M?.isOpenCodeReady??null,lastOpenCodeError:M?.lastOpenCodeError??null,preview:L?L.slice(0,120):null}}catch(i){w={error:i instanceof Error?i.message:String(i)}}let b={isGitRepo:null};if(s)try{b.isGitRepo=await le(s)}catch(i){b={isGitRepo:null,error:i instanceof Error?i.message:String(i)}}const C=t.projects.map(i=>({id:i.id,path:i.path,label:i.label})),v={runtime:{platform:l?.runtime?.platform??null,isDesktop:h,hasRuntimeApis:!!l,desktopServerOrigin:null},location:typeof window<"u"?{href:window.location?.href??null,origin:window.location?.origin??null}:null,directories:{currentDirectory:s,opencodeDirectory:m?.directory||m?.worktree||n,homeDirectory:e.homeDirectory||null,isHomeReady:e.isHomeReady,hasPersistedDirectory:e.hasPersistedDirectory,isSwitchingDirectory:e.isSwitchingDirectory},projects:{total:t.projects.length,activeProjectId:t.activeProjectId,samples:C},sessions:{total:c.length,currentSessionId:o.currentSessionId,lastLoadedDirectory:o.lastLoadedDirectory,uniqueDirectories:a.size,directorySamples:Array.from(a).slice(0,5),directoryCounts:g},git:b,localStorage:r,opencode:{pathInfo:m,projectInfo:D,health:w},pichamber:{settingsInfo:I},recentSendFailures:H(),currentSessionDirectoryResolution:o.currentSessionId?this.diagnoseSessionDirectory(o.currentSessionId):null};return console.log("[DEBUG] App status snapshot:",v),v},getRecentSendFailures(){const e=H();return e.length===0?console.log("[OK] No prompt sends were rejected in this session."):(console.warn(`[ALERT] ${e.length} rejected prompt send(s):`),console.table(e)),e},diagnoseSessionDirectory(e){const o=E.getState(),t=e??o.currentSessionId;if(!t)return console.log("[ERROR] No session selected and no session id passed"),null;const s=ne(t),n=ie().find(p=>p.id===t),c=n?.directory??null,a=t===o.currentSessionId?o.currentSessionDirectory:null,r=re({session:n??null,currentDirectory:a}),l=o.getDirectoryForSession(t),h={sessionId:t,isCurrentSession:t===o.currentSessionId,routedDirectory:l,resolvedFrom:r.source,conflict:r.conflict,sources:ce(),details:{owningChildStore:s,sessionRecordDirectory:c,sessionIndexed:!!n,currentSessionDirectory:o.currentSessionDirectory,rememberedForRuntime:remembered.runtime,persistedAcrossRestarts:remembered.persisted,activeDirectory:B.getState().currentDirectory??null,opencodeClientDirectory:k.getDirectory()??null}};return console.log("[DEBUG] Session directory resolution:",h),r.conflict?console.warn(`[ALERT] Directory sources disagree: using "${r.directory}" (${r.source}) while "${r.conflict.directory}" came from ${r.conflict.source}.`):l?console.log("[OK] All known sources agree on the session directory."):console.warn("[ALERT] No directory resolved for this session — sends fall back to the active directory."),h},async buildDiagnosticsReport(){const e=await this.getAppStatus();return JSON.stringify(e,null,2)},async copyTextToClipboard(e){return se(e)},async copyDiagnosticsReport(){const e=await this.buildDiagnosticsReport();return{...await this.copyTextToClipboard(e),report:e}},checkLastMessage(){const e=this.getLastAssistantMessage();if(!e)return!1;const o=e.isEmpty||e.isEmptyResponse;return o?(console.error("[ALERT] PROBLEMATIC MESSAGE DETECTED!"),console.log("Details:",{messageId:e.messageId,isEmpty:e.isEmpty,isEmptyResponse:e.isEmptyResponse,partsCount:e.partsCount}),e.parts.length>0&&console.log("Parts:",e.parts)):console.log("[OK] Last message looks good!"),o},getStreamingState(){const e=E.getState(),o=j.getState(),t=e.currentSessionId?o.streamingMessageIds.get(e.currentSessionId)??null:null;return console.log("[STREAM] Streaming State:",{streamingMessageId:t,streamingMessageIds:Array.from(o.streamingMessageIds.entries()),messageStreamStates:Array.from(o.messageStreamStates.entries())}),{streamingMessageId:t,streamingMessageIds:o.streamingMessageIds,streamStates:o.messageStreamStates}},findEmptyMessages(){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),[];const s=P().filter(n=>n.role==="assistant").filter(n=>{const c=T(n.id)||[],a=c.some(r=>r.type==="text"&&r.text&&r.text.trim().length>0),g=c.some(r=>r.type==="tool");return c.length===0||!a&&!g});return console.log(`[INSPECT] Found ${s.length} empty assistant messages`),s.forEach((n,c)=>{const a=T(n.id)||[];console.log(`[${c}] Empty message:`,{messageId:n.id,partsCount:a.length,provider:n.providerID,model:n.modelID,timestamp:n.time?.created})}),s},showRetryHelp(){console.log(`[DEBUG] How to handle empty Claude responses:
2
+ import{h as E,d1 as T,d2 as j,av as se,d3 as ne,cP as ie,d4 as re,aa as k,b as Z,d5 as ae,d6 as le,d7 as P,d8 as ce,d9 as de}from"./SessionSwitcherDropdown-DROjbyIu.js";import{ao as ue,m as B,r as G,q as ee,u as d,T as te,a0 as ge,a as U,ap as fe,K as oe,i as x,b as me,J as $,Q as pe,e as ye,aq as V,al as he,ar as Se,am as we}from"./index-BAqpUCjs.js";import{_ as be}from"./vendor-vite-runtime-DD1OZmLC.js";import{R as A}from"./vendor-react-DYyjh7Q0.js";const Me=[];function K(){return[...Me].reverse()}const De={getLastAssistantMessage(){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),null;const t=P();if(!t||t.length===0)return console.log("[ERROR] No messages in current session"),null;for(let s=t.length-1;s>=0;s--){const n=t[s];if(n.role==="assistant"){const a=(T(n.id)||[]).map(u=>{const m={id:u.id,type:u.type};return u.type==="text"?(m.text=u.text,m.textLength=u.text?.length||0):u.type==="tool"?(m.tool=u.tool,m.state=u.state?.status):(u.type==="step-start"||u.type==="step-finish")&&(m.isStepMarker=!0),m}),g=a.some(u=>u.type==="text"&&u.text&&u.text.trim().length>0),r=a.some(u=>u.type==="tool"),l=a.some(u=>u.type==="step-start"||u.type==="step-finish"),h=a.length===0,p=!g&&!r&&(!h||l),f={messageId:n.id,role:n.role,timestamp:n.time?.created||0,partsCount:a.length,parts:a,isEmpty:h,isEmptyResponse:p,raw:n};return console.log("[INSPECT] Last Assistant Message:",f),console.log("[SUMMARY] Summary:",{messageId:f.messageId,partsCount:f.partsCount,isEmpty:f.isEmpty,isEmptyResponse:f.isEmptyResponse,hasText:g,hasTools:r,hasStepMarkers:l,onlyStepMarkers:l&&!g&&!r}),f.isEmpty&&console.warn("[WARNING] Message has NO parts!"),f.isEmptyResponse&&(console.warn("[WARNING] Message has parts but NO meaningful content (empty text, no tools)!"),l&&!g&&!r&&(console.warn("[CRITICAL] CLAUDE EMPTY RESPONSE BUG: Only step-start/step-finish markers, no actual content!"),console.log("This is a known issue with Claude models (anthropic provider)"),console.log("Recommendation: Send a follow-up message or try a different model"))),f}}return console.log("[ERROR] No assistant messages found in current session"),null},truncateString(e,o=80){return!e||typeof e!="string"||e.length<=o?e:e.substring(0,o)+"…"},truncateMessages(e){return e.map(o=>({...o,parts:(T(o.id)||[]).map(t=>{const s={...t};return"text"in t&&(s.text=this.truncateString(t.text)),"textPreview"in t&&(s.textPreview=this.truncateString(t.textPreview)),t.state&&(s.state={...t.state},"output"in t.state&&(s.state.output=this.truncateString(t.state.output)),"error"in t.state&&(s.state.error=this.truncateString(t.state.error)),t.state.metadata&&"preview"in t.state.metadata&&(s.state.metadata={...t.state.metadata,preview:this.truncateString(t.state.metadata.preview)})),s})}))},getAllMessages(e=!1){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),[];const s=P();return console.log(`[MESSAGES] Total messages in session: ${s.length}`),s.forEach((n,c)=>{const a=T(n.id)||[];console.log(`[${c}] ${n.role} - ${n.id} - ${a.length} parts`)}),e?this.truncateMessages(s):s},async getAppStatus(){const e=B.getState(),o=E.getState(),t=Z.getState(),s=e.currentDirectory||null,n=k.getDirectory()??null,c=ae(),a=new Set,g={};c.forEach(i=>{const y=i.directory;typeof y=="string"&&y.trim().length>0?(a.add(y),g[y]=(g[y]??0)+1):g["(none)"]=(g["(none)"]??0)+1});const r=(()=>{if(typeof window>"u")return{available:!1};try{return{available:!0,lastDirectory:window.localStorage.getItem("lastDirectory"),homeDirectory:window.localStorage.getItem("homeDirectory")}}catch(i){return{available:!1,error:i instanceof Error?i.message:String(i)}}})(),l=ee(),h=typeof window<"u"&&!!window.__PICHAMBER_ELECTRON__,p=async i=>{try{return await i.json()}catch{return null}},f=async i=>{try{return await i.text()}catch{return null}},u=async i=>{try{const y=await G(i);return y.ok?await p(y):{status:y.status}}catch(y){return{error:y instanceof Error?y.message:String(y)}}};let m=null,D=null,I=null,w=null;try{const i=await k.getSdkClient().path.get(s?{directory:s}:void 0);m=i.error?{error:i.error}:i.data}catch(i){m={error:i instanceof Error?i.message:String(i)}}try{const i=await k.getSdkClient().project.current(s?{directory:s}:void 0);D=i.error?{error:i.error}:i.data}catch(i){D={error:i instanceof Error?i.message:String(i)}}I=await u("/api/pi/ui-settings");try{const i=await G("/api/health"),y=i.headers.get("content-type")||"",L=await f(i),O=y.toLowerCase().includes("application/json");let M=null;if(O&&L)try{const R=JSON.parse(L);R&&typeof R=="object"&&!Array.isArray(R)&&(M=R)}catch{M=null}w={status:i.status,ok:i.ok,contentType:y,type:O?"json":"html",openCodePort:M?.openCodePort??null,openCodeRunning:M?.openCodeRunning??null,openCodeSecureConnection:M?.openCodeSecureConnection??null,openCodeAuthSource:M?.openCodeAuthSource??null,isOpenCodeReady:M?.isOpenCodeReady??null,lastOpenCodeError:M?.lastOpenCodeError??null,preview:L?L.slice(0,120):null}}catch(i){w={error:i instanceof Error?i.message:String(i)}}let b={isGitRepo:null};if(s)try{b.isGitRepo=await le(s)}catch(i){b={isGitRepo:null,error:i instanceof Error?i.message:String(i)}}const C=t.projects.map(i=>({id:i.id,path:i.path,label:i.label})),v={runtime:{platform:l?.runtime?.platform??null,isDesktop:h,hasRuntimeApis:!!l,desktopServerOrigin:null},location:typeof window<"u"?{href:window.location?.href??null,origin:window.location?.origin??null}:null,directories:{currentDirectory:s,opencodeDirectory:m?.directory||m?.worktree||n,homeDirectory:e.homeDirectory||null,isHomeReady:e.isHomeReady,hasPersistedDirectory:e.hasPersistedDirectory,isSwitchingDirectory:e.isSwitchingDirectory},projects:{total:t.projects.length,activeProjectId:t.activeProjectId,samples:C},sessions:{total:c.length,currentSessionId:o.currentSessionId,lastLoadedDirectory:o.lastLoadedDirectory,uniqueDirectories:a.size,directorySamples:Array.from(a).slice(0,5),directoryCounts:g},git:b,localStorage:r,opencode:{pathInfo:m,projectInfo:D,health:w},pichamber:{settingsInfo:I},recentSendFailures:K(),currentSessionDirectoryResolution:o.currentSessionId?this.diagnoseSessionDirectory(o.currentSessionId):null};return console.log("[DEBUG] App status snapshot:",v),v},getRecentSendFailures(){const e=K();return e.length===0?console.log("[OK] No prompt sends were rejected in this session."):(console.warn(`[ALERT] ${e.length} rejected prompt send(s):`),console.table(e)),e},diagnoseSessionDirectory(e){const o=E.getState(),t=e??o.currentSessionId;if(!t)return console.log("[ERROR] No session selected and no session id passed"),null;const s=ne(t),n=ie().find(p=>p.id===t),c=n?.directory??null,a=t===o.currentSessionId?o.currentSessionDirectory:null,r=re({session:n??null,currentDirectory:a}),l=o.getDirectoryForSession(t),h={sessionId:t,isCurrentSession:t===o.currentSessionId,routedDirectory:l,resolvedFrom:r.source,conflict:r.conflict,sources:ce(),details:{owningChildStore:s,sessionRecordDirectory:c,sessionIndexed:!!n,currentSessionDirectory:o.currentSessionDirectory,rememberedForRuntime:remembered.runtime,persistedAcrossRestarts:remembered.persisted,activeDirectory:B.getState().currentDirectory??null,opencodeClientDirectory:k.getDirectory()??null}};return console.log("[DEBUG] Session directory resolution:",h),r.conflict?console.warn(`[ALERT] Directory sources disagree: using "${r.directory}" (${r.source}) while "${r.conflict.directory}" came from ${r.conflict.source}.`):l?console.log("[OK] All known sources agree on the session directory."):console.warn("[ALERT] No directory resolved for this session — sends fall back to the active directory."),h},async buildDiagnosticsReport(){const e=await this.getAppStatus();return JSON.stringify(e,null,2)},async copyTextToClipboard(e){return se(e)},async copyDiagnosticsReport(){const e=await this.buildDiagnosticsReport();return{...await this.copyTextToClipboard(e),report:e}},checkLastMessage(){const e=this.getLastAssistantMessage();if(!e)return!1;const o=e.isEmpty||e.isEmptyResponse;return o?(console.error("[ALERT] PROBLEMATIC MESSAGE DETECTED!"),console.log("Details:",{messageId:e.messageId,isEmpty:e.isEmpty,isEmptyResponse:e.isEmptyResponse,partsCount:e.partsCount}),e.parts.length>0&&console.log("Parts:",e.parts)):console.log("[OK] Last message looks good!"),o},getStreamingState(){const e=E.getState(),o=j.getState(),t=e.currentSessionId?o.streamingMessageIds.get(e.currentSessionId)??null:null;return console.log("[STREAM] Streaming State:",{streamingMessageId:t,streamingMessageIds:Array.from(o.streamingMessageIds.entries()),messageStreamStates:Array.from(o.messageStreamStates.entries())}),{streamingMessageId:t,streamingMessageIds:o.streamingMessageIds,streamStates:o.messageStreamStates}},findEmptyMessages(){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),[];const s=P().filter(n=>n.role==="assistant").filter(n=>{const c=T(n.id)||[],a=c.some(r=>r.type==="text"&&r.text&&r.text.trim().length>0),g=c.some(r=>r.type==="tool");return c.length===0||!a&&!g});return console.log(`[INSPECT] Found ${s.length} empty assistant messages`),s.forEach((n,c)=>{const a=T(n.id)||[];console.log(`[${c}] Empty message:`,{messageId:n.id,partsCount:a.length,provider:n.providerID,model:n.modelID,timestamp:n.time?.created})}),s},showRetryHelp(){console.log(`[DEBUG] How to handle empty Claude responses:
3
3
  `),console.log("1. Check the last message:"),console.log(` __opencodeDebug.getLastAssistantMessage()
4
4
  `),console.log("2. Find all empty messages in session:"),console.log(` __opencodeDebug.findEmptyMessages()
5
5
  `),console.log("3. To retry, you can:"),console.log(" - Edit your last user message and resend"),console.log(' - Send a follow-up message like "Please provide the response"'),console.log(` - Try a different model (OpenAI models tend to be more reliable)
6
- `),console.log("[TIP] Empty responses are usually due to:"),console.log(" - Model rate limits"),console.log(" - Context length issues"),console.log(" - Model refusing to respond to certain prompts"),console.log(" - API errors from provider")},analyzeMessageCompletionConsistency(e={}){const{includeNonAssistant:o=!1,verbose:t=!0,maxTableRows:s=25}=e;if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),{summary:null,rows:[]};const a=P(),g=o?a:a.filter(f=>f.role==="assistant"),r={totalMessages:a.length,analyzedMessages:g.length,completedMissing:0,completedBeforeTool:0,completedBeforeReasoning:0,runningToolsWhenCompleted:0,reasoningOpenWhenCompleted:0,withTools:0,withReasoning:0},l=f=>typeof f=="number"&&Number.isFinite(f)?f:null,h=f=>{const u=f.filter(m=>typeof m=="number");return u.length>0?Math.max(...u):null},p=g.map((f,u)=>{const m=f,D=T(f.id)||[],I=m.time??{},w=l(I.completed),b=w!==null,C=D.filter(S=>S.type==="tool"),v=D.filter(S=>S.type==="reasoning"),i=h(C.map(S=>l(S.state?.time?.end??S.state?.time?.start))),y=h(v.map(S=>l(S.time?.end??S.time?.start))),L=h([i,y].filter(S=>S!==null)),O=C.some(S=>["pending","running","started"].includes(S.state?.status)),M=v.some(S=>typeof S.time?.end!="number");C.length>0&&(r.withTools+=1),v.length>0&&(r.withReasoning+=1),b||(r.completedMissing+=1);const R=!!(b&&typeof i=="number"&&w<i);R&&(r.completedBeforeTool+=1);const z=!!(b&&typeof y=="number"&&w<y);return z&&(r.completedBeforeReasoning+=1),b&&O&&(r.runningToolsWhenCompleted+=1),b&&M&&(r.reasoningOpenWhenCompleted+=1),{index:u,messageId:m.id,role:m.role,completedAt:w,latestToolTimestamp:i,latestReasoningTimestamp:y,latestPartTimestamp:L,completed_missing:!b,completed_before_tool:R,completed_before_reasoning:z,running_tools_when_completed:!!(b&&O),reasoning_open_when_completed:!!(b&&M),has_tools:C.length>0,has_reasoning:v.length>0}});return t&&(console.table(p.slice(0,s)),p.length>s&&console.log(`Displayed first ${s} rows out of ${p.length}.`),console.log("[SUMMARY] Message completion timing:",r)),{summary:r,rows:p}},checkCompletionStatus(){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),null;const s=P().filter(w=>w.role==="assistant");if(s.length===0)return console.log("[ERROR] No assistant messages"),null;const n=s[s.length-1],a=(T(n.id)||[]).filter(w=>w.type==="step-finish"),g=n.finish==="stop",l=n.time?.completed,h=n.status,p=typeof l=="number"&&l>0||h==="completed",f=!!(p&&g),u=j.getState(),m=n.sessionID?u.streamingMessageIds.get(n.sessionID)??null:null,D=u.messageStreamStates.get(n.id),I=n.id===m;return console.log("[SUMMARY] Completion Status:"),console.log("Message ID:",n.id),console.log("time.completed:",l,"(type:",typeof l,")"),console.log("status:",h),console.log("hasCompletedFlag:",p),console.log("hasStopReason:",g),console.log("messageIsComplete:",f),console.log("lifecycle phase:",D?.phase),console.log("isStreamingCandidate:",I),console.log("streamingMessageId:",m),console.log("Step-finish parts:",a),{messageId:n.id,completed:l,status:h,hasCompletedFlag:p,hasStopReason:g,messageIsComplete:f,stepFinishParts:a,raw:n}}};typeof window<"u"&&(window.__opencodeDebug=De,ue()&&(console.log("[DEBUG] OpenCode Debug Utils loaded! Use window.__opencodeDebug in console"),console.log("Available commands:"),console.log(" __opencodeDebug.getLastAssistantMessage() - Get last assistant message details"),console.log(" __opencodeDebug.getAllMessages(truncate?) - List all messages (truncate=true for short preview)"),console.log(" __opencodeDebug.truncateMessages(messages) - Truncate long fields in messages array"),console.log(" __opencodeDebug.getAppStatus() - Show app status snapshot"),console.log(" __opencodeDebug.diagnoseSessionDirectory(sessionId?) - Show how the session directory is resolved"),console.log(" __opencodeDebug.getRecentSendFailures() - List prompt sends that were rejected and rolled back"),console.log(" __opencodeDebug.checkLastMessage() - Check if last message is problematic"),console.log(" __opencodeDebug.findEmptyMessages() - Find all empty assistant messages"),console.log(" __opencodeDebug.showRetryHelp() - Show instructions for handling empty responses"),console.log(" __opencodeDebug.getStreamingState() - Get streaming state info"),console.log(" __opencodeDebug.analyzeMessageCompletionConsistency(opts?) - Compare time.completed vs part timings"),console.log(" __opencodeDebug.checkCompletionStatus() - Check completion status of last message")),window.addEventListener("error",e=>{try{const o=e.message||"",t=e.filename||"";typeof o=="string"&&o.includes("this._renderer.value.dimensions")&&/xterm/i.test(String(t))&&e.preventDefault()}catch{}}));let K=!1;const ke=()=>{if(K||typeof window>"u")return;K=!0;let e={showReasoningTraces:d.getState().showReasoningTraces,collapsibleThinkingBlocks:d.getState().collapsibleThinkingBlocks,collapseThinkingByDefault:d.getState().collapseThinkingByDefault,showDeletionDialog:d.getState().showDeletionDialog,nativeNotificationsEnabled:d.getState().nativeNotificationsEnabled,notificationMode:d.getState().notificationMode,notifyOnSubtasks:d.getState().notifyOnSubtasks,notifyOnCompletion:d.getState().notifyOnCompletion,notifyOnError:d.getState().notifyOnError,notifyOnQuestion:d.getState().notifyOnQuestion,notificationTemplates:d.getState().notificationTemplates,summarizeLastMessage:d.getState().summarizeLastMessage,summaryThreshold:d.getState().summaryThreshold,summaryLength:d.getState().summaryLength,maxLastMessageLength:d.getState().maxLastMessageLength,autoDeleteEnabled:d.getState().autoDeleteEnabled,autoSaveEnabled:d.getState().autoSaveEnabled,autoDeleteAfterDays:d.getState().autoDeleteAfterDays,sessionRetentionAction:d.getState().sessionRetentionAction,fontSize:d.getState().fontSize,terminalFontSize:d.getState().terminalFontSize,terminalShell:d.getState().terminalShell,terminalLoginShells:d.getState().terminalLoginShells,editorFontSize:d.getState().editorFontSize,uiFont:d.getState().uiFont,monoFont:d.getState().monoFont,padding:d.getState().padding,cornerRadius:d.getState().cornerRadius,inputBarOffset:d.getState().inputBarOffset,mobileKeyboardMode:d.getState().mobileKeyboardMode,diffLayoutPreference:d.getState().diffLayoutPreference,gitChangesViewMode:d.getState().gitChangesViewMode};d.subscribe(o=>{const t={showReasoningTraces:o.showReasoningTraces,collapsibleThinkingBlocks:o.collapsibleThinkingBlocks,collapseThinkingByDefault:o.collapseThinkingByDefault,showDeletionDialog:o.showDeletionDialog,nativeNotificationsEnabled:o.nativeNotificationsEnabled,notificationMode:o.notificationMode,notifyOnSubtasks:o.notifyOnSubtasks,notifyOnCompletion:o.notifyOnCompletion,notifyOnError:o.notifyOnError,notifyOnQuestion:o.notifyOnQuestion,notificationTemplates:o.notificationTemplates,summarizeLastMessage:o.summarizeLastMessage,summaryThreshold:o.summaryThreshold,summaryLength:o.summaryLength,maxLastMessageLength:o.maxLastMessageLength,autoDeleteEnabled:o.autoDeleteEnabled,autoSaveEnabled:o.autoSaveEnabled,autoDeleteAfterDays:o.autoDeleteAfterDays,sessionRetentionAction:o.sessionRetentionAction,fontSize:o.fontSize,terminalFontSize:o.terminalFontSize,terminalShell:o.terminalShell,terminalLoginShells:o.terminalLoginShells,editorFontSize:o.editorFontSize,uiFont:o.uiFont,monoFont:o.monoFont,padding:o.padding,cornerRadius:o.cornerRadius,inputBarOffset:o.inputBarOffset,mobileKeyboardMode:o.mobileKeyboardMode,diffLayoutPreference:o.diffLayoutPreference,gitChangesViewMode:o.gitChangesViewMode},s={};t.showReasoningTraces!==e.showReasoningTraces&&(s.showReasoningTraces=t.showReasoningTraces),t.collapsibleThinkingBlocks!==e.collapsibleThinkingBlocks&&(s.collapsibleThinkingBlocks=t.collapsibleThinkingBlocks),t.collapseThinkingByDefault!==e.collapseThinkingByDefault&&(s.collapseThinkingByDefault=t.collapseThinkingByDefault),t.showDeletionDialog!==e.showDeletionDialog&&(s.showDeletionDialog=t.showDeletionDialog),t.nativeNotificationsEnabled!==e.nativeNotificationsEnabled&&(s.nativeNotificationsEnabled=t.nativeNotificationsEnabled),t.notificationMode!==e.notificationMode&&(s.notificationMode=t.notificationMode),t.notifyOnSubtasks!==e.notifyOnSubtasks&&(s.notifyOnSubtasks=t.notifyOnSubtasks),t.notifyOnCompletion!==e.notifyOnCompletion&&(s.notifyOnCompletion=t.notifyOnCompletion),t.notifyOnError!==e.notifyOnError&&(s.notifyOnError=t.notifyOnError),t.notifyOnQuestion!==e.notifyOnQuestion&&(s.notifyOnQuestion=t.notifyOnQuestion),JSON.stringify(t.notificationTemplates)!==JSON.stringify(e.notificationTemplates)&&(s.notificationTemplates=t.notificationTemplates),t.summarizeLastMessage!==e.summarizeLastMessage&&(s.summarizeLastMessage=t.summarizeLastMessage),t.summaryThreshold!==e.summaryThreshold&&(s.summaryThreshold=t.summaryThreshold),t.summaryLength!==e.summaryLength&&(s.summaryLength=t.summaryLength),t.maxLastMessageLength!==e.maxLastMessageLength&&(s.maxLastMessageLength=t.maxLastMessageLength),t.autoDeleteEnabled!==e.autoDeleteEnabled&&(s.autoDeleteEnabled=t.autoDeleteEnabled),t.autoSaveEnabled!==e.autoSaveEnabled&&(s.autoSaveEnabled=t.autoSaveEnabled),t.autoDeleteAfterDays!==e.autoDeleteAfterDays&&(s.autoDeleteAfterDays=t.autoDeleteAfterDays),t.sessionRetentionAction!==e.sessionRetentionAction&&(s.sessionRetentionAction=t.sessionRetentionAction),t.fontSize!==e.fontSize&&(s.fontSize=t.fontSize),t.terminalFontSize!==e.terminalFontSize&&(s.terminalFontSize=t.terminalFontSize),t.terminalShell!==e.terminalShell&&(s.terminalShell=t.terminalShell),t.terminalLoginShells!==e.terminalLoginShells&&(s.terminalLoginShells=t.terminalLoginShells),t.editorFontSize!==e.editorFontSize&&(s.editorFontSize=t.editorFontSize),t.uiFont!==e.uiFont&&(s.uiFont=t.uiFont),t.monoFont!==e.monoFont&&(s.monoFont=t.monoFont),t.padding!==e.padding&&(s.padding=t.padding),t.cornerRadius!==e.cornerRadius&&(s.cornerRadius=t.cornerRadius),t.inputBarOffset!==e.inputBarOffset&&(s.inputBarOffset=t.inputBarOffset),t.mobileKeyboardMode!==e.mobileKeyboardMode&&(s.mobileKeyboardMode=t.mobileKeyboardMode),t.diffLayoutPreference!==e.diffLayoutPreference&&(s.diffLayoutPreference=t.diffLayoutPreference),t.gitChangesViewMode!==e.gitChangesViewMode&&(s.gitChangesViewMode=t.gitChangesViewMode),e=t,Object.keys(s).length>0&&te(s)})},Fe=async()=>{if(typeof window>"u")return;let e=null;try{e=window.localStorage.getItem("lastDirectory")}catch(o){console.warn("Failed to read saved directory preferences:",o)}e&&B.getState().setDirectory(e,{showOverlay:!1})},F=(e,o)=>{if(e===o)return!0;if(e.length!==o.length)return!1;for(let t=0;t<e.length;t+=1)if(e[t]?.providerID!==o[t]?.providerID||e[t]?.modelID!==o[t]?.modelID)return!1;return!0},N=(e,o)=>{if(e===o)return!0;if(e.length!==o.length)return!1;for(let t=0;t<e.length;t+=1)if(e[t]!==o[t])return!1;return!0},Ee=(e,o)=>{if(e===o)return!0;const t=Object.keys(e);return t.length!==Object.keys(o).length?!1:t.every(s=>Array.isArray(o[s])&&N(e[s],o[s]))},ve=()=>{const e=d.getState();return{favoriteModels:e.favoriteModels,hiddenModels:e.hiddenModels,collapsedModelProviders:e.collapsedModelProviders,recentModels:e.recentModels,recentAgents:e.recentAgents,recentEfforts:e.recentEfforts}},W=(e,o)=>F(e.favoriteModels,o.favoriteModels)&&F(e.hiddenModels,o.hiddenModels)&&N(e.collapsedModelProviders,o.collapsedModelProviders)&&F(e.recentModels,o.recentModels)&&N(e.recentAgents,o.recentAgents)&&Ee(e.recentEfforts,o.recentEfforts),Re=e=>({favoriteModels:e.favoriteModels.slice(),hiddenModels:e.hiddenModels.slice(),collapsedModelProviders:e.collapsedModelProviders.slice(),recentModels:e.recentModels.slice(),recentAgents:e.recentAgents.slice(),recentEfforts:Object.fromEntries(Object.entries(e.recentEfforts).map(([o,t])=>[o,t.slice()]))}),Be=()=>{if(typeof window>"u")return()=>{};let e=null,o=null,t=!1,s=null;const n=()=>{e=null;const r=s;if(s=null,!r||r!==G())return;const l=ve();o&&W(o,l)||(o=Re(l),te(l).catch(()=>{}))},c=()=>{if(!t){t=!0;return}e!==null&&window.clearTimeout(e),s=G(),e=window.setTimeout(n,1200)},a=ge(()=>{e!==null&&window.clearTimeout(e),e=null,s=null,o=null}),g=d.subscribe((r,l)=>{const h={favoriteModels:r.favoriteModels,hiddenModels:r.hiddenModels,collapsedModelProviders:r.collapsedModelProviders,recentModels:r.recentModels,recentAgents:r.recentAgents,recentEfforts:r.recentEfforts},p={favoriteModels:l.favoriteModels,hiddenModels:l.hiddenModels,collapsedModelProviders:l.collapsedModelProviders,recentModels:l.recentModels,recentAgents:l.recentAgents,recentEfforts:l.recentEfforts};W(h,p)||c()});return()=>{g(),a(),e!==null&&window.clearTimeout(e)}};let Y=!1;const Q="pichamber-typography-base",Te=()=>{if(typeof document>"u")return;const o=`:root {
6
+ `),console.log("[TIP] Empty responses are usually due to:"),console.log(" - Model rate limits"),console.log(" - Context length issues"),console.log(" - Model refusing to respond to certain prompts"),console.log(" - API errors from provider")},analyzeMessageCompletionConsistency(e={}){const{includeNonAssistant:o=!1,verbose:t=!0,maxTableRows:s=25}=e;if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),{summary:null,rows:[]};const a=P(),g=o?a:a.filter(f=>f.role==="assistant"),r={totalMessages:a.length,analyzedMessages:g.length,completedMissing:0,completedBeforeTool:0,completedBeforeReasoning:0,runningToolsWhenCompleted:0,reasoningOpenWhenCompleted:0,withTools:0,withReasoning:0},l=f=>typeof f=="number"&&Number.isFinite(f)?f:null,h=f=>{const u=f.filter(m=>typeof m=="number");return u.length>0?Math.max(...u):null},p=g.map((f,u)=>{const m=f,D=T(f.id)||[],I=m.time??{},w=l(I.completed),b=w!==null,C=D.filter(S=>S.type==="tool"),v=D.filter(S=>S.type==="reasoning"),i=h(C.map(S=>l(S.state?.time?.end??S.state?.time?.start))),y=h(v.map(S=>l(S.time?.end??S.time?.start))),L=h([i,y].filter(S=>S!==null)),O=C.some(S=>["pending","running","started"].includes(S.state?.status)),M=v.some(S=>typeof S.time?.end!="number");C.length>0&&(r.withTools+=1),v.length>0&&(r.withReasoning+=1),b||(r.completedMissing+=1);const R=!!(b&&typeof i=="number"&&w<i);R&&(r.completedBeforeTool+=1);const z=!!(b&&typeof y=="number"&&w<y);return z&&(r.completedBeforeReasoning+=1),b&&O&&(r.runningToolsWhenCompleted+=1),b&&M&&(r.reasoningOpenWhenCompleted+=1),{index:u,messageId:m.id,role:m.role,completedAt:w,latestToolTimestamp:i,latestReasoningTimestamp:y,latestPartTimestamp:L,completed_missing:!b,completed_before_tool:R,completed_before_reasoning:z,running_tools_when_completed:!!(b&&O),reasoning_open_when_completed:!!(b&&M),has_tools:C.length>0,has_reasoning:v.length>0}});return t&&(console.table(p.slice(0,s)),p.length>s&&console.log(`Displayed first ${s} rows out of ${p.length}.`),console.log("[SUMMARY] Message completion timing:",r)),{summary:r,rows:p}},checkCompletionStatus(){if(!E.getState().currentSessionId)return console.log("[ERROR] No active session"),null;const s=P().filter(w=>w.role==="assistant");if(s.length===0)return console.log("[ERROR] No assistant messages"),null;const n=s[s.length-1],a=(T(n.id)||[]).filter(w=>w.type==="step-finish"),g=n.finish==="stop",l=n.time?.completed,h=n.status,p=typeof l=="number"&&l>0||h==="completed",f=!!(p&&g),u=j.getState(),m=n.sessionID?u.streamingMessageIds.get(n.sessionID)??null:null,D=u.messageStreamStates.get(n.id),I=n.id===m;return console.log("[SUMMARY] Completion Status:"),console.log("Message ID:",n.id),console.log("time.completed:",l,"(type:",typeof l,")"),console.log("status:",h),console.log("hasCompletedFlag:",p),console.log("hasStopReason:",g),console.log("messageIsComplete:",f),console.log("lifecycle phase:",D?.phase),console.log("isStreamingCandidate:",I),console.log("streamingMessageId:",m),console.log("Step-finish parts:",a),{messageId:n.id,completed:l,status:h,hasCompletedFlag:p,hasStopReason:g,messageIsComplete:f,stepFinishParts:a,raw:n}}};typeof window<"u"&&(window.__opencodeDebug=De,ue()&&(console.log("[DEBUG] OpenCode Debug Utils loaded! Use window.__opencodeDebug in console"),console.log("Available commands:"),console.log(" __opencodeDebug.getLastAssistantMessage() - Get last assistant message details"),console.log(" __opencodeDebug.getAllMessages(truncate?) - List all messages (truncate=true for short preview)"),console.log(" __opencodeDebug.truncateMessages(messages) - Truncate long fields in messages array"),console.log(" __opencodeDebug.getAppStatus() - Show app status snapshot"),console.log(" __opencodeDebug.diagnoseSessionDirectory(sessionId?) - Show how the session directory is resolved"),console.log(" __opencodeDebug.getRecentSendFailures() - List prompt sends that were rejected and rolled back"),console.log(" __opencodeDebug.checkLastMessage() - Check if last message is problematic"),console.log(" __opencodeDebug.findEmptyMessages() - Find all empty assistant messages"),console.log(" __opencodeDebug.showRetryHelp() - Show instructions for handling empty responses"),console.log(" __opencodeDebug.getStreamingState() - Get streaming state info"),console.log(" __opencodeDebug.analyzeMessageCompletionConsistency(opts?) - Compare time.completed vs part timings"),console.log(" __opencodeDebug.checkCompletionStatus() - Check completion status of last message")),window.addEventListener("error",e=>{try{const o=e.message||"",t=e.filename||"";typeof o=="string"&&o.includes("this._renderer.value.dimensions")&&/xterm/i.test(String(t))&&e.preventDefault()}catch{}}));let H=!1;const ke=()=>{if(H||typeof window>"u")return;H=!0;let e={showReasoningTraces:d.getState().showReasoningTraces,collapsibleThinkingBlocks:d.getState().collapsibleThinkingBlocks,collapseThinkingByDefault:d.getState().collapseThinkingByDefault,showDeletionDialog:d.getState().showDeletionDialog,nativeNotificationsEnabled:d.getState().nativeNotificationsEnabled,notificationMode:d.getState().notificationMode,notifyOnSubtasks:d.getState().notifyOnSubtasks,notifyOnCompletion:d.getState().notifyOnCompletion,notifyOnError:d.getState().notifyOnError,notifyOnQuestion:d.getState().notifyOnQuestion,notificationTemplates:d.getState().notificationTemplates,summarizeLastMessage:d.getState().summarizeLastMessage,summaryThreshold:d.getState().summaryThreshold,summaryLength:d.getState().summaryLength,maxLastMessageLength:d.getState().maxLastMessageLength,autoDeleteEnabled:d.getState().autoDeleteEnabled,autoSaveEnabled:d.getState().autoSaveEnabled,autoDeleteAfterDays:d.getState().autoDeleteAfterDays,sessionRetentionAction:d.getState().sessionRetentionAction,fontSize:d.getState().fontSize,terminalFontSize:d.getState().terminalFontSize,terminalShell:d.getState().terminalShell,terminalLoginShells:d.getState().terminalLoginShells,editorFontSize:d.getState().editorFontSize,uiFont:d.getState().uiFont,monoFont:d.getState().monoFont,padding:d.getState().padding,cornerRadius:d.getState().cornerRadius,inputBarOffset:d.getState().inputBarOffset,mobileKeyboardMode:d.getState().mobileKeyboardMode,diffLayoutPreference:d.getState().diffLayoutPreference,gitChangesViewMode:d.getState().gitChangesViewMode};d.subscribe(o=>{const t={showReasoningTraces:o.showReasoningTraces,collapsibleThinkingBlocks:o.collapsibleThinkingBlocks,collapseThinkingByDefault:o.collapseThinkingByDefault,showDeletionDialog:o.showDeletionDialog,nativeNotificationsEnabled:o.nativeNotificationsEnabled,notificationMode:o.notificationMode,notifyOnSubtasks:o.notifyOnSubtasks,notifyOnCompletion:o.notifyOnCompletion,notifyOnError:o.notifyOnError,notifyOnQuestion:o.notifyOnQuestion,notificationTemplates:o.notificationTemplates,summarizeLastMessage:o.summarizeLastMessage,summaryThreshold:o.summaryThreshold,summaryLength:o.summaryLength,maxLastMessageLength:o.maxLastMessageLength,autoDeleteEnabled:o.autoDeleteEnabled,autoSaveEnabled:o.autoSaveEnabled,autoDeleteAfterDays:o.autoDeleteAfterDays,sessionRetentionAction:o.sessionRetentionAction,fontSize:o.fontSize,terminalFontSize:o.terminalFontSize,terminalShell:o.terminalShell,terminalLoginShells:o.terminalLoginShells,editorFontSize:o.editorFontSize,uiFont:o.uiFont,monoFont:o.monoFont,padding:o.padding,cornerRadius:o.cornerRadius,inputBarOffset:o.inputBarOffset,mobileKeyboardMode:o.mobileKeyboardMode,diffLayoutPreference:o.diffLayoutPreference,gitChangesViewMode:o.gitChangesViewMode},s={};t.showReasoningTraces!==e.showReasoningTraces&&(s.showReasoningTraces=t.showReasoningTraces),t.collapsibleThinkingBlocks!==e.collapsibleThinkingBlocks&&(s.collapsibleThinkingBlocks=t.collapsibleThinkingBlocks),t.collapseThinkingByDefault!==e.collapseThinkingByDefault&&(s.collapseThinkingByDefault=t.collapseThinkingByDefault),t.showDeletionDialog!==e.showDeletionDialog&&(s.showDeletionDialog=t.showDeletionDialog),t.nativeNotificationsEnabled!==e.nativeNotificationsEnabled&&(s.nativeNotificationsEnabled=t.nativeNotificationsEnabled),t.notificationMode!==e.notificationMode&&(s.notificationMode=t.notificationMode),t.notifyOnSubtasks!==e.notifyOnSubtasks&&(s.notifyOnSubtasks=t.notifyOnSubtasks),t.notifyOnCompletion!==e.notifyOnCompletion&&(s.notifyOnCompletion=t.notifyOnCompletion),t.notifyOnError!==e.notifyOnError&&(s.notifyOnError=t.notifyOnError),t.notifyOnQuestion!==e.notifyOnQuestion&&(s.notifyOnQuestion=t.notifyOnQuestion),JSON.stringify(t.notificationTemplates)!==JSON.stringify(e.notificationTemplates)&&(s.notificationTemplates=t.notificationTemplates),t.summarizeLastMessage!==e.summarizeLastMessage&&(s.summarizeLastMessage=t.summarizeLastMessage),t.summaryThreshold!==e.summaryThreshold&&(s.summaryThreshold=t.summaryThreshold),t.summaryLength!==e.summaryLength&&(s.summaryLength=t.summaryLength),t.maxLastMessageLength!==e.maxLastMessageLength&&(s.maxLastMessageLength=t.maxLastMessageLength),t.autoDeleteEnabled!==e.autoDeleteEnabled&&(s.autoDeleteEnabled=t.autoDeleteEnabled),t.autoSaveEnabled!==e.autoSaveEnabled&&(s.autoSaveEnabled=t.autoSaveEnabled),t.autoDeleteAfterDays!==e.autoDeleteAfterDays&&(s.autoDeleteAfterDays=t.autoDeleteAfterDays),t.sessionRetentionAction!==e.sessionRetentionAction&&(s.sessionRetentionAction=t.sessionRetentionAction),t.fontSize!==e.fontSize&&(s.fontSize=t.fontSize),t.terminalFontSize!==e.terminalFontSize&&(s.terminalFontSize=t.terminalFontSize),t.terminalShell!==e.terminalShell&&(s.terminalShell=t.terminalShell),t.terminalLoginShells!==e.terminalLoginShells&&(s.terminalLoginShells=t.terminalLoginShells),t.editorFontSize!==e.editorFontSize&&(s.editorFontSize=t.editorFontSize),t.uiFont!==e.uiFont&&(s.uiFont=t.uiFont),t.monoFont!==e.monoFont&&(s.monoFont=t.monoFont),t.padding!==e.padding&&(s.padding=t.padding),t.cornerRadius!==e.cornerRadius&&(s.cornerRadius=t.cornerRadius),t.inputBarOffset!==e.inputBarOffset&&(s.inputBarOffset=t.inputBarOffset),t.mobileKeyboardMode!==e.mobileKeyboardMode&&(s.mobileKeyboardMode=t.mobileKeyboardMode),t.diffLayoutPreference!==e.diffLayoutPreference&&(s.diffLayoutPreference=t.diffLayoutPreference),t.gitChangesViewMode!==e.gitChangesViewMode&&(s.gitChangesViewMode=t.gitChangesViewMode),e=t,Object.keys(s).length>0&&te(s)})},Fe=async()=>{if(typeof window>"u")return;let e=null;try{e=window.localStorage.getItem("lastDirectory")}catch(o){console.warn("Failed to read saved directory preferences:",o)}e&&B.getState().setDirectory(e,{showOverlay:!1})},F=(e,o)=>{if(e===o)return!0;if(e.length!==o.length)return!1;for(let t=0;t<e.length;t+=1)if(e[t]?.providerID!==o[t]?.providerID||e[t]?.modelID!==o[t]?.modelID)return!1;return!0},N=(e,o)=>{if(e===o)return!0;if(e.length!==o.length)return!1;for(let t=0;t<e.length;t+=1)if(e[t]!==o[t])return!1;return!0},Ee=(e,o)=>{if(e===o)return!0;const t=Object.keys(e);return t.length!==Object.keys(o).length?!1:t.every(s=>Array.isArray(o[s])&&N(e[s],o[s]))},ve=()=>{const e=d.getState();return{favoriteModels:e.favoriteModels,hiddenModels:e.hiddenModels,collapsedModelProviders:e.collapsedModelProviders,recentModels:e.recentModels,recentAgents:e.recentAgents,recentEfforts:e.recentEfforts}},W=(e,o)=>F(e.favoriteModels,o.favoriteModels)&&F(e.hiddenModels,o.hiddenModels)&&N(e.collapsedModelProviders,o.collapsedModelProviders)&&F(e.recentModels,o.recentModels)&&N(e.recentAgents,o.recentAgents)&&Ee(e.recentEfforts,o.recentEfforts),Re=e=>({favoriteModels:e.favoriteModels.slice(),hiddenModels:e.hiddenModels.slice(),collapsedModelProviders:e.collapsedModelProviders.slice(),recentModels:e.recentModels.slice(),recentAgents:e.recentAgents.slice(),recentEfforts:Object.fromEntries(Object.entries(e.recentEfforts).map(([o,t])=>[o,t.slice()]))}),Be=()=>{if(typeof window>"u")return()=>{};let e=null,o=null,t=!1,s=null;const n=()=>{e=null;const r=s;if(s=null,!r||r!==U())return;const l=ve();o&&W(o,l)||(o=Re(l),te(l).catch(()=>{}))},c=()=>{if(!t){t=!0;return}e!==null&&window.clearTimeout(e),s=U(),e=window.setTimeout(n,1200)},a=ge(()=>{e!==null&&window.clearTimeout(e),e=null,s=null,o=null}),g=d.subscribe((r,l)=>{const h={favoriteModels:r.favoriteModels,hiddenModels:r.hiddenModels,collapsedModelProviders:r.collapsedModelProviders,recentModels:r.recentModels,recentAgents:r.recentAgents,recentEfforts:r.recentEfforts},p={favoriteModels:l.favoriteModels,hiddenModels:l.hiddenModels,collapsedModelProviders:l.collapsedModelProviders,recentModels:l.recentModels,recentAgents:l.recentAgents,recentEfforts:l.recentEfforts};W(h,p)||c()});return()=>{g(),a(),e!==null&&window.clearTimeout(e)}};let Q=!1;const Y="pichamber-typography-base",Te=()=>{if(typeof document>"u")return;const o=`:root {
7
7
  ${Object.entries(fe).map(([n,c])=>` --text-${n.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${c};`).join(`
8
8
  `)}
9
9
  }
10
- `,t=document.getElementById(Q);if(t){t.textContent=o;return}const s=document.createElement("style");s.id=Q,s.textContent=o,document.head.appendChild(s)},xe=()=>{Y||typeof window>"u"||(Y=!0,Te())},q=2e4,J=()=>typeof document>"u"||document.visibilityState==="visible"&&document.hasFocus()?"visible":"hidden",_=e=>{if(!oe()&&!x())return;const o=ee();o?.push?.setVisibility&&o.push.setVisibility({visible:e,platform:me()})},Ne=e=>{const o=e?.enabled??!0;A.useEffect(()=>{if(!o||!oe()&&!x()||typeof window>"u")return;if(x()){let a=!0,g=!1,r=null;const l=()=>_(a);be(()=>import("./vendor-capacitor-app-BrDJj9I_.js"),__vite__mapDeps([0,1,2])).then(async({App:p})=>{if(g)return;const f=await p.getState().catch(()=>null);f&&(a=f.isActive===!0),l();const u=await p.addListener("appStateChange",({isActive:m})=>{a=m===!0,l()});if(g){u.remove();return}r=()=>{u.remove()}}).catch(()=>{});const h=window.setInterval(()=>{a&&_(!0)},q);return()=>{g=!0,window.clearInterval(h),r?.()}}if(typeof document>"u")return;const t=()=>{_(J()==="visible")},s=()=>{J()==="visible"&&_(!0)},n=()=>{_(!1)};t();const c=window.setInterval(s,q);return document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",n),window.addEventListener("pageshow",t),window.addEventListener("focus",t),window.addEventListener("blur",t),()=>{window.clearInterval(c),document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",n),window.removeEventListener("pageshow",t),window.removeEventListener("focus",t),window.removeEventListener("blur",t)}},[o])},Ie="PiChamber",X=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase()),Ce=e=>{const t=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return t[t.length-1]??""},Le=(e,o)=>[e,o,Ie].filter(s=>typeof s=="string"&&s.trim().length>0).join(" | "),ze=()=>{const e=Z(c=>c.activeProjectId?c.projects.find(a=>a.id===c.activeProjectId)??null:null),o=A.useMemo(()=>{if(!e)return null;const c=e.label?.trim();if(c)return X(c);const a=Ce(e.path);return a?X(a):null},[e]),[t,s]=A.useState(null);A.useEffect(()=>{if(typeof window>"u"||!$()){s(null);return}let c=!1;const a=async()=>{try{if(pe()){c||s(null);return}const r=window.__PICHAMBER_LOCAL_ORIGIN__||window.location.origin,l=ye();if(l&&V(l,r)){c||s(null);return}const p=(await he()).hosts.find(u=>l?V(l,Se(u)):!1),f=p?.label?.trim()?we(p.label.trim()):"Instance";c||s(f)}catch{c||s("Instance")}};a();const g=()=>{a()};return window.addEventListener("focus",g),()=>{c=!0,window.removeEventListener("focus",g)}},[]);const n=A.useMemo(()=>Le(o,t),[o,t]);A.useEffect(()=>{if(typeof document<"u"&&(document.title=n),!$())return;(async()=>{try{if(typeof navigator<"u"&&/Macintosh|Mac OS X/.test(navigator.userAgent||""))return;await de(n)}catch{return}})()},[n])};export{ze as a,Fe as b,Be as c,xe as d,ke as s,Ne as u};
10
+ `,t=document.getElementById(Y);if(t){t.textContent=o;return}const s=document.createElement("style");s.id=Y,s.textContent=o,document.head.appendChild(s)},xe=()=>{Q||typeof window>"u"||(Q=!0,Te())},J=2e4,q=()=>typeof document>"u"||document.visibilityState==="visible"&&document.hasFocus()?"visible":"hidden",_=e=>{if(!oe()&&!x())return;const o=ee();o?.push?.setVisibility&&o.push.setVisibility({visible:e,platform:me()})},Ne=e=>{const o=e?.enabled??!0;A.useEffect(()=>{if(!o||!oe()&&!x()||typeof window>"u")return;if(x()){let a=!0,g=!1,r=null;const l=()=>_(a);be(()=>import("./vendor-capacitor-app-BrDJj9I_.js"),__vite__mapDeps([0,1,2])).then(async({App:p})=>{if(g)return;const f=await p.getState().catch(()=>null);f&&(a=f.isActive===!0),l();const u=await p.addListener("appStateChange",({isActive:m})=>{a=m===!0,l()});if(g){u.remove();return}r=()=>{u.remove()}}).catch(()=>{});const h=window.setInterval(()=>{a&&_(!0)},J);return()=>{g=!0,window.clearInterval(h),r?.()}}if(typeof document>"u")return;const t=()=>{_(q()==="visible")},s=()=>{q()==="visible"&&_(!0)},n=()=>{_(!1)};t();const c=window.setInterval(s,J);return document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",n),window.addEventListener("pageshow",t),window.addEventListener("focus",t),window.addEventListener("blur",t),()=>{window.clearInterval(c),document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",n),window.removeEventListener("pageshow",t),window.removeEventListener("focus",t),window.removeEventListener("blur",t)}},[o])},Ie="PiChamber",X=e=>e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase()),Ce=e=>{const t=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return t[t.length-1]??""},Le=(e,o)=>[e,o,Ie].filter(s=>typeof s=="string"&&s.trim().length>0).join(" | "),ze=()=>{const e=Z(c=>c.activeProjectId?c.projects.find(a=>a.id===c.activeProjectId)??null:null),o=A.useMemo(()=>{if(!e)return null;const c=e.label?.trim();if(c)return X(c);const a=Ce(e.path);return a?X(a):null},[e]),[t,s]=A.useState(null);A.useEffect(()=>{if(typeof window>"u"||!$()){s(null);return}let c=!1;const a=async()=>{try{if(pe()){c||s(null);return}const r=window.__PICHAMBER_LOCAL_ORIGIN__||window.location.origin,l=ye();if(l&&V(l,r)){c||s(null);return}const p=(await he()).hosts.find(u=>l?V(l,Se(u)):!1),f=p?.label?.trim()?we(p.label.trim()):"Instance";c||s(f)}catch{c||s("Instance")}};a();const g=()=>{a()};return window.addEventListener("focus",g),()=>{c=!0,window.removeEventListener("focus",g)}},[]);const n=A.useMemo(()=>Le(o,t),[o,t]);A.useEffect(()=>{if(typeof document<"u"&&(document.title=n),!$())return;(async()=>{try{if(typeof navigator<"u"&&/Macintosh|Mac OS X/.test(navigator.userAgent||""))return;await de(n)}catch{return}})()},[n])};export{ze as a,Fe as b,Be as c,xe as d,ke as s,Ne as u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-B1BRhQSF.js","assets/vendor-codemirror-language-E2vgV9K3.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-CNWM3Q8V.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-DSzLbZiS.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-BS2SpSAZ.js","assets/vendor-codemirror-lang-cpp-BGCWj7Om.js","assets/vendor-lezer-cpp-BleAU9o-.js","assets/vendor-codemirror-lang-css-Ba8JZ6fp.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-go-DyTiHXo4.js","assets/vendor-lezer-go-CXK1UKk8.js","assets/vendor-codemirror-lang-html-DK27qQri.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-javascript-BUlYhQ3o.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-codemirror-lang-java-CvFfnhPQ.js","assets/vendor-lezer-java-D_zzj-NV.js","assets/vendor-codemirror-lang-jinja-wBMtAEvT.js","assets/vendor-codemirror-lang-json-CqayksDf.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-less-Ct3-H1PB.js","assets/vendor-codemirror-lang-liquid-XspREksq.js","assets/vendor-codemirror-lang-markdown-CvO36Y1p.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-lang-php-BlUF9cCe.js","assets/vendor-lezer-php-_DHrbsZG.js","assets/vendor-codemirror-lang-python-_2bIYTiJ.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-lang-rust-BdTYih_U.js","assets/vendor-lezer-rust-Lqgd5SAo.js","assets/vendor-codemirror-lang-sass-E6MhfOFk.js","assets/vendor-lezer-sass-Dnm2lY4t.js","assets/vendor-codemirror-lang-wast-D706yuyC.js","assets/vendor-codemirror-lang-xml--MfWU6Dj.js","assets/vendor-lezer-xml-hUDuAyS5.js","assets/vendor-codemirror-lang-yaml-CRUFIbRX.js","assets/vendor-lezer-yaml-BNIl6S_O.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-CIGw5rlb.js","assets/javascript-BO_2ioGC.js","assets/SessionSwitcherDropdown-D5bWfZNA.js","assets/index-8TL2HlaR.js","assets/vendor-zustand-CnsBKjP5.js","assets/vendor-react-DYyjh7Q0.js","assets/vendor-scheduler-7OC5HNn7.js","assets/index-riABQmQ_.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-base-ui-DL8r2fgQ.js","assets/vendor-floating-ui-utils-BzXdqYpP.js","assets/vendor-floating-ui-react-dom-sVFnuruh.js","assets/vendor-floating-ui-dom-Bkw82kL9.js","assets/vendor-floating-ui-core-CXmKXOXc.js","assets/vendor-use-sync-external-store-B7OScDIw.js","assets/runtimeSurface-CkdOpqo7.js","assets/vendor-dnd-kit-core-GipZW2tY.js","assets/vendor-dnd-kit-utilities-CrOcp0Bp.js","assets/vendor-dnd-kit-accessibility-Cv52zwWT.js","assets/vendor-dnd-kit-sortable-Ct2QxIHb.js","assets/vendor-cmdk-BCEUzcHE.js","assets/vendor-radix-ui-react-dialog-jX3Dld8c.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-D1GnwnP9.js","assets/vendor-radix-ui-react-context-CM4yFQ2I.js","assets/vendor-radix-ui-react-id-BcxRjnbX.js","assets/vendor-radix-ui-react-use-layout-effect-0fyGwS2_.js","assets/vendor-radix-ui-react-use-controllable-state-C_ecoh35.js","assets/vendor-radix-ui-react-dismissable-layer-M7LsH3yL.js","assets/vendor-radix-ui-react-primitive-CfpW6_IT.js","assets/vendor-radix-ui-react-slot-BxUc3Pvz.js","assets/vendor-radix-ui-react-use-callback-ref-UKEWHtoP.js","assets/vendor-radix-ui-react-use-escape-keydown-Co13lHGj.js","assets/vendor-radix-ui-react-focus-scope-C2K7lNPv.js","assets/vendor-radix-ui-react-portal-xlJWBfDg.js","assets/vendor-radix-ui-react-presence-Btn-Dp7L.js","assets/vendor-radix-ui-react-focus-guards-D5MZ0nQs.js","assets/vendor-react-remove-scroll-CfeMe0DL.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-C9YRs2nU.js","assets/vendor-react-style-singleton-B1H4bWSG.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-C-AuTczP.js","assets/vendor-use-callback-ref-CJB0R85I.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-commands-RrgJ8H_6.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-tanstack-react-virtual-IrbCBGJ4.js","assets/vendor-tanstack-virtual-core-Dubg10g5.js","assets/vendor-framer-motion-DJASDzNt.js","assets/vendor-motion-dom-DJLgZh4Q.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-sonner-CW8w438f.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/vendor-codemirror-lang-vue-BYQJRa1Q.js","assets/vendor-codemirror-lang-angular-ADhO_TUK.js"])))=>i.map(i=>d[i]);
2
- import{_ as o}from"./vendor-vite-runtime-DD1OZmLC.js";import{o as t,L as i,S as a}from"./vendor-codemirror-language-E2vgV9K3.js";function n(e){return new i(a.define(e))}function r(e){return o(()=>import("./vendor-codemirror-lang-sql-B1BRhQSF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(_=>_.sql({dialect:_[e]}))}const l=[t.of({name:"C",extensions:["c","h","ino"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-BGCWj7Om.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-BGCWj7Om.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return r("Cassandra")}}),t.of({name:"CSS",extensions:["css"],load(){return o(()=>import("./vendor-codemirror-lang-css-Ba8JZ6fp.js"),__vite__mapDeps([14,15,10,2,9,1,3,4,5,6,7,8])).then(e=>e.css())}}),t.of({name:"Go",extensions:["go"],load(){return o(()=>import("./vendor-codemirror-lang-go-DyTiHXo4.js"),__vite__mapDeps([16,17,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.go())}}),t.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return o(()=>import("./vendor-codemirror-lang-html-DK27qQri.js"),__vite__mapDeps([18,19,10,2,9,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.html())}}),t.of({name:"Java",extensions:["java"],load(){return o(()=>import("./vendor-codemirror-lang-java-CvFfnhPQ.js"),__vite__mapDeps([22,23,10,2,9,1,3,4,5,6,7,8])).then(e=>e.java())}}),t.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript())}}),t.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return o(()=>import("./vendor-codemirror-lang-jinja-wBMtAEvT.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.jinja())}}),t.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return o(()=>import("./vendor-codemirror-lang-json-CqayksDf.js"),__vite__mapDeps([25,26,10,2,9,1,3,4,5,6,7,8])).then(e=>e.json())}}),t.of({name:"JSX",extensions:["jsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0}))}}),t.of({name:"LESS",extensions:["less"],load(){return o(()=>import("./vendor-codemirror-lang-less-Ct3-H1PB.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,14,15,10])).then(e=>e.less())}}),t.of({name:"Liquid",extensions:["liquid"],load(){return o(()=>import("./vendor-codemirror-lang-liquid-XspREksq.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.liquid())}}),t.of({name:"MariaDB SQL",load(){return r("MariaSQL")}}),t.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return o(()=>import("./vendor-codemirror-lang-markdown-CvO36Y1p.js"),__vite__mapDeps([29,3,4,5,6,7,8,1,2,9,11,30,18,19,10,14,15,20,21])).then(e=>e.markdown())}}),t.of({name:"MS SQL",load(){return r("MSSQL")}}),t.of({name:"MySQL",load(){return r("MySQL")}}),t.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return o(()=>import("./vendor-codemirror-lang-php-BlUF9cCe.js"),__vite__mapDeps([31,32,10,2,9,18,19,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.php())}}),t.of({name:"PLSQL",extensions:["pls"],load(){return r("PLSQL")}}),t.of({name:"PostgreSQL",load(){return r("PostgreSQL")}}),t.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return o(()=>import("./vendor-codemirror-lang-python-_2bIYTiJ.js"),__vite__mapDeps([33,34,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.python())}}),t.of({name:"Rust",extensions:["rs"],load(){return o(()=>import("./vendor-codemirror-lang-rust-BdTYih_U.js"),__vite__mapDeps([35,36,10,2,9,1,3,4,5,6,7,8])).then(e=>e.rust())}}),t.of({name:"Sass",extensions:["sass"],load(){return o(()=>import("./vendor-codemirror-lang-sass-E6MhfOFk.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass({indented:!0}))}}),t.of({name:"SCSS",extensions:["scss"],load(){return o(()=>import("./vendor-codemirror-lang-sass-E6MhfOFk.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass())}}),t.of({name:"SQL",extensions:["sql"],load(){return r("StandardSQL")}}),t.of({name:"SQLite",load(){return r("SQLite")}}),t.of({name:"TSX",extensions:["tsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),t.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({typescript:!0}))}}),t.of({name:"WebAssembly",extensions:["wat","wast"],load(){return o(()=>import("./vendor-codemirror-lang-wast-D706yuyC.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10])).then(e=>e.wast())}}),t.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return o(()=>import("./vendor-codemirror-lang-xml--MfWU6Dj.js"),__vite__mapDeps([40,41,10,2,9,1,3,4,5,6,7,8])).then(e=>e.xml())}}),t.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return o(()=>import("./vendor-codemirror-lang-yaml-CRUFIbRX.js"),__vite__mapDeps([42,43,10,2,9,1,3,4,5,6,7,8])).then(e=>e.yaml())}}),t.of({name:"APL",extensions:["dyalog","apl"],load(){return o(()=>import("./apl-B4CMkyY2.js"),[]).then(e=>n(e.apl))}}),t.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return o(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(e=>n(e.asciiArmor))}}),t.of({name:"ASN.1",extensions:["asn","asn1"],load(){return o(()=>import("./asn1-EdZsLKOL.js"),[]).then(e=>n(e.asn1({})))}}),t.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return o(()=>import("./asterisk-B-8jnY81.js"),[]).then(e=>n(e.asterisk))}}),t.of({name:"Brainfuck",extensions:["b","bf"],load(){return o(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(e=>n(e.brainfuck))}}),t.of({name:"Cobol",extensions:["cob","cpy"],load(){return o(()=>import("./cobol-CWcv1MsR.js"),[]).then(e=>n(e.cobol))}}),t.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.csharp))}}),t.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"ClojureScript",extensions:["cljs"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return o(()=>import("./css-BnMrqG3P.js"),[]).then(e=>n(e.gss))}}),t.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return o(()=>import("./cmake-BQqOBYOt.js"),[]).then(e=>n(e.cmake))}}),t.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return o(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(e=>n(e.coffeeScript))}}),t.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return o(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(e=>n(e.commonLisp))}}),t.of({name:"Cypher",extensions:["cyp","cypher"],load(){return o(()=>import("./cypher-C_CwsFkJ.js"),[]).then(e=>n(e.cypher))}}),t.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return o(()=>import("./python-Cso5vRIg.js"),[]).then(e=>n(e.cython))}}),t.of({name:"Crystal",extensions:["cr"],load(){return o(()=>import("./crystal-SjHAIU92.js"),[]).then(e=>n(e.crystal))}}),t.of({name:"D",extensions:["d"],load(){return o(()=>import("./d-pRatUO7H.js"),[]).then(e=>n(e.d))}}),t.of({name:"Dart",extensions:["dart"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.dart))}}),t.of({name:"diff",extensions:["diff","patch"],load(){return o(()=>import("./diff-DbItnlRl.js"),[]).then(e=>n(e.diff))}}),t.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return o(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([44,45])).then(e=>n(e.dockerFile))}}),t.of({name:"DTD",extensions:["dtd"],load(){return o(()=>import("./dtd-DF_7sFjM.js"),[]).then(e=>n(e.dtd))}}),t.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return o(()=>import("./dylan-DwRh75JA.js"),[]).then(e=>n(e.dylan))}}),t.of({name:"EBNF",load(){return o(()=>import("./ebnf-CDyGwa7X.js"),[]).then(e=>n(e.ebnf))}}),t.of({name:"ECL",extensions:["ecl"],load(){return o(()=>import("./ecl-Cabwm37j.js"),[]).then(e=>n(e.ecl))}}),t.of({name:"edn",extensions:["edn"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Eiffel",extensions:["e"],load(){return o(()=>import("./eiffel-CnydiIhH.js"),[]).then(e=>n(e.eiffel))}}),t.of({name:"Elm",extensions:["elm"],load(){return o(()=>import("./elm-vLlmbW-K.js"),[]).then(e=>n(e.elm))}}),t.of({name:"Erlang",extensions:["erl"],load(){return o(()=>import("./erlang-BNw1qcRV.js"),[]).then(e=>n(e.erlang))}}),t.of({name:"Esper",load(){return o(()=>import("./sql-D0XecflT.js"),[]).then(e=>n(e.esper))}}),t.of({name:"Factor",extensions:["factor"],load(){return o(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([46,45])).then(e=>n(e.factor))}}),t.of({name:"FCL",load(){return o(()=>import("./fcl-Kvtd6kyn.js"),[]).then(e=>n(e.fcl))}}),t.of({name:"Forth",extensions:["forth","fth","4th"],load(){return o(()=>import("./forth-Ffai-XNe.js"),[]).then(e=>n(e.forth))}}),t.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return o(()=>import("./fortran-DYz_wnZ1.js"),[]).then(e=>n(e.fortran))}}),t.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.fSharp))}}),t.of({name:"Gas",extensions:["s"],load(){return o(()=>import("./gas-Bneqetm1.js"),[]).then(e=>n(e.gas))}}),t.of({name:"Gherkin",extensions:["feature"],load(){return o(()=>import("./gherkin-heZmZLOM.js"),[]).then(e=>n(e.gherkin))}}),t.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return o(()=>import("./groovy-D9Dt4D0W.js"),[]).then(e=>n(e.groovy))}}),t.of({name:"Haskell",extensions:["hs"],load(){return o(()=>import("./haskell-Cw1EW3IL.js"),[]).then(e=>n(e.haskell))}}),t.of({name:"Haxe",extensions:["hx"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.haxe))}}),t.of({name:"HXML",extensions:["hxml"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.hxml))}}),t.of({name:"HTTP",load(){return o(()=>import("./http-DBlCnlav.js"),[]).then(e=>n(e.http))}}),t.of({name:"IDL",extensions:["pro"],load(){return o(()=>import("./idl-BEugSyMb.js"),[]).then(e=>n(e.idl))}}),t.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return o(()=>import("./javascript-BO_2ioGC.js"),[]).then(e=>n(e.jsonld))}}),t.of({name:"Julia",extensions:["jl"],load(){return o(()=>import("./julia-DuME0IfC.js"),[]).then(e=>n(e.julia))}}),t.of({name:"Kotlin",extensions:["kt","kts"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.kotlin))}}),t.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return o(()=>import("./livescript-BwQOo05w.js"),[]).then(e=>n(e.liveScript))}}),t.of({name:"Lua",extensions:["lua"],load(){return o(()=>import("./lua-BgMRiT3U.js"),[]).then(e=>n(e.lua))}}),t.of({name:"mIRC",extensions:["mrc"],load(){return o(()=>import("./mirc-CjQqDB4T.js"),[]).then(e=>n(e.mirc))}}),t.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return o(()=>import("./mathematica-DTrFuWx2.js"),[]).then(e=>n(e.mathematica))}}),t.of({name:"Modelica",extensions:["mo"],load(){return o(()=>import("./modelica-Dc1JOy9r.js"),[]).then(e=>n(e.modelica))}}),t.of({name:"MUMPS",extensions:["mps"],load(){return o(()=>import("./mumps-BT43cFF4.js"),[]).then(e=>n(e.mumps))}}),t.of({name:"Mbox",extensions:["mbox"],load(){return o(()=>import("./mbox-CNhZ1qSd.js"),[]).then(e=>n(e.mbox))}}),t.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return o(()=>import("./nginx-DdIZxoE0.js"),[]).then(e=>n(e.nginx))}}),t.of({name:"NSIS",extensions:["nsh","nsi"],load(){return o(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([47,45])).then(e=>n(e.nsis))}}),t.of({name:"NTriples",extensions:["nt","nq"],load(){return o(()=>import("./ntriples-BfvgReVJ.js"),[]).then(e=>n(e.ntriples))}}),t.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveC))}}),t.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveCpp))}}),t.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.oCaml))}}),t.of({name:"Octave",extensions:["m"],load(){return o(()=>import("./octave-CWZ4xMHY.js"),[]).then(e=>n(e.octave))}}),t.of({name:"Oz",extensions:["oz"],load(){return o(()=>import("./oz-BzwKVEFT.js"),[]).then(e=>n(e.oz))}}),t.of({name:"Pascal",extensions:["p","pas"],load(){return o(()=>import("./pascal--L3eBynH.js"),[]).then(e=>n(e.pascal))}}),t.of({name:"Perl",extensions:["pl","pm"],load(){return o(()=>import("./perl-CdXCOZ3F.js"),[]).then(e=>n(e.perl))}}),t.of({name:"Pig",extensions:["pig"],load(){return o(()=>import("./pig-CevX1Tat.js"),[]).then(e=>n(e.pig))}}),t.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return o(()=>import("./powershell-CFHJl5sT.js"),[]).then(e=>n(e.powerShell))}}),t.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return o(()=>import("./properties-C78fOPTZ.js"),[]).then(e=>n(e.properties))}}),t.of({name:"ProtoBuf",extensions:["proto"],load(){return o(()=>import("./protobuf-ChK-085T.js"),[]).then(e=>n(e.protobuf))}}),t.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return o(()=>import("./pug-CIGw5rlb.js"),__vite__mapDeps([48,49])).then(e=>n(e.pug))}}),t.of({name:"Puppet",extensions:["pp"],load(){return o(()=>import("./puppet-DMA9R1ak.js"),[]).then(e=>n(e.puppet))}}),t.of({name:"Q",extensions:["q"],load(){return o(()=>import("./q-pXgVlZs6.js"),[]).then(e=>n(e.q))}}),t.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return o(()=>import("./r-B6wPVr8A.js"),[]).then(e=>n(e.r))}}),t.of({name:"RPM Changes",load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmChanges))}}),t.of({name:"RPM Spec",extensions:["spec"],load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmSpec))}}),t.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return o(()=>import("./ruby-B2Rjki9n.js"),[]).then(e=>n(e.ruby))}}),t.of({name:"SAS",extensions:["sas"],load(){return o(()=>import("./sas-B4kiWyti.js"),[]).then(e=>n(e.sas))}}),t.of({name:"Scala",extensions:["scala"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.scala))}}),t.of({name:"Scheme",extensions:["scm","ss"],load(){return o(()=>import("./scheme-C41bIUwD.js"),[]).then(e=>n(e.scheme))}}),t.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return o(()=>import("./SessionSwitcherDropdown-D5bWfZNA.js").then(e=>e.f6),__vite__mapDeps([50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,1,2,3,4,5,6,7,8,9,20,21,10,11,25,26,14,15,18,19,29,30,33,34,94,95,96,97,98,99,100,101,102,103,104])).then(e=>n(e.shell))}}),t.of({name:"Sieve",extensions:["siv","sieve"],load(){return o(()=>import("./sieve-C3Gn_uJK.js"),[]).then(e=>n(e.sieve))}}),t.of({name:"Smalltalk",extensions:["st"],load(){return o(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(e=>n(e.smalltalk))}}),t.of({name:"Solr",load(){return o(()=>import("./solr-DehyRSwq.js"),[]).then(e=>n(e.solr))}}),t.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.sml))}}),t.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return o(()=>import("./sparql-DkYu6x3z.js"),[]).then(e=>n(e.sparql))}}),t.of({name:"Spreadsheet",alias:["excel","formula"],load(){return o(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(e=>n(e.spreadsheet))}}),t.of({name:"Squirrel",extensions:["nut"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.squirrel))}}),t.of({name:"Stylus",extensions:["styl"],load(){return o(()=>import("./stylus-B533Al4x.js"),[]).then(e=>n(e.stylus))}}),t.of({name:"Swift",extensions:["swift"],load(){return o(()=>import("./swift-BzpIVaGY.js"),[]).then(e=>n(e.swift))}}),t.of({name:"sTeX",load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"Tcl",extensions:["tcl"],load(){return o(()=>import("./tcl-DVfN8rqt.js"),[]).then(e=>n(e.tcl))}}),t.of({name:"Textile",extensions:["textile"],load(){return o(()=>import("./textile-CnDTJFAw.js"),[]).then(e=>n(e.textile))}}),t.of({name:"TiddlyWiki",load(){return o(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(e=>n(e.tiddlyWiki))}}),t.of({name:"Tiki wiki",load(){return o(()=>import("./tiki-DGYXhP31.js"),[]).then(e=>n(e.tiki))}}),t.of({name:"TOML",extensions:["toml"],load(){return o(()=>import("./toml-Bm5Em-hy.js"),[]).then(e=>n(e.toml))}}),t.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return o(()=>import("./troff-wAsdV37c.js"),[]).then(e=>n(e.troff))}}),t.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return o(()=>import("./ttcn-CfJYG6tj.js"),[]).then(e=>n(e.ttcn))}}),t.of({name:"TTCN_CFG",extensions:["cfg"],load(){return o(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(e=>n(e.ttcnCfg))}}),t.of({name:"Turtle",extensions:["ttl"],load(){return o(()=>import("./turtle-B1tBg_DP.js"),[]).then(e=>n(e.turtle))}}),t.of({name:"Web IDL",extensions:["webidl"],load(){return o(()=>import("./webidl-ZXfAyPTL.js"),[]).then(e=>n(e.webIDL))}}),t.of({name:"VB.NET",extensions:["vb"],load(){return o(()=>import("./vb-CmGdzxic.js"),[]).then(e=>n(e.vb))}}),t.of({name:"VBScript",extensions:["vbs"],load(){return o(()=>import("./vbscript-BuJXcnF6.js"),[]).then(e=>n(e.vbScript))}}),t.of({name:"Velocity",extensions:["vtl"],load(){return o(()=>import("./velocity-D8B20fx6.js"),[]).then(e=>n(e.velocity))}}),t.of({name:"Verilog",extensions:["v"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return o(()=>import("./vhdl-lSbBsy5d.js"),[]).then(e=>n(e.vhdl))}}),t.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return o(()=>import("./xquery-DzFWVndE.js"),[]).then(e=>n(e.xQuery))}}),t.of({name:"Yacas",extensions:["ys"],load(){return o(()=>import("./yacas-BJ4BC0dw.js"),[]).then(e=>n(e.yacas))}}),t.of({name:"Z80",extensions:["z80"],load(){return o(()=>import("./z80-Hz9HOZM7.js"),[]).then(e=>n(e.z80))}}),t.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.mscgen))}}),t.of({name:"Xù",extensions:["xu"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.xu))}}),t.of({name:"MsGenny",extensions:["msgenny"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.msgenny))}}),t.of({name:"Vue",extensions:["vue"],load(){return o(()=>import("./vendor-codemirror-lang-vue-BYQJRa1Q.js"),__vite__mapDeps([105,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.vue())}}),t.of({name:"Angular Template",load(){return o(()=>import("./vendor-codemirror-lang-angular-ADhO_TUK.js"),__vite__mapDeps([106,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.angular())}})];export{l};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-B1BRhQSF.js","assets/vendor-codemirror-language-E2vgV9K3.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-CNWM3Q8V.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-DSzLbZiS.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-BS2SpSAZ.js","assets/vendor-codemirror-lang-cpp-BGCWj7Om.js","assets/vendor-lezer-cpp-BleAU9o-.js","assets/vendor-codemirror-lang-css-Ba8JZ6fp.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-go-DyTiHXo4.js","assets/vendor-lezer-go-CXK1UKk8.js","assets/vendor-codemirror-lang-html-DK27qQri.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-javascript-BUlYhQ3o.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-codemirror-lang-java-CvFfnhPQ.js","assets/vendor-lezer-java-D_zzj-NV.js","assets/vendor-codemirror-lang-jinja-wBMtAEvT.js","assets/vendor-codemirror-lang-json-CqayksDf.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-less-Ct3-H1PB.js","assets/vendor-codemirror-lang-liquid-XspREksq.js","assets/vendor-codemirror-lang-markdown-CvO36Y1p.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-lang-php-BlUF9cCe.js","assets/vendor-lezer-php-_DHrbsZG.js","assets/vendor-codemirror-lang-python-_2bIYTiJ.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-lang-rust-BdTYih_U.js","assets/vendor-lezer-rust-Lqgd5SAo.js","assets/vendor-codemirror-lang-sass-E6MhfOFk.js","assets/vendor-lezer-sass-Dnm2lY4t.js","assets/vendor-codemirror-lang-wast-D706yuyC.js","assets/vendor-codemirror-lang-xml--MfWU6Dj.js","assets/vendor-lezer-xml-hUDuAyS5.js","assets/vendor-codemirror-lang-yaml-CRUFIbRX.js","assets/vendor-lezer-yaml-BNIl6S_O.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-CIGw5rlb.js","assets/javascript-BO_2ioGC.js","assets/SessionSwitcherDropdown-DROjbyIu.js","assets/index-BAqpUCjs.js","assets/vendor-zustand-CnsBKjP5.js","assets/vendor-react-DYyjh7Q0.js","assets/vendor-scheduler-7OC5HNn7.js","assets/index-riABQmQ_.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-base-ui-DL8r2fgQ.js","assets/vendor-floating-ui-utils-BzXdqYpP.js","assets/vendor-floating-ui-react-dom-sVFnuruh.js","assets/vendor-floating-ui-dom-Bkw82kL9.js","assets/vendor-floating-ui-core-CXmKXOXc.js","assets/vendor-use-sync-external-store-B7OScDIw.js","assets/runtimeSurface-CkHYYg0E.js","assets/vendor-dnd-kit-core-GipZW2tY.js","assets/vendor-dnd-kit-utilities-CrOcp0Bp.js","assets/vendor-dnd-kit-accessibility-Cv52zwWT.js","assets/vendor-dnd-kit-sortable-Ct2QxIHb.js","assets/vendor-cmdk-BCEUzcHE.js","assets/vendor-radix-ui-react-dialog-jX3Dld8c.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-D1GnwnP9.js","assets/vendor-radix-ui-react-context-CM4yFQ2I.js","assets/vendor-radix-ui-react-id-BcxRjnbX.js","assets/vendor-radix-ui-react-use-layout-effect-0fyGwS2_.js","assets/vendor-radix-ui-react-use-controllable-state-C_ecoh35.js","assets/vendor-radix-ui-react-dismissable-layer-M7LsH3yL.js","assets/vendor-radix-ui-react-primitive-CfpW6_IT.js","assets/vendor-radix-ui-react-slot-BxUc3Pvz.js","assets/vendor-radix-ui-react-use-callback-ref-UKEWHtoP.js","assets/vendor-radix-ui-react-use-escape-keydown-Co13lHGj.js","assets/vendor-radix-ui-react-focus-scope-C2K7lNPv.js","assets/vendor-radix-ui-react-portal-xlJWBfDg.js","assets/vendor-radix-ui-react-presence-Btn-Dp7L.js","assets/vendor-radix-ui-react-focus-guards-D5MZ0nQs.js","assets/vendor-react-remove-scroll-CfeMe0DL.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-C9YRs2nU.js","assets/vendor-react-style-singleton-B1H4bWSG.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-C-AuTczP.js","assets/vendor-use-callback-ref-CJB0R85I.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-commands-RrgJ8H_6.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-tanstack-react-virtual-IrbCBGJ4.js","assets/vendor-tanstack-virtual-core-Dubg10g5.js","assets/vendor-framer-motion-DJASDzNt.js","assets/vendor-motion-dom-DJLgZh4Q.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-sonner-CW8w438f.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/vendor-codemirror-lang-vue-BYQJRa1Q.js","assets/vendor-codemirror-lang-angular-ADhO_TUK.js"])))=>i.map(i=>d[i]);
2
+ import{_ as o}from"./vendor-vite-runtime-DD1OZmLC.js";import{o as t,L as i,S as a}from"./vendor-codemirror-language-E2vgV9K3.js";function n(e){return new i(a.define(e))}function r(e){return o(()=>import("./vendor-codemirror-lang-sql-B1BRhQSF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(_=>_.sql({dialect:_[e]}))}const l=[t.of({name:"C",extensions:["c","h","ino"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-BGCWj7Om.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-BGCWj7Om.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return r("Cassandra")}}),t.of({name:"CSS",extensions:["css"],load(){return o(()=>import("./vendor-codemirror-lang-css-Ba8JZ6fp.js"),__vite__mapDeps([14,15,10,2,9,1,3,4,5,6,7,8])).then(e=>e.css())}}),t.of({name:"Go",extensions:["go"],load(){return o(()=>import("./vendor-codemirror-lang-go-DyTiHXo4.js"),__vite__mapDeps([16,17,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.go())}}),t.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return o(()=>import("./vendor-codemirror-lang-html-DK27qQri.js"),__vite__mapDeps([18,19,10,2,9,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.html())}}),t.of({name:"Java",extensions:["java"],load(){return o(()=>import("./vendor-codemirror-lang-java-CvFfnhPQ.js"),__vite__mapDeps([22,23,10,2,9,1,3,4,5,6,7,8])).then(e=>e.java())}}),t.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript())}}),t.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return o(()=>import("./vendor-codemirror-lang-jinja-wBMtAEvT.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.jinja())}}),t.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return o(()=>import("./vendor-codemirror-lang-json-CqayksDf.js"),__vite__mapDeps([25,26,10,2,9,1,3,4,5,6,7,8])).then(e=>e.json())}}),t.of({name:"JSX",extensions:["jsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0}))}}),t.of({name:"LESS",extensions:["less"],load(){return o(()=>import("./vendor-codemirror-lang-less-Ct3-H1PB.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,14,15,10])).then(e=>e.less())}}),t.of({name:"Liquid",extensions:["liquid"],load(){return o(()=>import("./vendor-codemirror-lang-liquid-XspREksq.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.liquid())}}),t.of({name:"MariaDB SQL",load(){return r("MariaSQL")}}),t.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return o(()=>import("./vendor-codemirror-lang-markdown-CvO36Y1p.js"),__vite__mapDeps([29,3,4,5,6,7,8,1,2,9,11,30,18,19,10,14,15,20,21])).then(e=>e.markdown())}}),t.of({name:"MS SQL",load(){return r("MSSQL")}}),t.of({name:"MySQL",load(){return r("MySQL")}}),t.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return o(()=>import("./vendor-codemirror-lang-php-BlUF9cCe.js"),__vite__mapDeps([31,32,10,2,9,18,19,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.php())}}),t.of({name:"PLSQL",extensions:["pls"],load(){return r("PLSQL")}}),t.of({name:"PostgreSQL",load(){return r("PostgreSQL")}}),t.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return o(()=>import("./vendor-codemirror-lang-python-_2bIYTiJ.js"),__vite__mapDeps([33,34,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.python())}}),t.of({name:"Rust",extensions:["rs"],load(){return o(()=>import("./vendor-codemirror-lang-rust-BdTYih_U.js"),__vite__mapDeps([35,36,10,2,9,1,3,4,5,6,7,8])).then(e=>e.rust())}}),t.of({name:"Sass",extensions:["sass"],load(){return o(()=>import("./vendor-codemirror-lang-sass-E6MhfOFk.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass({indented:!0}))}}),t.of({name:"SCSS",extensions:["scss"],load(){return o(()=>import("./vendor-codemirror-lang-sass-E6MhfOFk.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass())}}),t.of({name:"SQL",extensions:["sql"],load(){return r("StandardSQL")}}),t.of({name:"SQLite",load(){return r("SQLite")}}),t.of({name:"TSX",extensions:["tsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),t.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-BUlYhQ3o.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({typescript:!0}))}}),t.of({name:"WebAssembly",extensions:["wat","wast"],load(){return o(()=>import("./vendor-codemirror-lang-wast-D706yuyC.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10])).then(e=>e.wast())}}),t.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return o(()=>import("./vendor-codemirror-lang-xml--MfWU6Dj.js"),__vite__mapDeps([40,41,10,2,9,1,3,4,5,6,7,8])).then(e=>e.xml())}}),t.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return o(()=>import("./vendor-codemirror-lang-yaml-CRUFIbRX.js"),__vite__mapDeps([42,43,10,2,9,1,3,4,5,6,7,8])).then(e=>e.yaml())}}),t.of({name:"APL",extensions:["dyalog","apl"],load(){return o(()=>import("./apl-B4CMkyY2.js"),[]).then(e=>n(e.apl))}}),t.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return o(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(e=>n(e.asciiArmor))}}),t.of({name:"ASN.1",extensions:["asn","asn1"],load(){return o(()=>import("./asn1-EdZsLKOL.js"),[]).then(e=>n(e.asn1({})))}}),t.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return o(()=>import("./asterisk-B-8jnY81.js"),[]).then(e=>n(e.asterisk))}}),t.of({name:"Brainfuck",extensions:["b","bf"],load(){return o(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(e=>n(e.brainfuck))}}),t.of({name:"Cobol",extensions:["cob","cpy"],load(){return o(()=>import("./cobol-CWcv1MsR.js"),[]).then(e=>n(e.cobol))}}),t.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.csharp))}}),t.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"ClojureScript",extensions:["cljs"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return o(()=>import("./css-BnMrqG3P.js"),[]).then(e=>n(e.gss))}}),t.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return o(()=>import("./cmake-BQqOBYOt.js"),[]).then(e=>n(e.cmake))}}),t.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return o(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(e=>n(e.coffeeScript))}}),t.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return o(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(e=>n(e.commonLisp))}}),t.of({name:"Cypher",extensions:["cyp","cypher"],load(){return o(()=>import("./cypher-C_CwsFkJ.js"),[]).then(e=>n(e.cypher))}}),t.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return o(()=>import("./python-Cso5vRIg.js"),[]).then(e=>n(e.cython))}}),t.of({name:"Crystal",extensions:["cr"],load(){return o(()=>import("./crystal-SjHAIU92.js"),[]).then(e=>n(e.crystal))}}),t.of({name:"D",extensions:["d"],load(){return o(()=>import("./d-pRatUO7H.js"),[]).then(e=>n(e.d))}}),t.of({name:"Dart",extensions:["dart"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.dart))}}),t.of({name:"diff",extensions:["diff","patch"],load(){return o(()=>import("./diff-DbItnlRl.js"),[]).then(e=>n(e.diff))}}),t.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return o(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([44,45])).then(e=>n(e.dockerFile))}}),t.of({name:"DTD",extensions:["dtd"],load(){return o(()=>import("./dtd-DF_7sFjM.js"),[]).then(e=>n(e.dtd))}}),t.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return o(()=>import("./dylan-DwRh75JA.js"),[]).then(e=>n(e.dylan))}}),t.of({name:"EBNF",load(){return o(()=>import("./ebnf-CDyGwa7X.js"),[]).then(e=>n(e.ebnf))}}),t.of({name:"ECL",extensions:["ecl"],load(){return o(()=>import("./ecl-Cabwm37j.js"),[]).then(e=>n(e.ecl))}}),t.of({name:"edn",extensions:["edn"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Eiffel",extensions:["e"],load(){return o(()=>import("./eiffel-CnydiIhH.js"),[]).then(e=>n(e.eiffel))}}),t.of({name:"Elm",extensions:["elm"],load(){return o(()=>import("./elm-vLlmbW-K.js"),[]).then(e=>n(e.elm))}}),t.of({name:"Erlang",extensions:["erl"],load(){return o(()=>import("./erlang-BNw1qcRV.js"),[]).then(e=>n(e.erlang))}}),t.of({name:"Esper",load(){return o(()=>import("./sql-D0XecflT.js"),[]).then(e=>n(e.esper))}}),t.of({name:"Factor",extensions:["factor"],load(){return o(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([46,45])).then(e=>n(e.factor))}}),t.of({name:"FCL",load(){return o(()=>import("./fcl-Kvtd6kyn.js"),[]).then(e=>n(e.fcl))}}),t.of({name:"Forth",extensions:["forth","fth","4th"],load(){return o(()=>import("./forth-Ffai-XNe.js"),[]).then(e=>n(e.forth))}}),t.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return o(()=>import("./fortran-DYz_wnZ1.js"),[]).then(e=>n(e.fortran))}}),t.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.fSharp))}}),t.of({name:"Gas",extensions:["s"],load(){return o(()=>import("./gas-Bneqetm1.js"),[]).then(e=>n(e.gas))}}),t.of({name:"Gherkin",extensions:["feature"],load(){return o(()=>import("./gherkin-heZmZLOM.js"),[]).then(e=>n(e.gherkin))}}),t.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return o(()=>import("./groovy-D9Dt4D0W.js"),[]).then(e=>n(e.groovy))}}),t.of({name:"Haskell",extensions:["hs"],load(){return o(()=>import("./haskell-Cw1EW3IL.js"),[]).then(e=>n(e.haskell))}}),t.of({name:"Haxe",extensions:["hx"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.haxe))}}),t.of({name:"HXML",extensions:["hxml"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.hxml))}}),t.of({name:"HTTP",load(){return o(()=>import("./http-DBlCnlav.js"),[]).then(e=>n(e.http))}}),t.of({name:"IDL",extensions:["pro"],load(){return o(()=>import("./idl-BEugSyMb.js"),[]).then(e=>n(e.idl))}}),t.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return o(()=>import("./javascript-BO_2ioGC.js"),[]).then(e=>n(e.jsonld))}}),t.of({name:"Julia",extensions:["jl"],load(){return o(()=>import("./julia-DuME0IfC.js"),[]).then(e=>n(e.julia))}}),t.of({name:"Kotlin",extensions:["kt","kts"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.kotlin))}}),t.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return o(()=>import("./livescript-BwQOo05w.js"),[]).then(e=>n(e.liveScript))}}),t.of({name:"Lua",extensions:["lua"],load(){return o(()=>import("./lua-BgMRiT3U.js"),[]).then(e=>n(e.lua))}}),t.of({name:"mIRC",extensions:["mrc"],load(){return o(()=>import("./mirc-CjQqDB4T.js"),[]).then(e=>n(e.mirc))}}),t.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return o(()=>import("./mathematica-DTrFuWx2.js"),[]).then(e=>n(e.mathematica))}}),t.of({name:"Modelica",extensions:["mo"],load(){return o(()=>import("./modelica-Dc1JOy9r.js"),[]).then(e=>n(e.modelica))}}),t.of({name:"MUMPS",extensions:["mps"],load(){return o(()=>import("./mumps-BT43cFF4.js"),[]).then(e=>n(e.mumps))}}),t.of({name:"Mbox",extensions:["mbox"],load(){return o(()=>import("./mbox-CNhZ1qSd.js"),[]).then(e=>n(e.mbox))}}),t.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return o(()=>import("./nginx-DdIZxoE0.js"),[]).then(e=>n(e.nginx))}}),t.of({name:"NSIS",extensions:["nsh","nsi"],load(){return o(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([47,45])).then(e=>n(e.nsis))}}),t.of({name:"NTriples",extensions:["nt","nq"],load(){return o(()=>import("./ntriples-BfvgReVJ.js"),[]).then(e=>n(e.ntriples))}}),t.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveC))}}),t.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveCpp))}}),t.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.oCaml))}}),t.of({name:"Octave",extensions:["m"],load(){return o(()=>import("./octave-CWZ4xMHY.js"),[]).then(e=>n(e.octave))}}),t.of({name:"Oz",extensions:["oz"],load(){return o(()=>import("./oz-BzwKVEFT.js"),[]).then(e=>n(e.oz))}}),t.of({name:"Pascal",extensions:["p","pas"],load(){return o(()=>import("./pascal--L3eBynH.js"),[]).then(e=>n(e.pascal))}}),t.of({name:"Perl",extensions:["pl","pm"],load(){return o(()=>import("./perl-CdXCOZ3F.js"),[]).then(e=>n(e.perl))}}),t.of({name:"Pig",extensions:["pig"],load(){return o(()=>import("./pig-CevX1Tat.js"),[]).then(e=>n(e.pig))}}),t.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return o(()=>import("./powershell-CFHJl5sT.js"),[]).then(e=>n(e.powerShell))}}),t.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return o(()=>import("./properties-C78fOPTZ.js"),[]).then(e=>n(e.properties))}}),t.of({name:"ProtoBuf",extensions:["proto"],load(){return o(()=>import("./protobuf-ChK-085T.js"),[]).then(e=>n(e.protobuf))}}),t.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return o(()=>import("./pug-CIGw5rlb.js"),__vite__mapDeps([48,49])).then(e=>n(e.pug))}}),t.of({name:"Puppet",extensions:["pp"],load(){return o(()=>import("./puppet-DMA9R1ak.js"),[]).then(e=>n(e.puppet))}}),t.of({name:"Q",extensions:["q"],load(){return o(()=>import("./q-pXgVlZs6.js"),[]).then(e=>n(e.q))}}),t.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return o(()=>import("./r-B6wPVr8A.js"),[]).then(e=>n(e.r))}}),t.of({name:"RPM Changes",load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmChanges))}}),t.of({name:"RPM Spec",extensions:["spec"],load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmSpec))}}),t.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return o(()=>import("./ruby-B2Rjki9n.js"),[]).then(e=>n(e.ruby))}}),t.of({name:"SAS",extensions:["sas"],load(){return o(()=>import("./sas-B4kiWyti.js"),[]).then(e=>n(e.sas))}}),t.of({name:"Scala",extensions:["scala"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.scala))}}),t.of({name:"Scheme",extensions:["scm","ss"],load(){return o(()=>import("./scheme-C41bIUwD.js"),[]).then(e=>n(e.scheme))}}),t.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return o(()=>import("./SessionSwitcherDropdown-DROjbyIu.js").then(e=>e.f1),__vite__mapDeps([50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,1,2,3,4,5,6,7,8,9,20,21,10,11,25,26,14,15,18,19,29,30,33,34,94,95,96,97,98,99,100,101,102,103,104])).then(e=>n(e.shell))}}),t.of({name:"Sieve",extensions:["siv","sieve"],load(){return o(()=>import("./sieve-C3Gn_uJK.js"),[]).then(e=>n(e.sieve))}}),t.of({name:"Smalltalk",extensions:["st"],load(){return o(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(e=>n(e.smalltalk))}}),t.of({name:"Solr",load(){return o(()=>import("./solr-DehyRSwq.js"),[]).then(e=>n(e.solr))}}),t.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.sml))}}),t.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return o(()=>import("./sparql-DkYu6x3z.js"),[]).then(e=>n(e.sparql))}}),t.of({name:"Spreadsheet",alias:["excel","formula"],load(){return o(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(e=>n(e.spreadsheet))}}),t.of({name:"Squirrel",extensions:["nut"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.squirrel))}}),t.of({name:"Stylus",extensions:["styl"],load(){return o(()=>import("./stylus-B533Al4x.js"),[]).then(e=>n(e.stylus))}}),t.of({name:"Swift",extensions:["swift"],load(){return o(()=>import("./swift-BzpIVaGY.js"),[]).then(e=>n(e.swift))}}),t.of({name:"sTeX",load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"Tcl",extensions:["tcl"],load(){return o(()=>import("./tcl-DVfN8rqt.js"),[]).then(e=>n(e.tcl))}}),t.of({name:"Textile",extensions:["textile"],load(){return o(()=>import("./textile-CnDTJFAw.js"),[]).then(e=>n(e.textile))}}),t.of({name:"TiddlyWiki",load(){return o(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(e=>n(e.tiddlyWiki))}}),t.of({name:"Tiki wiki",load(){return o(()=>import("./tiki-DGYXhP31.js"),[]).then(e=>n(e.tiki))}}),t.of({name:"TOML",extensions:["toml"],load(){return o(()=>import("./toml-Bm5Em-hy.js"),[]).then(e=>n(e.toml))}}),t.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return o(()=>import("./troff-wAsdV37c.js"),[]).then(e=>n(e.troff))}}),t.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return o(()=>import("./ttcn-CfJYG6tj.js"),[]).then(e=>n(e.ttcn))}}),t.of({name:"TTCN_CFG",extensions:["cfg"],load(){return o(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(e=>n(e.ttcnCfg))}}),t.of({name:"Turtle",extensions:["ttl"],load(){return o(()=>import("./turtle-B1tBg_DP.js"),[]).then(e=>n(e.turtle))}}),t.of({name:"Web IDL",extensions:["webidl"],load(){return o(()=>import("./webidl-ZXfAyPTL.js"),[]).then(e=>n(e.webIDL))}}),t.of({name:"VB.NET",extensions:["vb"],load(){return o(()=>import("./vb-CmGdzxic.js"),[]).then(e=>n(e.vb))}}),t.of({name:"VBScript",extensions:["vbs"],load(){return o(()=>import("./vbscript-BuJXcnF6.js"),[]).then(e=>n(e.vbScript))}}),t.of({name:"Velocity",extensions:["vtl"],load(){return o(()=>import("./velocity-D8B20fx6.js"),[]).then(e=>n(e.velocity))}}),t.of({name:"Verilog",extensions:["v"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return o(()=>import("./vhdl-lSbBsy5d.js"),[]).then(e=>n(e.vhdl))}}),t.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return o(()=>import("./xquery-DzFWVndE.js"),[]).then(e=>n(e.xQuery))}}),t.of({name:"Yacas",extensions:["ys"],load(){return o(()=>import("./yacas-BJ4BC0dw.js"),[]).then(e=>n(e.yacas))}}),t.of({name:"Z80",extensions:["z80"],load(){return o(()=>import("./z80-Hz9HOZM7.js"),[]).then(e=>n(e.z80))}}),t.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.mscgen))}}),t.of({name:"Xù",extensions:["xu"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.xu))}}),t.of({name:"MsGenny",extensions:["msgenny"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.msgenny))}}),t.of({name:"Vue",extensions:["vue"],load(){return o(()=>import("./vendor-codemirror-lang-vue-BYQJRa1Q.js"),__vite__mapDeps([105,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.vue())}}),t.of({name:"Angular Template",load(){return o(()=>import("./vendor-codemirror-lang-angular-ADhO_TUK.js"),__vite__mapDeps([106,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.angular())}})];export{l};
@@ -1,4 +1,4 @@
1
- import{df as M,dW as V,dX as Y,dY as X,dZ as j,ex as K,ey as Z,ez as $,eA as J,d$ as Q}from"./SessionSwitcherDropdown-D5bWfZNA.js";import{b as ee,m as p,x as I,A as ne,a as G,y as te,z as C}from"./computeVirtualFileMetrics-skbyL2Az.js";import{t as ie}from"./vendor-hast-util-to-html-BKBhbTDb.js";function U(e,n,t){if(e===n||e==null||n==null)return e===n;const i=new Set(t),a=Object.keys(e),r=new Set(Object.keys(n));for(const s of a)if(r.delete(s),!i.has(s)&&(!(s in n)||e[s]!==n[s]))return!1;for(const s of Array.from(r))if(!i.has(s))return!1;return!0}function Te(e,n){const t=e?.theme??M,i=n?.theme??M,a=R(e),r=R(n);return ee(t,i)&&U(e,n,["theme","parseDiffOptions"])&&U(a,r)}function R(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function H(e,n){return e?.start===n?.start&&e?.end===n?.end&&e?.side===n?.side&&e?.endSide===n?.endSide}function ae(){return p({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[I({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function re(e,n){return e.lineNumber===n.lineNumber&&e.side===n.side}var Ie=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;activeLineHighlightSide;activeLineNumberOnly=!1;editorAttached=!1;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,n){this.mode=e,this.options=n}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:t=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),t?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}setEditorAttached(e){this.editorAttached!==e&&(this.editorAttached=e,this.setSelectionDirty(),this.renderSelection())}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,n){const t=!(e===this.selectedRange||H(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.activeLineHighlightSide=n?.activeLineSide,this.activeLineNumberOnly=n?.lineNumberOnly??!1,this.renderSelection(),this.placeUtility(),t&&n?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:n,onLineClick:t,onLineNumberClick:i,onTokenClick:a,onMergeConflictActionClick:r}=this.options;n==null&&t==null&&i==null&&r==null&&a==null||this.options.onGutterUtilityClick!=null&&E(e.composedPath())||(k(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:n="disabled",onLineEnter:t,onLineLeave:i,onTokenEnter:a,onTokenLeave:r,enableGutterUtility:s=!1}=this.options;n==="disabled"&&!s&&t==null&&i==null&&a==null&&r==null||(k(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:n}=this.options;if(k(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){k(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:n}){const{__debugPointerEvents:t}=this.options,i=n.composedPath();k(t,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const a=this.resolvePointerTarget(i);k(t,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",a);const{onLineClick:r,onLineNumberClick:s,onLineEnter:l,onLineLeave:o,onTokenClick:d,onTokenEnter:c,onTokenLeave:m,onHunkExpand:h,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const u=T(a)&&this.hoveredLine?.lineElement===a.lineElement;A(a)&&this.hoveredToken?.tokenElement===a.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,n),this.clearHoveredToken()),A(a)&&(this.setHoveredToken(this.toTokenEventBaseProps(a)),c?.(this.hoveredToken,n))),u||(this.hoveredLine!=null&&(o?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),T(a)?(this.setHoveredLine(this.toEventBaseProps(a)),this.placeUtility(),l?.({...this.hoveredLine,event:n})):this.placeUtility());break}case"click":{if(a==null)break;if(de(a)&&f!=null){f(a);break}if(se(a)&&h!=null){h(a.hunkIndex,a.all||n.shiftKey?"both":a.direction,a.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!T(a))break;A(a)&&d!=null&&d(this.toTokenEventBaseProps(a),n);const u=this.toEventBaseProps(a);s!=null&&a.numberColumn?s({...u,event:n}):r?.({...u,event:n});break}}}syncPointerListeners(e){const{__debugPointerEvents:n,lineHoverHighlight:t="disabled",onLineClick:i,onLineNumberClick:a,onLineEnter:r,onLineLeave:s,onTokenClick:l,onTokenEnter:o,onTokenLeave:d,onHunkExpand:c,onMergeConflictActionClick:m,enableGutterUtility:h=!1,enableLineSelection:f=!1,onGutterUtilityClick:u}=this.options,v=u!=null,b=t!=="disabled"||i!=null||a!=null||r!=null||s!=null||l!=null||o!=null||d!=null||c!=null||m!=null||h||f||v;b&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,k(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const x=[];return(n==="both"||n==="click")&&(i!=null&&x.push("onLineClick"),a!=null&&x.push("onLineNumberClick"),c!=null&&x.push("expandable hunk separators"),m!=null&&x.push("merge conflict actions")),x})()),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!b&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const g=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",y=this.pointerSession.mode==="gutterSelecting";(!f&&g||!v&&y)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:n,enableLineSelection:t=!1}=this.options,i=e!=null,a=n!=null||t;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),a&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!a&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=e.composedPath();E(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:n=!1}=this.options;if(!n)return;const t=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(t==null)return;const{pre:i}=this;if(i==null)return;e.preventDefault();const{lineNumber:a,eventSide:r,lineIndex:s}=t;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const o=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:o?this.selectedRange.start:this.selectedRange.end,side:o?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){const l={lineNumber:a,side:r};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:a,side:r},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;if(t==null)return;const i=this.currentSelectionEnds(),a=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=i?.top??a;a==null||r==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:a},n&&(this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(a.lineNumber,a.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,n===!0&&this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const i={lineNumber:t.lineNumber,side:t.eventSide};if(re(this.pointerSession.pending,i))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,n&&this.updateSelection(i.lineNumber,i.side)),t?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=ie(ae());const t=n.firstElementChild;if(!(t instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(e);w(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const n=this.targetForSelectionPoint(e.bottom);return n==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const n={lineNumber:e.start,side:e.side},t={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(n),a=this.selectionPointRowIndex(t);if(!(i==null||a==null))return i>a?{top:t,bottom:n}:{top:n,bottom:t}}selectionPointRowIndex(e){const n=this.getLineIndex(e.lineNumber,e.side);if(n!=null)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(e){if(this.pre==null)return;const n=this.getLineIndex(e.lineNumber,e.side);if(n==null)return;const t=this.mode==="diff"?`${n[0]},${n[1]}`:`${n[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${t}"]`);for(const a of i){if(!(a instanceof HTMLElement))continue;const r=this.resolvePointerTarget(L(a));if(w(r)&&!(this.mode==="diff"&&e.side!=null&&r.side!==e.side))return r}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,n){const t=this.resolvePointerTarget(e);if(w(t)&&!(n&&!t.numberColumn)&&t.splitLineIndex!=null)return{lineIndex:t.splitLineIndex,lineNumber:t.lineNumber,eventSide:this.mode==="diff"?t.side:void 0}}resolveSelectionInfo(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionInfoFromPath(t,n.requireNumberColumn):void 0}selectionPointFromPath(e){const n=this.resolvePointerTarget(e);if(w(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}resolveSelectionPoint(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionPointFromPath(t):void 0}resolveSelectionPath(e,n){const t=n.excludeUtility!==!1;switch(n.source){case"event-path":return this.pathFromEventPath(e.composedPath(),t);case"coordinates-first":{const i=this.pathFromCoordinates(e,t);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),t)}}}pathFromCoordinates(e,n){const t=this.hitTest(e);if(t!==void 0)return t===null?null:this.pathFromElement(t,n)??null}pathFromEventPath(e,n){if(!(n&&E(e))){for(const t of e)if(t instanceof Element)return this.pathFromElement(t,n)}}pathFromElement(e,n){const t=L(e);if(n&&E(t))return;const i=fe(e);return i!=null?L(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const n=ue(ce(e));if(n==null)return;const t=this.targetForSelectionPoint(n);return t!=null?L(t.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const n=this.pre?.getRootNode(),t=z(n)?n:z(document)?document:void 0;if(t!=null)return t.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,n){const{getLineIndex:t}=this.options;return t!=null?t(e,n):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,n,t=!0){const i=this.getCurrentSelectionRange();let a;if(e==null)a=null;else{const r=this.selectionAnchor?.side??n,s=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(s,e,r,n)}H(i??void 0,a??void 0)||(this.activeLineHighlightSide=void 0,this.activeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=a:(this.selectedRange=a,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),t&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,n){if(this.pre==null)return;const t=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return t!=null&&i!=null?{start:n?t[1]:t[0],end:n?i[1]:i[0]}:void 0}highlightLineNumberOnly(){return this.activeLineHighlightSide!=null?this.activeLineNumberOnly:this.activeLineNumberOnly||this.editorAttached}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const o of e)o.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const t=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,t);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const a=i.start===i.end,r=Math.min(i.start,i.end),s=Math.max(i.start,i.end),l=this.highlightLineNumberOnly();for(const o of n){const d=this.activeLineHighlightSide;if(d!=null&&(d==="additions"&&o.hasAttribute("data-deletions")||d==="deletions"&&o.hasAttribute("data-additions")))continue;const[c,m]=o.children,h=m.children.length;if(h!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let f=0;f<h;f++){const u=m.children[f],v=c.children[f];if(!(u instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const b=this.parseLineIndex(u,t);if((b??0)>s)break;if(b==null||b<r)continue;let g=a?"single":b===r?"first":b===s?"last":"";v.setAttribute("data-selected-line",g),!l&&(u.setAttribute("data-selected-line",g),v.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(a?(g="last",u.setAttribute("data-selected-line","first")):b===r?g="":b===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",g),v.nextSibling.setAttribute("data-selected-line",g)))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,tokenElement:a,tokenText:r}:{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}}buildSelectedLineRange(e,n){return this.buildSelectionRange(e.lineNumber,n.lineNumber,e.side,n.side)}buildSelectionRange(e,n,t,i){return{start:e,end:n,...t!=null?{side:t}:{},...t!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let n=!1,t,i,a,r,s,l,o,d,c,m;for(const f of e){if(!(f instanceof HTMLElement))continue;if(m==null&&f.hasAttribute("data-merge-conflict-action")){const g=f.getAttribute("data-merge-conflict-action")??void 0,y=f.getAttribute("data-merge-conflict-conflict-index")??void 0,x=y!=null?Number.parseInt(y,10):NaN;le(g)&&Number.isFinite(x)&&(m={kind:"merge-conflict-action",resolution:g,conflictIndex:x})}if(l==null&&f.hasAttribute("data-char")){l=f;const g=f.getAttribute("data-char");if(g!=null){const y=Number.parseInt(g,10);if(!Number.isNaN(y)){const x=f.textContent??"",N=y+x.length;(x.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(o={tokenElement:l,lineCharStart:y,lineCharEnd:N,tokenText:x});continue}}}const u=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(u!=null){s=f,c=Number.parseInt(u,10),n=!0,t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}const v=a==null?f.getAttribute("data-line")??void 0:void 0;if(v!=null){a=f,c=Number.parseInt(v,10),t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const b=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&b!=null){const g=Number.parseInt(b,10);Number.isNaN(g)||(d.hunkIndex=g);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(m!=null)return m;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(a??=r!=null?D(i,`[data-line][data-line-index="${r}"]`):void 0,s??=r!=null?D(i,`[data-column-number][data-line-index="${r}"]`):void 0,i==null||a==null||s==null||t==null||c==null||Number.isNaN(c))return;const h=this.parseLineIndex(a,this.isSplitDiff());return o!=null?this.mode==="file"?{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h,...o}:{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h,...o}:this.mode==="file"?{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h}:{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,n){const t=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(n&&t.length===2)return t[1];if(!n)return t[0]}};function Me({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:n,lineHoverHighlight:t,onGutterUtilityClick:i,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,renderGutterUtility:m,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y},x,N,W){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:oe({enableGutterUtility:n,renderGutterUtility:m,onGutterUtilityClick:i}),usesCustomGutterUtility:m!=null,lineHoverHighlight:t,onGutterUtilityClick:i,onHunkExpand:x,onMergeConflictActionClick:W,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y,getLineIndex:N}}function oe({enableGutterUtility:e,renderGutterUtility:n,onGutterUtilityClick:t}){if(t!=null&&n!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function w(e){return e!=null&&"kind"in e&&e.kind==="line"}function A(e){return e!=null&&"kind"in e&&e.kind==="token"}function T(e){return w(e)||A(e)}function se(e){return"type"in e&&e.type==="line-info"}function de(e){return"kind"in e&&e.kind==="merge-conflict-action"}function le(e){return e==="current"||e==="incoming"||e==="both"}function D(e,n){const t=e?.querySelector(n);return t instanceof HTMLElement?t:void 0}function L(e){const n=[];let t=e;for(;t!=null;)n.push(t),t=t.parentNode;return n}function fe(e){const n=e.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const t=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(t instanceof HTMLElement))return;const i=t.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function ce(e){const n=e.closest('[slot^="annotation-"]');if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const t=e.getAttribute("name")??void 0;return t!=null&&t.startsWith("annotation-")?t:void 0}}function ue(e){if(e==null)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(n==null)return;const t=Number.parseInt(n[2],10);if(!(!Number.isFinite(t)||t<=0))return{lineNumber:t,side:n[1]}}function z(e){return e!=null&&typeof e.elementFromPoint=="function"}function F(e,n){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function O(e){const n=e.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function E(e){for(const n of e)if(n instanceof HTMLElement&&(n.hasAttribute("data-utility-button")||n.hasAttribute("data-gutter-utility-slot")||n.getAttribute("slot")==="gutter-utility-slot"||n.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function k(e="none",n,...t){switch(e){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...t)}var Ue=class S{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const n=S.resizeObserver??new ResizeObserver(S.handleSharedResizeEntries);return S.resizeObserver=n,n}static handleSharedResizeEntries(n){const t=new Map;for(const i of n){const a=S.managersByElement.get(i.target);if(a==null)continue;const r=t.get(a);r==null?t.set(a,[i]):r.push(i)}for(const[i,a]of t)i.handleResizeEntries(a)}observedNodes=new Map;setup(n,t){const i=new Set;let a=0;const r=new Map(this.observedNodes);this.observedNodes.clear();for(const s of n.children){if(a===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;a++;let o=r.get(l);if(o!=null&&o.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),o!=null?(this.observedNodes.set(l,o),r.delete(l),o.numberElement!==d?(o.numberElement!=null&&(this.unobserve(o.numberElement),r.delete(o.numberElement)),d!=null&&(this.observe(d),r.delete(d),this.observedNodes.set(d,o)),o.numberElement=d,o.numberWidth=0):o.numberElement!=null?(r.delete(o.numberElement),this.observedNodes.set(o.numberElement,o)):o.numberWidth=0):(o={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,o),this.observe(l),d!=null&&(this.observedNodes.set(d,o),this.observe(d)))}if(a>1&&!t){const s=n.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const o of s){if(!(o instanceof HTMLElement))continue;const d=o.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:o});continue}let c=l.get(d);c==null&&(c=[],l.set(d,c)),c.push(o)}for(const[o,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",o,d);continue}const[c,m]=d,h=c.firstElementChild,f=m.firstElementChild;if(!(c instanceof HTMLElement)||!(m instanceof HTMLElement)||!(h instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let u=r.get(h);if(u!=null){this.observedNodes.set(h,u),this.observedNodes.set(f,u),r.delete(h),r.delete(f);continue}const v=h.getBoundingClientRect().height,b=f.getBoundingClientRect().height;u={type:"annotations",column1:{container:c,child:h,childHeight:v},column2:{container:m,child:f,childHeight:b},currentHeight:"auto"},i.add({child1:h,child2:f,item:u,newHeight:Math.max(v,b)})}for(const o of i)this.applyNewHeight(o.item,o.newHeight),this.observedNodes.set(o.child1,o.item),this.observedNodes.set(o.child2,o.item),this.observe(o.child1),this.observe(o.child2);i.clear()}for(const[s,l]of r)this.unobserve(s),l.type==="code"?ge(l):pe(l);r.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(n){const{managersByElement:t}=S,i=t.get(n);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");t.set(n,this),S.getResizeObserver().observe(n)}}unobserve(n){const{managersByElement:t,resizeObserver:i}=S,a=t.get(n);if(a!=null){if(a!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");t.delete(n),i?.unobserve(n),i!=null&&t.size===0&&(i.disconnect(),S.resizeObserver=void 0)}}handleResizeEntries(n){const t=new Map,i=new Set;for(const a of n){const{target:r,borderBoxSize:s,contentBoxSize:l}=a;if(!(r instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",a);continue}const o=this.observedNodes.get(r);if(o==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",a);continue}if(o.type==="annotations"){const d=(()=>{if(r===o.column1.child)return o.column1;if(r===o.column2.child)return o.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:o,target:r});continue}d.childHeight=s[0].blockSize,i.add(o)}else if(o.type==="code"){const d=t.get(o)??{},c=l[0].inlineSize;r===o.codeElement?d.codeInlineSize=c:r===o.numberElement&&(d.numberInlineSize=c),t.set(o,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(n){for(const t of n)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=n=>{for(const[t,i]of n){const a=i.codeInlineSize!=null?he(i.codeInlineSize):t.codeWidth,r=i.numberInlineSize!=null?me(i.numberInlineSize):t.numberWidth,s=a!==t.codeWidth,l=r!==t.numberWidth;if(!(!s&&!l)&&(t.codeWidth=a,t.numberWidth=r,s&&t.codeElement.style.setProperty("--diffs-column-width",`${typeof a=="number"?`${a}px`:"auto"}`),l&&t.codeElement.style.setProperty("--diffs-column-number-width",`${r===0?"auto":`${r}px`}`),s||l&&a!=="auto")){const o=typeof a=="number"?Math.max(a-r,0):0;t.codeElement.style.setProperty("--diffs-column-content-width",`${o>0?`${o}px`:"auto"}`)}}};applyNewHeight(n,t){t!==n.currentHeight&&(n.currentHeight=Math.max(t,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function he(e){const n=Math.max(Math.floor(e),0);return n===0?"auto":n}function me(e){return Math.max(Math.ceil(e),0)}function ge(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function pe(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function Re(e){for(const n of Array.isArray(e)?e:[e])if(!(n==="text"||n==="ansi")&&!ne.has(n))return!1;return!0}function He(e){for(const n of G(e))if(!te.has(n))return!1;return!0}function De(e,n){return e==null||n==null?e===n:e.startingLine===n.startingLine&&e.totalLines===n.totalLines&&e.bufferBefore===n.bufferBefore&&e.bufferAfter===n.bufferAfter}function ze(e){return p({tagName:"div",children:[p({tagName:"div",children:e.annotations?.map(n=>p({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function be(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Fe({fileOrDiff:e,mode:n,stickyHeader:t}){const i="type"in e?e:void 0,a={"data-diffs-header":n,"data-change-type":i?.type,"data-sticky":t?"":void 0};return p({tagName:"div",children:[n==="custom"?p({tagName:"slot",properties:{name:V}}):ve({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...n==="custom"?[]:[xe(i)]],properties:a})}function ve({name:e,prevName:n,iconType:t}){const i=[p({tagName:"slot",properties:{name:Y}}),I({name:be(t),properties:{"data-change-icon":t}})];return n!=null&&(i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(n)]})],properties:{"data-prev-name":""}})),i.push(I({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(e)]})],properties:{"data-title":""}})),i.push(p({tagName:"slot",properties:{name:X}})),p({tagName:"div",children:i,properties:{"data-header-content":""}})}function xe(e){const n=[];if(e!=null){let t=0,i=0;for(const a of e.hunks)t+=a.additionLines,i+=a.deletionLines;(i>0||t===0)&&n.push(p({tagName:"span",children:[C(`-${i}`)],properties:{"data-deletions-count":""}})),(t>0||i===0)&&n.push(p({tagName:"span",children:[C(`+${t}`)],properties:{"data-additions-count":""}}))}return n.push(p({tagName:"slot",properties:{name:j}})),p({tagName:"div",children:n,properties:{"data-metadata":""}})}function Oe(e){return p({tagName:"pre",properties:ye(e)})}function ye({diffIndicators:e,disableBackground:n,disableLineNumbers:t,overflow:i,split:a,totalLines:r,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?a?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":t?"":void 0,"data-background":n?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${r}`.length}ch;`}}function Be(e,{theme:n,preferredHighlighter:t="shiki-js"}){return{langs:[e??"text"],themes:G(n),preferredHighlighter:t}}function $e(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}const Ge="-1,-1";function _e(e){return e?.some(n=>n.lineNumber===0)??!1}function qe(e){const n=e[0];return n!=null&&n.length>0?n:void 0}function We(e){return e.startingLine===0&&e.totalLines>0}function Ve(e,n){return p({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function Ye(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const Xe=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
1
+ import{da as M,dR as V,dS as Y,dT as j,dU as K,es as X,et as J,eu as $,ev as Q,dW as Z}from"./SessionSwitcherDropdown-DROjbyIu.js";import{b as ee,m as p,x as I,A as ne,a as G,y as te,z as C}from"./computeVirtualFileMetrics-C7vXPUYT.js";import{t as ie}from"./vendor-hast-util-to-html-BKBhbTDb.js";function U(e,n,t){if(e===n||e==null||n==null)return e===n;const i=new Set(t),a=Object.keys(e),r=new Set(Object.keys(n));for(const s of a)if(r.delete(s),!i.has(s)&&(!(s in n)||e[s]!==n[s]))return!1;for(const s of Array.from(r))if(!i.has(s))return!1;return!0}function Te(e,n){const t=e?.theme??M,i=n?.theme??M,a=R(e),r=R(n);return ee(t,i)&&U(e,n,["theme","parseDiffOptions"])&&U(a,r)}function R(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function H(e,n){return e?.start===n?.start&&e?.end===n?.end&&e?.side===n?.side&&e?.endSide===n?.endSide}function ae(){return p({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[I({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function re(e,n){return e.lineNumber===n.lineNumber&&e.side===n.side}var Ie=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;activeLineHighlightSide;activeLineNumberOnly=!1;editorAttached=!1;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,n){this.mode=e,this.options=n}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:t=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),t?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}setEditorAttached(e){this.editorAttached!==e&&(this.editorAttached=e,this.setSelectionDirty(),this.renderSelection())}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,n){const t=!(e===this.selectedRange||H(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.activeLineHighlightSide=n?.activeLineSide,this.activeLineNumberOnly=n?.lineNumberOnly??!1,this.renderSelection(),this.placeUtility(),t&&n?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:n,onLineClick:t,onLineNumberClick:i,onTokenClick:a,onMergeConflictActionClick:r}=this.options;n==null&&t==null&&i==null&&r==null&&a==null||this.options.onGutterUtilityClick!=null&&E(e.composedPath())||(k(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:n="disabled",onLineEnter:t,onLineLeave:i,onTokenEnter:a,onTokenLeave:r,enableGutterUtility:s=!1}=this.options;n==="disabled"&&!s&&t==null&&i==null&&a==null&&r==null||(k(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:n}=this.options;if(k(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){k(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:n}){const{__debugPointerEvents:t}=this.options,i=n.composedPath();k(t,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const a=this.resolvePointerTarget(i);k(t,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",a);const{onLineClick:r,onLineNumberClick:s,onLineEnter:l,onLineLeave:o,onTokenClick:d,onTokenEnter:c,onTokenLeave:m,onHunkExpand:h,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const u=T(a)&&this.hoveredLine?.lineElement===a.lineElement;A(a)&&this.hoveredToken?.tokenElement===a.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,n),this.clearHoveredToken()),A(a)&&(this.setHoveredToken(this.toTokenEventBaseProps(a)),c?.(this.hoveredToken,n))),u||(this.hoveredLine!=null&&(o?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),T(a)?(this.setHoveredLine(this.toEventBaseProps(a)),this.placeUtility(),l?.({...this.hoveredLine,event:n})):this.placeUtility());break}case"click":{if(a==null)break;if(de(a)&&f!=null){f(a);break}if(se(a)&&h!=null){h(a.hunkIndex,a.all||n.shiftKey?"both":a.direction,a.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!T(a))break;A(a)&&d!=null&&d(this.toTokenEventBaseProps(a),n);const u=this.toEventBaseProps(a);s!=null&&a.numberColumn?s({...u,event:n}):r?.({...u,event:n});break}}}syncPointerListeners(e){const{__debugPointerEvents:n,lineHoverHighlight:t="disabled",onLineClick:i,onLineNumberClick:a,onLineEnter:r,onLineLeave:s,onTokenClick:l,onTokenEnter:o,onTokenLeave:d,onHunkExpand:c,onMergeConflictActionClick:m,enableGutterUtility:h=!1,enableLineSelection:f=!1,onGutterUtilityClick:u}=this.options,v=u!=null,b=t!=="disabled"||i!=null||a!=null||r!=null||s!=null||l!=null||o!=null||d!=null||c!=null||m!=null||h||f||v;b&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,k(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const x=[];return(n==="both"||n==="click")&&(i!=null&&x.push("onLineClick"),a!=null&&x.push("onLineNumberClick"),c!=null&&x.push("expandable hunk separators"),m!=null&&x.push("merge conflict actions")),x})()),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!b&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const g=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",y=this.pointerSession.mode==="gutterSelecting";(!f&&g||!v&&y)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:n,enableLineSelection:t=!1}=this.options,i=e!=null,a=n!=null||t;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),a&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!a&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=e.composedPath();E(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:n=!1}=this.options;if(!n)return;const t=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(t==null)return;const{pre:i}=this;if(i==null)return;e.preventDefault();const{lineNumber:a,eventSide:r,lineIndex:s}=t;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const o=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:o?this.selectedRange.start:this.selectedRange.end,side:o?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){const l={lineNumber:a,side:r};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:a,side:r},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;if(t==null)return;const i=this.currentSelectionEnds(),a=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=i?.top??a;a==null||r==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:a},n&&(this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(a.lineNumber,a.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,n===!0&&this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const i={lineNumber:t.lineNumber,side:t.eventSide};if(re(this.pointerSession.pending,i))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,n&&this.updateSelection(i.lineNumber,i.side)),t?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=ie(ae());const t=n.firstElementChild;if(!(t instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(e);w(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const n=this.targetForSelectionPoint(e.bottom);return n==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const n={lineNumber:e.start,side:e.side},t={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(n),a=this.selectionPointRowIndex(t);if(!(i==null||a==null))return i>a?{top:t,bottom:n}:{top:n,bottom:t}}selectionPointRowIndex(e){const n=this.getLineIndex(e.lineNumber,e.side);if(n!=null)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(e){if(this.pre==null)return;const n=this.getLineIndex(e.lineNumber,e.side);if(n==null)return;const t=this.mode==="diff"?`${n[0]},${n[1]}`:`${n[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${t}"]`);for(const a of i){if(!(a instanceof HTMLElement))continue;const r=this.resolvePointerTarget(L(a));if(w(r)&&!(this.mode==="diff"&&e.side!=null&&r.side!==e.side))return r}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,n){const t=this.resolvePointerTarget(e);if(w(t)&&!(n&&!t.numberColumn)&&t.splitLineIndex!=null)return{lineIndex:t.splitLineIndex,lineNumber:t.lineNumber,eventSide:this.mode==="diff"?t.side:void 0}}resolveSelectionInfo(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionInfoFromPath(t,n.requireNumberColumn):void 0}selectionPointFromPath(e){const n=this.resolvePointerTarget(e);if(w(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}resolveSelectionPoint(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionPointFromPath(t):void 0}resolveSelectionPath(e,n){const t=n.excludeUtility!==!1;switch(n.source){case"event-path":return this.pathFromEventPath(e.composedPath(),t);case"coordinates-first":{const i=this.pathFromCoordinates(e,t);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),t)}}}pathFromCoordinates(e,n){const t=this.hitTest(e);if(t!==void 0)return t===null?null:this.pathFromElement(t,n)??null}pathFromEventPath(e,n){if(!(n&&E(e))){for(const t of e)if(t instanceof Element)return this.pathFromElement(t,n)}}pathFromElement(e,n){const t=L(e);if(n&&E(t))return;const i=fe(e);return i!=null?L(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const n=ue(ce(e));if(n==null)return;const t=this.targetForSelectionPoint(n);return t!=null?L(t.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const n=this.pre?.getRootNode(),t=z(n)?n:z(document)?document:void 0;if(t!=null)return t.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,n){const{getLineIndex:t}=this.options;return t!=null?t(e,n):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,n,t=!0){const i=this.getCurrentSelectionRange();let a;if(e==null)a=null;else{const r=this.selectionAnchor?.side??n,s=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(s,e,r,n)}H(i??void 0,a??void 0)||(this.activeLineHighlightSide=void 0,this.activeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=a:(this.selectedRange=a,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),t&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,n){if(this.pre==null)return;const t=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return t!=null&&i!=null?{start:n?t[1]:t[0],end:n?i[1]:i[0]}:void 0}highlightLineNumberOnly(){return this.activeLineHighlightSide!=null?this.activeLineNumberOnly:this.activeLineNumberOnly||this.editorAttached}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const o of e)o.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const t=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,t);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const a=i.start===i.end,r=Math.min(i.start,i.end),s=Math.max(i.start,i.end),l=this.highlightLineNumberOnly();for(const o of n){const d=this.activeLineHighlightSide;if(d!=null&&(d==="additions"&&o.hasAttribute("data-deletions")||d==="deletions"&&o.hasAttribute("data-additions")))continue;const[c,m]=o.children,h=m.children.length;if(h!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let f=0;f<h;f++){const u=m.children[f],v=c.children[f];if(!(u instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const b=this.parseLineIndex(u,t);if((b??0)>s)break;if(b==null||b<r)continue;let g=a?"single":b===r?"first":b===s?"last":"";v.setAttribute("data-selected-line",g),!l&&(u.setAttribute("data-selected-line",g),v.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(a?(g="last",u.setAttribute("data-selected-line","first")):b===r?g="":b===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",g),v.nextSibling.setAttribute("data-selected-line",g)))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,tokenElement:a,tokenText:r}:{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}}buildSelectedLineRange(e,n){return this.buildSelectionRange(e.lineNumber,n.lineNumber,e.side,n.side)}buildSelectionRange(e,n,t,i){return{start:e,end:n,...t!=null?{side:t}:{},...t!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let n=!1,t,i,a,r,s,l,o,d,c,m;for(const f of e){if(!(f instanceof HTMLElement))continue;if(m==null&&f.hasAttribute("data-merge-conflict-action")){const g=f.getAttribute("data-merge-conflict-action")??void 0,y=f.getAttribute("data-merge-conflict-conflict-index")??void 0,x=y!=null?Number.parseInt(y,10):NaN;le(g)&&Number.isFinite(x)&&(m={kind:"merge-conflict-action",resolution:g,conflictIndex:x})}if(l==null&&f.hasAttribute("data-char")){l=f;const g=f.getAttribute("data-char");if(g!=null){const y=Number.parseInt(g,10);if(!Number.isNaN(y)){const x=f.textContent??"",N=y+x.length;(x.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(o={tokenElement:l,lineCharStart:y,lineCharEnd:N,tokenText:x});continue}}}const u=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(u!=null){s=f,c=Number.parseInt(u,10),n=!0,t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}const v=a==null?f.getAttribute("data-line")??void 0:void 0;if(v!=null){a=f,c=Number.parseInt(v,10),t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const b=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&b!=null){const g=Number.parseInt(b,10);Number.isNaN(g)||(d.hunkIndex=g);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(m!=null)return m;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(a??=r!=null?D(i,`[data-line][data-line-index="${r}"]`):void 0,s??=r!=null?D(i,`[data-column-number][data-line-index="${r}"]`):void 0,i==null||a==null||s==null||t==null||c==null||Number.isNaN(c))return;const h=this.parseLineIndex(a,this.isSplitDiff());return o!=null?this.mode==="file"?{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h,...o}:{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h,...o}:this.mode==="file"?{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h}:{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,n){const t=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(n&&t.length===2)return t[1];if(!n)return t[0]}};function Me({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:n,lineHoverHighlight:t,onGutterUtilityClick:i,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,renderGutterUtility:m,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y},x,N,W){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:oe({enableGutterUtility:n,renderGutterUtility:m,onGutterUtilityClick:i}),usesCustomGutterUtility:m!=null,lineHoverHighlight:t,onGutterUtilityClick:i,onHunkExpand:x,onMergeConflictActionClick:W,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y,getLineIndex:N}}function oe({enableGutterUtility:e,renderGutterUtility:n,onGutterUtilityClick:t}){if(t!=null&&n!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function w(e){return e!=null&&"kind"in e&&e.kind==="line"}function A(e){return e!=null&&"kind"in e&&e.kind==="token"}function T(e){return w(e)||A(e)}function se(e){return"type"in e&&e.type==="line-info"}function de(e){return"kind"in e&&e.kind==="merge-conflict-action"}function le(e){return e==="current"||e==="incoming"||e==="both"}function D(e,n){const t=e?.querySelector(n);return t instanceof HTMLElement?t:void 0}function L(e){const n=[];let t=e;for(;t!=null;)n.push(t),t=t.parentNode;return n}function fe(e){const n=e.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const t=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(t instanceof HTMLElement))return;const i=t.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function ce(e){const n=e.closest('[slot^="annotation-"]');if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const t=e.getAttribute("name")??void 0;return t!=null&&t.startsWith("annotation-")?t:void 0}}function ue(e){if(e==null)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(n==null)return;const t=Number.parseInt(n[2],10);if(!(!Number.isFinite(t)||t<=0))return{lineNumber:t,side:n[1]}}function z(e){return e!=null&&typeof e.elementFromPoint=="function"}function F(e,n){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function O(e){const n=e.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function E(e){for(const n of e)if(n instanceof HTMLElement&&(n.hasAttribute("data-utility-button")||n.hasAttribute("data-gutter-utility-slot")||n.getAttribute("slot")==="gutter-utility-slot"||n.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function k(e="none",n,...t){switch(e){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...t)}var Ue=class S{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const n=S.resizeObserver??new ResizeObserver(S.handleSharedResizeEntries);return S.resizeObserver=n,n}static handleSharedResizeEntries(n){const t=new Map;for(const i of n){const a=S.managersByElement.get(i.target);if(a==null)continue;const r=t.get(a);r==null?t.set(a,[i]):r.push(i)}for(const[i,a]of t)i.handleResizeEntries(a)}observedNodes=new Map;setup(n,t){const i=new Set;let a=0;const r=new Map(this.observedNodes);this.observedNodes.clear();for(const s of n.children){if(a===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;a++;let o=r.get(l);if(o!=null&&o.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),o!=null?(this.observedNodes.set(l,o),r.delete(l),o.numberElement!==d?(o.numberElement!=null&&(this.unobserve(o.numberElement),r.delete(o.numberElement)),d!=null&&(this.observe(d),r.delete(d),this.observedNodes.set(d,o)),o.numberElement=d,o.numberWidth=0):o.numberElement!=null?(r.delete(o.numberElement),this.observedNodes.set(o.numberElement,o)):o.numberWidth=0):(o={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,o),this.observe(l),d!=null&&(this.observedNodes.set(d,o),this.observe(d)))}if(a>1&&!t){const s=n.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const o of s){if(!(o instanceof HTMLElement))continue;const d=o.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:o});continue}let c=l.get(d);c==null&&(c=[],l.set(d,c)),c.push(o)}for(const[o,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",o,d);continue}const[c,m]=d,h=c.firstElementChild,f=m.firstElementChild;if(!(c instanceof HTMLElement)||!(m instanceof HTMLElement)||!(h instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let u=r.get(h);if(u!=null){this.observedNodes.set(h,u),this.observedNodes.set(f,u),r.delete(h),r.delete(f);continue}const v=h.getBoundingClientRect().height,b=f.getBoundingClientRect().height;u={type:"annotations",column1:{container:c,child:h,childHeight:v},column2:{container:m,child:f,childHeight:b},currentHeight:"auto"},i.add({child1:h,child2:f,item:u,newHeight:Math.max(v,b)})}for(const o of i)this.applyNewHeight(o.item,o.newHeight),this.observedNodes.set(o.child1,o.item),this.observedNodes.set(o.child2,o.item),this.observe(o.child1),this.observe(o.child2);i.clear()}for(const[s,l]of r)this.unobserve(s),l.type==="code"?ge(l):pe(l);r.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(n){const{managersByElement:t}=S,i=t.get(n);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");t.set(n,this),S.getResizeObserver().observe(n)}}unobserve(n){const{managersByElement:t,resizeObserver:i}=S,a=t.get(n);if(a!=null){if(a!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");t.delete(n),i?.unobserve(n),i!=null&&t.size===0&&(i.disconnect(),S.resizeObserver=void 0)}}handleResizeEntries(n){const t=new Map,i=new Set;for(const a of n){const{target:r,borderBoxSize:s,contentBoxSize:l}=a;if(!(r instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",a);continue}const o=this.observedNodes.get(r);if(o==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",a);continue}if(o.type==="annotations"){const d=(()=>{if(r===o.column1.child)return o.column1;if(r===o.column2.child)return o.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:o,target:r});continue}d.childHeight=s[0].blockSize,i.add(o)}else if(o.type==="code"){const d=t.get(o)??{},c=l[0].inlineSize;r===o.codeElement?d.codeInlineSize=c:r===o.numberElement&&(d.numberInlineSize=c),t.set(o,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(n){for(const t of n)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=n=>{for(const[t,i]of n){const a=i.codeInlineSize!=null?he(i.codeInlineSize):t.codeWidth,r=i.numberInlineSize!=null?me(i.numberInlineSize):t.numberWidth,s=a!==t.codeWidth,l=r!==t.numberWidth;if(!(!s&&!l)&&(t.codeWidth=a,t.numberWidth=r,s&&t.codeElement.style.setProperty("--diffs-column-width",`${typeof a=="number"?`${a}px`:"auto"}`),l&&t.codeElement.style.setProperty("--diffs-column-number-width",`${r===0?"auto":`${r}px`}`),s||l&&a!=="auto")){const o=typeof a=="number"?Math.max(a-r,0):0;t.codeElement.style.setProperty("--diffs-column-content-width",`${o>0?`${o}px`:"auto"}`)}}};applyNewHeight(n,t){t!==n.currentHeight&&(n.currentHeight=Math.max(t,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function he(e){const n=Math.max(Math.floor(e),0);return n===0?"auto":n}function me(e){return Math.max(Math.ceil(e),0)}function ge(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function pe(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function Re(e){for(const n of Array.isArray(e)?e:[e])if(!(n==="text"||n==="ansi")&&!ne.has(n))return!1;return!0}function He(e){for(const n of G(e))if(!te.has(n))return!1;return!0}function De(e,n){return e==null||n==null?e===n:e.startingLine===n.startingLine&&e.totalLines===n.totalLines&&e.bufferBefore===n.bufferBefore&&e.bufferAfter===n.bufferAfter}function ze(e){return p({tagName:"div",children:[p({tagName:"div",children:e.annotations?.map(n=>p({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function be(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Fe({fileOrDiff:e,mode:n,stickyHeader:t}){const i="type"in e?e:void 0,a={"data-diffs-header":n,"data-change-type":i?.type,"data-sticky":t?"":void 0};return p({tagName:"div",children:[n==="custom"?p({tagName:"slot",properties:{name:V}}):ve({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...n==="custom"?[]:[xe(i)]],properties:a})}function ve({name:e,prevName:n,iconType:t}){const i=[p({tagName:"slot",properties:{name:Y}}),I({name:be(t),properties:{"data-change-icon":t}})];return n!=null&&(i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(n)]})],properties:{"data-prev-name":""}})),i.push(I({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(e)]})],properties:{"data-title":""}})),i.push(p({tagName:"slot",properties:{name:j}})),p({tagName:"div",children:i,properties:{"data-header-content":""}})}function xe(e){const n=[];if(e!=null){let t=0,i=0;for(const a of e.hunks)t+=a.additionLines,i+=a.deletionLines;(i>0||t===0)&&n.push(p({tagName:"span",children:[C(`-${i}`)],properties:{"data-deletions-count":""}})),(t>0||i===0)&&n.push(p({tagName:"span",children:[C(`+${t}`)],properties:{"data-additions-count":""}}))}return n.push(p({tagName:"slot",properties:{name:K}})),p({tagName:"div",children:n,properties:{"data-metadata":""}})}function Oe(e){return p({tagName:"pre",properties:ye(e)})}function ye({diffIndicators:e,disableBackground:n,disableLineNumbers:t,overflow:i,split:a,totalLines:r,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?a?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":t?"":void 0,"data-background":n?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${r}`.length}ch;`}}function Be(e,{theme:n,preferredHighlighter:t="shiki-js"}){return{langs:[e??"text"],themes:G(n),preferredHighlighter:t}}function $e(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}const Ge="-1,-1";function _e(e){return e?.some(n=>n.lineNumber===0)??!1}function qe(e){const n=e[0];return n!=null&&n.length>0?n:void 0}function We(e){return e.startingLine===0&&e.totalLines>0}function Ve(e,n){return p({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function Ye(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const je=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
2
2
  <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
3
3
  <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
4
4
  </symbol>
@@ -50,7 +50,7 @@ import{df as M,dW as V,dX as Y,dY as X,dZ as j,ex as K,ey as Z,ez as $,eA as J,d
50
50
  <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
51
51
  <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
52
52
  </symbol>
53
- </svg>`;function je(e,n){return e==null||n==null?e===n:ke(e.customProperties,n.customProperties)&&e.type===n.type&&e.diffIndicators===n.diffIndicators&&e.disableBackground===n.disableBackground&&e.disableLineNumbers===n.disableLineNumbers&&e.overflow===n.overflow&&e.split===n.split&&e.totalLines===n.totalLines}const B={};function ke(e=B,n=B){if(e===n)return!0;const t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;for(const a of t)if(e[a]!==n[a])return!1;return!0}function Ke(e){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=e,n.style.whiteSpace="normal",n}function Ze(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function Je(){const e=document.createElement("style");return e.setAttribute(K,""),e}var Se=`@layer base {
53
+ </svg>`;function Ke(e,n){return e==null||n==null?e===n:ke(e.customProperties,n.customProperties)&&e.type===n.type&&e.diffIndicators===n.diffIndicators&&e.disableBackground===n.disableBackground&&e.disableLineNumbers===n.disableLineNumbers&&e.overflow===n.overflow&&e.split===n.split&&e.totalLines===n.totalLines}const B={};function ke(e=B,n=B){if(e===n)return!0;const t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;for(const a of t)if(e[a]!==n[a])return!1;return!0}function Xe(e){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=e,n.style.whiteSpace="normal",n}function Je(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function Qe(){const e=document.createElement("style");return e.setAttribute(X,""),e}var Se=`@layer base {
54
54
  :host {
55
55
  --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
56
56
  "Courier New", monospace;
@@ -1377,7 +1377,7 @@ import{df as M,dW as V,dX as Y,dY as X,dZ as j,ex as K,ey as Z,ez as $,eA as J,d
1377
1377
  }
1378
1378
 
1379
1379
  @layer theme, rendered, unsafe;
1380
- `;let P;function we(e){if(P!=null)return P;const n=e.host;if(typeof HTMLElement<"u"&&n instanceof HTMLElement&&!n.isConnected)return;const t=document.createElement("div");t.setAttribute("data-code",""),t.setAttribute(Z,"true");const i=document.createElement("div");return i.style.position="relative",i.style.width="200%",i.style.height="200%",t.appendChild(i),e.appendChild(t),P=Math.max(t.offsetHeight-t.clientHeight,0),t.remove(),P}function _(e){return`${$}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const q="@layer base, theme, rendered, unsafe;",Le=new RegExp(`${Ee($)}\\s*:\\s*[^;]+;`);function Qe(e){return`${q}
1380
+ `;let P;function we(e){if(P!=null)return P;const n=e.host;if(typeof HTMLElement<"u"&&n instanceof HTMLElement&&!n.isConnected)return;const t=document.createElement("div");t.setAttribute("data-code",""),t.setAttribute(J,"true");const i=document.createElement("div");return i.style.position="relative",i.style.width="200%",i.style.height="200%",t.appendChild(i),e.appendChild(t),P=Math.max(t.offsetHeight-t.clientHeight,0),t.remove(),P}function _(e){return`${$}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const q="@layer base, theme, rendered, unsafe;",Le=new RegExp(`${Ee($)}\\s*:\\s*[^;]+;`);function Ze(e){return`${q}
1381
1381
  @layer unsafe {
1382
1382
  ${e}
1383
1383
  }`}function en(e,n="system",t){return`${q}
@@ -1387,4 +1387,4 @@ import{df as M,dW as V,dX as Y,dY as X,dZ as j,ex as K,ey as Z,ez as $,eA as J,d
1387
1387
  ${_(t)}
1388
1388
  ${e}
1389
1389
  }
1390
- }`}function nn(e,n){const t=_(n);return e.replace(Le,t)}function Ee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tn({code:e,pre:n,columnType:t,rowSpan:i,containerSize:a=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),t!=null&&e.setAttribute(`data-${t}`,""),n?.appendChild(e)),i!=null?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),a?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function an(e,n){if(n==null)return;const t=e.shadowRoot??e.attachShadow({mode:"open"});t.innerHTML===""&&(t.innerHTML=n)}function rn(e,{type:n,diffIndicators:t,disableBackground:i,disableLineNumbers:a,overflow:r,split:s,totalLines:l,customProperties:o}){if(o!=null)for(const d in o){const c=o[d];c!=null&&e.setAttribute(d,`${c}`)}switch(n==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),t){case"bars":case"classic":e.setAttribute("data-indicators",t);break;case"none":e.removeAttribute("data-indicators");break}return a?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),n==="diff"?e.setAttribute("data-diff-type",s?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",r),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${l}`.length}ch`),e}function on(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const n=e.tagName??e.nodeName;return typeof n=="string"&&n.toLowerCase()==="style"}function sn({shadowRoot:e,currentNode:n,themeCSS:t}){if(t.trim()===""){n?.remove();return}return n??=Pe(),n.textContent=t,n.parentNode!==e&&e.appendChild(n),n}function Pe(){const e=document.createElement("style");return e.setAttribute(J,""),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class n extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const i=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(Se)),i.adoptedStyleSheets=[e]}connectedCallback(){we(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(Q,n)}export{U as A,Te as B,_e as C,Ge as F,Ie as I,Ue as R,Xe as S,He as a,De as b,Re as c,We as d,ze as e,$e as f,qe as g,Fe as h,Ve as i,Be as j,Oe as k,an as l,Ke as m,Ze as n,Je as o,Me as p,we as q,en as r,Ye as s,nn as t,sn as u,tn as v,Qe as w,on as x,je as y,rn as z};
1390
+ }`}function nn(e,n){const t=_(n);return e.replace(Le,t)}function Ee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tn({code:e,pre:n,columnType:t,rowSpan:i,containerSize:a=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),t!=null&&e.setAttribute(`data-${t}`,""),n?.appendChild(e)),i!=null?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),a?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function an(e,n){if(n==null)return;const t=e.shadowRoot??e.attachShadow({mode:"open"});t.innerHTML===""&&(t.innerHTML=n)}function rn(e,{type:n,diffIndicators:t,disableBackground:i,disableLineNumbers:a,overflow:r,split:s,totalLines:l,customProperties:o}){if(o!=null)for(const d in o){const c=o[d];c!=null&&e.setAttribute(d,`${c}`)}switch(n==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),t){case"bars":case"classic":e.setAttribute("data-indicators",t);break;case"none":e.removeAttribute("data-indicators");break}return a?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),n==="diff"?e.setAttribute("data-diff-type",s?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",r),e.tabIndex=0,e.style.setProperty("--diffs-min-number-column-width-default",`${`${l}`.length}ch`),e}function on(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const n=e.tagName??e.nodeName;return typeof n=="string"&&n.toLowerCase()==="style"}function sn({shadowRoot:e,currentNode:n,themeCSS:t}){if(t.trim()===""){n?.remove();return}return n??=Pe(),n.textContent=t,n.parentNode!==e&&e.appendChild(n),n}function Pe(){const e=document.createElement("style");return e.setAttribute(Q,""),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class n extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const i=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(Se)),i.adoptedStyleSheets=[e]}connectedCallback(){we(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(Z,n)}export{U as A,Te as B,_e as C,Ge as F,Ie as I,Ue as R,je as S,He as a,De as b,Re as c,We as d,ze as e,$e as f,qe as g,Fe as h,Ve as i,Be as j,Oe as k,an as l,Xe as m,Je as n,Qe as o,Me as p,we as q,en as r,Ye as s,nn as t,sn as u,tn as v,Ze as w,on as x,Ke as y,rn as z};
package/dist/index.html CHANGED
@@ -540,13 +540,13 @@
540
540
  }
541
541
  }
542
542
  </style>
543
- <script type="module" crossorigin src="/assets/main-CHQfoyRP.js"></script>
543
+ <script type="module" crossorigin src="/assets/main-BVWtJYSk.js"></script>
544
544
  <link rel="modulepreload" crossorigin href="/assets/vendor-vite-runtime-DD1OZmLC.js">
545
545
  <link rel="modulepreload" crossorigin href="/assets/vendor-scheduler-7OC5HNn7.js">
546
546
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-DYyjh7Q0.js">
547
547
  <link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CnsBKjP5.js">
548
- <link rel="modulepreload" crossorigin href="/assets/index-8TL2HlaR.js">
549
- <link rel="modulepreload" crossorigin href="/assets/runtimeSurface-CkdOpqo7.js">
548
+ <link rel="modulepreload" crossorigin href="/assets/index-BAqpUCjs.js">
549
+ <link rel="modulepreload" crossorigin href="/assets/runtimeSurface-CkHYYg0E.js">
550
550
  <link rel="modulepreload" crossorigin href="/assets/vendor-katex-CHD9BdDO.js">
551
551
  <link rel="stylesheet" crossorigin href="/assets/index-riABQmQ_.css">
552
552
  <link rel="stylesheet" crossorigin href="/assets/vendor-katex-Cp579UoJ.css">
@@ -89,12 +89,12 @@
89
89
  }
90
90
  </style>
91
91
 
92
- <script type="module" crossorigin src="/assets/miniChat-3QtCNwHl.js"></script>
92
+ <script type="module" crossorigin src="/assets/miniChat-BrbRq5NQ.js"></script>
93
93
  <link rel="modulepreload" crossorigin href="/assets/vendor-vite-runtime-DD1OZmLC.js">
94
94
  <link rel="modulepreload" crossorigin href="/assets/vendor-scheduler-7OC5HNn7.js">
95
95
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-DYyjh7Q0.js">
96
96
  <link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CnsBKjP5.js">
97
- <link rel="modulepreload" crossorigin href="/assets/index-8TL2HlaR.js">
97
+ <link rel="modulepreload" crossorigin href="/assets/index-BAqpUCjs.js">
98
98
  <link rel="modulepreload" crossorigin href="/assets/vendor-katex-CHD9BdDO.js">
99
99
  <link rel="stylesheet" crossorigin href="/assets/index-riABQmQ_.css">
100
100
  <link rel="stylesheet" crossorigin href="/assets/vendor-katex-Cp579UoJ.css">