azdiffs 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +6 -0
  2. package/dist/cli.js +88 -31
  3. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId-BfEZAJVI.js +1 -0
  4. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.commits._commitId-DvqTmFzX.js +1 -0
  5. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.commits.index-Bd3xdIex.js +1 -0
  6. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.conflicts-DV0pCnK1.js +1 -0
  7. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.files-Mr-AIHvi.js +1 -0
  8. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.index-DoV2Gs7F.js +1 -0
  9. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId-ChLX3uCr.js +1 -0
  10. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.commits._commitId-DXZcIPBR.js +1 -0
  11. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.commits.index-Bd3xdIex.js +1 -0
  12. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.conflicts-DkEZ314x.js +1 -0
  13. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.files-N3xJdxPo.js +1 -0
  14. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.index-Dt7ItZCC.js +1 -0
  15. package/dist/web/assets/_organization.index-DVTzM87W.js +1 -0
  16. package/dist/web/assets/commit-diff-view-BNA-1iz5.js +1 -0
  17. package/dist/web/assets/commits-view-Cq3oHLFX.js +13 -0
  18. package/dist/web/assets/conflicts-view-Bca0Tnmk.js +8 -0
  19. package/dist/web/assets/dev.diff-jb6X8hTd.js +1 -0
  20. package/dist/web/assets/file-header-B2S9b0sl.js +49 -0
  21. package/dist/web/assets/files-view-C2YnVYtG.js +1460 -0
  22. package/dist/web/assets/grammars-B3laSCck.js +2 -0
  23. package/dist/web/assets/{highlights-BJb1-tzP.js → highlights-C-SBVYal.js} +1 -1
  24. package/dist/web/assets/home-page-BUnNaCN6.js +1 -0
  25. package/dist/web/assets/inbox-D8-BBgQT.js +1 -0
  26. package/dist/web/assets/index-DsrXp1aY.js +11 -0
  27. package/dist/web/assets/overview-view-B9qPTEMk.js +2 -0
  28. package/dist/web/assets/pull-request-layout-R9F6zMxd.js +35 -0
  29. package/dist/web/assets/routes-D2t0cGUy.js +1 -0
  30. package/dist/web/assets/shiki-mTy6Inae.js +1 -0
  31. package/dist/web/assets/shortcut-help-D99FihA2.js +1 -0
  32. package/dist/web/assets/{stream-tokenizer-B5Ok5N3S.js → stream-tokenizer-CKeNSKPz.js} +2 -2
  33. package/dist/web/index.html +1 -1
  34. package/package.json +1 -1
  35. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId-D7saE-jO.js +0 -1
  36. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.commits._commitId-DOwGbBTQ.js +0 -1
  37. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.commits.index-DzGjUdAz.js +0 -1
  38. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.conflicts-Cjr34xFt.js +0 -1
  39. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.files-BjjJ4Yb8.js +0 -1
  40. package/dist/web/assets/_organization.___git._repository.pullrequest._pullRequestId.index-iY62N_zR.js +0 -1
  41. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId-CrHRklAE.js +0 -1
  42. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.commits._commitId-WC7fEryq.js +0 -1
  43. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.commits.index-DzGjUdAz.js +0 -1
  44. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.conflicts-BhUkafpV.js +0 -1
  45. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.files-_RVmv4sD.js +0 -1
  46. package/dist/web/assets/_organization._project.___git._repository.pullrequest._pullRequestId.index-BJrgfbSD.js +0 -1
  47. package/dist/web/assets/_organization.index-hKcWlBrk.js +0 -1
  48. package/dist/web/assets/commit-diff-view-CQeZylif.js +0 -1
  49. package/dist/web/assets/commits-view-B_TQ6AnD.js +0 -13
  50. package/dist/web/assets/conflicts-view-CnGEkjaP.js +0 -8
  51. package/dist/web/assets/dev.diff-DH1qvnWe.js +0 -1
  52. package/dist/web/assets/file-header-keBlejWu.js +0 -49
  53. package/dist/web/assets/files-view-Bu3bjrNf.js +0 -1460
  54. package/dist/web/assets/grammars-DmFYBwmS.js +0 -2
  55. package/dist/web/assets/home-page-Y5jGxOav.js +0 -1
  56. package/dist/web/assets/inbox-jP8QPtzZ.js +0 -1
  57. package/dist/web/assets/index-B297yCgq.js +0 -11
  58. package/dist/web/assets/overview-view-cEOsI9TY.js +0 -2
  59. package/dist/web/assets/pull-request-layout-DsDKURcq.js +0 -35
  60. package/dist/web/assets/routes-BruvNNp9.js +0 -1
  61. package/dist/web/assets/shiki-DueA5xDi.js +0 -1
  62. package/dist/web/assets/shortcut-help-Cb0be4f3.js +0 -1
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/javascript-anBMbNY-.js","assets/rolldown-runtime-BLXQ4ufn.js","assets/css-CBDjU9xM.js","assets/scss-DC8XIxmG.js","assets/html-Cyo-BRss.js","assets/xml-Bz5Z3pZJ.js","assets/java-r7y4bhRH.js","assets/properties-CHTuaqAW.js","assets/ini-B5eOa1yu.js","assets/fsharp-D13ZGOAj.js","assets/markdown-BYOwaDjH.js","assets/razor-3kKIP6Di.js","assets/csharp-dmMxLVLW.js","assets/php-DTciGFRO.js","assets/sql-CEbI0hMM.js","assets/json-qhed-kSA.js","assets/c-B0t_Dlza.js","assets/cpp-DGR_3gb-.js","assets/lua-mGgFNKt2.js","assets/graphql-Br4JsJsw.js","assets/typescript-bsJCZSQ-.js","assets/jsx-Bz0zcwM4.js","assets/tsx-udAQXfEw.js","assets/vue-Dz_q6gML.js","assets/svelte-iJTmbwM3.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-BLXQ4ufn.js";import{Kn as t}from"./index-DsrXp1aY.js";var n=e({bundledLanguages:()=>r}),r=Object.fromEntries([[[`typescript`,`ts`,`cts`,`mts`],()=>t(()=>import(`./typescript-bsJCZSQ-.js`),[])],[[`tsx`],()=>t(()=>import(`./tsx-udAQXfEw.js`),[])],[[`javascript`,`js`,`cjs`,`mjs`],()=>t(()=>import(`./javascript-anBMbNY-.js`).then(e=>e.n),__vite__mapDeps([0,1]))],[[`jsx`],()=>t(()=>import(`./jsx-Bz0zcwM4.js`),[])],[[`json`],()=>t(()=>import(`./json-qhed-kSA.js`),[])],[[`jsonc`],()=>t(()=>import(`./jsonc-CYpm1nAK.js`),[])],[[`json5`],()=>t(()=>import(`./json5-BR5RXkoi.js`),[])],[[`css`],()=>t(()=>import(`./css-CBDjU9xM.js`).then(e=>e.n),__vite__mapDeps([2,1]))],[[`scss`],()=>t(()=>import(`./scss-DC8XIxmG.js`),__vite__mapDeps([3,2,1]))],[[`less`],()=>t(()=>import(`./less-DVTAwKKz.js`),[])],[[`html`],()=>t(()=>import(`./html-Cyo-BRss.js`),__vite__mapDeps([4,0,1,2]))],[[`xml`],()=>t(()=>import(`./xml-Bz5Z3pZJ.js`),__vite__mapDeps([5,6,1]))],[[`markdown`,`md`],()=>t(()=>import(`./markdown-BYOwaDjH.js`),[])],[[`yaml`,`yml`],()=>t(()=>import(`./yaml-rwi0_p6S.js`),[])],[[`toml`],()=>t(()=>import(`./toml-CcmNWLt0.js`),[])],[[`ini`],()=>t(()=>import(`./ini-B5eOa1yu.js`),[])],[[`properties`],()=>t(()=>import(`./properties-CHTuaqAW.js`),__vite__mapDeps([7,8]))],[[`dotenv`],()=>t(()=>import(`./dotenv-CuH5my32.js`),[])],[[`shellscript`,`bash`,`sh`,`shell`,`zsh`],()=>t(()=>import(`./shellscript-CLZ0U2zV.js`),[])],[[`powershell`,`ps`,`ps1`],()=>t(()=>import(`./powershell-QtSnmXcu.js`),[])],[[`bat`,`batch`,`cmd`],()=>t(()=>import(`./bat-qdxAdBWQ.js`),[])],[[`csharp`,`c#`,`cs`],()=>t(()=>import(`./csharp-dmMxLVLW.js`),[])],[[`fsharp`,`f#`,`fs`],()=>t(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([9,10]))],[[`vb`],()=>t(()=>import(`./vb-DOwzaHZ0.js`),[])],[[`razor`],()=>t(()=>import(`./razor-3kKIP6Di.js`),__vite__mapDeps([11,4,0,1,2,12]))],[[`java`],()=>t(()=>import(`./java-r7y4bhRH.js`).then(e=>e.n),__vite__mapDeps([6,1]))],[[`kotlin`,`kt`,`kts`],()=>t(()=>import(`./kotlin-DhhofPvG.js`),[])],[[`groovy`],()=>t(()=>import(`./groovy-CacY0gHj.js`),[])],[[`scala`],()=>t(()=>import(`./scala-BiFt_7mu.js`),[])],[[`go`],()=>t(()=>import(`./go-rLFTqkRN.js`),[])],[[`rust`,`rs`],()=>t(()=>import(`./rust-DpiIf5JO.js`),[])],[[`python`,`py`],()=>t(()=>import(`./python-gzcpVVnB.js`),[])],[[`php`],()=>t(()=>import(`./php-DTciGFRO.js`),__vite__mapDeps([13,4,0,1,2,5,6,14,15]))],[[`c`],()=>t(()=>import(`./c-B0t_Dlza.js`).then(e=>e.n),__vite__mapDeps([16,1]))],[[`cpp`,`c++`],()=>t(()=>import(`./cpp-DGR_3gb-.js`),__vite__mapDeps([17,16,1]))],[[`swift`],()=>t(()=>import(`./swift-CyEgAFGc.js`),[])],[[`dart`],()=>t(()=>import(`./dart-CHZY9Xhz.js`),[])],[[`lua`],()=>t(()=>import(`./lua-mGgFNKt2.js`),__vite__mapDeps([18,16,1]))],[[`sql`],()=>t(()=>import(`./sql-CEbI0hMM.js`),[])],[[`graphql`,`gql`],()=>t(()=>import(`./graphql-Br4JsJsw.js`),__vite__mapDeps([19,0,1,20,21,22]))],[[`protobuf`,`proto`],()=>t(()=>import(`./proto-DB4EqR-F.js`),[])],[[`dockerfile`,`docker`],()=>t(()=>import(`./docker-IyjqRm3v.js`),[])],[[`makefile`,`make`],()=>t(()=>import(`./makefile-Dixweg8N.js`),[])],[[`cmake`],()=>t(()=>import(`./cmake-Bj61d0ZC.js`),[])],[[`hcl`],()=>t(()=>import(`./hcl-Dh228itO.js`),[])],[[`terraform`,`tf`,`tfvars`],()=>t(()=>import(`./terraform-DswuEJGm.js`),[])],[[`bicep`],()=>t(()=>import(`./bicep-CUHmPFLl.js`),[])],[[`vue`],()=>t(()=>import(`./vue-Dz_q6gML.js`),__vite__mapDeps([23,2,1,0,20,15,4]))],[[`svelte`],()=>t(()=>import(`./svelte-iJTmbwM3.js`),__vite__mapDeps([24,0,1,20,2]))],[[`diff`],()=>t(()=>import(`./diff-woXpYk--.js`),[])]].flatMap(([e,t])=>e.map(e=>[e,t])));export{n,r as t};
@@ -1 +1 @@
1
- import{Kt as e,Vt as t,nn as n,on as r,ot as i}from"./pull-request-layout-DsDKURcq.js";import{n as a,r as o,t as s}from"./stream-tokenizer-B5Ok5N3S.js";var c=()=>{throw Error(`azdiffs ships the Shiki highlighter only`)},l=c,u=()=>!1,d=c,f=class{constructor(){c()}},p=class{options;resolveOptions;#e;#t;#n=!1;#r;#i=!1;constructor(e,t){this.options=e,this.resolveOptions=t,this.#t=e.textDocument.version,this.#e=this.#a()}#a(){return new f({...this.resolveOptions({lang:this.options.textDocument.languageId,theme:this.options.theme,cssVariablePrefix:e(`token`),tokenizeMaxLineLength:this.options.tokenizeMaxLineLength??1e3}),code:this.options.textDocument.getText(),renderRange:[0,0],onDeferTokenize:e=>this.#o(e)})}#o(e){let t=this.#r;if(t!=null)for(let[n,r]of e)t.set(n,r);else this.options.onDeferTokenize(e)}applyChange(e,t){let n=this.options.textDocument,r=Math.min(t?.[0]??0,n.lineCount),i=Math.min(t?.[1]??1/0,n.lineCount);this.#n=!1;let a=new Map,o=this.#t===n.version&&this.#e.lineCount===n.lineCount,s=new Map;this.#r=s;try{if(!o){let t=this.#t===n.version?this.#e.reset(n.getText(),{renderRange:[r,i]}):this.#l(e,[r,i]);this.#t=n.version;for(let[e,n]of t.lines)a.set(e,n)}this.#e.flush(i)}finally{this.#r=void 0}for(let[e,t]of s)a.set(e,t);if(o)for(let[t,n]of e.changedLineRanges){let e=Math.max(t,r),o=Math.min(n+1,i);for(let t=e;t<o;t++)a.has(t)||a.set(t,this.#s(t).tokens)}return a}flush(e){let t=this.options.textDocument;if(this.#t!==t.version||this.#e.lineCount!==t.lineCount)return new Map;let n=this.#c(Math.min(e,t.lineCount));return this.#n&&this.#e.pause(),n}prime(e,t){let n=this.options.textDocument;!t||this.#i||this.#t!==n.version||this.#e.lineCount!==n.lineCount||(this.#i=!0,this.#c(Math.min(e[1],n.lineCount)),this.#n&&this.#e.pause())}bracketIgnoredRanges(e){return this.#s(e).bracketIgnoredRanges}#s(e){let t=this.options.textDocument;if(this.#t!==t.version||this.#e.lineCount!==t.lineCount){this.#r=new Map;try{this.#e.reset(t.getText(),{renderRange:[e,e+1]}),this.#t=t.version}finally{this.#r=void 0,this.#n&&this.#e.pause()}}let{tokens:n,bracketIgnoredRanges:r}=this.#e.getLineTokens(e);return{tokens:n.length===0?[[0,``,``]]:n.map(e=>[e.offset,e.color??``,e.content]),bracketIgnoredRanges:r}}setTheme(e){e!==this.options.theme&&(this.options.theme=e,this.#e.dispose(),this.#n=!1,this.#t=this.options.textDocument.version,this.#e=this.#a(),this.#i=!0)}pause(){this.#n=!0,this.#e.pause()}resume(){this.#n=!1,this.#e.resume()}dispose(){this.#e.dispose()}#c(e){let t=new Map;this.#r=t;try{this.#e.flush(e)}finally{this.#r=void 0}return t}#l(e,t){let n=this.options.textDocument,r={renderRange:t};if(Math.abs(n.version-this.#t)===1&&e.changes.length>0&&this.#e.lineCount===e.previousLineCount)try{let t=this.#e.applyEdits(e.changes.map(({range:e,text:t})=>({range:e,newText:t})),r);if(this.#e.lineCount===n.lineCount)return t}catch(e){if(!(e instanceof RangeError))throw e}return this.#e.reset(n.getText(),r)}},m=1024,h={line:0,character:0},g=class e extends s{options;#e;#t=m;constructor(e){super(),this.options=e,this.#e=new f(e)}tokenizeChunk(e,n){let r=[...e.matchAll(/\r\n|\r|\n/g)],i=this.#e.lineCount-1,a={line:i,character:this.#e.getLineLength(i)};this.#e.applyEdits([{range:{start:a,end:a},newText:e}]);let o=this.#e.lineCount-1,s=[];for(let e=i;e<=o;e++){let{tokens:a}=this.#e.getLineTokens(e);for(let e of a)e.offset+=this.stableOffset;e<o?(t(n,a),this.pushLineBreak(n,this.#e.getLineLength(e),r[e-i][0])):s=a}let c=this.#e.getLineLength(o);if(o>this.#t){let e=this.#e.getText(),{lineChanges:t}=this.#e.applyEdits([{range:{start:h,end:{line:o-1,character:0}},newText:``}]);if(t.every(e=>e.newEndLine<=1))this.#t=m;else{let t=this.#e.getText().length;this.#e.applyEdits([{range:{start:h,end:h},newText:e.slice(0,e.length-t)}]),this.#t=o*2}}return{unstable:s,tailLength:c}}clone(){this.assertActive();let t=new e(this.options);return t.#e.reset(this.#e.getText()),this.copyStateTo(t),t}resetSource(){this.#e.reset(``),this.#t=m}releaseSource(){this.#e.dispose()}},_=class extends a{usedThemes=new Map;attachedLanguages=new Set;constructor(){super(`highlights`,n(`highlights`))}getTheme(e){this.assertNotDisposed();let t=this.themeResolver.getResolvedTheme(e)??this.usedThemes.get(e);if(t==null)throw Error(`Theme "${e}" has not been resolved`);return this.usedThemes.set(e,t),t}codeToTokens(e,t){return this.assertNotDisposed(),l(e,this.resolveOptions(t))}createEditorTokenizer(e){return this.assertNotDisposed(),new o(new p(e,e=>this.resolveOptions(e)),e)}createStreamTokenizer(e){return new g(this.resolveOptions(e))}async loadLanguages(e){this.assertNotDisposed(),this.attachLanguages(await i(e.filter(e=>!this.attachedLanguages.has(e))))}hasLoadedLanguages(e){return!this.disposed&&e.every(e=>this.attachedLanguages.has(e)||!r.has(e))}attachLanguages(e){this.assertNotDisposed();let t=[],n=[];for(let{name:r,highlights:i}of e){if(i==null||this.attachedLanguages.has(r))continue;let e=Object.keys(i.aliases).map(e=>e.toLowerCase());if(!e.includes(r.toLowerCase()))throw Error(`HighlightsHighlighter.attachLanguages: The Highlights lexer "${i.name}" does not declare "${r}" as an alias.`);let a=e.find(e=>[`plain`,`plaintext`,`text`,`txt`].includes(e));if(a!==void 0)throw Error(`HighlightsHighlighter.attachLanguages: The Highlights lexer "${i.name}" declares the reserved alias "${a}".`);t.push(r),n.push(i)}if(n.length!==0){d(n);for(let e of t)this.attachedLanguages.add(e)}}releaseResources(){this.usedThemes.clear(),this.attachedLanguages.clear()}resolveOptions({theme:e,themes:t,...n}){let r=this.attachedLanguages.has(n.lang)||u(n.lang)?n.lang:`text`;if(e!=null)return{...n,lang:r,theme:this.getZedTheme(e)};if(t==null)throw Error(`A theme or themes option is required`);let i={};for(let[e,n]of Object.entries(t))i[e]=this.getZedTheme(n);return{...n,lang:r,themes:i}}getZedTheme(e){let t=this.getTheme(e);if(t.zed==null)throw Error(`Theme "${e}" does not support Highlights`);return t.zed}};export{_ as HighlightsHighlighter};
1
+ import{$t as e,cn as t,gt as n,in as r,rt as i}from"./pull-request-layout-R9F6zMxd.js";import{n as a,r as o,t as s}from"./stream-tokenizer-CKeNSKPz.js";var c=()=>{throw Error(`azdiffs ships the Shiki highlighter only`)},l=c,u=()=>!1,d=c,f=class{constructor(){c()}},p=class{options;resolveOptions;#e;#t;#n=!1;#r;#i=!1;constructor(e,t){this.options=e,this.resolveOptions=t,this.#t=e.textDocument.version,this.#e=this.#a()}#a(){return new f({...this.resolveOptions({lang:this.options.textDocument.languageId,theme:this.options.theme,cssVariablePrefix:e(`token`),tokenizeMaxLineLength:this.options.tokenizeMaxLineLength??1e3}),code:this.options.textDocument.getText(),renderRange:[0,0],onDeferTokenize:e=>this.#o(e)})}#o(e){let t=this.#r;if(t!=null)for(let[n,r]of e)t.set(n,r);else this.options.onDeferTokenize(e)}applyChange(e,t){let n=this.options.textDocument,r=Math.min(t?.[0]??0,n.lineCount),i=Math.min(t?.[1]??1/0,n.lineCount);this.#n=!1;let a=new Map,o=this.#t===n.version&&this.#e.lineCount===n.lineCount,s=new Map;this.#r=s;try{if(!o){let t=this.#t===n.version?this.#e.reset(n.getText(),{renderRange:[r,i]}):this.#l(e,[r,i]);this.#t=n.version;for(let[e,n]of t.lines)a.set(e,n)}this.#e.flush(i)}finally{this.#r=void 0}for(let[e,t]of s)a.set(e,t);if(o)for(let[t,n]of e.changedLineRanges){let e=Math.max(t,r),o=Math.min(n+1,i);for(let t=e;t<o;t++)a.has(t)||a.set(t,this.#s(t).tokens)}return a}flush(e){let t=this.options.textDocument;if(this.#t!==t.version||this.#e.lineCount!==t.lineCount)return new Map;let n=this.#c(Math.min(e,t.lineCount));return this.#n&&this.#e.pause(),n}prime(e,t){let n=this.options.textDocument;!t||this.#i||this.#t!==n.version||this.#e.lineCount!==n.lineCount||(this.#i=!0,this.#c(Math.min(e[1],n.lineCount)),this.#n&&this.#e.pause())}bracketIgnoredRanges(e){return this.#s(e).bracketIgnoredRanges}#s(e){let t=this.options.textDocument;if(this.#t!==t.version||this.#e.lineCount!==t.lineCount){this.#r=new Map;try{this.#e.reset(t.getText(),{renderRange:[e,e+1]}),this.#t=t.version}finally{this.#r=void 0,this.#n&&this.#e.pause()}}let{tokens:n,bracketIgnoredRanges:r}=this.#e.getLineTokens(e);return{tokens:n.length===0?[[0,``,``]]:n.map(e=>[e.offset,e.color??``,e.content]),bracketIgnoredRanges:r}}setTheme(e){e!==this.options.theme&&(this.options.theme=e,this.#e.dispose(),this.#n=!1,this.#t=this.options.textDocument.version,this.#e=this.#a(),this.#i=!0)}pause(){this.#n=!0,this.#e.pause()}resume(){this.#n=!1,this.#e.resume()}dispose(){this.#e.dispose()}#c(e){let t=new Map;this.#r=t;try{this.#e.flush(e)}finally{this.#r=void 0}return t}#l(e,t){let n=this.options.textDocument,r={renderRange:t};if(Math.abs(n.version-this.#t)===1&&e.changes.length>0&&this.#e.lineCount===e.previousLineCount)try{let t=this.#e.applyEdits(e.changes.map(({range:e,text:t})=>({range:e,newText:t})),r);if(this.#e.lineCount===n.lineCount)return t}catch(e){if(!(e instanceof RangeError))throw e}return this.#e.reset(n.getText(),r)}},m=1024,h={line:0,character:0},g=class e extends s{options;#e;#t=m;constructor(e){super(),this.options=e,this.#e=new f(e)}tokenizeChunk(e,t){let r=[...e.matchAll(/\r\n|\r|\n/g)],i=this.#e.lineCount-1,a={line:i,character:this.#e.getLineLength(i)};this.#e.applyEdits([{range:{start:a,end:a},newText:e}]);let o=this.#e.lineCount-1,s=[];for(let e=i;e<=o;e++){let{tokens:a}=this.#e.getLineTokens(e);for(let e of a)e.offset+=this.stableOffset;e<o?(n(t,a),this.pushLineBreak(t,this.#e.getLineLength(e),r[e-i][0])):s=a}let c=this.#e.getLineLength(o);if(o>this.#t){let e=this.#e.getText(),{lineChanges:t}=this.#e.applyEdits([{range:{start:h,end:{line:o-1,character:0}},newText:``}]);if(t.every(e=>e.newEndLine<=1))this.#t=m;else{let t=this.#e.getText().length;this.#e.applyEdits([{range:{start:h,end:h},newText:e.slice(0,e.length-t)}]),this.#t=o*2}}return{unstable:s,tailLength:c}}clone(){this.assertActive();let t=new e(this.options);return t.#e.reset(this.#e.getText()),this.copyStateTo(t),t}resetSource(){this.#e.reset(``),this.#t=m}releaseSource(){this.#e.dispose()}},_=class extends a{usedThemes=new Map;attachedLanguages=new Set;constructor(){super(`highlights`,r(`highlights`))}getTheme(e){this.assertNotDisposed();let t=this.themeResolver.getResolvedTheme(e)??this.usedThemes.get(e);if(t==null)throw Error(`Theme "${e}" has not been resolved`);return this.usedThemes.set(e,t),t}codeToTokens(e,t){return this.assertNotDisposed(),l(e,this.resolveOptions(t))}createEditorTokenizer(e){return this.assertNotDisposed(),new o(new p(e,e=>this.resolveOptions(e)),e)}createStreamTokenizer(e){return new g(this.resolveOptions(e))}async loadLanguages(e){this.assertNotDisposed(),this.attachLanguages(await i(e.filter(e=>!this.attachedLanguages.has(e))))}hasLoadedLanguages(e){return!this.disposed&&e.every(e=>this.attachedLanguages.has(e)||!t.has(e))}attachLanguages(e){this.assertNotDisposed();let t=[],n=[];for(let{name:r,highlights:i}of e){if(i==null||this.attachedLanguages.has(r))continue;let e=Object.keys(i.aliases).map(e=>e.toLowerCase());if(!e.includes(r.toLowerCase()))throw Error(`HighlightsHighlighter.attachLanguages: The Highlights lexer "${i.name}" does not declare "${r}" as an alias.`);let a=e.find(e=>[`plain`,`plaintext`,`text`,`txt`].includes(e));if(a!==void 0)throw Error(`HighlightsHighlighter.attachLanguages: The Highlights lexer "${i.name}" declares the reserved alias "${a}".`);t.push(r),n.push(i)}if(n.length!==0){d(n);for(let e of t)this.attachedLanguages.add(e)}}releaseResources(){this.usedThemes.clear(),this.attachedLanguages.clear()}resolveOptions({theme:e,themes:t,...n}){let r=this.attachedLanguages.has(n.lang)||u(n.lang)?n.lang:`text`;if(e!=null)return{...n,lang:r,theme:this.getZedTheme(e)};if(t==null)throw Error(`A theme or themes option is required`);let i={};for(let[e,n]of Object.entries(t))i[e]=this.getZedTheme(n);return{...n,lang:r,themes:i}}getZedTheme(e){let t=this.getTheme(e);if(t.zed==null)throw Error(`Theme "${e}" does not support Highlights`);return t.zed}};export{_ as HighlightsHighlighter};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-BLXQ4ufn.js";import{An as t,C as n,Cr as r,K as i,Sr as a,St as o,T as s,_t as c,br as l,bt as u,ft as d,kn as f,lt as p,m,p as h,pt as g,st as _,xr as v,yn as y}from"./index-DsrXp1aY.js";import{n as b,t as x}from"./inbox-D8-BBgQT.js";var S=e(r(),1),C=a(),w=`https://dev.azure.com/contoso/Payments/_git/payments-api/pullrequest/1234`;function T({onOpen:e}){let r=f(),i=g(p()),a=d(i.data?.id),o=t(_()).data?.organizations??[],s=o.length>0;return(0,C.jsx)(n,{sidebarLabel:r.inbox.label,sidebar:(0,C.jsx)(x,{organizations:o.map(({name:e,project:t})=>({name:e,project:t})),linkOrganizations:!0}),topBar:(0,C.jsx)(E,{title:r.inbox.label}),children:(0,C.jsxs)(D,{title:s?r.home.selectTitle:r.home.openTitle,text:s?r.home.selectText(m):r.home.openText,children:[(0,C.jsx)(O,{onOpen:e}),a.data!==void 0&&a.data.length>0&&(0,C.jsxs)(`section`,{"aria-labelledby":`organizations-heading`,className:`space-y-2 pt-2`,children:[(0,C.jsx)(`h2`,{id:`organizations-heading`,className:`text-xs font-medium text-muted`,children:r.home.organizations}),(0,C.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,children:a.data.map(e=>(0,C.jsx)(`li`,{children:(0,C.jsx)(l,{to:`/$organization`,params:{organization:e},className:`flex h-7 items-center rounded-[7px] border border-border bg-surface px-2.5 text-[13px] text-fg hover:border-border-strong hover:bg-hover`,children:e})},e))})]}),i.isError&&c(i.error)&&(0,C.jsx)(b,{variant:`inline`,error:i.error,organization:null,onRetry:()=>void i.refetch()})]})})}function E({title:e}){return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{children:(0,C.jsx)(`span`,{className:`truncate font-medium text-fg`,children:e})}),(0,C.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:(0,C.jsx)(h,{})})]})}function D({title:e,text:t,children:n,aside:r}){return(0,C.jsx)(`div`,{className:`azd-scrollbar min-h-0 flex-1 overflow-auto`,children:(0,C.jsxs)(`div`,{className:`mx-auto w-full max-w-[34rem] space-y-5 px-6 pt-[16vh] pb-16`,children:[(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(`span`,{className:`flex size-10 items-center justify-center rounded-[10px] border border-border bg-surface text-muted`,children:(0,C.jsx)(i,{className:`size-5`})}),r,(0,C.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight text-fg-strong`,children:e}),(0,C.jsx)(`p`,{className:`text-[14px] text-muted`,children:t})]}),n]})})}function O({onOpen:e}){let t=f(),n=v(),[r,i]=(0,S.useState)(``),[a,s]=(0,S.useState)(!1),c=(0,S.useId)(),l=(0,S.useId)(),d=e??(e=>{let t=u(e);return t!==null&&(n({href:o(t)}),!0)});return(0,C.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),s(!d(r))},className:`space-y-1.5`,noValidate:!0,children:[(0,C.jsx)(`label`,{htmlFor:c,className:`block text-xs font-medium text-muted`,children:t.home.urlForm.label}),(0,C.jsxs)(`div`,{className:`flex gap-2`,children:[(0,C.jsx)(`input`,{id:c,type:`url`,value:r,onChange:e=>{i(e.target.value),s(!1)},placeholder:w,"aria-invalid":a,"aria-describedby":a?l:void 0,autoComplete:`off`,spellCheck:!1,className:`h-9 min-w-0 flex-1 rounded-[8px] border border-border bg-surface px-3 font-mono text-xs text-fg placeholder:text-muted hover:border-border-strong focus:border-[var(--azd-focus)] focus:outline-none aria-[invalid=true]:border-danger`}),(0,C.jsx)(`button`,{type:`submit`,className:`${y} h-9`,children:t.home.urlForm.open})]}),a&&(0,C.jsx)(`p`,{id:l,className:`text-xs text-danger`,children:t.home.urlForm.invalid(w)})]})}export{O as i,T as n,E as r,D as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-BLXQ4ufn.js";import{$ as t,An as n,Cn as r,Cr as i,D as a,Dn as o,E as s,En as c,Sn as l,Sr as u,U as d,_ as f,_t as p,b as m,br as ee,ct as te,dt as h,et as g,fn as _,g as v,gt as y,h as b,kn as x,ot as ne,pt as S,v as C,xn as w,xr as T,y as E}from"./index-DsrXp1aY.js";var D=e(i(),1),O=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]];function re(e,t=Date.now()){if(e===null)return``;let n=Date.parse(e);if(Number.isNaN(n))return``;let r=Math.round((n-t)/1e3);for(let[e,t]of O)if(Math.abs(r)>=t)return c().format(Math.round(r/t),e);return o().time.justNow}function k(e){if(e===null)return``;let t=Date.parse(e);return Number.isNaN(t)?``:r(t)}var ie=[[`years`,31536e3],[`months`,2592e3],[`weeks`,604800],[`days`,86400],[`hours`,3600],[`minutes`,60]];function A(e,t=Date.now()){if(e===null)return``;let n=Date.parse(e);if(Number.isNaN(n))return``;let r=o().time.short,i=Math.max(0,Math.round((t-n)/1e3));for(let[e,t]of ie)if(i>=t)return r[e](Math.floor(i/t));return r.now}var j=u();function ae({title:e,testId:t,aside:n,children:r}){let i=`rail-${t}`;return(0,j.jsxs)(`section`,{"aria-labelledby":i,"data-testid":t,children:[(0,j.jsxs)(`div`,{className:`mb-2.5 flex items-baseline gap-2`,children:[(0,j.jsx)(`h2`,{id:i,className:`text-[13px] font-medium text-muted`,children:e}),n!==void 0&&(0,j.jsx)(`span`,{className:`ml-auto text-xs tabular-nums text-muted`,children:n})]}),r]})}function M({label:e,lines:t=3}){return(0,j.jsx)(`div`,{role:`status`,"aria-busy":`true`,"aria-label":e,className:`space-y-2 py-0.5`,children:Array.from({length:t},(e,t)=>(0,j.jsx)(`div`,{className:`azd-pulse h-2.5 rounded-full bg-raised`,style:{width:`${[78,62,70,54][t%4]}%`}},t))})}function N(e){let t=o().overview.parts;return p(e)?t.notSignedIn:e instanceof Error&&e.message.length>0?e.message:t.unexpectedResponse}function P({what:e,error:t,onRetry:n}){let r=x();return(0,j.jsxs)(`div`,{role:`alert`,className:`space-y-1.5 text-[13px]`,children:[(0,j.jsxs)(`p`,{className:`text-fg`,children:[(0,j.jsx)(U,{className:`mr-1 inline size-3.5 align-[-2px] text-danger`}),e]}),(0,j.jsx)(`p`,{className:`break-words text-xs text-muted`,children:N(t)}),(0,j.jsx)(`button`,{type:`button`,onClick:n,className:w,children:r.overview.parts.tryAgain})]})}function F({children:e}){return(0,j.jsx)(`p`,{className:`text-[13px] text-muted`,children:e})}function I({className:e=`size-3.5`,children:t}){return(0,j.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,className:`shrink-0 ${e}`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,children:t})}function L(e){return(0,j.jsx)(I,{...e,children:(0,j.jsx)(`path`,{d:`M3.5 8.5l3 3 6-7`})})}function R(e){return(0,j.jsx)(I,{...e,children:(0,j.jsx)(`path`,{d:`M4.5 4.5l7 7M11.5 4.5l-7 7`})})}function z(e){return(0,j.jsxs)(I,{...e,children:[(0,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,j.jsx)(`path`,{d:`M8 5v3.2l2 1.3`})]})}function B(e){return(0,j.jsxs)(I,{...e,children:[(0,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,j.jsx)(`path`,{d:`M8 2.5a5.5 5.5 0 0 1 0 11z`,fill:`currentColor`,stroke:`none`})]})}function V(e){return(0,j.jsx)(I,{...e,children:(0,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`,strokeDasharray:`2 2`})})}function H(e){return(0,j.jsxs)(I,{...e,children:[(0,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,j.jsx)(`path`,{d:`M4.2 11.8l7.6-7.6`})]})}function U(e){return(0,j.jsxs)(I,{...e,children:[(0,j.jsx)(`path`,{d:`M8 2.5l6 11H2z`}),(0,j.jsx)(`path`,{d:`M8 6.5v3M8 11.5v.01`})]})}function W(e){return(0,j.jsxs)(I,{...e,children:[(0,j.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.2`}),(0,j.jsx)(`circle`,{cx:`11`,cy:`6.5`,r:`1.8`}),(0,j.jsx)(`path`,{d:`M2.5 13c0-2 1.6-3.5 3.5-3.5s3.5 1.5 3.5 3.5M10 9.6c1.9 0 3.5 1.4 3.5 3.4`})]})}function G(e){return(0,j.jsx)(I,{...e,children:(0,j.jsx)(`path`,{d:`M9.5 3.5h3v3M12.5 3.5L7.5 8.5M11 9.5v3h-7.5v-7.5h3`})})}function K({command:e}){let t=x(),[n,r]=(0,D.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(e),r(!0),window.setTimeout(()=>r(!1),1500)}catch{r(!1)}};return(0,j.jsxs)(`div`,{className:`flex items-stretch gap-2`,children:[(0,j.jsx)(`code`,{className:`block flex-1 select-all overflow-x-auto whitespace-pre rounded-[7px] border border-border bg-raised px-3 py-2 font-mono text-xs text-fg`,children:e}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>void i(),className:`shrink-0 rounded-[7px] border border-border bg-raised px-3 text-xs font-medium text-fg hover:border-border-strong hover:bg-hover`,children:n?t.session.copied:t.session.copy})]})}function q({onRetry:e}){let t=x();return(0,j.jsx)(`button`,{type:`button`,onClick:e,className:`inline-flex h-8 items-center rounded-[7px] border border-border bg-raised px-3 text-[13px] font-medium text-fg hover:border-border-strong hover:bg-hover`,children:t.session.tryAgain})}function J({variant:e=`page`,...t}){return(0,j.jsx)(Y.Provider,{value:e,children:(0,j.jsx)(oe,{...t})})}var Y=(0,D.createContext)(`page`);function oe({error:e,organization:t,onRetry:n}){let r=x(),i=r.session.problems;if(p(e))switch(e.kind){case`no-launch-key`:case`launch-key-refused`:return(0,j.jsxs)(Z,{title:i.noLaunchKey.title,onRetry:n,children:[(0,j.jsx)(`p`,{children:i.noLaunchKey.text}),(0,j.jsx)(K,{command:`npx azdiffs`})]});case`az-not-logged-in`:return(0,j.jsxs)(Z,{title:i.azNotLoggedIn.title,onRetry:n,children:[(0,j.jsx)(`p`,{children:i.azNotLoggedIn.text}),(0,j.jsx)(K,{command:`az login`})]});case`az-not-installed`:return(0,j.jsxs)(Z,{title:i.azNotInstalled.title,onRetry:n,children:[(0,j.jsx)(`p`,{children:i.azNotInstalled.text}),(0,j.jsx)(K,{command:`az login`})]});case`az-failed`:return(0,j.jsx)(Z,{title:i.azFailed.title,onRetry:n,children:(0,j.jsx)(`p`,{children:i.azFailed.text})});case`server-unreachable`:return(0,j.jsxs)(Z,{title:i.serverUnreachable.title,onRetry:n,children:[(0,j.jsx)(`p`,{children:i.serverUnreachable.text}),(0,j.jsx)(K,{command:`npx azdiffs`})]});case`invalid-organization`:return(0,j.jsx)(Z,{title:i.invalidOrganization.title,onRetry:n,children:(0,j.jsx)(`p`,{children:i.invalidOrganization.text})});case`pat-missing`:return(0,j.jsxs)(Z,{title:i.patMissing.title,onRetry:n,children:[(0,j.jsx)(`p`,{children:i.patMissing.text(t)}),(0,j.jsx)(K,{command:X(t)})]});case`account-unavailable`:return null}return t!==null&&_(e,`unauthorized`)?y(t)===`pat`?(0,j.jsx)(se,{organization:t,onRetry:n}):(0,j.jsx)(ce,{organization:t,onRetry:n}):(0,j.jsx)(Z,{title:i.unreachable.title,onRetry:n,children:(0,j.jsx)(`p`,{className:`font-mono text-xs text-danger`,children:e instanceof Error?e.message:r.session.unknownError})})}function X(e){return e===null?`npx azdiffs setup`:`npx azdiffs setup --org ${e}`}function se({organization:e,onRetry:t}){let n=x();return(0,j.jsxs)(Z,{title:n.session.problems.tokenRefused.title(e),onRetry:t,children:[(0,j.jsx)(`p`,{children:n.session.problems.tokenRefused.text}),(0,j.jsx)(K,{command:X(e)})]})}function ce({organization:e,onRetry:t}){let n=x(),r=S().data?.displayName;return(0,j.jsxs)(Z,{title:n.session.problems.organizationRefused.title(e),onRetry:t,children:[(0,j.jsx)(`p`,{children:n.session.problems.organizationRefused.text(r,e)}),(0,j.jsx)(K,{command:`npx azdiffs --tenant <tenant>`})]})}function Z({title:e,onRetry:t,children:n}){let r=(0,D.useContext)(Y),i=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{role:`alert`,className:`space-y-3`,children:n}),(0,j.jsx)(q,{onRetry:t})]});return r===`page`?(0,j.jsx)(s,{title:e,children:i}):(0,j.jsxs)(`section`,{className:`space-y-3 rounded-[10px] border border-border bg-surface p-4 text-[13px] text-muted`,children:[(0,j.jsx)(`h2`,{className:`text-[14px] font-semibold text-fg-strong`,children:e}),i]})}function le({href:e,className:t,children:n,...r}){let i=T();return(0,j.jsx)(`a`,{href:e,onClick:t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),i({href:e}))},className:t,...r,children:n})}var Q=`to-review`;function $({organizations:e,linkOrganizations:t,current:n=null,quietProblems:r=!1}){let i=x();return(0,j.jsx)(a,{children:e.length>0?(0,j.jsx)(ue,{organizations:e,linkOrganizations:t,current:n,quietProblems:r}):(0,j.jsx)(`p`,{className:`px-4 py-2 text-[13px] leading-relaxed text-muted`,children:i.inbox.noOrganizations})})}function ue({organizations:e,linkOrganizations:t,current:n,quietProblems:r}){let i=x(),[a,o]=(0,D.useState)(``),[s,c]=(0,D.useState)(Q),u=e=>{Q=e,c(e)},d=(0,D.useId)();return(0,j.jsxs)(`section`,{"aria-label":i.inbox.label,className:`flex min-h-0 flex-1 flex-col`,"data-testid":`inbox`,children:[(0,j.jsxs)(`div`,{className:`shrink-0 space-y-2 px-3 pb-2`,children:[(0,j.jsxs)(`div`,{className:`relative`,children:[(0,j.jsx)(`label`,{htmlFor:d,className:`sr-only`,children:i.inbox.search}),(0,j.jsx)(g,{className:`pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted`}),(0,j.jsx)(`input`,{id:d,type:`search`,value:a,onChange:e=>o(e.target.value),placeholder:i.inbox.search,autoComplete:`off`,spellCheck:!1,className:`h-8 w-full rounded-[7px] border border-border bg-surface pr-2 pl-8 text-[13px] text-fg placeholder:text-muted hover:border-border-strong focus:border-[var(--azd-focus)] focus:outline-none`})]}),(0,j.jsx)(l,{label:i.inbox.tabsLabel,value:s,onChange:u,choices:[{value:`created`,label:i.inbox.tabs.created,testId:`inbox-tab-created`},{value:`to-review`,label:i.inbox.tabs.toReview,testId:`inbox-tab-to-review`}],size:`lg`,stretch:!0})]}),(0,j.jsx)(`div`,{className:`azd-scrollbar min-h-0 flex-1 space-y-3 overflow-y-auto px-2 pb-3`,children:e.map(e=>(0,j.jsx)(de,{organization:e,query:a,tab:s,linkName:t,current:n,quietProblems:r},e.name))})]})}function de({organization:e,query:t,tab:r,linkName:i,current:a,quietProblems:o}){let s=x(),[c,l]=(0,D.useState)(e.project),u=h(e.name),d=u.data?.id,p=n({...te(e.name,c,d??``),enabled:d!==void 0}),m=n({...ne(e.name,c,d??``),enabled:d!==void 0}),g=(0,D.useId)(),_=(0,D.useId)(),y=(0,D.useMemo)(()=>({"to-review":v(f(e.name,p.data?.items??[]),t),created:v(b(e.name,m.data?.items??[]),t)}),[e.name,p.data,m.data,t]),S=p.data?.capped===!0||m.data?.capped===!0,C=new Set([...p.data?.failedProjects??[],...m.data?.failedProjects??[]]),w={query:r===`to-review`?p:m,rows:y[r],pendingUser:u.isPending},T=w.query.data===void 0?null:w.rows.length;return(0,j.jsxs)(`section`,{"aria-labelledby":g,"data-testid":`inbox-organization`,"data-organization":e.name,children:[(0,j.jsxs)(`header`,{className:`flex min-w-0 items-center gap-1.5 px-2 pt-1 pb-1 text-xs`,children:[(0,j.jsx)(`h2`,{id:g,className:`min-w-0 truncate font-medium text-muted`,children:i?(0,j.jsx)(ee,{to:`/$organization`,params:{organization:e.name},className:`hover:text-fg hover:underline`,children:e.name}):e.name}),T!==null&&(0,j.jsx)(`span`,{className:`tabular-nums text-muted`,"data-testid":`inbox-count`,children:T}),e.project===null?null:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`label`,{htmlFor:_,className:`sr-only`,children:s.inbox.projectIn(e.name)}),(0,j.jsxs)(`select`,{id:_,value:c??``,onChange:e=>l(e.target.value===``?null:e.target.value),className:`ml-auto h-6 max-w-[9rem] min-w-0 truncate rounded-md border border-transparent bg-transparent px-1 text-xs text-muted hover:border-border hover:text-fg focus:border-[var(--azd-focus)] focus:outline-none`,children:[(0,j.jsx)(`option`,{value:e.project,children:e.project}),(0,j.jsx)(`option`,{value:``,children:s.inbox.allProjects})]})]})]}),(S||C.size>0)&&(0,j.jsxs)(`p`,{className:`px-2 pb-1 text-xs text-muted`,children:[S&&(0,j.jsx)(`span`,{"data-testid":`inbox-capped`,children:s.inbox.capped}),S&&C.size>0&&` · `,C.size>0&&(0,j.jsx)(`span`,{title:[...C].join(`, `),children:s.inbox.failedProjects(C.size)})]}),u.isError&&o?(0,j.jsx)(`p`,{className:`px-2 py-1 text-[13px] text-muted`,children:s.inbox.notSignedIn(e.name)}):u.isError?(0,j.jsx)(`div`,{className:`px-2 py-1`,children:(0,j.jsx)(J,{variant:`inline`,error:u.error,organization:e.name,onRetry:()=>void u.refetch()})}):(0,j.jsx)(`div`,{"data-testid":`inbox-panel-${r}`,children:(0,j.jsx)(fe,{state:w,kind:r,empty:t.trim().length>0?s.inbox.empty.filtered:r===`to-review`?s.inbox.empty.toReview:s.inbox.empty.created,current:a})})]})}function fe({state:e,kind:t,empty:n,current:r}){let i=x();if(e.query.data===void 0&&(e.pendingUser||e.query.isPending))return(0,j.jsx)(`div`,{className:`px-2 py-2`,children:(0,j.jsx)(M,{label:i.inbox.loading,lines:3})});if(e.query.data===void 0){let t=e.query.error;return(0,j.jsx)(`div`,{className:`px-2 py-1`,children:p(t)||_(t,`unauthorized`)?(0,j.jsx)(J,{variant:`inline`,error:t,organization:null,onRetry:()=>void e.query.refetch()}):(0,j.jsx)(P,{what:i.inbox.loadFailed,error:t,onRetry:()=>void e.query.refetch()})})}return e.rows.length===0?(0,j.jsx)(`p`,{className:`px-2 py-2 text-[13px] text-muted`,"data-testid":`inbox-empty`,children:n}):(0,j.jsx)(`ul`,{className:`space-y-px`,children:e.rows.map(e=>(0,j.jsx)(he,{row:e,kind:t,current:r!==null&&r.organization.toLowerCase()===e.organization.toLowerCase()&&r.pullRequestId===e.pullRequest.pullRequestId},`${e.pullRequest.repository.id}/${e.pullRequest.pullRequestId}`))})}var pe={muted:`text-muted`,bad:`text-danger`,good:`text-added`,warn:`text-warning`};function me({pullRequest:e,className:n=`size-4`}){return e.isDraft?(0,j.jsx)(d,{className:`${n} text-muted`}):(0,j.jsx)(t,{className:`${n} text-added`})}function he({row:e,kind:t,current:n}){let r=x(),i=e.pullRequest,a=C(e);return(0,j.jsx)(`li`,{"data-testid":`inbox-row`,"data-id":i.pullRequestId,children:(0,j.jsxs)(le,{href:E(e),...n?{"aria-current":`page`}:{},className:`group flex min-w-0 items-start gap-2 rounded-[7px] px-2 py-1.5 hover:bg-hover aria-[current=page]:bg-[var(--azd-selected)] focus-visible:outline-offset-[-2px]`,children:[(0,j.jsxs)(`span`,{className:`mt-0.5`,children:[(0,j.jsx)(me,{pullRequest:i,className:`size-[15px]`}),(0,j.jsx)(`span`,{className:`sr-only`,children:i.isDraft?r.inbox.state.draft:r.inbox.state.active})]}),(0,j.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,j.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] text-fg group-aria-[current=page]:text-fg-strong`,title:i.title,children:i.title}),(0,j.jsx)(`time`,{dateTime:i.creationDate,title:k(i.creationDate),className:`shrink-0 text-xs tabular-nums text-muted`,children:A(i.creationDate)})]}),(0,j.jsx)(`span`,{className:`flex min-w-0 items-baseline gap-1 text-xs text-muted`,children:(0,j.jsxs)(`span`,{className:`min-w-0 truncate`,children:[i.repository.name,` `,(0,j.jsxs)(`span`,{className:`tabular-nums`,children:[`#`,i.pullRequestId]}),` · `,t===`to-review`?i.author.displayName:m(i)]})}),a.length>0&&(0,j.jsx)(`span`,{className:`mt-0.5 flex flex-wrap gap-x-2 text-xs`,children:a.map(e=>(0,j.jsx)(ge,{badge:e},e.label))})]})]})})}function ge({badge:e}){return(0,j.jsx)(`span`,{className:pe[e.tone],"data-testid":`inbox-badge`,children:e.label})}export{re as _,z as a,G as c,ae as d,B as f,k as g,U as h,V as i,W as l,H as m,J as n,R as o,P as p,L as r,F as s,$ as t,M as u,A as v};