getgloss 0.15.0 → 0.15.1

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.
@@ -308,11 +308,11 @@ Error generating stack: `+l.message+`
308
308
  * See the LICENSE file in the root directory of this source tree.
309
309
  */const gm=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ui=Se("x",gm);function Oi(a){return a.kind===void 0||a.kind==="line"}function Li(a,u={}){const f=Math.min(a.startLine,a.endLine),r=Math.max(a.startLine,a.endLine);if(f===r)return`${a.side}${f}`;const h=u.repeatSideOnEnd===!1?"":a.side;return`${a.side}${f}-${h}${r}`}function vm(a,u=[]){const f=(a==null?void 0:a.comments)??[],r=new Set(u.map(y=>y.commentId)),h=f.filter(y=>r.has(y.id)).length;return{total:f.length,resolved:h,open:f.length-h}}function n1(a){var u;return vm(a.feedback,((u=a.resolution)==null?void 0:u.comments)??[])}const bm="brew install iamrajjoshi/tap/gloss",Sm="npm install -g getgloss",xm="gloss open --json",Uo="npx getgloss open --json",dd="npx skills add iamrajjoshi/gloss --skill gloss -g -a claude-code",jm={side:"R",startLine:45,endLine:45},Em=[{id:"seed-human-review",side:"R",startLine:45,endLine:45,body:"Apply the review feedback before resolving the thread so the agent cannot skip the human pass.",createdAt:"2026-05-23T00:00:00.000Z"}],hd=[{key:"open-review",oldLine:38,newLine:38,side:"R",tone:"neutral",code:"const review = await gloss.open({ base: 'HEAD' });"},{key:"add-reviewer",oldLine:39,newLine:39,side:"R",tone:"neutral",hiddenUntilExpanded:!0,code:"review.addReviewer('human');"},{key:"blocking-mode",oldLine:40,newLine:40,side:"R",tone:"neutral",hiddenUntilExpanded:!0,code:"review.setMode('blocking');"},{key:"wait-feedback",oldLine:41,newLine:41,side:"R",tone:"neutral",hiddenUntilExpanded:!0,code:"const feedback = await review.waitForFeedback();"},{key:"filter-comments",oldLine:42,newLine:42,side:"R",tone:"neutral",code:"const comments = feedback.comments.filter((comment) => comment.actionable);"},{key:"skip-review",oldLine:43,side:"L",tone:"remove",code:"agent.resumeWithoutReview();"},{key:"skip-status",oldLine:44,side:"L",tone:"remove",code:"agent.postStatus('review skipped');"},{key:"guard-comments",newLine:45,side:"R",tone:"add",code:"if (comments.length > 0) {"},{key:"apply-feedback",newLine:46,side:"R",tone:"add",code:" await agent.applyFeedback(comments);"},{key:"resolve-threads",newLine:47,side:"R",tone:"add",code:" await review.resolveThreads(comments);"},{key:"run-checks",newLine:48,side:"R",tone:"add",code:" await agent.runChecks(['pnpm check', 'pnpm test']);"},{key:"close-guard",newLine:49,side:"R",tone:"add",code:"}"},{key:"write-markdown",newLine:50,side:"R",tone:"add",code:"await review.writeFeedbackMarkdown();"},{key:"attach-validation",newLine:51,side:"R",tone:"add",code:"await review.attachValidation('pnpm test');"},{key:"resume-reviewed",newLine:52,side:"R",tone:"add",code:"await agent.resume({ reviewed: true });"},{key:"summary",oldLine:45,newLine:53,side:"R",tone:"neutral",code:"return review.summary();"}];function wm(a){return a.startLine===a.endLine?`Comment on line ${Li(a)}`:`Comment on range ${Li(a)}`}function Nm(a,u){const f=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`;return{...u,id:f,body:a,createdAt:new Date().toISOString()}}function $o({value:a,label:u}){const[f,r]=j.useState(!1);return s.jsxs("button",{className:"marketing-copy",type:"button",onClick:async()=>{await navigator.clipboard.writeText(a),r(!0),window.setTimeout(()=>r(!1),1400)},children:[f?s.jsx(vn,{size:15}):s.jsx(vh,{size:15}),s.jsx("span",{children:f?"Copied":u})]})}function as({command:a}){return s.jsxs("div",{className:"command-line",children:[s.jsx("span",{children:"$"}),s.jsx("code",{children:a}),s.jsx($o,{value:a,label:"Copy"})]})}function zm(){const[a,u]=j.useState(!0),[f,r]=j.useState(jm),[h,y]=j.useState(!1),[E,C]=j.useState(null),[x,p]=j.useState(""),[T,O]=j.useState(Em),[k,q]=j.useState("idle"),Q=k==="submitted",se=T.find(G=>G.id===E),pe=wm(f),$=x.trim(),re=`${T.length} review comment${T.length===1?"":"s"}`,ye=Q?[{marker:"✓",text:"review.submitted received"},{marker:"→",text:"reading ~/.gloss/reviews/01KS5/feedback.json"},{marker:"→",text:`applying ${re}`},{marker:"→",text:"running pnpm check"}]:[{marker:"$",text:"gloss open --json"},{marker:"→",text:"captured 4 files, +128 -31"},{marker:"→",text:"waiting for review.submitted"}],K=a?hd:hd.filter(G=>!G.hiddenUntilExpanded),je=j.useMemo(()=>JSON.stringify({reviewId:"01KS5...",comments:T.map(G=>({filePath:"src/web/routes/Home.tsx",side:G.side,startLine:G.startLine,endLine:G.endLine,body:G.body}))},null,2),[T]),de=(G,ne)=>f.side===G&&f.startLine===ne&&f.endLine===ne,W=G=>{r(G),C(null),p(""),y(!0),q("idle")},he=G=>{r({side:G.side,startLine:G.startLine,endLine:G.endLine}),C(G.id),p(G.body),y(!0),q("idle")},fe=()=>{$&&(O(G=>E?G.map(ne=>ne.id===E?{...ne,body:$}:ne):[...G,Nm($,f)]),p(""),C(null),y(!1),q("idle"))},le=G=>{O(ne=>ne.filter(te=>te.id!==G)),E===G&&(C(null),p(""),y(!1)),q("idle")},me=(G,ne)=>T.filter(te=>te.side===G&&Math.max(te.startLine,te.endLine)===ne&&Math.min(te.startLine,te.endLine)===ne);return s.jsxs("section",{className:"hero-scene","aria-label":"Simulated Gloss code review",children:[s.jsxs("div",{className:"scene-topbar",children:[s.jsxs("div",{className:"scene-brand",children:[s.jsx("img",{className:"brand-mark",src:"/logo.svg",alt:"","aria-hidden":"true"}),s.jsx("span",{children:"Gloss review"})]}),s.jsxs("div",{className:"scene-meta",children:[s.jsx(os,{size:14}),s.jsx("span",{children:"raj--gloss--static-site"})]})]}),s.jsxs("div",{className:"scene-shell",children:[s.jsxs("div",{className:"scene-terminal",children:[s.jsxs("div",{className:"terminal-header",children:[s.jsx(Ko,{size:14}),s.jsx("span",{children:"agent terminal"})]}),s.jsx("div",{className:"terminal-lines",children:ye.map(G=>s.jsxs("p",{children:[s.jsx("span",{children:G.marker})," ",G.text]},G.text))})]}),s.jsxs("div",{className:"scene-review",children:[s.jsxs("button",{className:"scene-file-header",type:"button",children:[s.jsx(Kl,{size:16}),s.jsx(Sl,{size:15}),s.jsx("span",{children:"src/web/routes/Home.tsx"}),s.jsx("b",{className:"scene-add",children:"+74"}),s.jsx("b",{className:"scene-del",children:"-6"})]}),s.jsx("button",{className:"scene-hidden",type:"button",onClick:()=>u(G=>!G),children:a?"Hide unchanged context":"194 unmodified lines"}),s.jsx("div",{className:"scene-hunk",children:"@@ -38,11 +38,20 @@ export function Home()"}),K.map(G=>{const ne=G.side==="L"?G.oldLine:G.newLine;if(ne==null)return null;const te=de(G.side,ne),ze=Q&&(G.key==="skip-review"||G.key==="skip-status"),b=Q&&["apply-feedback","resolve-threads","run-checks"].includes(G.key);return s.jsxs("div",{children:[s.jsxs("button",{className:`scene-row ${G.tone} ${G.hiddenUntilExpanded?"dimmed":""} ${te?"selected":""} ${ze?"agent-dimmed":""} ${b?"agent-applied":""}`,type:"button","aria-pressed":te,onClick:()=>W({side:G.side,startLine:ne,endLine:ne}),children:[s.jsx("span",{children:G.oldLine??""}),s.jsx("span",{children:G.newLine??""}),s.jsx("code",{children:G.code||" "})]}),Q&&G.key==="apply-feedback"?s.jsxs("div",{className:"scene-applied-status",children:[s.jsx(vn,{size:13}),s.jsx("span",{children:"applied by agent"})]}):null,s.jsx(Tm,{comments:me(G.side,ne),onOpen:he,onRemove:le}),h&&f.side===G.side&&f.endLine===ne?s.jsxs("div",{className:"scene-composer",children:[s.jsxs("div",{className:"scene-composer-title",children:[s.jsx("strong",{children:se?"Review comment":"New local comment"}),s.jsx("span",{children:pe})]}),s.jsx("textarea",{"aria-label":pe,placeholder:"Request change",value:x,onChange:U=>p(U.target.value)}),s.jsxs("div",{className:"scene-composer-actions",children:[s.jsx("button",{className:"scene-secondary-action",type:"button",onClick:()=>{p(""),C(null),y(!1)},children:"Cancel"}),s.jsx("button",{type:"button",disabled:!$,onClick:fe,children:se?"Update":"Comment"})]})]}):null]},G.key)})]}),s.jsx("div",{className:"scene-feedback",children:Q?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feedback-title",children:[s.jsx(Ko,{size:15}),s.jsx("span",{children:"agent is updating"})]}),s.jsxs("div",{className:"agent-update-card",children:[s.jsx("code",{children:"~/.gloss/reviews/01KS5/feedback.json"}),s.jsx("ul",{children:["Read feedback","Resolved comment","Validated"].map(G=>s.jsxs("li",{children:[s.jsx(vn,{size:13}),s.jsx("span",{children:G})]},G))})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feedback-title",children:[s.jsx(Th,{size:15}),s.jsx("span",{children:"~/.gloss/reviews/01KS5/feedback.json"})]}),s.jsx("pre",{children:je})]})})]}),s.jsxs("div",{className:"scene-submit",children:[s.jsx("span",{children:T.length===0?"No local comments yet":Q?"Sent to agent":`${T.length} local comment${T.length===1?"":"s"} ready`}),s.jsxs("button",{type:"button",disabled:T.length===0,onClick:()=>q("submitted"),children:[Q?s.jsx(vn,{size:14}):s.jsx(nm,{size:14}),Q?"Sent to agent":"Submit review"]})]})]})}function Tm({comments:a,onOpen:u,onRemove:f}){return a.map(r=>s.jsxs("div",{className:"scene-inline-comment",children:[s.jsxs("button",{className:"scene-inline-comment-body",type:"button",onClick:()=>u(r),children:[s.jsx(Ql,{size:14}),s.jsx("span",{children:r.body})]}),s.jsx("button",{className:"scene-inline-comment-remove",type:"button",title:`Remove comment on ${r.side}${r.startLine}`,onClick:()=>f(r.id),children:s.jsx(ss,{size:13})})]},r.id))}function _i({step:a,title:u,body:f}){return s.jsxs("div",{className:"workflow-step",children:[s.jsx("span",{children:a}),s.jsxs("div",{children:[s.jsx("h3",{children:u}),s.jsx("p",{children:f})]})]})}function Mm(){return s.jsxs("section",{className:"marketing-band demo-video-band",id:"demo",children:[s.jsxs("div",{className:"demo-video-header",children:[s.jsxs("div",{className:"section-heading",children:[s.jsx("p",{children:"Demo"}),s.jsx("h2",{children:"Watch the local review loop run for real."})]}),s.jsx("p",{className:"demo-video-caption",children:"A real pass through the loop: open a local diff, leave review comments, hand them back to the agent."})]}),s.jsx("div",{className:"demo-video-frame",children:s.jsxs("video",{"aria-label":"Gloss product walkthrough showing local diff review comments sent back to an agent",controls:!0,poster:"/gloss-demo-poster.jpg",preload:"metadata",children:[s.jsx("source",{src:"/gloss-demo.mp4",type:"video/mp4"}),s.jsx("track",{default:!0,kind:"captions",label:"English",src:"/gloss-demo-captions.vtt",srcLang:"en"}),"Your browser does not support the video tag."]})})]})}function Cm(){return s.jsxs("main",{className:"marketing-page",children:[s.jsxs("section",{className:"marketing-hero",children:[s.jsxs("div",{className:"hero-copy",children:[s.jsxs("div",{className:"hero-copy-main",children:[s.jsx("div",{className:"hero-logo",children:s.jsx("img",{className:"brand-mark",src:"/logo-mark.svg",alt:"Gloss logo"})}),s.jsx("h1",{children:"Gloss"}),s.jsx("p",{className:"hero-subtitle",children:"Review agent-written diffs in your browser."}),s.jsxs("p",{className:"hero-body",children:["Gloss opens your working-tree diff in a local browser, then writes"," ",s.jsx("code",{children:"feedback.json"})," for your agent and ",s.jsx("code",{children:"feedback.md"})," for humans."]}),s.jsxs("div",{className:"hero-actions",children:[s.jsxs("a",{className:"hero-primary",href:"#install",children:["Install with Homebrew",s.jsx(Yd,{size:17})]}),s.jsx("a",{className:"hero-secondary",href:"/setup/",children:"Agent setup"})]})]}),s.jsxs("aside",{className:"hero-quickstart","aria-label":"Quick start command",children:[s.jsx("span",{children:"Run without setup"}),s.jsx("code",{children:Uo}),s.jsx($o,{value:Uo,label:"Copy command"})]})]}),s.jsx(zm,{})]}),s.jsx(Mm,{}),s.jsxs("section",{className:"marketing-band install-band",id:"install",children:[s.jsxs("div",{className:"section-heading",children:[s.jsx("p",{children:"Install"}),s.jsx("h2",{children:"Start the review loop in one command."})]}),s.jsxs("div",{className:"install-grid",children:[s.jsx(as,{command:bm}),s.jsx(as,{command:Sm}),s.jsx(as,{command:xm}),s.jsx(as,{command:Uo})]}),s.jsxs("div",{className:"agent-prompt",children:[s.jsxs("div",{className:"agent-prompt-label",children:[s.jsx(Ko,{size:18}),s.jsx("span",{children:"Packaged skill"})]}),s.jsx("p",{children:"Install the bundled agent skill so Claude Code knows when to open Gloss and how to use the feedback."}),s.jsx("div",{className:"agent-prompt-links",children:s.jsx("a",{href:"/setup/",children:"Agent setup"})}),s.jsxs("div",{className:"agent-skill-command",children:[s.jsx("code",{children:dd}),s.jsx($o,{value:dd,label:"Copy install"})]})]})]}),s.jsxs("section",{className:"marketing-band workflow-band",id:"workflow",children:[s.jsx("div",{className:"section-heading",children:s.jsx("p",{children:"How it works"})}),s.jsxs("div",{className:"workflow-story",children:[s.jsx(_i,{step:"01",title:"Open a review",body:"The agent runs `gloss open --json`."}),s.jsx(_i,{step:"02",title:"Wait",body:"Gloss blocks while you review the diff."}),s.jsx(_i,{step:"03",title:"Receive feedback",body:"The agent reads `feedbackPath`."}),s.jsx(_i,{step:"04",title:"Fix and validate",body:"The agent applies comments and runs checks."}),s.jsx(_i,{step:"05",title:"Resolve",body:"The agent runs `gloss resolve`."})]})]}),s.jsxs("section",{className:"marketing-band contract-band",id:"contract",children:[s.jsxs("div",{className:"section-heading",children:[s.jsx("p",{children:"Output"}),s.jsx("h2",{children:"What the agent reads."})]}),s.jsxs("div",{className:"contract-layout",children:[s.jsx("pre",{children:`~/.gloss/reviews/<reviewId>/feedback.json
310
310
  ~/.gloss/reviews/<reviewId>/feedback.md
311
- ~/.gloss/reviews/<reviewId>/resolved.json`}),s.jsx("div",{className:"contract-copy",children:s.jsxs("p",{children:[s.jsx("code",{children:"feedback.json"})," is the machine-readable handoff; ",s.jsx("code",{children:"feedback.md"})," ","is the human-readable copy; ",s.jsx("code",{children:"resolved.json"})," tracks comment and review resolution progress."]})})]})]}),s.jsx("footer",{className:"marketing-footer",children:s.jsxs("a",{href:"https://github.com/iamrajjoshi/gloss",target:"_blank",rel:"noreferrer",children:[s.jsx(os,{size:16}),s.jsx("span",{children:"GitHub"})]})})]})}var Hi=Gd();const Am=["lockfiles","snapshots","generated","vendored"],Fd=[{id:"lockfiles",label:"Lockfiles"},{id:"snapshots",label:"Snapshots"},{id:"generated",label:"Generated"},{id:"vendored",label:"Vendored"}],_m=new Set(["package-lock.json","pnpm-lock.yaml","yarn.lock","Cargo.lock","Gemfile.lock","Pipfile.lock","poetry.lock","uv.lock","go.sum","composer.lock","mix.lock","flake.lock","deno.lock","Podfile.lock"]),Rm=["@generated","Code generated","DO NOT EDIT","automatically generated"];function Wd(a){const u=new Set,f=[a.path,a.oldPath].filter(r=>!!r);return f.some(Hm)&&u.add("lockfiles"),f.some(km)&&u.add("snapshots"),(f.some(Um)||qm(a))&&u.add("generated"),f.some(Bm)&&u.add("vendored"),u}function Dm(a,u){if(u.size===0)return!1;const f=Wd(a);for(const r of u)if(f.has(r))return!0;return!1}function Om(a,u){if(u.size===0)return{files:a,hidden:[]};const f=[],r=[];for(const h of a)(Dm(h,u)?r:f).push(h);return{files:f,hidden:r}}function Lm(a){if(!Array.isArray(a))return new Set;const u=new Set(Am);return new Set(a.filter(f=>u.has(String(f))))}function Hm(a){const u=l1(a);return _m.has(u)||/^bun\.lock/.test(u)}function km(a){const u=ps(a),f=l1(u);return u.split("/").includes("__snapshots__")||/\.snap(?:\.|$)/.test(f)||/\.snapshot(?:\.|$)/.test(f)}function Um(a){const u=ps(a),f=l1(u),r=u.split("/");return r.includes("__generated__")||r.includes("generated")||/\.generated\./.test(f)||/\.gen\./.test(f)||/\.pb\./.test(f)}function Bm(a){const u=ps(a).split("/");return u.includes("vendor")||u.includes("vendors")||u.includes("third_party")||u.includes("third-party")||u.includes("external")||u.includes("node_modules")||u.includes("bower_components")||u.includes("Pods")||u.includes("Carthage")||Vm(u,[".yarn","cache"])}function qm(a){for(const u of a.hunks)for(const f of u.lines)if(Gm(f.content))return!0;return!1}function Gm(a){const u=a.trim(),f=u.toLowerCase();return/^(\/\/|#|\/\*|\*|<!--|;|--)/.test(u)?Rm.some(r=>f.includes(r.toLowerCase())):!1}function Vm(a,u){return a.some((f,r)=>u.every((h,y)=>a[r+y]===h))}function ps(a){return a.replace(/\\/g,"/")}function l1(a){return ps(a).split("/").pop()??a}function Id(a,u,f="",r=""){return a.localeCompare(u,void 0,{sensitivity:"base"})||a.localeCompare(u)||f.localeCompare(r,void 0,{sensitivity:"base"})||f.localeCompare(r)}function Ym(a,u){return Id(a.path,u.path,a.oldPath??"",u.oldPath??"")}function Xm(a){return a.toSorted(Ym)}const Qm={mode:"all"};function Zm(a=Qm,u=[]){if(a.mode==="all")return"All commits";if(a.mode==="single"){const h=u.find(y=>y.commit.sha===a.sha);return h?`${h.commit.shortSha} ${h.commit.subject}`:`Commit ${Bo(a.sha)}`}const f=u.findIndex(h=>h.commit.sha===a.fromSha),r=u.findIndex(h=>h.commit.sha===a.toSha);return f>=0&&r>=f?`${r-f+1} commits · ${u[f].commit.shortSha} to ${u[r].commit.shortSha}`:`Commit range ${Bo(a.fromSha)} to ${Bo(a.toSha)}`}function Bo(a){return a.slice(0,7)}function md(a){var f;const u=(f=a.meta.branch??a.diff.branch)==null?void 0:f.trim();return u||Km(a.diff)}function Km(a){switch(a.scope.mode){case"branch":return"Branch diff";case"explicit":return`Diff against ${a.scope.requestedBase??a.base.ref}`;case"working":return"Working changes"}}function $m(a){return a==="submitted"||a==="resolved"}const Jm=["L","R"],Fm=["pending","submitted","cancelled","resolved"],Wm=["context","add","delete"],Im=["working","branch","explicit"],Pm=["working-tree-clean","missing-branch-base"],e5=500,t5=240,n5=["import","same-file","repo-search","module"],l5=["all","single","range"],a5=["partial","resolved"],i5=["human","agent","system"],c5=["claimed","working","blocked","completed","failed"],s5=["review-resolved","comment-resolved","comment-reopened","turn-created"],u5=["default","vscode","vscode-insiders","vscodium","cursor","sublime","zed","windsurf","webstorm","intellij","pycharm","goland","phpstorm","rubymine","clion","datagrip","android-studio","fleet","neovide","macvim","emacs","lapce","textmate","bbedit","coteditor","nova","textedit","xcode","terminal","iterm2","ghostty","folder"];function o5(a,u,f){const r=JSON.parse(a);return Pd(r,u,f)}function Pd(a,u,f){if(!u(a))throw new Error(`Invalid ${f}`);return a}function r5(a){return Be(a)&&ee(a.reviewId)&&tt(a.turnId)&&xl(a.turnIndex)&&ee(a.url)&&nt(a.files)&&xl(a.comments)&&tt(a.feedbackPath)&&tt(a.markdownPath)&&tt(a.artifactDir)}function f5(a){return Be(a)&&a.ok===!0&&ee(a.path)}function d5(a){return Be(a)&&Zt(a.targets,D5)}function h5(a){return Be(a)&&ee(a.filePath)&&ee(a.content)}function m5(a){return Be(a)&&ee(a.fromSha)&&ee(a.toSha)&&gs(a.stats)&&ee(a.rawDiff)&&Zt(a.files,a1)}function p5(a){return Be(a)&&ee(a.filePath)&&Zl(a.oldStart)&&Zl(a.newStart)&&Zt(a.lines,i2)}function y5(a){return Be(a)&&ee(a.symbol)&&ee(a.targetSymbol)&&ee(a.filePath)&&Zl(a.startLine)&&Zl(a.line)&&U5(a.column)&&Sn(a.language)&&ee(a.content)&&fn(a.truncated)&&Zl(a.totalLines)&&fn(a.hasMoreAbove)&&fn(a.hasMoreBelow)&&_5(a.matchReason)}function g5(a){return Be(a)&&ee(a.filePath)&&Zl(a.startLine)&&Zl(a.totalLines)&&ee(a.content)&&fn(a.truncated)&&fn(a.hasMoreAbove)&&fn(a.hasMoreBelow)}function v5(a){return Be(a)&&S5(a.meta)&&Zt(a.turns,j5)&&e2(a.diff)&&bn(a.feedback,t2)&&bn(a.resolution,n2)&&bn(a.events,u=>Zt(u,l2))}function b5(a){return Be(a)&&ee(a.id)&&ee(a.cwd)&&ys(a.base)&&Sn(a.branch)&&i1(a.status)&&ee(a.createdAt)&&tt(a.submittedAt)&&tt(a.resolvedAt)&&tt(a.artifactDir)&&tt(a.activeTurnId)&&bn(a.turns,u=>Zt(u,x5))&&tt(a.feedbackPath)&&tt(a.markdownPath)}function S5(a){return b5(a)&&ee(a.artifactDir)}function e2(a){return Be(a)&&ys(a.base)&&Sn(a.branch)&&ee(a.cwd)&&E5(a.scope)&&gs(a.stats)&&ee(a.rawDiff)&&Zt(a.files,a1)&&bn(a.commitDiffs,u=>Zt(u,z5))&&ee(a.capturedAt)}function t2(a){return Be(a)&&a.version===1&&ee(a.reviewId)&&tt(a.turnId)&&xl(a.turnIndex)&&ee(a.timestamp)&&ys(a.base)&&Sn(a.branch)&&bn(a.reviewScope,T5)&&Zt(a.comments,C5)}function n2(a){return Be(a)&&ee(a.reviewId)&&tt(a.turnId)&&xl(a.turnIndex)&&s2(a.status)&&Sn(a.summary)&&Sn(a.resolvedAt)&&Zt(a.comments,A5)}function l2(a){if(!Be(a)||!ee(a.reviewId)||!ee(a.type)||!k5(a))return!1;switch(a.type){case"review.opened":case"review.cancelled":return!0;case"review.turn.created":return ee(a.turnId)&&nt(a.turnIndex)&&fn(a.reused);case"review.submitted":return tt(a.turnId)&&xl(a.turnIndex)&&Be(a.counts)&&nt(a.counts.files)&&nt(a.counts.comments);case"review.updated":return tt(a.turnId)&&xl(a.turnIndex)&&O5(a.reason)&&i1(a.status)&&s2(a.resolutionStatus)&&c2(a.counts);case"agent.claimed":return ee(a.turnId)&&nt(a.turnIndex)&&a.status==="claimed"&&tt(a.message);case"agent.note":return tt(a.turnId)&&xl(a.turnIndex)&&bn(a.status,H5)&&ee(a.message);default:return!1}}function a2(a){return Be(a)&&ee(a.id)&&nt(a.index)&&i1(a.status)&&ee(a.createdAt)&&tt(a.submittedAt)&&tt(a.resolvedAt)&&ee(a.artifactDir)&&ee(a.diffPath)&&tt(a.feedbackPath)&&tt(a.markdownPath)&&tt(a.resolvedPath)}function x5(a){return!Be(a)||!a2(a)?!1:ee(a.capturedAt)&&gs(a.stats)&&c2(a.comments)}function j5(a){return!Be(a)||!a2(a)?!1:e2(a.diff)&&bn(a.feedback,t2)&&bn(a.resolution,n2)}function E5(a){return Be(a)&&an(a.mode,Im)&&Sn(a.requestedBase)&&ys(a.base)&&w5(a.comparison)&&(a.fallbackReason===null||an(a.fallbackReason,Pm))}function w5(a){return Be(a)&&ee(a.ref)&&Sn(a.sha)}function ys(a){return Be(a)&&ee(a.ref)&&ee(a.sha)}function gs(a){return Be(a)&&nt(a.files)&&nt(a.additions)&&nt(a.deletions)}function N5(a){return Be(a)&&ee(a.sha)&&ee(a.shortSha)&&ee(a.subject)&&ee(a.authorName)&&ee(a.authorEmail)&&ee(a.authoredAt)&&ee(a.committedAt)}function z5(a){return Be(a)&&N5(a.commit)&&gs(a.stats)&&ee(a.rawDiff)&&Zt(a.files,a1)}function T5(a){if(!Be(a)||!an(a.mode,l5))return!1;switch(a.mode){case"all":return!0;case"single":return ee(a.sha);case"range":return ee(a.fromSha)&&ee(a.toSha)}}function a1(a){return Be(a)&&ee(a.path)&&Sn(a.oldPath)&&nt(a.additions)&&nt(a.deletions)&&fn(a.isBinary)&&fn(a.isDeleted)&&fn(a.isNew)&&fn(a.isRenamed)&&Sn(a.language)&&Zt(a.hunks,M5)}function M5(a){return Be(a)&&nt(a.oldStart)&&nt(a.oldLines)&&nt(a.newStart)&&nt(a.newLines)&&ee(a.header)&&Zt(a.lines,i2)}function i2(a){return Be(a)&&an(a.type,Wm)&&pd(a.oldLine)&&pd(a.newLine)&&ee(a.content)}function C5(a){return Be(a)?a.kind==="general"?ee(a.id)&&ee(a.body)&&ee(a.createdAt):ee(a.id)&&(a.kind===void 0||a.kind==="line")&&ee(a.filePath)&&nt(a.startLine)&&nt(a.endLine)&&an(a.side,Jm)&&ee(a.body)&&ee(a.originalSnippet)&&ee(a.createdAt):!1}function A5(a){return Be(a)&&ee(a.commentId)&&a.status==="resolved"&&tt(a.summary)&&ee(a.resolvedAt)}function c2(a){return Be(a)&&nt(a.total)&&nt(a.resolved)&&nt(a.open)}function i1(a){return an(a,Fm)}function s2(a){return an(a,a5)}function _5(a){return an(a,n5)}function R5(a){return an(a,u5)}function D5(a){return Be(a)&&R5(a.target)&&ee(a.label)}function O5(a){return an(a,s5)}function L5(a){return an(a,i5)}function H5(a){return an(a,c5)}function k5(a){return tt(a.id)&&xl(a.seq)&&tt(a.createdAt)&&bn(a.actor,L5)}function Be(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function Zt(a,u){return Array.isArray(a)&&a.every(u)}function bn(a,u){return a===void 0||u(a)}function ee(a){return typeof a=="string"}function tt(a){return a===void 0||ee(a)}function Sn(a){return a===null||ee(a)}function nt(a){return typeof a=="number"&&Number.isFinite(a)}function Zl(a){return nt(a)&&Number.isInteger(a)&&a>0}function U5(a){return nt(a)&&Number.isInteger(a)&&a>=0}function xl(a){return a===void 0||nt(a)}function pd(a){return a===null||nt(a)}function fn(a){return typeof a=="boolean"}function an(a,u){return typeof a=="string"&&u.includes(a)}async function Vn(a,u,f){if(!a.ok)throw new Error(await B5(a));const r=await a.json();return Pd(r,u,f)}async function B5(a){const u=await a.text();return q5(u)??`${a.status}: ${u||a.statusText}`}function q5(a){try{const u=JSON.parse(a);if(typeof u=="object"&&u!==null&&!Array.isArray(u)&&typeof u.error=="string")return u.error}catch{}return null}async function yd(a){return Vn(await fetch(`/api/reviews/${a}`),v5,"review response")}async function G5(a,u,f){const r={comments:u,reviewScope:f};return Vn(await fetch(`/api/reviews/${a}/submit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)}),r5,"submit review response")}async function gd(a,u,f,r={}){const h={filePath:u,turnId:f,...r};return Vn(await fetch(`/api/reviews/${a}/files/open`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h)}),f5,"open file response")}async function V5(){return Vn(await fetch("/api/open-targets"),d5,"open targets response")}async function vd(a,u,f,r={}){const h={filePath:u,turnId:f,...r};return Vn(await fetch(`/api/reviews/${a}/files/content`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h)}),h5,"file content response")}async function Y5(a,u,f,r){const h={fromSha:u,toSha:f,turnId:r};return Vn(await fetch(`/api/reviews/${a}/commits/range`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h)}),m5,"commit range diff response")}async function X5({filePath:a,lineCount:u,newStart:f,oldPath:r,oldStart:h,reviewId:y,source:E,turnId:C}){const x={filePath:a,oldPath:r,turnId:C,source:E,oldStart:h,newStart:f,lineCount:u};return Vn(await fetch(`/api/reviews/${y}/files/context`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(x)}),p5,"diff context response")}async function Q5({column:a,filePath:u,line:f,oldPath:r,reviewId:h,side:y,source:E,symbol:C,turnId:x}){const p={filePath:u,oldPath:r,turnId:x,source:E,side:y,line:f,column:a,symbol:C};return Vn(await fetch(`/api/reviews/${h}/source-peek`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)}),y5,"source peek response")}async function Z5({filePath:a,lineCount:u,reviewId:f,side:r,source:h,startLine:y,turnId:E}){const C={filePath:a,turnId:E,source:h,side:r,startLine:y,lineCount:u};return Vn(await fetch(`/api/reviews/${f}/source-peek/range`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(C)}),g5,"source peek range response")}const K5="modulepreload",$5=function(a){return"/"+a},bd={},u2=function(u,f,r){let h=Promise.resolve();if(f&&f.length>0){let E=function(p){return Promise.all(p.map(T=>Promise.resolve(T).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const C=document.querySelector("meta[property=csp-nonce]"),x=(C==null?void 0:C.nonce)||(C==null?void 0:C.getAttribute("nonce"));h=E(f.map(p=>{if(p=$5(p),p in bd)return;bd[p]=!0;const T=p.endsWith(".css"),O=T?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${O}`))return;const k=document.createElement("link");if(k.rel=T?"stylesheet":K5,T||(k.as="script"),k.crossOrigin="",k.href=p,x&&k.setAttribute("nonce",x),document.head.appendChild(k),T)return new Promise((q,Q)=>{k.addEventListener("load",q),k.addEventListener("error",()=>Q(new Error(`Unable to preload CSS for ${p}`)))})}))}function y(E){const C=new Event("vite:preloadError",{cancelable:!0});if(C.payload=E,window.dispatchEvent(C),!C.defaultPrevented)throw E}return h.then(E=>{for(const C of E||[])C.status==="rejected"&&y(C.reason);return u().catch(y)})};function c1(a){return a.type==="delete"?"L":"R"}function s1(a){return c1(a)==="L"?a.oldLine:a.newLine}function ki(a,u){return`${a}:${u}`}function rs(a){return o2(a)&&!a.shiftKey}function J5(a){return o2(a)&&a.shiftKey===!0}function o2(a){var u;return a.key==="Enter"&&a.metaKey===!0&&a.ctrlKey!==!0&&a.altKey!==!0&&a.repeat!==!0&&a.defaultPrevented!==!0&&a.isComposing!==!0&&((u=a.nativeEvent)==null?void 0:u.isComposing)!==!0}const r2="0123456789ABCDEFGHJKMNPQRSTVWXYZ",fs=32,F5=16,f2=10,Sd=0xffffffffffff;var Vl;(function(a){a.Base32IncorrectEncoding="B32_ENC_INVALID",a.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",a.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",a.EncodeTimeNegative="ENC_TIME_NEG",a.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",a.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",a.PRNGDetectFailure="PRNG_DETECT",a.ULIDInvalid="ULID_INVALID",a.Unexpected="UNEXPECTED",a.UUIDInvalid="UUID_INVALID"})(Vl||(Vl={}));class Di extends Error{constructor(u,f){super(`${f} (${u})`),this.name="ULIDError",this.code=u}}function W5(a){const u=Math.floor(a()*fs)%fs;return r2.charAt(u)}function I5(a){const u=P5(),f=u&&(u.crypto||u.msCrypto)||null;if(typeof(f==null?void 0:f.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return f.getRandomValues(r),r[0]/256};if(typeof(f==null?void 0:f.randomBytes)=="function")return()=>f.randomBytes(1).readUInt8()/256;throw new Di(Vl.PRNGDetectFailure,"Failed to find a reliable PRNG")}function P5(){return n6()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function e6(a,u){let f="";for(;a>0;a--)f=W5(u)+f;return f}function t6(a,u=f2){if(isNaN(a))throw new Di(Vl.EncodeTimeValueMalformed,`Time must be a number: ${a}`);if(a>Sd)throw new Di(Vl.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Sd}: ${a}`);if(a<0)throw new Di(Vl.EncodeTimeNegative,`Time must be positive: ${a}`);if(Number.isInteger(a)===!1)throw new Di(Vl.EncodeTimeValueMalformed,`Time must be an integer: ${a}`);let f,r="";for(let h=u;h>0;h--)f=a%fs,r=r2.charAt(f)+r,a=(a-f)/fs;return r}function n6(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function xd(a,u){const f=I5(),r=Date.now();return t6(r,f2)+e6(F5,f)}const jd=a=>{let u;const f=new Set,r=(p,T)=>{const O=typeof p=="function"?p(u):p;if(!Object.is(O,u)){const k=u;u=T??(typeof O!="object"||O===null)?O:Object.assign({},u,O),f.forEach(q=>q(u,k))}},h=()=>u,C={setState:r,getState:h,getInitialState:()=>x,subscribe:p=>(f.add(p),()=>f.delete(p))},x=u=a(r,h,C);return C},l6=(a=>a?jd(a):jd),a6=a=>a;function i6(a,u=a6){const f=Ri.useSyncExternalStore(a.subscribe,Ri.useCallback(()=>u(a.getState()),[a,u]),Ri.useCallback(()=>u(a.getInitialState()),[a,u]));return Ri.useDebugValue(f),f}const Ed=a=>{const u=l6(a),f=r=>i6(u,r);return Object.assign(f,u),f},c6=(a=>a?Ed(a):Ed),jt=c6((a,u)=>({comments:[],resolution:null,draft:null,setDraft:f=>a({draft:f}),hydrateComments:f=>a({comments:f,resolution:null,draft:null}),hydrateReview:(f,r=null)=>a({comments:f,resolution:r,draft:null}),addComment:f=>{const r=u().draft;!r||f.trim().length===0||a(h=>({comments:[...h.comments,{kind:"line",id:xd(),filePath:r.filePath,side:r.side,startLine:Math.min(r.startLine,r.endLine),endLine:Math.max(r.startLine,r.endLine),body:f.trim(),originalSnippet:r.originalSnippet,createdAt:new Date().toISOString()}],draft:null}))},addGeneralComment:f=>{const r=f.trim();r.length!==0&&a(h=>({comments:[...h.comments,{kind:"general",id:xd(),body:r,createdAt:new Date().toISOString()}]}))},updateComment:(f,r)=>{const h=r.trim();h.length!==0&&a(y=>({comments:y.comments.map(E=>E.id===f?{...E,body:h}:E)}))},removeComment:f=>a(r=>({comments:r.comments.filter(h=>h.id!==f)})),reset:()=>a({comments:[],resolution:null,draft:null})})),d2="gloss:theme-preference",s6="(prefers-color-scheme: dark)",u6=new Set(["system","light","dark"]),h2=j.createContext(null);function o6(a){return!!(a&&u6.has(a))}function r6(a=m2()){if(!a)return"system";try{const u=a.getItem(d2);return o6(u)?u:"system"}catch{return"system"}}function f6(a,u=m2()){if(u)try{u.setItem(d2,a)}catch{}}function Jo(a){return a?"dark":"light"}function d6(a,u){return a==="system"?u:a}function h6(a,u=y6()){u&&(u.dataset.theme=a)}function m6({children:a}){const[u,f]=j.useState(()=>r6()),[r,h]=j.useState(()=>p6()),y=d6(u,r);j.useEffect(()=>{const x=p2();if(!x)return;const p=T=>{h(Jo(T.matches))};return h(Jo(x.matches)),typeof x.addEventListener=="function"?(x.addEventListener("change",p),()=>x.removeEventListener("change",p)):(x.addListener(p),()=>x.removeListener(p))},[]),j.useEffect(()=>{h6(y)},[y]);const E=j.useCallback(x=>{f6(x),f(x)},[]),C=j.useMemo(()=>({preference:u,resolvedTheme:y,setPreference:E}),[u,y,E]);return s.jsx(h2.Provider,{value:C,children:a})}function u1(){const a=j.useContext(h2);if(!a)throw new Error("useTheme must be used within ThemeProvider");return a}function p6(a=p2()){return Jo(!!(a!=null&&a.matches))}function m2(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function p2(){try{return typeof window>"u"||typeof window.matchMedia!="function"?null:window.matchMedia(s6)}catch{return null}}function y6(){return typeof document>"u"?null:document.documentElement}function g6({tone:a}){const u=jt(T=>T.draft),f=jt(T=>T.setDraft),r=jt(T=>T.addComment),[h,y]=j.useState(""),E=j.useRef(null);if(j.useEffect(()=>{var T;u&&((T=E.current)==null||T.focus({preventScroll:!0}))},[u]),!u)return null;const C=u.startLine===u.endLine?`Comment on line ${Li(u)}`:`Comment on range ${Li(u)}`,x=()=>{y(""),f(null)},p=()=>{r(h),y("")};return s.jsx("div",{className:`draft-comment-shell tone-${a}`,children:s.jsxs("div",{className:"draft-comment-card",children:[s.jsxs("div",{className:"draft-comment-title",children:[s.jsxs("span",{className:"draft-comment-heading",children:[s.jsx("span",{className:"draft-comment-icon","aria-hidden":"true",children:s.jsx(Vh,{size:15})}),s.jsx("span",{children:"Local comment"})]}),s.jsx("span",{className:"draft-comment-label",children:C})]}),s.jsx("textarea",{"aria-label":C,placeholder:"Request change",ref:E,value:h,onChange:T=>y(T.target.value),onKeyDown:T=>{rs(T)&&(T.preventDefault(),p())}}),s.jsxs("div",{className:"draft-comment-actions",children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:x,children:"Cancel"}),s.jsx("button",{"aria-keyshortcuts":"Meta+Enter",className:"primary-button",title:"Comment (Command+Enter)",type:"button",onClick:p,children:"Comment"})]})]})})}const y2=10;function v6(a,u){const f=u.oldStart-a.oldStart,r=f+u.lineCount-1,h=f>0,y=r<a.lineCount-1;return h&&y?"all":h?"down":y||a.beforeHunkIndex===0?"up":"all"}function b6(a,u){return u.lineCount<=y2?[v6(a,u)]:u.oldStart-a.oldStart>0||a.beforeHunkIndex>0?["up","all","down"]:["up","all"]}function o1(a){const u=[];let f=0,r=0;return a.hunks.forEach((h,y)=>{const E=h.oldStart>f+1?h.oldStart-f-1:0,C=h.newStart>r+1?h.newStart-r-1:0,x=Math.min(E,C);if(x>0){const p=f+1,T=r+1;u.push({id:`${a.path}:${p}:${T}:${x}`,beforeHunkIndex:y,filePath:a.path,oldPath:a.oldPath,oldStart:p,newStart:T,lineCount:x})}f=h.oldStart+h.oldLines-1,r=h.newStart+h.newLines-1}),u}function S6(a,u){const f=vs(a,u),r=g2(a,f),h=r1(a,u);if(r.length===0)return h.length>0?[{type:"lines",lines:h}]:[];const y=r[0]??0,E=r.at(-1)??a.lineCount-1,C=h.filter(p=>{const T=ds(a,p);return T!=null&&T<y}),x=h.filter(p=>{const T=ds(a,p);return T!=null&&T>E});return[...C.length>0?[{type:"lines",lines:C}]:[],{type:"hidden",oldStart:a.oldStart+y,newStart:a.newStart+y,lineCount:E-y+1},...x.length>0?[{type:"lines",lines:x}]:[]]}function x6(a,u,f,r=y2){const h=vs(a,u),y=g2(a,h);if(y.length===0)return null;let E,C;if(f==="all")E=y[0]??0,C=y.at(-1)??a.lineCount-1,C=Math.min(C,E+e5-1);else if(f==="down"){for(E=y[0]??0,C=E;C+1<a.lineCount&&!h.has(C+1);)C+=1;C=Math.min(C,E+r-1)}else{for(C=y.at(-1)??a.lineCount-1,E=C;E-1>=0&&!h.has(E-1);)E-=1;E=Math.max(E,C-r+1)}return{oldStart:a.oldStart+E,newStart:a.newStart+E,lineCount:C-E+1}}function j6(a,u,f){const r=vs(a,u);for(const h of f){const y=ds(a,h);y!=null&&r.set(y,h)}return{lines:Array.from(r.entries()).toSorted(([h],[y])=>h-y).map(([,h])=>h),loading:!1,error:null}}function r1(a,u){return Array.from(vs(a,u).entries()).toSorted(([f],[r])=>f-r).map(([,f])=>f)}function E6(a,u){const f=new Map(o1(a).map(r=>[r.beforeHunkIndex,r]));return a.hunks.flatMap((r,h)=>{const y=f.get(h);return[...y?r1(y,u[y.id]):[],...r.lines]})}function w6(a,u){const f=new Map(o1(a).map(h=>[h.beforeHunkIndex,h])),r=a.hunks.map((h,y)=>{const E=f.get(y),C=E?r1(E,u[E.id]):[];return C.length>0?{...h,lines:[...C,...h.lines]}:h});return{...a,hunks:r}}function g2(a,u){const f=[];for(let r=0;r<a.lineCount;r+=1)u.has(r)||f.push(r);return f}function vs(a,u){const f=new Map;if(!a||!u)return f;for(const r of u.lines){const h=ds(a,r);h!=null&&f.set(h,r)}return f}function ds(a,u){const f=u.oldLine==null?null:u.oldLine-a.oldStart;if(f!=null&&f>=0&&f<a.lineCount)return f;const r=u.newLine==null?null:u.newLine-a.newStart;return r!=null&&r>=0&&r<a.lineCount?r:null}function f1(a){return`gloss-file-${encodeURIComponent(a)}`}const De='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>',Oe='</title><path d="',Le='"/></svg>',N6={title:"Android Studio",slug:"androidstudio",get svg(){return De+"Android Studio"+Oe+this.path+Le},path:"M19.2693 10.3368c-.3321 0-.6026.2705-.6026.6031v9.8324h-1.7379l-3.3355-6.9396c.476-.5387.6797-1.286.5243-2.0009a2.2862 2.2862 0 0 0-1.2893-1.6248v-.8124c.0121-.2871-.1426-.5787-.4043-.7407-.1391-.0825-.2884-.1234-.4402-.1234a.8478.8478 0 0 0-.4318.1182c-.2701.1671-.4248.4587-.4123.7662l-.0003.721c-1.0149.3668-1.6619 1.4153-1.4867 2.5197a2.282 2.282 0 0 0 .5916 1.2103l-3.2096 6.9064H4.0928c-1.0949-.007-1.9797-.8948-1.9832-1.9896V5.016c-.0055 1.1024.8836 2.0006 1.9859 2.0062a2.024 2.024 0 0 0 .1326-.0037h14.7453s2.5343-.2189 2.8619 1.5392c-.2491.0287-.4449.2321-.4449.4889 0 .7115-.5791 1.2901-1.3028 1.2901h-.8183zM17.222 22.5366c.2347.4837.0329 1.066-.4507 1.3007-.1296.0629-.2666.0895-.4018.0927a.9738.9738 0 0 1-.3194-.0455c-.024-.0078-.046-.0209-.0694-.0305a.9701.9701 0 0 1-.2277-.1321c-.0247-.0192-.0495-.038-.0724-.0598-.0825-.0783-.1574-.1672-.21-.2757l-1.2554-2.6143-1.5585-3.2452a.7725.7725 0 0 0-.6995-.4443h-.0024a.792.792 0 0 0-.7083.4443l-1.5109 3.2452-1.2321 2.6464a.9722.9722 0 0 1-.7985.5795c-.0626.0053-.1238-.0024-.185-.0087-.0344-.0036-.069-.0053-.1025-.0124-.0489-.0103-.0954-.0278-.142-.0452-.0301-.0113-.0613-.0197-.0901-.0339-.0496-.0244-.0948-.0565-.1397-.0889-.0217-.0156-.0457-.0275-.0662-.045a.9862.9862 0 0 1-.1695-.1844.9788.9788 0 0 1-.0708-.9852l.8469-1.8223 3.2676-7.0314a1.7964 1.7964 0 0 1-.7072-1.1637c-.1555-.9799.5129-1.9003 1.4928-2.0559V9.3946a.3542.3542 0 0 1 .1674-.3155.3468.3468 0 0 1 .3541 0 .354.354 0 0 1 .1674.3155v1.159l.0129.0064a1.8028 1.8028 0 0 1 1.2878 1.378 1.7835 1.7835 0 0 1-.6439 1.7836l3.3889 7.0507.8481 1.7643zM12.9841 12.306c.0042-.6081-.4854-1.1044-1.0935-1.1085a1.1204 1.1204 0 0 0-.7856.3219 1.101 1.101 0 0 0-.323.7716c-.0042.6081.4854 1.1044 1.0935 1.1085h.0077c.6046 0 1.0967-.488 1.1009-1.0935zm-1.027 5.2768c-.1119.0005-.2121.0632-.2571.1553l-1.4127 3.0342h3.3733l-1.4564-3.0328a.274.274 0 0 0-.2471-.1567zm8.1432-6.7459l-.0129-.0001h-.8177a.103.103 0 0 0-.103.103v12.9103a.103.103 0 0 0 .0966.103h.8435c.9861-.0035 1.7836-.804 1.7836-1.79V9.0468c0 .9887-.8014 1.7901-1.7901 1.7901zM2.6098 5.0161v.019c.0039.816.6719 1.483 1.4874 1.4869a12.061 12.061 0 0 1 .1309-.0034h1.1286c.1972-1.315.7607-2.525 1.638-3.4859H4.0993c-.9266.0031-1.6971.6401-1.9191 1.4975.2417.0355.4296.235.4296.4859zm6.3381-2.8977L7.9112.3284a.219.219 0 0 1 0-.2189A.2384.2384 0 0 1 8.098 0a.219.219 0 0 1 .1867.1094l1.0496 1.8158a6.4907 6.4907 0 0 1 5.3186 0L15.696.1094a.2189.2189 0 0 1 .3734.2189l-1.0302 1.79c1.6671.9125 2.7974 2.5439 3.0975 4.4018l-12.286-.0014c.3004-1.8572 1.4305-3.488 3.0972-4.4003zm5.3774 2.6202a.515.515 0 0 0 .5271.5028.515.515 0 0 0 .5151-.5151.5213.5213 0 0 0-.8885-.367.5151.5151 0 0 0-.1537.3793zm-5.7178-.0067a.5151.5151 0 0 0 .5207.5095.5086.5086 0 0 0 .367-.1481.5215.5215 0 1 0-.734-.7341.515.515 0 0 0-.1537.3727z",source:"https://developer.android.com/studio",hex:"3DDC84"},z6={title:"CLion",slug:"clion",get svg(){return De+"CLion"+Oe+this.path+Le},path:"M0 0v24h24V0H0zm7.041 3a5.049 5.049 0 0 1 .219 0c1.86 0 3 .6 3.9 1.56L9.78 6.18C9 5.46 8.22 5.04 7.26 5.04c-1.68 0-2.88 1.38-2.88 3.12 0 1.68 1.2 3.12 2.88 3.12 1.14 0 1.86-.48 2.64-1.14l1.38 1.38c-1.02 1.08-2.16 1.8-4.08 1.8a5.1 5.1 0 0 1-5.1-5.16A5.049 5.049 0 0 1 7.04 3zm5.738.12H15v8.1h4.32v1.86h-6.54V3.12zM2.28 19.5h9V21h-9v-1.5Z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},T6={title:"CSS",slug:"css",get svg(){return De+"CSS"+Oe+this.path+Le},path:"M0 0v20.16A3.84 3.84 0 0 0 3.84 24h16.32A3.84 3.84 0 0 0 24 20.16V3.84A3.84 3.84 0 0 0 20.16 0Zm14.256 13.08c1.56 0 2.28 1.08 2.304 2.64h-1.608c.024-.288-.048-.6-.144-.84-.096-.192-.288-.264-.552-.264-.456 0-.696.264-.696.84-.024.576.288.888.768 1.08.72.288 1.608.744 1.92 1.296q.432.648.432 1.656c0 1.608-.912 2.592-2.496 2.592-1.656 0-2.4-1.032-2.424-2.688h1.68c0 .792.264 1.176.792 1.176.264 0 .456-.072.552-.24.192-.312.24-1.176-.048-1.512-.312-.408-.912-.6-1.32-.816q-.828-.396-1.224-.936c-.24-.36-.36-.888-.36-1.536 0-1.44.936-2.472 2.424-2.448m5.4 0c1.584 0 2.304 1.08 2.328 2.64h-1.608c0-.288-.048-.6-.168-.84-.096-.192-.264-.264-.528-.264-.48 0-.72.264-.72.84s.288.888.792 1.08c.696.288 1.608.744 1.92 1.296.264.432.408.984.408 1.656.024 1.608-.888 2.592-2.472 2.592-1.68 0-2.424-1.056-2.448-2.688h1.68c0 .744.264 1.176.792 1.176.264 0 .456-.072.552-.24.216-.312.264-1.176-.048-1.512-.288-.408-.888-.6-1.32-.816-.552-.264-.96-.576-1.2-.936s-.36-.888-.36-1.536c-.024-1.44.912-2.472 2.4-2.448m-11.031.018c.711-.006 1.419.198 1.839.63.432.432.672 1.128.648 1.992H9.336c.024-.456-.096-.792-.432-.96-.312-.144-.768-.048-.888.24-.12.264-.192.576-.168.864v3.504c0 .744.264 1.128.768 1.128a.65.65 0 0 0 .552-.264c.168-.24.192-.552.168-.84h1.776c.096 1.632-.984 2.712-2.568 2.688-1.536 0-2.496-.864-2.472-2.472v-4.032c0-.816.24-1.44.696-1.848.432-.408 1.146-.624 1.857-.63",source:"https://github.com/CSS-Next/logo.css/blob/bacc20878227204b283c68a6b935f8279e06b0cd/css.svg",hex:"663399",guidelines:"https://github.com/CSS-Next/logo.css"},M6={title:"Cursor",slug:"cursor",get svg(){return De+"Cursor"+Oe+this.path+Le},path:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23",source:"https://cursor.com/brand",hex:"000000"},C6={title:"DataGrip",slug:"datagrip",get svg(){return De+"DataGrip"+Oe+this.path+Le},path:"M0 0v24h24V0Zm17.1797 2.9477a5.452 5.452 0 0 1 3.9047 1.364L19.7078 5.972a3.672 3.672 0 0 0-2.596-1.0086c-1.6 0-2.8555 1.408-2.8555 3.096v.0282c0 1.816 1.2517 3.1523 3.0117 3.1523a3.492 3.492 0 0 0 2.064-.5921V9.2234h-2.2V7.336h4.3157v4.3157a6.436 6.436 0 0 1-4.2438 1.5757c-3.096 0-5.2242-2.1797-5.2242-5.1117v-.0281a5.1 5.1 0 0 1 5.2-5.1398zm-14.7438.1718h3.8758c3.12 0 5.2805 2.1439 5.2805 4.9399v.028c0 2.8-2.1605 4.968-5.2805 4.968H2.436Zm4.075 1.9688a2.852 2.852 0 0 0-.1992.003H4.6203v6h1.6914A2.832 2.832 0 0 0 9.304 8.1235v-.036a2.852 2.852 0 0 0-2.793-2.9991Zm-4.303 14.407h9v1.5h-9z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},A6={title:"Ghostty",slug:"ghostty",get svg(){return De+"Ghostty"+Oe+this.path+Le},path:"M12 0C6.7 0 2.4 4.3 2.4 9.6v11.146c0 1.772 1.45 3.267 3.222 3.254a3.18 3.18 0 0 0 1.955-.686 1.96 1.96 0 0 1 2.444 0 3.18 3.18 0 0 0 1.976.686c.75 0 1.436-.257 1.98-.686.715-.563 1.71-.587 2.419-.018.59.476 1.355.743 2.182.699 1.705-.094 3.022-1.537 3.022-3.244V9.601C21.6 4.3 17.302 0 12 0M6.069 6.562a1 1 0 0 1 .46.131l3.578 2.065v.002a.974.974 0 0 1 0 1.687L6.53 12.512a.975.975 0 0 1-.976-1.687L7.67 9.602 5.553 8.38a.975.975 0 0 1 .515-1.818m7.438 2.063h4.7a.975.975 0 1 1 0 1.95h-4.7a.975.975 0 0 1 0-1.95",source:"https://github.com/ghostty-org/website/blob/7093f052a2f35e0247fcb828ede644ed74a749a0/public/ghostty-logo.svg",hex:"3551F3"},_6={title:"GNU Bash",slug:"gnubash",get svg(){return De+"GNU Bash"+Oe+this.path+Le},path:"M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z",source:"https://github.com/odb/official-bash-logo/tree/61eff022f2dad3c7468f5deb4f06652d15f2c143",hex:"4EAA25",guidelines:"https://github.com/odb/official-bash-logo",license:{type:"MIT",url:"https://spdx.org/licenses/MIT"}},R6={title:"GNU Emacs",slug:"gnuemacs",get svg(){return De+"GNU Emacs"+Oe+this.path+Le},path:"M12,24C5.448,24,0.118,18.617,0.118,12S5.448,0,12,0c6.552,0,11.882,5.383,11.882,12S18.552,24,12,24z M12,0.661 C5.813,0.661,0.779,5.748,0.779,12S5.813,23.339,12,23.339c6.187,0,11.221-5.086,11.221-11.339S18.187,0.661,12,0.661z M8.03,20.197 c0,0,0.978,0.069,2.236-0.042c0.51-0.045,2.444-0.235,3.891-0.552c0,0,1.764-0.377,2.707-0.725c0.987-0.364,1.524-0.673,1.766-1.11 c-0.011-0.09,0.074-0.408-0.381-0.599c-1.164-0.488-2.514-0.4-5.185-0.457c-2.962-0.102-3.948-0.598-4.472-0.997 c-0.503-0.405-0.25-1.526,1.907-2.513c1.086-0.526,5.345-1.496,5.345-1.496c-1.434-0.709-4.109-1.955-4.659-2.224 c-0.482-0.236-1.254-0.591-1.421-1.021c-0.19-0.413,0.448-0.768,0.804-0.87c1.147-0.331,2.766-0.536,4.24-0.56 c0.741-0.012,0.861-0.059,0.861-0.059c1.022-0.17,1.695-0.869,1.414-1.976c-0.252-1.13-1.579-1.795-2.84-1.565 c-1.188,0.217-4.05,1.048-4.05,1.048c3.539-0.031,4.131,0.028,4.395,0.398c0.156,0.218-0.071,0.518-1.015,0.672 c-1.027,0.168-3.163,0.37-3.163,0.37c-2.049,0.122-3.492,0.13-3.925,1.046C6.202,7.564,6.787,8.094,7.043,8.425 c1.082,1.204,2.646,1.853,3.652,2.331c0.379,0.18,1.49,0.52,1.49,0.52c-3.265-0.18-5.619,0.823-7.001,1.977 c-1.562,1.445-0.871,3.168,2.33,4.228c1.891,0.626,2.828,0.921,5.648,0.667c1.661-0.09,1.923-0.036,1.939,0.1 c0.023,0.192-1.845,0.669-2.355,0.816C11.448,19.438,8.047,20.193,8.03,20.197z",source:"https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/images/icons/hicolor/scalable/apps/emacs.svg",hex:"7F5AB6",license:{type:"GPL-2.0-or-later",url:"https://spdx.org/licenses/GPL-2.0-or-later"}},D6={title:"Go",slug:"go",get svg(){return De+"Go"+Oe+this.path+Le},path:"M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z",source:"https://blog.golang.org/go-brand",hex:"00ADD8",guidelines:"https://blog.golang.org/go-brand"},O6={title:"GoLand",slug:"goland",get svg(){return De+"GoLand"+Oe+this.path+Le},path:"M0 0v24h24V0Zm6.764 3a5.448 5.448 0 0 1 3.892 1.356L9.284 6.012A3.652 3.652 0 0 0 6.696 5c-1.6 0-2.844 1.4-2.844 3.08v.028c0 1.812 1.244 3.14 3 3.14a3.468 3.468 0 0 0 2.048-.596V9.228H6.708v-1.88H11v4.296a6.428 6.428 0 0 1-4.228 1.572c-3.076 0-5.196-2.164-5.196-5.092v-.028A5.08 5.08 0 0 1 6.764 3Zm10.432 0c3.052 0 5.244 2.276 5.244 5.088v.028a5.116 5.116 0 0 1-5.272 5.12c-3.056-.02-5.248-2.296-5.248-5.112v-.028A5.116 5.116 0 0 1 17.196 3Zm-.028 2A2.96 2.96 0 0 0 14.2 8.068v.028a3.008 3.008 0 0 0 3 3.112 2.96 2.96 0 0 0 2.964-3.084v-.028A3.004 3.004 0 0 0 17.168 5ZM2.252 19.5h9V21h-9z",source:"https://www.jetbrains.com/company/brand/#logos-and-icons-jetbrains-logos",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/#brand-guidelines"},L6={title:"HTML5",slug:"html5",get svg(){return De+"HTML5"+Oe+this.path+Le},path:"M1.5 0h21l-1.91 21.563L11.977 24l-8.564-2.438L1.5 0zm7.031 9.75l-.232-2.718 10.059.003.23-2.622L5.412 4.41l.698 8.01h9.126l-.326 3.426-2.91.804-2.955-.81-.188-2.11H6.248l.33 4.171L12 19.351l5.379-1.443.744-8.157H8.531z",source:"https://www.w3.org/html/logo/",hex:"E34F26"},H6={title:"IntelliJ IDEA",slug:"intellijidea",get svg(){return De+"IntelliJ IDEA"+Oe+this.path+Le},path:"M0 0v24h24V0zm3.723 3.111h5v1.834h-1.39v6.277h1.39v1.834h-5v-1.834h1.444V4.945H3.723zm11.055 0H17v6.5c0 .612-.055 1.111-.222 1.556-.167.444-.39.777-.723 1.11-.277.279-.666.557-1.11.668a3.933 3.933 0 0 1-1.445.278c-.778 0-1.444-.167-1.944-.445a4.81 4.81 0 0 1-1.279-1.056l1.39-1.555c.277.334.555.555.833.722.277.167.611.278.945.278.389 0 .721-.111 1-.389.221-.278.333-.667.333-1.278zM2.222 19.5h9V21h-9z",source:"https://www.jetbrains.com/idea/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},k6={title:"iTerm2",slug:"iterm2",get svg(){return De+"iTerm2"+Oe+this.path+Le},path:"M24 5.359v13.282A5.36 5.36 0 0 1 18.641 24H5.359A5.36 5.36 0 0 1 0 18.641V5.359A5.36 5.36 0 0 1 5.359 0h13.282A5.36 5.36 0 0 1 24 5.359m-.932-.233A4.196 4.196 0 0 0 18.874.932H5.126A4.196 4.196 0 0 0 .932 5.126v13.748a4.196 4.196 0 0 0 4.194 4.194h13.748a4.196 4.196 0 0 0 4.194-4.194zm-.816.233v13.282a3.613 3.613 0 0 1-3.611 3.611H5.359a3.613 3.613 0 0 1-3.611-3.611V5.359a3.613 3.613 0 0 1 3.611-3.611h13.282a3.613 3.613 0 0 1 3.611 3.611M8.854 4.194v6.495h.962V4.194zM5.483 9.493v1.085h.597V9.48q.283-.037.508-.133.373-.165.575-.448.208-.284.208-.649a.9.9 0 0 0-.171-.568 1.4 1.4 0 0 0-.426-.388 3 3 0 0 0-.544-.261 32 32 0 0 0-.545-.209 1.8 1.8 0 0 1-.426-.216q-.164-.12-.164-.284 0-.223.179-.351.18-.126.485-.127.344 0 .575.105.239.105.5.298l.433-.5a2.3 2.3 0 0 0-.605-.433 1.6 1.6 0 0 0-.582-.159v-.968h-.597v.978a2 2 0 0 0-.477.127 1.2 1.2 0 0 0-.545.411q-.194.268-.194.634 0 .335.164.56.164.224.418.38a4 4 0 0 0 .552.262q.291.104.545.209.261.104.425.238a.39.39 0 0 1 .165.321q0 .225-.187.359-.18.134-.537.134-.381 0-.717-.134a4.4 4.4 0 0 1-.649-.351l-.388.589q.209.173.477.306.276.135.575.217.191.046.373.064",source:"https://github.com/gnachman/iTerm2/blob/6a857f3f5872eb1465ddc0dd83412015991e79ae/images/AppIcon/iTermIcon.sketch",hex:"000000"},U6={title:"JavaScript",slug:"javascript",get svg(){return De+"JavaScript"+Oe+this.path+Le},path:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z",source:"https://github.com/voodootikigod/logo.js/blob/1544bdeed6d618a6cfe4f0650d04ab8d9cfa76d9/js.svg",hex:"F7DF1E",license:{type:"MIT",url:"https://spdx.org/licenses/MIT"}},B6={title:"JSON",slug:"json",get svg(){return De+"JSON"+Oe+this.path+Le},path:"M12.043 23.968c.479-.004.953-.029 1.426-.094a11.805 11.805 0 003.146-.863 12.404 12.404 0 003.793-2.542 11.977 11.977 0 002.44-3.427 11.794 11.794 0 001.02-3.476c.149-1.16.135-2.346-.045-3.499a11.96 11.96 0 00-.793-2.788 11.197 11.197 0 00-.854-1.617c-1.168-1.837-2.861-3.314-4.81-4.3a12.835 12.835 0 00-2.172-.87h-.005c.119.063.24.132.345.201.12.074.239.146.351.225a8.93 8.93 0 011.559 1.33c1.063 1.145 1.797 2.548 2.218 4.041.284.982.434 1.998.495 3.017.044.743.044 1.491-.047 2.229-.149 1.27-.554 2.51-1.228 3.596a7.475 7.475 0 01-1.903 2.084c-1.244.928-2.877 1.482-4.436 1.114a3.916 3.916 0 01-.748-.258 4.692 4.692 0 01-.779-.45 6.08 6.08 0 01-1.244-1.105 6.507 6.507 0 01-1.049-1.747 7.366 7.366 0 01-.494-2.54c-.03-1.273.225-2.553.854-3.67a6.43 6.43 0 011.663-1.918c.225-.178.464-.333.704-.479l.016-.007a5.121 5.121 0 00-1.441-.12 4.963 4.963 0 00-1.228.24c-.359.12-.704.27-1.019.45a6.146 6.146 0 00-.733.494c-.211.18-.42.36-.615.555-1.123 1.153-1.768 2.682-2.022 4.256-.15.973-.15 1.96-.091 2.95.105 1.395.391 2.787.945 4.062a8.518 8.518 0 001.348 2.173 8.14 8.14 0 003.132 2.23 7.934 7.934 0 002.113.54c.074.015.149.015.209.015zm-2.934-.398a4.102 4.102 0 01-.45-.228 8.5 8.5 0 01-2.038-1.534c-1.094-1.137-1.827-2.566-2.247-4.08a15.184 15.184 0 01-.495-3.172 12.14 12.14 0 01.046-2.082c.135-1.257.495-2.501 1.124-3.58a6.889 6.889 0 011.783-2.053 6.23 6.23 0 011.633-.9 5.363 5.363 0 013.522-.045c.029 0 .029 0 .045.03.015.015.045.015.06.03.045.016.104.045.165.074.239.12.479.271.704.42a6.294 6.294 0 012.097 2.502c.42.914.615 1.934.631 2.938.014 1.079-.18 2.157-.645 3.146a6.42 6.42 0 01-2.638 2.832c.09.03.18.045.271.075.225.044.449.074.688.074 1.468.045 2.892-.66 3.94-1.647.195-.18.375-.375.54-.585.225-.27.435-.54.614-.823.239-.375.435-.75.614-1.154a8.112 8.112 0 00.509-1.664c.196-1.004.211-2.022.149-3.026-.135-2.022-.673-4.045-1.842-5.724a9.054 9.054 0 00-.555-.719 9.868 9.868 0 00-1.063-1.034 8.477 8.477 0 00-1.363-.915 9.927 9.927 0 00-1.692-.598l-.3-.06c-.209-.03-.42-.044-.634-.06a8.453 8.453 0 00-1.015.016c-.704.045-1.412.16-2.112.337C5.799 1.227 2.863 3.566 1.3 6.67A11.834 11.834 0 00.238 9.801a11.81 11.81 0 00-.104 3.775c.12 1.02.374 2.023.778 2.977.227.57.511 1.124.825 1.648 1.094 1.783 2.683 3.236 4.51 4.24.688.39 1.408.69 2.157.944.226.074.45.15.689.21z",source:"https://commons.wikimedia.org/wiki/File:JSON_vector_logo.svg",hex:"000000"},q6={title:"Lapce",slug:"lapce",get svg(){return De+"Lapce"+Oe+this.path+Le},path:"M3.802 1.267 1.608 0v24L8 20.31v-2.535L3.802 20.2Zm4.208 13.9V6.231L18.003 12l-7.798 4.503v2.533L22.392 12 5.806 2.424V16.44Zm5.598-3.231L10.205 9.97v3.93Z",source:"https://github.com/lapce/lapce/blob/95c4cf2d87083e348c0b621d0be0ea17f79ed703/extra/images/logo.svg",hex:"3B82F6"},G6={title:"Markdown",slug:"markdown",get svg(){return De+"Markdown"+Oe+this.path+Le},path:"M22.27 19.385H1.73A1.73 1.73 0 010 17.655V6.345a1.73 1.73 0 011.73-1.73h20.54A1.73 1.73 0 0124 6.345v11.308a1.73 1.73 0 01-1.73 1.731zM5.769 15.923v-4.5l2.308 2.885 2.307-2.885v4.5h2.308V8.078h-2.308l-2.307 2.885-2.308-2.885H3.46v7.847zM21.232 12h-2.309V8.077h-2.307V12h-2.308l3.461 4.039z",source:"https://github.com/dcurtis/markdown-mark/tree/360a3657fef7f6ad0b303296a95ad52985caa0d3",hex:"000000",guidelines:"https://github.com/dcurtis/markdown-mark",license:{type:"CC0-1.0",url:"https://spdx.org/licenses/CC0-1.0"}},V6={title:"Neovim",slug:"neovim",get svg(){return De+"Neovim"+Oe+this.path+Le},path:"M2.214 4.954v13.615L7.655 24V10.314L3.312 3.845 2.214 4.954zm4.999 17.98l-4.557-4.548V5.136l.59-.596 3.967 5.908v12.485zm14.573-4.457l-.862.937-4.24-6.376V0l5.068 5.092.034 13.385zM7.431.001l12.998 19.835-3.637 3.637L3.787 3.683 7.43 0z",source:"https://neovim.io",hex:"57A143",license:{type:"CC-BY-SA-3.0",url:"https://spdx.org/licenses/CC-BY-SA-3.0"}},Y6={title:"PhpStorm",slug:"phpstorm",get svg(){return De+"PhpStorm"+Oe+this.path+Le},path:"M7.833 6.611v-.055c0-1-.667-1.5-1.778-1.5H4.389v3.056h1.722c1.111-.001 1.722-.668 1.722-1.501zM0 0v24h24V0H0zm2.167 3.111h4.056c2.389 0 3.833 1.389 3.833 3.445v.055c0 2.333-1.778 3.5-4.056 3.5H4.333v3H2.167v-10zM11.278 21h-9v-1.5h9V21zM18.5 10.222c0 2-1.5 3.111-3.667 3.111-1.5-.056-3-.611-4.222-1.667l1.278-1.556c.89.722 1.833 1.222 3 1.222.889 0 1.444-.333 1.444-.944v-.056c0-.555-.333-.833-2-1.277C12.333 8.555 11 8 11 6v-.056c0-1.833 1.444-3 3.5-3 1.444 0 2.723.444 3.723 1.278l-1.167 1.667c-.889-.611-1.777-1-2.611-1-.833 0-1.278.389-1.278.889v.056c0 .667.445.889 2.167 1.333 2 .556 3.167 1.278 3.167 3v.055z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},X6={title:"PyCharm",slug:"pycharm",get svg(){return De+"PyCharm"+Oe+this.path+Le},path:"M7.833 6.666v-.055c0-1-.667-1.5-1.778-1.5H4.389v3.055h1.723c1.111 0 1.721-.666 1.721-1.5zM0 0v24h24V0H0zm2.223 3.167h4c2.389 0 3.833 1.389 3.833 3.445v.055c0 2.278-1.778 3.5-4.001 3.5H4.389v2.945H2.223V3.167zM11.277 21h-9v-1.5h9V21zm4.779-7.777c-2.944.055-5.111-2.223-5.111-5.057C10.944 5.333 13.056 3 16.111 3c1.889 0 3 .611 3.944 1.556l-1.389 1.61c-.778-.722-1.556-1.111-2.556-1.111-1.658 0-2.873 1.375-2.887 3.084.014 1.709 1.174 3.083 2.887 3.083 1.111 0 1.833-.445 2.61-1.167l1.39 1.389c-.999 1.112-2.166 1.779-4.054 1.779z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},Q6={title:"Python",slug:"python",get svg(){return De+"Python"+Oe+this.path+Le},path:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z",source:"https://www.python.org/community/logos/",hex:"3776AB",guidelines:"https://www.python.org/community/logos/"},wd={title:"React",slug:"react",get svg(){return De+"React"+Oe+this.path+Le},path:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z",source:"https://github.com/facebook/create-react-app/blob/282c03f9525fdf8061ffa1ec50dce89296d916bd/test/fixtures/relative-paths/src/logo.svg",hex:"61DAFB"},Z6={title:"Ruby",slug:"ruby",get svg(){return De+"Ruby"+Oe+this.path+Le},path:"M20.156.083c3.033.525 3.893 2.598 3.829 4.77L24 4.822 22.635 22.71 4.89 23.926h.016C3.433 23.864.15 23.729 0 19.139l1.645-3 2.819 6.586.503 1.172 2.805-9.144-.03.007.016-.03 9.255 2.956-1.396-5.431-.99-3.9 8.82-.569-.615-.51L16.5 2.114 20.159.073l-.003.01zM0 19.089zM5.13 5.073c3.561-3.533 8.157-5.621 9.922-3.84 1.762 1.777-.105 6.105-3.673 9.636-3.563 3.532-8.103 5.734-9.864 3.957-1.766-1.777.045-6.217 3.612-9.75l.003-.003z",source:"https://www.ruby-lang.org/en/about/logo/",hex:"CC342D",license:{type:"CC-BY-SA-2.5",url:"https://spdx.org/licenses/CC-BY-SA-2.5"}},K6={title:"RubyMine",slug:"rubymine",get svg(){return De+"RubyMine"+Oe+this.path+Le},path:"M0 0v24h24V0Zm3.056 3H6.92q.945 0 1.665.347t1.106.977c.262.42.392.902.392 1.46q0 .835-.399 1.478a2.6 2.6 0 0 1-1.125.99 2 2 0 0 1-.297.103q-.066.02-.13.04L10.276 12H8.264l-1.94-3.4H4.811V12H3.056Zm8.51 0h2.444l1.851 5.907.154.773.136-.773L17.937 3h2.482v9h-1.736V5.578l.026-.47L16.613 12H15.34l-2.07-6.846.026.424V12h-1.73ZM4.812 4.459V7.14h1.993q.444-.001.771-.161.335-.167.515-.47c.12-.205.18-.439.18-.713q0-.411-.18-.707a1.17 1.17 0 0 0-.515-.462 1.7 1.7 0 0 0-.77-.168ZM2.996 19.2h9.6V21h-9.6z",source:"https://www.jetbrains.com/company/brand/logos",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand"},$6={title:"Rust",slug:"rust",get svg(){return De+"Rust"+Oe+this.path+Le},path:"M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z",source:"https://www.rust-lang.org",hex:"000000",guidelines:"https://www.rust-lang.org/policies/media-guide",license:{type:"CC-BY-SA-4.0",url:"https://spdx.org/licenses/CC-BY-SA-4.0"}},J6={title:"Sublime Text",slug:"sublimetext",get svg(){return De+"Sublime Text"+Oe+this.path+Le},path:"M20.953.004a.397.397 0 0 0-.18.017L3.225 5.585c-.175.055-.323.214-.402.398a.42.42 0 0 0-.06.22v5.726a.42.42 0 0 0 .06.22c.079.183.227.341.402.397l7.454 2.364-7.454 2.363c-.255.08-.463.374-.463.655v5.688c0 .282.208.444.463.363l17.55-5.565c.237-.075.426-.336.452-.6.003-.022.013-.04.013-.065V12.06c0-.281-.208-.575-.463-.656L13.4 9.065l7.375-2.339c.255-.08.462-.375.462-.656V.384c0-.211-.117-.355-.283-.38z",source:"https://www.sublimetext.com",hex:"FF9800"},F6={title:"Swift",slug:"swift",get svg(){return De+"Swift"+Oe+this.path+Le},path:"M7.508 0c-.287 0-.573 0-.86.002-.241.002-.483.003-.724.01-.132.003-.263.009-.395.015A9.154 9.154 0 0 0 4.348.15 5.492 5.492 0 0 0 2.85.645 5.04 5.04 0 0 0 .645 2.848c-.245.48-.4.972-.495 1.5-.093.52-.122 1.05-.136 1.576a35.2 35.2 0 0 0-.012.724C0 6.935 0 7.221 0 7.508v8.984c0 .287 0 .575.002.862.002.24.005.481.012.722.014.526.043 1.057.136 1.576.095.528.25 1.02.495 1.5a5.03 5.03 0 0 0 2.205 2.203c.48.244.97.4 1.498.495.52.093 1.05.124 1.576.138.241.007.483.009.724.01.287.002.573.002.86.002h8.984c.287 0 .573 0 .86-.002.241-.001.483-.003.724-.01a10.523 10.523 0 0 0 1.578-.138 5.322 5.322 0 0 0 1.498-.495 5.035 5.035 0 0 0 2.203-2.203c.245-.48.4-.972.495-1.5.093-.52.124-1.05.138-1.576.007-.241.009-.481.01-.722.002-.287.002-.575.002-.862V7.508c0-.287 0-.573-.002-.86a33.662 33.662 0 0 0-.01-.724 10.5 10.5 0 0 0-.138-1.576 5.328 5.328 0 0 0-.495-1.5A5.039 5.039 0 0 0 21.152.645 5.32 5.32 0 0 0 19.654.15a10.493 10.493 0 0 0-1.578-.138 34.98 34.98 0 0 0-.722-.01C17.067 0 16.779 0 16.492 0H7.508zm6.035 3.41c4.114 2.47 6.545 7.162 5.549 11.131-.024.093-.05.181-.076.272l.002.001c2.062 2.538 1.5 5.258 1.236 4.745-1.072-2.086-3.066-1.568-4.088-1.043a6.803 6.803 0 0 1-.281.158l-.02.012-.002.002c-2.115 1.123-4.957 1.205-7.812-.022a12.568 12.568 0 0 1-5.64-4.838c.649.48 1.35.902 2.097 1.252 3.019 1.414 6.051 1.311 8.197-.002C9.651 12.73 7.101 9.67 5.146 7.191a10.628 10.628 0 0 1-1.005-1.384c2.34 2.142 6.038 4.83 7.365 5.576C8.69 8.408 6.208 4.743 6.324 4.86c4.436 4.47 8.528 6.996 8.528 6.996.154.085.27.154.36.213.085-.215.16-.437.224-.668.708-2.588-.09-5.548-1.893-7.992z",source:"https://developer.apple.com/swift/resources/",hex:"F05138",guidelines:"https://developer.apple.com/swift/resources/"},W6={title:"TypeScript",slug:"typescript",get svg(){return De+"TypeScript"+Oe+this.path+Le},path:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z",source:"https://www.typescriptlang.org/branding",hex:"3178C6",guidelines:"https://www.typescriptlang.org/branding"},I6={title:"Vim",slug:"vim",get svg(){return De+"Vim"+Oe+this.path+Le},path:"M24 11.986h-.027l-4.318-4.318 4.303-4.414V1.461l-.649-.648h-8.198l-.66.605v1.045L12.015.027V0L12 .014 11.986 0v.027l-1.29 1.291-.538-.539H2.035l-.638.692v1.885l.616.616h.72v5.31L.027 11.987H0L.014 12 0 12.014h.027l2.706 2.706v6.467l.907.523h2.322l1.857-1.904 4.166 4.166V24l.015-.014.014.014v-.028l2.51-2.509h.485c.111 0 .211-.07.25-.179l.146-.426c.028-.084.012-.172-.037-.239l1.462-1.462-.612 1.962c-.043.141.036.289.177.332.025.008.052.012.078.012h1.824c.106-.001.201-.064.243-.163l.165-.394c.025-.065.024-.138-.004-.203-.027-.065-.08-.116-.146-.142-.029-.012-.062-.019-.097-.02h-.075l.84-2.644h1.232l-1.016 3.221c-.043.141.036.289.176.332.025.008.052.012.079.012h2.002c.11 0 .207-.066.248-.17l.164-.428c.051-.138-.021-.29-.158-.341-.029-.011-.06-.017-.091-.017h-.145l1.131-3.673c.027-.082.012-.173-.039-.24l-.375-.504-.003-.005c-.051-.064-.127-.102-.209-.102h-1.436c-.071 0-.141.03-.19.081l-.4.439h-.624l-.042-.046 4.445-4.445H24L23.986 12l.014-.014zM9.838 21.139l1.579-4.509h-.501l.297-.304h1.659l-1.563 4.555h.623l-.079.258H9.838zm3.695-7.516l.15.151-.269.922-.225.226h-.969l-.181-.181.311-.871.288-.247h.895zM5.59 20.829H3.877l-.262-.15V3.091H2.379l-.1-.1V1.815l.143-.154h7.371l.213.214v1.108l-.142.173H8.785v8.688l8.807-8.688h-2.086l-.175-.188V1.805l.121-.111h7.49l.132.133v1.07L12.979 13.25h-.373c-.015-.001-.028 0-.042.001l-.02.003c-.045.01-.086.03-.119.06l-.343.295-.004.003c-.033.031-.059.069-.073.111l-.296.83-6.119 6.276zm14.768-3.952l.474-.519h1.334l.309.415-1.265 4.107h.493l-.08.209H19.84l1.124-3.564h-2.015l-1.077 3.391h.424l-.073.174h-1.605l1.107-3.548h-2.096l-1.062 3.339h.436l-.072.209H13.27l1.514-4.46H14.198l.091-.271h1.65l.519.537h.906l.491-.554h1.061l.489.535h.953z",source:"https://commons.wikimedia.org/wiki/File:Vimlogo.svg",hex:"019733"},P6={title:"VSCodium",slug:"vscodium",get svg(){return De+"VSCodium"+Oe+this.path+Le},path:"M11.583.54a1.467 1.467 0 0 0-.441 2.032c2.426 3.758 2.999 6.592 2.75 9.075-1.004 4.756-3.187 5.721-5.094 5.721-1.863 0-1.364-3.065.036-3.962.836-.522 1.906-.861 2.728-.861.814 0 1.474-.658 1.474-1.47 0-.812-.66-1.47-1.474-1.47-.96 0-1.901.202-2.78.545.18-.847.246-1.762.014-2.735-.352-1.477-1.367-2.889-3.128-4.257a1.476 1.476 0 0 0-2.069.256c-.5.64-.384 1.564.259 2.063 1.435 1.114 1.908 1.939 2.07 2.618.162.679.032 1.407-.293 2.408-.416 1.349-.9 2.553-1.11 3.708-.105.568-.114 1.187-.14 1.68-1.034-1.006-1.438-2.336-1.438-4.279 0-.811-.66-1.47-1.474-1.47-.814.001-1.473.659-1.473 1.47 0 2.654.776 5.179 2.855 6.863 1.883 1.793 6.67 1.13 6.67 4.01 0 .812 1.19 1.208 2.004 1.208.834 0 1.885-.558 1.885-1.208 0-3.267 3.443-5.253 9.11-5.244A1.472 1.472 0 0 0 24 15.773 1.472 1.472 0 0 0 22.53 14.3c-.388 0-.765.013-1.138.035.634-1.49.915-3.13.857-4.903a1.473 1.473 0 0 0-1.522-1.42 1.472 1.472 0 0 0-1.425 1.517c.076 2.32-.01 4.393-1.74 5.485-.49.31-1.062.58-1.604.58.42-1.145.738-2.353.869-3.655.083-.83.091-1.818-.003-2.585-.148-1.188-.325-2.535.126-3.55.405-.874 1.313-1.24 2.645-1.24.814 0 1.473-.659 1.473-1.47 0-.811-.659-1.47-1.473-1.47-1.98 0-3.481 1.042-4.332 2.3-.445-.95-.987-1.929-1.642-2.943a1.474 1.474 0 0 0-2.037-.44z",source:"https://github.com/VSCodium/vscodium.github.io/blob/ed028c57f10e6432ec55dfc34d4db1a83fba941d/img/codium_cnl.svg",hex:"2F80ED"},e8={title:"WebStorm",slug:"webstorm",get svg(){return De+"WebStorm"+Oe+this.path+Le},path:"M0 0v24h24V0H0zm17.889 2.889c1.444 0 2.667.444 3.667 1.278l-1.111 1.667c-.889-.611-1.722-1-2.556-1s-1.278.389-1.278.889v.056c0 .667.444.889 2.111 1.333 2 .556 3.111 1.278 3.111 3v.056c0 2-1.5 3.111-3.611 3.111-1.5-.056-3-.611-4.167-1.667l1.278-1.556c.889.722 1.833 1.222 2.944 1.222.889 0 1.389-.333 1.389-.944v-.056c0-.556-.333-.833-2-1.278-2-.5-3.222-1.056-3.222-3.056v-.056c0-1.833 1.444-3 3.444-3zm-16.111.222h2.278l1.5 5.778 1.722-5.778h1.667l1.667 5.778 1.5-5.778h2.333l-2.833 9.944H9.723L8.112 7.277l-1.667 5.778H4.612L1.779 3.111zm.5 16.389h9V21h-9v-1.5z",source:"https://www.jetbrains.com/company/brand/logos",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand"},t8={title:"Windsurf",slug:"windsurf",get svg(){return De+"Windsurf"+Oe+this.path+Le},path:"M23.55 5.067c-1.2038-.002-2.1806.973-2.1806 2.1765v4.8676c0 .972-.8035 1.7594-1.7597 1.7594-.568 0-1.1352-.286-1.4718-.7659l-4.9713-7.1003c-.4125-.5896-1.0837-.941-1.8103-.941-1.1334 0-2.1533.9635-2.1533 2.153v4.8957c0 .972-.7969 1.7594-1.7596 1.7594-.57 0-1.1363-.286-1.4728-.7658L.4076 5.1598C.2822 4.9798 0 5.0688 0 5.2882v4.2452c0 .2147.0656.4228.1884.599l5.4748 7.8183c.3234.462.8006.8052 1.3509.9298 1.3771.313 2.6446-.747 2.6446-2.0977v-4.893c0-.972.7875-1.7593 1.7596-1.7593h.003a1.798 1.798 0 0 1 1.4718.7658l4.9723 7.0994c.4135.5905 1.05.941 1.8093.941 1.1587 0 2.1515-.9645 2.1515-2.153v-4.8948c0-.972.7875-1.7594 1.7596-1.7594h.194a.22.22 0 0 0 .2204-.2202v-4.622a.22.22 0 0 0-.2203-.2203Z",source:"https://windsurf.com/brand",hex:"0B100F",guidelines:"https://windsurf.com/brand"},n8={title:"Xcode",slug:"xcode",get svg(){return De+"Xcode"+Oe+this.path+Le},path:"M19.06 5.3327c.4517-.1936.7744-.2581 1.097-.1936.5163.1291.7744.5163.968.7098.1936.3872.9034.7744 1.2261.8389.2581.0645.7098-.6453 1.0325-1.2906.3227-.5808.5163-1.3552.4517-1.5488-.0645-.1936-.968-.5808-1.1616-.5808-.1291 0-.3872.1291-.8389.0645-.4517-.0645-.9034-.5808-1.1616-.968-.4517-.6453-1.097-1.0325-1.6778-1.3552-.6453-.3227-1.3552-.5163-2.065-.6453-1.0325-.2581-2.065-.4517-3.0975-.3227-.5808.0645-1.2906.1291-1.8069.3227-.0645 0-.1936.1936-.0645.1936s.5808.0645.5808.0645-.5807.1292-.5807.2583c0 .1291.0645.1291.1291.1291.0645 0 1.4842-.0645 2.065 0 .6453.1291 1.3552.4517 1.8069 1.2261.7744 1.4197.4517 2.7749.2581 3.2266-.968 2.1295-8.6472 15.2294-9.0344 16.1328-.3873.9034-.5163 1.4842.5807 2.065s1.6778.3227 2.0005-.0645c.3872-.5163 7.0339-17.1654 9.2925-18.2624zm-3.6138 8.7117h1.5488c1.0325 0 1.2261.5163 1.2261.7098.0645.5163-.1936 1.1616-1.2261 1.1616h-.968l.7744 1.2906c.4517.7744.2581 1.1616 0 1.4197-.3872.3872-1.2261.3872-1.6778-.4517l-.9034-1.5488c-.6453 1.4197-1.2906 2.9684-2.065 4.7753h4.0009c1.9359 0 3.5492-1.6133 3.5492-3.5492V6.5588c-.0645-.1291-.1936-.0645-.2581 0-.3872.4517-1.4842 2.0004-4.001 7.4856zm-9.8087 8.0019h-.3227c-2.3231 0-4.1945-1.8714-4.1945-4.1945V7.0105c0-2.3231 1.8714-4.1945 4.1945-4.1945h9.3571c-.1936-.1936-.968-.5163-1.7423-.4517-.3227 0-.968.1291-1.3552-.1291-.3872-.3227-.3227-.5163-.9034-.5163H4.9277c-2.6458 0-4.7753 2.1295-4.7753 4.7753v11.7447c0 2.6458 2.1295 4.7753 4.4527 4.7108.6452 0 .8388-.5162 1.0324-.9034zM20.4152 6.9459v10.9058c0 2.3231-1.8714 4.1945-4.1945 4.1945H11.897s-.3872 1.0325.8389 1.0325h3.8719c2.6458 0 4.7753-2.1295 4.7753-4.7753V8.8173c.0646-.9034-.7098-1.4842-.9679-1.8714zm-18.5851.0646v10.8413c0 1.9359 1.6133 3.5492 3.5492 3.5492h.5808c0-.0645.7744-1.4197 2.4522-4.2591.1936-.3872.4517-.7744.7098-1.2261H4.4114c-.5808 0-.9034-.3872-.968-.7098-.1291-.5163.1936-1.1616.9034-1.1616h2.3877l3.033-5.2916s-.7098-1.2906-.9034-1.6133c-.2582-.4517-.1291-.9034.129-1.1615.3872-.3872 1.0325-.5808 1.6778.4517l.2581.3872.2581-.3872c.5808-.8389.968-.7744 1.2906-.7098.5163.1291.8389.7098.3872 1.6133L8.864 14.0444h1.3552c.4517-.7744.9034-1.5488 1.3552-2.3877-.0645-.3227-.1291-.7098-.0645-1.0325.0645-.5163.3227-.968.6453-1.3552l.3872.6453c1.2261-2.1295 2.1295-3.9364 2.3877-4.6463.1291-.3872.3227-1.1616.1291-1.8069H5.3794c-2.0005.0001-3.5493 1.6134-3.5493 3.5494zM4.605 17.7872c0-.0645.7744-1.4197.7744-1.4197 1.2261-.3227 1.8069.4517 1.8714.5163 0 0-.8389 1.4842-1.097 1.7423s-.5808.3227-.9034.2581c-.5164-.129-.839-.6453-.6454-1.097z",source:"https://developer.apple.com/develop",hex:"147EFB"},l8={title:"YAML",slug:"yaml",get svg(){return De+"YAML"+Oe+this.path+Le},path:"m0 .97 4.111 6.453v4.09h2.638v-4.09L11.053.969H8.214L5.58 5.125 2.965.969Zm12.093.024-4.47 10.544h2.114l.97-2.345h4.775l.804 2.345h2.26L14.255.994Zm1.133 2.225 1.463 3.87h-3.096zm3.06 9.475v10.29H24v-2.199h-5.454v-8.091zm-12.175.002v10.335h2.217v-7.129l2.32 4.792h1.746l2.4-4.96v7.295h2.127V12.696h-2.904L9.44 17.37l-2.455-4.674Z",source:"https://commons.wikimedia.org/wiki/File:Official_YAML_Logo.svg",hex:"CB171E"},a8={title:"Zed Industries",slug:"zedindustries",get svg(){return De+"Zed Industries"+Oe+this.path+Le},path:"M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z",source:"https://github.com/zed-industries/zed/blob/ccc939124fa2f366b3029926447fd0a0c46a85c7/assets/icons/logo_96.svg",hex:"084CCF"},i8=[{label:"Default app",target:"default"},{label:"Open in folder",target:"folder"}],Nd=190,zd=172,is=8,c8={"android-studio":{icon:N6,kind:"simple"},bbedit:{Icon:Sl,kind:"lucide"},clion:{icon:z6,kind:"simple"},coteditor:{Icon:Sl,kind:"lucide"},cursor:{icon:M6,kind:"simple"},datagrip:{icon:C6,kind:"simple"},default:{Icon:th,kind:"lucide"},emacs:{icon:R6,kind:"simple"},fleet:{Icon:Sl,kind:"lucide"},folder:{Icon:Zd,kind:"lucide"},ghostty:{icon:A6,kind:"simple"},goland:{icon:O6,kind:"simple"},intellij:{icon:H6,kind:"simple"},iterm2:{icon:k6,kind:"simple"},lapce:{icon:q6,kind:"simple"},macvim:{icon:I6,kind:"simple"},neovide:{icon:V6,kind:"simple"},nova:{Icon:Sl,kind:"lucide"},phpstorm:{icon:Y6,kind:"simple"},pycharm:{icon:X6,kind:"simple"},rubymine:{icon:K6,kind:"simple"},sublime:{icon:J6,kind:"simple"},terminal:{Icon:fm,kind:"lucide"},textedit:{Icon:Qd,kind:"lucide"},textmate:{Icon:Sl,kind:"lucide"},vscodium:{icon:P6,kind:"simple"},vscode:{Icon:Sl,kind:"lucide"},"vscode-insiders":{Icon:Sl,kind:"lucide"},webstorm:{icon:e8,kind:"simple"},windsurf:{icon:t8,kind:"simple"},xcode:{icon:n8,kind:"simple"},zed:{icon:a8,kind:"simple"}};function v2({fileContent:a,filePath:u,openTargets:f,wordWrap:r,onActionMessage:h,onCopyFileContents:y,onOpenFile:E,onWordWrapChange:C}){const[x,p]=j.useState(!1),[T,O]=j.useState(!1),[k,q]=j.useState(null),[Q,se]=j.useState(null),pe=j.useRef(null),$=j.useRef(null),re=j.useRef(null),ye=j.useRef(null),K=j.useRef(null),je=j.useMemo(()=>f.length>0?f:i8,[f]),de=a!==void 0||y!==void 0,W=j.useCallback(()=>{p(!1),O(!1)},[]),he=j.useCallback(()=>{x&&q(cs(pe.current,Nd)),T&&se(cs(ye.current,zd))},[x,T]);j.useEffect(()=>{if(!(!x&&!T))return he(),window.addEventListener("resize",he),window.addEventListener("scroll",he,!0),()=>{window.removeEventListener("resize",he),window.removeEventListener("scroll",he,!0)}},[x,T,he]),j.useEffect(()=>{if(!x&&!T)return;const te=b=>{var I,ge,ve;const U=b.target;!((I=re.current)!=null&&I.contains(U))&&!((ge=$.current)!=null&&ge.contains(U))&&!((ve=K.current)!=null&&ve.contains(U))&&W()},ze=b=>{b.key==="Escape"&&W()};return window.addEventListener("pointerdown",te),window.addEventListener("keydown",ze),()=>{window.removeEventListener("pointerdown",te),window.removeEventListener("keydown",ze)}},[x,W,T]);const fe=async(te,ze)=>{W();try{await navigator.clipboard.writeText(te),h==null||h(`${ze} copied`)}catch(b){h==null||h(`Could not copy ${ze.toLowerCase()}: ${qo(b)}`)}},le=async()=>{W();try{const te=a??await(y==null?void 0:y());if(te===void 0)return;await navigator.clipboard.writeText(te),h==null||h("File contents copied")}catch(te){h==null||h(`Could not copy file contents: ${qo(te)}`)}},me=async(te,ze)=>{W(),h==null||h(`Opening in ${ze}`);try{await E(te),h==null||h(`Opened in ${ze}`)}catch(b){h==null||h(`Could not open in ${ze}: ${qo(b)}`)}},G=x&&k?Hi.createPortal(s.jsxs("div",{className:"file-actions-popover actions",ref:$,role:"menu",style:k,children:[s.jsxs("button",{role:"menuitem",type:"button",onClick:()=>fe(u,"Path"),children:[s.jsx(xh,{size:16}),s.jsx("span",{children:"Copy path"})]}),de?s.jsxs("button",{role:"menuitem",type:"button",onClick:le,children:[s.jsx(Qd,{size:16}),s.jsx("span",{children:"Copy file contents"})]}):null,C?s.jsxs("button",{"aria-checked":!!r,role:"menuitemcheckbox",type:"button",onClick:()=>{C(!r),W()},children:[s.jsx(Jd,{size:16}),s.jsxs("span",{children:[r?"Disable":"Enable"," word wrap"]})]}):null]}),document.body):null,ne=T&&Q?Hi.createPortal(s.jsx("div",{className:"file-actions-popover open",ref:K,role:"menu",style:Q,children:je.map((te,ze)=>s.jsxs("button",{className:ze===je.length-1?"separated":"",role:"menuitem",type:"button",onClick:()=>me(te.target,te.label),children:[s.jsx(s8,{option:te}),s.jsx("span",{children:te.label})]},te.target))}),document.body):null;return s.jsxs("div",{className:"file-actions-menu",ref:re,children:[s.jsxs("div",{className:"file-actions-menu-group",children:[s.jsx("button",{"aria-expanded":x,"aria-haspopup":"menu","aria-label":"File actions",className:"icon-button file-actions-menu-trigger",ref:pe,type:"button",onClick:()=>{q(cs(pe.current,Nd)),p(te=>!te),O(!1)},children:s.jsx(Eh,{size:17})}),G]}),s.jsxs("div",{className:"file-actions-menu-group",children:[s.jsxs("button",{"aria-expanded":T,"aria-haspopup":"menu",className:"file-actions-open-button",ref:ye,type:"button",onClick:()=>{se(cs(ye.current,zd)),O(te=>!te),p(!1)},children:[s.jsx(Nh,{size:16}),s.jsx("span",{children:"Open"}),s.jsx(Kl,{size:15})]}),ne]})]})}function cs(a,u){if(!a)return null;const f=a.getBoundingClientRect(),r=Math.max(is,window.innerWidth-f.right),h=Math.max(is,window.innerWidth-u-is);return{right:Math.min(r,h),top:f.bottom+is}}function s8({option:a}){const u=c8[a.target];return u.kind==="simple"?s.jsx("svg",{"aria-hidden":"true",className:"file-actions-brand-icon",focusable:"false",role:"img",style:{color:u8(u.icon)},viewBox:"0 0 24 24",children:s.jsx("path",{d:u.icon.path})}):s.jsx(u.Icon,{"aria-hidden":"true",className:"file-actions-target-icon",size:16})}function u8(a){return a.hex==="000000"?"var(--ide-fg-muted)":`#${a.hex}`}function qo(a){return a instanceof Error?a.message:String(a)}const o8={bash:_6,css:T6,go:D6,html:L6,js:U6,json:B6,jsx:wd,markdown:G6,python:Q6,ruby:Z6,rust:$6,swift:F6,ts:W6,tsx:wd,yaml:l8};function r8(a,u=!1){if(!a||u)return null;const f=o8[a];return f?{icon:f,color:d8(f.hex)}:null}function f8({isBinary:a=!1,language:u}){const f=r8(u,a);return f?s.jsx("span",{"aria-hidden":"true",className:"file-language-icon",style:{color:f.color},title:`${f.icon.title} file`,children:s.jsx("svg",{"aria-hidden":"true",className:"file-language-icon-svg",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:f.icon.path})})}):s.jsx("span",{"aria-hidden":"true",className:"file-language-icon",title:"File",children:s.jsx(e1,{size:17})})}function d8(a){const u=a.trim().replace(/^#/,"");if(!/^[\dA-Fa-f]{6}$/.test(u))return"currentColor";const f=Number.parseInt(u.slice(0,2),16),r=Number.parseInt(u.slice(2,4),16),h=Number.parseInt(u.slice(4,6),16),y=(.2126*f+.7152*r+.0722*h)/255;return y<.15||y>.9?"currentColor":`#${u}`}function h8({file:a,collapsed:u,viewed:f,onToggle:r,onCopyFileContents:h,onViewedChange:y,onOpenFile:E,openTargets:C}){return s.jsxs("div",{className:"file-header",children:[s.jsxs("button",{className:"file-header-toggle",type:"button",onClick:r,children:[u?s.jsx(Xd,{size:18}):s.jsx(Kl,{size:18}),s.jsx(f8,{isBinary:a.isBinary,language:a.language}),s.jsx("span",{className:"file-path",children:a.path}),a.oldPath&&a.oldPath!==a.path?s.jsxs("span",{className:"rename-path",children:["from ",a.oldPath]}):null]}),s.jsxs("span",{className:"stat add",children:["+",a.additions]}),s.jsxs("span",{className:"stat del",children:["-",a.deletions]}),s.jsxs("label",{className:"viewed-toggle",children:[s.jsx("input",{type:"checkbox",checked:f,onChange:x=>y(x.currentTarget.checked)}),s.jsx("span",{children:"Viewed"})]}),s.jsx(v2,{filePath:a.path,openTargets:C,onCopyFileContents:h,onOpenFile:async x=>E(x)})]})}const m8=[];function p8({activeFilePath:a=null,contextSource:u,emptyState:f=null,files:r,record:h,diff:y=h.diff,readOnly:E=!1,reviewId:C,turnId:x,wrapLines:p=!1,viewedFiles:T=new Set,onViewedChange:O=()=>{},openTargets:k=m8,selectedSourcePeek:q=null,onCopyFileContents:Q,onOpenFile:se=()=>{},onSourcePeek:pe=()=>{},hiddenFiles:$=new Map,onRevealHiddenFile:re=()=>{}}){const[ye,K]=j.useState(new Set),je=j.useRef(a),de=jt(le=>le.draft),W=jt(le=>le.setDraft),he=r??y.files;if(a!==je.current&&(je.current=a,a&&ye.has(a))){const le=new Set(ye);le.delete(a),K(le)}const fe=(le,me)=>{me&&((de==null?void 0:de.filePath)===le&&W(null),K(G=>{const ne=new Set(G);return ne.add(le),ne})),O(le,me)};return s.jsx("section",{className:"diff-stack",children:he.length===0?f??s.jsx(v8,{record:h}):he.map(le=>{const me=ye.has(le.path),G=$.get(le.path)??null;return s.jsxs("article",{className:`file-card ${a===le.path?"active":""}`,id:f1(le.path),children:[s.jsx(h8,{file:le,openTargets:k,collapsed:me,viewed:T.has(le.path),onToggle:()=>{!me&&(de==null?void 0:de.filePath)===le.path&&W(null),K(ne=>{const te=new Set(ne);return te.has(le.path)?te.delete(le.path):te.add(le.path),te})},onCopyFileContents:Q?()=>Q(le.path):void 0,onViewedChange:ne=>fe(le.path,ne),onOpenFile:ne=>se(le.path,ne)}),me?null:G?s.jsx(y8,{info:G,onReveal:()=>re(le.path)}):s.jsx(b8,{contextSource:u,file:le,readOnly:E,reviewId:C,selectedSourcePeek:q,turnId:x,wrapLines:p,onSourcePeek:pe},`${le.oldPath??""}:${le.path}:${T8(C,x,u)}`)]},`${le.oldPath??le.path}:${le.path}`)})})}function y8({info:a,onReveal:u}){const f=g8(a.presetLabels);return s.jsxs("div",{className:"hidden-diff-placeholder",children:[s.jsxs("div",{className:"hidden-diff-skeleton","aria-hidden":"true",children:[s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{})]}),s.jsxs("div",{className:"hidden-diff-message",children:[s.jsx("button",{className:"hidden-diff-load",type:"button",onClick:u,children:"Load diff"}),s.jsxs("p",{children:[f," are not rendered by default."]})]})]})}function g8(a){return a.length===0?"Files matching selected presets":a.length===1?a[0]:a.length===2?`${a[0]} and ${Go(a[1])}`:`${a.slice(0,-1).map((u,f)=>f===0?u:Go(u)).join(", ")}, and ${Go(a[a.length-1])}`}function Go(a){return`${a.charAt(0).toLowerCase()}${a.slice(1)}`}function v8({record:a}){const u=a.diff.scope;return u.mode==="branch"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No branch changes"}),s.jsxs("p",{children:["Working tree is clean, and ",u.comparison.ref," matches ",u.base.ref,"."]})]}):u.fallbackReason==="missing-branch-base"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No changes to review"}),s.jsx("p",{children:"Working tree is clean and no upstream or default branch ref was found."})]}):u.mode==="explicit"?s.jsxs("div",{className:"empty-diff",children:[s.jsxs("h2",{children:["No changes against ",u.base.ref]}),s.jsx("p",{children:"The captured diff for this explicit base is empty."})]}):s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No working changes"}),s.jsx("p",{children:"Working tree is clean."})]})}function b8({contextSource:a,file:u,readOnly:f,reviewId:r,selectedSourcePeek:h,turnId:y,wrapLines:E,onSourcePeek:C}){const x=jt(H=>H.comments),p=jt(H=>H.resolution),T=jt(H=>H.draft),O=jt(H=>H.setDraft),k=jt(H=>H.updateComment),{resolvedTheme:q}=u1(),[Q,se]=j.useState(null),[pe,$]=j.useState(null),[re,ye]=j.useState(null),[K,je]=j.useState(null),[de,W]=j.useState({}),he=j.useRef(null),fe=j.useRef(null),le=j.useRef(null),me=j.useMemo(()=>o1(u),[u]),G=j.useMemo(()=>new Map(me.map(H=>[H.beforeHunkIndex,H])),[me]),ne=j.useMemo(()=>w6(u,de),[de,u]),te=(K==null?void 0:K.file)===ne&&K.theme===q?K.lines:null,ze=j.useMemo(()=>E6(u,de),[de,u]),b=j.useMemo(()=>M8(ze),[ze]),U=j.useMemo(()=>new Map(((p==null?void 0:p.comments)??[]).map(H=>[H.commentId,H])),[p]),I=x.filter(H=>Oi(H)&&H.filePath===u.path),ge=(re==null?void 0:re.id)??null,ve=Q&&pe&&Q.filePath===u.path&&Q.side===pe.side?Fo(b,Q.side,Q.line,pe.line):null,g=T&&T.filePath===u.path?Fo(b,T.side,T.startLine,T.endLine):null,_=H=>{const{start:V,end:ue}=H,be=Math.min(V.line,ue.line),Ge=Math.max(V.line,ue.line),Ve=C8(ze,b,V.side,be,Ge)||V.snippet;O({filePath:u.path,side:V.side,startLine:be,endLine:Ge,originalSnippet:Ve})},X=()=>{!re||re.body.trim().length===0||(k(re.id,re.body),ye(null))};j.useEffect(()=>()=>{var H;return(H=fe.current)==null?void 0:H.call(fe)},[]),j.useEffect(()=>{var H;ge&&((H=le.current)==null||H.focus({preventScroll:!0}))},[ge]);const J=H=>{var be;if(H.dataset.filePath!==u.path)return null;const V=H.dataset.side,ue=Number(H.dataset.line);return V!=="L"&&V!=="R"||!Number.isFinite(ue)?null:{filePath:u.path,side:V,line:ue,snippet:((be=H.querySelector("code"))==null?void 0:be.textContent)??""}},B=H=>{const V=J(H);V&&Ce(V)},Y=(H,V)=>{var Ve;if(V.button!==0)return;V.preventDefault(),(Ve=fe.current)==null||Ve.call(fe),he.current={start:H,end:H},se(H),$(H);const ue=Mt=>{var At;const Ct=(At=document.elementFromPoint(Mt.clientX,Mt.clientY))==null?void 0:At.closest(".diff-row");Ct&&B(Ct)},be=Mt=>{ue(Mt);const Ct=he.current;Ct&&_(Ct),Ne()},Ge=()=>Ne();window.addEventListener("mousemove",ue),window.addEventListener("mouseup",be),window.addEventListener("blur",Ge),fe.current=()=>{window.removeEventListener("mousemove",ue),window.removeEventListener("mouseup",be),window.removeEventListener("blur",Ge),fe.current=null}},Z=(H,V)=>{var ue;V.key!=="Enter"&&V.key!==" "||V.repeat||V.defaultPrevented||V.nativeEvent.isComposing||(V.preventDefault(),(ue=fe.current)==null||ue.call(fe),he.current=null,se(null),$(null),_({start:H,end:H}))},Ce=H=>{const V=he.current;(V==null?void 0:V.start.filePath)===u.path&&V.start.side===H.side&&(he.current={...V,end:H},$(H))},Ne=()=>{var H;(H=fe.current)==null||H.call(fe),he.current=null,se(null),$(null)},ct=async(H,V)=>{if(!r||!a)return;const ue=x6(H,de[H.id],V);if(ue){W(be=>{var Ge;return{...be,[H.id]:{lines:((Ge=be[H.id])==null?void 0:Ge.lines)??[],loading:!0,error:null}}});try{const be=await X5({reviewId:r,filePath:H.filePath,oldPath:H.oldPath,turnId:y,source:a,...ue});W(Ge=>({...Ge,[H.id]:j6(H,Ge[H.id],be.lines)}))}catch(be){W(Ge=>{var Ve;return{...Ge,[H.id]:{lines:((Ve=Ge[H.id])==null?void 0:Ve.lines)??[],loading:!1,error:be instanceof Error?be.message:String(be)}}})}}};j.useEffect(()=>{let H=!1;return u2(async()=>{const{highlightDiffFile:V}=await import("./syntax-CbLXtdvg.js");return{highlightDiffFile:V}},[]).then(({highlightDiffFile:V})=>V(ne,q)).then(V=>{H||je({file:ne,lines:V,theme:q})}).catch(()=>{H||je({file:ne,lines:null,theme:q})}),()=>{H=!0}},[ne,q]);const lt=(H,V)=>{const ue=c1(H),be=s1(H);if(be==null)return null;const Ge={filePath:u.path,side:ue,line:be,snippet:H.content},Ve=b.get(ki(ue,be)),Mt=Ve!=null&&Md(Ve,ve)?ve:Ve!=null&&Md(Ve,g)?g:null,Ct=Ve!=null&&Mt?z8(Ve,Mt.start,Mt.end):"",At=T&&T.filePath===u.path&&T.side===ue&&be===T.endLine,Kt=I.filter(He=>He.side===ue&&be===Math.max(He.startLine,He.endLine));return s.jsxs("div",{children:[s.jsxs("div",{className:`diff-row ${H.type} ${f?"read-only":""} ${Ct} ${At?"range-continues":""}`,"data-file-path":u.path,"data-line":be,"data-side":ue,children:[Ct?s.jsx("span",{className:"selection-rail","aria-hidden":"true"}):null,s.jsxs("div",{className:"diff-gutter",children:[s.jsx("span",{className:"line-number old",children:H.oldLine??""}),s.jsx("span",{className:"line-number new",children:H.newLine??""}),s.jsx("span",{className:"marker",children:b2(H)}),f?null:s.jsx("button",{"aria-label":`Comment on ${u.path} line ${be}`,className:"comment-handle",type:"button",onMouseDown:He=>Y(Ge,He),onKeyDown:He=>Z(Ge,He),children:s.jsx($d,{size:16,strokeWidth:2.4})})]}),s.jsx(E8,{content:H.content,selectedSourcePeek:h&&h.filePath===u.path&&h.oldPath===u.oldPath&&h.side===ue&&h.line===be?h:null,tokens:(te==null?void 0:te.get(ki(ue,be)))??null,onSourcePeek:(He,Ie)=>C({column:Ie,filePath:u.path,line:be,oldPath:u.oldPath,side:ue,symbol:He})})]}),Kt.map(He=>{const Ie=U.get(He.id),Yn=(re==null?void 0:re.id)===He.id;return s.jsxs("div",{className:`inline-comment ${Ie?"resolved":"open"} ${Yn?"editing":""}`,"data-comment-id":He.id,children:[Ie?s.jsx(Po,{size:14}):s.jsx(Ql,{size:14}),s.jsxs("div",{className:"inline-comment-content",children:[f?s.jsx("span",{className:"inline-comment-status",children:Ie?"Resolved":"Open · Needs fix"}):null,Yn?s.jsxs("form",{className:"inline-comment-edit-form",onSubmit:zt=>{zt.preventDefault(),X()},children:[s.jsx("textarea",{"aria-label":"Edit comment",ref:le,value:re.body,onChange:zt=>ye({id:He.id,body:zt.target.value}),onKeyDown:zt=>{zt.key==="Escape"?(zt.preventDefault(),ye(null)):rs(zt)&&(zt.preventDefault(),X())}}),s.jsxs("div",{className:"inline-comment-edit-actions",children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>ye(null),children:"Cancel"}),s.jsxs("button",{className:"primary-button",type:"submit",disabled:re.body.trim().length===0,children:[s.jsx(vn,{size:14}),"Save"]})]})]}):s.jsx("span",{className:"inline-comment-body",children:He.body}),Ie!=null&&Ie.summary?s.jsx("span",{className:"inline-comment-summary",children:Ie.summary}):null]}),!f&&!Yn?s.jsx("button",{"aria-label":"Edit comment",className:"inline-comment-edit-button",title:"Edit comment",type:"button",onClick:()=>ye({id:He.id,body:He.body}),children:s.jsx(Kd,{size:13})}):null]},He.id)}),At&&!f?s.jsx(g6,{tone:H.type}):null]},`${V}:${H.type}:${H.oldLine??"x"}:${H.newLine??"x"}:${H.content}`)},Je=H=>S6(H,de[H.id]).map(V=>{var ue,be;return V.type==="lines"?V.lines.map(Ge=>lt(Ge,`context:${H.id}`)):s.jsx(S8,{canExpand:!!(r&&a),directions:b6(H,V),error:((ue=de[H.id])==null?void 0:ue.error)??null,loading:((be=de[H.id])==null?void 0:be.loading)??!1,segment:V,onExpand:Ge=>{ct(H,Ge)}},`hidden:${H.id}:${V.oldStart}:${V.newStart}:${V.lineCount}`)});return s.jsx("section",{"aria-label":`${u.path} diff`,className:`diff-scroller ${E?"wrap-lines":""}`,children:s.jsxs("div",{className:`diff-table ${Q?"selecting":""}`,children:[u.isBinary?s.jsx("div",{className:"binary-note",children:"Binary file changed"}):null,u.hunks.map((H,V)=>{const ue=G.get(V);return s.jsxs("div",{className:"hunk",children:[ue?Je(ue):null,s.jsx("div",{className:"hunk-header",children:H.header||`@@ -${H.oldStart},${H.oldLines} +${H.newStart},${H.newLines} @@`}),H.lines.map(be=>lt(be,"hunk"))]},`${H.oldStart}:${H.newStart}`)})]})},E?"wrapped":"unwrapped")}function S8({canExpand:a,directions:u,error:f,loading:r,segment:h,onExpand:y}){const E=!a||!!r;return s.jsxs("div",{className:"hidden-lines",children:[s.jsxs("div",{className:"hidden-lines-main",children:[s.jsx("span",{className:"hidden-lines-count",children:r?s.jsxs(s.Fragment,{children:[s.jsx(t1,{className:"spin",size:14}),"Loading context"]}):`${h.lineCount} unmodified ${h.lineCount===1?"line":"lines"}`}),s.jsx("div",{className:"hidden-lines-actions",children:u.map(C=>{const x=x8(C);return s.jsx("button",{"aria-label":x,className:"hidden-lines-action",disabled:E,title:x,type:"button",onClick:()=>y(C),children:s.jsx(j8,{direction:C,directions:u})},C)})})]}),f?s.jsx("div",{className:"hidden-lines-error",children:f}):null]})}function x8(a){return a==="up"?"Expand hidden context upward":a==="down"?"Expand hidden context downward":"Expand more hidden context"}function j8({direction:a,directions:u}){return a==="up"?s.jsx(sh,{size:15}):a==="down"?s.jsx(Kl,{size:15}):u.length===2&&u[0]==="up"?s.jsx(hh,{size:15}):u.length===2&&u[0]==="down"?s.jsx(oh,{size:15}):s.jsx(fh,{size:15})}function E8({content:a,selectedSourcePeek:u,tokens:f,onSourcePeek:r}){return!f||f.length===0?s.jsx("code",{children:s.jsx(Td,{offsetBase:0,selectedSourcePeek:u,text:a||" ",onSourcePeek:r})}):s.jsx("code",{children:f.map(h=>{const y=N8(h);return s.jsx("span",{style:y,children:s.jsx(Td,{offsetBase:h.offset,selectedSourcePeek:u,style:y,text:h.content,onSourcePeek:r})},`${h.offset}:${h.content}`)})})}const Vo=/[A-Za-z_$][\w$]*/g,w8=new Set(["as","async","await","break","case","catch","class","const","continue","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","instanceof","interface","let","new","null","of","return","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]);function Td({offsetBase:a,selectedSourcePeek:u,style:f,text:r,onSourcePeek:h}){const y=[];let E=0;Vo.lastIndex=0;let C=Vo.exec(r);for(;C!==null;){const x=C[0],p=C.index;if(p>E&&y.push(r.slice(E,p)),w8.has(x))y.push(x);else{const T=a+p,O=(u==null?void 0:u.column)===T&&u.symbol===x;y.push(s.jsx("button",{"aria-current":O?"location":void 0,className:`source-symbol ${O?"selected":""}`,"data-source-symbol":x,style:f,tabIndex:-1,title:"Command-click or Control-click to peek source",type:"button",onClick:k=>{!k.metaKey&&!k.ctrlKey||(k.preventDefault(),k.stopPropagation(),h(x,T))},onMouseDown:k=>{(k.metaKey||k.ctrlKey)&&k.preventDefault()},onContextMenu:k=>{!k.metaKey&&!k.ctrlKey||(k.preventDefault(),k.stopPropagation(),h(x,T))},onKeyDown:k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),k.stopPropagation(),h(x,T))},children:x},`${a}:${p}:${x}`))}E=p+x.length,C=Vo.exec(r)}return E<r.length&&y.push(r.slice(E)),s.jsx(s.Fragment,{children:y.length>0?y:r})}function N8(a){const u={};a.color&&(u.color=a.color),a.fontStyle&&(a.fontStyle&1)!==0&&(u.fontStyle="italic"),a.fontStyle&&(a.fontStyle&2)!==0&&(u.fontWeight=700);const f=[];return a.fontStyle&&(a.fontStyle&4)!==0&&f.push("underline"),a.fontStyle&&(a.fontStyle&8)!==0&&f.push("line-through"),f.length>0&&(u.textDecorationLine=f.join(" ")),u}function b2(a){return a.type==="add"?"+":a.type==="delete"?"-":" "}function z8(a,u,f){return u===f?"range-selected range-single":a===u?"range-selected range-start":a===f?"range-selected range-end":"range-selected range-middle"}function T8(a,u,f){return!a||!f?"":f.mode==="turn"?`${a}:${u??""}:turn`:f.mode==="commit"?`${a}:${u??""}:commit:${f.sha}`:`${a}:${u??""}:range:${f.fromSha}:${f.toSha}`}function M8(a){const u=new Map;let f=0;for(const r of a){const h=c1(r),y=s1(r);y!=null&&(u.set(ki(h,y),f),f+=1)}return u}function Fo(a,u,f,r){const h=a.get(ki(u,f)),y=a.get(ki(u,r));return h==null||y==null?null:{start:Math.min(h,y),end:Math.max(h,y)}}function Md(a,u){return!!(u&&a>=u.start&&a<=u.end)}function C8(a,u,f,r,h){const y=[],E=Fo(u,f,r,h);if(!E)return"";a.forEach((x,p)=>{s1(x)!=null&&p>=E.start&&p<=E.end&&y.push(x)});const C=new Set(y.map(x=>x.type)).size>1;return y.map(x=>C?`${b2(x)}${x.content}`:x.content).join(`
311
+ ~/.gloss/reviews/<reviewId>/resolved.json`}),s.jsx("div",{className:"contract-copy",children:s.jsxs("p",{children:[s.jsx("code",{children:"feedback.json"})," is the machine-readable handoff; ",s.jsx("code",{children:"feedback.md"})," ","is the human-readable copy; ",s.jsx("code",{children:"resolved.json"})," tracks comment and review resolution progress."]})})]})]}),s.jsx("footer",{className:"marketing-footer",children:s.jsxs("a",{href:"https://github.com/iamrajjoshi/gloss",target:"_blank",rel:"noreferrer",children:[s.jsx(os,{size:16}),s.jsx("span",{children:"GitHub"})]})})]})}var Hi=Gd();const Am=["lockfiles","snapshots","generated","vendored"],Fd=[{id:"lockfiles",label:"Lockfiles"},{id:"snapshots",label:"Snapshots"},{id:"generated",label:"Generated"},{id:"vendored",label:"Vendored"}],_m=new Set(["package-lock.json","pnpm-lock.yaml","yarn.lock","Cargo.lock","Gemfile.lock","Pipfile.lock","poetry.lock","uv.lock","go.sum","composer.lock","mix.lock","flake.lock","deno.lock","Podfile.lock"]),Rm=["@generated","Code generated","DO NOT EDIT","automatically generated"];function Wd(a){const u=new Set,f=[a.path,a.oldPath].filter(r=>!!r);return f.some(Hm)&&u.add("lockfiles"),f.some(km)&&u.add("snapshots"),(f.some(Um)||qm(a))&&u.add("generated"),f.some(Bm)&&u.add("vendored"),u}function Dm(a,u){if(u.size===0)return!1;const f=Wd(a);for(const r of u)if(f.has(r))return!0;return!1}function Om(a,u){if(u.size===0)return{files:a,hidden:[]};const f=[],r=[];for(const h of a)(Dm(h,u)?r:f).push(h);return{files:f,hidden:r}}function Lm(a){if(!Array.isArray(a))return new Set;const u=new Set(Am);return new Set(a.filter(f=>u.has(String(f))))}function Hm(a){const u=l1(a);return _m.has(u)||/^bun\.lock/.test(u)}function km(a){const u=ps(a),f=l1(u);return u.split("/").includes("__snapshots__")||/\.snap(?:\.|$)/.test(f)||/\.snapshot(?:\.|$)/.test(f)}function Um(a){const u=ps(a),f=l1(u),r=u.split("/");return r.includes("__generated__")||r.includes("generated")||/\.generated\./.test(f)||/\.gen\./.test(f)||/\.pb\./.test(f)}function Bm(a){const u=ps(a).split("/");return u.includes("vendor")||u.includes("vendors")||u.includes("third_party")||u.includes("third-party")||u.includes("external")||u.includes("node_modules")||u.includes("bower_components")||u.includes("Pods")||u.includes("Carthage")||Vm(u,[".yarn","cache"])}function qm(a){for(const u of a.hunks)for(const f of u.lines)if(Gm(f.content))return!0;return!1}function Gm(a){const u=a.trim(),f=u.toLowerCase();return/^(\/\/|#|\/\*|\*|<!--|;|--)/.test(u)?Rm.some(r=>f.includes(r.toLowerCase())):!1}function Vm(a,u){return a.some((f,r)=>u.every((h,y)=>a[r+y]===h))}function ps(a){return a.replace(/\\/g,"/")}function l1(a){return ps(a).split("/").pop()??a}function Id(a,u,f="",r=""){return a.localeCompare(u,void 0,{sensitivity:"base"})||a.localeCompare(u)||f.localeCompare(r,void 0,{sensitivity:"base"})||f.localeCompare(r)}function Ym(a,u){return Id(a.path,u.path,a.oldPath??"",u.oldPath??"")}function Xm(a){return a.toSorted(Ym)}const Qm={mode:"all"};function Zm(a=Qm,u=[]){if(a.mode==="all")return"All commits";if(a.mode==="single"){const h=u.find(y=>y.commit.sha===a.sha);return h?`${h.commit.shortSha} ${h.commit.subject}`:`Commit ${Bo(a.sha)}`}const f=u.findIndex(h=>h.commit.sha===a.fromSha),r=u.findIndex(h=>h.commit.sha===a.toSha);return f>=0&&r>=f?`${r-f+1} commits · ${u[f].commit.shortSha} to ${u[r].commit.shortSha}`:`Commit range ${Bo(a.fromSha)} to ${Bo(a.toSha)}`}function Bo(a){return a.slice(0,7)}function md(a){var f;const u=(f=a.meta.branch??a.diff.branch)==null?void 0:f.trim();return u||Km(a.diff)}function Km(a){switch(a.scope.mode){case"branch":return"Branch diff";case"explicit":return`Diff against ${a.scope.requestedBase??a.base.ref}`;case"working":return"Working changes"}}function $m(a){return a==="submitted"||a==="resolved"}const Jm=["L","R"],Fm=["pending","submitted","cancelled","resolved"],Wm=["context","add","delete"],Im=["working","branch","explicit"],Pm=["working-tree-clean","missing-branch-base"],e5=500,t5=240,n5=["import","same-file","repo-search","module"],l5=["all","single","range"],a5=["partial","resolved"],i5=["human","agent","system"],c5=["claimed","working","blocked","completed","failed"],s5=["review-resolved","comment-resolved","comment-reopened","turn-created"],u5=["default","vscode","vscode-insiders","vscodium","cursor","sublime","zed","windsurf","webstorm","intellij","pycharm","goland","phpstorm","rubymine","clion","datagrip","android-studio","fleet","neovide","macvim","emacs","lapce","textmate","bbedit","coteditor","nova","textedit","xcode","terminal","iterm2","ghostty","folder"];function o5(a,u,f){const r=JSON.parse(a);return Pd(r,u,f)}function Pd(a,u,f){if(!u(a))throw new Error(`Invalid ${f}`);return a}function r5(a){return Be(a)&&ee(a.reviewId)&&tt(a.turnId)&&xl(a.turnIndex)&&ee(a.url)&&nt(a.files)&&xl(a.comments)&&tt(a.feedbackPath)&&tt(a.markdownPath)&&tt(a.artifactDir)}function f5(a){return Be(a)&&a.ok===!0&&ee(a.path)}function d5(a){return Be(a)&&Zt(a.targets,D5)}function h5(a){return Be(a)&&ee(a.filePath)&&ee(a.content)}function m5(a){return Be(a)&&ee(a.fromSha)&&ee(a.toSha)&&gs(a.stats)&&ee(a.rawDiff)&&Zt(a.files,a1)}function p5(a){return Be(a)&&ee(a.filePath)&&Zl(a.oldStart)&&Zl(a.newStart)&&Zt(a.lines,i2)}function y5(a){return Be(a)&&ee(a.symbol)&&ee(a.targetSymbol)&&ee(a.filePath)&&Zl(a.startLine)&&Zl(a.line)&&U5(a.column)&&Sn(a.language)&&ee(a.content)&&fn(a.truncated)&&Zl(a.totalLines)&&fn(a.hasMoreAbove)&&fn(a.hasMoreBelow)&&_5(a.matchReason)}function g5(a){return Be(a)&&ee(a.filePath)&&Zl(a.startLine)&&Zl(a.totalLines)&&ee(a.content)&&fn(a.truncated)&&fn(a.hasMoreAbove)&&fn(a.hasMoreBelow)}function v5(a){return Be(a)&&S5(a.meta)&&Zt(a.turns,j5)&&e2(a.diff)&&bn(a.feedback,t2)&&bn(a.resolution,n2)&&bn(a.events,u=>Zt(u,l2))}function b5(a){return Be(a)&&ee(a.id)&&ee(a.cwd)&&ys(a.base)&&Sn(a.branch)&&i1(a.status)&&ee(a.createdAt)&&tt(a.submittedAt)&&tt(a.resolvedAt)&&tt(a.artifactDir)&&tt(a.activeTurnId)&&bn(a.turns,u=>Zt(u,x5))&&tt(a.feedbackPath)&&tt(a.markdownPath)}function S5(a){return b5(a)&&ee(a.artifactDir)}function e2(a){return Be(a)&&ys(a.base)&&Sn(a.branch)&&ee(a.cwd)&&E5(a.scope)&&gs(a.stats)&&ee(a.rawDiff)&&Zt(a.files,a1)&&bn(a.commitDiffs,u=>Zt(u,z5))&&ee(a.capturedAt)}function t2(a){return Be(a)&&a.version===1&&ee(a.reviewId)&&tt(a.turnId)&&xl(a.turnIndex)&&ee(a.timestamp)&&ys(a.base)&&Sn(a.branch)&&bn(a.reviewScope,T5)&&Zt(a.comments,C5)}function n2(a){return Be(a)&&ee(a.reviewId)&&tt(a.turnId)&&xl(a.turnIndex)&&s2(a.status)&&Sn(a.summary)&&Sn(a.resolvedAt)&&Zt(a.comments,A5)}function l2(a){if(!Be(a)||!ee(a.reviewId)||!ee(a.type)||!k5(a))return!1;switch(a.type){case"review.opened":case"review.cancelled":return!0;case"review.turn.created":return ee(a.turnId)&&nt(a.turnIndex)&&fn(a.reused);case"review.submitted":return tt(a.turnId)&&xl(a.turnIndex)&&Be(a.counts)&&nt(a.counts.files)&&nt(a.counts.comments);case"review.updated":return tt(a.turnId)&&xl(a.turnIndex)&&O5(a.reason)&&i1(a.status)&&s2(a.resolutionStatus)&&c2(a.counts);case"agent.claimed":return ee(a.turnId)&&nt(a.turnIndex)&&a.status==="claimed"&&tt(a.message);case"agent.note":return tt(a.turnId)&&xl(a.turnIndex)&&bn(a.status,H5)&&ee(a.message);default:return!1}}function a2(a){return Be(a)&&ee(a.id)&&nt(a.index)&&i1(a.status)&&ee(a.createdAt)&&tt(a.submittedAt)&&tt(a.resolvedAt)&&ee(a.artifactDir)&&ee(a.diffPath)&&tt(a.feedbackPath)&&tt(a.markdownPath)&&tt(a.resolvedPath)}function x5(a){return!Be(a)||!a2(a)?!1:ee(a.capturedAt)&&gs(a.stats)&&c2(a.comments)}function j5(a){return!Be(a)||!a2(a)?!1:e2(a.diff)&&bn(a.feedback,t2)&&bn(a.resolution,n2)}function E5(a){return Be(a)&&an(a.mode,Im)&&Sn(a.requestedBase)&&ys(a.base)&&w5(a.comparison)&&(a.fallbackReason===null||an(a.fallbackReason,Pm))}function w5(a){return Be(a)&&ee(a.ref)&&Sn(a.sha)}function ys(a){return Be(a)&&ee(a.ref)&&ee(a.sha)}function gs(a){return Be(a)&&nt(a.files)&&nt(a.additions)&&nt(a.deletions)}function N5(a){return Be(a)&&ee(a.sha)&&ee(a.shortSha)&&ee(a.subject)&&ee(a.authorName)&&ee(a.authorEmail)&&ee(a.authoredAt)&&ee(a.committedAt)}function z5(a){return Be(a)&&N5(a.commit)&&gs(a.stats)&&ee(a.rawDiff)&&Zt(a.files,a1)}function T5(a){if(!Be(a)||!an(a.mode,l5))return!1;switch(a.mode){case"all":return!0;case"single":return ee(a.sha);case"range":return ee(a.fromSha)&&ee(a.toSha)}}function a1(a){return Be(a)&&ee(a.path)&&Sn(a.oldPath)&&nt(a.additions)&&nt(a.deletions)&&fn(a.isBinary)&&fn(a.isDeleted)&&fn(a.isNew)&&fn(a.isRenamed)&&Sn(a.language)&&Zt(a.hunks,M5)}function M5(a){return Be(a)&&nt(a.oldStart)&&nt(a.oldLines)&&nt(a.newStart)&&nt(a.newLines)&&ee(a.header)&&Zt(a.lines,i2)}function i2(a){return Be(a)&&an(a.type,Wm)&&pd(a.oldLine)&&pd(a.newLine)&&ee(a.content)}function C5(a){return Be(a)?a.kind==="general"?ee(a.id)&&ee(a.body)&&ee(a.createdAt):ee(a.id)&&(a.kind===void 0||a.kind==="line")&&ee(a.filePath)&&nt(a.startLine)&&nt(a.endLine)&&an(a.side,Jm)&&ee(a.body)&&ee(a.originalSnippet)&&ee(a.createdAt):!1}function A5(a){return Be(a)&&ee(a.commentId)&&a.status==="resolved"&&tt(a.summary)&&ee(a.resolvedAt)}function c2(a){return Be(a)&&nt(a.total)&&nt(a.resolved)&&nt(a.open)}function i1(a){return an(a,Fm)}function s2(a){return an(a,a5)}function _5(a){return an(a,n5)}function R5(a){return an(a,u5)}function D5(a){return Be(a)&&R5(a.target)&&ee(a.label)}function O5(a){return an(a,s5)}function L5(a){return an(a,i5)}function H5(a){return an(a,c5)}function k5(a){return tt(a.id)&&xl(a.seq)&&tt(a.createdAt)&&bn(a.actor,L5)}function Be(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function Zt(a,u){return Array.isArray(a)&&a.every(u)}function bn(a,u){return a===void 0||u(a)}function ee(a){return typeof a=="string"}function tt(a){return a===void 0||ee(a)}function Sn(a){return a===null||ee(a)}function nt(a){return typeof a=="number"&&Number.isFinite(a)}function Zl(a){return nt(a)&&Number.isInteger(a)&&a>0}function U5(a){return nt(a)&&Number.isInteger(a)&&a>=0}function xl(a){return a===void 0||nt(a)}function pd(a){return a===null||nt(a)}function fn(a){return typeof a=="boolean"}function an(a,u){return typeof a=="string"&&u.includes(a)}async function Vn(a,u,f){if(!a.ok)throw new Error(await B5(a));const r=await a.json();return Pd(r,u,f)}async function B5(a){const u=await a.text();return q5(u)??`${a.status}: ${u||a.statusText}`}function q5(a){try{const u=JSON.parse(a);if(typeof u=="object"&&u!==null&&!Array.isArray(u)&&typeof u.error=="string")return u.error}catch{}return null}async function yd(a){return Vn(await fetch(`/api/reviews/${a}`),v5,"review response")}async function G5(a,u,f){const r={comments:u,reviewScope:f};return Vn(await fetch(`/api/reviews/${a}/submit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)}),r5,"submit review response")}async function gd(a,u,f,r={}){const h={filePath:u,turnId:f,...r};return Vn(await fetch(`/api/reviews/${a}/files/open`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h)}),f5,"open file response")}async function V5(){return Vn(await fetch("/api/open-targets"),d5,"open targets response")}async function vd(a,u,f,r={}){const h={filePath:u,turnId:f,...r};return Vn(await fetch(`/api/reviews/${a}/files/content`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h)}),h5,"file content response")}async function Y5(a,u,f,r){const h={fromSha:u,toSha:f,turnId:r};return Vn(await fetch(`/api/reviews/${a}/commits/range`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h)}),m5,"commit range diff response")}async function X5({filePath:a,lineCount:u,newStart:f,oldPath:r,oldStart:h,reviewId:y,source:E,turnId:C}){const x={filePath:a,oldPath:r,turnId:C,source:E,oldStart:h,newStart:f,lineCount:u};return Vn(await fetch(`/api/reviews/${y}/files/context`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(x)}),p5,"diff context response")}async function Q5({column:a,filePath:u,line:f,oldPath:r,reviewId:h,side:y,source:E,symbol:C,turnId:x}){const p={filePath:u,oldPath:r,turnId:x,source:E,side:y,line:f,column:a,symbol:C};return Vn(await fetch(`/api/reviews/${h}/source-peek`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)}),y5,"source peek response")}async function Z5({filePath:a,lineCount:u,reviewId:f,side:r,source:h,startLine:y,turnId:E}){const C={filePath:a,turnId:E,source:h,side:r,startLine:y,lineCount:u};return Vn(await fetch(`/api/reviews/${f}/source-peek/range`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(C)}),g5,"source peek range response")}const K5="modulepreload",$5=function(a){return"/"+a},bd={},u2=function(u,f,r){let h=Promise.resolve();if(f&&f.length>0){let E=function(p){return Promise.all(p.map(T=>Promise.resolve(T).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const C=document.querySelector("meta[property=csp-nonce]"),x=(C==null?void 0:C.nonce)||(C==null?void 0:C.getAttribute("nonce"));h=E(f.map(p=>{if(p=$5(p),p in bd)return;bd[p]=!0;const T=p.endsWith(".css"),O=T?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${O}`))return;const k=document.createElement("link");if(k.rel=T?"stylesheet":K5,T||(k.as="script"),k.crossOrigin="",k.href=p,x&&k.setAttribute("nonce",x),document.head.appendChild(k),T)return new Promise((q,Q)=>{k.addEventListener("load",q),k.addEventListener("error",()=>Q(new Error(`Unable to preload CSS for ${p}`)))})}))}function y(E){const C=new Event("vite:preloadError",{cancelable:!0});if(C.payload=E,window.dispatchEvent(C),!C.defaultPrevented)throw E}return h.then(E=>{for(const C of E||[])C.status==="rejected"&&y(C.reason);return u().catch(y)})};function c1(a){return a.type==="delete"?"L":"R"}function s1(a){return c1(a)==="L"?a.oldLine:a.newLine}function ki(a,u){return`${a}:${u}`}function rs(a){return o2(a)&&!a.shiftKey}function J5(a){return o2(a)&&a.shiftKey===!0}function o2(a){var u;return a.key==="Enter"&&a.metaKey===!0&&a.ctrlKey!==!0&&a.altKey!==!0&&a.repeat!==!0&&a.defaultPrevented!==!0&&a.isComposing!==!0&&((u=a.nativeEvent)==null?void 0:u.isComposing)!==!0}const r2="0123456789ABCDEFGHJKMNPQRSTVWXYZ",fs=32,F5=16,f2=10,Sd=0xffffffffffff;var Vl;(function(a){a.Base32IncorrectEncoding="B32_ENC_INVALID",a.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",a.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",a.EncodeTimeNegative="ENC_TIME_NEG",a.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",a.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",a.PRNGDetectFailure="PRNG_DETECT",a.ULIDInvalid="ULID_INVALID",a.Unexpected="UNEXPECTED",a.UUIDInvalid="UUID_INVALID"})(Vl||(Vl={}));class Di extends Error{constructor(u,f){super(`${f} (${u})`),this.name="ULIDError",this.code=u}}function W5(a){const u=Math.floor(a()*fs)%fs;return r2.charAt(u)}function I5(a){const u=P5(),f=u&&(u.crypto||u.msCrypto)||null;if(typeof(f==null?void 0:f.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return f.getRandomValues(r),r[0]/256};if(typeof(f==null?void 0:f.randomBytes)=="function")return()=>f.randomBytes(1).readUInt8()/256;throw new Di(Vl.PRNGDetectFailure,"Failed to find a reliable PRNG")}function P5(){return n6()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function e6(a,u){let f="";for(;a>0;a--)f=W5(u)+f;return f}function t6(a,u=f2){if(isNaN(a))throw new Di(Vl.EncodeTimeValueMalformed,`Time must be a number: ${a}`);if(a>Sd)throw new Di(Vl.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Sd}: ${a}`);if(a<0)throw new Di(Vl.EncodeTimeNegative,`Time must be positive: ${a}`);if(Number.isInteger(a)===!1)throw new Di(Vl.EncodeTimeValueMalformed,`Time must be an integer: ${a}`);let f,r="";for(let h=u;h>0;h--)f=a%fs,r=r2.charAt(f)+r,a=(a-f)/fs;return r}function n6(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function xd(a,u){const f=I5(),r=Date.now();return t6(r,f2)+e6(F5,f)}const jd=a=>{let u;const f=new Set,r=(p,T)=>{const O=typeof p=="function"?p(u):p;if(!Object.is(O,u)){const k=u;u=T??(typeof O!="object"||O===null)?O:Object.assign({},u,O),f.forEach(q=>q(u,k))}},h=()=>u,C={setState:r,getState:h,getInitialState:()=>x,subscribe:p=>(f.add(p),()=>f.delete(p))},x=u=a(r,h,C);return C},l6=(a=>a?jd(a):jd),a6=a=>a;function i6(a,u=a6){const f=Ri.useSyncExternalStore(a.subscribe,Ri.useCallback(()=>u(a.getState()),[a,u]),Ri.useCallback(()=>u(a.getInitialState()),[a,u]));return Ri.useDebugValue(f),f}const Ed=a=>{const u=l6(a),f=r=>i6(u,r);return Object.assign(f,u),f},c6=(a=>a?Ed(a):Ed),jt=c6((a,u)=>({comments:[],resolution:null,draft:null,setDraft:f=>a({draft:f}),hydrateComments:f=>a({comments:f,resolution:null,draft:null}),hydrateReview:(f,r=null)=>a({comments:f,resolution:r,draft:null}),addComment:f=>{const r=u().draft;!r||f.trim().length===0||a(h=>({comments:[...h.comments,{kind:"line",id:xd(),filePath:r.filePath,side:r.side,startLine:Math.min(r.startLine,r.endLine),endLine:Math.max(r.startLine,r.endLine),body:f.trim(),originalSnippet:r.originalSnippet,createdAt:new Date().toISOString()}],draft:null}))},addGeneralComment:f=>{const r=f.trim();r.length!==0&&a(h=>({comments:[...h.comments,{kind:"general",id:xd(),body:r,createdAt:new Date().toISOString()}]}))},updateComment:(f,r)=>{const h=r.trim();h.length!==0&&a(y=>({comments:y.comments.map(E=>E.id===f?{...E,body:h}:E)}))},removeComment:f=>a(r=>({comments:r.comments.filter(h=>h.id!==f)})),reset:()=>a({comments:[],resolution:null,draft:null})})),d2="gloss:theme-preference",s6="(prefers-color-scheme: dark)",u6=new Set(["system","light","dark"]),h2=j.createContext(null);function o6(a){return!!(a&&u6.has(a))}function r6(a=m2()){if(!a)return"system";try{const u=a.getItem(d2);return o6(u)?u:"system"}catch{return"system"}}function f6(a,u=m2()){if(u)try{u.setItem(d2,a)}catch{}}function Jo(a){return a?"dark":"light"}function d6(a,u){return a==="system"?u:a}function h6(a,u=y6()){u&&(u.dataset.theme=a)}function m6({children:a}){const[u,f]=j.useState(()=>r6()),[r,h]=j.useState(()=>p6()),y=d6(u,r);j.useEffect(()=>{const x=p2();if(!x)return;const p=T=>{h(Jo(T.matches))};return h(Jo(x.matches)),typeof x.addEventListener=="function"?(x.addEventListener("change",p),()=>x.removeEventListener("change",p)):(x.addListener(p),()=>x.removeListener(p))},[]),j.useEffect(()=>{h6(y)},[y]);const E=j.useCallback(x=>{f6(x),f(x)},[]),C=j.useMemo(()=>({preference:u,resolvedTheme:y,setPreference:E}),[u,y,E]);return s.jsx(h2.Provider,{value:C,children:a})}function u1(){const a=j.useContext(h2);if(!a)throw new Error("useTheme must be used within ThemeProvider");return a}function p6(a=p2()){return Jo(!!(a!=null&&a.matches))}function m2(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function p2(){try{return typeof window>"u"||typeof window.matchMedia!="function"?null:window.matchMedia(s6)}catch{return null}}function y6(){return typeof document>"u"?null:document.documentElement}function g6({tone:a}){const u=jt(T=>T.draft),f=jt(T=>T.setDraft),r=jt(T=>T.addComment),[h,y]=j.useState(""),E=j.useRef(null);if(j.useEffect(()=>{var T;u&&((T=E.current)==null||T.focus({preventScroll:!0}))},[u]),!u)return null;const C=u.startLine===u.endLine?`Comment on line ${Li(u)}`:`Comment on range ${Li(u)}`,x=()=>{y(""),f(null)},p=()=>{r(h),y("")};return s.jsx("div",{className:`draft-comment-shell tone-${a}`,children:s.jsxs("div",{className:"draft-comment-card",children:[s.jsxs("div",{className:"draft-comment-title",children:[s.jsxs("span",{className:"draft-comment-heading",children:[s.jsx("span",{className:"draft-comment-icon","aria-hidden":"true",children:s.jsx(Vh,{size:15})}),s.jsx("span",{children:"Local comment"})]}),s.jsx("span",{className:"draft-comment-label",children:C})]}),s.jsx("textarea",{"aria-label":C,placeholder:"Request change",ref:E,value:h,onChange:T=>y(T.target.value),onKeyDown:T=>{rs(T)&&(T.preventDefault(),p())}}),s.jsxs("div",{className:"draft-comment-actions",children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:x,children:"Cancel"}),s.jsx("button",{"aria-keyshortcuts":"Meta+Enter",className:"primary-button",title:"Comment (Command+Enter)",type:"button",onClick:p,children:"Comment"})]})]})})}const y2=10;function v6(a,u){const f=u.oldStart-a.oldStart,r=f+u.lineCount-1,h=f>0,y=r<a.lineCount-1;return h&&y?"all":h?"down":y||a.beforeHunkIndex===0?"up":"all"}function b6(a,u){return u.lineCount<=y2?[v6(a,u)]:u.oldStart-a.oldStart>0||a.beforeHunkIndex>0?["up","all","down"]:["up","all"]}function o1(a){const u=[];let f=0,r=0;return a.hunks.forEach((h,y)=>{const E=h.oldStart>f+1?h.oldStart-f-1:0,C=h.newStart>r+1?h.newStart-r-1:0,x=Math.min(E,C);if(x>0){const p=f+1,T=r+1;u.push({id:`${a.path}:${p}:${T}:${x}`,beforeHunkIndex:y,filePath:a.path,oldPath:a.oldPath,oldStart:p,newStart:T,lineCount:x})}f=h.oldStart+h.oldLines-1,r=h.newStart+h.newLines-1}),u}function S6(a,u){const f=vs(a,u),r=g2(a,f),h=r1(a,u);if(r.length===0)return h.length>0?[{type:"lines",lines:h}]:[];const y=r[0]??0,E=r.at(-1)??a.lineCount-1,C=h.filter(p=>{const T=ds(a,p);return T!=null&&T<y}),x=h.filter(p=>{const T=ds(a,p);return T!=null&&T>E});return[...C.length>0?[{type:"lines",lines:C}]:[],{type:"hidden",oldStart:a.oldStart+y,newStart:a.newStart+y,lineCount:E-y+1},...x.length>0?[{type:"lines",lines:x}]:[]]}function x6(a,u,f,r=y2){const h=vs(a,u),y=g2(a,h);if(y.length===0)return null;let E,C;if(f==="all")E=y[0]??0,C=y.at(-1)??a.lineCount-1,C=Math.min(C,E+e5-1);else if(f==="down"){for(E=y[0]??0,C=E;C+1<a.lineCount&&!h.has(C+1);)C+=1;C=Math.min(C,E+r-1)}else{for(C=y.at(-1)??a.lineCount-1,E=C;E-1>=0&&!h.has(E-1);)E-=1;E=Math.max(E,C-r+1)}return{oldStart:a.oldStart+E,newStart:a.newStart+E,lineCount:C-E+1}}function j6(a,u,f){const r=vs(a,u);for(const h of f){const y=ds(a,h);y!=null&&r.set(y,h)}return{lines:Array.from(r.entries()).toSorted(([h],[y])=>h-y).map(([,h])=>h),loading:!1,error:null}}function r1(a,u){return Array.from(vs(a,u).entries()).toSorted(([f],[r])=>f-r).map(([,f])=>f)}function E6(a,u){const f=new Map(o1(a).map(r=>[r.beforeHunkIndex,r]));return a.hunks.flatMap((r,h)=>{const y=f.get(h);return[...y?r1(y,u[y.id]):[],...r.lines]})}function w6(a,u){const f=new Map(o1(a).map(h=>[h.beforeHunkIndex,h])),r=a.hunks.map((h,y)=>{const E=f.get(y),C=E?r1(E,u[E.id]):[];return C.length>0?{...h,lines:[...C,...h.lines]}:h});return{...a,hunks:r}}function g2(a,u){const f=[];for(let r=0;r<a.lineCount;r+=1)u.has(r)||f.push(r);return f}function vs(a,u){const f=new Map;if(!a||!u)return f;for(const r of u.lines){const h=ds(a,r);h!=null&&f.set(h,r)}return f}function ds(a,u){const f=u.oldLine==null?null:u.oldLine-a.oldStart;if(f!=null&&f>=0&&f<a.lineCount)return f;const r=u.newLine==null?null:u.newLine-a.newStart;return r!=null&&r>=0&&r<a.lineCount?r:null}function f1(a){return`gloss-file-${encodeURIComponent(a)}`}const De='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>',Oe='</title><path d="',Le='"/></svg>',N6={title:"Android Studio",slug:"androidstudio",get svg(){return De+"Android Studio"+Oe+this.path+Le},path:"M19.2693 10.3368c-.3321 0-.6026.2705-.6026.6031v9.8324h-1.7379l-3.3355-6.9396c.476-.5387.6797-1.286.5243-2.0009a2.2862 2.2862 0 0 0-1.2893-1.6248v-.8124c.0121-.2871-.1426-.5787-.4043-.7407-.1391-.0825-.2884-.1234-.4402-.1234a.8478.8478 0 0 0-.4318.1182c-.2701.1671-.4248.4587-.4123.7662l-.0003.721c-1.0149.3668-1.6619 1.4153-1.4867 2.5197a2.282 2.282 0 0 0 .5916 1.2103l-3.2096 6.9064H4.0928c-1.0949-.007-1.9797-.8948-1.9832-1.9896V5.016c-.0055 1.1024.8836 2.0006 1.9859 2.0062a2.024 2.024 0 0 0 .1326-.0037h14.7453s2.5343-.2189 2.8619 1.5392c-.2491.0287-.4449.2321-.4449.4889 0 .7115-.5791 1.2901-1.3028 1.2901h-.8183zM17.222 22.5366c.2347.4837.0329 1.066-.4507 1.3007-.1296.0629-.2666.0895-.4018.0927a.9738.9738 0 0 1-.3194-.0455c-.024-.0078-.046-.0209-.0694-.0305a.9701.9701 0 0 1-.2277-.1321c-.0247-.0192-.0495-.038-.0724-.0598-.0825-.0783-.1574-.1672-.21-.2757l-1.2554-2.6143-1.5585-3.2452a.7725.7725 0 0 0-.6995-.4443h-.0024a.792.792 0 0 0-.7083.4443l-1.5109 3.2452-1.2321 2.6464a.9722.9722 0 0 1-.7985.5795c-.0626.0053-.1238-.0024-.185-.0087-.0344-.0036-.069-.0053-.1025-.0124-.0489-.0103-.0954-.0278-.142-.0452-.0301-.0113-.0613-.0197-.0901-.0339-.0496-.0244-.0948-.0565-.1397-.0889-.0217-.0156-.0457-.0275-.0662-.045a.9862.9862 0 0 1-.1695-.1844.9788.9788 0 0 1-.0708-.9852l.8469-1.8223 3.2676-7.0314a1.7964 1.7964 0 0 1-.7072-1.1637c-.1555-.9799.5129-1.9003 1.4928-2.0559V9.3946a.3542.3542 0 0 1 .1674-.3155.3468.3468 0 0 1 .3541 0 .354.354 0 0 1 .1674.3155v1.159l.0129.0064a1.8028 1.8028 0 0 1 1.2878 1.378 1.7835 1.7835 0 0 1-.6439 1.7836l3.3889 7.0507.8481 1.7643zM12.9841 12.306c.0042-.6081-.4854-1.1044-1.0935-1.1085a1.1204 1.1204 0 0 0-.7856.3219 1.101 1.101 0 0 0-.323.7716c-.0042.6081.4854 1.1044 1.0935 1.1085h.0077c.6046 0 1.0967-.488 1.1009-1.0935zm-1.027 5.2768c-.1119.0005-.2121.0632-.2571.1553l-1.4127 3.0342h3.3733l-1.4564-3.0328a.274.274 0 0 0-.2471-.1567zm8.1432-6.7459l-.0129-.0001h-.8177a.103.103 0 0 0-.103.103v12.9103a.103.103 0 0 0 .0966.103h.8435c.9861-.0035 1.7836-.804 1.7836-1.79V9.0468c0 .9887-.8014 1.7901-1.7901 1.7901zM2.6098 5.0161v.019c.0039.816.6719 1.483 1.4874 1.4869a12.061 12.061 0 0 1 .1309-.0034h1.1286c.1972-1.315.7607-2.525 1.638-3.4859H4.0993c-.9266.0031-1.6971.6401-1.9191 1.4975.2417.0355.4296.235.4296.4859zm6.3381-2.8977L7.9112.3284a.219.219 0 0 1 0-.2189A.2384.2384 0 0 1 8.098 0a.219.219 0 0 1 .1867.1094l1.0496 1.8158a6.4907 6.4907 0 0 1 5.3186 0L15.696.1094a.2189.2189 0 0 1 .3734.2189l-1.0302 1.79c1.6671.9125 2.7974 2.5439 3.0975 4.4018l-12.286-.0014c.3004-1.8572 1.4305-3.488 3.0972-4.4003zm5.3774 2.6202a.515.515 0 0 0 .5271.5028.515.515 0 0 0 .5151-.5151.5213.5213 0 0 0-.8885-.367.5151.5151 0 0 0-.1537.3793zm-5.7178-.0067a.5151.5151 0 0 0 .5207.5095.5086.5086 0 0 0 .367-.1481.5215.5215 0 1 0-.734-.7341.515.515 0 0 0-.1537.3727z",source:"https://developer.android.com/studio",hex:"3DDC84"},z6={title:"CLion",slug:"clion",get svg(){return De+"CLion"+Oe+this.path+Le},path:"M0 0v24h24V0H0zm7.041 3a5.049 5.049 0 0 1 .219 0c1.86 0 3 .6 3.9 1.56L9.78 6.18C9 5.46 8.22 5.04 7.26 5.04c-1.68 0-2.88 1.38-2.88 3.12 0 1.68 1.2 3.12 2.88 3.12 1.14 0 1.86-.48 2.64-1.14l1.38 1.38c-1.02 1.08-2.16 1.8-4.08 1.8a5.1 5.1 0 0 1-5.1-5.16A5.049 5.049 0 0 1 7.04 3zm5.738.12H15v8.1h4.32v1.86h-6.54V3.12zM2.28 19.5h9V21h-9v-1.5Z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},T6={title:"CSS",slug:"css",get svg(){return De+"CSS"+Oe+this.path+Le},path:"M0 0v20.16A3.84 3.84 0 0 0 3.84 24h16.32A3.84 3.84 0 0 0 24 20.16V3.84A3.84 3.84 0 0 0 20.16 0Zm14.256 13.08c1.56 0 2.28 1.08 2.304 2.64h-1.608c.024-.288-.048-.6-.144-.84-.096-.192-.288-.264-.552-.264-.456 0-.696.264-.696.84-.024.576.288.888.768 1.08.72.288 1.608.744 1.92 1.296q.432.648.432 1.656c0 1.608-.912 2.592-2.496 2.592-1.656 0-2.4-1.032-2.424-2.688h1.68c0 .792.264 1.176.792 1.176.264 0 .456-.072.552-.24.192-.312.24-1.176-.048-1.512-.312-.408-.912-.6-1.32-.816q-.828-.396-1.224-.936c-.24-.36-.36-.888-.36-1.536 0-1.44.936-2.472 2.424-2.448m5.4 0c1.584 0 2.304 1.08 2.328 2.64h-1.608c0-.288-.048-.6-.168-.84-.096-.192-.264-.264-.528-.264-.48 0-.72.264-.72.84s.288.888.792 1.08c.696.288 1.608.744 1.92 1.296.264.432.408.984.408 1.656.024 1.608-.888 2.592-2.472 2.592-1.68 0-2.424-1.056-2.448-2.688h1.68c0 .744.264 1.176.792 1.176.264 0 .456-.072.552-.24.216-.312.264-1.176-.048-1.512-.288-.408-.888-.6-1.32-.816-.552-.264-.96-.576-1.2-.936s-.36-.888-.36-1.536c-.024-1.44.912-2.472 2.4-2.448m-11.031.018c.711-.006 1.419.198 1.839.63.432.432.672 1.128.648 1.992H9.336c.024-.456-.096-.792-.432-.96-.312-.144-.768-.048-.888.24-.12.264-.192.576-.168.864v3.504c0 .744.264 1.128.768 1.128a.65.65 0 0 0 .552-.264c.168-.24.192-.552.168-.84h1.776c.096 1.632-.984 2.712-2.568 2.688-1.536 0-2.496-.864-2.472-2.472v-4.032c0-.816.24-1.44.696-1.848.432-.408 1.146-.624 1.857-.63",source:"https://github.com/CSS-Next/logo.css/blob/bacc20878227204b283c68a6b935f8279e06b0cd/css.svg",hex:"663399",guidelines:"https://github.com/CSS-Next/logo.css"},M6={title:"Cursor",slug:"cursor",get svg(){return De+"Cursor"+Oe+this.path+Le},path:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23",source:"https://cursor.com/brand",hex:"000000"},C6={title:"DataGrip",slug:"datagrip",get svg(){return De+"DataGrip"+Oe+this.path+Le},path:"M0 0v24h24V0Zm17.1797 2.9477a5.452 5.452 0 0 1 3.9047 1.364L19.7078 5.972a3.672 3.672 0 0 0-2.596-1.0086c-1.6 0-2.8555 1.408-2.8555 3.096v.0282c0 1.816 1.2517 3.1523 3.0117 3.1523a3.492 3.492 0 0 0 2.064-.5921V9.2234h-2.2V7.336h4.3157v4.3157a6.436 6.436 0 0 1-4.2438 1.5757c-3.096 0-5.2242-2.1797-5.2242-5.1117v-.0281a5.1 5.1 0 0 1 5.2-5.1398zm-14.7438.1718h3.8758c3.12 0 5.2805 2.1439 5.2805 4.9399v.028c0 2.8-2.1605 4.968-5.2805 4.968H2.436Zm4.075 1.9688a2.852 2.852 0 0 0-.1992.003H4.6203v6h1.6914A2.832 2.832 0 0 0 9.304 8.1235v-.036a2.852 2.852 0 0 0-2.793-2.9991Zm-4.303 14.407h9v1.5h-9z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},A6={title:"Ghostty",slug:"ghostty",get svg(){return De+"Ghostty"+Oe+this.path+Le},path:"M12 0C6.7 0 2.4 4.3 2.4 9.6v11.146c0 1.772 1.45 3.267 3.222 3.254a3.18 3.18 0 0 0 1.955-.686 1.96 1.96 0 0 1 2.444 0 3.18 3.18 0 0 0 1.976.686c.75 0 1.436-.257 1.98-.686.715-.563 1.71-.587 2.419-.018.59.476 1.355.743 2.182.699 1.705-.094 3.022-1.537 3.022-3.244V9.601C21.6 4.3 17.302 0 12 0M6.069 6.562a1 1 0 0 1 .46.131l3.578 2.065v.002a.974.974 0 0 1 0 1.687L6.53 12.512a.975.975 0 0 1-.976-1.687L7.67 9.602 5.553 8.38a.975.975 0 0 1 .515-1.818m7.438 2.063h4.7a.975.975 0 1 1 0 1.95h-4.7a.975.975 0 0 1 0-1.95",source:"https://github.com/ghostty-org/website/blob/7093f052a2f35e0247fcb828ede644ed74a749a0/public/ghostty-logo.svg",hex:"3551F3"},_6={title:"GNU Bash",slug:"gnubash",get svg(){return De+"GNU Bash"+Oe+this.path+Le},path:"M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z",source:"https://github.com/odb/official-bash-logo/tree/61eff022f2dad3c7468f5deb4f06652d15f2c143",hex:"4EAA25",guidelines:"https://github.com/odb/official-bash-logo",license:{type:"MIT",url:"https://spdx.org/licenses/MIT"}},R6={title:"GNU Emacs",slug:"gnuemacs",get svg(){return De+"GNU Emacs"+Oe+this.path+Le},path:"M12,24C5.448,24,0.118,18.617,0.118,12S5.448,0,12,0c6.552,0,11.882,5.383,11.882,12S18.552,24,12,24z M12,0.661 C5.813,0.661,0.779,5.748,0.779,12S5.813,23.339,12,23.339c6.187,0,11.221-5.086,11.221-11.339S18.187,0.661,12,0.661z M8.03,20.197 c0,0,0.978,0.069,2.236-0.042c0.51-0.045,2.444-0.235,3.891-0.552c0,0,1.764-0.377,2.707-0.725c0.987-0.364,1.524-0.673,1.766-1.11 c-0.011-0.09,0.074-0.408-0.381-0.599c-1.164-0.488-2.514-0.4-5.185-0.457c-2.962-0.102-3.948-0.598-4.472-0.997 c-0.503-0.405-0.25-1.526,1.907-2.513c1.086-0.526,5.345-1.496,5.345-1.496c-1.434-0.709-4.109-1.955-4.659-2.224 c-0.482-0.236-1.254-0.591-1.421-1.021c-0.19-0.413,0.448-0.768,0.804-0.87c1.147-0.331,2.766-0.536,4.24-0.56 c0.741-0.012,0.861-0.059,0.861-0.059c1.022-0.17,1.695-0.869,1.414-1.976c-0.252-1.13-1.579-1.795-2.84-1.565 c-1.188,0.217-4.05,1.048-4.05,1.048c3.539-0.031,4.131,0.028,4.395,0.398c0.156,0.218-0.071,0.518-1.015,0.672 c-1.027,0.168-3.163,0.37-3.163,0.37c-2.049,0.122-3.492,0.13-3.925,1.046C6.202,7.564,6.787,8.094,7.043,8.425 c1.082,1.204,2.646,1.853,3.652,2.331c0.379,0.18,1.49,0.52,1.49,0.52c-3.265-0.18-5.619,0.823-7.001,1.977 c-1.562,1.445-0.871,3.168,2.33,4.228c1.891,0.626,2.828,0.921,5.648,0.667c1.661-0.09,1.923-0.036,1.939,0.1 c0.023,0.192-1.845,0.669-2.355,0.816C11.448,19.438,8.047,20.193,8.03,20.197z",source:"https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/images/icons/hicolor/scalable/apps/emacs.svg",hex:"7F5AB6",license:{type:"GPL-2.0-or-later",url:"https://spdx.org/licenses/GPL-2.0-or-later"}},D6={title:"Go",slug:"go",get svg(){return De+"Go"+Oe+this.path+Le},path:"M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z",source:"https://blog.golang.org/go-brand",hex:"00ADD8",guidelines:"https://blog.golang.org/go-brand"},O6={title:"GoLand",slug:"goland",get svg(){return De+"GoLand"+Oe+this.path+Le},path:"M0 0v24h24V0Zm6.764 3a5.448 5.448 0 0 1 3.892 1.356L9.284 6.012A3.652 3.652 0 0 0 6.696 5c-1.6 0-2.844 1.4-2.844 3.08v.028c0 1.812 1.244 3.14 3 3.14a3.468 3.468 0 0 0 2.048-.596V9.228H6.708v-1.88H11v4.296a6.428 6.428 0 0 1-4.228 1.572c-3.076 0-5.196-2.164-5.196-5.092v-.028A5.08 5.08 0 0 1 6.764 3Zm10.432 0c3.052 0 5.244 2.276 5.244 5.088v.028a5.116 5.116 0 0 1-5.272 5.12c-3.056-.02-5.248-2.296-5.248-5.112v-.028A5.116 5.116 0 0 1 17.196 3Zm-.028 2A2.96 2.96 0 0 0 14.2 8.068v.028a3.008 3.008 0 0 0 3 3.112 2.96 2.96 0 0 0 2.964-3.084v-.028A3.004 3.004 0 0 0 17.168 5ZM2.252 19.5h9V21h-9z",source:"https://www.jetbrains.com/company/brand/#logos-and-icons-jetbrains-logos",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/#brand-guidelines"},L6={title:"HTML5",slug:"html5",get svg(){return De+"HTML5"+Oe+this.path+Le},path:"M1.5 0h21l-1.91 21.563L11.977 24l-8.564-2.438L1.5 0zm7.031 9.75l-.232-2.718 10.059.003.23-2.622L5.412 4.41l.698 8.01h9.126l-.326 3.426-2.91.804-2.955-.81-.188-2.11H6.248l.33 4.171L12 19.351l5.379-1.443.744-8.157H8.531z",source:"https://www.w3.org/html/logo/",hex:"E34F26"},H6={title:"IntelliJ IDEA",slug:"intellijidea",get svg(){return De+"IntelliJ IDEA"+Oe+this.path+Le},path:"M0 0v24h24V0zm3.723 3.111h5v1.834h-1.39v6.277h1.39v1.834h-5v-1.834h1.444V4.945H3.723zm11.055 0H17v6.5c0 .612-.055 1.111-.222 1.556-.167.444-.39.777-.723 1.11-.277.279-.666.557-1.11.668a3.933 3.933 0 0 1-1.445.278c-.778 0-1.444-.167-1.944-.445a4.81 4.81 0 0 1-1.279-1.056l1.39-1.555c.277.334.555.555.833.722.277.167.611.278.945.278.389 0 .721-.111 1-.389.221-.278.333-.667.333-1.278zM2.222 19.5h9V21h-9z",source:"https://www.jetbrains.com/idea/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},k6={title:"iTerm2",slug:"iterm2",get svg(){return De+"iTerm2"+Oe+this.path+Le},path:"M24 5.359v13.282A5.36 5.36 0 0 1 18.641 24H5.359A5.36 5.36 0 0 1 0 18.641V5.359A5.36 5.36 0 0 1 5.359 0h13.282A5.36 5.36 0 0 1 24 5.359m-.932-.233A4.196 4.196 0 0 0 18.874.932H5.126A4.196 4.196 0 0 0 .932 5.126v13.748a4.196 4.196 0 0 0 4.194 4.194h13.748a4.196 4.196 0 0 0 4.194-4.194zm-.816.233v13.282a3.613 3.613 0 0 1-3.611 3.611H5.359a3.613 3.613 0 0 1-3.611-3.611V5.359a3.613 3.613 0 0 1 3.611-3.611h13.282a3.613 3.613 0 0 1 3.611 3.611M8.854 4.194v6.495h.962V4.194zM5.483 9.493v1.085h.597V9.48q.283-.037.508-.133.373-.165.575-.448.208-.284.208-.649a.9.9 0 0 0-.171-.568 1.4 1.4 0 0 0-.426-.388 3 3 0 0 0-.544-.261 32 32 0 0 0-.545-.209 1.8 1.8 0 0 1-.426-.216q-.164-.12-.164-.284 0-.223.179-.351.18-.126.485-.127.344 0 .575.105.239.105.5.298l.433-.5a2.3 2.3 0 0 0-.605-.433 1.6 1.6 0 0 0-.582-.159v-.968h-.597v.978a2 2 0 0 0-.477.127 1.2 1.2 0 0 0-.545.411q-.194.268-.194.634 0 .335.164.56.164.224.418.38a4 4 0 0 0 .552.262q.291.104.545.209.261.104.425.238a.39.39 0 0 1 .165.321q0 .225-.187.359-.18.134-.537.134-.381 0-.717-.134a4.4 4.4 0 0 1-.649-.351l-.388.589q.209.173.477.306.276.135.575.217.191.046.373.064",source:"https://github.com/gnachman/iTerm2/blob/6a857f3f5872eb1465ddc0dd83412015991e79ae/images/AppIcon/iTermIcon.sketch",hex:"000000"},U6={title:"JavaScript",slug:"javascript",get svg(){return De+"JavaScript"+Oe+this.path+Le},path:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z",source:"https://github.com/voodootikigod/logo.js/blob/1544bdeed6d618a6cfe4f0650d04ab8d9cfa76d9/js.svg",hex:"F7DF1E",license:{type:"MIT",url:"https://spdx.org/licenses/MIT"}},B6={title:"JSON",slug:"json",get svg(){return De+"JSON"+Oe+this.path+Le},path:"M12.043 23.968c.479-.004.953-.029 1.426-.094a11.805 11.805 0 003.146-.863 12.404 12.404 0 003.793-2.542 11.977 11.977 0 002.44-3.427 11.794 11.794 0 001.02-3.476c.149-1.16.135-2.346-.045-3.499a11.96 11.96 0 00-.793-2.788 11.197 11.197 0 00-.854-1.617c-1.168-1.837-2.861-3.314-4.81-4.3a12.835 12.835 0 00-2.172-.87h-.005c.119.063.24.132.345.201.12.074.239.146.351.225a8.93 8.93 0 011.559 1.33c1.063 1.145 1.797 2.548 2.218 4.041.284.982.434 1.998.495 3.017.044.743.044 1.491-.047 2.229-.149 1.27-.554 2.51-1.228 3.596a7.475 7.475 0 01-1.903 2.084c-1.244.928-2.877 1.482-4.436 1.114a3.916 3.916 0 01-.748-.258 4.692 4.692 0 01-.779-.45 6.08 6.08 0 01-1.244-1.105 6.507 6.507 0 01-1.049-1.747 7.366 7.366 0 01-.494-2.54c-.03-1.273.225-2.553.854-3.67a6.43 6.43 0 011.663-1.918c.225-.178.464-.333.704-.479l.016-.007a5.121 5.121 0 00-1.441-.12 4.963 4.963 0 00-1.228.24c-.359.12-.704.27-1.019.45a6.146 6.146 0 00-.733.494c-.211.18-.42.36-.615.555-1.123 1.153-1.768 2.682-2.022 4.256-.15.973-.15 1.96-.091 2.95.105 1.395.391 2.787.945 4.062a8.518 8.518 0 001.348 2.173 8.14 8.14 0 003.132 2.23 7.934 7.934 0 002.113.54c.074.015.149.015.209.015zm-2.934-.398a4.102 4.102 0 01-.45-.228 8.5 8.5 0 01-2.038-1.534c-1.094-1.137-1.827-2.566-2.247-4.08a15.184 15.184 0 01-.495-3.172 12.14 12.14 0 01.046-2.082c.135-1.257.495-2.501 1.124-3.58a6.889 6.889 0 011.783-2.053 6.23 6.23 0 011.633-.9 5.363 5.363 0 013.522-.045c.029 0 .029 0 .045.03.015.015.045.015.06.03.045.016.104.045.165.074.239.12.479.271.704.42a6.294 6.294 0 012.097 2.502c.42.914.615 1.934.631 2.938.014 1.079-.18 2.157-.645 3.146a6.42 6.42 0 01-2.638 2.832c.09.03.18.045.271.075.225.044.449.074.688.074 1.468.045 2.892-.66 3.94-1.647.195-.18.375-.375.54-.585.225-.27.435-.54.614-.823.239-.375.435-.75.614-1.154a8.112 8.112 0 00.509-1.664c.196-1.004.211-2.022.149-3.026-.135-2.022-.673-4.045-1.842-5.724a9.054 9.054 0 00-.555-.719 9.868 9.868 0 00-1.063-1.034 8.477 8.477 0 00-1.363-.915 9.927 9.927 0 00-1.692-.598l-.3-.06c-.209-.03-.42-.044-.634-.06a8.453 8.453 0 00-1.015.016c-.704.045-1.412.16-2.112.337C5.799 1.227 2.863 3.566 1.3 6.67A11.834 11.834 0 00.238 9.801a11.81 11.81 0 00-.104 3.775c.12 1.02.374 2.023.778 2.977.227.57.511 1.124.825 1.648 1.094 1.783 2.683 3.236 4.51 4.24.688.39 1.408.69 2.157.944.226.074.45.15.689.21z",source:"https://commons.wikimedia.org/wiki/File:JSON_vector_logo.svg",hex:"000000"},q6={title:"Lapce",slug:"lapce",get svg(){return De+"Lapce"+Oe+this.path+Le},path:"M3.802 1.267 1.608 0v24L8 20.31v-2.535L3.802 20.2Zm4.208 13.9V6.231L18.003 12l-7.798 4.503v2.533L22.392 12 5.806 2.424V16.44Zm5.598-3.231L10.205 9.97v3.93Z",source:"https://github.com/lapce/lapce/blob/95c4cf2d87083e348c0b621d0be0ea17f79ed703/extra/images/logo.svg",hex:"3B82F6"},G6={title:"Markdown",slug:"markdown",get svg(){return De+"Markdown"+Oe+this.path+Le},path:"M22.27 19.385H1.73A1.73 1.73 0 010 17.655V6.345a1.73 1.73 0 011.73-1.73h20.54A1.73 1.73 0 0124 6.345v11.308a1.73 1.73 0 01-1.73 1.731zM5.769 15.923v-4.5l2.308 2.885 2.307-2.885v4.5h2.308V8.078h-2.308l-2.307 2.885-2.308-2.885H3.46v7.847zM21.232 12h-2.309V8.077h-2.307V12h-2.308l3.461 4.039z",source:"https://github.com/dcurtis/markdown-mark/tree/360a3657fef7f6ad0b303296a95ad52985caa0d3",hex:"000000",guidelines:"https://github.com/dcurtis/markdown-mark",license:{type:"CC0-1.0",url:"https://spdx.org/licenses/CC0-1.0"}},V6={title:"Neovim",slug:"neovim",get svg(){return De+"Neovim"+Oe+this.path+Le},path:"M2.214 4.954v13.615L7.655 24V10.314L3.312 3.845 2.214 4.954zm4.999 17.98l-4.557-4.548V5.136l.59-.596 3.967 5.908v12.485zm14.573-4.457l-.862.937-4.24-6.376V0l5.068 5.092.034 13.385zM7.431.001l12.998 19.835-3.637 3.637L3.787 3.683 7.43 0z",source:"https://neovim.io",hex:"57A143",license:{type:"CC-BY-SA-3.0",url:"https://spdx.org/licenses/CC-BY-SA-3.0"}},Y6={title:"PhpStorm",slug:"phpstorm",get svg(){return De+"PhpStorm"+Oe+this.path+Le},path:"M7.833 6.611v-.055c0-1-.667-1.5-1.778-1.5H4.389v3.056h1.722c1.111-.001 1.722-.668 1.722-1.501zM0 0v24h24V0H0zm2.167 3.111h4.056c2.389 0 3.833 1.389 3.833 3.445v.055c0 2.333-1.778 3.5-4.056 3.5H4.333v3H2.167v-10zM11.278 21h-9v-1.5h9V21zM18.5 10.222c0 2-1.5 3.111-3.667 3.111-1.5-.056-3-.611-4.222-1.667l1.278-1.556c.89.722 1.833 1.222 3 1.222.889 0 1.444-.333 1.444-.944v-.056c0-.555-.333-.833-2-1.277C12.333 8.555 11 8 11 6v-.056c0-1.833 1.444-3 3.5-3 1.444 0 2.723.444 3.723 1.278l-1.167 1.667c-.889-.611-1.777-1-2.611-1-.833 0-1.278.389-1.278.889v.056c0 .667.445.889 2.167 1.333 2 .556 3.167 1.278 3.167 3v.055z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},X6={title:"PyCharm",slug:"pycharm",get svg(){return De+"PyCharm"+Oe+this.path+Le},path:"M7.833 6.666v-.055c0-1-.667-1.5-1.778-1.5H4.389v3.055h1.723c1.111 0 1.721-.666 1.721-1.5zM0 0v24h24V0H0zm2.223 3.167h4c2.389 0 3.833 1.389 3.833 3.445v.055c0 2.278-1.778 3.5-4.001 3.5H4.389v2.945H2.223V3.167zM11.277 21h-9v-1.5h9V21zm4.779-7.777c-2.944.055-5.111-2.223-5.111-5.057C10.944 5.333 13.056 3 16.111 3c1.889 0 3 .611 3.944 1.556l-1.389 1.61c-.778-.722-1.556-1.111-2.556-1.111-1.658 0-2.873 1.375-2.887 3.084.014 1.709 1.174 3.083 2.887 3.083 1.111 0 1.833-.445 2.61-1.167l1.39 1.389c-.999 1.112-2.166 1.779-4.054 1.779z",source:"https://www.jetbrains.com/company/brand/logos/",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand/"},Q6={title:"Python",slug:"python",get svg(){return De+"Python"+Oe+this.path+Le},path:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z",source:"https://www.python.org/community/logos/",hex:"3776AB",guidelines:"https://www.python.org/community/logos/"},wd={title:"React",slug:"react",get svg(){return De+"React"+Oe+this.path+Le},path:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z",source:"https://github.com/facebook/create-react-app/blob/282c03f9525fdf8061ffa1ec50dce89296d916bd/test/fixtures/relative-paths/src/logo.svg",hex:"61DAFB"},Z6={title:"Ruby",slug:"ruby",get svg(){return De+"Ruby"+Oe+this.path+Le},path:"M20.156.083c3.033.525 3.893 2.598 3.829 4.77L24 4.822 22.635 22.71 4.89 23.926h.016C3.433 23.864.15 23.729 0 19.139l1.645-3 2.819 6.586.503 1.172 2.805-9.144-.03.007.016-.03 9.255 2.956-1.396-5.431-.99-3.9 8.82-.569-.615-.51L16.5 2.114 20.159.073l-.003.01zM0 19.089zM5.13 5.073c3.561-3.533 8.157-5.621 9.922-3.84 1.762 1.777-.105 6.105-3.673 9.636-3.563 3.532-8.103 5.734-9.864 3.957-1.766-1.777.045-6.217 3.612-9.75l.003-.003z",source:"https://www.ruby-lang.org/en/about/logo/",hex:"CC342D",license:{type:"CC-BY-SA-2.5",url:"https://spdx.org/licenses/CC-BY-SA-2.5"}},K6={title:"RubyMine",slug:"rubymine",get svg(){return De+"RubyMine"+Oe+this.path+Le},path:"M0 0v24h24V0Zm3.056 3H6.92q.945 0 1.665.347t1.106.977c.262.42.392.902.392 1.46q0 .835-.399 1.478a2.6 2.6 0 0 1-1.125.99 2 2 0 0 1-.297.103q-.066.02-.13.04L10.276 12H8.264l-1.94-3.4H4.811V12H3.056Zm8.51 0h2.444l1.851 5.907.154.773.136-.773L17.937 3h2.482v9h-1.736V5.578l.026-.47L16.613 12H15.34l-2.07-6.846.026.424V12h-1.73ZM4.812 4.459V7.14h1.993q.444-.001.771-.161.335-.167.515-.47c.12-.205.18-.439.18-.713q0-.411-.18-.707a1.17 1.17 0 0 0-.515-.462 1.7 1.7 0 0 0-.77-.168ZM2.996 19.2h9.6V21h-9.6z",source:"https://www.jetbrains.com/company/brand/logos",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand"},$6={title:"Rust",slug:"rust",get svg(){return De+"Rust"+Oe+this.path+Le},path:"M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z",source:"https://www.rust-lang.org",hex:"000000",guidelines:"https://www.rust-lang.org/policies/media-guide",license:{type:"CC-BY-SA-4.0",url:"https://spdx.org/licenses/CC-BY-SA-4.0"}},J6={title:"Sublime Text",slug:"sublimetext",get svg(){return De+"Sublime Text"+Oe+this.path+Le},path:"M20.953.004a.397.397 0 0 0-.18.017L3.225 5.585c-.175.055-.323.214-.402.398a.42.42 0 0 0-.06.22v5.726a.42.42 0 0 0 .06.22c.079.183.227.341.402.397l7.454 2.364-7.454 2.363c-.255.08-.463.374-.463.655v5.688c0 .282.208.444.463.363l17.55-5.565c.237-.075.426-.336.452-.6.003-.022.013-.04.013-.065V12.06c0-.281-.208-.575-.463-.656L13.4 9.065l7.375-2.339c.255-.08.462-.375.462-.656V.384c0-.211-.117-.355-.283-.38z",source:"https://www.sublimetext.com",hex:"FF9800"},F6={title:"Swift",slug:"swift",get svg(){return De+"Swift"+Oe+this.path+Le},path:"M7.508 0c-.287 0-.573 0-.86.002-.241.002-.483.003-.724.01-.132.003-.263.009-.395.015A9.154 9.154 0 0 0 4.348.15 5.492 5.492 0 0 0 2.85.645 5.04 5.04 0 0 0 .645 2.848c-.245.48-.4.972-.495 1.5-.093.52-.122 1.05-.136 1.576a35.2 35.2 0 0 0-.012.724C0 6.935 0 7.221 0 7.508v8.984c0 .287 0 .575.002.862.002.24.005.481.012.722.014.526.043 1.057.136 1.576.095.528.25 1.02.495 1.5a5.03 5.03 0 0 0 2.205 2.203c.48.244.97.4 1.498.495.52.093 1.05.124 1.576.138.241.007.483.009.724.01.287.002.573.002.86.002h8.984c.287 0 .573 0 .86-.002.241-.001.483-.003.724-.01a10.523 10.523 0 0 0 1.578-.138 5.322 5.322 0 0 0 1.498-.495 5.035 5.035 0 0 0 2.203-2.203c.245-.48.4-.972.495-1.5.093-.52.124-1.05.138-1.576.007-.241.009-.481.01-.722.002-.287.002-.575.002-.862V7.508c0-.287 0-.573-.002-.86a33.662 33.662 0 0 0-.01-.724 10.5 10.5 0 0 0-.138-1.576 5.328 5.328 0 0 0-.495-1.5A5.039 5.039 0 0 0 21.152.645 5.32 5.32 0 0 0 19.654.15a10.493 10.493 0 0 0-1.578-.138 34.98 34.98 0 0 0-.722-.01C17.067 0 16.779 0 16.492 0H7.508zm6.035 3.41c4.114 2.47 6.545 7.162 5.549 11.131-.024.093-.05.181-.076.272l.002.001c2.062 2.538 1.5 5.258 1.236 4.745-1.072-2.086-3.066-1.568-4.088-1.043a6.803 6.803 0 0 1-.281.158l-.02.012-.002.002c-2.115 1.123-4.957 1.205-7.812-.022a12.568 12.568 0 0 1-5.64-4.838c.649.48 1.35.902 2.097 1.252 3.019 1.414 6.051 1.311 8.197-.002C9.651 12.73 7.101 9.67 5.146 7.191a10.628 10.628 0 0 1-1.005-1.384c2.34 2.142 6.038 4.83 7.365 5.576C8.69 8.408 6.208 4.743 6.324 4.86c4.436 4.47 8.528 6.996 8.528 6.996.154.085.27.154.36.213.085-.215.16-.437.224-.668.708-2.588-.09-5.548-1.893-7.992z",source:"https://developer.apple.com/swift/resources/",hex:"F05138",guidelines:"https://developer.apple.com/swift/resources/"},W6={title:"TypeScript",slug:"typescript",get svg(){return De+"TypeScript"+Oe+this.path+Le},path:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z",source:"https://www.typescriptlang.org/branding",hex:"3178C6",guidelines:"https://www.typescriptlang.org/branding"},I6={title:"Vim",slug:"vim",get svg(){return De+"Vim"+Oe+this.path+Le},path:"M24 11.986h-.027l-4.318-4.318 4.303-4.414V1.461l-.649-.648h-8.198l-.66.605v1.045L12.015.027V0L12 .014 11.986 0v.027l-1.29 1.291-.538-.539H2.035l-.638.692v1.885l.616.616h.72v5.31L.027 11.987H0L.014 12 0 12.014h.027l2.706 2.706v6.467l.907.523h2.322l1.857-1.904 4.166 4.166V24l.015-.014.014.014v-.028l2.51-2.509h.485c.111 0 .211-.07.25-.179l.146-.426c.028-.084.012-.172-.037-.239l1.462-1.462-.612 1.962c-.043.141.036.289.177.332.025.008.052.012.078.012h1.824c.106-.001.201-.064.243-.163l.165-.394c.025-.065.024-.138-.004-.203-.027-.065-.08-.116-.146-.142-.029-.012-.062-.019-.097-.02h-.075l.84-2.644h1.232l-1.016 3.221c-.043.141.036.289.176.332.025.008.052.012.079.012h2.002c.11 0 .207-.066.248-.17l.164-.428c.051-.138-.021-.29-.158-.341-.029-.011-.06-.017-.091-.017h-.145l1.131-3.673c.027-.082.012-.173-.039-.24l-.375-.504-.003-.005c-.051-.064-.127-.102-.209-.102h-1.436c-.071 0-.141.03-.19.081l-.4.439h-.624l-.042-.046 4.445-4.445H24L23.986 12l.014-.014zM9.838 21.139l1.579-4.509h-.501l.297-.304h1.659l-1.563 4.555h.623l-.079.258H9.838zm3.695-7.516l.15.151-.269.922-.225.226h-.969l-.181-.181.311-.871.288-.247h.895zM5.59 20.829H3.877l-.262-.15V3.091H2.379l-.1-.1V1.815l.143-.154h7.371l.213.214v1.108l-.142.173H8.785v8.688l8.807-8.688h-2.086l-.175-.188V1.805l.121-.111h7.49l.132.133v1.07L12.979 13.25h-.373c-.015-.001-.028 0-.042.001l-.02.003c-.045.01-.086.03-.119.06l-.343.295-.004.003c-.033.031-.059.069-.073.111l-.296.83-6.119 6.276zm14.768-3.952l.474-.519h1.334l.309.415-1.265 4.107h.493l-.08.209H19.84l1.124-3.564h-2.015l-1.077 3.391h.424l-.073.174h-1.605l1.107-3.548h-2.096l-1.062 3.339h.436l-.072.209H13.27l1.514-4.46H14.198l.091-.271h1.65l.519.537h.906l.491-.554h1.061l.489.535h.953z",source:"https://commons.wikimedia.org/wiki/File:Vimlogo.svg",hex:"019733"},P6={title:"VSCodium",slug:"vscodium",get svg(){return De+"VSCodium"+Oe+this.path+Le},path:"M11.583.54a1.467 1.467 0 0 0-.441 2.032c2.426 3.758 2.999 6.592 2.75 9.075-1.004 4.756-3.187 5.721-5.094 5.721-1.863 0-1.364-3.065.036-3.962.836-.522 1.906-.861 2.728-.861.814 0 1.474-.658 1.474-1.47 0-.812-.66-1.47-1.474-1.47-.96 0-1.901.202-2.78.545.18-.847.246-1.762.014-2.735-.352-1.477-1.367-2.889-3.128-4.257a1.476 1.476 0 0 0-2.069.256c-.5.64-.384 1.564.259 2.063 1.435 1.114 1.908 1.939 2.07 2.618.162.679.032 1.407-.293 2.408-.416 1.349-.9 2.553-1.11 3.708-.105.568-.114 1.187-.14 1.68-1.034-1.006-1.438-2.336-1.438-4.279 0-.811-.66-1.47-1.474-1.47-.814.001-1.473.659-1.473 1.47 0 2.654.776 5.179 2.855 6.863 1.883 1.793 6.67 1.13 6.67 4.01 0 .812 1.19 1.208 2.004 1.208.834 0 1.885-.558 1.885-1.208 0-3.267 3.443-5.253 9.11-5.244A1.472 1.472 0 0 0 24 15.773 1.472 1.472 0 0 0 22.53 14.3c-.388 0-.765.013-1.138.035.634-1.49.915-3.13.857-4.903a1.473 1.473 0 0 0-1.522-1.42 1.472 1.472 0 0 0-1.425 1.517c.076 2.32-.01 4.393-1.74 5.485-.49.31-1.062.58-1.604.58.42-1.145.738-2.353.869-3.655.083-.83.091-1.818-.003-2.585-.148-1.188-.325-2.535.126-3.55.405-.874 1.313-1.24 2.645-1.24.814 0 1.473-.659 1.473-1.47 0-.811-.659-1.47-1.473-1.47-1.98 0-3.481 1.042-4.332 2.3-.445-.95-.987-1.929-1.642-2.943a1.474 1.474 0 0 0-2.037-.44z",source:"https://github.com/VSCodium/vscodium.github.io/blob/ed028c57f10e6432ec55dfc34d4db1a83fba941d/img/codium_cnl.svg",hex:"2F80ED"},e8={title:"WebStorm",slug:"webstorm",get svg(){return De+"WebStorm"+Oe+this.path+Le},path:"M0 0v24h24V0H0zm17.889 2.889c1.444 0 2.667.444 3.667 1.278l-1.111 1.667c-.889-.611-1.722-1-2.556-1s-1.278.389-1.278.889v.056c0 .667.444.889 2.111 1.333 2 .556 3.111 1.278 3.111 3v.056c0 2-1.5 3.111-3.611 3.111-1.5-.056-3-.611-4.167-1.667l1.278-1.556c.889.722 1.833 1.222 2.944 1.222.889 0 1.389-.333 1.389-.944v-.056c0-.556-.333-.833-2-1.278-2-.5-3.222-1.056-3.222-3.056v-.056c0-1.833 1.444-3 3.444-3zm-16.111.222h2.278l1.5 5.778 1.722-5.778h1.667l1.667 5.778 1.5-5.778h2.333l-2.833 9.944H9.723L8.112 7.277l-1.667 5.778H4.612L1.779 3.111zm.5 16.389h9V21h-9v-1.5z",source:"https://www.jetbrains.com/company/brand/logos",hex:"000000",guidelines:"https://www.jetbrains.com/company/brand"},t8={title:"Windsurf",slug:"windsurf",get svg(){return De+"Windsurf"+Oe+this.path+Le},path:"M23.55 5.067c-1.2038-.002-2.1806.973-2.1806 2.1765v4.8676c0 .972-.8035 1.7594-1.7597 1.7594-.568 0-1.1352-.286-1.4718-.7659l-4.9713-7.1003c-.4125-.5896-1.0837-.941-1.8103-.941-1.1334 0-2.1533.9635-2.1533 2.153v4.8957c0 .972-.7969 1.7594-1.7596 1.7594-.57 0-1.1363-.286-1.4728-.7658L.4076 5.1598C.2822 4.9798 0 5.0688 0 5.2882v4.2452c0 .2147.0656.4228.1884.599l5.4748 7.8183c.3234.462.8006.8052 1.3509.9298 1.3771.313 2.6446-.747 2.6446-2.0977v-4.893c0-.972.7875-1.7593 1.7596-1.7593h.003a1.798 1.798 0 0 1 1.4718.7658l4.9723 7.0994c.4135.5905 1.05.941 1.8093.941 1.1587 0 2.1515-.9645 2.1515-2.153v-4.8948c0-.972.7875-1.7594 1.7596-1.7594h.194a.22.22 0 0 0 .2204-.2202v-4.622a.22.22 0 0 0-.2203-.2203Z",source:"https://windsurf.com/brand",hex:"0B100F",guidelines:"https://windsurf.com/brand"},n8={title:"Xcode",slug:"xcode",get svg(){return De+"Xcode"+Oe+this.path+Le},path:"M19.06 5.3327c.4517-.1936.7744-.2581 1.097-.1936.5163.1291.7744.5163.968.7098.1936.3872.9034.7744 1.2261.8389.2581.0645.7098-.6453 1.0325-1.2906.3227-.5808.5163-1.3552.4517-1.5488-.0645-.1936-.968-.5808-1.1616-.5808-.1291 0-.3872.1291-.8389.0645-.4517-.0645-.9034-.5808-1.1616-.968-.4517-.6453-1.097-1.0325-1.6778-1.3552-.6453-.3227-1.3552-.5163-2.065-.6453-1.0325-.2581-2.065-.4517-3.0975-.3227-.5808.0645-1.2906.1291-1.8069.3227-.0645 0-.1936.1936-.0645.1936s.5808.0645.5808.0645-.5807.1292-.5807.2583c0 .1291.0645.1291.1291.1291.0645 0 1.4842-.0645 2.065 0 .6453.1291 1.3552.4517 1.8069 1.2261.7744 1.4197.4517 2.7749.2581 3.2266-.968 2.1295-8.6472 15.2294-9.0344 16.1328-.3873.9034-.5163 1.4842.5807 2.065s1.6778.3227 2.0005-.0645c.3872-.5163 7.0339-17.1654 9.2925-18.2624zm-3.6138 8.7117h1.5488c1.0325 0 1.2261.5163 1.2261.7098.0645.5163-.1936 1.1616-1.2261 1.1616h-.968l.7744 1.2906c.4517.7744.2581 1.1616 0 1.4197-.3872.3872-1.2261.3872-1.6778-.4517l-.9034-1.5488c-.6453 1.4197-1.2906 2.9684-2.065 4.7753h4.0009c1.9359 0 3.5492-1.6133 3.5492-3.5492V6.5588c-.0645-.1291-.1936-.0645-.2581 0-.3872.4517-1.4842 2.0004-4.001 7.4856zm-9.8087 8.0019h-.3227c-2.3231 0-4.1945-1.8714-4.1945-4.1945V7.0105c0-2.3231 1.8714-4.1945 4.1945-4.1945h9.3571c-.1936-.1936-.968-.5163-1.7423-.4517-.3227 0-.968.1291-1.3552-.1291-.3872-.3227-.3227-.5163-.9034-.5163H4.9277c-2.6458 0-4.7753 2.1295-4.7753 4.7753v11.7447c0 2.6458 2.1295 4.7753 4.4527 4.7108.6452 0 .8388-.5162 1.0324-.9034zM20.4152 6.9459v10.9058c0 2.3231-1.8714 4.1945-4.1945 4.1945H11.897s-.3872 1.0325.8389 1.0325h3.8719c2.6458 0 4.7753-2.1295 4.7753-4.7753V8.8173c.0646-.9034-.7098-1.4842-.9679-1.8714zm-18.5851.0646v10.8413c0 1.9359 1.6133 3.5492 3.5492 3.5492h.5808c0-.0645.7744-1.4197 2.4522-4.2591.1936-.3872.4517-.7744.7098-1.2261H4.4114c-.5808 0-.9034-.3872-.968-.7098-.1291-.5163.1936-1.1616.9034-1.1616h2.3877l3.033-5.2916s-.7098-1.2906-.9034-1.6133c-.2582-.4517-.1291-.9034.129-1.1615.3872-.3872 1.0325-.5808 1.6778.4517l.2581.3872.2581-.3872c.5808-.8389.968-.7744 1.2906-.7098.5163.1291.8389.7098.3872 1.6133L8.864 14.0444h1.3552c.4517-.7744.9034-1.5488 1.3552-2.3877-.0645-.3227-.1291-.7098-.0645-1.0325.0645-.5163.3227-.968.6453-1.3552l.3872.6453c1.2261-2.1295 2.1295-3.9364 2.3877-4.6463.1291-.3872.3227-1.1616.1291-1.8069H5.3794c-2.0005.0001-3.5493 1.6134-3.5493 3.5494zM4.605 17.7872c0-.0645.7744-1.4197.7744-1.4197 1.2261-.3227 1.8069.4517 1.8714.5163 0 0-.8389 1.4842-1.097 1.7423s-.5808.3227-.9034.2581c-.5164-.129-.839-.6453-.6454-1.097z",source:"https://developer.apple.com/develop",hex:"147EFB"},l8={title:"YAML",slug:"yaml",get svg(){return De+"YAML"+Oe+this.path+Le},path:"m0 .97 4.111 6.453v4.09h2.638v-4.09L11.053.969H8.214L5.58 5.125 2.965.969Zm12.093.024-4.47 10.544h2.114l.97-2.345h4.775l.804 2.345h2.26L14.255.994Zm1.133 2.225 1.463 3.87h-3.096zm3.06 9.475v10.29H24v-2.199h-5.454v-8.091zm-12.175.002v10.335h2.217v-7.129l2.32 4.792h1.746l2.4-4.96v7.295h2.127V12.696h-2.904L9.44 17.37l-2.455-4.674Z",source:"https://commons.wikimedia.org/wiki/File:Official_YAML_Logo.svg",hex:"CB171E"},a8={title:"Zed Industries",slug:"zedindustries",get svg(){return De+"Zed Industries"+Oe+this.path+Le},path:"M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z",source:"https://github.com/zed-industries/zed/blob/ccc939124fa2f366b3029926447fd0a0c46a85c7/assets/icons/logo_96.svg",hex:"084CCF"},i8=[{label:"Default app",target:"default"},{label:"Open in folder",target:"folder"}],Nd=190,zd=172,is=8,c8={"android-studio":{icon:N6,kind:"simple"},bbedit:{Icon:Sl,kind:"lucide"},clion:{icon:z6,kind:"simple"},coteditor:{Icon:Sl,kind:"lucide"},cursor:{icon:M6,kind:"simple"},datagrip:{icon:C6,kind:"simple"},default:{Icon:th,kind:"lucide"},emacs:{icon:R6,kind:"simple"},fleet:{Icon:Sl,kind:"lucide"},folder:{Icon:Zd,kind:"lucide"},ghostty:{icon:A6,kind:"simple"},goland:{icon:O6,kind:"simple"},intellij:{icon:H6,kind:"simple"},iterm2:{icon:k6,kind:"simple"},lapce:{icon:q6,kind:"simple"},macvim:{icon:I6,kind:"simple"},neovide:{icon:V6,kind:"simple"},nova:{Icon:Sl,kind:"lucide"},phpstorm:{icon:Y6,kind:"simple"},pycharm:{icon:X6,kind:"simple"},rubymine:{icon:K6,kind:"simple"},sublime:{icon:J6,kind:"simple"},terminal:{Icon:fm,kind:"lucide"},textedit:{Icon:Qd,kind:"lucide"},textmate:{Icon:Sl,kind:"lucide"},vscodium:{icon:P6,kind:"simple"},vscode:{Icon:Sl,kind:"lucide"},"vscode-insiders":{Icon:Sl,kind:"lucide"},webstorm:{icon:e8,kind:"simple"},windsurf:{icon:t8,kind:"simple"},xcode:{icon:n8,kind:"simple"},zed:{icon:a8,kind:"simple"}};function v2({fileContent:a,filePath:u,openTargets:f,wordWrap:r,onActionMessage:h,onCopyFileContents:y,onOpenFile:E,onWordWrapChange:C}){const[x,p]=j.useState(!1),[T,O]=j.useState(!1),[k,q]=j.useState(null),[Q,se]=j.useState(null),pe=j.useRef(null),$=j.useRef(null),re=j.useRef(null),ye=j.useRef(null),K=j.useRef(null),je=j.useMemo(()=>f.length>0?f:i8,[f]),de=a!==void 0||y!==void 0,W=j.useCallback(()=>{p(!1),O(!1)},[]),he=j.useCallback(()=>{x&&q(cs(pe.current,Nd)),T&&se(cs(ye.current,zd))},[x,T]);j.useEffect(()=>{if(!(!x&&!T))return he(),window.addEventListener("resize",he),window.addEventListener("scroll",he,!0),()=>{window.removeEventListener("resize",he),window.removeEventListener("scroll",he,!0)}},[x,T,he]),j.useEffect(()=>{if(!x&&!T)return;const te=b=>{var I,ge,ve;const U=b.target;!((I=re.current)!=null&&I.contains(U))&&!((ge=$.current)!=null&&ge.contains(U))&&!((ve=K.current)!=null&&ve.contains(U))&&W()},ze=b=>{b.key==="Escape"&&W()};return window.addEventListener("pointerdown",te),window.addEventListener("keydown",ze),()=>{window.removeEventListener("pointerdown",te),window.removeEventListener("keydown",ze)}},[x,W,T]);const fe=async(te,ze)=>{W();try{await navigator.clipboard.writeText(te),h==null||h(`${ze} copied`)}catch(b){h==null||h(`Could not copy ${ze.toLowerCase()}: ${qo(b)}`)}},le=async()=>{W();try{const te=a??await(y==null?void 0:y());if(te===void 0)return;await navigator.clipboard.writeText(te),h==null||h("File contents copied")}catch(te){h==null||h(`Could not copy file contents: ${qo(te)}`)}},me=async(te,ze)=>{W(),h==null||h(`Opening in ${ze}`);try{await E(te),h==null||h(`Opened in ${ze}`)}catch(b){h==null||h(`Could not open in ${ze}: ${qo(b)}`)}},G=x&&k?Hi.createPortal(s.jsxs("div",{className:"file-actions-popover actions",ref:$,role:"menu",style:k,children:[s.jsxs("button",{role:"menuitem",type:"button",onClick:()=>fe(u,"Path"),children:[s.jsx(xh,{size:16}),s.jsx("span",{children:"Copy path"})]}),de?s.jsxs("button",{role:"menuitem",type:"button",onClick:le,children:[s.jsx(Qd,{size:16}),s.jsx("span",{children:"Copy file contents"})]}):null,C?s.jsxs("button",{"aria-checked":!!r,role:"menuitemcheckbox",type:"button",onClick:()=>{C(!r),W()},children:[s.jsx(Jd,{size:16}),s.jsxs("span",{children:[r?"Disable":"Enable"," word wrap"]})]}):null]}),document.body):null,ne=T&&Q?Hi.createPortal(s.jsx("div",{className:"file-actions-popover open",ref:K,role:"menu",style:Q,children:je.map((te,ze)=>s.jsxs("button",{className:ze===je.length-1?"separated":"",role:"menuitem",type:"button",onClick:()=>me(te.target,te.label),children:[s.jsx(s8,{option:te}),s.jsx("span",{children:te.label})]},te.target))}),document.body):null;return s.jsxs("div",{className:"file-actions-menu",ref:re,children:[s.jsxs("div",{className:"file-actions-menu-group",children:[s.jsx("button",{"aria-expanded":x,"aria-haspopup":"menu","aria-label":"File actions",className:"icon-button file-actions-menu-trigger",ref:pe,type:"button",onClick:()=>{q(cs(pe.current,Nd)),p(te=>!te),O(!1)},children:s.jsx(Eh,{size:17})}),G]}),s.jsxs("div",{className:"file-actions-menu-group",children:[s.jsxs("button",{"aria-expanded":T,"aria-haspopup":"menu",className:"file-actions-open-button",ref:ye,type:"button",onClick:()=>{se(cs(ye.current,zd)),O(te=>!te),p(!1)},children:[s.jsx(Nh,{size:16}),s.jsx("span",{children:"Open"}),s.jsx(Kl,{size:15})]}),ne]})]})}function cs(a,u){if(!a)return null;const f=a.getBoundingClientRect(),r=Math.max(is,window.innerWidth-f.right),h=Math.max(is,window.innerWidth-u-is);return{right:Math.min(r,h),top:f.bottom+is}}function s8({option:a}){const u=c8[a.target];return u.kind==="simple"?s.jsx("svg",{"aria-hidden":"true",className:"file-actions-brand-icon",focusable:"false",role:"img",style:{color:u8(u.icon)},viewBox:"0 0 24 24",children:s.jsx("path",{d:u.icon.path})}):s.jsx(u.Icon,{"aria-hidden":"true",className:"file-actions-target-icon",size:16})}function u8(a){return a.hex==="000000"?"var(--ide-fg-muted)":`#${a.hex}`}function qo(a){return a instanceof Error?a.message:String(a)}const o8={bash:_6,css:T6,go:D6,html:L6,js:U6,json:B6,jsx:wd,markdown:G6,python:Q6,ruby:Z6,rust:$6,swift:F6,ts:W6,tsx:wd,yaml:l8};function r8(a,u=!1){if(!a||u)return null;const f=o8[a];return f?{icon:f,color:d8(f.hex)}:null}function f8({isBinary:a=!1,language:u}){const f=r8(u,a);return f?s.jsx("span",{"aria-hidden":"true",className:"file-language-icon",style:{color:f.color},title:`${f.icon.title} file`,children:s.jsx("svg",{"aria-hidden":"true",className:"file-language-icon-svg",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:f.icon.path})})}):s.jsx("span",{"aria-hidden":"true",className:"file-language-icon",title:"File",children:s.jsx(e1,{size:17})})}function d8(a){const u=a.trim().replace(/^#/,"");if(!/^[\dA-Fa-f]{6}$/.test(u))return"currentColor";const f=Number.parseInt(u.slice(0,2),16),r=Number.parseInt(u.slice(2,4),16),h=Number.parseInt(u.slice(4,6),16),y=(.2126*f+.7152*r+.0722*h)/255;return y<.15||y>.9?"currentColor":`#${u}`}function h8({file:a,collapsed:u,viewed:f,onToggle:r,onCopyFileContents:h,onViewedChange:y,onOpenFile:E,openTargets:C}){return s.jsxs("div",{className:"file-header",children:[s.jsxs("button",{className:"file-header-toggle",type:"button",onClick:r,children:[u?s.jsx(Xd,{size:18}):s.jsx(Kl,{size:18}),s.jsx(f8,{isBinary:a.isBinary,language:a.language}),s.jsx("span",{className:"file-path",children:a.path}),a.oldPath&&a.oldPath!==a.path?s.jsxs("span",{className:"rename-path",children:["from ",a.oldPath]}):null]}),s.jsxs("span",{className:"stat add",children:["+",a.additions]}),s.jsxs("span",{className:"stat del",children:["-",a.deletions]}),s.jsxs("label",{className:"viewed-toggle",children:[s.jsx("input",{type:"checkbox",checked:f,onChange:x=>y(x.currentTarget.checked)}),s.jsx("span",{children:"Viewed"})]}),s.jsx(v2,{filePath:a.path,openTargets:C,onCopyFileContents:h,onOpenFile:async x=>E(x)})]})}const m8=[];function p8({activeFilePath:a=null,contextSource:u,emptyState:f=null,files:r,record:h,diff:y=h.diff,readOnly:E=!1,reviewId:C,turnId:x,wrapLines:p=!1,viewedFiles:T=new Set,onViewedChange:O=()=>{},openTargets:k=m8,selectedSourcePeek:q=null,onCopyFileContents:Q,onOpenFile:se=()=>{},onSourcePeek:pe=()=>{},hiddenFiles:$=new Map,onRevealHiddenFile:re=()=>{}}){const[ye,K]=j.useState(new Set),je=j.useRef(a),de=jt(le=>le.draft),W=jt(le=>le.setDraft),he=r??y.files;if(a!==je.current&&(je.current=a,a&&ye.has(a))){const le=new Set(ye);le.delete(a),K(le)}const fe=(le,me)=>{me&&((de==null?void 0:de.filePath)===le&&W(null),K(G=>{const ne=new Set(G);return ne.add(le),ne})),O(le,me)};return s.jsx("section",{className:"diff-stack",children:he.length===0?f??s.jsx(v8,{record:h}):he.map(le=>{const me=ye.has(le.path),G=$.get(le.path)??null;return s.jsxs("article",{className:`file-card ${a===le.path?"active":""}`,id:f1(le.path),children:[s.jsx(h8,{file:le,openTargets:k,collapsed:me,viewed:T.has(le.path),onToggle:()=>{!me&&(de==null?void 0:de.filePath)===le.path&&W(null),K(ne=>{const te=new Set(ne);return te.has(le.path)?te.delete(le.path):te.add(le.path),te})},onCopyFileContents:Q?()=>Q(le.path):void 0,onViewedChange:ne=>fe(le.path,ne),onOpenFile:ne=>se(le.path,ne)}),me?null:G?s.jsx(y8,{info:G,onReveal:()=>re(le.path)}):s.jsx(b8,{contextSource:u,file:le,readOnly:E,reviewId:C,selectedSourcePeek:q,turnId:x,wrapLines:p,onSourcePeek:pe},`${le.oldPath??""}:${le.path}:${T8(C,x,u)}`)]},`${le.oldPath??le.path}:${le.path}`)})})}function y8({info:a,onReveal:u}){const f=g8(a.presetLabels);return s.jsxs("div",{className:"hidden-diff-placeholder",children:[s.jsxs("div",{className:"hidden-diff-skeleton","aria-hidden":"true",children:[s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{}),s.jsx("span",{})]}),s.jsxs("div",{className:"hidden-diff-message",children:[s.jsx("button",{className:"hidden-diff-load",type:"button",onClick:u,children:"Load diff"}),s.jsxs("p",{children:[f," are not rendered by default."]})]})]})}function g8(a){return a.length===0?"Files matching selected presets":a.length===1?a[0]:a.length===2?`${a[0]} and ${Go(a[1])}`:`${a.slice(0,-1).map((u,f)=>f===0?u:Go(u)).join(", ")}, and ${Go(a[a.length-1])}`}function Go(a){return`${a.charAt(0).toLowerCase()}${a.slice(1)}`}function v8({record:a}){const u=a.diff.scope;return u.mode==="branch"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No branch changes"}),s.jsxs("p",{children:["Working tree is clean, and ",u.comparison.ref," matches ",u.base.ref,"."]})]}):u.fallbackReason==="missing-branch-base"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No changes to review"}),s.jsx("p",{children:"Working tree is clean and no upstream or default branch ref was found."})]}):u.mode==="explicit"?s.jsxs("div",{className:"empty-diff",children:[s.jsxs("h2",{children:["No changes against ",u.base.ref]}),s.jsx("p",{children:"The captured diff for this explicit base is empty."})]}):s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No working changes"}),s.jsx("p",{children:"Working tree is clean."})]})}function b8({contextSource:a,file:u,readOnly:f,reviewId:r,selectedSourcePeek:h,turnId:y,wrapLines:E,onSourcePeek:C}){const x=jt(H=>H.comments),p=jt(H=>H.resolution),T=jt(H=>H.draft),O=jt(H=>H.setDraft),k=jt(H=>H.updateComment),{resolvedTheme:q}=u1(),[Q,se]=j.useState(null),[pe,$]=j.useState(null),[re,ye]=j.useState(null),[K,je]=j.useState(null),[de,W]=j.useState({}),he=j.useRef(null),fe=j.useRef(null),le=j.useRef(null),me=j.useMemo(()=>o1(u),[u]),G=j.useMemo(()=>new Map(me.map(H=>[H.beforeHunkIndex,H])),[me]),ne=j.useMemo(()=>w6(u,de),[de,u]),te=(K==null?void 0:K.file)===ne&&K.theme===q?K.lines:null,ze=j.useMemo(()=>E6(u,de),[de,u]),b=j.useMemo(()=>M8(ze),[ze]),U=j.useMemo(()=>new Map(((p==null?void 0:p.comments)??[]).map(H=>[H.commentId,H])),[p]),I=x.filter(H=>Oi(H)&&H.filePath===u.path),ge=(re==null?void 0:re.id)??null,ve=Q&&pe&&Q.filePath===u.path&&Q.side===pe.side?Fo(b,Q.side,Q.line,pe.line):null,g=T&&T.filePath===u.path?Fo(b,T.side,T.startLine,T.endLine):null,_=H=>{const{start:V,end:ue}=H,be=Math.min(V.line,ue.line),Ge=Math.max(V.line,ue.line),Ve=C8(ze,b,V.side,be,Ge)||V.snippet;O({filePath:u.path,side:V.side,startLine:be,endLine:Ge,originalSnippet:Ve})},X=()=>{!re||re.body.trim().length===0||(k(re.id,re.body),ye(null))};j.useEffect(()=>()=>{var H;return(H=fe.current)==null?void 0:H.call(fe)},[]),j.useEffect(()=>{var H;ge&&((H=le.current)==null||H.focus({preventScroll:!0}))},[ge]);const J=H=>{var be;if(H.dataset.filePath!==u.path)return null;const V=H.dataset.side,ue=Number(H.dataset.line);return V!=="L"&&V!=="R"||!Number.isFinite(ue)?null:{filePath:u.path,side:V,line:ue,snippet:((be=H.querySelector("code"))==null?void 0:be.textContent)??""}},B=H=>{const V=J(H);V&&Ce(V)},Y=(H,V)=>{var Ve;if(V.button!==0)return;V.preventDefault(),(Ve=fe.current)==null||Ve.call(fe),he.current={start:H,end:H},se(H),$(H);const ue=Mt=>{var At;const Ct=(At=document.elementFromPoint(Mt.clientX,Mt.clientY))==null?void 0:At.closest(".diff-row");Ct&&B(Ct)},be=Mt=>{ue(Mt);const Ct=he.current;Ct&&_(Ct),Ne()},Ge=()=>Ne();window.addEventListener("mousemove",ue),window.addEventListener("mouseup",be),window.addEventListener("blur",Ge),fe.current=()=>{window.removeEventListener("mousemove",ue),window.removeEventListener("mouseup",be),window.removeEventListener("blur",Ge),fe.current=null}},Z=(H,V)=>{var ue;V.key!=="Enter"&&V.key!==" "||V.repeat||V.defaultPrevented||V.nativeEvent.isComposing||(V.preventDefault(),(ue=fe.current)==null||ue.call(fe),he.current=null,se(null),$(null),_({start:H,end:H}))},Ce=H=>{const V=he.current;(V==null?void 0:V.start.filePath)===u.path&&V.start.side===H.side&&(he.current={...V,end:H},$(H))},Ne=()=>{var H;(H=fe.current)==null||H.call(fe),he.current=null,se(null),$(null)},ct=async(H,V)=>{if(!r||!a)return;const ue=x6(H,de[H.id],V);if(ue){W(be=>{var Ge;return{...be,[H.id]:{lines:((Ge=be[H.id])==null?void 0:Ge.lines)??[],loading:!0,error:null}}});try{const be=await X5({reviewId:r,filePath:H.filePath,oldPath:H.oldPath,turnId:y,source:a,...ue});W(Ge=>({...Ge,[H.id]:j6(H,Ge[H.id],be.lines)}))}catch(be){W(Ge=>{var Ve;return{...Ge,[H.id]:{lines:((Ve=Ge[H.id])==null?void 0:Ve.lines)??[],loading:!1,error:be instanceof Error?be.message:String(be)}}})}}};j.useEffect(()=>{let H=!1;return u2(async()=>{const{highlightDiffFile:V}=await import("./syntax-GzwS-wD7.js");return{highlightDiffFile:V}},[]).then(({highlightDiffFile:V})=>V(ne,q)).then(V=>{H||je({file:ne,lines:V,theme:q})}).catch(()=>{H||je({file:ne,lines:null,theme:q})}),()=>{H=!0}},[ne,q]);const lt=(H,V)=>{const ue=c1(H),be=s1(H);if(be==null)return null;const Ge={filePath:u.path,side:ue,line:be,snippet:H.content},Ve=b.get(ki(ue,be)),Mt=Ve!=null&&Md(Ve,ve)?ve:Ve!=null&&Md(Ve,g)?g:null,Ct=Ve!=null&&Mt?z8(Ve,Mt.start,Mt.end):"",At=T&&T.filePath===u.path&&T.side===ue&&be===T.endLine,Kt=I.filter(He=>He.side===ue&&be===Math.max(He.startLine,He.endLine));return s.jsxs("div",{children:[s.jsxs("div",{className:`diff-row ${H.type} ${f?"read-only":""} ${Ct} ${At?"range-continues":""}`,"data-file-path":u.path,"data-line":be,"data-side":ue,children:[Ct?s.jsx("span",{className:"selection-rail","aria-hidden":"true"}):null,s.jsxs("div",{className:"diff-gutter",children:[s.jsx("span",{className:"line-number old",children:H.oldLine??""}),s.jsx("span",{className:"line-number new",children:H.newLine??""}),s.jsx("span",{className:"marker",children:b2(H)}),f?null:s.jsx("button",{"aria-label":`Comment on ${u.path} line ${be}`,className:"comment-handle",type:"button",onMouseDown:He=>Y(Ge,He),onKeyDown:He=>Z(Ge,He),children:s.jsx($d,{size:16,strokeWidth:2.4})})]}),s.jsx(E8,{content:H.content,selectedSourcePeek:h&&h.filePath===u.path&&h.oldPath===u.oldPath&&h.side===ue&&h.line===be?h:null,tokens:(te==null?void 0:te.get(ki(ue,be)))??null,onSourcePeek:(He,Ie)=>C({column:Ie,filePath:u.path,line:be,oldPath:u.oldPath,side:ue,symbol:He})})]}),Kt.map(He=>{const Ie=U.get(He.id),Yn=(re==null?void 0:re.id)===He.id;return s.jsxs("div",{className:`inline-comment ${Ie?"resolved":"open"} ${Yn?"editing":""}`,"data-comment-id":He.id,children:[Ie?s.jsx(Po,{size:14}):s.jsx(Ql,{size:14}),s.jsxs("div",{className:"inline-comment-content",children:[f?s.jsx("span",{className:"inline-comment-status",children:Ie?"Resolved":"Open · Needs fix"}):null,Yn?s.jsxs("form",{className:"inline-comment-edit-form",onSubmit:zt=>{zt.preventDefault(),X()},children:[s.jsx("textarea",{"aria-label":"Edit comment",ref:le,value:re.body,onChange:zt=>ye({id:He.id,body:zt.target.value}),onKeyDown:zt=>{zt.key==="Escape"?(zt.preventDefault(),ye(null)):rs(zt)&&(zt.preventDefault(),X())}}),s.jsxs("div",{className:"inline-comment-edit-actions",children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>ye(null),children:"Cancel"}),s.jsxs("button",{className:"primary-button",type:"submit",disabled:re.body.trim().length===0,children:[s.jsx(vn,{size:14}),"Save"]})]})]}):s.jsx("span",{className:"inline-comment-body",children:He.body}),Ie!=null&&Ie.summary?s.jsx("span",{className:"inline-comment-summary",children:Ie.summary}):null]}),!f&&!Yn?s.jsx("button",{"aria-label":"Edit comment",className:"inline-comment-edit-button",title:"Edit comment",type:"button",onClick:()=>ye({id:He.id,body:He.body}),children:s.jsx(Kd,{size:13})}):null]},He.id)}),At&&!f?s.jsx(g6,{tone:H.type}):null]},`${V}:${H.type}:${H.oldLine??"x"}:${H.newLine??"x"}:${H.content}`)},Je=H=>S6(H,de[H.id]).map(V=>{var ue,be;return V.type==="lines"?V.lines.map(Ge=>lt(Ge,`context:${H.id}`)):s.jsx(S8,{canExpand:!!(r&&a),directions:b6(H,V),error:((ue=de[H.id])==null?void 0:ue.error)??null,loading:((be=de[H.id])==null?void 0:be.loading)??!1,segment:V,onExpand:Ge=>{ct(H,Ge)}},`hidden:${H.id}:${V.oldStart}:${V.newStart}:${V.lineCount}`)});return s.jsx("section",{"aria-label":`${u.path} diff`,className:`diff-scroller ${E?"wrap-lines":""}`,children:s.jsxs("div",{className:`diff-table ${Q?"selecting":""}`,children:[u.isBinary?s.jsx("div",{className:"binary-note",children:"Binary file changed"}):null,u.hunks.map((H,V)=>{const ue=G.get(V);return s.jsxs("div",{className:"hunk",children:[ue?Je(ue):null,s.jsx("div",{className:"hunk-header",children:H.header||`@@ -${H.oldStart},${H.oldLines} +${H.newStart},${H.newLines} @@`}),H.lines.map(be=>lt(be,"hunk"))]},`${H.oldStart}:${H.newStart}`)})]})},E?"wrapped":"unwrapped")}function S8({canExpand:a,directions:u,error:f,loading:r,segment:h,onExpand:y}){const E=!a||!!r;return s.jsxs("div",{className:"hidden-lines",children:[s.jsxs("div",{className:"hidden-lines-main",children:[s.jsx("span",{className:"hidden-lines-count",children:r?s.jsxs(s.Fragment,{children:[s.jsx(t1,{className:"spin",size:14}),"Loading context"]}):`${h.lineCount} unmodified ${h.lineCount===1?"line":"lines"}`}),s.jsx("div",{className:"hidden-lines-actions",children:u.map(C=>{const x=x8(C);return s.jsx("button",{"aria-label":x,className:"hidden-lines-action",disabled:E,title:x,type:"button",onClick:()=>y(C),children:s.jsx(j8,{direction:C,directions:u})},C)})})]}),f?s.jsx("div",{className:"hidden-lines-error",children:f}):null]})}function x8(a){return a==="up"?"Expand hidden context upward":a==="down"?"Expand hidden context downward":"Expand more hidden context"}function j8({direction:a,directions:u}){return a==="up"?s.jsx(sh,{size:15}):a==="down"?s.jsx(Kl,{size:15}):u.length===2&&u[0]==="up"?s.jsx(hh,{size:15}):u.length===2&&u[0]==="down"?s.jsx(oh,{size:15}):s.jsx(fh,{size:15})}function E8({content:a,selectedSourcePeek:u,tokens:f,onSourcePeek:r}){return!f||f.length===0?s.jsx("code",{children:s.jsx(Td,{offsetBase:0,selectedSourcePeek:u,text:a||" ",onSourcePeek:r})}):s.jsx("code",{children:f.map(h=>{const y=N8(h);return s.jsx("span",{style:y,children:s.jsx(Td,{offsetBase:h.offset,selectedSourcePeek:u,style:y,text:h.content,onSourcePeek:r})},`${h.offset}:${h.content}`)})})}const Vo=/[A-Za-z_$][\w$]*/g,w8=new Set(["as","async","await","break","case","catch","class","const","continue","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","instanceof","interface","let","new","null","of","return","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]);function Td({offsetBase:a,selectedSourcePeek:u,style:f,text:r,onSourcePeek:h}){const y=[];let E=0;Vo.lastIndex=0;let C=Vo.exec(r);for(;C!==null;){const x=C[0],p=C.index;if(p>E&&y.push(r.slice(E,p)),w8.has(x))y.push(x);else{const T=a+p,O=(u==null?void 0:u.column)===T&&u.symbol===x;y.push(s.jsx("button",{"aria-current":O?"location":void 0,className:`source-symbol ${O?"selected":""}`,"data-source-symbol":x,style:f,tabIndex:-1,title:"Command-click or Control-click to peek source",type:"button",onClick:k=>{!k.metaKey&&!k.ctrlKey||(k.preventDefault(),k.stopPropagation(),h(x,T))},onMouseDown:k=>{(k.metaKey||k.ctrlKey)&&k.preventDefault()},onContextMenu:k=>{!k.metaKey&&!k.ctrlKey||(k.preventDefault(),k.stopPropagation(),h(x,T))},onKeyDown:k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),k.stopPropagation(),h(x,T))},children:x},`${a}:${p}:${x}`))}E=p+x.length,C=Vo.exec(r)}return E<r.length&&y.push(r.slice(E)),s.jsx(s.Fragment,{children:y.length>0?y:r})}function N8(a){const u={};a.color&&(u.color=a.color),a.fontStyle&&(a.fontStyle&1)!==0&&(u.fontStyle="italic"),a.fontStyle&&(a.fontStyle&2)!==0&&(u.fontWeight=700);const f=[];return a.fontStyle&&(a.fontStyle&4)!==0&&f.push("underline"),a.fontStyle&&(a.fontStyle&8)!==0&&f.push("line-through"),f.length>0&&(u.textDecorationLine=f.join(" ")),u}function b2(a){return a.type==="add"?"+":a.type==="delete"?"-":" "}function z8(a,u,f){return u===f?"range-selected range-single":a===u?"range-selected range-start":a===f?"range-selected range-end":"range-selected range-middle"}function T8(a,u,f){return!a||!f?"":f.mode==="turn"?`${a}:${u??""}:turn`:f.mode==="commit"?`${a}:${u??""}:commit:${f.sha}`:`${a}:${u??""}:range:${f.fromSha}:${f.toSha}`}function M8(a){const u=new Map;let f=0;for(const r of a){const h=c1(r),y=s1(r);y!=null&&(u.set(ki(h,y),f),f+=1)}return u}function Fo(a,u,f,r){const h=a.get(ki(u,f)),y=a.get(ki(u,r));return h==null||y==null?null:{start:Math.min(h,y),end:Math.max(h,y)}}function Md(a,u){return!!(u&&a>=u.start&&a<=u.end)}function C8(a,u,f,r,h){const y=[],E=Fo(u,f,r,h);if(!E)return"";a.forEach((x,p)=>{s1(x)!=null&&p>=E.start&&p<=E.end&&y.push(x)});const C=new Set(y.map(x=>x.type)).size>1;return y.map(x=>C?`${b2(x)}${x.content}`:x.content).join(`
312
312
  `)}const us="__gloss_no_extension__";function A8(a){const u=[a.name];let f=a;for(;f.children.length===1&&f.children[0].type==="directory";)f=f.children[0],u.push(f.name);return{name:u.join("/"),node:f}}function _8(a){const u=new Map;for(const f of a){const r=S2(f.path),h=u.get(r);h?h.count+=1:u.set(r,{id:r,label:r===us?"No extension":r,count:1})}return Array.from(u.values()).sort((f,r)=>f.id===us?1:r.id===us?-1:f.label.localeCompare(r.label,void 0,{sensitivity:"base"}))}function R8(a,u,f){const r=u.trim().toLowerCase();return f.size===0?[]:a.filter(h=>{const y=f.has(S2(h.path)),E=r.length===0||h.path.toLowerCase().includes(r);return y&&E})}function D8(a){const u={type:"directory",id:"root",name:"",path:"",children:[]},f=new Map;for(const r of a){const h=r.path.split("/").filter(Boolean);let y=u;for(const[E,C]of h.entries()){const x=E===h.length-1,p=h.slice(0,E+1).join("/");x?y.children.push({type:"file",id:`file:${r.path}`,name:C,path:r.path,file:r}):y=O8(y,C,p,f)}}return x2(u),u}function O8(a,u,f,r){let h=r.get(a);h||(h=new Map,r.set(a,h));const y=h.get(u);if(y)return y;const E={type:"directory",id:`dir:${f}`,name:u,path:f,children:[]};return a.children.push(E),h.set(u,E),E}function S2(a){const u=a.split("/").pop()??a,f=u.lastIndexOf(".");return f<=0||f===u.length-1?us:u.slice(f).toLowerCase()}function x2(a){a.children.sort((u,f)=>u.type!==f.type?u.type==="directory"?-1:1:Id(u.name,f.name));for(const u of a.children)u.type==="directory"&&x2(u)}function Cd({activeFilePath:a,extensionBuckets:u,files:f,filteredFiles:r,hiddenBoringFileCount:h,hiddenBoringPresets:y,onCollapse:E,onClearExtensions:C,onFileSelect:x,onSearchChange:p,onSelectAllExtensions:T,onShowAllBoringFiles:O,onToggleBoringPreset:k,onToggleExtension:q,searchQuery:Q,selectedExtensionIds:se}){const[pe,$]=j.useState(!1),[re,ye]=j.useState(new Set),K=j.useRef(null),je=j.useMemo(()=>D8(r),[r]),de=j.useMemo(()=>{const me=H8(je);for(const G of re)me.delete(G);return me},[re,je]),he=se.size!==u.length,fe=y.size>0;j.useEffect(()=>{if(!pe)return;const me=ne=>{var te;(te=K.current)!=null&&te.contains(ne.target)||$(!1)},G=ne=>{ne.key==="Escape"&&$(!1)};return window.addEventListener("pointerdown",me),window.addEventListener("keydown",G),()=>{window.removeEventListener("pointerdown",me),window.removeEventListener("keydown",G)}},[pe]);const le=me=>{ye(G=>{const ne=new Set(G);return de.has(me)?ne.add(me):ne.delete(me),ne})};return s.jsxs("section",{className:"file-tree-panel","aria-label":"Changed files",children:[s.jsxs("div",{className:"file-tree-header",children:[s.jsx("span",{children:"Changed files"}),E?s.jsx("button",{"aria-label":"Collapse file tree",className:"file-tree-icon-button",title:"Collapse file tree",type:"button",onClick:E,children:s.jsx(Wh,{size:15})}):null]}),s.jsxs("div",{className:"file-tree-controls",children:[s.jsxs("label",{className:"file-tree-search",children:[s.jsx(im,{size:18}),s.jsx("span",{className:"sr-only",children:"Filter files"}),s.jsx("input",{type:"search",value:Q,placeholder:"Filter files...",onChange:me=>p(me.target.value)}),Q?s.jsx("button",{"aria-label":"Clear file search",className:"file-tree-clear",type:"button",onClick:()=>p(""),children:s.jsx(Ui,{size:14})}):null]}),s.jsxs("div",{className:"file-tree-filter-shell",ref:K,children:[s.jsx("button",{"aria-label":"Filter files","aria-expanded":pe,className:`file-tree-filter-button ${he||fe?"active":""}`,title:"Filter files",type:"button",onClick:()=>$(me=>!me),children:s.jsx(om,{size:17})}),pe?s.jsx(L8,{buckets:u,hiddenBoringFileCount:h,hiddenBoringPresets:y,selectedExtensionIds:se,onClear:C,onSelectAll:T,onShowAllBoringFiles:O,onToggleBoringPreset:k,onToggle:q}):null]})]}),s.jsxs("div",{className:"file-tree-summary",children:[s.jsxs("span",{children:[r.length," of ",f.length," ",f.length===1?"file":"files"]}),h>0?s.jsxs("span",{children:[h," hidden ",h===1?"diff":"diffs"]}):null]}),r.length===0?s.jsx("div",{className:"file-tree-empty",children:f.length===0?"No files changed":"No files match"}):s.jsx("div",{className:"file-tree-list",children:je.children.map(me=>s.jsx(j2,{activeFilePath:a,expandedDirectoryIds:de,node:me,depth:0,onFileSelect:x,onToggleDirectory:le},me.id))})]})}function L8({buckets:a,hiddenBoringFileCount:u,hiddenBoringPresets:f,onClear:r,onSelectAll:h,onShowAllBoringFiles:y,onToggleBoringPreset:E,onToggle:C,selectedExtensionIds:x}){return s.jsxs("div",{className:"extension-popover",role:"menu","aria-label":"File extensions",children:[s.jsxs("div",{className:"extension-popover-header",children:[s.jsx("span",{children:"File extensions"}),s.jsxs("div",{className:"extension-popover-actions",children:[s.jsx("button",{type:"button",onClick:h,children:"All"}),s.jsx("button",{type:"button",onClick:r,children:"None"})]})]}),s.jsx("div",{className:"extension-options",children:a.map(p=>{const T=x.has(p.id);return s.jsxs("button",{"aria-checked":T,className:"extension-option",role:"menuitemcheckbox",type:"button",onClick:()=>C(p.id),children:[s.jsx("span",{className:"extension-check",children:T?s.jsx(vn,{size:16}):null}),s.jsx("span",{className:"extension-label",children:p.label}),s.jsx("span",{className:"extension-count",children:p.count})]},p.id)})}),s.jsxs("div",{className:"extension-popover-section",children:[s.jsxs("div",{className:"extension-popover-header",children:[s.jsx("span",{children:"Hide boring files"}),s.jsx("div",{className:"extension-popover-actions",children:s.jsx("button",{type:"button",onClick:y,children:"Show all"})})]}),s.jsx("div",{className:"extension-options",children:Fd.map(p=>{const T=f.has(p.id);return s.jsxs("button",{"aria-checked":T,className:"extension-option",role:"menuitemcheckbox",type:"button",onClick:()=>E(p.id),children:[s.jsx("span",{className:`extension-check ${T?"checked":""}`,children:T?s.jsx(vn,{size:13}):null}),s.jsx("span",{children:p.label})]},p.id)})}),u>0?s.jsxs("div",{className:"extension-popover-note",children:[u," ",u===1?"diff":"diffs"," hidden by presets"]}):null]})]})}function j2({activeFilePath:a,depth:u,expandedDirectoryIds:f,node:r,onFileSelect:h,onToggleDirectory:y}){const E={paddingLeft:8+u*14};if(r.type==="directory"){const C=A8(r),x=f.has(C.node.id);return s.jsxs("div",{children:[s.jsxs("button",{"aria-expanded":x,className:"file-tree-row directory",style:E,title:C.node.path,type:"button",onClick:()=>y(C.node.id),children:[x?s.jsx(Kl,{size:16}):s.jsx(Xd,{size:16}),x?s.jsx(Zd,{size:17}):s.jsx(Oh,{size:17}),s.jsx("span",{className:"file-tree-name",children:C.name})]}),x?s.jsx("div",{children:C.node.children.map(p=>s.jsx(j2,{activeFilePath:a,expandedDirectoryIds:f,node:p,depth:u+1,onFileSelect:h,onToggleDirectory:y},p.id))}):null]})}return s.jsx("div",{children:s.jsxs("button",{className:`file-tree-row file ${a===r.path?"active":""}`,style:E,title:r.path,type:"button",onClick:()=>h(r.path),children:[s.jsx("span",{className:"file-tree-spacer"}),s.jsx(e1,{size:16}),s.jsx("span",{className:"file-tree-name",children:r.name}),s.jsxs("span",{className:"file-tree-stats",children:[s.jsxs("span",{className:"stat add",children:["+",r.file.additions]}),s.jsxs("span",{className:"stat del",children:["-",r.file.deletions]})]})]})})}function H8(a){const u=new Set,f=r=>{for(const h of r.children)h.type==="directory"&&(u.add(h.id),f(h))};return f(a),u}function Ad(a){return{response:a,content:a.content,startLine:a.startLine,totalLines:a.totalLines,truncated:a.truncated,hasMoreAbove:a.hasMoreAbove,hasMoreBelow:a.hasMoreBelow}}function k8(a,u,f=t5){if(u==="above"){if(!a.hasMoreAbove)return null;const y=Math.max(1,a.startLine-f),E=a.startLine-y;return E>0?{startLine:y,lineCount:E}:null}if(!a.hasMoreBelow)return null;const r=E2(a)+1,h=Math.min(f,a.totalLines-r+1);return h>0?{startLine:r,lineCount:h}:null}function U8(a,u){var T,O;const f=new Map;for(const[k,q]of hs(a.content).entries())f.set(a.startLine+k,q);for(const[k,q]of hs(u.content).entries())f.set(u.startLine+k,q);const r=Array.from(f.entries()).toSorted(([k],[q])=>k-q);if(r.length===0)return a;const h=((T=r[0])==null?void 0:T[0])??a.startLine,y=((O=r.at(-1))==null?void 0:O[0])??E2(a),E=Math.max(a.totalLines,u.totalLines),C=h>1&&(a.hasMoreAbove||u.hasMoreAbove),x=y<E&&(a.hasMoreBelow||u.hasMoreBelow),p=a.truncated&&!a.hasMoreAbove&&!a.hasMoreBelow||u.truncated&&!u.hasMoreAbove&&!u.hasMoreBelow;return{response:a.response,content:r.map(([,k])=>k).join(`
313
313
  `),startLine:h,totalLines:E,truncated:p||C||x,hasMoreAbove:C,hasMoreBelow:x}}function E2(a){return a.startLine+hs(a.content).length-1}function hs(a){const u=a.replace(/\r\n/g,`
314
314
  `).split(`
315
- `);return u.at(-1)===""&&u.pop(),u.length>0?u:[""]}const B8=16,ms=360,Wo=280,_d=360,w2={above:!1,below:!1};function Rd(){return{...w2}}function q8({openTargets:a,onCopyFileContents:u,onLoadRange:f,onOpenFile:r,state:h,onClose:y}){const{resolvedTheme:E}=u1(),C=j.useRef(null),x=j.useRef(null),p=j.useRef(null),T=j.useRef(null),O=j.useRef(null),k=j.useRef(null),q=h.status==="ready"?h.response:null,Q=h.status==="error"?Q8(h.message,h.symbol):null,se=j.useRef(w2),pe=j.useRef({above:0,below:0}),$=j.useRef(q),[re,ye]=j.useState(null),[K,je]=j.useState(()=>q?Ad(q):null),de=j.useRef(q),[W,he]=j.useState(Rd),[fe,le]=j.useState(null),[me,G]=j.useState(!1),[ne,te]=j.useState(null);if(q!==de.current){const B=Rd();de.current=q,$.current=q,pe.current={above:pe.current.above+1,below:pe.current.below+1},se.current=B,je(q?Ad(q):null),le(null),he(B),te(null)}const ze=j.useMemo(()=>K?hs(K.content):[],[K]),b=K&&q&&(re==null?void 0:re.content)===K.content&&re.language===q.language&&re.theme===E?re.lines:null,U=K?X8(K,W,fe):null,I=j.useCallback(B=>{O.current=B,T.current===null&&(T.current=window.requestAnimationFrame(()=>{T.current=null;const Y=O.current,Z=C.current;!Y||!Z||(Z.style.top=`${Math.round(Y.top)}px`,Z.style.left=`${Math.round(Y.left)}px`,Z.style.right="auto",Z.style.bottom="auto",Z.style.width=`${Math.round(Y.width)}px`,Z.style.height=`${Math.round(Y.height)}px`,Z.style.transform="")}))},[]),ge=j.useCallback(()=>{var B;(B=k.current)==null||B.call(k),k.current=null,document.body.classList.remove("source-peek-interacting"),document.body.style.cursor="",document.body.style.userSelect=""},[]),ve=j.useCallback((B,Y)=>{const Z={...se.current,[B]:Y};se.current=Z,he(Z)},[]);j.useEffect(()=>{const B=Y=>{Y.key==="Escape"&&y()};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[y]),j.useEffect(()=>{if(!ne)return;const B=window.setTimeout(()=>te(null),2200);return()=>window.clearTimeout(B)},[ne]),j.useEffect(()=>{const B=C.current;if(!B)return;const Y=Z=>{if(Z.defaultPrevented)return;const Ce=Z.target;if(!(Ce instanceof Node)||!B.contains(Ce))return;Z.preventDefault(),Z.stopPropagation();const Ne=x.current;if(!Ne)return;const ct=Z8(Z,Ne);Ne.scrollTop+=ct.y,Ne.scrollLeft+=ct.x};return B.addEventListener("wheel",Y,{passive:!1}),()=>B.removeEventListener("wheel",Y)},[]),j.useEffect(()=>{if(!q||!K)return;let B=!1;return u2(async()=>{const{highlightSourceContent:Y}=await import("./syntax-CbLXtdvg.js");return{highlightSourceContent:Y}},[]).then(({highlightSourceContent:Y})=>Y(K.content,q.language,E)).then(Y=>{B||ye({lines:Y,content:K.content,language:q.language,theme:E})}).catch(()=>{B||ye({lines:null,content:K.content,language:q.language,theme:E})}),()=>{B=!0}},[K,q,E]),j.useEffect(()=>{q&&window.requestAnimationFrame(()=>{var B;(B=p.current)==null||B.scrollIntoView({block:"center"})})},[q]),j.useEffect(()=>{const B=()=>{const Y=C.current;Y&&I(Yl(Yo(Y)))};return window.requestAnimationFrame(()=>I(G8())),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}},[I]),j.useEffect(()=>()=>{ge(),T.current!==null&&window.cancelAnimationFrame(T.current)},[ge]);const g=B=>{if(B.button!==0||B.target.closest("button"))return;B.preventDefault(),ge();const Y=C.current;if(!Y)return;const Z=Yl(Yo(Y)),Ce=B.clientX,Ne=B.clientY;O.current=Z,document.body.classList.add("source-peek-interacting"),document.body.style.cursor="grabbing",document.body.style.userSelect="none",Y.classList.add("dragging");const ct=H=>{const V=Yl({...Z,left:Z.left+H.clientX-Ce,top:Z.top+H.clientY-Ne});Y.style.transform=`translate3d(${Math.round(V.left-Z.left)}px, ${Math.round(V.top-Z.top)}px, 0)`,O.current=V},lt=()=>{const H=O.current??Z;Y.classList.remove("dragging"),I(H),ge()},Je=()=>{window.removeEventListener("pointermove",ct),window.removeEventListener("pointerup",lt),Y.classList.remove("dragging")};k.current=Je,window.addEventListener("pointermove",ct),window.addEventListener("pointerup",lt,{once:!0})},_=B=>Y=>{if(Y.button!==0)return;Y.preventDefault(),Y.stopPropagation(),ge();const Z=C.current;if(!Z)return;const Ce=Yl(Yo(Z)),Ne=Y.clientX,ct=Y.clientY,lt=Y8(B);O.current=Ce,document.body.classList.add("source-peek-interacting"),document.body.style.cursor=lt,document.body.style.userSelect="none";const Je=ue=>{const be=ue.clientX-Ne,Ge=ue.clientY-ct;I(V8(Ce,B,be,Ge))},H=()=>ge(),V=()=>{window.removeEventListener("pointermove",Je),window.removeEventListener("pointerup",H)};k.current=V,window.addEventListener("pointermove",Je),window.addEventListener("pointerup",H,{once:!0})},X=j.useCallback(async B=>{var ct;if(!q||!K||se.current[B])return;const Y=k8(K,B);if(!Y)return;const Z=pe.current[B]+1;pe.current={...pe.current,[B]:Z};const Ce=()=>$.current===q&&pe.current[B]===Z,Ne=B==="above"?((ct=x.current)==null?void 0:ct.scrollHeight)??null:null;if(Ce()){ve(B,!0),le(null);try{const lt=await f(q.filePath,Y.startLine,Y.lineCount);Ce()&&(je(Je=>(Je==null?void 0:Je.response)===q?U8(Je,lt):Je),B==="above"&&Ne!==null&&window.requestAnimationFrame(()=>{const Je=x.current;Je&&(Je.scrollTop+=Je.scrollHeight-Ne)}))}catch(lt){Ce()&&le(lt instanceof Error?lt.message:String(lt))}finally{Ce()&&ve(B,!1)}}},[K,f,q,ve]),J=j.useCallback(B=>{const Y=B.currentTarget,Z=Y.scrollHeight-Y.scrollTop-Y.clientHeight;Y.scrollTop<=_d&&X("above"),Z<=_d&&X("below")},[X]);return s.jsxs("aside",{"aria-label":"Source peek",className:"source-peek-panel",ref:C,children:[s.jsx("button",{"aria-label":"Resize source peek horizontally",className:"source-peek-resize-handle left",type:"button",onPointerDown:_({left:!0})}),s.jsx("button",{"aria-label":"Resize source peek vertically",className:"source-peek-resize-handle bottom",type:"button",onPointerDown:_({bottom:!0})}),s.jsx("button",{"aria-label":"Resize source peek",className:"source-peek-resize-handle bottom-left",type:"button",onPointerDown:_({bottom:!0,left:!0})}),s.jsx("button",{"aria-label":"Resize source peek",className:"source-peek-resize-handle bottom-right",type:"button",onPointerDown:_({bottom:!0,right:!0})}),s.jsxs("header",{className:"source-peek-header",onPointerDown:g,children:[s.jsxs("div",{className:"source-peek-title",children:[s.jsx(Ah,{size:17}),s.jsx("span",{children:"Source peek"})]}),s.jsx(Bh,{className:"source-peek-drag-indicator",size:16,"aria-hidden":"true"}),s.jsxs("div",{className:"source-peek-toolbar",children:[q?s.jsx(v2,{filePath:q.filePath,openTargets:a,wordWrap:me,onActionMessage:te,onCopyFileContents:()=>u(q.filePath),onOpenFile:B=>r(q.filePath,B),onWordWrapChange:G}):null,s.jsx("button",{"aria-label":"Close source peek",className:"icon-button source-peek-close",type:"button",onClick:y,children:s.jsx(Ui,{size:17})})]})]}),h.status==="loading"?s.jsxs("div",{className:"source-peek-status",children:[s.jsx(t1,{className:"spin",size:18}),s.jsxs("span",{children:["Resolving ",h.symbol]})]}):null,h.status==="error"?s.jsx("div",{className:"source-peek-status error",children:s.jsxs("div",{className:"source-peek-error-card",children:[s.jsx(ph,{size:18}),s.jsxs("div",{className:"source-peek-error-copy",children:[s.jsx("strong",{children:Q==null?void 0:Q.title}),s.jsx("p",{children:Q==null?void 0:Q.message}),Q!=null&&Q.hint?s.jsx("span",{children:Q.hint}):null]})]})}):null,q?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"source-peek-meta",children:[s.jsx("span",{className:"source-peek-symbol",children:q.targetSymbol}),s.jsxs("span",{className:"source-peek-path",title:`${q.filePath}:${q.line}`,children:[q.filePath,":",q.line]}),ne?s.jsx("span",{className:"source-peek-action-message",children:ne}):null]}),U?s.jsx("div",{className:"source-peek-truncated",children:U}):null,s.jsx("section",{className:`source-peek-code ${me?"wrap-lines":""}`,"aria-label":q.filePath,ref:x,onScroll:J,children:ze.map((B,Y)=>{const Z=((K==null?void 0:K.startLine)??q.startLine)+Y,Ce=Z===q.line;return s.jsxs("div",{className:`source-peek-row ${Ce?"target":""}`,ref:Ce?p:null,children:[s.jsx("span",{className:"source-peek-line-number",children:Z}),s.jsx("code",{children:J8(B||" ",(b==null?void 0:b[Y])??null)})]},Z)})})]}):null]})}function Yo(a){const u=a.getBoundingClientRect();return{height:u.height,left:u.left,top:u.top,width:u.width}}function Yl(a){const u=h1();if(window.innerWidth<=980)return{height:window.innerHeight-u*2,left:u,top:u,width:window.innerWidth-u*2};const f=Math.max(ms,window.innerWidth-u*2),r=Math.max(Wo,window.innerHeight-u*2),h=Xl(a.width,ms,f),y=Xl(a.height,Wo,r);return{height:y,left:Xl(a.left,u,window.innerWidth-h-u),top:Xl(a.top,u,window.innerHeight-y-u),width:h}}function G8(){const a=h1();if(window.innerWidth<=980)return Yl({height:window.innerHeight-a*2,left:a,top:a,width:window.innerWidth-a*2});const u=Math.max(a,Math.round(window.innerWidth/3)),f=window.innerWidth-u-a,r=window.innerHeight-a*2;return Yl({height:r,left:u,top:a,width:f})}function V8(a,u,f,r){const h=h1();let y=a.left,E=a.width,C=a.height;if(u.left){const x=a.left+a.width,p=h,T=x-ms;y=Xl(a.left+f,p,T),E=x-y}return u.right&&(E=Xl(a.width+f,ms,window.innerWidth-a.left-h)),u.bottom&&(C=Xl(a.height+r,Wo,window.innerHeight-a.top-h)),Yl({height:C,left:y,top:a.top,width:E})}function Y8(a){return a.bottom&&a.left?"nesw-resize":a.bottom&&a.right?"nwse-resize":a.bottom?"row-resize":"col-resize"}function X8(a,u,f){return f?`Could not load more source: ${d1(f)}`:u.above&&u.below?"Loading more source lines above and below.":u.above?"Loading more source lines above.":u.below?"Loading more source lines below.":a.hasMoreAbove||a.hasMoreBelow?"Large source file - more lines load as you scroll.":a.truncated?"Source preview was shortened for a very long line.":null}function Q8(a,u){const f=d1(a);return/no definition found/i.test(f)?{hint:"This can happen for Node built-ins, package exports, or symbols outside the repo.",message:`Gloss could not find a project definition for ${u}.`,title:"No definition found"}:{hint:null,message:f,title:"Source peek unavailable"}}function d1(a){const u=a.replace(/^\d+:\s*/,"").trim();try{const f=JSON.parse(u);if(typeof f=="object"&&f!==null&&!Array.isArray(f)&&typeof f.error=="string")return d1(f.error)}catch{}return u.replace(/^source peek unavailable:\s*/i,"").trim()}function h1(){return window.innerWidth<=720?8:B8}function Xl(a,u,f){return Math.min(f,Math.max(u,a))}function Z8(a,u){const f=K8(a,u);return{x:a.deltaX*f,y:a.deltaY*f}}function K8(a,u){return a.deltaMode===WheelEvent.DOM_DELTA_LINE?$8(u):a.deltaMode===WheelEvent.DOM_DELTA_PAGE?u.clientHeight||window.innerHeight:1}function $8(a){const u=Number.parseFloat(window.getComputedStyle(a).lineHeight);return Number.isFinite(u)?u:24}function J8(a,u){return!u||u.length===0?a:u.map(f=>s.jsx("span",{style:F8(f),children:f.content},`${f.offset}:${f.content}`))}function F8(a){const u={};a.color&&(u.color=a.color),a.fontStyle&&(a.fontStyle&1)!==0&&(u.fontStyle="italic"),a.fontStyle&&(a.fontStyle&2)!==0&&(u.fontWeight=700);const f=[];return a.fontStyle&&(a.fontStyle&4)!==0&&f.push("underline"),a.fontStyle&&(a.fontStyle&8)!==0&&f.push("line-through"),f.length>0&&(u.textDecorationLine=f.join(" ")),u}function Dd(a){return a instanceof Error?a.message:String(a)}function W8({reviewId:a,reviewScope:u,onLineCommentSelect:f,onSubmitted:r}){const h=jt(b=>b.comments),y=jt(b=>b.addGeneralComment),E=jt(b=>b.removeComment),C=jt(b=>b.updateComment),[x,p]=j.useState(""),[T,O]=j.useState(null),[k,q]=j.useState(null),[Q,se]=j.useState("idle"),[pe,$]=j.useState(null),re=j.useRef(null),ye=j.useRef(null),K=j.useRef(!1),je=Q!=="submitting"&&Q!=="done",de=x.trim(),W=h.filter(Oi),he=h.filter(b=>!Oi(b)),fe=T===null?null:he.find(b=>b.id===T)??null,le=k!==null,me=W.length>0,G=j.useCallback(()=>{O(null),q(null)},[]),ne=()=>{de&&(y(de),p(""))},te=()=>{!fe||!(k!=null&&k.trim())||(C(fe.id,k),q(null))},ze=j.useCallback(async()=>{if(!(!je||K.current)){K.current=!0,se("submitting"),$(null);try{await G5(a,h,u),se("done"),$("Submitted");try{await(r==null?void 0:r())}catch(b){$(`Submitted, but refresh failed: ${Dd(b)}`)}}catch(b){K.current=!1,se("error"),$(Dd(b))}}},[je,h,r,a,u]);return j.useEffect(()=>{const b=U=>{J5(U)&&(U.preventDefault(),ze())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[ze]),j.useEffect(()=>{T!==null&&fe===null&&O(null)},[fe,T]),j.useEffect(()=>{var U,I;if(fe===null)return;const b=ge=>{ge.key==="Escape"&&(ge.preventDefault(),le?q(null):G())};return le?(U=ye.current)==null||U.focus():(I=re.current)==null||I.focus(),window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[G,le,fe]),s.jsxs(s.Fragment,{children:[s.jsxs("aside",{className:"submit-bar",children:[s.jsxs("div",{className:"feedback-panel",children:[me?s.jsxs("div",{className:"inline-feedback-row",children:[s.jsxs("span",{className:"feedback-row-label inline-feedback-label",children:[s.jsx(Ql,{size:14}),"Inline feedback",s.jsx("span",{className:"feedback-row-count",children:W.length})]}),s.jsx("div",{className:"comment-list",children:W.map(b=>{const U=Od(b);return s.jsxs("div",{className:`comment-chip ${U.tone}`,title:U.title,children:[s.jsxs("button",{className:"comment-chip-target",type:"button",title:`Jump to ${U.title}`,onClick:()=>f==null?void 0:f(b),children:[s.jsx("span",{className:"comment-chip-kind",children:U.kind}),s.jsx("span",{className:"comment-chip-text",children:U.text})]}),s.jsx("button",{className:"icon-button",type:"button",title:"Remove comment",onClick:()=>E(b.id),children:s.jsx(ss,{size:14})})]},b.id)})})]}):null,he.length>0?s.jsxs("div",{className:"general-feedback-summary-row",children:[s.jsxs("span",{className:"feedback-row-label general-feedback-label",children:[s.jsx(Ql,{size:14}),"General feedback",s.jsx("span",{className:"feedback-row-count general-feedback-count",children:he.length})]}),s.jsx("div",{className:"general-feedback-list",children:he.map(b=>{const U=Od(b);return s.jsxs("div",{className:`comment-chip ${U.tone}`,title:U.title,children:[s.jsxs("button",{className:"comment-chip-target",type:"button",title:"View general feedback",onClick:()=>O(b.id),children:[s.jsx("span",{className:"comment-chip-kind",children:U.kind}),s.jsx("span",{className:"comment-chip-text",children:U.text})]}),s.jsx("button",{className:"icon-button",type:"button",title:"Remove comment",onClick:()=>E(b.id),children:s.jsx(ss,{size:14})})]},b.id)})})]}):null,s.jsx("div",{className:"general-feedback-row",children:s.jsx("form",{className:"general-comment-form",onSubmit:b=>{b.preventDefault(),ne()},children:s.jsxs("div",{className:"general-comment-compose",children:[s.jsx(Ql,{className:"general-comment-compose-icon",size:15}),s.jsx("textarea",{"aria-label":"General feedback",placeholder:"General feedback",rows:1,value:x,onChange:b=>p(b.target.value),onKeyDown:b=>{rs(b)&&(b.preventDefault(),ne())}}),s.jsxs("button",{"aria-keyshortcuts":"Meta+Enter",className:"general-comment-add",type:"submit",disabled:!de,title:"Add general feedback (Command+Enter)",children:[s.jsx($d,{size:14}),s.jsx("span",{children:"Add"})]})]})})})]}),s.jsxs("div",{className:"submit-actions",children:[pe?s.jsx("span",{className:`submit-message ${Q}`,children:pe}):null,s.jsxs("button",{"aria-keyshortcuts":"Meta+Shift+Enter",className:"primary-button",type:"button",disabled:!je,title:"Submit review (Command+Shift+Enter)",onClick:ze,children:[Q==="done"?s.jsx(vn,{size:16}):s.jsx(sm,{size:16}),"Submit ",h.length]})]})]}),fe?Hi.createPortal(s.jsx("div",{className:"general-feedback-dialog-backdrop",children:s.jsxs("dialog",{"aria-labelledby":"general-feedback-dialog-title","aria-modal":"true",className:"general-feedback-dialog",ref:re,open:!0,tabIndex:-1,children:[s.jsxs("header",{className:"general-feedback-dialog-header",children:[s.jsx("h2",{id:"general-feedback-dialog-title",children:k===null?"General feedback":"Edit general feedback"}),s.jsx("button",{"aria-label":"Close general feedback",className:"icon-button general-feedback-dialog-close",type:"button",onClick:G,children:s.jsx(Ui,{size:18})})]}),s.jsx("div",{className:"general-feedback-dialog-body",children:k===null?s.jsx("p",{className:"general-feedback-dialog-text",children:fe.body}):s.jsx("textarea",{"aria-label":"Edit general feedback",className:"general-feedback-dialog-editor",ref:ye,value:k,onChange:b=>q(b.target.value),onKeyDown:b=>{rs(b)&&(b.preventDefault(),te())}})}),s.jsx("footer",{className:"general-feedback-dialog-footer",children:k===null?s.jsxs(s.Fragment,{children:[s.jsxs("button",{className:"secondary-button",type:"button",onClick:()=>{E(fe.id),G()},children:[s.jsx(ss,{size:14}),"Delete"]}),s.jsxs("button",{className:"secondary-button",type:"button",onClick:()=>q(fe.body),children:[s.jsx(Kd,{size:14}),"Edit"]}),s.jsx("button",{className:"primary-button",type:"button",onClick:G,children:"Close"})]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>q(null),children:"Cancel"}),s.jsxs("button",{className:"primary-button",type:"button",disabled:k.trim().length===0,onClick:te,children:[s.jsx(vn,{size:14}),"Save"]})]})})]})}),document.body):null]})}function Od(a){if(!Oi(a))return{kind:"General",text:a.body,title:a.body,tone:"general"};const u=`${a.filePath}:${Li(a,{repeatSideOnEnd:!1})}`;return{kind:"Line",text:u,title:u,tone:"line"}}const I8="gloss:viewed-files:";function N2(a){return`${I8}${a}`}function Xo(a,u=z2()){if(!u)return new Set;const f=u.getItem(N2(a));if(!f)return new Set;try{const r=JSON.parse(f);return new Set(Array.isArray(r)?r.filter(h=>typeof h=="string"):[])}catch{return new Set}}function P8(a,u,f=z2()){if(!f)return;const r=N2(a);if(u.size===0){f.removeItem(r);return}f.setItem(r,JSON.stringify(Array.from(u).toSorted()))}function z2(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function e7(a){return a.type==="review.turn.created"||a.type==="review.submitted"||a.type==="review.updated"}function t7(a,u,f){return a.reviewId!==u||!a.selectedExtensionIds?new Set(f):new Set(f.filter(r=>{var h;return(h=a.selectedExtensionIds)==null?void 0:h.has(r)}))}function n7(a,u){const f=new Map(((u==null?void 0:u.comments)??[]).map(r=>[r.commentId,r]));return((a==null?void 0:a.comments)??[]).filter(r=>!Oi(r)).map(r=>{const h=f.get(r.id)??null;return{comment:r,resolvedComment:h,status:h?"resolved":"open",summary:(h==null?void 0:h.summary)??null}})}function l7(a,u){return{icon:(a==null?void 0:a.trim())===u.trim()?"branch":null}}function a7(a,u){const f=(a==null?void 0:a.trim())??"",r=f||"detached";return r===u.trim()?null:{label:r,title:f||"Detached HEAD"}}function T2(a){return a.length>1}const i7=300,c7=560,s7=360,u7={files:[],stats:{files:0,additions:0,deletions:0}},o7=[],r7=[],f7={agentStatus:null,latestAgentMessage:null,latestAgentTimestamp:null,latestReviewEvent:null,progress:null},Qo=[{label:"Default app",target:"default"},{label:"Open in folder",target:"folder"}],Ld=["lockfiles"],M2="gloss:hidden-boring-file-presets:v2",d7=new Map(Fd.map(a=>[a.id,a.label])),C2={diff:null,error:null,loading:!1},h7=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),m7=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}),Zo=[["year",3600*24*365],["month",3600*24*30],["week",3600*24*7],["day",3600*24],["hour",3600],["minute",60],["second",1]],p7=[{icon:Qh,label:"Match system theme",value:"system"},{icon:hm,label:"Use light theme",value:"light"},{icon:Kh,label:"Use dark theme",value:"dark"}];function y7({reviewId:a}){return s.jsx(j7,{reviewId:a},a)}function g7(){const{preference:a,setPreference:u}=u1();return s.jsxs("fieldset",{className:"theme-toggle",children:[s.jsx("legend",{className:"sr-only",children:"Theme"}),p7.map(f=>{const r=f.icon;return s.jsx("button",{"aria-label":f.label,"aria-pressed":a===f.value,className:"theme-toggle-option",title:f.label,type:"button",onClick:()=>u(f.value),children:s.jsx(r,{size:15})},f.value)})]})}function v7(){try{const a=window.localStorage.getItem(M2);return a===null?new Set(Ld):Lm(JSON.parse(a))}catch{return new Set(Ld)}}function Hd(a){try{window.localStorage.setItem(M2,JSON.stringify(Array.from(a)))}catch{}}function b7(a,u){const f=Wd(a);return{presetLabels:Array.from(u).filter(h=>f.has(h)).map(h=>d7.get(h)??h)}}function kd(a){const u=document.getElementById(f1(a));u&&u.scrollIntoView({behavior:"smooth",block:"start"})}function S7(a){const u=document.getElementById(f1(a.filePath));if(!u)return!1;const f=Math.max(a.startLine,a.endLine),r=Array.from(u.querySelectorAll(".inline-comment")).find(x=>x.dataset.commentId===a.id),h=Array.from(u.querySelectorAll(".diff-row")).find(x=>x.dataset.side===a.side&&Number(x.dataset.line)===f),y=r??h;if(!y)return!1;const E=y.getBoundingClientRect(),C=E.top+window.scrollY-window.innerHeight/2+E.height/2;return window.scrollTo({behavior:"auto",top:Math.max(C,0)}),x7(y),!0}function x7(a){a.classList.remove("jump-target"),a.getBoundingClientRect(),a.classList.add("jump-target"),window.setTimeout(()=>a.classList.remove("jump-target"),1400)}function j7({reviewId:a}){const[u,f]=j.useState(null),[r,h]=j.useState(null),[y,E]=j.useState(!1),[C,x]=j.useState(null),[p,T]=j.useState(!0),[O,k]=j.useState(!1),[q,Q]=j.useState(s7),[se,pe]=j.useState({reviewId:null,searchQuery:"",selectedExtensionIds:null}),[$,re]=j.useState(()=>v7()),[ye,K]=j.useState(new Set),[je,de]=j.useState(null),[W,he]=j.useState({mode:"all"}),[fe,le]=j.useReducer(L7,C2),[me,G]=j.useState(null),[ne,te]=j.useState(null),[ze,b]=j.useState(Qo),[U,I]=j.useState(()=>({storageKey:a,files:Xo(a)})),[ge,ve]=j.useState(null),[g,_]=j.useState([]),[X,J]=j.useState("connecting"),B=j.useRef(0),Y=j.useRef(0),Z=j.useRef(null),Ce=j.useRef(null),Ne=jt(R=>R.reset),ct=jt(R=>R.hydrateReview),lt=jt(R=>R.setDraft),Je=(u==null?void 0:u.turns[u.turns.length-1])??null,H=(Je==null?void 0:Je.id)??null,V=u&&Je?u.turns.find(R=>R.id===je)??Je:null,ue=u&&V?E7(u,V):null,be=ue?md(ue):null,Ge=(V==null?void 0:V.diff.commitDiffs)??r7,Ve=j.useMemo(()=>O7(W,Ge),[Ge,W]),Mt=V&&Ve.mode==="single"?Ge.find(R=>R.commit.sha===Ve.sha)??null:null,Ct=V&&Ve.mode==="range"?fe.diff??u7:null,At=V?Ct??Mt??V.diff:null,Kt=j.useMemo(()=>At?{...At,files:Xm(At.files)}:null,[At]),He=(Kt==null?void 0:Kt.files)??o7,Yn=j.useMemo(()=>Om(He,$),[$,He]).hidden,zt=j.useMemo(()=>new Map(Yn.filter(R=>!ye.has(R.path)).map(R=>[R.path,b7(R,$)])),[Yn,$,ye]),$l=j.useMemo(()=>_8(He),[He]),xn=j.useMemo(()=>$l.map(R=>R.id),[$l]),jl=(u==null?void 0:u.meta.id)??null,Bi=!!(jl&&se.reviewId===jl),La=j.useMemo(()=>jl?t7(se,jl,xn):new Set(xn),[xn,se,jl]),Ha=Bi?se.searchQuery:"",cn=j.useMemo(()=>R8(He,Ha,La),[He,Ha,La]),st=V?`${a}:${V.id}`:a;let Ut=U.files;U.storageKey!==st&&(Ut=Xo(st),I({storageKey:st,files:Ut}));const Et=C&&cn.some(R=>R.path===C)?C:null,bs=j.useMemo(()=>ue?N7(g,ue):f7,[g,ue]),qi=!!(!r&&u&&V&&ue&&Kt&&be),Jl=j.useCallback(R=>{f(R),R.events&&(_(R.events),Y.current=Math.max(0,...R.events.map(F=>F.seq??0))),document.title=md(R)},[]),jn=j.useCallback(()=>{B.current+=1,te(null),G(null)},[]),Xn=j.useCallback(()=>{he({mode:"all"}),le({type:"idle"}),jn(),lt(null)},[jn,lt]),Qn=j.useCallback(async()=>{var ce;const R=await yd(a),F=((ce=R.turns[R.turns.length-1])==null?void 0:ce.id)??null;je===null&&H&&F!==H&&Xn(),Jl(R)},[a,je,H,Xn,Jl]),dn=j.useCallback(R=>{R.seq&&R.seq>Y.current&&(Y.current=R.seq),_(F=>w7(F,R))},[]);if(j.useEffect(()=>{let R=!1;return Ne(),Y.current=0,_([]),J("connecting"),yd(a).then(F=>{R||Jl(F)}).catch(F=>{R||h(F instanceof Error?F.message:String(F))}),()=>{R=!0}},[a,Ne,Jl]),j.useEffect(()=>{let R=!1;return V5().then(({targets:F})=>{R||b(F.length>0?F:Qo)}).catch(()=>{R||b(Qo)}),()=>{R=!0}},[]),j.useEffect(()=>{var R;V&&ct(((R=V.feedback)==null?void 0:R.comments)??[],V.resolution??null)},[ct,V]),j.useEffect(()=>{if(!V||Ve.mode!=="range")return;let R=!1;return le({type:"loading"}),Y5(a,Ve.fromSha,Ve.toSha,V.id).then(F=>{R||le({type:"loaded",diff:F})}).catch(F=>{R||le({error:F instanceof Error?F.message:String(F),type:"failed"})}),()=>{R=!0}},[Ve,V,a]),j.useEffect(()=>{if(!qi)return;const R=Z.current,F=Ce.current;if(!R||!F)return;const ce=()=>{R.style.setProperty("--review-sticky-top",`${F.offsetHeight}px`)};ce();const Pe=new ResizeObserver(ce);return Pe.observe(F),()=>Pe.disconnect()},[qi]),j.useEffect(()=>{const R=new EventSource(`/api/reviews/${a}/events?after=${Y.current}`);return J("connecting"),R.onopen=()=>{J("connected")},R.onmessage=F=>{const ce=o5(F.data,l2,"review event");dn(ce),e7(ce)&&Qn().catch(Pe=>{h(Pe instanceof Error?Pe.message:String(Pe))})},R.onerror=()=>{J("disconnected")},()=>{R.close()}},[a,Qn,dn]),r)return s.jsx("main",{className:"empty-shell",children:s.jsxs("section",{className:"empty-panel",children:[s.jsx("h1",{children:"Review unavailable"}),s.jsx("p",{children:r})]})});if(!u||!V||!ue||!Kt||!be)return s.jsx("main",{className:"empty-shell",children:s.jsxs("section",{className:"empty-panel",children:[s.jsx(t1,{className:"spin",size:24}),s.jsx("p",{children:"Loading review"})]})});const Fl=V.diff.scope,El=Kt.stats,Ss=l7(ue.meta.branch,be),Wl=a7(ue.meta.branch,be),ka=q7(Ve),En=G7(Ve),Il=V.id!==H||$m(V.status),Gi=T2(u.turns),Ua=Ve.mode==="range"?fe.error:null,Vi=Ve.mode==="range"&&fe.loading,Pl=n7(ue.feedback,ue.resolution),ea=He.filter(R=>Ut.has(R.path)).length,Yi=He.length===0?0:Math.round(ea/He.length*100),Xi=R=>{pe(F=>({reviewId:u.meta.id,searchQuery:R,selectedExtensionIds:F.reviewId===u.meta.id?F.selectedExtensionIds:null}))},hn=R=>{pe(F=>{const ce=F.reviewId===u.meta.id&&F.selectedExtensionIds?new Set(F.selectedExtensionIds):new Set(xn);return ce.has(R)?ce.delete(R):ce.add(R),{reviewId:u.meta.id,searchQuery:F.reviewId===u.meta.id?F.searchQuery:"",selectedExtensionIds:ce}})},pt=()=>{pe(R=>({reviewId:u.meta.id,searchQuery:R.reviewId===u.meta.id?R.searchQuery:"",selectedExtensionIds:null}))},wt=()=>{pe(R=>({reviewId:u.meta.id,searchQuery:R.reviewId===u.meta.id?R.searchQuery:"",selectedExtensionIds:new Set}))},Zn=R=>{re(F=>{const ce=new Set(F);return ce.has(R)?ce.delete(R):ce.add(R),Hd(ce),ce})},Ba=()=>{const R=new Set;Hd(R),re(R)},Qi=R=>{K(F=>{const ce=new Set(F);return ce.add(R),ce})},xs=R=>{x(R.filePath),k(!1),cn.some(Pe=>Pe.path===R.filePath)||pe({reviewId:u.meta.id,searchQuery:"",selectedExtensionIds:null}),zt.has(R.filePath)&&Qi(R.filePath);let F=0;const ce=()=>{if(!S7(R)){if(F<8){F+=1,window.requestAnimationFrame(ce);return}kd(R.filePath)}};window.requestAnimationFrame(ce)},Zi=R=>{x(R),k(!1),window.requestAnimationFrame(()=>{window.setTimeout(()=>kd(R),0)})},wl=R=>{R.preventDefault();const F=R.clientX,ce=q,Pe=sn=>{const _t=ce+sn.clientX-F;Q(Math.min(c7,Math.max(i7,_t)))},$t=()=>{window.removeEventListener("pointermove",Pe),window.removeEventListener("pointerup",$t)};window.addEventListener("pointermove",Pe),window.addEventListener("pointerup",$t,{once:!0})},qa=(R,F)=>{I(ce=>{const Pe=ce.storageKey===st?ce.files:Xo(st),$t=new Set(Pe);return F?$t.add(R):$t.delete(R),P8(st,$t),{storageKey:st,files:$t}})},Kn=async(R,F)=>{ve(null);try{await gd(a,R,V.id,{target:F})}catch(ce){const Pe=ce instanceof Error?ce.message:String(ce);throw ve(Pe),new Error(Pe)}},$n=async(R,F)=>{ve(null);try{await gd(a,R,V.id,{scope:"repo",target:F})}catch(ce){const Pe=ce instanceof Error?ce.message:String(ce);throw ve(Pe),new Error(Pe)}},Nl=async R=>{ve(null);try{return(await vd(a,R,V.id)).content}catch(F){const ce=F instanceof Error?F.message:String(F);throw ve(ce),new Error(ce)}},Jn=async R=>{ve(null);try{return(await vd(a,R,V.id,{scope:"repo"})).content}catch(F){const ce=F instanceof Error?F.message:String(F);throw ve(ce),new Error(ce)}},rt=async R=>{const F=B.current+1;B.current=F,te(R),G({status:"loading",symbol:R.symbol});try{const ce=await Q5({reviewId:a,turnId:V.id,source:En,...R});B.current===F&&G({status:"ready",response:ce})}catch(ce){B.current===F&&G({message:ce instanceof Error?ce.message:String(ce),status:"error",symbol:R.symbol})}},Ki=async(R,F,ce)=>{if(!ne)throw new Error("source peek selection is no longer available");return Z5({reviewId:a,turnId:V.id,source:En,side:ne.side,filePath:R,startLine:F,lineCount:ce})},Ga={activeFilePath:Et,extensionBuckets:$l,files:He,filteredFiles:cn,hiddenBoringFileCount:zt.size,hiddenBoringPresets:$,searchQuery:Ha,selectedExtensionIds:La,onClearExtensions:wt,onFileSelect:Zi,onSearchChange:Xi,onSelectAllExtensions:pt,onShowAllBoringFiles:Ba,onToggleBoringPreset:Zn,onToggleExtension:hn},wn=s.jsx(Cd,{...Ga,onCollapse:()=>T(!0)}),Fn=s.jsx(Cd,{...Ga}),js=Kt.files.length===0?null:s.jsxs("div",{className:"empty-diff filtered-empty",children:[s.jsx("h2",{children:"No matching files"}),s.jsx("p",{children:"Adjust the file search or extension filters to show changed files."})]});return s.jsx("main",{className:"review-shell",ref:Z,children:s.jsxs("div",{className:"review-split",children:[s.jsxs("div",{className:"review-main-pane",children:[s.jsxs("header",{className:"topbar",ref:Ce,children:[s.jsxs("div",{className:"topbar-header",children:[s.jsxs("div",{className:"topbar-title",children:[s.jsx("img",{className:"brand-mark",src:"/logo.svg",alt:""}),s.jsxs("div",{className:"review-heading",children:[s.jsx("p",{className:"product-name",children:"Gloss"}),s.jsxs("h1",{children:[Ss.icon==="branch"?s.jsx(os,{className:"review-title-icon",size:18}):null,s.jsx("span",{className:"review-title-text",children:be})]})]})]}),s.jsxs("div",{className:"topbar-actions",children:[s.jsx(H7,{commitDiffs:Ge,value:Ve,onChange:R=>{he(R),R.mode!=="range"&&le({type:"idle"}),jn(),lt(null)}}),s.jsxs("div",{className:"viewed-progress",title:"Viewed files",children:[s.jsx("span",{"aria-hidden":"true",className:"viewed-progress-ring",style:{"--viewed-progress":`${Yi}%`}}),ea," / ",He.length," viewed"]}),s.jsx("button",{"aria-label":"Open file tree",className:"icon-button file-tree-mobile-toggle",title:"Open file tree",type:"button",onClick:()=>k(!0),children:s.jsx(e1,{size:16})}),s.jsx("button",{"aria-label":y?"Unwrap lines":"Wrap lines","aria-pressed":y,className:"icon-button wrap-toggle",title:y?"Unwrap lines":"Wrap lines",type:"button",onClick:()=>E(R=>!R),children:y?s.jsx(Jh,{size:16}):s.jsx(Jd,{size:16})}),s.jsx(g7,{}),Wl?s.jsxs("div",{className:"branch-pill",title:Wl.title,children:[s.jsx(os,{size:16}),s.jsx("span",{children:Wl.label})]}):null]})]}),s.jsx(_7,{scope:Fl,selectedTurn:V,stats:El,turns:u.turns,onSelectTurn:R=>{R!==V.id&&Xn(),de(R===H?null:R)}}),X==="disconnected"?s.jsx("div",{className:"event-connection-banner",children:"Reconnecting to live review updates"}):null,s.jsx(z7,{state:bs})]}),ge?s.jsx("div",{className:"open-file-message error",children:ge}):null,Ua?s.jsx("div",{className:"open-file-message error",children:Ua}):null,Vi?s.jsx("div",{className:"range-loading",children:"Loading range diff"}):null,s.jsxs("div",{className:`review-body ${p?"file-tree-collapsed":""}`,style:{"--file-tree-width":`${q}px`},children:[s.jsx("aside",{className:`review-sidebar ${p?"collapsed":""}`,children:p?s.jsxs("button",{"aria-label":"Expand file tree",className:"file-tree-rail",title:"Expand file tree",type:"button",onClick:()=>T(!1),children:[s.jsx(Ph,{size:17}),s.jsx("span",{children:"Files"}),s.jsx("span",{children:cn.length})]}):s.jsxs(s.Fragment,{children:[wn,s.jsx("button",{"aria-label":"Resize file tree",className:"file-tree-resize-handle",title:"Resize file tree",type:"button",onPointerDown:wl})]})}),s.jsxs("section",{className:"review-diff-column",children:[Il&&!Gi?s.jsx(Q7,{record:ue}):null,Il&&Pl.length>0?s.jsx(X7,{items:Pl}):null,s.jsx(p8,{activeFilePath:Et,contextSource:En,diff:Kt,emptyState:js,files:cn,hiddenFiles:zt,record:ue,readOnly:Il,reviewId:a,selectedSourcePeek:ne,turnId:V.id,viewedFiles:Ut,wrapLines:y,openTargets:ze,onCopyFileContents:Nl,onOpenFile:Kn,onRevealHiddenFile:Qi,onSourcePeek:rt,onViewedChange:qa})]})]}),O?s.jsx("dialog",{className:"file-tree-drawer-backdrop","aria-label":"Files",open:!0,children:s.jsxs("aside",{className:"file-tree-drawer",children:[s.jsxs("div",{className:"file-tree-drawer-header",children:[s.jsx("span",{children:"Changed files"}),s.jsx("button",{"aria-label":"Close file tree",className:"icon-button",type:"button",onClick:()=>k(!1),children:s.jsx(Ui,{size:16})})]}),Fn]})}):null,Il?null:s.jsx(W8,{reviewId:a,reviewScope:ka,onLineCommentSelect:xs,onSubmitted:Qn})]}),me?Hi.createPortal(s.jsx(q8,{openTargets:ze,state:me,onCopyFileContents:Jn,onLoadRange:Ki,onOpenFile:$n,onClose:jn}),document.body):null]})})}function E7(a,u){return{...a,meta:{...a.meta,activeTurnId:u.id,status:u.status,submittedAt:u.submittedAt,resolvedAt:u.resolvedAt,feedbackPath:u.feedbackPath,markdownPath:u.markdownPath},diff:u.diff,...u.feedback?{feedback:u.feedback}:{feedback:void 0},...u.resolution?{resolution:u.resolution}:{resolution:void 0}}}function w7(a,u){const f=Ud(u),r=a.findIndex(y=>Ud(y)===f);return(r>=0?a.map((y,E)=>E===r?u:y):[...a,u]).toSorted(T7)}function N7(a,u){const r=a.filter(E=>E.type==="agent.claimed"||E.type==="agent.note").at(-1)??null,h=[...a].reverse().find(E=>E.type.startsWith("review.")&&E.type!=="review.opened")??null,y=n1(u);return{agentStatus:M7(r),latestAgentMessage:C7(r),latestAgentTimestamp:(r==null?void 0:r.createdAt)??null,latestReviewEvent:h,progress:y.total>0?`${y.resolved} of ${y.total} comments resolved`:null}}function z7({state:a}){return!a.agentStatus&&!a.latestReviewEvent&&!a.progress?null:s.jsxs("section",{className:"review-session-panel",children:[s.jsxs("div",{className:"review-session-item",children:[s.jsx("span",{className:"review-session-label",children:"Review"}),s.jsx("span",{className:"review-session-value",children:A7(a.latestReviewEvent)??"Open"})]}),a.progress?s.jsxs("div",{className:"review-session-item",children:[s.jsx("span",{className:"review-session-label",children:"Progress"}),s.jsx("span",{className:"review-session-value",children:a.progress})]}):null,a.agentStatus?s.jsxs("div",{className:"review-session-item agent",children:[s.jsx("span",{className:"review-session-label",children:"Agent"}),s.jsx("span",{className:"review-session-value",children:a.agentStatus}),a.latestAgentTimestamp?s.jsx("time",{dateTime:a.latestAgentTimestamp,children:m1(a.latestAgentTimestamp)}):null]}):null,a.latestAgentMessage?s.jsx("p",{className:"review-session-message",children:a.latestAgentMessage}):null]})}function Ud(a){return a.seq!==void 0?`seq:${a.seq}`:a.id?`id:${a.id}`:`${a.type}:${a.reviewId}:${a.createdAt??""}:${JSON.stringify(a)}`}function T7(a,u){const f=a.seq??0,r=u.seq??0;return f!==r?f-r:(a.createdAt??"").localeCompare(u.createdAt??"")}function M7(a){return a?a.type==="agent.claimed"?"Claimed":a.type==="agent.note"&&a.status?a.status.charAt(0).toUpperCase()+a.status.slice(1):"Updated":null}function C7(a){return a?a.type==="agent.claimed"?a.message??null:a.type==="agent.note"?a.message:null:null}function A7(a){return a?a.type==="review.turn.created"?`Turn ${a.turnIndex} opened`:a.type==="review.submitted"?`Submitted · ${a.counts.comments} comments`:a.type==="review.updated"?a.status==="resolved"?"Resolved":"Submitted":a.type==="review.cancelled"?"Cancelled":null:null}function _7({scope:a,selectedTurn:u,stats:f,turns:r,onSelectTurn:h}){return s.jsxs("div",{className:"review-context-bar",children:[s.jsxs("div",{className:"review-context-range",title:`${qd("Base",a.base.ref,a.base.sha)} to ${qd("Compare",a.comparison.ref,a.comparison.sha)}`,children:[s.jsx("span",{className:"review-context-ref",children:Bd(a.base.ref,a.base.sha)}),s.jsx(Yd,{className:"review-context-arrow",size:14}),s.jsx("span",{className:"review-context-ref",children:Bd(a.comparison.ref,a.comparison.sha)})]}),s.jsx("span",{className:"review-context-divider","aria-hidden":"true"}),s.jsxs("div",{className:"review-context-stats",title:"Changed files",children:[s.jsxs("span",{children:[f.files," ",f.files===1?"file":"files"]}),s.jsxs("span",{className:"summary-add",children:["+",f.additions]}),s.jsxs("span",{className:"summary-del",children:["-",f.deletions]})]}),s.jsx(R7,{selectedTurn:u,turns:r,onSelect:h})]})}function R7({selectedTurn:a,turns:u,onSelect:f}){var x;const[r,h]=j.useState(!1),y=j.useRef(null);if(j.useEffect(()=>{if(!r)return;const p=O=>{var k;(k=y.current)!=null&&k.contains(O.target)||h(!1)},T=O=>{O.key==="Escape"&&h(!1)};return window.addEventListener("pointerdown",p),window.addEventListener("keydown",T),()=>{window.removeEventListener("pointerdown",p),window.removeEventListener("keydown",T)}},[r]),!T2(u))return null;const E=(x=u[u.length-1])==null?void 0:x.id,C=[...u].reverse();return s.jsxs("div",{className:"turn-selector",ref:y,children:[s.jsxs("button",{"aria-expanded":r,"aria-haspopup":"menu",className:"turn-selector-trigger",type:"button",onClick:()=>h(p=>!p),children:[s.jsxs("span",{children:["Turn ",a.index," of ",u.length]}),s.jsx("span",{className:`turn-selector-status ${a.status}`,children:a.status}),s.jsx(Kl,{size:14})]}),r?s.jsx("div",{className:"turn-menu",role:"menu","aria-label":"Review turns",children:C.map(p=>{var se;const T=n1(p),O=p.id===a.id,k=p.id===E,q=(se=p.feedback)!=null&&se.reviewScope?Zm(p.feedback.reviewScope,p.diff.commitDiffs??[]):null,Q=D7(p);return s.jsxs("button",{"aria-checked":O,className:`turn-menu-item ${O?"selected":""}`,role:"menuitemradio",type:"button",onClick:()=>{f(p.id),h(!1)},children:[s.jsxs("span",{className:"turn-menu-title",children:["Turn ",p.index,k?s.jsx("span",{className:"turn-menu-latest",children:"Latest"}):null]}),s.jsxs("span",{className:`turn-menu-meta ${p.status}`,children:[p.status,T.total>0?` · ${T.open} open / ${T.total}`:" · no comments"]}),Q?s.jsx("time",{className:"turn-menu-time",dateTime:Q,children:m1(Q)}):null,q?s.jsxs("span",{className:"turn-menu-scope",children:["Scope: ",q]}):null]},p.id)})}):null]})}function Bd(a,u){return u?`${a} ${u.slice(0,7)}`:a}function qd(a,u,f){return`${a} ${u}${f?` (${f})`:""}`}function D7(a){var u;return a.status==="resolved"?a.resolvedAt??((u=a.resolution)==null?void 0:u.resolvedAt)??null:a.status==="submitted"?a.submittedAt??null:null}function O7(a,u){if(a.mode==="all")return a;if(a.mode==="single")return u.some(h=>h.commit.sha===a.sha)?a:{mode:"all"};const f=u.findIndex(h=>h.commit.sha===a.fromSha),r=u.findIndex(h=>h.commit.sha===a.toSha);return f>=0&&r>=f?a:{mode:"all"}}function L7(a,u){switch(u.type){case"idle":return C2;case"loading":return{diff:null,error:null,loading:!0};case"loaded":return{diff:u.diff,error:null,loading:!1};case"failed":return{diff:null,error:u.error,loading:!1}}}function H7({commitDiffs:a,value:u,onChange:f}){const[r,h]=j.useState(!1),[y,E]=j.useState("all"),[C,x]=j.useState(new Set),p=j.useRef(null),T=j.useRef(null),O=j.useMemo(()=>a.map($=>({sha:$.commit.sha,shortSha:$.commit.shortSha,subject:$.commit.subject,authorName:$.commit.authorName,committedAt:$.commit.committedAt,fileCount:$.files.length})),[a]);if(j.useEffect(()=>{if(!r)return;T.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $=["button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)","a[href]",'[tabindex]:not([tabindex="-1"])'].join(","),re=()=>{var K;return Array.from(((K=p.current)==null?void 0:K.querySelectorAll($))??[]).filter(je=>je.offsetParent!==null)};window.requestAnimationFrame(()=>{var K;(K=re()[0]??p.current)==null||K.focus()});const ye=K=>{var he;if(K.key==="Escape"&&h(!1),K.key!=="Tab")return;const je=re();if(je.length===0){K.preventDefault(),(he=p.current)==null||he.focus();return}const de=je[0],W=je[je.length-1];K.shiftKey&&document.activeElement===de?(K.preventDefault(),W.focus()):!K.shiftKey&&document.activeElement===W&&(K.preventDefault(),de.focus())};return window.addEventListener("keydown",ye),()=>{var K;window.removeEventListener("keydown",ye),(K=T.current)==null||K.focus(),T.current=null}},[r]),O.length===0)return null;const k=()=>{const $=k7(u,O);E(u.mode==="all"||$.size===0?"all":"selected"),x($),h(!0)},q=A2(C,O),Q=q.length>0?{from:O[q[0]],to:O[q[q.length-1]],count:q[q.length-1]-q[0]+1}:null,se=y==="all"?`${O.length} ${O.length===1?"commit":"commits"}`:Q?Q.from.sha===Q.to.sha?Q.from.shortSha:`${Q.count} commits · ${Q.from.shortSha} to ${Q.to.shortSha}`:"No commits selected",pe=y==="all"||q.length>0;return s.jsxs("div",{className:"commit-selector",children:[s.jsxs("button",{"aria-expanded":r,className:"commit-picker-trigger",type:"button",onClick:k,children:[s.jsx(kh,{size:16}),s.jsx("span",{className:"commit-picker-trigger-text",children:V7(u,O)}),s.jsx(Kl,{size:16})]}),r?Hi.createPortal(s.jsx("div",{className:"commit-picker-backdrop",children:s.jsxs("dialog",{"aria-labelledby":"commit-picker-title","aria-modal":"true",className:"commit-picker-dialog",ref:p,open:!0,tabIndex:-1,children:[s.jsxs("header",{className:"commit-picker-header",children:[s.jsx("h2",{id:"commit-picker-title",children:"Select commits to view"}),s.jsx("button",{"aria-label":"Close commit picker",className:"icon-button commit-picker-close",type:"button",onClick:()=>h(!1),children:s.jsx(Ui,{size:20})})]}),s.jsxs("div",{className:"commit-picker-body",children:[s.jsxs("label",{className:`commit-picker-all ${y==="all"?"selected":""}`,children:[s.jsx("input",{checked:y==="all",className:"commit-picker-checkbox",type:"checkbox",onChange:()=>{E("all"),x(new Set)}}),s.jsxs("span",{className:"commit-picker-all-copy",children:[s.jsx("span",{children:"All commits"}),s.jsxs("span",{children:[O.length," ",O.length===1?"commit":"commits"]})]})]}),s.jsx("div",{className:"commit-picker-section-label",children:"Select a range of commits"}),s.jsx("div",{className:"commit-picker-list",children:O.map($=>{const re=y==="selected"&&C.has($.sha);return s.jsxs("label",{className:`commit-picker-row ${re?"selected":""}`,children:[s.jsx("input",{checked:re,className:"commit-picker-checkbox",type:"checkbox",onChange:()=>{E("selected"),x(ye=>U7(ye,$.sha,O))}}),s.jsxs("span",{className:"commit-picker-row-copy",children:[s.jsx("span",{className:"commit-picker-subject",children:$.subject}),s.jsxs("span",{className:"commit-picker-meta",children:[$.authorName," committed ",Y7($.committedAt)," ","· ",$.fileCount," ",$.fileCount===1?"file":"files"]})]}),s.jsx("span",{className:"commit-picker-sha",children:$.shortSha})]},$.sha)})})]}),s.jsxs("footer",{className:"commit-picker-footer",children:[s.jsx("span",{className:"commit-picker-summary",children:se}),s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>h(!1),children:"Cancel"}),s.jsxs("button",{className:"primary-button",disabled:!pe,type:"button",onClick:()=>{if(y==="all"){f({mode:"all"}),h(!1);return}const $=B7(q,O);$&&(f($),h(!1))},children:[s.jsx(vn,{size:16}),"Save"]})]})]})}),document.body):null]})}function k7(a,u){if(a.mode==="all")return new Set;if(a.mode==="single")return u.some(h=>h.sha===a.sha)?new Set([a.sha]):new Set;const f=u.findIndex(h=>h.sha===a.fromSha),r=u.findIndex(h=>h.sha===a.toSha);return f<0||r<f?new Set:Oa(f,r,u)}function A2(a,u){const f=[];for(const[r,h]of u.entries())a.has(h.sha)&&f.push(r);return f}function U7(a,u,f){const r=f.findIndex(p=>p.sha===u);if(r<0)return a;const h=A2(a,f);if(!a.has(u)){const p=h.length>0?Math.min(h[0],r):r,T=h.length>0?Math.max(h[h.length-1],r):r;return Oa(p,T,f)}if(h.length<=1)return new Set;const y=h[0],E=h[h.length-1];if(r<=y)return Oa(y+1,E,f);if(r>=E)return Oa(y,E-1,f);const C=r-y,x=E-r;return C>=x?Oa(y,r-1,f):Oa(r+1,E,f)}function Oa(a,u,f){return a<0||u<a?new Set:new Set(f.slice(a,u+1).map(r=>r.sha))}function B7(a,u){if(a.length===0)return null;const f=a[0],r=a[a.length-1];return f===r?{mode:"single",sha:u[f].sha}:{mode:"range",fromSha:u[f].sha,toSha:u[r].sha}}function q7(a){return a.mode==="all"?{mode:"all"}:a.mode==="single"?{mode:"single",sha:a.sha}:{mode:"range",fromSha:a.fromSha,toSha:a.toSha}}function G7(a){return a.mode==="all"?{mode:"turn"}:a.mode==="single"?{mode:"commit",sha:a.sha}:{mode:"range",fromSha:a.fromSha,toSha:a.toSha}}function V7(a,u){if(a.mode==="all")return"All commits";if(a.mode==="single"){const y=u.find(E=>E.sha===a.sha);return y?`${y.shortSha} ${y.subject}`:"One commit"}const f=u.findIndex(y=>y.sha===a.fromSha),r=u.findIndex(y=>y.sha===a.toSha);return f<0||r<f?"Commit range":`${r-f+1} commits · ${u[f].shortSha} to ${u[r].shortSha}`}function Y7(a){const u=new Date(a);if(Number.isNaN(u.getTime()))return"recently";const f=Math.round((u.getTime()-Date.now())/1e3),[r,h]=Zo.find(([,y])=>Math.abs(f)>=y)??Zo[Zo.length-1];return h7.format(Math.round(f/h),r)}function X7({items:a}){return s.jsxs("section",{className:"submitted-general-feedback","aria-labelledby":"submitted-general-title",children:[s.jsxs("header",{className:"submitted-general-feedback-header",children:[s.jsxs("div",{className:"submitted-general-feedback-title",children:[s.jsx(Ql,{size:16}),s.jsx("h2",{id:"submitted-general-title",children:"General feedback"})]}),s.jsx("span",{className:"submitted-general-feedback-count",children:a.length})]}),s.jsx("div",{className:"submitted-general-feedback-list",children:a.map(u=>s.jsxs("article",{className:`submitted-general-feedback-card ${u.status}`,children:[s.jsx("div",{className:"submitted-general-feedback-icon",children:u.status==="resolved"?s.jsx(Po,{size:15}):s.jsx(Ql,{size:15})}),s.jsxs("div",{className:"submitted-general-feedback-content",children:[s.jsx("div",{className:"submitted-general-feedback-meta",children:u.status==="resolved"?"Resolved":"Open · Needs fix"}),s.jsx("p",{className:"submitted-general-feedback-body",children:u.comment.body}),u.summary?s.jsx("p",{className:"submitted-general-feedback-summary",children:u.summary}):null]})]},u.comment.id))})]})}function Q7({record:a}){var r;const u=Z7(a);if(!u)return null;const f=a.meta.status==="resolved"?a.meta.resolvedAt??((r=a.resolution)==null?void 0:r.resolvedAt):a.meta.submittedAt;return s.jsxs("section",{className:`review-state-banner ${a.meta.status}`,children:[s.jsxs("div",{className:"review-state-title",children:[s.jsx(Po,{size:16}),s.jsx("span",{children:u.title})]}),s.jsx("p",{children:u.body}),f?s.jsx("time",{dateTime:f,children:m1(f)}):null]})}function Z7(a){const u=a.meta.status,f=n1(a),r=f.total>0?`${f.resolved} of ${f.total} comments resolved`:null;return u==="submitted"?{title:f.resolved>0&&r?`Submitted · ${r}`:"Submitted",body:f.resolved>0?"Feedback is being handled.":"Feedback has been submitted."}:u==="resolved"?{title:r?`Resolved · ${r}`:"Resolved",body:"This feedback turn is resolved."}:null}function m1(a){return m7.format(new Date(a))}const K7="npx skills add iamrajjoshi/gloss --skill gloss -g -a claude-code",$7=`1. Run gloss open --json from the repo root unless the user names a base ref.
315
+ `);return u.at(-1)===""&&u.pop(),u.length>0?u:[""]}const B8=16,ms=360,Wo=280,_d=360,w2={above:!1,below:!1};function Rd(){return{...w2}}function q8({openTargets:a,onCopyFileContents:u,onLoadRange:f,onOpenFile:r,state:h,onClose:y}){const{resolvedTheme:E}=u1(),C=j.useRef(null),x=j.useRef(null),p=j.useRef(null),T=j.useRef(null),O=j.useRef(null),k=j.useRef(null),q=h.status==="ready"?h.response:null,Q=h.status==="error"?Q8(h.message,h.symbol):null,se=j.useRef(w2),pe=j.useRef({above:0,below:0}),$=j.useRef(q),[re,ye]=j.useState(null),[K,je]=j.useState(()=>q?Ad(q):null),de=j.useRef(q),[W,he]=j.useState(Rd),[fe,le]=j.useState(null),[me,G]=j.useState(!1),[ne,te]=j.useState(null);if(q!==de.current){const B=Rd();de.current=q,$.current=q,pe.current={above:pe.current.above+1,below:pe.current.below+1},se.current=B,je(q?Ad(q):null),le(null),he(B),te(null)}const ze=j.useMemo(()=>K?hs(K.content):[],[K]),b=K&&q&&(re==null?void 0:re.content)===K.content&&re.language===q.language&&re.theme===E?re.lines:null,U=K?X8(K,W,fe):null,I=j.useCallback(B=>{O.current=B,T.current===null&&(T.current=window.requestAnimationFrame(()=>{T.current=null;const Y=O.current,Z=C.current;!Y||!Z||(Z.style.top=`${Math.round(Y.top)}px`,Z.style.left=`${Math.round(Y.left)}px`,Z.style.right="auto",Z.style.bottom="auto",Z.style.width=`${Math.round(Y.width)}px`,Z.style.height=`${Math.round(Y.height)}px`,Z.style.transform="")}))},[]),ge=j.useCallback(()=>{var B;(B=k.current)==null||B.call(k),k.current=null,document.body.classList.remove("source-peek-interacting"),document.body.style.cursor="",document.body.style.userSelect=""},[]),ve=j.useCallback((B,Y)=>{const Z={...se.current,[B]:Y};se.current=Z,he(Z)},[]);j.useEffect(()=>{const B=Y=>{Y.key==="Escape"&&y()};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[y]),j.useEffect(()=>{if(!ne)return;const B=window.setTimeout(()=>te(null),2200);return()=>window.clearTimeout(B)},[ne]),j.useEffect(()=>{const B=C.current;if(!B)return;const Y=Z=>{if(Z.defaultPrevented)return;const Ce=Z.target;if(!(Ce instanceof Node)||!B.contains(Ce))return;Z.preventDefault(),Z.stopPropagation();const Ne=x.current;if(!Ne)return;const ct=Z8(Z,Ne);Ne.scrollTop+=ct.y,Ne.scrollLeft+=ct.x};return B.addEventListener("wheel",Y,{passive:!1}),()=>B.removeEventListener("wheel",Y)},[]),j.useEffect(()=>{if(!q||!K)return;let B=!1;return u2(async()=>{const{highlightSourceContent:Y}=await import("./syntax-GzwS-wD7.js");return{highlightSourceContent:Y}},[]).then(({highlightSourceContent:Y})=>Y(K.content,q.language,E)).then(Y=>{B||ye({lines:Y,content:K.content,language:q.language,theme:E})}).catch(()=>{B||ye({lines:null,content:K.content,language:q.language,theme:E})}),()=>{B=!0}},[K,q,E]),j.useEffect(()=>{q&&window.requestAnimationFrame(()=>{var B;(B=p.current)==null||B.scrollIntoView({block:"center"})})},[q]),j.useEffect(()=>{const B=()=>{const Y=C.current;Y&&I(Yl(Yo(Y)))};return window.requestAnimationFrame(()=>I(G8())),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}},[I]),j.useEffect(()=>()=>{ge(),T.current!==null&&window.cancelAnimationFrame(T.current)},[ge]);const g=B=>{if(B.button!==0||B.target.closest("button"))return;B.preventDefault(),ge();const Y=C.current;if(!Y)return;const Z=Yl(Yo(Y)),Ce=B.clientX,Ne=B.clientY;O.current=Z,document.body.classList.add("source-peek-interacting"),document.body.style.cursor="grabbing",document.body.style.userSelect="none",Y.classList.add("dragging");const ct=H=>{const V=Yl({...Z,left:Z.left+H.clientX-Ce,top:Z.top+H.clientY-Ne});Y.style.transform=`translate3d(${Math.round(V.left-Z.left)}px, ${Math.round(V.top-Z.top)}px, 0)`,O.current=V},lt=()=>{const H=O.current??Z;Y.classList.remove("dragging"),I(H),ge()},Je=()=>{window.removeEventListener("pointermove",ct),window.removeEventListener("pointerup",lt),Y.classList.remove("dragging")};k.current=Je,window.addEventListener("pointermove",ct),window.addEventListener("pointerup",lt,{once:!0})},_=B=>Y=>{if(Y.button!==0)return;Y.preventDefault(),Y.stopPropagation(),ge();const Z=C.current;if(!Z)return;const Ce=Yl(Yo(Z)),Ne=Y.clientX,ct=Y.clientY,lt=Y8(B);O.current=Ce,document.body.classList.add("source-peek-interacting"),document.body.style.cursor=lt,document.body.style.userSelect="none";const Je=ue=>{const be=ue.clientX-Ne,Ge=ue.clientY-ct;I(V8(Ce,B,be,Ge))},H=()=>ge(),V=()=>{window.removeEventListener("pointermove",Je),window.removeEventListener("pointerup",H)};k.current=V,window.addEventListener("pointermove",Je),window.addEventListener("pointerup",H,{once:!0})},X=j.useCallback(async B=>{var ct;if(!q||!K||se.current[B])return;const Y=k8(K,B);if(!Y)return;const Z=pe.current[B]+1;pe.current={...pe.current,[B]:Z};const Ce=()=>$.current===q&&pe.current[B]===Z,Ne=B==="above"?((ct=x.current)==null?void 0:ct.scrollHeight)??null:null;if(Ce()){ve(B,!0),le(null);try{const lt=await f(q.filePath,Y.startLine,Y.lineCount);Ce()&&(je(Je=>(Je==null?void 0:Je.response)===q?U8(Je,lt):Je),B==="above"&&Ne!==null&&window.requestAnimationFrame(()=>{const Je=x.current;Je&&(Je.scrollTop+=Je.scrollHeight-Ne)}))}catch(lt){Ce()&&le(lt instanceof Error?lt.message:String(lt))}finally{Ce()&&ve(B,!1)}}},[K,f,q,ve]),J=j.useCallback(B=>{const Y=B.currentTarget,Z=Y.scrollHeight-Y.scrollTop-Y.clientHeight;Y.scrollTop<=_d&&X("above"),Z<=_d&&X("below")},[X]);return s.jsxs("aside",{"aria-label":"Source peek",className:"source-peek-panel",ref:C,children:[s.jsx("button",{"aria-label":"Resize source peek horizontally",className:"source-peek-resize-handle left",type:"button",onPointerDown:_({left:!0})}),s.jsx("button",{"aria-label":"Resize source peek vertically",className:"source-peek-resize-handle bottom",type:"button",onPointerDown:_({bottom:!0})}),s.jsx("button",{"aria-label":"Resize source peek",className:"source-peek-resize-handle bottom-left",type:"button",onPointerDown:_({bottom:!0,left:!0})}),s.jsx("button",{"aria-label":"Resize source peek",className:"source-peek-resize-handle bottom-right",type:"button",onPointerDown:_({bottom:!0,right:!0})}),s.jsxs("header",{className:"source-peek-header",onPointerDown:g,children:[s.jsxs("div",{className:"source-peek-title",children:[s.jsx(Ah,{size:17}),s.jsx("span",{children:"Source peek"})]}),s.jsx(Bh,{className:"source-peek-drag-indicator",size:16,"aria-hidden":"true"}),s.jsxs("div",{className:"source-peek-toolbar",children:[q?s.jsx(v2,{filePath:q.filePath,openTargets:a,wordWrap:me,onActionMessage:te,onCopyFileContents:()=>u(q.filePath),onOpenFile:B=>r(q.filePath,B),onWordWrapChange:G}):null,s.jsx("button",{"aria-label":"Close source peek",className:"icon-button source-peek-close",type:"button",onClick:y,children:s.jsx(Ui,{size:17})})]})]}),h.status==="loading"?s.jsxs("div",{className:"source-peek-status",children:[s.jsx(t1,{className:"spin",size:18}),s.jsxs("span",{children:["Resolving ",h.symbol]})]}):null,h.status==="error"?s.jsx("div",{className:"source-peek-status error",children:s.jsxs("div",{className:"source-peek-error-card",children:[s.jsx(ph,{size:18}),s.jsxs("div",{className:"source-peek-error-copy",children:[s.jsx("strong",{children:Q==null?void 0:Q.title}),s.jsx("p",{children:Q==null?void 0:Q.message}),Q!=null&&Q.hint?s.jsx("span",{children:Q.hint}):null]})]})}):null,q?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"source-peek-meta",children:[s.jsx("span",{className:"source-peek-symbol",children:q.targetSymbol}),s.jsxs("span",{className:"source-peek-path",title:`${q.filePath}:${q.line}`,children:[q.filePath,":",q.line]}),ne?s.jsx("span",{className:"source-peek-action-message",children:ne}):null]}),U?s.jsx("div",{className:"source-peek-truncated",children:U}):null,s.jsx("section",{className:`source-peek-code ${me?"wrap-lines":""}`,"aria-label":q.filePath,ref:x,onScroll:J,children:ze.map((B,Y)=>{const Z=((K==null?void 0:K.startLine)??q.startLine)+Y,Ce=Z===q.line;return s.jsxs("div",{className:`source-peek-row ${Ce?"target":""}`,ref:Ce?p:null,children:[s.jsx("span",{className:"source-peek-line-number",children:Z}),s.jsx("code",{children:J8(B||" ",(b==null?void 0:b[Y])??null)})]},Z)})})]}):null]})}function Yo(a){const u=a.getBoundingClientRect();return{height:u.height,left:u.left,top:u.top,width:u.width}}function Yl(a){const u=h1();if(window.innerWidth<=980)return{height:window.innerHeight-u*2,left:u,top:u,width:window.innerWidth-u*2};const f=Math.max(ms,window.innerWidth-u*2),r=Math.max(Wo,window.innerHeight-u*2),h=Xl(a.width,ms,f),y=Xl(a.height,Wo,r);return{height:y,left:Xl(a.left,u,window.innerWidth-h-u),top:Xl(a.top,u,window.innerHeight-y-u),width:h}}function G8(){const a=h1();if(window.innerWidth<=980)return Yl({height:window.innerHeight-a*2,left:a,top:a,width:window.innerWidth-a*2});const u=Math.max(a,Math.round(window.innerWidth/3)),f=window.innerWidth-u-a,r=window.innerHeight-a*2;return Yl({height:r,left:u,top:a,width:f})}function V8(a,u,f,r){const h=h1();let y=a.left,E=a.width,C=a.height;if(u.left){const x=a.left+a.width,p=h,T=x-ms;y=Xl(a.left+f,p,T),E=x-y}return u.right&&(E=Xl(a.width+f,ms,window.innerWidth-a.left-h)),u.bottom&&(C=Xl(a.height+r,Wo,window.innerHeight-a.top-h)),Yl({height:C,left:y,top:a.top,width:E})}function Y8(a){return a.bottom&&a.left?"nesw-resize":a.bottom&&a.right?"nwse-resize":a.bottom?"row-resize":"col-resize"}function X8(a,u,f){return f?`Could not load more source: ${d1(f)}`:u.above&&u.below?"Loading more source lines above and below.":u.above?"Loading more source lines above.":u.below?"Loading more source lines below.":a.hasMoreAbove||a.hasMoreBelow?"Large source file - more lines load as you scroll.":a.truncated?"Source preview was shortened for a very long line.":null}function Q8(a,u){const f=d1(a);return/no definition found/i.test(f)?{hint:"This can happen for Node built-ins, package exports, or symbols outside the repo.",message:`Gloss could not find a project definition for ${u}.`,title:"No definition found"}:{hint:null,message:f,title:"Source peek unavailable"}}function d1(a){const u=a.replace(/^\d+:\s*/,"").trim();try{const f=JSON.parse(u);if(typeof f=="object"&&f!==null&&!Array.isArray(f)&&typeof f.error=="string")return d1(f.error)}catch{}return u.replace(/^source peek unavailable:\s*/i,"").trim()}function h1(){return window.innerWidth<=720?8:B8}function Xl(a,u,f){return Math.min(f,Math.max(u,a))}function Z8(a,u){const f=K8(a,u);return{x:a.deltaX*f,y:a.deltaY*f}}function K8(a,u){return a.deltaMode===WheelEvent.DOM_DELTA_LINE?$8(u):a.deltaMode===WheelEvent.DOM_DELTA_PAGE?u.clientHeight||window.innerHeight:1}function $8(a){const u=Number.parseFloat(window.getComputedStyle(a).lineHeight);return Number.isFinite(u)?u:24}function J8(a,u){return!u||u.length===0?a:u.map(f=>s.jsx("span",{style:F8(f),children:f.content},`${f.offset}:${f.content}`))}function F8(a){const u={};a.color&&(u.color=a.color),a.fontStyle&&(a.fontStyle&1)!==0&&(u.fontStyle="italic"),a.fontStyle&&(a.fontStyle&2)!==0&&(u.fontWeight=700);const f=[];return a.fontStyle&&(a.fontStyle&4)!==0&&f.push("underline"),a.fontStyle&&(a.fontStyle&8)!==0&&f.push("line-through"),f.length>0&&(u.textDecorationLine=f.join(" ")),u}function Dd(a){return a instanceof Error?a.message:String(a)}function W8({reviewId:a,reviewScope:u,onLineCommentSelect:f,onSubmitted:r}){const h=jt(b=>b.comments),y=jt(b=>b.addGeneralComment),E=jt(b=>b.removeComment),C=jt(b=>b.updateComment),[x,p]=j.useState(""),[T,O]=j.useState(null),[k,q]=j.useState(null),[Q,se]=j.useState("idle"),[pe,$]=j.useState(null),re=j.useRef(null),ye=j.useRef(null),K=j.useRef(!1),je=Q!=="submitting"&&Q!=="done",de=x.trim(),W=h.filter(Oi),he=h.filter(b=>!Oi(b)),fe=T===null?null:he.find(b=>b.id===T)??null,le=k!==null,me=W.length>0,G=j.useCallback(()=>{O(null),q(null)},[]),ne=()=>{de&&(y(de),p(""))},te=()=>{!fe||!(k!=null&&k.trim())||(C(fe.id,k),q(null))},ze=j.useCallback(async()=>{if(!(!je||K.current)){K.current=!0,se("submitting"),$(null);try{await G5(a,h,u),se("done"),$("Submitted");try{await(r==null?void 0:r())}catch(b){$(`Submitted, but refresh failed: ${Dd(b)}`)}}catch(b){K.current=!1,se("error"),$(Dd(b))}}},[je,h,r,a,u]);return j.useEffect(()=>{const b=U=>{J5(U)&&(U.preventDefault(),ze())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[ze]),j.useEffect(()=>{T!==null&&fe===null&&O(null)},[fe,T]),j.useEffect(()=>{var U,I;if(fe===null)return;const b=ge=>{ge.key==="Escape"&&(ge.preventDefault(),le?q(null):G())};return le?(U=ye.current)==null||U.focus():(I=re.current)==null||I.focus(),window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[G,le,fe]),s.jsxs(s.Fragment,{children:[s.jsxs("aside",{className:"submit-bar",children:[s.jsxs("div",{className:"feedback-panel",children:[me?s.jsxs("div",{className:"inline-feedback-row",children:[s.jsxs("span",{className:"feedback-row-label inline-feedback-label",children:[s.jsx(Ql,{size:14}),"Inline feedback",s.jsx("span",{className:"feedback-row-count",children:W.length})]}),s.jsx("div",{className:"comment-list",children:W.map(b=>{const U=Od(b);return s.jsxs("div",{className:`comment-chip ${U.tone}`,title:U.title,children:[s.jsxs("button",{className:"comment-chip-target",type:"button",title:`Jump to ${U.title}`,onClick:()=>f==null?void 0:f(b),children:[s.jsx("span",{className:"comment-chip-kind",children:U.kind}),s.jsx("span",{className:"comment-chip-text",children:U.text})]}),s.jsx("button",{className:"icon-button",type:"button",title:"Remove comment",onClick:()=>E(b.id),children:s.jsx(ss,{size:14})})]},b.id)})})]}):null,he.length>0?s.jsxs("div",{className:"general-feedback-summary-row",children:[s.jsxs("span",{className:"feedback-row-label general-feedback-label",children:[s.jsx(Ql,{size:14}),"General feedback",s.jsx("span",{className:"feedback-row-count general-feedback-count",children:he.length})]}),s.jsx("div",{className:"general-feedback-list",children:he.map(b=>{const U=Od(b);return s.jsxs("div",{className:`comment-chip ${U.tone}`,title:U.title,children:[s.jsxs("button",{className:"comment-chip-target",type:"button",title:"View general feedback",onClick:()=>O(b.id),children:[s.jsx("span",{className:"comment-chip-kind",children:U.kind}),s.jsx("span",{className:"comment-chip-text",children:U.text})]}),s.jsx("button",{className:"icon-button",type:"button",title:"Remove comment",onClick:()=>E(b.id),children:s.jsx(ss,{size:14})})]},b.id)})})]}):null,s.jsx("div",{className:"general-feedback-row",children:s.jsx("form",{className:"general-comment-form",onSubmit:b=>{b.preventDefault(),ne()},children:s.jsxs("div",{className:"general-comment-compose",children:[s.jsx(Ql,{className:"general-comment-compose-icon",size:15}),s.jsx("textarea",{"aria-label":"General feedback",placeholder:"General feedback",rows:1,value:x,onChange:b=>p(b.target.value),onKeyDown:b=>{rs(b)&&(b.preventDefault(),ne())}}),s.jsxs("button",{"aria-keyshortcuts":"Meta+Enter",className:"general-comment-add",type:"submit",disabled:!de,title:"Add general feedback (Command+Enter)",children:[s.jsx($d,{size:14}),s.jsx("span",{children:"Add"})]})]})})})]}),s.jsxs("div",{className:"submit-actions",children:[pe?s.jsx("span",{className:`submit-message ${Q}`,children:pe}):null,s.jsxs("button",{"aria-keyshortcuts":"Meta+Shift+Enter",className:"primary-button",type:"button",disabled:!je,title:"Submit review (Command+Shift+Enter)",onClick:ze,children:[Q==="done"?s.jsx(vn,{size:16}):s.jsx(sm,{size:16}),"Submit ",h.length]})]})]}),fe?Hi.createPortal(s.jsx("div",{className:"general-feedback-dialog-backdrop",children:s.jsxs("dialog",{"aria-labelledby":"general-feedback-dialog-title","aria-modal":"true",className:"general-feedback-dialog",ref:re,open:!0,tabIndex:-1,children:[s.jsxs("header",{className:"general-feedback-dialog-header",children:[s.jsx("h2",{id:"general-feedback-dialog-title",children:k===null?"General feedback":"Edit general feedback"}),s.jsx("button",{"aria-label":"Close general feedback",className:"icon-button general-feedback-dialog-close",type:"button",onClick:G,children:s.jsx(Ui,{size:18})})]}),s.jsx("div",{className:"general-feedback-dialog-body",children:k===null?s.jsx("p",{className:"general-feedback-dialog-text",children:fe.body}):s.jsx("textarea",{"aria-label":"Edit general feedback",className:"general-feedback-dialog-editor",ref:ye,value:k,onChange:b=>q(b.target.value),onKeyDown:b=>{rs(b)&&(b.preventDefault(),te())}})}),s.jsx("footer",{className:"general-feedback-dialog-footer",children:k===null?s.jsxs(s.Fragment,{children:[s.jsxs("button",{className:"secondary-button",type:"button",onClick:()=>{E(fe.id),G()},children:[s.jsx(ss,{size:14}),"Delete"]}),s.jsxs("button",{className:"secondary-button",type:"button",onClick:()=>q(fe.body),children:[s.jsx(Kd,{size:14}),"Edit"]}),s.jsx("button",{className:"primary-button",type:"button",onClick:G,children:"Close"})]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>q(null),children:"Cancel"}),s.jsxs("button",{className:"primary-button",type:"button",disabled:k.trim().length===0,onClick:te,children:[s.jsx(vn,{size:14}),"Save"]})]})})]})}),document.body):null]})}function Od(a){if(!Oi(a))return{kind:"General",text:a.body,title:a.body,tone:"general"};const u=`${a.filePath}:${Li(a,{repeatSideOnEnd:!1})}`;return{kind:"Line",text:u,title:u,tone:"line"}}const I8="gloss:viewed-files:";function N2(a){return`${I8}${a}`}function Xo(a,u=z2()){if(!u)return new Set;const f=u.getItem(N2(a));if(!f)return new Set;try{const r=JSON.parse(f);return new Set(Array.isArray(r)?r.filter(h=>typeof h=="string"):[])}catch{return new Set}}function P8(a,u,f=z2()){if(!f)return;const r=N2(a);if(u.size===0){f.removeItem(r);return}f.setItem(r,JSON.stringify(Array.from(u).toSorted()))}function z2(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function e7(a){return a.type==="review.turn.created"||a.type==="review.submitted"||a.type==="review.updated"}function t7(a,u,f){return a.reviewId!==u||!a.selectedExtensionIds?new Set(f):new Set(f.filter(r=>{var h;return(h=a.selectedExtensionIds)==null?void 0:h.has(r)}))}function n7(a,u){const f=new Map(((u==null?void 0:u.comments)??[]).map(r=>[r.commentId,r]));return((a==null?void 0:a.comments)??[]).filter(r=>!Oi(r)).map(r=>{const h=f.get(r.id)??null;return{comment:r,resolvedComment:h,status:h?"resolved":"open",summary:(h==null?void 0:h.summary)??null}})}function l7(a,u){return{icon:(a==null?void 0:a.trim())===u.trim()?"branch":null}}function a7(a,u){const f=(a==null?void 0:a.trim())??"",r=f||"detached";return r===u.trim()?null:{label:r,title:f||"Detached HEAD"}}function T2(a){return a.length>1}const i7=300,c7=560,s7=360,u7={files:[],stats:{files:0,additions:0,deletions:0}},o7=[],r7=[],f7={agentStatus:null,latestAgentMessage:null,latestAgentTimestamp:null,latestReviewEvent:null,progress:null},Qo=[{label:"Default app",target:"default"},{label:"Open in folder",target:"folder"}],Ld=["lockfiles"],M2="gloss:hidden-boring-file-presets:v2",d7=new Map(Fd.map(a=>[a.id,a.label])),C2={diff:null,error:null,loading:!1},h7=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),m7=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}),Zo=[["year",3600*24*365],["month",3600*24*30],["week",3600*24*7],["day",3600*24],["hour",3600],["minute",60],["second",1]],p7=[{icon:Qh,label:"Match system theme",value:"system"},{icon:hm,label:"Use light theme",value:"light"},{icon:Kh,label:"Use dark theme",value:"dark"}];function y7({reviewId:a}){return s.jsx(j7,{reviewId:a},a)}function g7(){const{preference:a,setPreference:u}=u1();return s.jsxs("fieldset",{className:"theme-toggle",children:[s.jsx("legend",{className:"sr-only",children:"Theme"}),p7.map(f=>{const r=f.icon;return s.jsx("button",{"aria-label":f.label,"aria-pressed":a===f.value,className:"theme-toggle-option",title:f.label,type:"button",onClick:()=>u(f.value),children:s.jsx(r,{size:15})},f.value)})]})}function v7(){try{const a=window.localStorage.getItem(M2);return a===null?new Set(Ld):Lm(JSON.parse(a))}catch{return new Set(Ld)}}function Hd(a){try{window.localStorage.setItem(M2,JSON.stringify(Array.from(a)))}catch{}}function b7(a,u){const f=Wd(a);return{presetLabels:Array.from(u).filter(h=>f.has(h)).map(h=>d7.get(h)??h)}}function kd(a){const u=document.getElementById(f1(a));u&&u.scrollIntoView({behavior:"smooth",block:"start"})}function S7(a){const u=document.getElementById(f1(a.filePath));if(!u)return!1;const f=Math.max(a.startLine,a.endLine),r=Array.from(u.querySelectorAll(".inline-comment")).find(x=>x.dataset.commentId===a.id),h=Array.from(u.querySelectorAll(".diff-row")).find(x=>x.dataset.side===a.side&&Number(x.dataset.line)===f),y=r??h;if(!y)return!1;const E=y.getBoundingClientRect(),C=E.top+window.scrollY-window.innerHeight/2+E.height/2;return window.scrollTo({behavior:"auto",top:Math.max(C,0)}),x7(y),!0}function x7(a){a.classList.remove("jump-target"),a.getBoundingClientRect(),a.classList.add("jump-target"),window.setTimeout(()=>a.classList.remove("jump-target"),1400)}function j7({reviewId:a}){const[u,f]=j.useState(null),[r,h]=j.useState(null),[y,E]=j.useState(!1),[C,x]=j.useState(null),[p,T]=j.useState(!0),[O,k]=j.useState(!1),[q,Q]=j.useState(s7),[se,pe]=j.useState({reviewId:null,searchQuery:"",selectedExtensionIds:null}),[$,re]=j.useState(()=>v7()),[ye,K]=j.useState(new Set),[je,de]=j.useState(null),[W,he]=j.useState({mode:"all"}),[fe,le]=j.useReducer(L7,C2),[me,G]=j.useState(null),[ne,te]=j.useState(null),[ze,b]=j.useState(Qo),[U,I]=j.useState(()=>({storageKey:a,files:Xo(a)})),[ge,ve]=j.useState(null),[g,_]=j.useState([]),[X,J]=j.useState("connecting"),B=j.useRef(0),Y=j.useRef(0),Z=j.useRef(null),Ce=j.useRef(null),Ne=jt(R=>R.reset),ct=jt(R=>R.hydrateReview),lt=jt(R=>R.setDraft),Je=(u==null?void 0:u.turns[u.turns.length-1])??null,H=(Je==null?void 0:Je.id)??null,V=u&&Je?u.turns.find(R=>R.id===je)??Je:null,ue=u&&V?E7(u,V):null,be=ue?md(ue):null,Ge=(V==null?void 0:V.diff.commitDiffs)??r7,Ve=j.useMemo(()=>O7(W,Ge),[Ge,W]),Mt=V&&Ve.mode==="single"?Ge.find(R=>R.commit.sha===Ve.sha)??null:null,Ct=V&&Ve.mode==="range"?fe.diff??u7:null,At=V?Ct??Mt??V.diff:null,Kt=j.useMemo(()=>At?{...At,files:Xm(At.files)}:null,[At]),He=(Kt==null?void 0:Kt.files)??o7,Yn=j.useMemo(()=>Om(He,$),[$,He]).hidden,zt=j.useMemo(()=>new Map(Yn.filter(R=>!ye.has(R.path)).map(R=>[R.path,b7(R,$)])),[Yn,$,ye]),$l=j.useMemo(()=>_8(He),[He]),xn=j.useMemo(()=>$l.map(R=>R.id),[$l]),jl=(u==null?void 0:u.meta.id)??null,Bi=!!(jl&&se.reviewId===jl),La=j.useMemo(()=>jl?t7(se,jl,xn):new Set(xn),[xn,se,jl]),Ha=Bi?se.searchQuery:"",cn=j.useMemo(()=>R8(He,Ha,La),[He,Ha,La]),st=V?`${a}:${V.id}`:a;let Ut=U.files;U.storageKey!==st&&(Ut=Xo(st),I({storageKey:st,files:Ut}));const Et=C&&cn.some(R=>R.path===C)?C:null,bs=j.useMemo(()=>ue?N7(g,ue):f7,[g,ue]),qi=!!(!r&&u&&V&&ue&&Kt&&be),Jl=j.useCallback(R=>{f(R),R.events&&(_(R.events),Y.current=Math.max(0,...R.events.map(F=>F.seq??0))),document.title=md(R)},[]),jn=j.useCallback(()=>{B.current+=1,te(null),G(null)},[]),Xn=j.useCallback(()=>{he({mode:"all"}),le({type:"idle"}),jn(),lt(null)},[jn,lt]),Qn=j.useCallback(async()=>{var ce;const R=await yd(a),F=((ce=R.turns[R.turns.length-1])==null?void 0:ce.id)??null;je===null&&H&&F!==H&&Xn(),Jl(R)},[a,je,H,Xn,Jl]),dn=j.useCallback(R=>{R.seq&&R.seq>Y.current&&(Y.current=R.seq),_(F=>w7(F,R))},[]);if(j.useEffect(()=>{let R=!1;return Ne(),Y.current=0,_([]),J("connecting"),yd(a).then(F=>{R||Jl(F)}).catch(F=>{R||h(F instanceof Error?F.message:String(F))}),()=>{R=!0}},[a,Ne,Jl]),j.useEffect(()=>{let R=!1;return V5().then(({targets:F})=>{R||b(F.length>0?F:Qo)}).catch(()=>{R||b(Qo)}),()=>{R=!0}},[]),j.useEffect(()=>{var R;V&&ct(((R=V.feedback)==null?void 0:R.comments)??[],V.resolution??null)},[ct,V]),j.useEffect(()=>{if(!V||Ve.mode!=="range")return;let R=!1;return le({type:"loading"}),Y5(a,Ve.fromSha,Ve.toSha,V.id).then(F=>{R||le({type:"loaded",diff:F})}).catch(F=>{R||le({error:F instanceof Error?F.message:String(F),type:"failed"})}),()=>{R=!0}},[Ve,V,a]),j.useEffect(()=>{if(!qi)return;const R=Z.current,F=Ce.current;if(!R||!F)return;const ce=()=>{R.style.setProperty("--review-sticky-top",`${F.offsetHeight}px`)};ce();const Pe=new ResizeObserver(ce);return Pe.observe(F),()=>Pe.disconnect()},[qi]),j.useEffect(()=>{const R=new EventSource(`/api/reviews/${a}/events?after=${Y.current}`);return J("connecting"),R.onopen=()=>{J("connected")},R.onmessage=F=>{const ce=o5(F.data,l2,"review event");dn(ce),e7(ce)&&Qn().catch(Pe=>{h(Pe instanceof Error?Pe.message:String(Pe))})},R.onerror=()=>{J("disconnected")},()=>{R.close()}},[a,Qn,dn]),r)return s.jsx("main",{className:"empty-shell",children:s.jsxs("section",{className:"empty-panel",children:[s.jsx("h1",{children:"Review unavailable"}),s.jsx("p",{children:r})]})});if(!u||!V||!ue||!Kt||!be)return s.jsx("main",{className:"empty-shell",children:s.jsxs("section",{className:"empty-panel",children:[s.jsx(t1,{className:"spin",size:24}),s.jsx("p",{children:"Loading review"})]})});const Fl=V.diff.scope,El=Kt.stats,Ss=l7(ue.meta.branch,be),Wl=a7(ue.meta.branch,be),ka=q7(Ve),En=G7(Ve),Il=V.id!==H||$m(V.status),Gi=T2(u.turns),Ua=Ve.mode==="range"?fe.error:null,Vi=Ve.mode==="range"&&fe.loading,Pl=n7(ue.feedback,ue.resolution),ea=He.filter(R=>Ut.has(R.path)).length,Yi=He.length===0?0:Math.round(ea/He.length*100),Xi=R=>{pe(F=>({reviewId:u.meta.id,searchQuery:R,selectedExtensionIds:F.reviewId===u.meta.id?F.selectedExtensionIds:null}))},hn=R=>{pe(F=>{const ce=F.reviewId===u.meta.id&&F.selectedExtensionIds?new Set(F.selectedExtensionIds):new Set(xn);return ce.has(R)?ce.delete(R):ce.add(R),{reviewId:u.meta.id,searchQuery:F.reviewId===u.meta.id?F.searchQuery:"",selectedExtensionIds:ce}})},pt=()=>{pe(R=>({reviewId:u.meta.id,searchQuery:R.reviewId===u.meta.id?R.searchQuery:"",selectedExtensionIds:null}))},wt=()=>{pe(R=>({reviewId:u.meta.id,searchQuery:R.reviewId===u.meta.id?R.searchQuery:"",selectedExtensionIds:new Set}))},Zn=R=>{re(F=>{const ce=new Set(F);return ce.has(R)?ce.delete(R):ce.add(R),Hd(ce),ce})},Ba=()=>{const R=new Set;Hd(R),re(R)},Qi=R=>{K(F=>{const ce=new Set(F);return ce.add(R),ce})},xs=R=>{x(R.filePath),k(!1),cn.some(Pe=>Pe.path===R.filePath)||pe({reviewId:u.meta.id,searchQuery:"",selectedExtensionIds:null}),zt.has(R.filePath)&&Qi(R.filePath);let F=0;const ce=()=>{if(!S7(R)){if(F<8){F+=1,window.requestAnimationFrame(ce);return}kd(R.filePath)}};window.requestAnimationFrame(ce)},Zi=R=>{x(R),k(!1),window.requestAnimationFrame(()=>{window.setTimeout(()=>kd(R),0)})},wl=R=>{R.preventDefault();const F=R.clientX,ce=q,Pe=sn=>{const _t=ce+sn.clientX-F;Q(Math.min(c7,Math.max(i7,_t)))},$t=()=>{window.removeEventListener("pointermove",Pe),window.removeEventListener("pointerup",$t)};window.addEventListener("pointermove",Pe),window.addEventListener("pointerup",$t,{once:!0})},qa=(R,F)=>{I(ce=>{const Pe=ce.storageKey===st?ce.files:Xo(st),$t=new Set(Pe);return F?$t.add(R):$t.delete(R),P8(st,$t),{storageKey:st,files:$t}})},Kn=async(R,F)=>{ve(null);try{await gd(a,R,V.id,{target:F})}catch(ce){const Pe=ce instanceof Error?ce.message:String(ce);throw ve(Pe),new Error(Pe)}},$n=async(R,F)=>{ve(null);try{await gd(a,R,V.id,{scope:"repo",target:F})}catch(ce){const Pe=ce instanceof Error?ce.message:String(ce);throw ve(Pe),new Error(Pe)}},Nl=async R=>{ve(null);try{return(await vd(a,R,V.id)).content}catch(F){const ce=F instanceof Error?F.message:String(F);throw ve(ce),new Error(ce)}},Jn=async R=>{ve(null);try{return(await vd(a,R,V.id,{scope:"repo"})).content}catch(F){const ce=F instanceof Error?F.message:String(F);throw ve(ce),new Error(ce)}},rt=async R=>{const F=B.current+1;B.current=F,te(R),G({status:"loading",symbol:R.symbol});try{const ce=await Q5({reviewId:a,turnId:V.id,source:En,...R});B.current===F&&G({status:"ready",response:ce})}catch(ce){B.current===F&&G({message:ce instanceof Error?ce.message:String(ce),status:"error",symbol:R.symbol})}},Ki=async(R,F,ce)=>{if(!ne)throw new Error("source peek selection is no longer available");return Z5({reviewId:a,turnId:V.id,source:En,side:ne.side,filePath:R,startLine:F,lineCount:ce})},Ga={activeFilePath:Et,extensionBuckets:$l,files:He,filteredFiles:cn,hiddenBoringFileCount:zt.size,hiddenBoringPresets:$,searchQuery:Ha,selectedExtensionIds:La,onClearExtensions:wt,onFileSelect:Zi,onSearchChange:Xi,onSelectAllExtensions:pt,onShowAllBoringFiles:Ba,onToggleBoringPreset:Zn,onToggleExtension:hn},wn=s.jsx(Cd,{...Ga,onCollapse:()=>T(!0)}),Fn=s.jsx(Cd,{...Ga}),js=Kt.files.length===0?null:s.jsxs("div",{className:"empty-diff filtered-empty",children:[s.jsx("h2",{children:"No matching files"}),s.jsx("p",{children:"Adjust the file search or extension filters to show changed files."})]});return s.jsx("main",{className:"review-shell",ref:Z,children:s.jsxs("div",{className:"review-split",children:[s.jsxs("div",{className:"review-main-pane",children:[s.jsxs("header",{className:"topbar",ref:Ce,children:[s.jsxs("div",{className:"topbar-header",children:[s.jsxs("div",{className:"topbar-title",children:[s.jsx("img",{className:"brand-mark",src:"/logo.svg",alt:""}),s.jsxs("div",{className:"review-heading",children:[s.jsx("p",{className:"product-name",children:"Gloss"}),s.jsxs("h1",{children:[Ss.icon==="branch"?s.jsx(os,{className:"review-title-icon",size:18}):null,s.jsx("span",{className:"review-title-text",children:be})]})]})]}),s.jsxs("div",{className:"topbar-actions",children:[s.jsx(H7,{commitDiffs:Ge,value:Ve,onChange:R=>{he(R),R.mode!=="range"&&le({type:"idle"}),jn(),lt(null)}}),s.jsxs("div",{className:"viewed-progress",title:"Viewed files",children:[s.jsx("span",{"aria-hidden":"true",className:"viewed-progress-ring",style:{"--viewed-progress":`${Yi}%`}}),ea," / ",He.length," viewed"]}),s.jsx("button",{"aria-label":"Open file tree",className:"icon-button file-tree-mobile-toggle",title:"Open file tree",type:"button",onClick:()=>k(!0),children:s.jsx(e1,{size:16})}),s.jsx("button",{"aria-label":y?"Unwrap lines":"Wrap lines","aria-pressed":y,className:"icon-button wrap-toggle",title:y?"Unwrap lines":"Wrap lines",type:"button",onClick:()=>E(R=>!R),children:y?s.jsx(Jh,{size:16}):s.jsx(Jd,{size:16})}),s.jsx(g7,{}),Wl?s.jsxs("div",{className:"branch-pill",title:Wl.title,children:[s.jsx(os,{size:16}),s.jsx("span",{children:Wl.label})]}):null]})]}),s.jsx(_7,{scope:Fl,selectedTurn:V,stats:El,turns:u.turns,onSelectTurn:R=>{R!==V.id&&Xn(),de(R===H?null:R)}}),X==="disconnected"?s.jsx("div",{className:"event-connection-banner",children:"Reconnecting to live review updates"}):null,s.jsx(z7,{state:bs})]}),ge?s.jsx("div",{className:"open-file-message error",children:ge}):null,Ua?s.jsx("div",{className:"open-file-message error",children:Ua}):null,Vi?s.jsx("div",{className:"range-loading",children:"Loading range diff"}):null,s.jsxs("div",{className:`review-body ${p?"file-tree-collapsed":""}`,style:{"--file-tree-width":`${q}px`},children:[s.jsx("aside",{className:`review-sidebar ${p?"collapsed":""}`,children:p?s.jsxs("button",{"aria-label":"Expand file tree",className:"file-tree-rail",title:"Expand file tree",type:"button",onClick:()=>T(!1),children:[s.jsx(Ph,{size:17}),s.jsx("span",{children:"Files"}),s.jsx("span",{children:cn.length})]}):s.jsxs(s.Fragment,{children:[wn,s.jsx("button",{"aria-label":"Resize file tree",className:"file-tree-resize-handle",title:"Resize file tree",type:"button",onPointerDown:wl})]})}),s.jsxs("section",{className:"review-diff-column",children:[Il&&!Gi?s.jsx(Q7,{record:ue}):null,Il&&Pl.length>0?s.jsx(X7,{items:Pl}):null,s.jsx(p8,{activeFilePath:Et,contextSource:En,diff:Kt,emptyState:js,files:cn,hiddenFiles:zt,record:ue,readOnly:Il,reviewId:a,selectedSourcePeek:ne,turnId:V.id,viewedFiles:Ut,wrapLines:y,openTargets:ze,onCopyFileContents:Nl,onOpenFile:Kn,onRevealHiddenFile:Qi,onSourcePeek:rt,onViewedChange:qa})]})]}),O?s.jsx("dialog",{className:"file-tree-drawer-backdrop","aria-label":"Files",open:!0,children:s.jsxs("aside",{className:"file-tree-drawer",children:[s.jsxs("div",{className:"file-tree-drawer-header",children:[s.jsx("span",{children:"Changed files"}),s.jsx("button",{"aria-label":"Close file tree",className:"icon-button",type:"button",onClick:()=>k(!1),children:s.jsx(Ui,{size:16})})]}),Fn]})}):null,Il?null:s.jsx(W8,{reviewId:a,reviewScope:ka,onLineCommentSelect:xs,onSubmitted:Qn})]}),me?Hi.createPortal(s.jsx(q8,{openTargets:ze,state:me,onCopyFileContents:Jn,onLoadRange:Ki,onOpenFile:$n,onClose:jn}),document.body):null]})})}function E7(a,u){return{...a,meta:{...a.meta,activeTurnId:u.id,status:u.status,submittedAt:u.submittedAt,resolvedAt:u.resolvedAt,feedbackPath:u.feedbackPath,markdownPath:u.markdownPath},diff:u.diff,...u.feedback?{feedback:u.feedback}:{feedback:void 0},...u.resolution?{resolution:u.resolution}:{resolution:void 0}}}function w7(a,u){const f=Ud(u),r=a.findIndex(y=>Ud(y)===f);return(r>=0?a.map((y,E)=>E===r?u:y):[...a,u]).toSorted(T7)}function N7(a,u){const r=a.filter(E=>E.type==="agent.claimed"||E.type==="agent.note").at(-1)??null,h=[...a].reverse().find(E=>E.type.startsWith("review.")&&E.type!=="review.opened")??null,y=n1(u);return{agentStatus:M7(r),latestAgentMessage:C7(r),latestAgentTimestamp:(r==null?void 0:r.createdAt)??null,latestReviewEvent:h,progress:y.total>0?`${y.resolved} of ${y.total} comments resolved`:null}}function z7({state:a}){return!a.agentStatus&&!a.latestReviewEvent&&!a.progress?null:s.jsxs("section",{className:"review-session-panel",children:[s.jsxs("div",{className:"review-session-item",children:[s.jsx("span",{className:"review-session-label",children:"Review"}),s.jsx("span",{className:"review-session-value",children:A7(a.latestReviewEvent)??"Open"})]}),a.progress?s.jsxs("div",{className:"review-session-item",children:[s.jsx("span",{className:"review-session-label",children:"Progress"}),s.jsx("span",{className:"review-session-value",children:a.progress})]}):null,a.agentStatus?s.jsxs("div",{className:"review-session-item agent",children:[s.jsx("span",{className:"review-session-label",children:"Agent"}),s.jsx("span",{className:"review-session-value",children:a.agentStatus}),a.latestAgentTimestamp?s.jsx("time",{dateTime:a.latestAgentTimestamp,children:m1(a.latestAgentTimestamp)}):null]}):null,a.latestAgentMessage?s.jsx("p",{className:"review-session-message",children:a.latestAgentMessage}):null]})}function Ud(a){return a.seq!==void 0?`seq:${a.seq}`:a.id?`id:${a.id}`:`${a.type}:${a.reviewId}:${a.createdAt??""}:${JSON.stringify(a)}`}function T7(a,u){const f=a.seq??0,r=u.seq??0;return f!==r?f-r:(a.createdAt??"").localeCompare(u.createdAt??"")}function M7(a){return a?a.type==="agent.claimed"?"Claimed":a.type==="agent.note"&&a.status?a.status.charAt(0).toUpperCase()+a.status.slice(1):"Updated":null}function C7(a){return a?a.type==="agent.claimed"?a.message??null:a.type==="agent.note"?a.message:null:null}function A7(a){return a?a.type==="review.turn.created"?`Turn ${a.turnIndex} opened`:a.type==="review.submitted"?`Submitted · ${a.counts.comments} comments`:a.type==="review.updated"?a.status==="resolved"?"Resolved":"Submitted":a.type==="review.cancelled"?"Cancelled":null:null}function _7({scope:a,selectedTurn:u,stats:f,turns:r,onSelectTurn:h}){return s.jsxs("div",{className:"review-context-bar",children:[s.jsxs("div",{className:"review-context-range",title:`${qd("Base",a.base.ref,a.base.sha)} to ${qd("Compare",a.comparison.ref,a.comparison.sha)}`,children:[s.jsx("span",{className:"review-context-ref",children:Bd(a.base.ref,a.base.sha)}),s.jsx(Yd,{className:"review-context-arrow",size:14}),s.jsx("span",{className:"review-context-ref",children:Bd(a.comparison.ref,a.comparison.sha)})]}),s.jsx("span",{className:"review-context-divider","aria-hidden":"true"}),s.jsxs("div",{className:"review-context-stats",title:"Changed files",children:[s.jsxs("span",{children:[f.files," ",f.files===1?"file":"files"]}),s.jsxs("span",{className:"summary-add",children:["+",f.additions]}),s.jsxs("span",{className:"summary-del",children:["-",f.deletions]})]}),s.jsx(R7,{selectedTurn:u,turns:r,onSelect:h})]})}function R7({selectedTurn:a,turns:u,onSelect:f}){var x;const[r,h]=j.useState(!1),y=j.useRef(null);if(j.useEffect(()=>{if(!r)return;const p=O=>{var k;(k=y.current)!=null&&k.contains(O.target)||h(!1)},T=O=>{O.key==="Escape"&&h(!1)};return window.addEventListener("pointerdown",p),window.addEventListener("keydown",T),()=>{window.removeEventListener("pointerdown",p),window.removeEventListener("keydown",T)}},[r]),!T2(u))return null;const E=(x=u[u.length-1])==null?void 0:x.id,C=[...u].reverse();return s.jsxs("div",{className:"turn-selector",ref:y,children:[s.jsxs("button",{"aria-expanded":r,"aria-haspopup":"menu",className:"turn-selector-trigger",type:"button",onClick:()=>h(p=>!p),children:[s.jsxs("span",{children:["Turn ",a.index," of ",u.length]}),s.jsx("span",{className:`turn-selector-status ${a.status}`,children:a.status}),s.jsx(Kl,{size:14})]}),r?s.jsx("div",{className:"turn-menu",role:"menu","aria-label":"Review turns",children:C.map(p=>{var se;const T=n1(p),O=p.id===a.id,k=p.id===E,q=(se=p.feedback)!=null&&se.reviewScope?Zm(p.feedback.reviewScope,p.diff.commitDiffs??[]):null,Q=D7(p);return s.jsxs("button",{"aria-checked":O,className:`turn-menu-item ${O?"selected":""}`,role:"menuitemradio",type:"button",onClick:()=>{f(p.id),h(!1)},children:[s.jsxs("span",{className:"turn-menu-title",children:["Turn ",p.index,k?s.jsx("span",{className:"turn-menu-latest",children:"Latest"}):null]}),s.jsxs("span",{className:`turn-menu-meta ${p.status}`,children:[p.status,T.total>0?` · ${T.open} open / ${T.total}`:" · no comments"]}),Q?s.jsx("time",{className:"turn-menu-time",dateTime:Q,children:m1(Q)}):null,q?s.jsxs("span",{className:"turn-menu-scope",children:["Scope: ",q]}):null]},p.id)})}):null]})}function Bd(a,u){return u?`${a} ${u.slice(0,7)}`:a}function qd(a,u,f){return`${a} ${u}${f?` (${f})`:""}`}function D7(a){var u;return a.status==="resolved"?a.resolvedAt??((u=a.resolution)==null?void 0:u.resolvedAt)??null:a.status==="submitted"?a.submittedAt??null:null}function O7(a,u){if(a.mode==="all")return a;if(a.mode==="single")return u.some(h=>h.commit.sha===a.sha)?a:{mode:"all"};const f=u.findIndex(h=>h.commit.sha===a.fromSha),r=u.findIndex(h=>h.commit.sha===a.toSha);return f>=0&&r>=f?a:{mode:"all"}}function L7(a,u){switch(u.type){case"idle":return C2;case"loading":return{diff:null,error:null,loading:!0};case"loaded":return{diff:u.diff,error:null,loading:!1};case"failed":return{diff:null,error:u.error,loading:!1}}}function H7({commitDiffs:a,value:u,onChange:f}){const[r,h]=j.useState(!1),[y,E]=j.useState("all"),[C,x]=j.useState(new Set),p=j.useRef(null),T=j.useRef(null),O=j.useMemo(()=>a.map($=>({sha:$.commit.sha,shortSha:$.commit.shortSha,subject:$.commit.subject,authorName:$.commit.authorName,committedAt:$.commit.committedAt,fileCount:$.files.length})),[a]);if(j.useEffect(()=>{if(!r)return;T.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $=["button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)","a[href]",'[tabindex]:not([tabindex="-1"])'].join(","),re=()=>{var K;return Array.from(((K=p.current)==null?void 0:K.querySelectorAll($))??[]).filter(je=>je.offsetParent!==null)};window.requestAnimationFrame(()=>{var K;(K=re()[0]??p.current)==null||K.focus()});const ye=K=>{var he;if(K.key==="Escape"&&h(!1),K.key!=="Tab")return;const je=re();if(je.length===0){K.preventDefault(),(he=p.current)==null||he.focus();return}const de=je[0],W=je[je.length-1];K.shiftKey&&document.activeElement===de?(K.preventDefault(),W.focus()):!K.shiftKey&&document.activeElement===W&&(K.preventDefault(),de.focus())};return window.addEventListener("keydown",ye),()=>{var K;window.removeEventListener("keydown",ye),(K=T.current)==null||K.focus(),T.current=null}},[r]),O.length===0)return null;const k=()=>{const $=k7(u,O);E(u.mode==="all"||$.size===0?"all":"selected"),x($),h(!0)},q=A2(C,O),Q=q.length>0?{from:O[q[0]],to:O[q[q.length-1]],count:q[q.length-1]-q[0]+1}:null,se=y==="all"?`${O.length} ${O.length===1?"commit":"commits"}`:Q?Q.from.sha===Q.to.sha?Q.from.shortSha:`${Q.count} commits · ${Q.from.shortSha} to ${Q.to.shortSha}`:"No commits selected",pe=y==="all"||q.length>0;return s.jsxs("div",{className:"commit-selector",children:[s.jsxs("button",{"aria-expanded":r,className:"commit-picker-trigger",type:"button",onClick:k,children:[s.jsx(kh,{size:16}),s.jsx("span",{className:"commit-picker-trigger-text",children:V7(u,O)}),s.jsx(Kl,{size:16})]}),r?Hi.createPortal(s.jsx("div",{className:"commit-picker-backdrop",children:s.jsxs("dialog",{"aria-labelledby":"commit-picker-title","aria-modal":"true",className:"commit-picker-dialog",ref:p,open:!0,tabIndex:-1,children:[s.jsxs("header",{className:"commit-picker-header",children:[s.jsx("h2",{id:"commit-picker-title",children:"Select commits to view"}),s.jsx("button",{"aria-label":"Close commit picker",className:"icon-button commit-picker-close",type:"button",onClick:()=>h(!1),children:s.jsx(Ui,{size:20})})]}),s.jsxs("div",{className:"commit-picker-body",children:[s.jsxs("label",{className:`commit-picker-all ${y==="all"?"selected":""}`,children:[s.jsx("input",{checked:y==="all",className:"commit-picker-checkbox",type:"checkbox",onChange:()=>{E("all"),x(new Set)}}),s.jsxs("span",{className:"commit-picker-all-copy",children:[s.jsx("span",{children:"All commits"}),s.jsxs("span",{children:[O.length," ",O.length===1?"commit":"commits"]})]})]}),s.jsx("div",{className:"commit-picker-section-label",children:"Select a range of commits"}),s.jsx("div",{className:"commit-picker-list",children:O.map($=>{const re=y==="selected"&&C.has($.sha);return s.jsxs("label",{className:`commit-picker-row ${re?"selected":""}`,children:[s.jsx("input",{checked:re,className:"commit-picker-checkbox",type:"checkbox",onChange:()=>{E("selected"),x(ye=>U7(ye,$.sha,O))}}),s.jsxs("span",{className:"commit-picker-row-copy",children:[s.jsx("span",{className:"commit-picker-subject",children:$.subject}),s.jsxs("span",{className:"commit-picker-meta",children:[$.authorName," committed ",Y7($.committedAt)," ","· ",$.fileCount," ",$.fileCount===1?"file":"files"]})]}),s.jsx("span",{className:"commit-picker-sha",children:$.shortSha})]},$.sha)})})]}),s.jsxs("footer",{className:"commit-picker-footer",children:[s.jsx("span",{className:"commit-picker-summary",children:se}),s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>h(!1),children:"Cancel"}),s.jsxs("button",{className:"primary-button",disabled:!pe,type:"button",onClick:()=>{if(y==="all"){f({mode:"all"}),h(!1);return}const $=B7(q,O);$&&(f($),h(!1))},children:[s.jsx(vn,{size:16}),"Save"]})]})]})}),document.body):null]})}function k7(a,u){if(a.mode==="all")return new Set;if(a.mode==="single")return u.some(h=>h.sha===a.sha)?new Set([a.sha]):new Set;const f=u.findIndex(h=>h.sha===a.fromSha),r=u.findIndex(h=>h.sha===a.toSha);return f<0||r<f?new Set:Oa(f,r,u)}function A2(a,u){const f=[];for(const[r,h]of u.entries())a.has(h.sha)&&f.push(r);return f}function U7(a,u,f){const r=f.findIndex(p=>p.sha===u);if(r<0)return a;const h=A2(a,f);if(!a.has(u)){const p=h.length>0?Math.min(h[0],r):r,T=h.length>0?Math.max(h[h.length-1],r):r;return Oa(p,T,f)}if(h.length<=1)return new Set;const y=h[0],E=h[h.length-1];if(r<=y)return Oa(y+1,E,f);if(r>=E)return Oa(y,E-1,f);const C=r-y,x=E-r;return C>=x?Oa(y,r-1,f):Oa(r+1,E,f)}function Oa(a,u,f){return a<0||u<a?new Set:new Set(f.slice(a,u+1).map(r=>r.sha))}function B7(a,u){if(a.length===0)return null;const f=a[0],r=a[a.length-1];return f===r?{mode:"single",sha:u[f].sha}:{mode:"range",fromSha:u[f].sha,toSha:u[r].sha}}function q7(a){return a.mode==="all"?{mode:"all"}:a.mode==="single"?{mode:"single",sha:a.sha}:{mode:"range",fromSha:a.fromSha,toSha:a.toSha}}function G7(a){return a.mode==="all"?{mode:"turn"}:a.mode==="single"?{mode:"commit",sha:a.sha}:{mode:"range",fromSha:a.fromSha,toSha:a.toSha}}function V7(a,u){if(a.mode==="all")return"All commits";if(a.mode==="single"){const y=u.find(E=>E.sha===a.sha);return y?`${y.shortSha} ${y.subject}`:"One commit"}const f=u.findIndex(y=>y.sha===a.fromSha),r=u.findIndex(y=>y.sha===a.toSha);return f<0||r<f?"Commit range":`${r-f+1} commits · ${u[f].shortSha} to ${u[r].shortSha}`}function Y7(a){const u=new Date(a);if(Number.isNaN(u.getTime()))return"recently";const f=Math.round((u.getTime()-Date.now())/1e3),[r,h]=Zo.find(([,y])=>Math.abs(f)>=y)??Zo[Zo.length-1];return h7.format(Math.round(f/h),r)}function X7({items:a}){return s.jsxs("section",{className:"submitted-general-feedback","aria-labelledby":"submitted-general-title",children:[s.jsxs("header",{className:"submitted-general-feedback-header",children:[s.jsxs("div",{className:"submitted-general-feedback-title",children:[s.jsx(Ql,{size:16}),s.jsx("h2",{id:"submitted-general-title",children:"General feedback"})]}),s.jsx("span",{className:"submitted-general-feedback-count",children:a.length})]}),s.jsx("div",{className:"submitted-general-feedback-list",children:a.map(u=>s.jsxs("article",{className:`submitted-general-feedback-card ${u.status}`,children:[s.jsx("div",{className:"submitted-general-feedback-icon",children:u.status==="resolved"?s.jsx(Po,{size:15}):s.jsx(Ql,{size:15})}),s.jsxs("div",{className:"submitted-general-feedback-content",children:[s.jsx("div",{className:"submitted-general-feedback-meta",children:u.status==="resolved"?"Resolved":"Open · Needs fix"}),s.jsx("p",{className:"submitted-general-feedback-body",children:u.comment.body}),u.summary?s.jsx("p",{className:"submitted-general-feedback-summary",children:u.summary}):null]})]},u.comment.id))})]})}function Q7({record:a}){var r;const u=Z7(a);if(!u)return null;const f=a.meta.status==="resolved"?a.meta.resolvedAt??((r=a.resolution)==null?void 0:r.resolvedAt):a.meta.submittedAt;return s.jsxs("section",{className:`review-state-banner ${a.meta.status}`,children:[s.jsxs("div",{className:"review-state-title",children:[s.jsx(Po,{size:16}),s.jsx("span",{children:u.title})]}),s.jsx("p",{children:u.body}),f?s.jsx("time",{dateTime:f,children:m1(f)}):null]})}function Z7(a){const u=a.meta.status,f=n1(a),r=f.total>0?`${f.resolved} of ${f.total} comments resolved`:null;return u==="submitted"?{title:f.resolved>0&&r?`Submitted · ${r}`:"Submitted",body:f.resolved>0?"Feedback is being handled.":"Feedback has been submitted."}:u==="resolved"?{title:r?`Resolved · ${r}`:"Resolved",body:"This feedback turn is resolved."}:null}function m1(a){return m7.format(new Date(a))}const K7="npx skills add iamrajjoshi/gloss --skill gloss -g -a claude-code",$7=`1. Run gloss open --json from the repo root unless the user names a base ref.
316
316
  2. Wait for the browser review to be submitted.
317
317
  3. Read feedbackPath from the JSON output.
318
318
  4. Address general comments first, then file comments in file and line order.