@preventive/triage 1.0.0-alpha.71 → 1.0.0-alpha.73

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 (145) hide show
  1. package/common/bundle-sources.d.ts +2 -0
  2. package/common/bundle-sources.js +19 -2
  3. package/common/finding-duplicates.js +5 -0
  4. package/common/finding-filters.js +45 -4
  5. package/common/line-diff.d.ts +2 -2
  6. package/common/line-diff.js +20 -8
  7. package/common/managed/finding-detail.js +1 -1
  8. package/common/managed/review-view-routes.js +23 -0
  9. package/common/managed/risk-routes.js +30 -0
  10. package/common/managed/routes.js +11 -6
  11. package/common/managed/team-app.d.ts +8 -6
  12. package/common/managed/team-app.js +15 -3
  13. package/common/stasis-files.d.ts +5 -0
  14. package/common/stasis-files.js +20 -0
  15. package/common/stasis-tgz.d.ts +6 -0
  16. package/common/stasis-tgz.js +27 -0
  17. package/common/workspace-app.js +20 -0
  18. package/out/activity.js +2 -4
  19. package/out/{chunk-2F3CYNPZ.js → chunk-2IHCVA3Y.js} +1 -1
  20. package/out/{chunk-HAZKDK4M.js → chunk-2V6Q4ZOZ.js} +1 -1
  21. package/out/{chunk-RRBIJL2B.js → chunk-4IW3VD3H.js} +1 -1
  22. package/out/chunk-4YZOXAXR.js +2 -0
  23. package/out/chunk-5NUDNLJA.js +6 -0
  24. package/out/chunk-5YP7P5KA.js +1 -0
  25. package/out/chunk-6VOB5WXX.js +2 -0
  26. package/out/chunk-74JZTGTO.js +11 -0
  27. package/out/chunk-7YFJUT2P.js +1 -0
  28. package/out/chunk-A4BBBHQU.js +1 -0
  29. package/out/{chunk-4ISO5F7Y.js → chunk-ADMVRLNP.js} +1 -1
  30. package/out/chunk-BIWPZT4E.js +52 -0
  31. package/out/{chunk-HETCVNO4.js → chunk-BLPHP4U3.js} +1 -1
  32. package/out/{chunk-Y5ZHFNBD.js → chunk-BXQCCW7F.js} +1 -1
  33. package/out/{chunk-JFL7WLRV.js → chunk-CU3FPB3P.js} +1 -1
  34. package/out/chunk-CXVBTUK3.js +4 -0
  35. package/out/{chunk-M37X4LCF.js → chunk-EXQQ5VQJ.js} +1 -1
  36. package/out/{chunk-NXATZJQ2.js → chunk-GSNSP3EF.js} +1 -1
  37. package/out/chunk-GV5U7OLP.js +40 -0
  38. package/out/{chunk-JOXLZXMI.js → chunk-GX5UXWT4.js} +1 -1
  39. package/out/{chunk-YF4M5OCI.js → chunk-I6UQQKAH.js} +1 -1
  40. package/out/{chunk-UCP3JRE2.js → chunk-LVW7WWV4.js} +1 -1
  41. package/out/chunk-NEFCZAIY.js +11 -0
  42. package/out/{chunk-TOXMUOIW.js → chunk-OQS2USZM.js} +1 -1
  43. package/out/chunk-PQPKHAI5.js +15 -0
  44. package/out/chunk-PX5DLFSD.js +1 -0
  45. package/out/chunk-QBFT2DDR.js +1 -0
  46. package/out/{chunk-GZ46SSTF.js → chunk-RGNF4OH6.js} +1 -1
  47. package/out/chunk-RLLA4GHZ.js +1 -0
  48. package/out/chunk-ROHACH7V.js +3 -0
  49. package/out/chunk-ROWUGPID.js +1 -0
  50. package/out/{chunk-QMVOEBWC.js → chunk-S2ZIKK45.js} +1 -1
  51. package/out/chunk-SSPDMA6D.js +1 -0
  52. package/out/chunk-TD7RVUTT.js +2 -0
  53. package/out/{chunk-4XIH7YTX.js → chunk-UH6NZBSU.js} +1 -1
  54. package/out/{chunk-M3Y6SLC4.js → chunk-UJP4PQJA.js} +1 -1
  55. package/out/{chunk-PAD2JHZT.js → chunk-UJSJMXEG.js} +1 -1
  56. package/out/{chunk-E3LFSUDJ.js → chunk-VYYUMYVW.js} +1 -1
  57. package/out/{chunk-VRX2APNA.js → chunk-XVKDPU4D.js} +1 -1
  58. package/out/chunk-Y2XGV3RC.js +8 -0
  59. package/out/chunk-YCEMQETS.js +255 -0
  60. package/out/client-managed-import.js +3 -3
  61. package/out/client-managed.js +30 -27
  62. package/out/compare.js +16 -25
  63. package/out/dialogs.js +38 -38
  64. package/out/graph.js +14 -14
  65. package/out/index.html +32 -52
  66. package/out/scan.js +2 -2
  67. package/out/terminal.js +239 -240
  68. package/out/view.css +1 -1
  69. package/out/view.js +15 -15
  70. package/package.json +21 -13
  71. package/risk/actions/resolve.js +56 -19
  72. package/risk/actions/uses.js +27 -9
  73. package/risk/actions/workflow.js +75 -2
  74. package/risk/files/characters.js +11 -0
  75. package/risk/files/hosts.js +4 -4
  76. package/risk/files/readability.js +5 -2
  77. package/risk/files/runs-code.js +12 -25
  78. package/risk/files/script.js +141 -19
  79. package/risk/files/source-map-link.js +43 -0
  80. package/risk/index.d.ts +24 -7
  81. package/risk/index.js +1 -0
  82. package/risk/npm/assess.js +1 -1
  83. package/risk/npm/compare.js +9 -30
  84. package/risk/npm/diff.js +1 -1
  85. package/risk/npm/held.js +6 -2
  86. package/risk/npm/registry.js +5 -2
  87. package/risk/npm/tarball.js +79 -22
  88. package/server-managed/bundle-advisories.ts +12 -36
  89. package/server-managed/bundle-build-worker.js +29 -11
  90. package/server-managed/bundle-build.ts +4 -3
  91. package/server-managed/bundle-cache.ts +53 -13
  92. package/server-managed/bundle.ts +45 -13
  93. package/server-managed/comparison.ts +3 -3
  94. package/server-managed/db-methods.ts +54 -17
  95. package/server-managed/db-neon.ts +9 -2
  96. package/server-managed/db-schema.ts +12 -2
  97. package/server-managed/db.ts +4 -1
  98. package/server-managed/dependency-reviews.ts +8 -5
  99. package/server-managed/github-errors.ts +22 -0
  100. package/server-managed/github-requests.ts +4 -2
  101. package/server-managed/http.ts +336 -76
  102. package/server-managed/management.ts +10 -4
  103. package/server-managed/npm-delta.ts +17 -2
  104. package/server-managed/npm-kept.ts +6 -0
  105. package/server-managed/npm-packages.ts +30 -29
  106. package/server-managed/npm-patch.ts +9 -9
  107. package/server-managed/package-entry-points.ts +54 -6
  108. package/server-managed/pull-dependencies.ts +4 -1
  109. package/server-managed/rename-diff-worker.js +11 -7
  110. package/server-managed/rename-diff.ts +5 -4
  111. package/server-managed/report-opening.ts +77 -0
  112. package/server-managed/report-sources.ts +2 -1
  113. package/server-managed/repository-aliases.ts +34 -0
  114. package/server-managed/repository-browser.ts +87 -32
  115. package/server-managed/repository-code.ts +6 -3
  116. package/server-managed/repository-dependency-reviews.ts +21 -0
  117. package/server-managed/repository-issues.ts +15 -9
  118. package/server-managed/repository-risk-read.ts +50 -4
  119. package/server-managed/repository-risk.ts +9 -2
  120. package/server-managed/stasis-config.ts +97 -5
  121. package/server-managed/stasis-dependencies.ts +7 -4
  122. package/server-managed/team-reports.ts +5 -3
  123. package/server-managed/type-only-proof.js +26 -4
  124. package/server-managed/upstream-cache.ts +18 -12
  125. package/server-managed/workspace-shares.ts +4 -4
  126. package/out/chunk-2HGKTQ5Q.js +0 -52
  127. package/out/chunk-45HTR22K.js +0 -4
  128. package/out/chunk-4RS3NDOG.js +0 -1
  129. package/out/chunk-7GJNLCXF.js +0 -15
  130. package/out/chunk-CGRIZ5M5.js +0 -1
  131. package/out/chunk-CQIT5UNK.js +0 -1
  132. package/out/chunk-D6NVKGGG.js +0 -10
  133. package/out/chunk-DTAR2BB6.js +0 -247
  134. package/out/chunk-MPXVKVPF.js +0 -3
  135. package/out/chunk-NB4JBTKK.js +0 -2
  136. package/out/chunk-QPGM3DTI.js +0 -42
  137. package/out/chunk-VFWMQ3LG.js +0 -2
  138. package/out/chunk-VG5RH6KN.js +0 -2
  139. package/out/chunk-WFDXHPT2.js +0 -12
  140. package/out/chunk-WMFDQS2L.js +0 -11
  141. package/out/chunk-WREU7JAG.js +0 -1
  142. /package/out/{chunk-JMG5DXII.js → chunk-7HP2VYIC.js} +0 -0
  143. /package/out/{chunk-HOB3YPS5.js → chunk-K4XJHM2T.js} +0 -0
  144. /package/out/{chunk-4EMM6UCD.js → chunk-QI66YA4F.js} +0 -0
  145. /package/out/{chunk-G3LY2FV4.js → chunk-WCDYSIKG.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-GO7FT4OD.js";import{c as t,d as n,e as r,h as i,i as a,j as o,m as s,n as c,o as l,p as u}from"./chunk-NB4JBTKK.js";import{a as d}from"./chunk-7GJNLCXF.js";import"./chunk-PXK7EU4V.js";import{a as f,c as p}from"./chunk-JCIIBLKR.js";import{m,q as h,s as g,w as _}from"./chunk-WFDXHPT2.js";import{b as v}from"./chunk-IYPY47MC.js";import"./chunk-QRKFPLA4.js";import"./chunk-TUII34K2.js";import"./chunk-OOJM4CTU.js";function y(e){if(e instanceof Uint8Array)return{proven:!1,reason:`unsupported`,at:null};if(typeof e!=`string`)throw TypeError(`a text must be a string or its UTF-8 bytes, not ${typeof e}`);if(!e.isWellFormed())throw TypeError(`a text must be a well-formed string`);return{proven:!1,reason:`unsupported`,at:null}}var b=e=>e.subarray(0,8e3).includes(0),x=(e,t)=>(e+Math.imul(t,97)>>>0)%107927,S=e=>Uint8Array.from({length:256},(t,n)=>Number(n===10||e.includes(String.fromCodePoint(n)))),C=S(``),w=S(`,;={}`);function T(e,t=C){let n=!b(e),r=new Map,i=(e,t)=>r.set(e,(r.get(e)??0)+t),a=0,o=0,s=0;for(let r=0;r<e.length;r++){let c=e[r];if(n&&c===13&&e[r+1]===10)continue;let l=a;a=(a<<7^o>>>25)+c>>>0,o=(o<<7^l>>>25)>>>0,!(++s<64&&t[c]===0)&&(i(x(a,o),s),s=0,a=0,o=0)}s>0&&i(x(a,o),s);let c=Uint32Array.from(r.keys()).sort();return{hashes:c,bytes:Float64Array.from(c,e=>r.get(e)),total:r.values().reduce((e,t)=>e+t,0)}}function E(e,t){let n=0;for(let r=0,i=0;r<e.hashes.length&&i<t.hashes.length;)e.hashes[r]<t.hashes[i]?r++:e.hashes[r]>t.hashes[i]?i++:n+=Math.min(e.bytes[r++],t.bytes[i++]);return n}function D(e,t,n){let r=0,i=e.total,a=t.total;for(let o=0,s=0;o<e.hashes.length&&s<t.hashes.length;)if(e.hashes[o]<t.hashes[s]?i-=e.bytes[o++]:(e.hashes[o]>t.hashes[s]||(r+=Math.min(e.bytes[o],t.bytes[s]),i-=e.bytes[o++]),a-=t.bytes[s++]),(r+Math.min(i,a))*6e4<n)return 0;return r}function O(e,t,n,r,i=!1){if(e===null||t===null||t.length===0)return 0;let a=Math.abs(e.length-t.length),o=Math.max(e.length,t.length);if(o*(6e4-n)<a*6e4)return 0;let s=r(e),c=r(t),l=i?D(s,c,n*o):E(s,c);return Math.trunc(l*6e4/o)}var k=/^[\w-]{6,}$/u,A=/[\dA-Z]/u,ee=/^(?:\.[\w-]+)+$/u,te=/^[\w-]{8,32}$/u;function j(e){let t=[];for(let n=e.length-1;n>0;n--){if(e[n]!==`-`&&e[n]!==`.`)continue;let r=e.indexOf(`.`,n+1),i=e.slice(r),a=e.slice(n+1,r);r!==-1&&te.test(a)&&ee.test(i)&&/[A-Za-z]/u.test(a)&&A.test(a)&&t.push([e.slice(0,n),a,i])}return t}var M=e=>e.replaceAll(/\d/gu,`0`).replaceAll(/[a-z]/gu,`a`).replaceAll(/[A-Z]/gu,`A`);function ne(e,t){let n=j(t);for(let[t,r,i]of j(e)){let e=n.find(e=>e[2]===i);if(e&&e[1]!==r)return e[0]===t&&M(e[1])!==M(r)}return!1}function re(e){let t=e.lastIndexOf(`/`),n=e.slice(t+1),r=n.lastIndexOf(`.`),i=r>0?n.slice(r):``;return{name:n,key:`${e.slice(0,t+1)}\0${i}\0${n.length}`}}function ie(e,t){let n=e.length,r=0;for(;r<e.length&&e[r]===t[r];)r++;for(;n>r&&e[n-1]===t[n-1];)n--;for(;r>0&&!`-._`.includes(e[r-1]);)r--;for(;n<e.length&&e[n]!==`.`;)n++;let i=e.slice(r,n),a=t.slice(r,n);return r>0&&k.test(i)&&k.test(a)&&(A.test(i)||A.test(a))}function ae({sources:e,dests:t,pairs:n,used:r,record:i,punctuatedScoreOf:a},{remaining:o,open:s},c,l){let u=(e,t)=>new Map(t.filter(t=>e[t].type===`file`).map(t=>[t,re(e[t].path)])),d=u(t,s),f=u(e,o),p=Map.groupBy(f.keys(),e=>f.get(e).key),m=Map.groupBy(d.keys(),e=>d.get(e).key),h=[];for(let[e,t]of m){let n=p.get(e)??[];for(let e of t)for(let t of n)ie(f.get(t).name,d.get(e).name)&&h.push({s:t,d:e})}let g=Map.groupBy(h,({d:e})=>e),_=Map.groupBy(h,({s:e})=>e),v=[];for(let{s:e,d:t}of h){let n=_.get(e).length===1&&g.get(t).length===1&&ne(f.get(e).name,d.get(t).name),r=a(e,t,n?0:c);(n||r>=c)&&v.push({s:e,d:t,score:r})}let y=[],b=new Set,x=new Set;for(let e of v.sort((e,t)=>t.score-e.score))n.has(e.d)||r.has(e.s)||(x.has(e.s)||b.has(e.d)||l(e)?(y.push(e),x.add(e.s),b.add(e.d)):i(e.d,e.s,e.score));return y}function oe(e,t){let n=e.length;if(n!==t.length)return!1;let r=0;if(n>=32&&(e.byteOffset&3)==(t.byteOffset&3)){for(let n=4-(e.byteOffset&3)&3;r<n;r++)if(e[r]!==t[r])return!1;let i=n-r>>>2,a=new Int32Array(e.buffer,e.byteOffset+r,i),o=new Int32Array(t.buffer,t.byteOffset+r,i);for(let e=0;e<i;e++)if(a[e]!==o[e])return!1;r+=i*4}for(;r<n;r++)if(e[r]!==t[r])return!1;return!0}var N=class extends Error{constructor(e,t,n){let r=n===void 0?``:` in the ${n} tree`;super(t===void 0?e:`${e}: ${JSON.stringify(t)}${r}`),this.name=`CompareError`,this.path=t,this.tree=n}},se=new Set([`file`,`contiguous-file`]),ce=new Set([`fifo`,`character-device`,`block-device`]),le=/(?:^|\/)\.{0,2}(?:\/|$)/u;function ue(e){if(!Number.isInteger(e)||e<0||e>4095)throw RangeError(`a mode must be an integer from 0 to 0o7777, not ${e}`)}function de(e,t,n,r){if(typeof e!=`string`)throw TypeError(`an entry's name must be a string, not ${typeof e}`);if(e!==`.`||t!==`directory`){if(r?e===``:le.test(e))throw new N(r?`a name must not be empty`:"a name must be a relative path with no empty, `.` or `..` segment",e,n);if(!e.isWellFormed())throw new N(`a name must be well-formed Unicode`,e,n)}}function fe(e,t,n){if(typeof e!=`string`||e===``)throw new N(`a link must name its target`,t,n);if(!e.isWellFormed())throw new N(`a link target must be well-formed Unicode`,t,n);return e}function pe(e){if(e===void 0)return new Uint8Array;if(e instanceof Uint8Array)return e;if(typeof e!=`string`)throw TypeError(`a file's data must be a string or a Uint8Array, not ${typeof e}`);if(!e.isWellFormed())throw TypeError(`a file's text must be well-formed Unicode`);return e}var P=e=>typeof e==`string`?d(e):e;function me(e,t,n){if(typeof e!=`object`||!e)throw TypeError(`an entry must be an object, not ${e===null?`null`:typeof e}`);let{name:r,type:i=`file`,mode:a,linkname:o,data:s}=e;if(de(r,i,t,n),a!==void 0&&ue(a),se.has(i))return{path:r,type:`file`,mode:a??420,data:pe(s)};if(i===`symlink`||i===`hardlink`)return{path:r,type:i,target:fe(o,r,t)};if(i===`directory`)return{path:r,type:i};throw ce.has(i)?new N(`a ${i} is neither a file nor a link`,r,t):TypeError(`${JSON.stringify(i)} is not an entry type`)}function F(e,t){return e.type===t.type?e.type===`symlink`?e.target===t.target:e.data===t.data?!0:typeof e.data==`string`&&typeof t.data==`string`?!1:oe(P(e.data),P(t.data)):!1}function he(e,t,n){let r=new Set([e.path]),i=t.get(e.target);for(;i?.type===`hardlink`;){if(r.has(i.path))throw new N(`a hard link leads back to itself`,e.path,n);r.add(i.path),i=t.get(i.target)}if(i===void 0||i.type===`directory`)throw new N(`a hard link must name a file or a link in the tree`,e.path,n);return{...i,path:e.path}}function I(e,t,n){let r=new Map;for(let i of e){let e=me(i,t,n);if(e.type!==`directory`||e.path!==`.`){if(r.has(e.path))throw new N(`a name is given twice`,e.path,t);r.set(e.path,e)}}let i=new Map;for(let[e,a]of r){for(let i=n?-1:e.lastIndexOf(`/`);i>0;i=e.lastIndexOf(`/`,i-1)){let n=r.get(e.slice(0,i));if(n!==void 0&&n.type!==`directory`)throw new N(`a path lies under a ${n.type===`symlink`?`link`:`file`}`,e,t)}a.type===`hardlink`?i.set(e,he(a,r,t)):a.type!==`directory`&&i.set(e,a)}return i}var ge=100,_e=4,L=e=>e.slice(e.lastIndexOf(`/`)+1);function R(t,n){if(t.type===`symlink`)return`l${t.target}`;let r=n(t);return`f${r.length}:${e(r)}`}function ve({sources:e,dests:t,sourceNames:n,destNames:r,used:i,record:a,bytes:o}){let s=Map.groupBy(e.keys(),t=>R(e[t],o));for(let c=0;c<t.length;c++){let l=-1,u=ge;for(let a of s.get(R(t[c],o))??[])if(!i.has(a)&&F(e[a],t[c])&&((l===-1||n[a]===r[c])&&(l=a),n[a]===r[c]||--u===0))break;l!==-1&&a(c,l,6e4)}}var ye=new Map([[`.ts`,`.js`],[`.mts`,`.mjs`],[`.cts`,`.cjs`],[`.tsx`,`.jsx`]]),be=new Map([...[`.js`,`.mjs`,`.cjs`,`.jsx`,`.ts`,`.mts`,`.cts`,`.tsx`].map(e=>[e,`script`]),...[`.css`,`.scss`,`.sass`,`.less`].map(e=>[e,`style`])]);function z(e){let t=e.split(`/`),n=t.pop(),r=n.lastIndexOf(`.`);return r>0?{dirs:t,stem:n.slice(0,r),extension:n.slice(r)}:{dirs:t,stem:n,extension:``}}function B(e){let{dirs:t,stem:n,extension:r}=z(e);return JSON.stringify([t.map(e=>e===`lib`||e===`src`?null:e),n,ye.get(r)??r])}function xe(e){let{dirs:t,stem:n,extension:r}=z(e),i=[n,be.get(r)??r],a=t.lastIndexOf(`node_modules`),o=a===-1?0:a+(t[a+1]?.startsWith(`@`)?3:2),s=[JSON.stringify([...i,t])];for(let e=o;e<t.length;e++)s.push(JSON.stringify([...i,t.toSpliced(e,1,null)]));return s}var V=(e,t)=>Math.max(t,e+Math.trunc((6e4-e)/2));function H({pairs:e,used:t,scoreOf:n},{remaining:r,open:i},{s:a,d:o,score:s},c){let l=V(s,c);return i.some(t=>t!==o&&!e.has(t)&&n(a,t,l)>=l)||r.some(e=>e!==a&&!t.has(e)&&n(e,o,l)>=l)}function Se(e,t,n,r){let{sources:i,dests:a,pairs:o,used:s,record:c,scoreOf:l}=e,u=Map.groupBy(t.remaining.filter(e=>i[e].type===`file`),e=>B(i[e].path)),d=t.open.filter(e=>a[e].type===`file`).flatMap(e=>(u.get(B(a[e].path))??[]).map(t=>({s:t,d:e,score:l(t,e,0)})));for(let i of d.sort((e,t)=>t.score-e.score))o.has(i.d)||s.has(i.s)||n&&H(e,t,i,r)||c(i.d,i.s,i.score)}function Ce(e,t,n,r){let{sources:i,dests:a,pairs:o,used:s,record:c,scoreOf:l}=e,u=new Map,d=(e,t,n)=>new Map(t.filter(t=>e[t].type===`file`).map(t=>{let r=xe(e[t].path);for(let e of r)(u.get(e)??u.set(e,{sources:[],dests:[]}).get(e))[n].push(t);return[t,r]})),f=d(a,t.open.filter(e=>!o.has(e)),`dests`),p=d(i,t.remaining.filter(e=>!s.has(e)),`sources`),m=(e,t)=>{let n=new Set(e.flatMap(e=>u.get(e)[t]));return n.size===1?[...n][0]:-1};for(let[i,a]of p){let o=m(a,`dests`);if(o===-1||m(f.get(o),`sources`)!==i)continue;let s={s:i,d:o,score:l(i,o,0)};n&&H(e,t,s,r)||c(o,i,s.score)}}function we(e,t,n){let r=G(e),i=t<6e4&&r.remaining.length*r.open.length<=n*n;Se(e,r,i,t),Ce(e,r,i,t)}function U(e,t){let n=new Map;for(let r of t)n.set(e[r],n.has(e[r])?-1:r);return n}function Te({sourceNames:e,destNames:t,record:n,scoreOf:r},{remaining:i,open:a},o){let s=U(t,a),c=U(e,i);for(let t of i){let i=s.get(e[t]);if(i===void 0||i===-1||c.get(e[t])===-1)continue;let a=r(t,i,o);a>=o&&n(i,t,a)}}var W=(e,t)=>t.score-e.score||t.nameScore-e.nameScore;function Ee(e,t){if(e.length<_e){e.push(t);return}let n=0;for(let t=1;t<e.length;t++)W(e[t],e[n])>0&&(n=t);W(e[n],t)>0&&(e[n]=t)}function De({sourceNames:e,destNames:t,pairs:n,used:r,record:i,scoreOf:a},{remaining:o,open:s},c,l){let u=[];for(let n of s){let r=[];for(let i of o)Ee(r,{score:a(i,n,c),nameScore:+(e[i]===t[n]),dst:n,src:i});u.push(...r)}let d=0,f=e=>{for(;d<l.length&&V(l[d].score,c)>e;d++){let{s:e,d:t,score:a}=l[d];!n.has(t)&&!r.has(e)&&i(t,e,a)}};for(let{dst:e,src:t,score:a}of u.sort(W)){if(a<c)break;f(a),!n.has(e)&&!r.has(t)&&i(e,t,a)}f(-1/0)}var G=({sources:e,dests:t,pairs:n,used:r})=>({remaining:e.keys().filter(e=>!r.has(e)).toArray(),open:t.keys().filter(e=>!n.has(e)).toArray()}),K=e=>V(e,e);function q(e,t,{minimum:n,limit:r,byPath:i}){let a=new Map,o=new Set;if(e.length===0||t.length===0)return a;let s=new Map,c=new Map,l=new Map,u=e=>e.type===`file`?c.get(e)??c.set(e,P(e.data)).get(e):null,d=e=>s.get(e)??s.set(e,T(e)).get(e),f=e=>l.get(e)??l.set(e,T(e,w)).get(e),p={sources:e,dests:t,pairs:a,used:o,sourceNames:e.map(e=>L(e.path)),destNames:t.map(e=>L(e.path)),record(e,t,n){a.set(e,{source:t,score:n}),o.add(t)},bytes:u,scoreOf:(n,r,i)=>O(u(e[n]),u(t[r]),i,d),punctuatedScoreOf:(n,r,i)=>O(u(e[n]),u(t[r]),i,f,!0)};if(ve(p),i&&we(p,n,r),n>=6e4)return a;Te(p,G(p),K(n));let m=G(p);if(m.remaining.length*m.open.length>r*r)return a;let h=i?ae(p,m,K(n),e=>H(p,m,e,n)):[];return De(p,G(p),n,h),a}var Oe=50,ke=1e3;function J(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return e.codePointAt(r)-t.codePointAt(r);return e.length-t.length}function Ae(e){if(e===!1)return null;let t=e===!0?Oe:e;if(typeof t!=`number`)throw TypeError(`renames must be a boolean or a percentage, not ${typeof e}`);if(!(t>0&&t<=100))throw RangeError(`renames must be a percentage above 0 and at most 100, not ${e}`);return Math.max(1,Math.trunc(6e4*t/100))}function je({renamesByPath:e,renameLimit:t,renameGroup:n,paths:r,lines:i}){if(typeof e!=`boolean`)throw TypeError(`renamesByPath must be a boolean, not ${typeof e}`);if(t!==1/0&&!(Number.isSafeInteger(t)&&t>=0))throw RangeError(`renameLimit must be a whole number or Infinity, not ${t}`);if(n!==null&&typeof n!=`function`)throw TypeError(`renameGroup must be a function, not ${typeof n}`);if(r!==`tree`&&r!==`keys`)throw RangeError(`paths must be 'tree' or 'keys', not ${r}`);if(typeof i!=`boolean`)throw TypeError(`lines must be a boolean, not ${typeof i}`)}var Me=(e,t)=>F(e,t)&&(e.type!==`file`||e.mode===t.mode),Y=(e,t,n,r=null)=>({status:e,old:t,new:n,similarity:r}),Ne=/\.d\.(?:[^./]+\.)?[cm]?ts$/u,Pe=e=>e.endsWith(`.mts`)?`module`:e.endsWith(`.cts`)?`commonjs`:null,Fe=/^export\s*\{\s*\}\s*;?$/u;function Ie(e){if(e===null)return{proven:!0,runtime:``,loads:!1};try{return t(e)===void 0?{proven:!1}:y(e.data)}catch{return{proven:!1}}}function Le(e){if(![e.old,e.new].filter(e=>e!==null).every(e=>e.type===`file`&&Ne.test(e.path))||e.old&&e.new&&e.old.mode!==e.new.mode)return e;let t=Ie(e.new),n=Ie(e.old);return!n.proven||!t.proven||n.runtime!==t.runtime&&!(e.old===null&&Fe.test(t.runtime))||n.loads&&e.old&&e.new&&e.old.path!==e.new.path&&Pe(e.old.path)!==Pe(e.new.path)?e:{...e,typeOnly:!0}}function Re(e,t){let n=[],r=[],i=[];for(let[n,a]of e){let e=t.get(n);e===void 0?i.push(a):e.type===a.type?Me(a,e)||r.push(Y(`modified`,a,e)):r.push(Y(`type-changed`,a,e))}for(let[r,i]of t)e.has(r)||n.push(i);return i.sort((e,t)=>J(e.path,t.path)),n.sort((e,t)=>J(e.path,t.path)),{changes:r,deleted:i,added:n}}function ze(e,t,{group:n,...r}){if(n===null)return q(e,t,r);let i=new Map,a=e=>Map.groupBy(e.keys(),t=>n(e[t].path)),o=a(e);for(let[n,s]of a(t)){let a=o.get(n);if(a!==void 0)for(let[n,{source:o,score:c}]of q(a.map(t=>e[t]),s.map(e=>t[e]),r))i.set(s[n],{source:a[o],score:c})}return i}function Be(e,t,{renames:i=!0,renamesByPath:a=!0,renameLimit:o=ke,renameGroup:s=null,paths:c=`tree`,lines:l=!0,horizon:u,whitespace:d,ignoreCase:f}={}){let p=Ae(i);je({renamesByPath:a,renameLimit:o,renameGroup:s,paths:c,lines:l});let m=n({horizon:u,whitespace:d,ignoreCase:f}),h=c===`keys`,{changes:g,deleted:_,added:v}=Re(I(e,`old`,h),I(t,`new`,h)),y=p===null?new Map:ze(_,v,{minimum:p,limit:o,byPath:a,group:s});for(let[e,t]of v.entries()){let n=y.get(e);g.push(n===void 0?Y(`added`,null,t):Y(`renamed`,_[n.source],t,Math.trunc(n.score*100/6e4)))}let b=new Set(y.values().map(({source:e})=>e));for(let[e,t]of _.entries())b.has(e)||g.push(Y(`deleted`,t,null));return g.sort((e,t)=>J((e.new??e.old).path,(t.new??t.old).path)),(l?g.map(e=>({...e,...r(e.old,e.new,m)})):g).map(Le)}function X(e,t,n){let r=new Map,o=new Set,s=0;for(let a of e){let e=i(n,a);e===null||!t.has(e)||(r.set(a,e),o.add(e),e!==a&&s++)}for(let n of e)r.has(n)||!t.has(n)||o.has(n)||(r.set(n,n),o.add(n));let c=r.size;for(let s of e){if(r.has(s))continue;let e=i(n,s)??a(n,s);for(;t.has(e)||o.has(e);)e=`../${e}`;r.set(s,e),o.add(e)}return{paths:r,paired:c,moved:s}}function Ve(e,t){let n=new Set(e),r=new Set(t),i=(e,t)=>{let n=new Map;for(let r of e)for(let e=r.indexOf(`/`);e!==-1;e=r.indexOf(`/`,e+1)){let i=r.slice(0,e+1);t.has(r.slice(e+1))&&n.set(i,(n.get(i)??0)+1)}let r=null,i=!1;for(let[e,t]of n)t>(n.get(r)??0)?[r,i]=[e,!1]:t===n.get(r)&&(i=!0);return i?null:r},a=X(n,r,null).paired,o=[[{base:``,other:i(r,n)},n],[{base:i(n,r),other:``},r]].filter(([e])=>e.base!==null&&e.other!==null).map(([e,t])=>({root:e,side:t,...X(n,r,e)})).filter(({side:e,paired:t,moved:n})=>t>a&&n*2>=e.size);return o.length===2&&o[0].paired===o[1].paired?null:o.toSorted((e,t)=>t.paired-e.paired)[0]?.root??null}function He(e,t){let n=[...e],r=new Set(t),i=Ve(n,r);return{root:i,paths:X(n,r,i).paths}}function Ue(e,t,n){if(!e&&!t)return null;let r=[...e??[]],i=Map.groupBy(r,([,e])=>e),a=new Map(i.entries().map(([e,t])=>[e,o(n,e,t.map(([t])=>t.slice(e.length+1)))]));return new Map([...r.map(([e,t])=>[n.paths.get(e)??e,a.get(t)]),...t??[]])}function We(e,t,n=new Map,r=new Map,i=null,a=()=>!1){let o=e=>{let t=n.get(e)??r.get(e);return t===void 0?[...new Set([e,Ze(i,e)??e])]:[t]},s=[],c=[],u=[],d=new Set;for(let n of e.values()){let e=o(n.parent).map(e=>t.get(l(e,n.specifier,n.conditions,n.platform))).find(Boolean),i=r.get(n.target)??n.target;if(e){if(d.add(e.key),!o(n.target).includes(e.target)){let{target:t,...n}=e;s.push({...n,baseTarget:i,otherTarget:t})}continue}let u=o(n.parent).find(a);if(u===void 0)continue;let{specifier:f,conditions:p,platform:m}=n;c.push({key:l(u,f,p,m),parent:u,specifier:f,conditions:p,platform:m,baseTarget:i,otherTarget:null})}for(let e of t.values()){if(d.has(e.key)||!a(e.parent))continue;let{target:t,...n}=e;u.push({...n,baseTarget:null,otherTarget:t})}for(let e of[s,c,u])e.sort((e,t)=>e.key.localeCompare(t.key));return{changed:s,onlyBase:c,onlyOther:u,totalChanges:s.length+c.length+u.length}}function Z(e){return m(e)??0}function Ge(e,t){return e===t||e?.format===`base64`&&t?.format===`base64`&&e.data===t.data||e?.format===`digest`&&t?.format===`digest`&&e.digest===t.digest}function Q(e){if(e?.kind!==`stasis`||!e.bundle)return null;let{formats:t,executable:n,entries:r}=e.bundle;return e=>({format:t?.get(e),executable:n?.has(e)??!1,entry:r?.has(e)??!1})}function Ke(e,t){return!e||!t?[]:[`format`,`executable`,`entry`].filter(n=>e[n]!==t[n]).map(n=>({field:n,from:e[n],to:t[n]}))}function qe(e){return(t,n)=>Math.abs(n.delta)-Math.abs(t.delta)||t[e].localeCompare(n[e])}function $(e){return(t,n)=>n.bytes-t.bytes||t[e].localeCompare(n[e])}function Je(e,t){return typeof e==`string`?`\0text\0${e.toWellFormed()}`:e?.format===`base64`?`\0base64\0${e.data}`:e?.format===`digest`?`\0digest\0${e.digest}`:`\0none\0${t}`}var Ye=250;function Xe(e,t,n,r,i){let a=(e,t,n)=>e.filter(({path:e})=>e!==``&&e.isWellFormed()).map(({path:e},r)=>({name:e,data:Je(t.get(e),`${n}${r}`)})),o={paths:`keys`,renameGroup:i,renameLimit:Ye,lines:!1},s=Be(a(e,n,`a`),a(t,r,`b`),o);return new Map(s.filter(({status:e})=>e===`renamed`).map(e=>[e.old.path,e.new.path]))}function Ze(e,t){return e?e.base===``?`${e.other}${t}`:t.startsWith(e.base)?t.slice(e.base.length):null:t}function Qe(){return{baseBytes:0,otherBytes:0,onlyBaseFiles:0,onlyOtherFiles:0,changedFiles:0}}function $e(e,t,n,r=He(e.keys(),t.keys()),i=[]){let{root:a,paths:o}=r,s=new Map([...o].map(([e,t])=>[t,e]));e=new Map([...e].map(([e,t])=>[o.get(e),t]));let c=e=>s.get(e)===e?{}:{basePath:s.get(e)},l=(e,t)=>{let n=Ke(i[0]?.(e),i[1]?.(t));return n.length>0?{meta:n}:{}},u=[],d=[],f=[],p=0,m=0,h=0,g=0,_=0,v=0,y=new Map,b=e=>{let t=n(e),r=y.get(t);return r||(r=Qe(),y.set(t,r)),r},x=new Set([...e.keys(),...t.keys()]);for(let n of x){let r=e.has(n),i=t.has(n),a=b(n);if(r&&i){let r=e.get(n),i=t.get(n),o=Ge(r,i),u=l(s.get(n),n),d=Z(r),h=o?d:Z(i);if(p+=d,m+=h,a.baseBytes+=d,a.otherBytes+=h,o&&!u.meta)v++;else{let e=h-d;f.push({path:n,...c(n),baseBytes:d,otherBytes:h,delta:e,...u,...o?{modified:!1}:{}}),_+=e,a.changedFiles++}}else if(r){let t=Z(e.get(n));p+=t,h+=t,a.baseBytes+=t,a.onlyBaseFiles++,u.push({path:n,...c(n),bytes:t})}else{let e=Z(t.get(n));m+=e,g+=e,a.otherBytes+=e,a.onlyOtherFiles++,d.push({path:n,bytes:e})}}let S=Xe(u,d,e,t,n);if(S.size>0){let n=new Set(S.values());for(let[n,r]of S){let i=e.get(n),a=t.get(r),o=Ge(i,a),c=Z(i),u=o?c:Z(a);h-=c,g-=u,f.push({path:r,renamedFrom:n,basePath:s.get(n),baseBytes:c,otherBytes:u,delta:u-c,modified:!o,...l(s.get(n),r)}),_+=u-c;let d=b(n);d.onlyBaseFiles--,d.onlyOtherFiles--,d.changedFiles++}u.splice(0,u.length,...u.filter(e=>!S.has(e.path))),d.splice(0,d.length,...d.filter(e=>!n.has(e.path)))}let C=[],w=[],T=[],E=[];for(let[e,t]of y){let n=t.baseBytes>0||t.onlyBaseFiles>0||t.changedFiles>0,r=t.otherBytes>0||t.onlyOtherFiles>0||t.changedFiles>0,i=t.onlyBaseFiles+t.onlyOtherFiles+t.changedFiles;n&&!r?C.push({pkg:e,bytes:t.baseBytes}):r&&!n?w.push({pkg:e,bytes:t.otherBytes}):i>0||t.baseBytes!==t.otherBytes?T.push({pkg:e,baseBytes:t.baseBytes,otherBytes:t.otherBytes,delta:t.otherBytes-t.baseBytes}):E.push({pkg:e,bytes:t.baseBytes})}return u.sort($(`path`)),d.sort($(`path`)),f.sort(qe(`path`)),C.sort($(`pkg`)),w.sort($(`pkg`)),T.sort(qe(`pkg`)),{totals:{baseFiles:e.size,baseBytes:p,otherFiles:t.size,otherBytes:m,onlyBaseFiles:u.length,onlyBaseBytes:h,onlyOtherFiles:d.length,onlyOtherBytes:g,changedFiles:f.length,renamedFiles:S.size,changedDelta:_,unchangedFiles:v,fileDelta:t.size-e.size,byteDelta:m-p,identical:u.length===0&&d.length===0&&f.length===0},files:{onlyBase:u,onlyOther:d,changed:f,root:a,basePaths:o},packages:{onlyBase:C,onlyOther:w,changed:T,unchanged:E}}}function et(e,t,n=null){let[r,i]=[e,t],[a,o]=s(r,i,n),l=c(r,a),d=c(i,o),m=He(l.keys(),d.keys()),y=Ue(h(r),h(i),m),b=$e(l,d,e=>v(e,{packageDir:y?.get(e)}),m,[Q(r),Q(i)]),x=_(r),S=_(i),C=(e,t)=>{let n=0;for(let r of t)n+=e.get(r)??0;return n};Object.assign(b.totals,{baseLines:C(x,l.keys()),otherLines:C(S,d.keys())});for(let e of b.files.onlyBase)e.lines=x.get(e.basePath??e.path)??0;for(let e of b.files.onlyOther)e.lines=S.get(e.path)??0;for(let e of b.files.changed)Object.assign(e,{baseLines:x.get(e.basePath??e.path)??0,otherLines:S.get(e.path)??0});let w=new Set([...b.files.onlyOther,...b.files.changed.filter(e=>e.modified!==!1)].map(e=>e.path));b.resolutions=We(u(r,a),u(i,o),new Map(b.files.changed.filter(e=>e.renamedFrom!=null).map(e=>[e.basePath,e.path])),b.files.basePaths,b.files.root,e=>d.has(e)&&!w.has(e));let T=e=>v(``,{packageDir:e}),E=g(r,a?l.keys():null,T),D=g(i,o?d.keys():null,T);return b.versionUpdates=p(E,D),b.packageRows=f(b.packages,E,D),b.scope=n??``,b}export{et as prepareComparison};
@@ -1 +0,0 @@
1
- import{Ye as e,_e as t,a as n,af as r,sa as i,w as a}from"./chunk-DTAR2BB6.js";import{c as o,d as s,g as c}from"./chunk-2XUEZHIP.js";var l=e(s`<path d="M3.5 8.4l2.9 2.9 6.1-6.6"/>`),u=e(s`<circle class="fill" cx="8" cy="8" r="3"/>`),d=e(s`<path d="M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6"/>`),f=e(s`<circle class="dotted" cx="8" cy="8" r="5.5"/>`),p=e(s`<path d="M2.6 3.2h7.6v5.3H6.3L4 10.4V8.5H2.6z"/><path d="M12.2 6.2h1.2v5.3H12v1.9l-2.3-1.9H7"/>`),m={approved:[`approved`,r.approved[1],`Approved`],changes:[`changes`,r.changes[1],`Changes requested`],commented:[`commented`,t,`Commented`],dismissed:[`dismissed`,t,`Review dismissed`]},h={done:[`reviewed`,l,`Reviewed`],running:[`running`,u,`Reviewing`],failed:[`failed`,d,`Review failed`],requested:[`requested`,f,`Asked to review again`]},g=[`requested`,f,`Review requested`],_=e=>e.slice(0,7),v=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),y=(e,t,n=!1)=>`${e.toLocaleString(`en-US`)}${n?`+`:``} ${t}${e===1&&!n?``:`s`}`;function b(e){return e?e.failed?h.failed:e.requested?h.requested:h[e.code?.status]??null:null}function x(e){let t=b(e.codex),n=e.codex?.code?.commit??null;return[...t?[{who:i(e.codex.login,`Codex`),standing:t,commit:n,stale:n!==null&&n!==e.head}]:[],...e.reviewers.map(t=>({who:i(t.login,t.login??`someone`),standing:m[t.state]??g,requested:t.requested&&!!m[t.state],workflow:t.workflow??null,commit:t.commit,at:t.at,stale:t.commit!==null&&t.commit!==e.head}))]}var S=e=>(e.moreReviews??0)+(e.moreRequests??0),C=e=>[e.moreReviews>0?y(e.moreReviews,`more review`):null,e.moreRequests>0?y(e.moreRequests,`more review request`):null].filter(Boolean).join(` and `);function w(e){if(!e.head)return!0;let t=e.codex?.code;return t?.status===`done`&&t.commit===e.head||e.reviewers.some(t=>m[t.state]&&t.state!==`dismissed`&&t.commit===e.head)?!0:e.moreReviews>0&&null}var T=e=>e?o`<span class="${`review-severity is-${e}`}">${e.toUpperCase()}</span>`:c;function E(e){if(!e)return c;let t=x(e),{open:n,more:r,severity:i}=e.threads,a=n>0?`${y(n,`open review thread`,r)}${i?`, the gravest ${i.toUpperCase()}`:``}`:r?`No open review thread among those read; more on GitHub`:null,s=w(e);return o`<span class="issue-reviews">${t.map(({who:e,standing:[t,n,r],commit:i,stale:a,requested:s})=>{let c=`${r}${s?`, and requested again`:``}${a?`, on an earlier commit (${_(i)})`:i?`, on the latest commit`:``}`;return o`<span class="${`review-mark is-${t}${a?` is-stale`:``}`}"><span class="review-glyph" role="img" aria-label="${c}" data-tooltip="${c}">${n}</span><span class="review-who">${e}</span></span>`})} ${S(e)>0?o`<span class="review-more" data-tooltip="${`${C(e)}, on GitHub`}">+${S(e)}</span>`:c} ${a?o`<span class="review-threads" role="img" aria-label="${a}" data-tooltip="${a}">${p}<span>${n}${r?`+`:``}</span>${T(i)}</span>`:c} ${s===!1?o`<span class="review-unreviewed" data-tooltip="${t.length>0?`No review is on the latest commit`:`No reviews yet`}">Unreviewed</span>`:s===null?o`<span class="review-unreviewed" data-tooltip="No review read is on the latest commit; more on GitHub">Unreviewed?</span>`:c}</span>`}function D(e,t,n){if(!e)return c;let r=o`<code>${_(e)}</code>`;return o`<span class="review-on">on ${n?o`<a href="${`https://github.com/${n}/commit/${e}`}" target="_blank" rel="noopener noreferrer">${r}</a>`:r}${e===t?`, the latest commit`:`, an earlier commit`}</span>`}function O(e,t){if(!e)return c;let{head:n,codex:r}=e,a=(e,[a,s,c],l)=>o`<li class="review-row">${i(r.login,`Codex`)} <span class="${`review-state is-${a}`}">${s}${l}: ${c.toLowerCase()}</span>${D(e.commit,n,t)}</li>`,s=[...r?.code?[a(r.code,b(r)??h.done,`Code review`)]:[],...r?.security?[a(r.security,h[r.security.status]??h.done,`Security review`)]:[],...x({...e,codex:null}).map(({who:e,standing:[r,i,a],commit:s,at:l,requested:u,workflow:d})=>o`<li class="review-row">${e} <span class="${`review-state is-${r}`}">${i}${a}${u?`, requested again`:``}</span>${d?o`<span class="review-on">by the workflow <code>${d}</code></span>`:c}${D(s,n,t)}${l?o`<time datetime="${new Date(l).toISOString()}">${v(l)}</time>`:c}</li>`)],{open:l,resolved:u,more:d,list:f=[]}=e.threads;return o`<section class="repo-item-section"><h4>Reviews</h4>${s.length>0?o`<ul>${s}</ul>`:o`<p class="repo-item-quiet">No reviews yet.</p>`} ${S(e)>0?o`<p class="repo-item-quiet">And ${C(e)}, on GitHub.</p>`:c} ${w(e)===null?o`<p class="repo-item-quiet">No review read is on the latest commit, <code>${_(n)}</code>; one of those on GitHub may be.</p>`:s.length>0&&!w(e)?o`<p class="repo-item-quiet">No review is on the latest commit, <code>${_(n)}</code>.</p>`:c}</section>${l>0||u>0?o`<section class="repo-item-section"><h4>Open threads</h4>${f.length>0?o`<ul>${f.map(e=>o`<li><a class="repo-item-row review-thread" href="${e.url??c}" target="_blank" rel="noopener noreferrer">${T(e.severity)}<span class="repo-item-title">${e.title||`(no comment)`}</span> ${e.path?o`<code class="review-path">${e.path}${e.line?`:${e.line}`:``}</code>`:c} ${e.outdated?o`<span class="repo-item-quiet">outdated</span>`:c}</a></li>`)}</ul>`:o`<p class="repo-item-quiet">${d?`None open among those read.`:`None open.`}</p>`} ${u>0||d?o`<p class="repo-item-quiet">${u>0?`${y(u,`thread`)} resolved`:``}${d?`${u>0?`; `:``}more on GitHub`:``}.</p>`:c}</section>`:c}`}var k=n({items:new Map,changes:0}),A=null,j=()=>a.managedSession?`${a.managedSession.id}\0${a.managedSession.role}`:null,M=(e,t,n)=>`${e}\0${t}\0${n}`,N=e=>Number.isSafeInteger(e?.readAt)&&e.readAt>0?e.readAt:Date.now();function P(e,t,n,r=null){let i=j();i!==A&&(k.items.clear(),A=i);let a=!1;for(let o of t){let t=M(i,e,o.number),s=k.items.get(t);if(s&&s.readAt>n)continue;let c=s&&(s.item.state===`open`?`open`:`closed`),l=!c||c===(o.state===`open`?`open`:`closed`)?s?.moved??null:{from:c,before:s.readAt};k.items.set(t,{item:{...o,kind:o.kind??r??s?.item.kind??null},readAt:n,moved:l}),a=!0}a&&k.changes++}var F=(e,t)=>k.items.get(M(j(),e,t))??null;function I(e,t){let n=M(j(),e,``);return k.changes,[...k.items].flatMap(([e,r])=>e.startsWith(n)&&r.item.kind===t?[r]:[])}var L=()=>k.changes,R=e=>e.state===`open`?`open`:`closed`;function z(e,t){let n=R(e.item);if(e.readAt<=t||!e.moved)return n;if(e.moved.before>=t)return e.moved.from;let r=e.item.closedAt??e.item.mergedAt??null;return n===`closed`&&r!==null&&r>t?e.moved.from:n}export{E as a,O as b,N as c,P as d,F as e,I as f,L as g,R as h,z as i};
@@ -1,10 +0,0 @@
1
- import{c as e}from"./chunk-PWFUOLZK.js";import{b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{g as r}from"./chunk-2XUEZHIP.js";function i(e){return!Number.isFinite(e)||e<0?`—`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KiB`:e<1073741824?`${(e/1048576).toFixed(1)} MiB`:`${(e/1073741824).toFixed(1)} GiB`}function a(e){return Array.isArray(e)?e.reduce((e,t)=>({bytes:e.bytes!=null&&Number.isFinite(t.bytes)?e.bytes+t.bytes:null,lines:e.lines!=null&&Number.isFinite(t.lines)?e.lines+t.lines:null}),{bytes:0,lines:0}):{bytes:null,lines:null}}function o(e,t,n){if(Array.isArray(e?.files))return{files:t.length,lines:a(t).lines,packages:new Set(t.map(e=>e.module)).size};let r=e=>Number.isSafeInteger(e)&&e>=0?e:null,i=e?.summary;return{files:r(i?.[n===`code`?`codeFiles`:`files`]),lines:r(i?.lines),packages:null}}function s(e){return(e??[]).filter(e=>![`resource:base64`,`directory`].includes(e.format))}var c=t(class extends n{constructor(){super(...arguments),this.key=r}render(e,t){return this.key=e,t}update(t,[n,r]){return n!==this.key&&(e(t),this.key=n),r}});export{i as a,a as b,o as c,s as d,c as e};
2
- /*! Bundled license information:
3
-
4
- lit-html/directives/keyed.js:
5
- (**
6
- * @license
7
- * Copyright 2021 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- *)
10
- */