@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.
- package/common/bundle-sources.d.ts +2 -0
- package/common/bundle-sources.js +19 -2
- package/common/finding-duplicates.js +5 -0
- package/common/finding-filters.js +45 -4
- package/common/line-diff.d.ts +2 -2
- package/common/line-diff.js +20 -8
- package/common/managed/finding-detail.js +1 -1
- package/common/managed/review-view-routes.js +23 -0
- package/common/managed/risk-routes.js +30 -0
- package/common/managed/routes.js +11 -6
- package/common/managed/team-app.d.ts +8 -6
- package/common/managed/team-app.js +15 -3
- package/common/stasis-files.d.ts +5 -0
- package/common/stasis-files.js +20 -0
- package/common/stasis-tgz.d.ts +6 -0
- package/common/stasis-tgz.js +27 -0
- package/common/workspace-app.js +20 -0
- package/out/activity.js +2 -4
- package/out/{chunk-2F3CYNPZ.js → chunk-2IHCVA3Y.js} +1 -1
- package/out/{chunk-HAZKDK4M.js → chunk-2V6Q4ZOZ.js} +1 -1
- package/out/{chunk-RRBIJL2B.js → chunk-4IW3VD3H.js} +1 -1
- package/out/chunk-4YZOXAXR.js +2 -0
- package/out/chunk-5NUDNLJA.js +6 -0
- package/out/chunk-5YP7P5KA.js +1 -0
- package/out/chunk-6VOB5WXX.js +2 -0
- package/out/chunk-74JZTGTO.js +11 -0
- package/out/chunk-7YFJUT2P.js +1 -0
- package/out/chunk-A4BBBHQU.js +1 -0
- package/out/{chunk-4ISO5F7Y.js → chunk-ADMVRLNP.js} +1 -1
- package/out/chunk-BIWPZT4E.js +52 -0
- package/out/{chunk-HETCVNO4.js → chunk-BLPHP4U3.js} +1 -1
- package/out/{chunk-Y5ZHFNBD.js → chunk-BXQCCW7F.js} +1 -1
- package/out/{chunk-JFL7WLRV.js → chunk-CU3FPB3P.js} +1 -1
- package/out/chunk-CXVBTUK3.js +4 -0
- package/out/{chunk-M37X4LCF.js → chunk-EXQQ5VQJ.js} +1 -1
- package/out/{chunk-NXATZJQ2.js → chunk-GSNSP3EF.js} +1 -1
- package/out/chunk-GV5U7OLP.js +40 -0
- package/out/{chunk-JOXLZXMI.js → chunk-GX5UXWT4.js} +1 -1
- package/out/{chunk-YF4M5OCI.js → chunk-I6UQQKAH.js} +1 -1
- package/out/{chunk-UCP3JRE2.js → chunk-LVW7WWV4.js} +1 -1
- package/out/chunk-NEFCZAIY.js +11 -0
- package/out/{chunk-TOXMUOIW.js → chunk-OQS2USZM.js} +1 -1
- package/out/chunk-PQPKHAI5.js +15 -0
- package/out/chunk-PX5DLFSD.js +1 -0
- package/out/chunk-QBFT2DDR.js +1 -0
- package/out/{chunk-GZ46SSTF.js → chunk-RGNF4OH6.js} +1 -1
- package/out/chunk-RLLA4GHZ.js +1 -0
- package/out/chunk-ROHACH7V.js +3 -0
- package/out/chunk-ROWUGPID.js +1 -0
- package/out/{chunk-QMVOEBWC.js → chunk-S2ZIKK45.js} +1 -1
- package/out/chunk-SSPDMA6D.js +1 -0
- package/out/chunk-TD7RVUTT.js +2 -0
- package/out/{chunk-4XIH7YTX.js → chunk-UH6NZBSU.js} +1 -1
- package/out/{chunk-M3Y6SLC4.js → chunk-UJP4PQJA.js} +1 -1
- package/out/{chunk-PAD2JHZT.js → chunk-UJSJMXEG.js} +1 -1
- package/out/{chunk-E3LFSUDJ.js → chunk-VYYUMYVW.js} +1 -1
- package/out/{chunk-VRX2APNA.js → chunk-XVKDPU4D.js} +1 -1
- package/out/chunk-Y2XGV3RC.js +8 -0
- package/out/chunk-YCEMQETS.js +255 -0
- package/out/client-managed-import.js +3 -3
- package/out/client-managed.js +30 -27
- package/out/compare.js +16 -25
- package/out/dialogs.js +38 -38
- package/out/graph.js +14 -14
- package/out/index.html +32 -52
- package/out/scan.js +2 -2
- package/out/terminal.js +239 -240
- package/out/view.css +1 -1
- package/out/view.js +15 -15
- package/package.json +21 -13
- package/risk/actions/resolve.js +56 -19
- package/risk/actions/uses.js +27 -9
- package/risk/actions/workflow.js +75 -2
- package/risk/files/characters.js +11 -0
- package/risk/files/hosts.js +4 -4
- package/risk/files/readability.js +5 -2
- package/risk/files/runs-code.js +12 -25
- package/risk/files/script.js +141 -19
- package/risk/files/source-map-link.js +43 -0
- package/risk/index.d.ts +24 -7
- package/risk/index.js +1 -0
- package/risk/npm/assess.js +1 -1
- package/risk/npm/compare.js +9 -30
- package/risk/npm/diff.js +1 -1
- package/risk/npm/held.js +6 -2
- package/risk/npm/registry.js +5 -2
- package/risk/npm/tarball.js +79 -22
- package/server-managed/bundle-advisories.ts +12 -36
- package/server-managed/bundle-build-worker.js +29 -11
- package/server-managed/bundle-build.ts +4 -3
- package/server-managed/bundle-cache.ts +53 -13
- package/server-managed/bundle.ts +45 -13
- package/server-managed/comparison.ts +3 -3
- package/server-managed/db-methods.ts +54 -17
- package/server-managed/db-neon.ts +9 -2
- package/server-managed/db-schema.ts +12 -2
- package/server-managed/db.ts +4 -1
- package/server-managed/dependency-reviews.ts +8 -5
- package/server-managed/github-errors.ts +22 -0
- package/server-managed/github-requests.ts +4 -2
- package/server-managed/http.ts +336 -76
- package/server-managed/management.ts +10 -4
- package/server-managed/npm-delta.ts +17 -2
- package/server-managed/npm-kept.ts +6 -0
- package/server-managed/npm-packages.ts +30 -29
- package/server-managed/npm-patch.ts +9 -9
- package/server-managed/package-entry-points.ts +54 -6
- package/server-managed/pull-dependencies.ts +4 -1
- package/server-managed/rename-diff-worker.js +11 -7
- package/server-managed/rename-diff.ts +5 -4
- package/server-managed/report-opening.ts +77 -0
- package/server-managed/report-sources.ts +2 -1
- package/server-managed/repository-aliases.ts +34 -0
- package/server-managed/repository-browser.ts +87 -32
- package/server-managed/repository-code.ts +6 -3
- package/server-managed/repository-dependency-reviews.ts +21 -0
- package/server-managed/repository-issues.ts +15 -9
- package/server-managed/repository-risk-read.ts +50 -4
- package/server-managed/repository-risk.ts +9 -2
- package/server-managed/stasis-config.ts +97 -5
- package/server-managed/stasis-dependencies.ts +7 -4
- package/server-managed/team-reports.ts +5 -3
- package/server-managed/type-only-proof.js +26 -4
- package/server-managed/upstream-cache.ts +18 -12
- package/server-managed/workspace-shares.ts +4 -4
- package/out/chunk-2HGKTQ5Q.js +0 -52
- package/out/chunk-45HTR22K.js +0 -4
- package/out/chunk-4RS3NDOG.js +0 -1
- package/out/chunk-7GJNLCXF.js +0 -15
- package/out/chunk-CGRIZ5M5.js +0 -1
- package/out/chunk-CQIT5UNK.js +0 -1
- package/out/chunk-D6NVKGGG.js +0 -10
- package/out/chunk-DTAR2BB6.js +0 -247
- package/out/chunk-MPXVKVPF.js +0 -3
- package/out/chunk-NB4JBTKK.js +0 -2
- package/out/chunk-QPGM3DTI.js +0 -42
- package/out/chunk-VFWMQ3LG.js +0 -2
- package/out/chunk-VG5RH6KN.js +0 -2
- package/out/chunk-WFDXHPT2.js +0 -12
- package/out/chunk-WMFDQS2L.js +0 -11
- package/out/chunk-WREU7JAG.js +0 -1
- /package/out/{chunk-JMG5DXII.js → chunk-7HP2VYIC.js} +0 -0
- /package/out/{chunk-HOB3YPS5.js → chunk-K4XJHM2T.js} +0 -0
- /package/out/{chunk-4EMM6UCD.js → chunk-QI66YA4F.js} +0 -0
- /package/out/{chunk-G3LY2FV4.js → chunk-WCDYSIKG.js} +0 -0
package/out/chunk-MPXVKVPF.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-6CCSTJWB.js";import{b as t,c as n,e as r,f as i,g as a}from"./chunk-2HGKTQ5Q.js";import{p as o}from"./chunk-4RS3NDOG.js";import{J as s}from"./chunk-QRKFPLA4.js";import{a as c}from"./chunk-TUII34K2.js";var l=[`dependencies`,`security`],u={dependencies:`Dependencies`,security:`Security`},d=e(),f=Object.freeze(d.models),p=d.defaultModel,m=`x-upload-encryption`,h=1,g=1,_={name:`X25519`},v=34,y=1048576,b=65536,x=`deepview-managed-upload.v1.content-key`;function S(e,t){let n=new Uint8Array(12);return new DataView(n.buffer).setUint32(7,e),n[11]=+!!t,n}async function C(e,t,n){let r=await crypto.subtle.importKey(`raw`,e,`HKDF`,!1,[`deriveKey`]);return await crypto.subtle.deriveKey({name:`HKDF`,hash:`SHA-256`,salt:t,info:c(x)},r,{name:`AES-GCM`,length:256},!1,[n])}async function w(e){let t=new Uint8Array(await e.slice(0,b).arrayBuffer());if(t.includes(0))return!1;try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(t,{stream:!0}),!0}catch{return!1}}async function T(e,t,n){let r=await w(e),[i,a]=await Promise.all([crypto.subtle.importKey(`raw`,t,_,!1,[]),crypto.subtle.generateKey(_,!1,[`deriveBits`])]),o=new Uint8Array(v);o[0]=h,o[1]=r?g:0,o.set(new Uint8Array(await crypto.subtle.exportKey(`raw`,a.publicKey)),2);let s=await C(await crypto.subtle.deriveBits({name:`X25519`,public:i},a.privateKey,256),o,`encrypt`),c=[new Blob([o])],l=new Uint8Array(y),u=0,d=0,f=async e=>{c.push(new Blob([await crypto.subtle.encrypt({name:`AES-GCM`,iv:S(d++,e)},s,l.subarray(0,u))])),u=0},p=(r?e.stream().pipeThrough(new CompressionStream(`gzip`)):e.stream()).getReader();try{for(let e=await p.read();!e.done;e=await p.read()){n?.throwIfAborted();for(let t=0;t<e.value.length;){u===y&&await f(!1);let n=Math.min(y-u,e.value.length-t);l.set(e.value.subarray(t,t+n),u),u+=n,t+=n}}}catch(e){throw await p.cancel(e).catch(()=>{}),e}return await f(!0),new Blob(c)}var E=null,D=0;function O(){return E?.user.role??null}function ee(e){if(e!==null&&!i(e))throw TypeError(`Unknown managed preview role: ${e}. Expected ${r.join(`, `)}.`);D++,E=e===null?null:{user:{id:`preview:${e}`,login:e,name:e[0].toUpperCase()+e.slice(1),role:e,avatarUrl:null,lastSeenAt:Date.now(),lastActivityAt:null},csrfToken:null}}function te(e,t){let n=new URL(e,`http://managed-preview.invalid`).pathname,r=(t?.method??`GET`).toUpperCase();if(r===`POST`&&n===`/api/auth/logout`)return Response.json({ok:!0});if(r!==`GET`)throw Error(`Changes are not saved in the managed UI preview`);if(n===`/api/auth/session`)return Response.json(E);if(n===`/api/teams`)return Response.json({teams:[]});if(n.startsWith(`/api/admin/`)&&!a(E.user.role,`manage`)||[`/api/admin/users`,`/api/admin/teams`,`/api/admin/repositories`,`/api/admin/repositories/aliases`,`/api/admin/repositories/risk`].includes(n)&&E.user.role!==`admin`)return Response.json({error:`forbidden`},{status:403});if(n===`/api/admin/repositories/risk`)return new Response(`{"type":"repos","repos":[]}
|
|
2
|
-
{"type":"done"}
|
|
3
|
-
`,{headers:{"content-type":`application/x-ndjson`}});let i={"/api/admin/users":{users:[E.user]},"/api/admin/teams":{teams:[],users:[E.user],repos:[],permissions:l},"/api/admin/links":{shares:[]},"/api/admin/repositories":{repositories:[],total:0,connectedCount:0,installUrl:null,tokenMissing:!1},"/api/admin/repositories/aliases":{aliases:[],repos:[]},"/api/admin/repositories/resolve":{location:null},"/api/admin/reports":{reports:[],repos:[],maxBytes:26214400},"/api/admin/bundles":{bundles:[],repos:[],maxBytes:209715200},"/api/admin/history":{history:[],total:0,page:1,limit:100,filters:{repos:[],users:[]}},"/api/admin/scan/models":{models:f,defaultModel:p},"/api/admin/scan-results":{bundles:[],results:[]},"/api/auth/profile":{profile:{login:E.user.login,name:E.user.name,githubName:E.user.name,nameAccount:null,avatarAccount:null,accounts:[]}}};return Object.hasOwn(i,n)?Response.json(i[n]):Response.json({error:`not-found`},{status:404})}var k=3145728,A=new Set([`/api/admin/reports`,`/api/admin/bundles`,`/api/admin/deduplication`]);async function j(e,t){let n=await t(`/api/admin/uploads/key`,{credentials:`same-origin`,signal:e.signal});if(n.status===404||n.status===405)return e;if(!n.ok)return n;let r=(await n.json())?.key;if(typeof r!=`string`)throw TypeError(`The server sent an invalid upload key`);let i=new Headers(e.headers);return i.set(m,`1`),{...e,headers:i,body:await T(e.body,Uint8Array.fromBase64(r,{alphabet:`base64url`}),e.signal)}}async function M(e,t,n){let r=null;if(e!==`/api/admin/deduplication`&&t.body.size>k){let i=await n(`/api/config`,{credentials:`same-origin`,signal:t.signal});if(!i.ok)return i;let a=(await i.json()).managed,o=a?.uploadMaxBytes?.[e.endsWith(`/reports`)?`reports`:`bundles`];if(Number.isSafeInteger(o)&&o>0&&t.body.size>o)return Response.json({error:`too-large`},{status:413});let s=a?.uploadChunkBytes;Number.isSafeInteger(s)&&s>0&&s<=k&&(r=s)}let i=await j(t,n);return i instanceof Response?i:r==null||i.body.size<=k?await n(e,i):await P(e,i,n,r)}var N=3;async function P(e,t,n,r){let i=t.body,a=crypto.randomUUID(),o=e.endsWith(`/reports`)?`reports`:`bundles`,s=Math.ceil(i.size/r),c=new Headers(t.headers);c.set(`content-type`,`application/octet-stream`);let l=0,u=!1;try{let d=null,f=!1,p=(await Promise.allSettled(Array.from({length:Math.min(N,s)},async()=>{for(;!f&&l<s;){let e=l++;try{let s=await n(`/api/admin/uploads/${o}/${a}/${e}`,{...t,headers:c,body:i.slice(e*r,(e+1)*r)});s.ok||(d??=s,f=!0)}catch(e){throw f=!0,e}}}))).find(e=>e.status===`rejected`);if(p)throw p.reason;if(d)return d;let m=new Headers(t.headers);m.set(`x-upload-id`,a),m.set(`x-upload-parts`,String(s)),m.set(`x-upload-size`,String(i.size));let h=await n(e,{...t,headers:m,body:``});return u=h.ok,h}finally{if(!u&&l>0){let e=new Headers(t.headers);e.set(`x-upload-parts`,String(l)),await n(`/api/admin/uploads/${o}/${a}`,{...t,method:`DELETE`,headers:e,body:void 0,signal:AbortSignal.timeout(1e4)}).catch(()=>{})}}}async function F(e){await e.json().then(e=>e?.error,()=>null)===`view-only`&&globalThis.document?.dispatchEvent(new CustomEvent(`managed-view-only`))}async function I(e,n){if(n?.signal?.throwIfAborted(),E)return te(e,n);let r=D;async function i(e,n){if(r!==D)throw new DOMException(`Managed session changed`,`AbortError`);let i=t();if(i){if(new URL(e,globalThis.location.origin).origin!==globalThis.location.origin)throw Error(`Public workspace requests must be same-origin`);let t=new Headers(n?.headers);t.set(`x-deepview-share`,i.token),n={...n,headers:t,credentials:`omit`,redirect:`error`}}let a=await fetch(e,{...n,cache:`no-store`});if(r!==D)throw new DOMException(`Managed session changed`,`AbortError`);return a.status===403&&![`GET`,`HEAD`].includes((n?.method??`GET`).toUpperCase())&&F(a.clone()),a}return n?.method===`POST`&&A.has(e)&&n.body instanceof Blob?await M(e,n,i):await i(e,n)}var L=new class{constructor(e=()=>{}){this.resources=new Map,this.session=null,this.teamCatalog=null,this.reportCatalog=null,this.bundleCatalog=null,this.generation=0,this.sessionController=new AbortController,this.notify=e}setSession(e){(this.session?.id!==e?.id||this.session?.role!==e?.role)&&this.reset(),this.session=e}reset(){this.generation++,this.sessionController.abort(),this.sessionController=new AbortController,this.invalidate(),this.session=null,this.teamCatalog=null,this.reportCatalog=null,this.bundleCatalog=null}setReportCatalog(e){let t=new Set,n=new Map(e.map(e=>[e.id,JSON.stringify([e.cacheKey??null,e.reports.map(e=>[e.id,e.cacheKey??null,e.visible!==!1]).toSorted(),(e.bundles??[]).map(e=>[e.id,e.filename,e.repoFullName,e.repoDirectory??``]).toSorted()])]));for(let e of new Set([...this.teamCatalog?.keys()??[],...n.keys()]))this.teamCatalog?.get(e)!==n.get(e)&&t.add(`team:${e}`);for(let e of this.resources.keys())if(e.startsWith(`reports:content:team:`)){let[t]=e.slice(21).split(`:`);n.has(t)&&this.teamCatalog?.get(t)===n.get(t)||this.invalidate([e])}this.teamCatalog=n;let r=new Map;for(let t of e)for(let e of t.reports){let n=r.get(e.id)??[];n.push(JSON.stringify([t.id,e.cacheKey??null])),r.set(e.id,n)}let i=new Map([...r].map(([e,t])=>[e,JSON.stringify(t.toSorted())])),a=this.reportCatalog;this.reportCatalog=i;let o=new Set(t);for(let e of new Set([...a?.keys()??[],...i.keys()]))a?.get(e)!==i.get(e)&&o.add(e);for(let e of this.resources.keys()){if(!e.startsWith(`reports:content:`)||e.startsWith(`reports:content:team:`))continue;let t=e.slice(16);(!i.has(t)||o.has(t))&&(this.invalidate([e]),o.add(t))}let s=new Map;for(let t of e)for(let e of t.bundles??[]){let n=s.get(e.id)??[];n.push(JSON.stringify([t.id,t.cacheKey??null,e.filename,e.repoFullName,e.repoDirectory??``])),s.set(e.id,n)}let c=!1,l=new Map([...s].map(([e,t])=>[e,JSON.stringify(t.toSorted())]));for(let e of new Set([...this.bundleCatalog?.keys()??[],...l.keys()]))this.bundleCatalog?.get(e)!==l.get(e)&&(c=!0,o.add(`bundle:${e}`),this.invalidate([`bundle-metadata:${e}`]));this.bundleCatalog=l;for(let e of this.resources.keys()){if(!e.startsWith(`report-sources:`)&&!e.startsWith(`finding-history:`))continue;let[,n,r]=e.split(`:`);(n?t.has(`team:${n}`):c||o.has(r))&&this.invalidate([e])}return o}read(e){return this.resources.get(e)?.data}invalidate(e){for(let[t,n]of this.resources)e&&!e.some(e=>t===e||t.startsWith(`${e}:`))||(n.controller?.abort(),this.resources.delete(t))}async mutate(e,t){let n=this.generation,r;try{r=await e()}catch(e){throw n===this.generation&&e?.name!==`AbortError`&&this.notify(`Couldn't save changes: ${e?.message??e}`),e}if(n!==this.generation)throw new DOMException(`Managed session changed`,`AbortError`);return this.invalidate(t),r}async load(e,t,n,{signal:r,apply:i=()=>{},retryInvalidated:a=!1}={}){let o=this.generation;for(;;){r?.throwIfAborted();let s=this.resources.get(e);if(s||(s={},this.resources.set(e,s)),s.data!==void 0&&i(s.data),!s.pending){let e=s.controller=new AbortController;s.pending=(async()=>{try{let t=await n(e.signal);return e.signal.throwIfAborted(),s.data=t,t}catch(n){throw!e.signal.aborted&&n?.name!==`AbortError`&&this.notify(`Couldn't refresh ${t}: ${n?.message??n}`),n}})().finally(()=>{s.pending=null})}try{let t=await s.pending;if(r?.throwIfAborted(),this.resources.get(e)!==s)throw new DOMException(`Managed data changed`,`AbortError`);return i(t),t}catch(t){if(!a||t?.name!==`AbortError`||r?.aborted||o!==this.generation||this.resources.get(e)===s)throw t}}}}(e=>{document.dispatchEvent(new CustomEvent(`managed-notice`,{detail:{message:e}}))});function R(e){L.setSession(e)}function z(e){return L.setReportCatalog(e)}function B(){L.reset()}var V=[`package`,`repo`],H=e=>Array.isArray(e?.findings)?`findings`:Array.isArray(e?.groups)?`groups`:null;function U(e,t){let n=H(e);if(!n||!Array.isArray(t))return e;for(let r of e[n].flat())if(r&&typeof r==`object`)for(let e of V)Number.isInteger(r[e])&&(r[e]=t[r[e]]);return e}async function W(e,t=null,n={}){let r;try{r=await I(e,{credentials:`same-origin`,headers:{accept:`application/json`},...n})}catch{return t}if(r.status===401||r.status===403)return null;if(!r.ok)return t;try{return await r.json()}catch{return t}}async function G({fallback:e=null,sent:r}={}){let i=t()||O()!==null?void 0:await r;if(i===null)return null;let a=K(i);if(a!==void 0)return a;let o;try{let r=t(),i=await I(r?n(r):`/api/auth/session`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(i.status===401||i.status===403)return null;if(!i.ok)return e;o=await i.json()}catch{return e}let s=K(o);return s===void 0?e:s}function K(e){let n=e?.user;if(n===null)return null;if(n!==void 0&&typeof n.login==`string`)return{id:n.id,login:n.login,name:typeof n.name==`string`?n.name:null,avatarUrl:typeof n.avatarUrl==`string`?n.avatarUrl:null,role:typeof n.role==`string`?n.role:`none`,csrfToken:typeof e.csrfToken==`string`?e.csrfToken:null,...t()?{publicShare:!0}:{},...typeof e.viewer?.login==`string`?{viewer:{id:e.viewer.id,login:e.viewer.login,name:typeof e.viewer.name==`string`?e.viewer.name:null}}:{},...!t()&&e.dependencyReview===!0?{dependencyReview:!0}:{}}}function q(e){let t=t=>Number.isSafeInteger(e?.[t])&&e[t]>=0;return e?.appMode===!1?{appMode:!1,...t(`appReports`)&&{appReports:e.appReports},...t(`findings`)&&{findings:e.findings}}:e?.appMode===!0&&t(`appFindings`)?{appMode:!0,appFindings:e.appFindings}:null}function J(e){if(typeof e?.sha!=`string`||typeof e.github!=`string`||!Array.isArray(e.tags))return null;let t=e.details,n=e=>typeof e==`string`?e:null,r=e=>Number.isSafeInteger(e)?e:null;return{sha:e.sha,github:e.github,tags:e.tags.filter(e=>typeof e==`string`),details:typeof t?.subject==`string`?{subject:t.subject,authorName:n(t.authorName),authorLogin:n(t.authorLogin),authoredAt:r(t.authoredAt),committedAt:r(t.committedAt)}:null}}async function ne({fallback:e=[],signal:r,onRevision:i}={}){let a=t(),o=a?await W(n(a),null,{signal:r}):null,s=a?{teams:o?.team?[o.team]:[]}:await W(`/api/teams`,{teams:e},{signal:r}),c=s?.teams;return Array.isArray(c)?(i?.(typeof s.revision==`string`?s.revision:null),c.filter(e=>e!=null&&typeof e.id==`string`&&typeof e.name==`string`).map(e=>({id:e.id,slug:e.slug,name:e.name,...!a&&e.dependencyReview===!0?{dependencyReview:!0}:{},...e.permissions?{permissions:{dependencies:e.permissions.dependencies===!0,security:e.permissions.security===!0}}:{},...typeof e.cacheKey==`string`?{cacheKey:e.cacheKey}:{},...q(e.app)?{app:q(e.app)}:{},repos:Array.isArray(e.repos)?e.repos.filter(e=>Number.isSafeInteger(e?.repoId)&&e.repoId>0&&typeof e.fullName==`string`).map(e=>({repoId:e.repoId,fullName:e.fullName,path:typeof e.path==`string`&&e.path?e.path:null})):[],reports:Array.isArray(e.reports)?e.reports.filter(e=>e!=null&&typeof e.id==`string`&&typeof e.filename==`string`).map(e=>({id:e.id,slug:e.slug,filename:e.filename,visible:e.visible!==!1,...e.analyzer===null||typeof e.analyzer==`string`?{analyzer:e.analyzer}:{},repoFullName:typeof e.repoFullName==`string`?e.repoFullName:``,repoDirectory:typeof e.repoDirectory==`string`?e.repoDirectory:``,...typeof e.cacheKey==`string`?{cacheKey:e.cacheKey}:{}})):[],bundles:Array.isArray(e.bundles)?e.bundles.filter(e=>e!=null&&typeof e.id==`string`&&typeof e.filename==`string`).map(e=>({id:e.id,slug:e.slug,integrity:e.integrity,byteSize:e.byteSize,repoId:e.repoId,filename:e.filename,kind:e.kind,visible:e.visible!==!1,summary:e.summary??null,summaryRetryAt:Number.isSafeInteger(e.summaryRetryAt)&&e.summaryRetryAt>0?e.summaryRetryAt:null,repoDirectory:typeof e.repoDirectory==`string`?e.repoDirectory:``,repoFullName:typeof e.repoFullName==`string`?e.repoFullName:``,commitInfo:J(e.commitInfo)})):[]}))):s==null?[]:e}function Y(e){return e?.links===void 0?[]:Array.isArray(e.links)&&e.links.every(e=>Array.isArray(e)&&e.length>=2&&e.every(e=>typeof e==`string`))?e.links:null}function X(e,t=null){return s(e?.data)===null||typeof e.repo?.directory!=`string`||e.repo.github!==null&&typeof e.repo.github!=`string`||Y(e)===null?null:{data:U(e.data,t),repo:e.repo,...e.links?{links:e.links}:{}}}async function Z(e,{signal:t}={}){return X(await W(`/api/reports/${encodeURIComponent(e)}`,null,{signal:t}))}async function re(e,{signal:t}={}){let n=[...new Set(e)];if(n.length===0)return[];let r=await W(`/api/reports/query`,null,{method:`POST`,signal:t,headers:{accept:`application/json`,"content-type":`application/json`},body:JSON.stringify({ids:n})});if(!Array.isArray(r?.reports)||r.reports.length!==n.length)return null;let i=new Map;for(let e of r.reports){let t=X(e);if(!t||!n.includes(e.id)||i.has(e.id))return null;i.set(e.id,t)}let a=Y(r);return a===null?null:e.map(e=>({...i.get(e),...a.length>0?{links:a}:{}}))}async function ie(e,{signal:t,reportId:n=null,lite:r=!1}={}){let i=new URLSearchParams(n===null?{}:{reportId:n});r&&i.set(`lite`,`1`);let a=await W(`/api/teams/${encodeURIComponent(e)}/reports${i.size>0?`?${i}`:``}`,null,{signal:t});if(!Array.isArray(a?.reports))return null;let o=[],s=new Set;for(let e of a.reports){let t=X(e,a.values);if(!t||typeof e.id!=`string`||typeof e.filename!=`string`||s.has(e.id))return null;s.add(e.id),o.push({id:e.id,filename:e.filename,...t})}let c=Y(a);return c===null?null:(Object.defineProperties(o,{links:{value:c},...[`rows`,`app`].includes(a.folded)?{folded:{value:a.folded},lens:{value:a.lens??null}}:{}}),o)}function Q(e){return e?`?team=${encodeURIComponent(e)}`:``}async function ae(e,{reportId:t,...n}={}){let r=t==null?``:`?reportId=${encodeURIComponent(t)}`,i=await W(`/api/teams/${encodeURIComponent(e)}/annotations${r}`,null,n),{reports:a,entries:o,comments:s,issues:c={}}=i??{};if(!a||typeof a!=`object`||Array.isArray(a)||!o||typeof o!=`object`||Array.isArray(o)||!Array.isArray(s)||!c||typeof c!=`object`||Array.isArray(c)||Object.values(a).some(e=>!Array.isArray(e)||e.some(e=>typeof e!=`string`))||s.some(e=>!e||typeof e.findingId!=`string`))return null;let l=new Map;for(let[e,t]of s.entries()){let n=t.findingId,r=l.get(n)??[];r.push(e),l.set(n,r)}let u=new Map,d=new Map,f=typeof i.revision==`string`?i.revision:null;return Object.assign(e=>{if(!Object.hasOwn(a,e))return null;if(d.has(e))return d.get(e);let t=JSON.stringify(a[e]),n=u.get(t);if(!n){let r=[...new Set(a[e])],i=r.flatMap(e=>l.get(e)??[]);n={entries:Object.fromEntries(r.filter(e=>Object.hasOwn(o,e)).map(e=>[e,o[e]])),comments:i.toSorted((e,t)=>e-t).map(e=>s[e]),issues:Object.fromEntries(r.filter(e=>Object.hasOwn(c,e)).map(e=>[e,c[e]]))},u.set(t,n)}return d.set(e,n),n},{revision:f})}async function oe(e,t,n){let r=(await W(`/api/reports/${encodeURIComponent(e)}/triage${Q(t)}`,null,n))?.entries;return typeof r==`object`&&r&&!Array.isArray(r)?r:null}async function se(e,n,r=null){if(t())return[];let i=r===null?``:`?reportId=${encodeURIComponent(r)}`,a=await W(`/api/teams/${encodeURIComponent(e)}/fixes${i}`,null,{signal:n});return Array.isArray(a?.fixes)?a.fixes:null}async function ce(e,t,n){let r=await W(`/api/reports/${encodeURIComponent(e)}/comments${Q(t)}`,null,n);return Array.isArray(r?.comments)?r.comments:null}async function le(e,{findingId:t,body:n,commentId:r=null,version:i},a,o){let s=r==null?``:`/${encodeURIComponent(r)}`;try{let c=await I(`/api/reports/${encodeURIComponent(e)}/comments${s}${Q(o)}`,{method:r==null?`POST`:`PATCH`,credentials:`same-origin`,headers:{"content-type":`application/json`,...a?{"x-csrf-token":a}:{}},body:JSON.stringify(r==null?{findingId:t,body:n}:{body:n,version:i})});return{status:c.status,comment:c.ok?(await c.json()).comment:null}}catch{return{status:0,comment:null}}}async function ue(e,t,n,r,i){try{return(await I(`/api/reports/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}${Q(i)}`,{method:`DELETE`,credentials:`same-origin`,headers:{"content-type":`application/json`,...r?{"x-csrf-token":r}:{}},body:JSON.stringify({version:n})})).status}catch{return 0}}async function de(e,t,n,r){try{return(await I(`/api/reports/${encodeURIComponent(e)}/triage${Q(r)}`,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`,...n?{"x-csrf-token":n}:{}},body:JSON.stringify({entries:t})})).status}catch{return 0}}function fe(e){e&&(location.href=e)}async function pe(e){if(t())location.href=`/`;else{try{await I(`/api/auth/logout`,{method:`POST`,credentials:`same-origin`,headers:e?{"x-csrf-token":e}:{}})}catch{}location.reload()}}async function $(e,t){let n=await I(`/api/auth/view-as`,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`,...t?{"x-csrf-token":t}:{}},body:JSON.stringify({userId:e})});if(!n.ok)throw Error(`HTTP ${n.status}`);location.assign(`/`)}async function me(e){try{await I(`/api/auth/view-as`,{method:`DELETE`,credentials:`same-origin`,headers:e?{"x-csrf-token":e}:{}})}catch{}location.assign(o[`admin-users`])}async function he(e){let t=await I(`/api/teams/${encodeURIComponent(e)}/share`,{credentials:`same-origin`});if(!t.ok)throw Error(`Could not load public links (${t.status})`);return(await t.json()).shares}async function ge(e,t,{id:n,revoke:r=!1,dependencies:i=!1,security:a=!1}={}){let o=n?`/${encodeURIComponent(n)}`:``,s=await I(`/api/teams/${encodeURIComponent(e)}/share${o}`,{method:r?`DELETE`:n?`PATCH`:`POST`,credentials:`same-origin`,headers:{"x-csrf-token":t,"content-type":`application/json`},...r?{}:{body:JSON.stringify({dependencies:i,security:a})}});if(!s.ok)throw Error(`Could not ${r?`revoke`:n?`update`:`create`} public link (${s.status})`);return s.json()}async function _e(e,t){let n=await I(`/api/bundles/${encodeURIComponent(e)}/download`,{credentials:`same-origin`});if(!n.ok)throw Error(`Could not download bundle (${n.status})`);let r=URL.createObjectURL(await n.blob()),i=document.createElement(`a`);i.href=r,i.download=t,i.click(),setTimeout(()=>URL.revokeObjectURL(r),6e4)}export{u as a,O as b,ee as c,I as d,L as e,R as f,z as g,B as h,G as i,ne as j,Z as k,re as l,ie as m,Q as n,ae as o,oe as p,se as q,ce as r,le as s,ue as t,de as u,fe as v,pe as w,$ as x,me as y,he as z,ge as A,_e as B};
|
package/out/chunk-NB4JBTKK.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as e,e as t,k as n,l as r}from"./chunk-7GJNLCXF.js";import{l as i}from"./chunk-WFDXHPT2.js";function a(e,t){return e?e.base===``?`${e.other}${t}`:t.startsWith(e.base)?t.slice(e.base.length):null:t}var o=(e,t)=>`${`../`.repeat(e.base.split(`/`).length-1)}${t}`;function s({root:e,paths:t},n,r){if(!e||n===`.`)return n;for(let e of r){let r=t.get(`${n}/${e}`);if(r?.endsWith(`/${e}`))return r.slice(0,-e.length-1)}let i=a(e,`${n}/`);return i===null?o(e,n):i.slice(0,-1)||`.`}function c(e,t){if(!e)return{prefix:t,from:null,to:null};let n=t.startsWith(e.other)?t:``;return{prefix:n,from:`./${e.base}${n.slice(e.other.length)}`,to:`./${n||e.other}`}}function l(e){let t=i(e),n=new Map;for(let[r,i]of Object.entries(e?.bundle?.reason??{})){let e=new Set(Array.isArray(i)?i.filter(e=>t.has(e)):[]);e.size>0&&n.set(r,e)}return{stasis:e?.kind===`stasis`,files:t,trees:n}}var u=[[`extra`,`add`],[`metro`,`bundle:metro`]];function d(e){if(e.length!==2)return e;let t=(t,n)=>e.find((r,i)=>r.trees.has(n)&&!r.trees.has(t)&&e[1-i].trees.has(t)&&!e[1-i].trees.has(n)),n=e.map(()=>new Map);for(let[r,i]of u){let a=t(r,i);a&&n[e.indexOf(a)].set(i,r)}let r=t(`metro`,`bundle:metro`);return r&&t(`run`,`bundle`)===r&&n[e.indexOf(r)].set(`bundle`,`run`),e.map((e,t)=>n[t].size===0?e:{...e,trees:new Map([...e.trees].map(([e,r])=>[n[t].get(e)??e,r])),actual:new Map([...n[t]].map(([e,t])=>[t,e]))})}function f(e,t){if(!e.stasis||e.trees.size!==1)return null;let[[n,r]]=e.trees;return r.size===e.files.size&&!t.some(t=>t!==e&&t.trees.has(n))?n:null}var p=e=>e.trees.size===0||e.trees.size===1&&[...e.trees.values()][0].size===e.files.size,m=`reasons:`,h=(e,t)=>`${m}${JSON.stringify([e,t].toSorted())}`;function g(e){if(!e.startsWith(m))return null;try{let t=JSON.parse(e.slice(m.length));return Array.isArray(t)&&t.length===2&&t.every(e=>typeof e==`string`)?t:null}catch{return null}}function _(...e){let t=d(e.map(l));if(t.length===2&&!t.some(p)){let[e,n]=t.map(e=>[...e.trees.keys()].toSorted()),r=e.filter(e=>n.includes(e)),[i,a]=[e,n].map(e=>e.filter(e=>!r.includes(e)));if(i.length>0&&a.length>0)return[...r.map(e=>({id:`reason:${e}`,label:e})),...i.flatMap(e=>a.map(t=>({id:h(e,t),label:`${e} \u2192 ${t}`})))]}let n=t.filter(e=>f(e,t)===null),r=new Set(n.flatMap(e=>[...e.trees.keys()])),i=e=>n.some(t=>t.stasis&&(t.trees.get(e)?.size??0)<t.files.size);return[...r].some(i)?[...r].toSorted().map(e=>({id:`reason:${e}`,label:e})):[]}function v(e,t,n=``){if(!n)return[``,``];let r=g(n),i=d([e,t].map(l)),a=n.startsWith(`reason:`)?n.slice(7):null;return i.map(e=>{let t=r?r.find(t=>e.trees.has(t)):f(e,i)??a;return t==null?n:`reason:${e.actual?.get(t)??t}`})}function y(e,t=``){let n=i(e);if(!t||e?.kind!==`stasis`)return n;let r=e?.bundle?.reason?.[t.replace(/^reason:/u,``)],a=new Set(Array.isArray(r)?r:[]);return new Map([...n].filter(([e])=>a.has(e)))}function b(e,t,n,r){return JSON.stringify([e,t,n,r])}function x(e,t=``){let n=new Map;if(e?.kind!==`stasis`||!e.bundle)return n;let r=t?i(e):null,a=t?y(e,t):null;for(let[t,i]of e.bundle.imports)for(let[e,o]of i)for(let[i,s]of o){let o=typeof s==`string`?[[null,s]]:s;for(let[s,c]of o){if(a&&!a.has(e)&&(r.has(e)||!a.has(c)))continue;let o=b(e,i,t,s);n.set(o,{key:o,parent:e,specifier:i,conditions:t,platform:s,target:c})}}return n}var S=(e,{lo:t,start:n},r)=>e[n+(r-t)/2];function C(e,t,{low:n,high:r},i,a){return e===-t||e-1<n||e!==t&&e+1<=r&&S(i,a,e-1)<S(i,a,e+1)?e+1:e-1}function w(e,t,n,{first:r,n:i,m:a,d:o,...s}){e.a.fill(1,0,r).fill(1,i),e.b.fill(1,0,r).fill(1,a);let c=i,l=a;for(let r=o;r>0;r--){let i=c-l,a=C(i,r,s,t,n[r]),o=S(t,n[r],a);for(let t=a>i?o:o+1;t<c;t++)e.a[t]=e.b[t-i]=1;c=o,l=c-a}for(let t=r;t<c;t++)e.a[t]=e.b[t]=1}function T(e,t,n){let r=0,i=t.length,a=e.length,o=2*(a+i);for(;r<a&&r<i&&e[r]===t[r];)r++;for(;a>r&&i>r&&e[a-1]===t[i-1];)a--,i--;let s={high:a-r,low:r-i},c=[r],l=[{lo:1,start:0}];for(let u=0;u<=s.high-s.low;u++){let d=l[u],f=Math.min(u,s.high),p=Math.max(-u,s.low+(s.low+u&1));l.push({lo:p,start:c.length});for(let m=p;m<=f;m+=2){let f=C(m,u,s,c,d),p=S(c,d,f),h=f>m?p:p+1,g=h;for(;h<a&&h-m<i&&e[h]===t[h-m];)h++;if(o+=2+h-g,c.push(h),h>=a&&h-m>=i)return w(n,c,l,{first:r,n:a,m:i,d:u,...s}),o}}throw Error(`no edit script between two lines`)}var E=/[\p{L}\p{N}_$]+|\s+|[^\p{L}\p{N}_$\s]/gu,ee=2e3,D=800,O=.6;function k(e,t){if(e.length>ee)return null;let n=e.match(E)??[];return n.length>D?null:{line:e,tokens:n,words:n.map(e=>(t.has(e)||t.set(e,t.size),t.get(e)))}}function A({tokens:e,line:t},n){let r=[];for(let i=0,a=0;a<e.length;i+=e[a++].length){if(n[a])continue;let o=r.at(-1);o&&/^\s*$/u.test(t.slice(o[1],i))?o[1]=i+e[a].length:r.push([i,i+e[a].length])}return r}var j=(e,t)=>e.reduce((e,[t,n])=>e+n-t,0)/Math.max(1,t.length);function M(e,t){let n={a:e.words.map(()=>0),b:t.words.map(()=>0)},r=T(e.words,t.words,n),i={a:A(e,n.a),b:A(t,n.b)};return{ranges:i,share:n.a.includes(1)?Math.min(j(i.a,e.line),j(i.b,t.line)):1,steps:r}}function N(e,t){if(e===t)return{a:[],b:[]};let n=new Map,r=k(e,n),i=k(t,n);if(r===null||i===null)return null;let{ranges:a,share:o}=M(r,i);return o<=O?a:null}var P=200,te=5e6,F=6,I=60,L=3;function R(e){let t=new Map;for(let n of e?.tokens??[])t.set(n,(t.get(n)??0)+1);return t}function z(e,t){let n=new Map,r=[e,t].map(e=>e.map(e=>k(e,n))),i=r.map(e=>e.map(R)),a=0,o=(e,t,n)=>{let r=0;for(let[i,o]of e)if(a+=L,(r+=i.length*Math.max(0,o-(t.get(i)??0)))>O*n.length)return 1/0;return r/Math.max(1,n.length)},s=(n,a)=>r[0][n]===null||r[1][a]===null?1/0:Math.min(o(i[0][n],i[1][a],e[n]),o(i[1][a],i[0][n],t[a])),c=(e,t)=>{if(a+=I,s(e,t)===1/0)return 1/0;let{share:n,steps:i}=M(r[0][e],r[1][t]);return a+=i,n<=O?n:1/0},l=new Float64Array(e.length*t.length).fill(NaN);return{share:(n,r)=>{let i=n*t.length+r;return Number.isNaN(l[i])&&(l[i]=e[n]===t[r]?0:c(n,r)),l[i]},floor:s,spent:()=>a}}function B(e,t,{share:n,spent:r}){let i=Array.from({length:e+1},()=>new Float64Array(t+1)),a=(e,t)=>n(e,t)===1/0?-1/0:1e3-n(e,t)+i[e][t];for(let n=0;n<e;n++)for(let e=0;e<t;e++)if(i[n+1][e+1]=Math.max(i[n][e+1],i[n+1][e],a(n,e)),r()>te)return null;let o=[];for(let n=e,r=t;n>0&&r>0;)i[n][r]===i[n][r-1]?r--:i[n][r]===i[n-1][r]?n--:o.push([--n,--r]);return o.toReversed()}function V(e,t,{share:n,floor:r}){let i=[];for(let a=0,o=0;a<e&&o<t;a++){let e=null,s=1/0,c=Array.from({length:Math.min(t,o+F)-o},(e,t)=>[o+t,r(a,o+t)]);for(let[t,r]of c.toSorted((e,t)=>e[1]-t[1]||e[0]-t[0])){if(r>s)break;(n(a,t)<s||n(a,t)===s&&t<e)&&([e,s]=[t,n(a,t)])}e!==null&&(i.push([a,e]),o=e+1)}return i}function H(e,t){if(e.length>P||t.length>P)return[];let n=z(e,t);return B(e.length,t.length,n)??V(e.length,t.length,n)}var U=(e,t,r)=>n(e,t,{...r,discard:!1});function W(t){if(t===null)return``;let n=t.type===`symlink`?t.target:t.data;if(typeof n==`string`)return n.includes(`\0`)?void 0:n;if(!n.includes(0))try{return e(n)}catch{return}}var G=new Set([`none`,`all`,`change`,`trailing`]);function K({horizon:e=1/0,whitespace:t=`none`,ignoreCase:n=!1}={}){if(e!==1/0&&!(Number.isSafeInteger(e)&&e>=0))throw RangeError(`horizon must be a whole number or Infinity, not ${e}`);if(!G.has(t))throw RangeError(`whitespace must be 'none', 'all', 'change' or 'trailing', not ${t}`);if(typeof n!=`boolean`)throw TypeError(`ignoreCase must be a boolean, not ${typeof n}`);return{horizon:e,whitespace:t,ignoreCase:n}}var q=e=>e.reduce((e,{a0:t,a1:n,b0:r,b1:i})=>e+n-t+i-r,0),J=e=>e===``?[]:e.split(/(?<=\n)/u),Y=e=>({...e,ignoreCase:!1,whitespace:`none`}),X=e=>(e.whitespace??`none`)!==`none`||!!e.ignoreCase;function Z(e,n,i,{whitespace:a,ignoreCase:o}){try{return r(e,n,i,{format:`normal`,ignoreCase:o,whitespace:a}),!0}catch(e){if(e instanceof t)return!1;throw e}}function ne(e,t,n,r,i){let a=J(e),o=J(t),s=(e,t,n,r)=>({a0:e,a1:t,b0:n,b1:r,remove:a.slice(e,t),insert:o.slice(n,r)}),c=i.flatMap(({a0:e,a1:t,b0:r,b1:i})=>e===t||r===i?[s(e,t,r,i)]:U(a.slice(e,t).join(``),o.slice(r,i).join(``),n).map(t=>s(e+t.a0,e+t.a1,r+t.b0,r+t.b1))),l=q(c)<q(r)&&Z(e,t,c,n)?c:r;return q(l)<q(i)?l:i}function re(e,t,n){let r=U(e,t,n);return X(n)?ne(e,t,n,r,U(e,t,Y(n))):r}function ie(e,t,n){let r=W(e),i=W(t);if(r===void 0||i===void 0)return{binary:!0,blocks:[],insertions:null,deletions:null};let a=r===i?[]:re(r,i,n),o=0,s=0;for(let{a0:e,a1:t,b0:n,b1:r}of a)s+=r-n,o+=t-e;return{binary:!1,blocks:a,insertions:s,deletions:o}}function ae(e,t,n,r){return Z(e,t,n,K(r))}var Q=/[ \t\n\v\f\r]/u,$=e=>{let t=e.split(`
|
|
2
|
-
`);return t.at(-1)===``&&t.pop(),t};function oe(e,t){for(let n=0,r=0;;n++,r++){let i=``,a=``;for(;n<e.length&&Q.test(e[n]);)i+=e[n++];for(;r<t.length&&Q.test(t[r]);)a+=t[r++];if(i!==a&&new Set(i+a).size>1)return!0;if(n>=e.length||r>=t.length)return!1}}function se(e,t,n){try{if(!ae(e,t,n,{whitespace:`all`}))return!0}catch{return!0}let r=$(e),i=$(t),a=0,o=0;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e].a0:r.length;for(;a<t;a++,o++)if(r[a]!==i[o]&&oe(r[a],i[o]))return!0;e<n.length&&({a1:a,b1:o}=n[e])}return!1}function ce(e,t,{extension:n=!0}={}){let r=e.split(`/`),i=t.split(`/`),a=0;for(;a<r.length-1&&a<i.length-1&&r[a]===i[a];)a++;let o=0;for(;o<r.length-a-1&&o<i.length-a-1&&r.at(-1-o)===i.at(-1-o);)o++;let s={head:a?`${r.slice(0,a).join(`/`)}/`:``,from:r.slice(a,r.length-o).join(`/`),to:i.slice(a,i.length-o).join(`/`),tail:o?`/${r.slice(-o).join(`/`)}`:``},c=s.from.lastIndexOf(`.`);return n&&!s.from.includes(`/`)&&!s.to.includes(`/`)&&c>0&&s.to.lastIndexOf(`.`)===c&&s.from.slice(0,c)===s.to.slice(0,c)?{...s,head:s.head+s.from.slice(0,c),from:s.from.slice(c),to:s.to.slice(c)}:s}export{N as a,H as b,W as c,K as d,ie as e,se as f,ce as g,a as h,o as i,s as j,c as k,_ as l,v as m,y as n,b as o,x as p};
|
package/out/chunk-QPGM3DTI.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import{b as e,h as t}from"./chunk-HETCVNO4.js";import{a as n}from"./chunk-D6NVKGGG.js";import{a as r,b as i,e as a}from"./chunk-IYPY47MC.js";import{A as o,B as s,D as c,E as l,b as u,c as d,d as f,j as p,m,p as h,s as g,t as _,w as v,z as y}from"./chunk-QRKFPLA4.js";import{B as b,b as x,c as S,i as C,x as ee,z as w}from"./chunk-74AEKRES.js";import{a as T,b as E,c as D}from"./chunk-C4Z6ZBXV.js";import{c as O,f as k,g as A,i as te}from"./chunk-2XUEZHIP.js";var ne=E(class extends D{constructor(e){if(super(e),e.type!==T.ATTRIBUTE||e.name!==`class`||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return` `+Object.keys(e).filter(t=>e[t]).join(` `)+` `}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(` `).split(/\s/).filter(e=>e!==``)));for(let e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return k}});function re(e){let t=typeof e==`string`?e.trim():``;return/^[0-9a-f]{7,64}$/iu.test(t)?t:``}function ie(e){return re(e?.commit)}function j(e,t){return typeof e==`string`&&typeof t==`string`&&e!==``&&e.toLowerCase()===t.toLowerCase()}function ae(e,t){return j(t,c(e))?ie(e?.repo):``}function oe(e,t){let n=e?.advisory?.package,r=e?.repo?.github;if(typeof n!=`string`||n===``||typeof r!=`string`||r===``)return!1;let i=c({repo:{github:r}}),a=i?.split(`/`)[1].toLowerCase();return a!==n.toLowerCase()&&a!==n.replace(/^@[^/]+\//u,``).toLowerCase()?!1:!j(i,typeof t==`string`&&t!==``?c({repo:{github:t}})??t:``)}function se(e,t){if(!oe(e,t))return e;let{repo:n,...r}=e;return{...r,_repoIgnored:!0}}var ce=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`),le=e=>x(e)?e:ce(S(String(e))),M=globalThis.trustedTypes?.createPolicy(`deepview`,{createHTML:le,createScriptURL:e=>{let t=new URL(e,globalThis.location.href);if(t.origin!==globalThis.location.origin)throw TypeError(`Not a same-origin script: ${t.href}`);return t.href}}),N=e=>M?M.createHTML(e):le(e),ue=e=>M?M.createScriptURL(String(e)):e,P={showAll:!1,packagesView:!1,dependencyPackagesView:!1,flowPackagesView:!1,bundleIssues:!1,bundleLayout:`graph`,lockfileLayout:`dependencies`,bundleReason:null,bundleReasonFor:null,selected:null,focusedPkg:null,topPkgsTab:`issues`,edgeOpacity:.22,nodeSize:1,showLabels:!1,selectedSeverities:new Set,selectedColors:new Set,pathFilter:``,hidden:new Set,solo:null,graphState:null,layoutCache:null,keptViewport:null};function de({keepViewport:e=!1}={}){P.graphState?._cleanup?P.graphState._cleanup({keepViewport:e}):e||(P.keptViewport=null),P.graphState=null}function F(e){return e.id??String(e._id)}function fe(e){let t=h(e);return t!==``&&t!==`revalidation`}var pe=[{value:`confirmed`,label:`Confirmed`,kinds:[`confirmed`,`partial`,`revalidation`]},{value:`unreachable`,label:`Unreachable`,kinds:[`unreachable`]},{value:`refuted`,label:`Refuted`,kinds:[`refuted`]}];function me(e){return pe.find(t=>t.value===e)?.kinds??null}var he=[``,`exclude`,`only`];function ge(e,t){let n=me(e);return n?.includes(`partial`)?t===`only`?[`partial`]:t===`exclude`?[`confirmed`]:n:n}function I(e){if(e.confidence!==void 0)return e.confidence;if(e.critical===!0||e._source)return 10}var _e=e=>e.confidence!==void 0||e.critical===!0;function ve(e){return e.every(e=>e.every(e=>I(e)!==void 0))&&e.some(e=>e.some(_e))}function ye(e,t,n){return e.some(e=>{let r=[`refuted`,`unreachable`].includes(n(e))?0:I(e);return r===void 0?t===0:r>=t})}function be(e,t){let n=e.map(t).filter(e=>e.length>0);if(!n.some(e=>e.some(e=>I(e)!==void 0)))return 0;let r=e=>n.reduce((t,n)=>t+ +!!n.some(t=>(I(t)??-1)>=e),0),i;for(i=r(6)<=25?6:r(7)<=25?7:8;i>0&&r(i-1)===r(i);)i--;return i}function xe(e,t){return ve(e)?t:0}function Se(e,t,n){let r=new Set(e.ruledOutIds??[]);for(let t of e)for(let e of t)[`refuted`,`unreachable`].includes(n(e))&&r.add(F(e));for(let i of e){let e=t(i);if(e.length!==0&&e.some(e=>ge(`confirmed`,``).includes(n(e)||(e._source&&!e._sourcePass?`revalidation`:``)))){for(let e of i)if(r.add(F(e)),e.isApp&&Array.isArray(e.revalidateInputs))for(let t of e.revalidateInputs)t&&r.add(t)}}return r}function Ce(e,t,n,r){let i=xe(e,t),a=e.filter(e=>ye(e,i,r));if(a.length===0)return!1;let o=new Set(ge(`confirmed`,``));return e.some(e=>e.some(e=>o.has(r(e))))?a.every(e=>e.every(e=>n.has(F(e)))):!1}function we(e,{tabs:t,kindOf:n,severityMode:r}){let i=e.map(t).filter(e=>e.length>0),a=Se(e,t,n);if(!Ce(i,be(e,t),a,n))return!1;let o=xe(i,6);return i.every(e=>!ye(e,o,n)||!e.some(e=>m(e,r)!==`low`)||e.every(e=>a.has(F(e))))}function Te(e){if(!e)return e;let t="`".repeat(Math.max(0,...[...e.matchAll(/`+/gu)].map(e=>e[0].length))+1),n=/^`|`$/u.test(e)||e.startsWith(` `)&&e.endsWith(` `)&&e.trim()!==``?` `:``;return`${t}${n}${e}${n}${t}`}var L=!0;function Ee(e,t=!1){L=e!==!1&&!t}function De(){return L}function R(e){return L?h(e):``}function Oe(e){return h(e)!==``}function ke(e){return e.some(e=>(e.groups??[]).some(e=>e.some(fe)))}function Ae(e){let t=R(e);return t&&t!==`revalidation`?t:null}function je(e){return R(e)===`revalidation`}var Me=new Set([`refuted`,`unreachable`]);function Ne(e){return Me.has(R(e))}function Pe(e){return Me.has(R(e))}function Fe(e){let t=new Set(e);return pe.filter(e=>e.kinds.some(e=>t.has(e)))}function z(e){return RegExp(`(^|/)${e}/`,`u`)}function Ie(e){return RegExp(`^(?:.*/)?${e}/(?:@[^/]+/[^/]+|[^/]+)/(.*)$`,`u`)}var Le=z(`node_modules`),Re=z(`vendor`),B=`node_modules`,ze=z(B),Be=Ie(B);function Ve(e){e!==B&&(B=e,ze=z(e),Be=Ie(e))}var He=null;function Ue(t){He?.length===t.length&&He.every((e,n)=>e===t[n])||(He=[...t],Ve(e(t)))}function We(){return B}function V(e){return ze.test(e)}var Ge=new WeakSet;function Ke(e){let t=!1;for(let n of e??[])for(let e of n.groups??[])for(let n of e){if(n.isApp!==!1)continue;let e=Ge.has(n);`isUpstream`in n&&!e||(V(n.file)?(n.isUpstream!==!0&&(t=!0),n.isUpstream=!0,Ge.add(n)):e&&(t=!0,delete n.isUpstream,Ge.delete(n)))}return t}function qe(e){let t=typeof e==`string`?e:``;return Le.test(t)||Re.test(t)||ze.test(t)}var Je=/^(.*(?:^|\/)node_modules\/(?:@[^/]+\/[^/]+|[^/]+))(?:\/|$)/u;function Ye(e){return Je.exec(typeof e==`string`?e:``)?.[1]??null}function Xe(e){if(typeof e!=`object`||!e)return null;for(let[t,n]of Object.entries(e))if(typeof n?.name==`string`&&n.name!==``)return`${t}:${n.name}@${typeof n.version==`string`?n.version:``}`;return null}var Ze=null,Qe={byRoot:new Map,byPackage:new Map},$e=e=>`${e?._managedReportId??``}\0${e?._reportName??``}`,et=(e,t)=>`${$e(e)}\0${t}`,tt=e=>c({repo:{github:e.id}})??e.id;function nt(e,t){if(e===null)return null;let n=U(t),r=U(e),[i,a]=[r.commit.toLowerCase(),n.commit.toLowerCase()];return!j(tt(r),tt(n))||r.prefix!==n.prefix||!(i.startsWith(a)||a.startsWith(i))?null:a.length>i.length?t:e}function rt(e){let t=Array.isArray(e)?e:[];if(Ze?.length===t.length&&Ze.every(([e,n],r)=>e===t[r]&&n===e?.groups))return;Ze=t.map(e=>[e,e?.groups]);let n=new Map,r=new Map,i=(e,t,n)=>e.set(t,e.has(t)?nt(e.get(t),n):n);for(let e of t)for(let t of e?.groups??[])for(let e of t){if(!e||e._repoIgnored||oe(e,e._repoFallback))continue;let t=U(e.repo);if(!t.id||!t.commit)continue;let a=Ye(e.file),o=Xe(e.package);if(a!==null){let t=et(e,a),n=r.get(t),i=n===void 0?e.repo:n&&n.pkg===o?nt(n.repo,e.repo):null;r.set(t,i&&{repo:i,pkg:o})}o!==null&&!o.endsWith(`@`)&&i(n,o,e.repo)}Qe={byRoot:r,byPackage:n}}function it(e){return typeof e!=`number`||!Number.isFinite(e)?null:n(e)}function at(e){if(e.length<=1)return{prefix:``,stripped:[...e]};let t=e.map(e=>e.split(`/`)),n=Math.min(...t.map(e=>e.length)),r=0;for(let e=0;e<n-1&&t.every(n=>n[e]===t[0][e]);e++)r=e+1;return r>0&&t[0][r-1].startsWith(`@`)&&r--,r>0&&t[0][r-1]===`node_modules`&&r--,r===0?{prefix:``,stripped:[...e]}:{prefix:`${t[0].slice(0,r).join(`/`)}/`,stripped:t.map(e=>e.slice(r).join(`/`))}}function ot(e){return e.match(Be)?.[1]??e}var H={on:new WeakMap,off:new WeakMap};function st(e){let t=L?H.on:H.off,n=t.get(e);if(n===void 0){let r=L?[Ae(e),e.revalidateVerdict,e.revalidateRecommendation]:[];n=[e.file,e.title,e.description,e.impact,e.reproduction,tn(e),e.recommendation,e.confidenceReason,...r,e.discoveredIn,e.repo?.github].filter(Boolean).join(`
|
|
2
|
-
`).toLowerCase(),t.set(e,n)}return n}function ct(e){H.on.delete(e),H.off.delete(e)}function lt(e){return[typeof e?.category==`string`?e.category.trim():``,g(e,L)].filter(Boolean).join(` · `)}function ut(e){if(e.length===0)return``;let t=e[0];for(let n=1;n<e.length;n++){for(;t&&!e[n].startsWith(t);)t=t.slice(0,-1);if(!t)return``}return t}function dt(e){if(!e)return``;let t=e.match(/github\.com\/([^/?#]+\/[^/?#]+?)(?:\.git)?(?:[/?#]|$)/iu);return t?t[1]:e}function ft(e){if(!e)return null;let t=e.trim().replace(/\/$/u,``);return t?/^https?:\/\//iu.test(t)?t:/^github\.com\//iu.test(t)?`https://${t}`:`https://github.com/${t}`:null}var pt=/^(?:@[\w.-]+\/)?[\w.-]+@[^/\s@]+$/u;function mt(e){return pt.test(e||``)}function U(e){if(e==null||typeof e==`string`)return{id:e??``,prefix:``,commit:``};let t=l(e);return{id:typeof e.github==`string`?e.github:``,prefix:t?`${t}/`:``,commit:ie(e)}}function ht(e,t,n,r=``){if(mt(e))return null;let i=U(t),a=U(n),o=re(r);if(i.id){let t=c({repo:{github:i.id}}),n=ft(t??i.id),r=j(t,c({repo:{github:a.id}}));return`${n}/blob/${i.commit||(r?a.commit:``)||(r||!qe(e)?o:``)||`HEAD`}/${i.prefix}${ot(e)}`}if(V(e))return null;let s=ft(a.id);return s?`${s}/blob/${a.commit||o||`HEAD`}/${a.prefix}${e}`:null}function gt(e,t){let n=e?.file??``,r=W(e,t);return r?O`<a href="${_t(r)}" target="_blank" rel="noopener">${n}</a>`:n}function _t(e){return e.replace(/#L\d+(?:-L?\d+)?$/u,``)}function vt({start:e,end:t}){return t>e?`#L${e}-L${t}`:`#L${e}`}function W(e,t){if(!e)return null;if(s(e.location))return e.location;let n=ht(e.file,e.repo,t,e.auditedCommit);if(!n)return null;let r=q(e.line);if(r)return`${n}${vt(r)}`;let i=parseInt(e.line,10);return Number.isFinite(i)?`${n}#L${i}`:n}var yt=/^https?:\/\/(?:www\.)?github\.com\/([^/\s]+\/[^/\s]+)\/(?:blob|tree|blame)\/[^/\s]+\/(\S+)$/u,bt=/#L(\d+)(?:-L?(\d+))?$/u;function xt(e){let t=typeof e==`string`?yt.exec(e):null;if(!t)return``;let n=t[2],r=bt.exec(n);if(!r)return`${t[1]}/${n}`;n=n.slice(0,r.index);let i=r[2]?`${r[1]}-${r[2]}`:r[1];return`${t[1]}/${n}:${i}`}var St=/^(?:\s+\S|[-*+] |\d+[.)] |>|#{1,6}(?:[ \t]|$)|\||`{3}|~{3})/u;function Ct(e){return e.split(/(\n{2,})/u).map(e=>{if(/^\n+$/u.test(e))return e;let t=e.split(`
|
|
3
|
-
`);return t.some(e=>St.test(e)||K.test(e))?e:t.map(e=>e.trim()).filter(Boolean).join(` `)}).join(``)}function wt(e,t,n){let r=t?/^\n*/u.exec(e)[0]:``,i=e.slice(r.length),a=n?/\n*$/u.exec(i)[0]:``;return r+Ct(i.slice(0,i.length-a.length))+a}function Tt(e){if(!e)return e;let t=e.replaceAll(`\r
|
|
4
|
-
`,`
|
|
5
|
-
`),n=u(t);if(n.length===0)return Ct(t);let r=[],i=0;for(let[e,a]of n)e>i&&r.push(wt(t.slice(i,e),i>0,!0)),r.push(t.slice(e,a)),i=a;return i<t.length&&r.push(wt(t.slice(i),!0,!1)),r.join(``)}var Et=/^( *)(`{3,}|~{3,})(.*)$/u,Dt=/^[a-z0-9+#._-]{1,20}$/u;function Ot(e,t){let n=0;for(;n<t&&e[n]===` `;)n++;return e.slice(n)}function kt(e){let t=e.split(`
|
|
6
|
-
`),n=Et.exec(t[0]),r=(n?.[2]??"```").slice(0,3),i=(n?.[3]??``).trim().split(/\s+/u)[0].toLowerCase(),a=!!(t.length>1?Et.exec(t.at(-1)):null)?.[2].startsWith(r),o=n?.[1].length??0,s=t.slice(1,a?-1:void 0);return{lang:Dt.test(i)?i:``,code:(o>0?s.map(e=>Ot(e,o)):s).join(`
|
|
7
|
-
`)}}function At(e){let t=u(e||``);if(t.length===0)return[e];let n=[],r=0,i=(e,t)=>{let r=(t?e.replace(/^\n+/u,``):e).replace(/\n+$/u,``);r&&n.push(r)};for(let[a,o]of t)a>r&&i(e.slice(r,a),r>0),n.push(kt(e.slice(a,o))),r=o;return r<e.length&&i(e.slice(r),!0),n}var G=/^( *)(?:[-*+]|(\d{1,9})[.)]) +(?=\S)/u,K=/^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/u;function jt(e){return/^ */u.exec(e)[0].length}function Mt(e){let t=e.length;for(;t>0&&!e[t-1].trim();)t--;return e.slice(0,t).join(`
|
|
8
|
-
`)}function Nt(e){let t=[],n=0;for(let r of e)t.push(n),n+=r.length+1;return t}function Pt(e){let t=typeof e==`string`?e:``;if(!t)return[e];let n=u(t),r=t.split(`
|
|
9
|
-
`),i=Nt(r),a=e=>!d(n,i[e])&&!K.test(r[e])&&G.test(r[e]),o=[],s=0,c=0,l=e=>{let t=r.slice(s,e).join(`
|
|
10
|
-
`).replace(/^\n+/u,``).replace(/\n+$/u,``);t.trim()&&o.push(t)};for(;c<r.length;){if(!a(c)){c++;continue}l(c);let e=G.exec(r[c]),t=!!e[2],u=[],f=null,p=!1;for(;c<r.length;){let e=r[c];if(!d(n,i[c])){if(!e.trim()){f.lines.push(``),p=!0,c++;continue}let n=jt(e),r=K.test(e)?null:G.exec(e);if(r&&(!f||n<f.column)){if(!!r[2]!==t)break;f&&u.push(Mt(f.lines)),f={column:r[0].length,lines:[e.slice(r[0].length)]},p=!1,c++;continue}if(n<f.column&&(p||Ft.test(e)||K.test(e)||Rt.test(e)))break}f.lines.push(Ot(e,f.column)),p=!1,c++}f&&u.push(Mt(f.lines)),o.push({ordered:t,start:t?Number(e[2]):null,items:u}),s=c}return o.length===0?[e]:(l(r.length),o)}var Ft=/^ {0,3}(#{1,6})[ \t]+(\S.*?)(?:[ \t]+#+)?[ \t]*$/u,It=/^ {0,3}-+[ \t]*$/u;function Lt(e){let t=e.split(`
|
|
11
|
-
`),n=[],r=0,i=e=>{let i=t.slice(r,e).join(`
|
|
12
|
-
`).replaceAll(/^(?:[ \t]*\n)+|(?:\n[ \t]*)+$/gu,``);i.trim()&&n.push(i)};return t.forEach((e,a)=>{let o=Ft.exec(e),s=K.test(e)&&(a===r||!t[a-1].trim()||!It.test(e));!o&&!s||(i(a),n.push(o?{level:o[1].length,text:o[2]}:{rule:!0}),r=a+1)}),n.length===0?[e]:(i(t.length),n)}var Rt=/^ {0,3}>/u,zt=/^ {0,3}> ?/u,Bt=/^[ \t]*\[!(note|tip|important|warning|caution)\][ \t]*$/iu,Vt=/^ {0,3}(?:`{3}|~{3})/u,Ht=/^(?: {0,3}> ?| *(?:[-*+]|\d{1,9}[.)])(?: +|$))*/u,Ut=16,Wt=e=>Ft.test(e)||K.test(e)||Vt.test(e);function Gt(e,t){let n=Et.exec(t);return n?e?n[2][0]===e[0]&&n[2].length>=e.length&&!n[3].trim()?``:e:n[2][0]==="`"&&n[3].includes("`")?``:n[2]:e}function Kt(e){let t=0,n=e.length;for(;t<n&&!e[t].trim();)t++;for(;n>t&&!e[n-1].trim();)n--;return e.slice(t,n).join(`
|
|
13
|
-
`)}function qt(e,{alerts:t=!0}={}){let n=typeof e==`string`?e:``;if(!/^ {0,3}>/mu.test(n))return[e];let r=u(n),i=n.split(`
|
|
14
|
-
`),a=Nt(i),o=e=>Rt.test(i[e])&&!d(r,a[e]),s=[],c=0,l=0;for(;l<i.length;){if(!o(l)){l++;continue}l>c&&s.push(i.slice(c,l).join(`
|
|
15
|
-
`));let e=[],n=``,r=!1;for(;l<i.length;l++){let t=i[l];if(o(l)){let i=t.replace(zt,``),a=n!==``;n=Gt(n,i);let o=i.replace(Ht,``);r=!a&&!n&&o.trim()!==``&&!Wt(o),e.push(i)}else if(r&&t.trim()&&!Wt(t)&&!G.test(t))e.push(t);else break}let a=t?Bt.exec(e[0]):null,u=a?Kt(e.slice(1)):``;s.push({quote:!0,alert:u?a[1].toLowerCase():null,body:u||Kt(e)}),c=l}return c<i.length&&s.push(i.slice(c).join(`
|
|
16
|
-
`)),s}function Jt(e,t=Ut){return t<=0?e:qt(e).map(e=>typeof e==`string`?e:Jt(e.body,t-1)).join(`
|
|
17
|
-
`)}var Yt=/^(\d+)(?:\s*-\s*(\d+))?$/u;function q(e){if(typeof e==`number`)return Number.isFinite(e)&&e>=1?{start:Math.floor(e),end:Math.floor(e)}:null;let t=Yt.exec(String(e??``).trim());if(!t)return null;let n=parseInt(t[1],10),r=t[2]===void 0?n:parseInt(t[2],10);return!Number.isFinite(n)||n<1||!Number.isFinite(r)||r<1?null:{start:Math.min(n,r),end:Math.max(n,r)}}function Xt(e){return e?e.start===e.end?String(e.start):`${e.start}-${e.end}`:``}function Zt(e){if(e&&typeof e==`object`){let t=q(e.start);if(!t)return null;let n=q(e.end)??t;return{start:t.start,end:Math.max(t.start,n.end)}}return q(e)}function Qt(e,t,n=4){let r=typeof e==`string`&&e!==``?e.split(`
|
|
18
|
-
`):[];if(r.length===0)return{text:``,startLine:1,lines:[]};let i=Zt(t),a=i&&{start:Math.min(i.start,r.length),end:Math.min(i.end,r.length)},o=a?Math.max(1,a.start-n):1,s=a?Math.min(r.length,a.end+n):Math.min(r.length,n*2+1),c=r.slice(o-1,s);return{text:c.join(`
|
|
19
|
-
`),startLine:o,lines:c}}function $t(e,t,n,r,i=null){if(s(e?.url))return e.url;let a=e?.file;if(typeof a!=`string`||a===``)return null;let o=t?.file??``,c=t?.repo?.github,l=t?.auditedCommit,u=()=>c?W({file:a,line:e?.line,repo:t.repo,auditedCommit:l},n):null;if(r===0&&a===o)return W(String(e?.line??``).trim()===String(t?.line??``).trim()?t:{file:a,line:e?.line,repo:t.repo,auditedCommit:l},n);if(U(e?.repo).id)return W({file:a,line:e?.line,repo:e.repo},n);let d=Ye(a),f=Xe(e?.package),p=f===null?d!==null&&d===Ye(o):f===Xe(t?.package);if(c&&p)return u();let m=d===null?null:Qe.byRoot.get(et(t,d)),h=(f===null?null:Qe.byPackage.get(f))??(m&&(f===null||m.pkg===f)?m.repo:null);if(h)return W({file:a,line:e?.line,repo:h},n);if(qe(a)){let t=i?.(e);return t?W({file:t.file,line:e?.line,repo:t.repo},n):null}return c&&!qe(o)?u():W({file:a,line:e?.line,auditedCommit:l},n)}function en(e,{spaced:t=!1,link:n=e=>e.url,lineLinks:r=!1}={}){let i=Array.isArray(e?.evidence)?e.evidence:[];return i.length===0?``:i.map((e,t)=>{let i=y(e),a=n(e,t),s=[`${t+1}. ${a?`[${i}](${a})`:r?Te(i):i}`],c=r?rn(o(e),a):o(e);if(c)for(let e of c.split(`
|
|
20
|
-
`))s.push(` ${e}`);return s.join(`
|
|
21
|
-
`)}).join(t?`
|
|
22
|
-
|
|
23
|
-
`:`
|
|
24
|
-
`)}function tn(e,{repoFallback:t,shipped:n=null}={}){let r=t!==void 0,i=en(e,{link:r?(r,i)=>$t(r,e,t,i,n):void 0,lineLinks:r});return i?`**Evidence:**
|
|
25
|
-
${i}`:``}var nn=/\(\s*(?:lines?|L)\s*(\d+)(?:\s*(?:-|–|—|to)\s*L?(\d+))?\s*\)/giu;function rn(e,t){if(!e||!t||!yt.test(t)||!/\(\s*(?:lines?|L)\s*\d/iu.test(e))return e;let n=_t(t),r=e=>{let t=an(e);return e.replaceAll(nn,(e,r,i,a)=>{let o=d(t,a)?null:q(i?`${r}-${i}`:r);return o?`([${e.slice(1,-1).trim()}](${n}${vt(o)}))`:e})},i=``,a=0;for(let[t,n]of u(e))i+=r(e.slice(a,t))+e.slice(t,n),a=n;return i+r(e.slice(a))}function an(e){let t=[],n=[...e.matchAll(/`+/gu)].map(e=>[e.index,e.index+e[0].length]),r=[],i=new Map;for(let e=n.length-1;e>=0;e--){let t=n[e][1]-n[e][0];r[e]=i.get(t),i.set(t,e)}for(let e=0;e<n.length;e++)r[e]!==void 0&&(t.push([n[e][0],n[r[e]][1]]),e=r[e]);let[a,o,s,c]=[`
|
|
26
|
-
`,`]`,`)`,`>`].map(t=>{let n=Array.from({length:e.length+1},()=>1/0);for(let r=e.length-1;r>=0;r--)n[r]=e[r]===t?r:n[r+1];return n}),l=t.length,u=0;for(let n=0;n<e.length;n++){for(;u<l&&t[u][1]<=n;)u++;if(u<l&&t[u][0]<=n){n=t[u][1]-1;continue}let r=-1;if(e[n]===`[`&&o[n+1]<a[n]){r=o[n+1]+1;let t=e[r]===`(`?s[r]:e[r]===`[`?o[r+1]:1/0;t<a[r]&&(r=t+1)}else if(e[n]===`<`&&c[n+1]<a[n])r=c[n+1]+1;else if((e[n]===`h`||e[n]===`H`)&&/^https?:\/\//iu.test(e.slice(n,n+8))&&!/\w/u.test(e[n-1]??``))for(r=n;r<e.length&&!/\s/u.test(e[r]);)r++;r>n&&(t.push([n,r]),n=r-1)}t.sort((e,t)=>e[0]-t[0]);let d=[];for(let[e,n]of t){let t=d.at(-1);t&&e<t[1]?t[1]=Math.max(t[1],n):d.push([e,n])}return d}function on(e){let t=/^\[([^\]]+)\]\(([^)\s]+)\)$/u.exec(e);return!t||!s(t[2])?null:{label:f(t[1].trim())||t[2],url:t[2]}}function sn(e,t){let n=parseInt(e?.line,10);if(!Number.isFinite(n))return A;let r=W(e,t),i=`line ${n}`;return r?O`<a href="${r}" target="_blank" rel="noopener">${i}</a>`:i}function cn(e,t){return!e||!t?null:`${/^https?:/iu.test(e)?e.replace(/\/$/u,``):`https://github.com/${e}`}/commit/${t}`}var ln=[[`Impact`,`impact`],[`Reproduction`,`reproduction`],[`Recommendation`,`recommendation`],[`Confidence reason`,`confidenceReason`],[`Revalidation verdict`,`revalidateVerdict`],[`Revalidation recommendation`,`revalidateRecommendation`]];function un(e,t){let n=[];t&&n.push(`Repo: ${t}`);let r=y(e);r&&n.push(`Location: ${r}`),e?.confidence!=null&&n.push(`Confidence: ${e.confidence}/10`);let i=R(e);i&&n.push(`Revalidation: ${i}`);let a=[];n.length>0&&a.push(n.join(`
|
|
27
|
-
`));let{title:o,body:s}=v(e);o&&a.push(`# ${o}`),s&&a.push(s.trim());let c=en(e,{spaced:!0});c&&a.push(`# Evidence
|
|
28
|
-
|
|
29
|
-
${c}`);for(let[t,n]of ln){if(!L&&n.startsWith(`revalidate`))continue;let r=_(e?.[n],e)?.trim();r&&a.push(`# ${t}
|
|
30
|
-
|
|
31
|
-
${r}`)}return a.join(`
|
|
32
|
-
|
|
33
|
-
`)}function dn(e,{title:t,body:n,labels:r=[]}={}){let i=ft(e);if(!i)return null;let a;try{a=new URL(i).host.toLowerCase()}catch{return null}if(a!==`github.com`)return null;let o=new URLSearchParams;t&&o.set(`title`,t),n&&o.set(`body`,n),r.length>0&&o.set(`labels`,r.join(`,`));let s=o.toString();return s?`${i}/issues/new?${s}`:`${i}/issues/new`}var fn=/^[a-zA-Z\d](?:-?[a-zA-Z\d])*$/u,pn=/^[a-zA-Z\d._-]+$/u,mn=/^[1-9]\d{0,9}$/u,hn=/^[a-fA-F\d]{7,40}$/u,gn=/^#[\w-]+$/u,_n=/^GHSA(?:-[0-9a-z]{4}){3}$/u;function vn(e){return e.length<=39&&fn.test(e)}function yn(e){return e.length<=100&&e!==`.`&&e!==`..`&&pn.test(e)}function bn(e){let t;try{t=new URL(e)}catch{return null}if(t.href!==e||t.protocol!==`https:`||t.hostname.toLowerCase()!==`github.com`||t.port||t.username||t.password)return null;let n=t.pathname.split(`/`);if(n.at(-1)===``&&n.pop(),n.length===3&&n[1]===`advisories`){let e=n[2];return _n.test(e)?{url:`https://github.com/advisories/${e}`,label:e}:null}if(n.length===6&&n[3]===`security`&&n[4]===`advisories`){let[,e,t,,,r]=n;return!vn(e)||!yn(t)||!_n.test(r)?null:{url:`https://github.com/${e}/${t}/security/advisories/${r}`,label:r}}if(n.length!==5)return null;let[,r,i,a,o]=n;if(!vn(r)||!yn(i))return null;let s;if(a===`issues`||a===`pull`){if(!mn.test(o))return null;s=`${r}/${i}#${o}`}else if(a===`commit`){if(!hn.test(o))return null;s=`${r}/${i}@${o.slice(0,7)}`}else return null;return{url:`https://github.com/${r}/${i}/${a}/${o}${gn.test(t.hash)?t.hash:``}`,label:s}}var xn=/^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/u;function Sn(e){if(typeof e!=`string`)return null;let t=Cn(e);return t!==e||xn.test(e)?t.slice(0,8):null}function Cn(e){let t=String(e);return t.startsWith(`https://chatgpt.com/codex/cloud/security/findings/`)?t.slice(50):t}function wn(e,n){let r=t(e,{managed:n});if(!r)return null;let i=Sn(r.id);return{url:n?r.path:`#${r.fragment}`,label:i?`finding ${i}`:`finding`,self:!0}}var Tn=/https?:\/\/[^\s<>"'`(){}[\]|\\^]+/giu,En=new Set([`)`,`.`,`,`,`!`,`?`,`;`,`:`,`'`,`"`,`*`,`]`,`}`,`>`]);function Dn(e){let t=e.length;for(;t>0&&En.has(e[t-1]);)t--;return t===e.length?e:e.slice(0,t)}function On(e,{managed:t=!1}={}){if(typeof e!=`string`||e.length===0)return[];let n=[],r=0;Tn.lastIndex=0;let i;for(;(i=Tn.exec(e))!==null;){let a=Dn(i[0]),o=a?bn(a)??wn(a,t):null;o&&(i.index>r&&n.push(e.slice(r,i.index)),n.push(o),r=i.index+a.length,Tn.lastIndex=r)}return r<e.length&&n.push(e.slice(r)),n}var kn={commit:w},An=8;function jn(e){let t;try{t=e?JSON.parse(e):null}catch{return null}let n=e=>typeof e==`string`&&e?e:null;return t&&{tags:Array.isArray(t.tags)?t.tags.filter(n):[],details:typeof t.title==`string`?{title:t.title,authorName:n(t.authorName),authorLogin:n(t.authorLogin),date:Number.isSafeInteger(t.date)?t.date:null}:null}}function Mn({title:e,authorName:t,authorLogin:n,date:r}){let i=document.createElement(`div`);i.className=`tooltip-commit-details`;let a=document.createElement(`span`);a.className=`tooltip-commit-message`,a.textContent=e;let o=document.createElement(`span`);return o.className=`tooltip-commit-meta`,o.textContent=[t&&n&&t!==n?`${t} (@${n})`:t??(n&&`@${n}`),r===null?``:new Date(r).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})].filter(Boolean).join(` · `),i.append(...e?[a]:[],o),i}var J;function Nn(){return J||(J=document.createElement(`div`),J.id=`styled-tooltip`,J.setAttribute(`popover`,`manual`),document.body.append(J),J)}function Pn(e){typeof e.showPopover==`function`&&(e.matches(`:popover-open`)&&e.hidePopover(),e.showPopover())}var Y=null,Fn=``,X=null,Z=null,In=0,Ln=0,Rn=!1;function zn(){if(!Rn){Rn=!0,document.addEventListener(`mousemove`,e=>{In=e.clientX,Ln=e.clientY},{passive:!0});for(let e of[`pointerdown`,`wheel`,`scroll`])document.addEventListener(e,()=>$(),{capture:!0,passive:!0});document.addEventListener(`keydown`,e=>{e.key===`Escape`&&$()}),window.addEventListener(`blur`,()=>$())}}var Bn=100,Vn=14,Hn=8,Q=8;function Un(e,{placement:t=`cursor`}={}){zn(),clearTimeout(X),X=null,Z=null,e.prepareTooltip?.(e),t=e.dataset.tooltipPlacement??t;let n=Nn(),i=e.dataset.tooltip??``,a=Object.hasOwn(kn,e.dataset.tooltipIcon??``)?e.dataset.tooltipIcon:``,o=e.dataset.tooltipRepo??``,s=r(e.dataset.tooltipCommit),c=jn(e.dataset.tooltipCommitInfo),l=[`stasis`,`sourcemap`].includes(e.dataset.tooltipBundle)?e.dataset.tooltipBundle:``,u=e.dataset.tooltipStats??``,d=e.dataset.tooltipBuilt===`true`,f=e.dataset.tooltipPackage??``,p=e.dataset.tooltipEcosystem??``,m=e.dataset.tooltipVersion??``,h=e.dataset.tooltipFiles??``,g=e.dataset.tooltipLoc??``,_=e.dataset.tooltipSize??``,v=e.tooltipContent??null,y=v??JSON.stringify([i,a,o,s,c,l,u,d,f,p,m,h,g,_]);if(!i){$();return}if(Y===e&&Fn===y)return;if(n.textContent=a||v?``:i,v){let e=document.createElement(`div`);e.className=`tooltip-rich`,te(v,e),n.append(e)}if(a){let e=document.createElement(`span`);e.className=`tooltip-text`,e.innerHTML=N(kn[a]);let t=document.createElement(`span`);t.textContent=i,e.append(t),n.append(e)}if(f){let t=document.createElement(`div`);t.className=`tooltip-package`;let r=(e.querySelector(`[data-tooltip-package-icon] svg`)??e.querySelector(`svg`))?.cloneNode(!0);r&&t.append(r);let i=document.createElement(`span`);i.className=`tooltip-package-details`;let a=(e,t)=>/^\d+$/u.test(e)?`${Number(e).toLocaleString()} ${t}`:``;for(let e of[f,m,a(h,h===`1`?`file`:`files`),a(g,`LoC`),_].filter(Boolean)){let t=document.createElement(`span`);t.textContent=e,i.append(t)}t.append(i),n.append(t)}if(o||s){let e=document.createElement(`div`);if(e.className=`tooltip-repo`,o){e.innerHTML=N(ee);let t=document.createElement(`span`);t.textContent=o,e.append(t)}if(s){let t=document.createElement(`span`);t.className=`tooltip-commit`,t.innerHTML=N(w);let n=document.createElement(`span`);n.textContent=s.slice(0,7),t.append(n),e.append(t)}if(n.append(e),s&&c?.tags.length){let e=document.createElement(`div`);e.className=`tooltip-tags`;for(let t of c.tags.slice(0,An)){let n=document.createElement(`span`);n.className=`tooltip-tag`,n.innerHTML=N(b);let r=document.createElement(`span`);r.textContent=t,n.append(r),e.append(n)}if(c.tags.length>An){let t=document.createElement(`span`);t.className=`tooltip-tag-more`,t.textContent=`+${(c.tags.length-An).toLocaleString()} more`,e.append(t)}n.append(e)}}if(c?.details&&n.append(Mn(c.details)),l||u||d){let e=document.createElement(`div`);if(e.className=`tooltip-bundle`,l===`stasis`){let t=document.createElement(`img`);t.src=`./stasis.svg`,t.alt=``,e.append(t)}else e.innerHTML=N(C);let t=document.createElement(`span`);t.textContent=[l===`stasis`?`Stasis`:l===`sourcemap`?`Sourcemap`:``,d?`Built on server`:``,u].filter(Boolean).join(` · `),e.append(t),n.append(e)}Pn(n),n.style.left=`0px`,n.style.top=`0px`,n.style.transform=`none`,n.classList.add(`visible`);let x=In,S=Ln+Vn;if(t===`right`||t===`right-start`){let n=e.getBoundingClientRect();x=n.right+Hn,S=n.top+(t===`right`?n.height/2:0)}let T=window.innerWidth-n.offsetWidth-Q,E=Math.max(Q,Math.min(x,T));n.style.left=`${Math.round(E)}px`;let D=n.offsetHeight,O=t===`right`?S-D/2:S,k=window.innerHeight-D-Q,A=Math.max(Q,Math.min(O,k));n.style.top=`${Math.round(A)}px`,Y=e,Fn=y}function $(e){e&&!e.contains(Y)&&!e.contains(Z)||(clearTimeout(X),X=null,Z=null,J&&(J.classList.remove(`visible`),typeof J.hidePopover==`function`&&J.matches(`:popover-open`)&&J.hidePopover()),Y=null)}function Wn(e,{gate:t,placement:n}={}){zn();let r=()=>e.isConnected!==!1&&(!Object.hasOwn(e.dataset,`tooltipTruncated`)||e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)&&(!t||t(e));r()?e===Y||e===Z||($(),Z=e,X=setTimeout(()=>{X=null,Z=null,r()&&Un(e,{placement:n})},Bn)):$()}var Gn=new WeakSet;function Kn(e,t){for(let n of e.composedPath()){if(n===t)break;if(n.nodeType===1&&Object.hasOwn(n.dataset,`tooltip`))return n}return null}function qn(e,t){!e||Gn.has(e)||(Gn.add(e),e.ownerDocument&&zn(),e.addEventListener(`mouseover`,n=>{if(n.buttons){$();return}let r=Kn(n,e);r?r!==Y&&Wn(r,t):$()}),e.addEventListener(`mouseout`,t=>{let n=Kn(t,e),r=t.relatedTarget?.closest?.(`[data-tooltip]`)??null;n&&n===r||$()}),e.addEventListener(`scroll`,()=>$(e),{capture:!0,passive:!0}))}var Jn=!1;function Yn(){Jn||(Jn=!0,zn(),document.addEventListener(`tooltip-root-connected`,e=>{qn(e.composedPath()[0]?.shadowRoot)}),document.body.addEventListener(`mouseover`,e=>{if(e.target.closest(`[data-tooltip-managed]`))return;if(e.buttons){$();return}let t=e.target.closest(`[data-tooltip]`);!t||t===Y||Wn(t)}),document.body.addEventListener(`mouseout`,e=>{e.target.closest(`[data-tooltip-managed]`)||e.relatedTarget?.closest?.(`[data-tooltip-managed]`)||!Y&&!X||(Y??Z)?.contains(e.relatedTarget)||$()}))}function Xn(e){return`tree-`+e.replaceAll(/[^\w-]+/gu,`_`)}var Zn=()=>Object.fromEntries(p.map(e=>[e,0]));function Qn(e,t){let n=new Map;for(let r of e)for(let e of r){n.has(e.file)||n.set(e.file,Zn());let r=n.get(e.file),i=m(e,t);r[i]!==void 0&&r[i]++}return n}var $n={trees:[],merged:null};function er(e){let t=e.map(e=>e?.tree??null);return t.length===$n.trees.length&&t.every((e,t)=>e===$n.trees[t])||($n={trees:t,merged:tr(e)}),$n.merged}function tr(e){let t=null;for(let n of e)if(n?.tree){t||={};for(let e of Object.keys(n.tree)){let r=n.tree[e];if(!t[e]){t[e]={...r,imports:[...r.imports??[]]};continue}let i=new Set(t[e].imports);for(let n of r.imports??[])i.has(n)||(i.add(n),t[e].imports.push(n));t[e].size==null&&r.size!=null&&(t[e].size=r.size)}}return t}function nr(e,t){let n=Object.keys(e),r=new Map(n.map((e,t)=>[e,t])),i=n.map(()=>Zn()),a=n.map(()=>[]);for(let[t,i]of n.entries())for(let n of e[i].imports??[]){let e=r.get(n);e!==void 0&&a[e].push(t)}let o=new Uint32Array(n.length),s=0;for(let[e,n]of t){let t=r.get(e);if(t===void 0||!n)continue;let c=p.map(e=>[e,n[e]??0]).filter(([,e])=>e!==0);if(c.length===0)continue;let l=++s,u=[],d=e=>{o[e]!==l&&(o[e]=l,u.push(e))};for(let e of a[t])d(e);for(;u.length>0;){let e=u.pop();for(let[t,n]of c)i[e][t]+=n;for(let t of a[e])d(t)}}return new Map(n.map((e,t)=>[e,i[t]]))}function rr(e,t,n){let r=t.get(e),i=n.get(e);return ir(r)>0||ir(i)>0}function ir(e){if(!e)return 0;let t=0;for(let n of p)t+=e[n]??0;return t}function ar(e){if(!e)return null;let t=We(),n=RegExp(`^(?:.*/)?${t}/(@[^/]+/[^/]+|[^/]+)`,`u`),r=e.match(n);return r?r[1]:`__own__`}function or(e){return new Set(e.filter(e=>!V(e)))}var sr=[`#4e9af1`,`#f28e2b`,`#59a14f`,`#e15759`,`#76b7b2`,`#edc948`,`#b07aa1`,`#ff9da7`,`#9c755f`,`#5cd1e5`,`#f1ce63`,`#d37295`,`#a0cbe8`,`#86bcb6`,`#8cd17d`,`#b6992d`,`#499894`,`#e15759`,`#e879c7`,`#d4a6c8`],cr=[`#2f8aef`,`#d2691e`,`#2ea043`,`#e63946`,`#2e9a92`,`#b88817`,`#9560e8`,`#d24a9c`,`#8a5d40`,`#0891b2`,`#a07a14`,`#c14e8e`,`#1f7ad0`,`#549b94`,`#3fb95f`,`#a07a14`,`#2a8278`,`#cb2c40`,`#c026d3`,`#965f93`];function lr(){if(typeof document>`u`)return!1;let e=document.body?.classList;return!!e&&(e.contains(`theme-light`)||e.contains(`theme-pink`)||e.contains(`theme-w95`)||e.contains(`theme-paper`))}var ur=new Map;function dr(e){let t=lr()?cr:sr;return t[e%t.length]}var fr=()=>lr()?`#8c959f`:`#6e7681`;function pr(e){let t=lr(),n=t?cr:sr,r=e??`__own__`,i=`${t?`l`:`d`}:${r}`;if(ur.has(i))return ur.get(i);let a=0;for(let e of r)a=a*37+e.codePointAt(0)|0;let o=n[((a%n.length+n.length)%n.length*7+3)%n.length];return ur.set(i,o),o}function mr(e,t){if(!t||t===`/`||t===`__own__`)return e;for(let n of[`node_modules`,`dependencies`,We()]){let r=n+`/`+t+`/`,i=e.indexOf(r);if(i>=0)return e.slice(i+r.length)}return e.startsWith(t+`/`)?e.slice(t.length+1):e}function hr(e){let t=e.origFile??e.file,n=mr(t,e.pkg),r=n===t?t:`${a(e.pkg)}/${n}`;return r===t?e.file:r}var gr={package:`@babel/core`,path:/^lib\/config\//u},_r={package:`@babel/core`,path:/^lib\/config\/files\/(?:module-types|plugins)\.js$/u},vr=Object.freeze([{id:`react-native-codegen-discovery`,reason:`Codegen discovers package metadata and React Native configuration.`,from:{package:`react-native`,path:/^scripts\/codegen\/generate-artifacts-executor\.js$/u},to:{path:/(?:^|\/)(?:package\.json|react-native\.config\.js)$/u}},{id:`react-native-release-version`,reason:`The CLI release checker reads the installed React Native version.`,from:{package:`@react-native-community/cli-tools`,path:/^build\/releaseChecker\/index\.js$/u},to:{package:`react-native`,path:/^package\.json$/u}},{id:`react-native-platform-config`,reason:`React Native configuration loads platform CLIs supplied by the host project.`,from:{package:`react-native`,path:/^react-native\.config\.js$/u},to:{package:/^@react-native-community\/cli-platform-(?:android|ios)$/u,path:/^build\/index\.js$/u}},{id:`babel-project-config`,reason:`Babel discovers project configuration.`,from:gr,to:{path:/(?:^|\/)babel\.config\.js$/u}},{id:`babel-typescript-preset`,reason:`Babel configuration loads the TypeScript preset.`,from:gr,to:{package:`@babel/preset-typescript`,path:/./u}},{id:`babel-react-native-preset`,reason:`Babel config loaders load the configured React Native preset.`,from:_r,to:{package:`@react-native/babel-preset`,path:/^(?:src\/)?index\.js$/u}},{id:`babel-reanimated-plugin`,reason:`Babel config loaders load the configured Reanimated plugin, including scoped copies.`,from:_r,to:{package:/^(?:@[^/]+\/)?react-native-reanimated$/u,path:/^plugin\/index\.js$/u}},{id:`babel-transform-plugin`,reason:`Babel config loaders load configured transform plugins.`,from:_r,to:{package:/^@babel\/plugin-transform-[^/]+$/u,path:/^lib\/index\.js$/u}},{id:`cosmiconfig-config`,reason:`Cosmiconfig loads discovered configuration, including dependency configuration.`,from:{package:`cosmiconfig`,path:/^dist\/loaders\.js$/u},to:{path:/\.config\.js$/u}},{id:`import-fresh-own-config`,reason:`import-fresh loads host-project configuration.`,from:{package:`import-fresh`,path:/./u},to:{path:/\.config\.js$/u},ownSourceOnly:!0}].map(e=>Object.freeze({...e,from:Object.freeze(e.from),to:Object.freeze(e.to)})));function yr(e){return typeof e==`string`&&!e.includes(`\\`)&&!e.includes(`:`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e!==`node_modules`)}function br(e,t){let n=e.package;return n!==void 0&&t.ownSource===!0?!1:(n===void 0||(typeof n==`string`?n===t.package:n.test(t.package??``)))&&e.path.test(t.path)}function xr(e,t){if(e?.ownSource!==!0&&yr(e?.path)&&yr(t?.path))return vr.find(n=>(!n.ownSourceOnly||t.ownSource===!0)&&br(n.from,e)&&br(n.to,t))}function Sr(e,t){let n=e.split(/(?:^|\/)node_modules\//u).slice(1).at(-1)?.match(/^(@[^/]+\/[^/]+|[^/]+)\/(.+)$/u);return{package:n?.[1],path:n?.[2]??e.replace(/^\/+/u,``),ownSource:t??i(e)===`__own__`}}function Cr(e,t,n,r){return!xr(Sr(e,r),Sr(t,n))}function wr(e,t=e=>e.file){let n=new Map(e.nodes.map(e=>[e.file,e])),r=new Map(e.nodes.map(e=>[t(e),new Set]));for(let[i,a]of e.importsOf){let o=n.get(i);if(o)for(let s of a){let a=n.get(s);a&&Cr(o.origFile??i,a.origFile??s,e.ownSourceFiles?.has(s),e.ownSourceFiles?.has(i))&&r.get(t(o)).add(t(a))}}return r}var Tr=class{constructor(e){this.nodes=[...e];for(let[e,t]of this.nodes.entries())t.position=e;for(let e=(this.nodes.length>>1)-1;e>=0;e--)this.down(e)}before(e,t){return Math.abs(e.balance)>Math.abs(t.balance)||Math.abs(e.balance)===Math.abs(t.balance)&&(e.balance>t.balance||e.balance===t.balance&&e.tie<t.tie)}swap(e,t){let n=this.nodes,r=n[e];n[e]=n[t],n[t]=r,n[e].position=e,n[t].position=t}down(e){let t=this.nodes;for(;2*e+1<t.length;){let n=2*e+1;if(n+1<t.length&&this.before(t[n+1],t[n])&&n++,!this.before(t[n],t[e]))break;this.swap(e,n),e=n}}update(e){if(e.position<0)return;let t=e.position;for(;t>0;){let n=t-1>>1;if(!this.before(e,this.nodes[n]))break;this.swap(t,n),t=n}this.down(t)}take(){let e=this.nodes[0],t=this.nodes.pop();return e.position=-1,this.nodes.length>0&&(this.nodes[0]=t,t.position=0,this.down(0)),e}};function Er(e,t){for(let n=0;n<8;n++){let r=!1;for(let i=0;i<e.length-1;i++){let a=n%2?e.length-2-i:i,o=e[a],s=e[a+1];(t.get(s)?.get(o)?.cycleCount??0)<=(t.get(o)?.get(s)?.cycleCount??0)||(e[a]=s,e[a+1]=o,r=!0)}if(!r)break}return e}function Dr(e){let t=[],n=new Set;for(let t of e.values())t.outgoing.sort((e,t)=>t[1]-e[1]||e[0].tie-t[0].tie);for(let r of e.values()){if(n.has(r))continue;let e=[{node:r,next:0}];for(n.add(r);e.length>0;){let r=e.at(-1);if(r.next===r.node.outgoing.length){t.push(r.node.id),e.pop();continue}let i=r.node.outgoing[r.next++][0];n.has(i)||(n.add(i),e.push({node:i,next:0}))}}return t.toReversed()}function Or(e,t){let n=new Map(e.map((e,t)=>[e,t])),r=0;for(let e of t.values())for(let[t,i]of e.outgoing)n.get(e.id)<n.get(t.id)&&(r+=i);return r}function kr(e,t){let n=Or(e,t),r=n,i=0;for(let a=0;a<e.length-1;a++)n-=t.get(e[a]).originalBalance,n>r&&(r=n,i=a+1);return[...e.slice(i),...e.slice(0,i)]}function Ar(e,t){if(e.length<2)return e;let n=new Map(e.map((e,t)=>[e,{id:e,tie:t,balance:0,incoming:[],outgoing:[]}]));for(let e of n.values())for(let r of t.get(e.id)?.values()??[]){let t=n.get(r.to);!t||t===e||!r.cycleCount||(e.outgoing.push([t,r.cycleCount]),t.incoming.push([e,r.cycleCount]),e.balance+=r.cycleCount,t.balance-=r.cycleCount)}for(let e of n.values())e.originalBalance=e.balance;let r=[],i=new Tr(n.values()),a=[];for(;i.nodes.length>0;){let e=i.take();e.balance>=0?r.push(e.id):a.push(e.id);for(let[t,n]of e.outgoing)t.position<0||(t.balance+=n,i.update(t));for(let[t,n]of e.incoming)t.position<0||(t.balance-=n,i.update(t))}let o=e,s=Or(e,n);for(let i of[[...r,...a.toReversed()],Dr(n),e,e.toReversed()]){let e=Er(kr(i,n),t),r=Or(e,n);r>s&&(o=e,s=r)}return o}function jr(e,t){let n=new Set(e),r=new Map(e.map(e=>[e,[]]));for(let[e,i]of t)for(let t of i)n.has(e)&&n.has(t)&&r.get(t).push(e);let i=[],a=new Set;for(let r of e){if(a.has(r))continue;a.add(r);let e=[[r,(t.get(r)??[])[Symbol.iterator]()]];for(;e.length>0;){let[r,o]=e.at(-1),s=o.next();s.done?(i.push(r),e.pop()):n.has(s.value)&&!a.has(s.value)&&(a.add(s.value),e.push([s.value,(t.get(s.value)??[])[Symbol.iterator]()]))}}let o=new Map,s=[];for(let e of i.toReversed()){if(o.has(e))continue;let t=[],n=s.length,i=[e];for(o.set(e,n);i.length>0;){let e=i.pop();t.push(e);for(let t of r.get(e))o.has(t)||(o.set(t,n),i.push(t))}s.push(t.toSorted())}return{groups:s,componentOf:o}}function Mr(e,{expanded:t=new Set,order:n=`structure`,query:r=``,neighborhood:i=null,cyclesOnly:o=!1}={}){let s=new Map,c=new Map,l=new Map;for(let n of e.nodes){let e=t.has(n.pkg),r=`${e?`f`:`p`}:${e?n.file:n.pkg}`;s.has(r)||s.set(r,{id:r,pkg:n.pkg,file:e?n.file:null,label:e?hr(n):a(n.pkg),files:[],size:0,issues:0,incoming:0,outgoing:0,importers:0,dependencies:0});let i=s.get(r);i.files.push(n.file),i.size+=n.size??0,i.issues+=n.totalIssues??0,c.set(n.file,r),l.set(n.file,n.origFile??n.file)}let u=new Map,d=new Set,f=new Set,p=new Map([...s.keys()].map(e=>[e,new Set])),m=0;for(let[t,n]of e.importsOf){let r=c.get(t);if(r)for(let i of new Set(n)){let n=c.get(i);if(!n)continue;u.has(r)||u.set(r,new Map),u.get(r).has(n)||u.get(r).set(n,{from:r,to:n,count:0,cycleCount:0,examples:[]});let a=u.get(r).get(n);a.count++;let h=Cr(l.get(t),l.get(i),e.ownSourceFiles?.has(i),e.ownSourceFiles?.has(t));a.examples.length<80&&(!o||h)&&a.examples.push([t,i]),m++,s.get(r).outgoing++,s.get(n).incoming++,r!==n&&(f.add(r),d.add(n)),h&&(a.cycleCount++,(r!==n||s.get(r).file)&&p.get(r).add(n))}}let h=[...s.keys()].toSorted(),{groups:g,componentOf:_}=jr(h,p),v=new Set(g.flatMap(e=>e.length>1||p.get(e[0]).has(e[0])?e:[]));for(let e of s.values())e.cyclic=v.has(e.id),e.component=_.get(e.id);let y=e.ownSourcePackages??new Set(e.layerRoots?.roots??[]),b=e=>e.pkg===`__own__`?0:y.has(e.pkg)?1:2,x=e=>d.has(e.id)&&f.has(e.id)?0:1,S=new Map(g.map((e,t)=>[t,e.reduce((e,t)=>Math.min(e,b(s.get(t))),2)])),C=(e,t)=>e.pkg.localeCompare(t.pkg)||e.label.localeCompare(t.label),ee=new Map;if(n===`structure`){for(let e of g)if(!(e.length<2))for(let t of Map.groupBy(e,e=>b(s.get(e))).values())Ar(t.toSorted((e,t)=>C(s.get(e),s.get(t))),u).forEach((e,t)=>ee.set(e,t))}if(o){m=0,d.clear(),f.clear();for(let e of s.values())e.incoming=0,e.outgoing=0}for(let[e,t]of u){for(let n of t.values())if(n.cyclic=n.cycleCount>0&&v.has(e)&&_.get(e)===_.get(n.to)&&(e!==n.to||s.get(e).file!==null),o){if(!n.cyclic){t.delete(n.to);continue}n.count=n.cycleCount,m+=n.count,s.get(e).outgoing+=n.count,s.get(n.to).incoming+=n.count,e!==n.to&&(f.add(e),d.add(n.to))}t.size===0&&u.delete(e)}for(let[e,t]of u)for(let n of t.keys())e!==n&&(s.get(e).dependencies++,s.get(n).importers++);let w=r.trim().toLowerCase(),T=new Set(h.filter(e=>!w||s.get(e).files.some(e=>e.toLowerCase().includes(w))||s.get(e).label.toLowerCase().includes(w))),E=new Set(i?[i]:T);if(w||i)for(let[e,t]of u)for(let n of t.keys())(i?e===i:T.has(e))&&E.add(n),(i?n===i:T.has(n))&&E.add(e);let D=(e,t)=>{if(n===`structure`){let n=S.get(e.component)-S.get(t.component);if(n)return n;let r=x(e)-x(t);if(r)return r;let i=e.component-t.component;if(i)return i}let r=b(e)-b(t);if(r)return r;if(n===`importers`)return t.importers-e.importers||C(e,t);if(n===`imports`)return t.dependencies-e.dependencies||C(e,t);let i=x(e)-x(t);if(i)return i;if(n===`structure`&&e.component===t.component){let n=(ee.get(e.id)??0)-(ee.get(t.id)??0);if(n)return n}return C(e,t)},O=[...s.values()].filter(e=>E.has(e.id)&&(!o||e.cyclic)).toSorted(D),k=new Map(O.map((e,t)=>[e.id,t])),A=[];for(let[e,t]of u)if(k.has(e))for(let n of t.values())k.has(n.to)&&A.push({...n,row:k.get(e),col:k.get(n.to)});return{rows:O,byId:s,cells:u,visibleCells:A,index:k,matches:T,importCount:m,totalRows:s.size,cycleCount:g.filter(e=>v.has(e[0])).length}}export{ne as a,ae as b,oe as c,se as d,N as e,ue as f,P as g,de as h,F as i,fe as j,pe as k,me as l,he as m,ge as n,I as o,ve as p,be as q,Se as r,Ce as s,we as t,Te as u,Ee as v,De as w,R as x,Oe as y,ke as z,Ae as A,je as B,Ne as C,Pe as D,Fe as E,Ue as F,We as G,V as H,Ke as I,rt as J,it as K,at as L,st as M,ct as N,lt as O,ut as P,dt as Q,gt as R,W as S,xt as T,Tt as U,At as V,Pt as W,Lt as X,Ut as Y,qt as Z,Jt as _,q as $,Xt as aa,Qt as ba,$t as ca,tn as da,on as ea,sn as fa,cn as ga,un as ha,dn as ia,Sn as ja,Cn as ka,On as la,Un as ma,$ as na,Wn as oa,qn as pa,Yn as qa,Xn as ra,Qn as sa,er as ta,nr as ua,rr as va,ir as wa,ar as xa,or as ya,dr as za,fr as Aa,pr as Ba,Ar as Ca,mr as Da,hr as Ea,Cr as Fa,wr as Ga,jr as Ha,Mr as Ia};
|
|
34
|
-
/*! Bundled license information:
|
|
35
|
-
|
|
36
|
-
lit-html/directives/class-map.js:
|
|
37
|
-
(**
|
|
38
|
-
* @license
|
|
39
|
-
* Copyright 2018 Google LLC
|
|
40
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*)
|
|
42
|
-
*/
|
package/out/chunk-VFWMQ3LG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,j as n}from"./chunk-2XUEZHIP.js";var r=`:host{display:inline-flex;flex-shrink:0;vertical-align:middle;--switch-track-width: 26px;--switch-track-height: 14px}button,.checkbox-mode{align-items:center;gap:8px;box-sizing:border-box;height:30px;margin:0;padding:0 .6rem;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);background:transparent;color:var(--muted);font:inherit;font-size:.78rem;font-weight:500;line-height:1;white-space:nowrap;cursor:default}button{display:var(--switch-button-display, inline-flex);&:hover:not(:disabled){color:var(--text);background:rgb(from var(--text) r g b / .04)}&[aria-pressed=true]{color:var(--text)}&:disabled{opacity:.4}&:focus-visible{outline:1px solid var(--accent);outline-offset:-2px}}.checkbox-mode{display:var(--switch-checkbox-display, none);border:0;color:var(--text);&:has(:disabled){opacity:.4}& input{width:.85rem;height:.85rem;margin:0;accent-color:var(--accent)}}.track{position:relative;flex-shrink:0;width:var(--switch-track-width);height:var(--switch-track-height);background:var(--border);border-radius:var(--ui-radius, 8px);transition:background .15s;&:after{content:"";position:absolute;top:2px;left:2px;width:calc(var(--switch-track-height) - 4px);height:calc(var(--switch-track-height) - 4px);border-radius:50%;background:var(--muted);transition:transform .15s,background .15s}}button[aria-pressed=true] .track{background:color-mix(in oklch,var(--accent) 22%,transparent);&:after{transform:translate(calc(var(--switch-track-width) - var(--switch-track-height)));background:var(--accent)}}:host([borderless]) :is(button,.checkbox-mode){height:100%;border:0;border-radius:0}:host([compact]){--switch-track-width: 22px;--switch-track-height: 12px}:host([compact]) :is(button,.checkbox-mode){height:auto;gap:7px;padding:2px 8px;border-radius:var(--ui-radius, 6px);font-size:.68rem;line-height:1.2}:host-context(body.theme-w95){.checkbox-mode{padding:0 4px;color:#000;font-size:11px;font-weight:400}.checkbox-mode input{appearance:none;width:13px;height:13px;background:#fff;box-shadow:var(--w95-sunken);&:checked{background:var(--w95-check),#fff}}}
|
|
2
|
-
`,i=class extends n{static properties={checked:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},label:{type:String},accessibleLabel:{type:String,attribute:`accessible-label`}};static styles=e(r);constructor(){super(),this.checked=!1,this.disabled=!1,this.label=``,this.accessibleLabel=``}_checkboxClick(e){(this.disabled||e.target.tagName!==`INPUT`)&&e.stopPropagation()}render(){return t`<button type="button" part="button" aria-pressed="${String(this.checked)}" aria-label="${this.accessibleLabel||this.label}" ?disabled="${this.disabled}"><span>${this.label}</span><span class="track" part="track" aria-hidden="true"></span></button> <label class="checkbox-mode" @click="${this._checkboxClick}"><input type="checkbox" part="checkbox" .checked="${this.checked}" ?disabled="${this.disabled}" aria-label="${this.accessibleLabel||this.label}"> <span>${this.label}</span></label>`}};customElements.get(`mode-switch`)||customElements.define(`mode-switch`,i);
|
package/out/chunk-VG5RH6KN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as e,i as t,s as n,t as r,v as i}from"./chunk-74AEKRES.js";import{c as a,g as o}from"./chunk-2XUEZHIP.js";var s=[[`manage`,`Overview`],[`manage-bundles`,`Bundles`],[`manage-scans`,`Scans`],[`manage-reports`,`Reports`],[`manage-deduplication`,`Deduplication`,`admin`],[`manage-repos`,`Repositories`,`admin`],[`admin-users`,`Users`,`admin`],[`manage-teams`,`Teams`,`admin`],[`manage-import`,`Import`,`admin`],[`manage-links`,`Links`],[`manage-history`,`History`]];function c(e,t,n=!1){return a`<header class="manage-header"><nav class="manage-nav" aria-label="Management pages">${s.filter(([e,,r])=>(r==null||r===t)&&(e!==`manage-links`||n)).map(([t,n])=>a`<button type="button" aria-current="${e===t?`page`:o}" @click="${()=>{document.dispatchEvent(new CustomEvent(`managed-admin-navigate`,{detail:{view:t},bubbles:!0,composed:!0}))}}">${n}</button>`)}</nav></header>`}function l(s){if(s===`bundle`)return e(t);if(s===`report`||s===`preview`)return e(r);if(s===`scan`)return e(n);if(s===`code`)return e(i);let c={users:`M10.75 4.75a2.75 2.75 0 1 1-5.5 0 2.75 2.75 0 0 1 5.5 0ZM3 14v-1.5A3.5 3.5 0 0 1 6.5 9h3a3.5 3.5 0 0 1 3.5 3.5V14`,team:`M8.5 5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM1.5 14v-1.5A3.5 3.5 0 0 1 5 9h2a3.5 3.5 0 0 1 3.5 3.5V14M11 2.75a2.5 2.5 0 0 1 0 4.5m1 2a3 3 0 0 1 2.5 3V14`,repo:`M3 12.5V3a1.5 1.5 0 0 1 1.5-1.5H13v13H4.5a1.5 1.5 0 0 1 0-3H13M7 1.5v6l2-1.5 2 1.5v-6`,history:`M2 5a6.25 6.25 0 1 1-.25 5M1.5 1.5V5H5M8 4.5V8l3 1.5`,arrow:`M3 8h10M9 4l4 4-4 4`,show:`M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Zm9 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0`,hide:`m2 2 12 12M6 3.75A8 8 0 0 1 8 3.5c4.5 0 7 4.5 7 4.5a12 12 0 0 1-2 2.5M3.5 5A13 13 0 0 0 1 8s2.5 4.5 7 4.5a8 8 0 0 0 3-.6`,download:`M8 2v8M5 7l3 3 3-3M2 11v3h12v-3`,upload:`M8 11V2m-3 3 3-3 3 3M2 10v4h12v-4`};return a`<svg class="${s===`repo`?`repo-icon`:o}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${c[s]??c.repo}"></path></svg>`}var u=`:host{display:flex;flex-direction:column;position:relative;padding:0 clamp(1rem,3vw,3rem) 3rem;color:var(--text);container-type:inline-size;font-family:var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);font-size:.875rem;line-height:1.5;--panel:color-mix(in srgb, var(--bg) 50%, var(--surface));--panel-hover:color-mix(in srgb, var(--text) 3%, var(--panel))}*,*:before,*:after{box-sizing:border-box}button,summary,select,label,legend,h1,h2,h3,.section-heading,.ui-hint,.page-intro>.intro,.count,.result-count,.repository-count,.breadcrumb-separator,.list-head,.report-list-head,.history-head,.bundle-group-head,.drop-copy,.local-import-copy,.location-field>span,.empty:not(.error,[role=alert]),.msg:not(.error,[role=alert]),.local-import-message:not(.error,[role=status]),.data-empty,.revision-empty{cursor:default;user-select:none;-webkit-user-select:none}input:not([type=checkbox],[type=radio]),textarea,[contenteditable],pre,code,.mono{cursor:text;user-select:text;-webkit-user-select:text}.wrap{width:100%;max-width:76rem;margin:0 auto;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:none;scrollbar-gutter:stable}.manage-header{position:sticky;top:0;z-index:2}.wrap:has(>.manage-list){display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto}.wrap:has(>.manage-list)>:not(.manage-list){flex:none}.manage-list{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.manage-list.has-intro{margin-top:calc(-.45rem - 1px);padding-top:calc(.45rem + 1px)}.manage-nav button{flex:0 0 auto;position:relative;min-height:3.7rem;padding:.9rem 0;border:0;border-radius:0;color:var(--muted);background:none;font-size:.8rem;font-weight:500;white-space:nowrap}.manage-nav button:hover,.manage-nav button[aria-current=page]{color:var(--text)}.manage-nav button[aria-current=page]:after{content:"";position:absolute;bottom:.6rem;inset-inline:0;height:2px;background:var(--accent);border-radius:var(--ui-radius, 2px)}.manage-nav button:focus-visible{outline-offset:-3px}.head{display:flex;align-items:center;flex-wrap:wrap;gap:.7rem;margin:0 0 .5rem}h1,.head h1{margin:0;font-size:1.9rem;font-weight:600;letter-spacing:-.045em;line-height:1.2}.count{display:inline-flex;align-items:center;justify-content:center;min-width:1.6rem;padding:.12rem .5rem;border:1px solid var(--border);border-radius:6px;color:var(--muted);background:var(--surface);font-size:.73rem;font-weight:500;font-variant-numeric:tabular-nums}button,input,select{font:inherit}button,select,input[type=checkbox]{cursor:default}button,a,input,select{-webkit-app-region:no-drag}button,a{transition:background .15s,color .15s,border-color .15s}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input:not([type=checkbox],[type=radio]):focus{outline:none;border-color:var(--accent)}button:disabled,select:disabled{opacity:.45}input:not([type=checkbox]),select{min-width:0;min-height:2.25rem;padding:.45rem .65rem;border:1px solid var(--border);border-radius:var(--ui-radius, 7px);background:var(--bg);color:var(--text);font-size:.8rem}input::placeholder{color:var(--muted)}input[type=checkbox]{accent-color:var(--accent)}.btn,.drop-browse{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:2.25rem;height:auto;padding:.45rem .8rem;border:1px solid var(--border);border-radius:var(--ui-radius, 7px);background:var(--surface);color:var(--text);font-size:.8rem;font-weight:500;text-decoration:none;white-space:nowrap}.btn:hover:not(:disabled),.drop-browse:hover:not(:disabled){background:var(--surface-active);border-color:var(--muted)}.btn.primary,.drop-browse{color:var(--bg);background:var(--accent);border-color:var(--accent)}.btn.primary:hover:not(:disabled),.drop-browse:hover:not(:disabled){background:var(--accent);filter:brightness(1.08)}.btn svg,.icon-btn svg{width:1rem;height:1rem}.icon-btn{width:2rem;height:2rem}.avatar{color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--bg));border:1px solid color-mix(in srgb,var(--accent) 16%,var(--border))}.breadcrumb{display:flex;align-items:center;flex-basis:100%;gap:.4rem;margin-bottom:.8rem}.breadcrumb-manage{padding:.1rem 0;border:0;background:transparent;color:var(--muted);font-size:.78rem}.breadcrumb-manage:hover{color:var(--text)}.breadcrumb-separator{color:var(--muted)}.msg{margin:1rem 0;padding:1.1rem 1.25rem;border:1px solid var(--border);border-radius:var(--ui-radius, 9px);color:var(--muted);font-size:.85rem}.msg.error{color:var(--critical);border-color:color-mix(in srgb,var(--critical) 35%,var(--border))}.empty{padding:3.5rem 1.5rem;border:1px dashed var(--border);border-radius:var(--ui-radius, 10px);color:var(--muted);text-align:center}.empty strong{display:block;margin-bottom:.4rem;color:var(--text);font-size:.95rem;font-weight:500}.empty p{margin:0;font-size:.85rem}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@container (max-width: 35rem){.drop-copy>span{display:none}.manage-nav{gap:1.2rem;margin-bottom:1.75rem}.manage-nav button{min-height:3.25rem}h1,.head h1{font-size:1.65rem}.intro{margin-bottom:1.5rem}}@media(prefers-reduced-motion:reduce){button,a{transition:none}}.collection-toolbar input{flex:1;max-width:26rem;min-width:10rem}.collection-toolbar select{min-width:10rem}.result-count{text-align:right;white-space:nowrap;margin-left:auto;color:var(--muted);font-size:.75rem;font-variant-numeric:tabular-nums}@container (max-width: 35rem){.collection-toolbar input{flex-basis:100%;max-width:none}}.manage-nav{display:flex;gap:1.35rem;align-items:stretch;overflow-x:auto;scrollbar-width:thin;border-bottom:1px solid var(--border);margin-bottom:1.5rem;padding:0 .1rem}.wrap>:not(.manage-header),.manage-nav{-webkit-app-region:no-drag;app-region:no-drag}@media(display-mode:window-controls-overlay){.manage-header{display:flow-root}.manage-header:before{content:"";float:right;width:var(--wco-right-toolbar, 0px);height:var(--wco-titlebar-height)}.manage-nav{width:max-content;max-width:100%;border-bottom:0}.manage-nav button{min-height:var(--wco-titlebar-height);padding-block:.35rem}.manage-nav button[aria-current=page]:after{bottom:0}}.intro{margin:0 0 1.25rem;max-width:46rem;color:var(--muted);font-size:.875rem;line-height:1.65}.collection-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-bottom:.85rem}.page-intro{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem 1rem;margin-bottom:1.25rem}.page-intro .intro{margin:0}.page-intro>.btn{margin-block:calc(-.45rem - 1px)}a{cursor:default}.loading-rows{border:1px solid var(--border);border-radius:var(--ui-radius, 10px);overflow:hidden}.loading-row{display:grid;align-content:center;gap:.6rem;min-height:4.25rem;padding:.85rem 1rem}.loading-row+.loading-row{border-top:1px solid var(--border)}.loading-row span{width:40%;height:.65rem;border-radius:3px;background:color-mix(in srgb,var(--muted) 15%,transparent)}.loading-row span+span{width:65%;height:.5rem}.drop-card{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem;padding:.7rem .85rem;border:1px dashed color-mix(in srgb,var(--muted) 35%,var(--border));border-radius:var(--ui-radius, 8px);background:var(--panel)}.drop-icon{display:grid;place-items:center;flex-shrink:0;width:1.8rem;height:1.8rem;color:var(--muted)}.drop-icon svg{width:1.1rem;height:1.1rem}.drop-copy{min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:.2rem .6rem}.drop-copy strong{font-size:.8rem;font-weight:500}.drop-copy>span{color:var(--muted);font-size:.75rem}.drop-browse{min-width:7rem;margin-left:auto;flex-shrink:0}.content-hidden .filename,.content-hidden .report-name,.content-hidden .report-uploader{color:var(--muted)}.status{display:inline-flex;align-items:center;gap:.3rem;width:fit-content;padding:.1rem .4rem;border:1px solid var(--border);border-radius:5px;color:var(--muted);font-size:.65rem}.status:before{content:"";width:.25rem;height:.25rem;border-radius:50%;background:currentcolor}.status.visible{color:var(--green);border-color:rgb(from var(--green) r g b / .2);background:rgb(from var(--green) r g b / .06)}:host-context(body.theme-w95) *{overscroll-behavior:none}
|
|
2
|
-
`;export{c as a,l as b,u as c};
|
package/out/chunk-WFDXHPT2.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-IYPY47MC.js";import{a as t}from"./chunk-QRKFPLA4.js";import{b as n}from"./chunk-TUII34K2.js";var r=new Set([`module`,`commonjs`,`json`,`module-typescript`,`commonjs-typescript`]),i=new Set([`solidity`,`php`,`shell`,`rust`,`teal`]),a=new Set([`java`,`kotlin`,`gradle`,`objc`,`objcpp`,`swift`,`c`,`cpp`,`c-header`,`cpp-header`,`ruby`,`python`,`cmake`,`podspec`,`podfile`,`podfile-lock`,`gemfile`,`gemfile-lock`,`template`,`xml`,`env`,`fastlane`,`pbxproj`]),o=new Set([`generic-javascript`,`generic-typescript`]),s=new Set([`resource`,`resource:base64`]),c=new Set([`stat:file`,`stat:directory`]),l=new Set([...r,...i,...a,...o,...s,`patch`,`directory`,...c]),u=e=>c.has(e),d=e=>e===`directory`||e===`stat:directory`?`directory`:`file`,f=new Set([`module`,`commonjs`,`module-typescript`,`commonjs-typescript`]),p=(e,t)=>o.has(e)&&f.has(t);function m(e,t,n){if(e===t)return e;if(p(e,t))return t;if(p(t,e))return e;let r=u(e);if(r!==u(t)&&d(e)===d(t))return r?t:e;throw Error(`format conflict for '${n}' ('${t}' vs '${e}')`)}var h=(e,t)=>t===``?e:e===`.`?t:`${e}/${t}`,ee=/^(?=[A-Za-z0-9-]{1,39}\/)[A-Za-z0-9](?:-?[A-Za-z0-9])*\/(?!\.\.?$)[\w.-]{1,100}$/u,te=/^(?!\.\.?(?:\/|$))[\w.~@+-]+(?:\/(?!\.\.?(?:\/|$))[\w.~@+-]+)*$/u,ne=/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u,g={github:e=>typeof e==`string`&&ee.test(e),directory:e=>typeof e==`string`&&e.length<=1024&&(e===``||te.test(e)),commit:e=>typeof e==`string`&&ne.test(e)},re=(e,t)=>e?.toLowerCase()===t?.toLowerCase(),_=(e,t,n)=>{if(e===void 0)return;T(e)||S(!1,`${n} must be an object`);for(let r of Object.keys(e))Object.hasOwn(t,r)||S(!1,`unknown ${n} key '${r}'`);let r=Object.entries(t).map(([t,r])=>typeof r==`object`?[t,_(e[t],r,`${n}.${t}`)]:(e[t]!==void 0&&!r(e[t])&&S(!1,`invalid ${n}.${t}: ${JSON.stringify(e[t])}`),[t,e[t]])).filter(([,e])=>e!==void 0);return r.length===0?void 0:Object.freeze(E(r))},ie=(e,t=`bundle repo`)=>_(e,g,t),v=(e,t)=>t??(j(e)?`npm`:void 0),ae=(e,t,n,r,i)=>(a,{ecosystem:o,[e]:s},c)=>{if(s===void 0)return;r(a,o)||S(!1,`${c}: '${a}' is no ${i} bucket, and carries no ${e}`);let l=_(s,t,`${c} module '${a}' ${e}`);return l?.[n]===void 0&&S(!1,`${c} module '${a}' ${e} has no ${n}`),l},oe=ae(`repo`,g,`github`,(e,t)=>v(e,t)!==void 0,`dependency's`),se={sha1:/^sha1-[A-Za-z\d+/]{27}=$/u,sha256:/^sha256-[A-Za-z\d+/]{43}=$/u,sha512:/^sha512-[A-Za-z\d+/]{86}==$/u},ce=/^(?:\.\.\/)*(?!\.\.?(?:\/|$))[^/\\\p{Cc}]+(?:\/(?!\.\.?(?:\/|$))[^/\\\p{Cc}]+)*$/u,le={integrity:e=>typeof e==`string`&&se.sha256.test(e),file:e=>typeof e==`string`&&e.length<=4096&&ce.test(e)},ue=(e,t)=>j(e)&&v(e,t)===`npm`,de={npm:`sha512`,cargo:`sha256`,composer:`sha1`,soldeer:`sha256`},fe=(e,{ecosystem:t,integrity:n},r)=>{if(n===void 0)return;let i=v(e,t);return(!Object.hasOwn(de,i)||i===`npm`&&!j(e))&&S(!1,`${r}: '${e}' is no npm, cargo, composer or soldeer dependency's bucket, and carries no integrity`),typeof n==`string`&&se[de[i]].test(n)||S(!1,`invalid ${r} module '${e}' integrity: ${JSON.stringify(n)}`),n},pe=ae(`patch`,le,`integrity`,ue,`npm dependency's`),me=e=>typeof e==`string`&&/^[\w.+@/~'!()*-]+$/u.test(e),y={name:me,version:me},he=e=>typeof e==`string`&&e!==``&&!e.includes(`\\`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e!==`node_modules`),ge=(e,t,n)=>typeof e==`string`&&he(n)&&e===`${t}/${n}`,_e={vendored:()=>!0,subpackages:(e,t,n)=>ge(e.name,t,n)},ve=(e,t)=>{for(let n=t.lastIndexOf(`/`);n>0;n=t.lastIndexOf(`/`,n-1))if(Object.hasOwn(e,t.slice(0,n)))return t.slice(0,n)};function ye(e,t){if(e===void 0)return;let n=new Set(Object.keys(t).map(t=>ve(e,t)).filter(e=>e!==void 0));return n.size===0?void 0:Object.freeze(E(C(n).map(t=>[t,e[t]])))}var be=(e,t,{name:n,ecosystem:r,files:i,[e]:a},o)=>{if(a===void 0)return;v(t,r)===void 0&&S(!1,`${o}: '${t}' is no dependency's bucket, and carries no ${e}`),T(a)||S(!1,`${o} module '${t}' ${e} must be an object`);let s=E(Object.entries(a).map(([r,i])=>{he(r)||S(!1,`${o} module '${t}' ${e}: invalid directory ${JSON.stringify(r)}`);let a=_(i,y,`${o} module '${t}' ${e} '${r}'`);return a?.name===void 0&&S(!1,`${o} module '${t}' ${e} '${r}' has no name`),_e[e](a,n,r)||S(!1,`${o} module '${t}' ${e} '${r}' is named '${a.name}', not '${n}/${r}'`),[r,a]})),c=ye(s,i),l=Object.keys(s).find(e=>!Object.hasOwn(c??{},e));return l!==void 0&&S(!1,`${o} module '${t}' ${e} '${l}' holds none of its files`),c},xe={integrity:fe,patch:pe,repo:oe},Se=Object.keys(_e),b=[...Object.keys(xe),...Se],Ce=[`ecosystem`,...b],x=e=>{let t={name:e.name,version:e.version};for(let n of Ce)e[n]!==void 0&&(t[n]=e[n]);return t.files=e.files,t},we={integrity:(e,t)=>e===t,patch:(e,t)=>e?.integrity===t?.integrity&&(e?.file===void 0||t?.file===void 0||e.file===t.file)},Te=Object.keys(we),Ee=(e,t,n)=>we[e](t,n),De=(e,t)=>e[t]??(t===`patch`&&e.integrity!==void 0?null:void 0),Oe=(e,t,n,r)=>{if(Ee(e,t[e],n[e]))return;let[i,a]=[t[e],n[e]].map(e=>JSON.stringify(e)??`none`);S(!1,`${r} ${e} mismatch (${i} vs ${a})`)},ke=(e,t,n)=>{let[r,i]=[t[e],n[e]];if([r,i].every(e=>typeof e==`object`&&!!e))return Object.keys(i).some(e=>r[e]===void 0)?Object.freeze({...i,...r}):void 0};function Ae(e,t,n=`module`){let r;for(let i of Object.keys(xe))if(Te.includes(i)&&De(e,i)!==void 0&&De(t,i)!==void 0){Oe(i,e,t,n);let a=ke(i,e,t);a&&((r??={})[i]=a)}else e[i]===void 0&&t[i]!==void 0&&((r??={})[i]=t[i]);for(let n of Se)t[n]===void 0||Object.keys(t[n]).every(t=>Object.hasOwn(e[n]??{},t))||((r??={})[n]=Object.freeze(E([...Object.entries(t[n]),...Object.entries(e[n]??{})])));return r===void 0?e:x({...e,...r})}function je(e,t,n,r,i){let a={};for(let[i,o]of Object.entries(xe))a[i]=r.includes(i)?o(e,t,n):void 0;for(let o of Se)a[o]=r.includes(o)?be(o,e,{...t,[o]:i(o)},n):void 0;return a}function Me(e,t,n,r=b){let{name:i,version:a,ecosystem:o}=e;S(o===void 0||typeof o==`string`),T(e.files)||S(!1,`${n}: module '${t}' files must be an object`);let s=E(Object.entries(e.files));return x({name:i,version:a??void 0,ecosystem:o,...je(t,{...e,files:s},n,r,t=>e[t]),files:s})}function Ne(e,{scope:t=`full`}={}){let n=new Set;for(let[r,{files:i}]of e)if(t===`full`||j(r))for(let e of Object.keys(i))n.add(h(r,e));return n}function Pe(e,{what:t,files:n,formats:r,scope:i}){if(e.includes(`\\`))return`holds a '\\'`;if(O(e))return`escapes the root`;if(i!==`full`&&!j(e))return`is outside node_modules, which a '${i}'-scope ${t} does not record`;if(!n.has(e))return`names no file the ${t} records`;let a=r.get(e);return a===`directory`?`is a directory capture, not a file`:u(a)?`is a payload-free '${a}' record, not a file`:null}function Fe(e,{what:t,files:n,formats:r,scope:i}){for(let a of e){let e=Pe(a,{what:t,files:n,formats:r,scope:i});S(e===null,`${t}: executable entry '${a}' ${e}`)}}function Ie(e,t,n,r){S(Array.isArray(e),`${t} must be an array of file paths`);let i=new Set;for(let t of e)r(t),S(!i.has(t),`${n} '${t}' is listed twice`),i.add(t);return i}function Le(e,{what:t,files:n,formats:r,scope:i=`full`}){if(e===void 0)return new Set;let a=`${t}: executable entry`,o=Ie(e,`${t}: executable`,a,e=>S(typeof e==`string`&&e!==``,`${a} must be a non-empty string`));return Fe(o,{what:t,files:n,formats:r,scope:i}),o}function Re(e,{what:t,modules:n,formats:r,scope:i}){if(e.size!==0)return Fe(e,{what:t,files:Ne(n,{scope:i}),formats:r,scope:i}),qe(e)}function S(e,t){if(!e)throw Error(t)}var ze=`stasis.lock.json`,Be=new Set([`node_modules`,`full`]),Ve=(e,t)=>S(Be.has(e),`${t} scope must be node_modules or full, got ${JSON.stringify(e)}`),He=e=>{let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase();return t===ze||t.endsWith(`.${ze}`)},Ue=/(?:^|\/)(?:\.git(?:\/|$)|(?:\.npm-extension\.[cm]?[jt]s|\.?pnpmfile\.[cm]?[jt]s|\.npmrc|\.yarnrc(?:\.yml)?|\.?bunfig\.toml|\.pnp\.(?:c?js|loader\.mjs|data\.json))$)/iu,We=/(?:^|\/)node_modules\/(?:[^/]*\/)*(?:pnpm-workspace\.yaml|\.env\.[^/]*|[^/]*\.env)$/iu,Ge=e=>He(e)||Ue.test(e)||We.test(e);function Ke(e,t){let n=0;for(;n<e.length&&e[n]===t[n];)n++;let r=e.length-n,i=t.length-n;if(r===0&&i===0)return 0;if(r<2)return i<2&&(e[n]??``)>(t[n]??``)?1:-1;if(i<2)return 1;if(e[n]===`*`)return-1;if(t[n]===`*`||e[n]===`node_modules`)return 1;if(t[n]===`node_modules`)return-1;let a=e.slice(n).join(`\0`),o=t.slice(n).join(`\0`);if(a<o)return-1;if(a>o)return 1;throw Error(`Unreachable`)}var C=(e,t=e=>e)=>Array.from(e,e=>({item:e,segments:t(e).split(`/`)})).toSorted((e,t)=>Ke(e.segments,t.segments)).map(({item:e})=>e),w=([e])=>e;function T(e){if(!e)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var E=e=>Object.setPrototypeOf(Object.fromEntries(e),null),qe=e=>C(e),D=(e,{sorted:t=!0}={})=>E((t?C(e,w):[...e]).map(([e,n])=>[e,n instanceof Map?D(n,{sorted:t}):n]));function Je(e,t,n){let r=e.get(t);return r===void 0&&e.set(t,r=n()),r}var Ye=(e,t)=>Je(e,t,()=>new Map),Xe=e=>new Map(Object.entries(e).map(([e,t])=>[e,T(t)?Xe(t):t]));function O(e){if(e.startsWith(`/`))return!0;if(!e.includes(`..`))return!1;let t=0;for(let n of e.split(`/`))if(n!==`.`&&n!==``){if(n!==`..`)t++;else if(--t<0)return!0}return!1}var Ze=e=>e.includes(`\\`)||O(e),k=(e,t)=>S(!Ze(e),`${t}: path '${e}' escapes the root or holds a '\\'`),Qe=e=>typeof e==`string`&&e!==``&&!Ze(e),$e=(e,t)=>S(Qe(e),`${t}: invalid entry ${JSON.stringify(e)}`),et=(e,t)=>Ie(e,`${t}: entries`,`${t}: entry`,e=>$e(e,t));function tt(e,t){for(let n of e)$e(n,t);return qe(e)}function nt(e,t){k(e,`formats`),S(l.has(t),`unknown format '${t}' for ${e}`)}function rt(e){S(T(e));let t=new Map;for(let[n,r]of Object.entries(e)){nt(n,r);let e=n===``?`.`:n;S(!t.has(e),`duplicate format key '${e}'`),t.set(e,r)}return t}function it(e,t,n){for(let[r,i]of e)u(i)&&t.has(r)&&S(!1,`${n}: '${r}' is a payload-free '${i}' record, yet carries content`)}function at(e){for(let[t,n]of e)nt(t,n);return D(e)}function ot(e){for(let[,t]of e){S(t instanceof Map);for(let[e,n]of t){k(e,`imports`),S(n instanceof Map);for(let[,e]of n)if(typeof e==`string`)k(e,`imports`);else{S(e instanceof Map&&e.size>0,`import target must be a file or a non-empty {platform: file} map`);for(let[t,n]of e)S(typeof t==`string`&&t.length>0&&!t.includes(`/`),`invalid platform key '${t}'`),S(typeof n==`string`),k(n,`imports`)}}}}function st(e){S(T(e));let t=Xe(e);return ot(t),t}function ct(e){return ot(e),D(e)}function lt(e,{skipEmpty:t=!1,metadata:n=!0,what:r}={}){let i=n===!0?b:n===!1?[]:n,a={modules:[],sources:[]};for(let[n,o]of e){if(t&&Object.keys(o.files).length===0)continue;let e=j(n);e&&S(o.name&&o.version&&o.files);let s=E(C(Object.entries(o.files),w));a[e?`modules`:`sources`].push([n,x({...o,...je(n,{...o,files:s},r,i,e=>ye(o[e],s)),files:s})])}return{modules:E(C(a.modules,w)),sources:E(C(a.sources,w))}}function ut(e,t,n){let r=new Map;for(let i of e.config.scope===`full`?[`modules`,`sources`]:[`modules`]){if(i===`modules`&&e.modules===void 0)continue;S(T(e[i]),`${t}: ${i} must be an object`);let a=i===`modules`;for(let[o,s]of Object.entries(e[i]))S(j(o)===a),k(o,t),S(s?.name&&(s.version||!a)&&s.files),r.set(o,Me(s,o,t,n))}return r}function dt({config:{scope:e},entries:t,modules:n,formats:r,imports:i,executable:a},o,s){let c=e===`full`,l=lt(n,{...s,what:o});return{entries:c?tt(t,o):void 0,sources:c?l.sources:void 0,modules:l.modules,formats:r===null?void 0:at(r),imports:i===null?void 0:ct(i),executable:Re(a,{what:o,modules:n,formats:r??new Map,scope:e})}}function ft(e,t){return!(e instanceof Map)||!(t instanceof Map)?e===t:e.size===t.size&&e.entries().every(([e,n])=>t.get(e)===n)}var pt=e=>e instanceof Map?`{${[...e].map(([e,t])=>`${e}: ${t}`).join(`, `)}}`:e;function mt(e,t,n){let r=new Map;for(let i of[e,t])for(let[e,t]of i){let i=Ye(r,e);for(let[e,r]of t){let t=Ye(i,e);for(let[i,a]of r)t.has(i)?S(ft(t.get(i),a),`${n}: import '${i}' from '${e}' resolves differently ('${pt(t.get(i))}' vs '${pt(a)}')`):t.set(i,a instanceof Map?new Map(a):a)}}return r}function ht(e,t,n){let r=e.get(t);e.set(t,r===void 0?n:m(n,r,t))}function gt(e,t,n){let r=new Map;try{for(let n of[e,t])for(let[e,t]of n)ht(r,e,t)}catch(e){throw Error(`${n}: ${e.message}`,{cause:e})}return r}var _t=(e,t,n,r)=>e.size===0?new Set(t):new Set(t).union(e.difference(Ne(n,{scope:r}))),vt=/(?:^|\/)\.{0,2}(?:\/|$)/u;function A(e,t,n){let r=h(e,t);return(r!==`.`||t!==``)&&vt.test(r)&&S(!1,`${n}: non-canonical file key ${JSON.stringify(r)}`),r.includes(`\\`)&&S(!1,`${n}: file key '${r}' holds a '\\', which no path may`),r}function yt(e,t,n){let r=new Map;for(let[i,{files:a}]of e){typeof i!=`string`&&S(!1,`${t}: bucket dir ${String(i)} is not a string`),k(i,t);for(let e of Object.keys(a)){let a=A(i,e,t),o=r.get(a);o!==void 0&&n(a,o,i),r.set(a,i)}}return r}var bt=(e,t)=>n=>S(!1,`duplicate file key '${n}' across ${e} buckets -- module bucketing changed between writes (a workspace package without a version now owns its own bucket); regenerate the ${t}`);function xt(e,t,n,{held:r=!1}={}){let i=new Map;for(let a of[e,t])for(let[e,t]of a){let a=i.get(e);if(a===void 0)i.set(e,x({...t,files:Object.assign(Object.create(null),t.files)}));else{S(a.name===t.name,`${n}: module '${e}' name mismatch ('${a.name}' vs '${t.name}')`),S(a.version===t.version,`${n}: module '${e}' version mismatch ('${a.version}' vs '${t.version}')`+(a.version==null==(t.version==null)?``:` -- an artifact from an older stasis may record a placeholder version for a workspace package without one; regenerate it (bundle=replace / lock=replace)`)),S(a.ecosystem===t.ecosystem,`${n}: module '${e}' ecosystem mismatch ('${a.ecosystem??`(none)`}' vs '${t.ecosystem??`(none)`}')`),i.set(e,Ae(a,t,`${n}: module '${e}'`));for(let i of Te){if(a[i]===void 0==(t[i]===void 0)||r&&a[i]===void 0)continue;let[o,s]=a[i]===void 0?[t,a]:[a,t],c=Object.keys(s.files).find(e=>!Object.hasOwn(o.files,e));c!==void 0&&S(!1,`${n}: module '${e}' ${i} is recorded of one side's files, not of '${h(e,c)}' the other adds`)}for(let[r,i]of Object.entries(t.files))Object.hasOwn(a.files,r)?S(a.files[r]===i,`${n}: content mismatch for '${h(e,r)}'`):a.files[r]=i}}return yt(i,n,(e,t,r)=>S(!1,`${n}: file '${e}' is bucketed under both '${t}' and '${r}' -- module bucketing changed between the artifacts (a workspace package without a version now owns its own bucket); regenerate the artifact (bundle=replace / lock=replace)`)),i}var j=e=>e===`node_modules`||e.startsWith(`node_modules/`)||e.endsWith(`/node_modules`)||e.includes(`/node_modules/`),St=`node_modules/`;function Ct(e){let t=e.length;for(;(t=e.lastIndexOf(St,t-1))!==-1;)if(t===0||e[t-1]===`/`)return t;return-1}function wt(e){let t=Ct(e);if(t===-1)return null;let n=t+St.length,r=e.slice(n).split(`/`),i=r[0].startsWith(`@`)?2:1,a=r.slice(0,i);if(r.length<=i||a.includes(``))return null;let o=a.join(`/`);return{dir:e.slice(0,n)+o,rel:r.slice(i).join(`/`),name:o}}var M=1,Tt=0,Et=bt(`bundle`,`artifact (bundle=replace)`),Dt=(e,t)=>{let n=yt(e,`bundle`,Et);for(let e of n.keys())S(!Ge(e),`bundle: ${e} is a file no bundle may carry`);return it(t,n,`bundle`),n},Ot=e=>wt(e)??{dir:`.`,rel:e===`.`?``:e,name:null};function kt(e){S(T(e),`bundle: sources must be an object`);let t=new Map;for(let[n,r]of Object.entries(e)){k(n,`bundle`);let{dir:e,rel:i,name:a}=Ot(n);S(!O(e)&&!O(i));let{files:o}=Je(t,e,()=>({name:a,version:null,files:Object.create(null)}));S(!Object.hasOwn(o,i),`bundle: duplicate file key '.' (v0 '' and '.')`),o[i]=r}return t}function At(){throw Error(`bundle: file contents are not retained by this contents-free Bundle`)}var jt=(e,{files:t,...n})=>{let r=Object.create(null);for(let[n,i]of Object.entries(t))typeof i!=`symbol`&&S(!1,`bundle: file '${h(e,n)}' is not a placeholder`),Object.defineProperty(r,n,{get:At,enumerable:!0});return{...n,files:Object.freeze(r)}},N=(e,t)=>{if(e===void 0&&t===void 0)return;let n=new Map;for(let r of[e,t])for(let[e,t]of Object.entries(r??{}))Array.isArray(t)&&n.set(e,new Set([...n.get(e)??[],...t]));return E([...n.keys()].toSorted().map(e=>[e,qe(n.get(e))]))},Mt=(e,t)=>Object.hasOwn(g,e)&&g[e](t),Nt=(e,t)=>e?.github===void 0||!re(e.github,t?.github)?void 0:E(Object.keys(g).filter(n=>e[n]!==void 0&&(n===`github`||e[n]===t[n])).map(t=>[t,e[t]])),Pt=e=>{if(!T(e)||e.root!==!0||Object.hasOwn(e,`directory`))return e;let{root:t,...n}=e;return n},Ft={npm:y,composer:y,cargo:y},It=(e,t)=>E(Object.keys(Ft).map(n=>{let[r,i]=[e?.[n],t?.[n]];return[n,r?.name!==void 0&&r.name===i?.name?E(Object.entries(r).filter(([e,t])=>t===i[e])):void 0]})),P=class e{static VERSION=M;#e;get repo(){return this.#e}set repo(e){this.#e=ie(e)}#t;get package(){return this.#t}set package(e){this.#t=_(e,Ft,`bundle package`)}constructor({config:e={scope:`full`},entries:t,modules:n,formats:r,imports:i,executable:a,reason:o,repo:s,package:c,version:l=M}={}){S([Tt,M].includes(l)),Ve(e.scope,`bundle`),this.version=l,this.config=e,this.entries=t??new Set,this.modules=n??new Map,this.formats=r??new Map,this.imports=i??new Map,this.executable=a??new Set,this.reason=o,this.repo=s,this.package=c}get sources(){let e=new Map;for(let[t,{files:n}]of this.modules)for(let[r,i]of Object.entries(n))e.set(h(t,r),i);return e}static isResourceFormat(e){return s.has(e)||e===`directory`}get hasCode(){return this.modules.entries().some(([t,{files:n}])=>Object.keys(n).some(n=>!e.isResourceFormat(this.formats.get(h(t,n)))))}static parse(t){return e.fromJSON(JSON.parse(t))}static fileKeyAt(e){let[t,n,r,i]=e;if(typeof n==`string`){if(e.length===2&&t===`sources`){let e=Ot(n);return A(e.dir,e.rel,`bundle`)}if(e.length===4&&(t===`sources`||t===`modules`)&&r===`files`&&typeof i==`string`)return A(n,i,`bundle`)}}static fromJSON(t,{contents:n=!0}={}){S(t.version===M||t.version===Tt),Ve(t.config?.scope,`bundle`);let r=rt(t.formats),i=t.version===M;i&&t.config.scope!==`full`&&S(t.entries===void 0&&t.sources===void 0);let a=i?ut(t,`bundle`):kt(t.sources),o=Dt(a,r),s=st(t.imports);if(!n)for(let[e,t]of a)a.set(e,jt(e,t));return new e({version:t.version,config:t.config,entries:i&&t.entries!==void 0?et(t.entries,`bundle`):new Set,modules:a,formats:r,imports:s,executable:i?Le(t.executable,{what:`bundle`,files:o,formats:r,scope:t.config.scope}):new Set,reason:T(t.reason)?t.reason:void 0,repo:Pt(t.repo),package:t.package})}serialize(){return JSON.stringify(this.#n(),void 0,2)}serializedBytes(){let e=this.#n(),t=Object.keys(e.modules);if(t.length===0)return Buffer.from(JSON.stringify(e,void 0,2));let{modules:n,...r}=e,i=JSON.stringify(r,void 0,2);S(i.endsWith(`
|
|
2
|
-
}`));let a=[],o=e=>a.push(Buffer.from(e));o(i.slice(0,-2)),o(`,
|
|
3
|
-
"modules": {
|
|
4
|
-
`);for(let[e,r]of t.entries())e>0&&o(`,
|
|
5
|
-
`),o(JSON.stringify({indent:{[r]:n[r]}},void 0,2).slice(16,-6));return o(`
|
|
6
|
-
}
|
|
7
|
-
}`),Buffer.concat(a)}#n(){Dt(this.modules,this.formats);let{entries:e,sources:t,modules:n,formats:r,imports:i,executable:a}=dt(this,`bundle`,{skipEmpty:!0});return{version:M,config:this.config,repo:this.repo,package:this.package,entries:e,formats:r,imports:i,executable:a,reason:N(this.reason,void 0),sources:t,modules:n}}withReason(t,n=[...this.sources.keys()]){let{version:r,config:i,entries:a,modules:o,formats:s,imports:c,executable:l,repo:u,package:d}=this,f=N(this.reason,{[t]:n});return new e({version:r,config:i,entries:a,modules:o,formats:s,imports:c,executable:l,reason:f,repo:u,package:d})}merge(t){return S(this.config.scope===t.config.scope,`bundle merge: scope mismatch ('${this.config.scope}' vs '${t.config.scope}')`),new e({config:{scope:this.config.scope},entries:new Set([...this.entries,...t.entries]),modules:xt(this.modules,t.modules,`bundle merge`),formats:gt(this.formats,t.formats,`bundle merge`),imports:mt(this.imports,t.imports,`bundle merge`),executable:_t(this.executable,t.executable,t.modules,this.config.scope),reason:N(this.reason,t.reason),repo:Nt(this.repo,t.repo),package:It(this.package,t.package)})}},Lt={__proto__:null,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`tsx`,json:`json`,css:`css`,html:`markup`,htm:`markup`,xml:`markup`,svg:`markup`,yml:`yaml`,yaml:`yaml`,sh:`bash`,bash:`bash`,md:`markdown`,markdown:`markdown`,sol:`solidity`,php:`php`,phtml:`php`,rs:`rust`,rb:`ruby`,py:`python`,pyw:`python`,pyi:`python`,java:`java`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,"c++":`cpp`,hpp:`cpp`,hh:`cpp`,hxx:`cpp`,"h++":`cpp`,h:`cpp`,c:`c`,m:`objectivec`,mm:`objectivec`},Rt={__proto__:null,module:`javascript`,commonjs:`javascript`,"module-typescript":`typescript`,"commonjs-typescript":`typescript`,json:`json`,solidity:`solidity`,php:`php`,shell:`bash`,rust:`rust`,java:`java`,objc:`objectivec`,objcpp:`objectivec`,c:`c`,"c-header":`c`,cpp:`cpp`,"cpp-header":`cpp`,ruby:`ruby`,podspec:`ruby`,podfile:`ruby`,fastlane:`ruby`,"podfile-lock":`yaml`,xml:`markup`};function zt(e){if(typeof e!=`string`)return!1;let t=e.length-1,n=0;for(;n<t&&/\s/u.test(e[n]);)n++;for(;t>n&&/\s/u.test(e[t]);)t--;return n<t&&e[n]===`{`&&e[t]===`}`}function Bt(e,t,n){if(typeof t==`string`&&Rt[t])return Rt[t];if(typeof e!=`string`)return null;let r=e.slice(e.lastIndexOf(`/`)+1),i=r.lastIndexOf(`.`);if(i<=0)return null;let a=r.slice(i+1).toLowerCase();return a===`map`?zt(n)?`json`:null:Lt[a]??null}var Vt=/^webpack(?:-internal)?:\/\/[^/]*\//u,Ht=/^[a-z][\d+.a-z-]*:/iu,Ut=/^file:/iu,Wt=/^(?:file|ftp|https?|wss?):/iu,Gt=/^(?:[a-z][\d+.a-z-]*:\/\/[^/]*\/?|\/\/[^/]+\/|[a-z]:\/|\/)?/iu,F=e=>Gt.exec(e)[0],I=e=>F(e).includes(`://`),L=e=>e.replace(I(e)?/[#?].*$/su:/\?.*$/su,``),Kt=e=>e.slice(e.lastIndexOf(`/`)+1),R=(e,t)=>URL.parse(e,t)?.href??null;function z(e){let t=F(e),n=t.includes(`://`)&&R(e);if(n)return n;let r=[];for(let n of e.slice(t.length).split(`/`))n===``||n===`.`||(n===`..`?r.length>0&&r.at(-1)!==`..`?r.pop():t||r.push(`..`):r.push(n));let i=/^[a-z]:\/$/iu.test(t)?t.toUpperCase():t.startsWith(`//`)?t.toLowerCase():t;return i?i.replace(/\/?$/u,`/`)+r.join(`/`):r.join(`/`)||`.`}function qt(e,t){let n=F(t);return I(e)&&!n.includes(`:`)?R(t,e)??z(`${e}/../${t}`):z(n===`/`?F(e).replace(/\/?$/u,``)+t:n?t:`${e}/../${t}`)}function Jt(e){try{return decodeURIComponent(e)}catch{return e}}function B(e,t){let n=e.replaceAll(`\\`,`/`);if(Vt.test(n))return z(n.replace(Vt,``));let r=Wt.test(n)?R(n)??n:n,i=/^file:\/\/([^/#]*)([^#]*)/isu.exec(r);if(i){let[,e,t]=i;return z(Jt(e&&e.toLowerCase()!==`localhost`?`//${e}${t}`:t).replace(/^\/(?=[a-z]:\/)/iu,``))}if(Ht.test(r)&&!F(r).includes(`:`))return r;if(t===void 0)return z(r);if(Ut.test(t)&&!F(r))return B(R(r,t)??r);let a=B(t);return F(r)&&!I(a)?z(r):qt(a,r)}var Yt=/^(?:@[\dA-Za-z~-][\w.~-]*\/)?[\dA-Za-z~-][\w.~-]*$/u;function V(e){let t=e.split(`/`).slice(0,e.startsWith(`@`)?2:1).join(`/`);return Yt.test(t)?t:null}var Xt=new Set([`.pnpm`,`.bun`,`.deno`]),Zt=/^\d+\.\d+\.\d+(?:-[\d.a-z-]+)?(?:\+[\d.a-z-]+)?$/iu;function Qt(e,t){let n=`${t.replace(`/`,`+`)}@`,r=e.startsWith(n)?e.slice(n.length).split(/[(_]/u)[0]:null;return Zt.test(r)?r:null}function $t(e){let t=L(e).split(`/`),n=t.lastIndexOf(`node_modules`),r=n<0?null:V(t.slice(n+1).join(`/`));if(r===null)return null;let i=n+1+r.split(`/`).length;if(i>=t.length||t.slice(i).includes(``))return null;let a=t.slice(0,i).join(`/`);return{name:r,version:Xt.has(t[n-2])?Qt(t[n-1],r):null,root:a,path:e.slice(a.length+1)}}var en=new Map([[`js`,`jsx`],[`mjs`,`jsx`],[`cjs`,`jsx`],[`jsx`,`jsx`],[`es`,`jsx`],[`es6`,`jsx`],[`ts`,`ts`],[`mts`,`ts`],[`cts`,`ts`],[`tsx`,`tsx`],[`json`,`json`]]);function tn(e){let t=Kt(L(e));return/^[\w-]+$/u.test(t)?`jsx`:en.get(/\.([\da-z]+)$/iu.exec(t)?.[1].toLowerCase())??null}var nn=[`.js`,`.mjs`,`.cjs`,`.jsx`,`.ts`,`.tsx`,`.mts`,`.cts`,`.json`],rn=[`.ios`,`.android`,`.web`];function an(e){let t=e.map(e=>/\.[a-z]+(?=\.\w+$)/u.exec(Kt(L(e.path??``)))?.[0]),[[n,r],[,i]]=rn.map(e=>[e,t.filter(t=>t===e).length]).toSorted((e,t)=>t[1]-e[1]);return[...r===i?[]:[n],`.native`,``,`.browser`,`.node`]}var on=new Map([[`.js`,[`.ts`,`.tsx`]],[`.jsx`,[`.tsx`]],[`.mjs`,[`.mts`]],[`.cjs`,[`.cts`]]]),sn=[`index`,`main`,`browser`,`node`],cn=[``,`src/`,`lib/`,`dist/`,`build/`],ln=new Set([`lib`,`dist`,`build`,`out`,`esm`,`cjs`]);function*un(e,t){yield e;let n=/\.[^./]+$/u.exec(e)?.[0];for(let t of on.get(n)??[])yield e.slice(0,-n.length)+t;for(let n of e.endsWith(`/`)?[`${e}index`]:[e,`${e}/index`])for(let e of nn)for(let r of t)yield n+r+e;if(n)for(let r of t.filter(Boolean))yield e.slice(0,-n.length)+r+n}function*dn(e){let t=e;for(;;){t.startsWith(`src/`)||(yield`src/${t}`),t!==e&&(yield t);let n=t.indexOf(`/`);if(n<0||!ln.has(t.slice(0,n)))return;t=t.slice(n+1)}}function fn(e){let t=new Map,n=new Map,r=new Map;for(let i of e)i.path!==null&&t.set(i.path,i),i.package&&(n.set(i.package.name,(n.get(i.package.name)??new Set).add(i.package.root)),(r.get(i.package.root)??r.set(i.package.root,[]).get(i.package.root)).push(i));return{byPath:t,roots:n,byRoot:r,platforms:an(e),found:new Map}}function H(e,t){if(!e.found.has(t)){let n=L(t),r=un(n,e.platforms).map(e=>e+t.slice(n.length));e.found.set(t,e.byPath.get(r.find(t=>e.byPath.has(t)))??null)}return e.found.get(t)}function pn(e,t,n){let r=e.roots.get(n);if(!r)return null;let i=t.path.split(`/`);for(let e=i.length-1;e>=0;e--){let t=[...i.slice(0,e),`node_modules`,n].join(`/`);if(r.has(t))return t}return r.size===1?[...r][0]:null}var mn=new Set(`assert.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.domain.events.fs.http.http2.https.inspector.module.net.os.path.perf_hooks.process.punycode.querystring.readline.repl.stream.string_decoder.sys.timers.tls.trace_events.tty.url.util.v8.vm.wasi.worker_threads.zlib._http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert/strict.dns/promises.fs/promises.inspector/promises.path/posix.path/win32.readline/promises.stream/consumers.stream/promises.stream/web.timers/promises.util/types`.split(`.`));function hn(e){if(e.startsWith(`node:`)||mn.has(e))return{builtin:!0};let t=V(L(e));return t===null?{}:{package:t}}function gn(){let e=[],t=new Map,n=(n,r,i)=>{let a=t.get(n)??t.set(n,new Set).get(n);a.has(r)||(a.add(r),e.push(i))};return{edges:e,add:n,link:(e,t,r)=>{e&&t&&t!==e&&n(e,t,{from:e,to:t,kind:r})}}}function _n(e,t){for(let n of sn)for(let r of cn){let i=H(e,`${t}/${r}${n}`);if(i)return i}let n=e.byRoot.get(t);return n?.length===1?n[0]:null}function vn(e,t,n,r){return/^\/[^?]/u.test(n)?H(e,t+n)??dn(n.slice(1)).map(n=>H(e,`${t}/${n}`)).find(Boolean):H(e,t+n)??r(e,t)}function yn(e,t,n,r=_n){let i=/^(?:\.{1,2}|[a-z]:)?\\/iu.test(n)?n.replaceAll(`\\`,`/`):n,a=Wt.test(i);if(a||/^(?:\.{1,2}(?:\/|$)|\/|[a-z]:\/)/iu.test(i)||I(i)){let n=a?B(i):qt(t.path,i),r=H(e,n);return r?{to:r}:{to:null,path:n}}if(Ht.test(i)&&e.byPath.has(i))return{to:e.byPath.get(i)};let o=V(L(n)),s=o===null?null:pn(e,t,o);if(s===null)return{to:null,...hn(n)};let c=vn(e,s,n.slice(o.length),r);return c?{to:c}:{to:null,package:o}}var U=class extends Error{name=`SourceMapError`},bn=new Uint8Array(128).fill(255);for(let[e,t]of[...`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/,;`].entries())bn[t.codePointAt(0)]=e;function W(e){let t=new Int32Array(e.length*2);return t.set(e),t}function xn(e){let{starts:t,columns:n,sources:r,names:i}=e;for(let e=0;e+1<t.length;e++){let[a,o]=[t[e],t[e+1]],s=a+1;for(;s<o&&n[s-1]<=n[s];)s++;if(s>=o)continue;let c=Array.from(n.subarray(a,o),(e,t)=>[e,r[a+t],i[a+t]]).sort((e,t)=>e[0]-t[0]);for(let[e,[t,o,s]]of c.entries())[n[a+e],r[a+e],i[a+e]]=[t,o,s]}return e}function Sn(e){let t=[0],n=new Int32Array(1024),r=new Int32Array(1024),i=new Int32Array(1024),a=0;for(let{mappings:o,files:s,line:c,column:l,names:u,nameCount:d}of e){if(typeof o!=`string`)throw new U(`mappings is not a string`);for(;t.length<=c;)t.push(a);let e=[0,0,0,0,0],f=0,p=0,m=1,h=l;for(let c=0;c<=o.length;c++){let l=c<o.length?bn[o.codePointAt(c)]??255:64;if(l<32){if(p+=l*m,f===5)throw new U(`mappings: a segment of more than 5 fields at ${c}`);e[f++]+=p%2?(1-p)/2:p/2,p=0,m=1}else if(l<64){if(p+=(l-32)*m,m*=32,m>2**30)throw new U(`mappings: a value at ${c} runs past 32 bits`)}else{if(l===255)throw new U(`mappings: ${JSON.stringify(o[c])} at ${c} is not a base64 digit`);if(m!==1)throw new U(`mappings: the value before ${c} is cut off`);if(f>0){if(f===2||f===3)throw new U(`mappings: a segment of ${f} fields before ${c}`);let t=f===1?-1:s[e[1]];if(t===void 0)throw new U(`mappings: source ${e[1]} before ${c} is not in sources`);if(e[0]<0)throw new U(`mappings: a negative generated column before ${c}`);a===n.length&&([n,r,i]=[W(n),W(r),W(i)]),n[a]=e[0]+h,r[a]=t,i[a++]=f===5&&e[4]>=0&&e[4]<d?u+e[4]:-1,f=0}l===65&&(t.push(a),e[0]=0,h=0)}}}return t.push(a),xn({starts:Int32Array.from(t),columns:n.slice(0,a),sources:r.slice(0,a),names:i.slice(0,a)})}var Cn=new WeakMap,wn=e=>Cn.get(e),G=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function K(e,t){if(!e)throw new U(t)}function Tn(e,t){if(e===void 0)return[];K(Array.isArray(e),`${t} is not an array`);for(let n of e)K(typeof n==`string`||n===null,`${t} holds ${JSON.stringify(n)}`);return e}function En(e,t,n,r){let i=e.bySource.get(t);if(i!==void 0)return e.files[i].content??=n,e.files[i].ignored||=r,i;let a=t===null?null:B(t,e.mapPath);return e.files.push({source:t,path:a,package:a===null?null:$t(a),content:n,ignored:r}),t!==null&&e.bySource.set(t,e.files.length-1),e.files.length-1}function Dn(e,t,n,r){K(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),K(e.sourceRoot===void 0||typeof e.sourceRoot==`string`,`sourceRoot is not a string`);let i=Tn(e.sources,`sources`),a=Tn(e.sourcesContent,`sourcesContent`),o=e.ignoreList??e.x_google_ignoreList??[];K(Array.isArray(o)&&o.every(e=>Number.isInteger(e)&&e>=0&&e<i.length),`ignoreList is not a list of indices into sources`);let s=new Set(o),c=e.sourceRoot?e.sourceRoot.replace(/\/?$/u,`/`):``,l=i.map((e,n)=>En(t,e===null?null:c+e,a[n]??null,s.has(n))),u=Array.isArray(e.names)?e.names:[];t.parts.push({mappings:e.mappings,files:l,line:n,column:r,names:t.names.length,nameCount:u.length}),t.names.push(...u)}function On(e,t){K(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),K(Array.isArray(e.sections),`sections is not an array`);for(let[n,r]of e.sections.entries()){let{offset:i,map:a}=G(r)?r:{};K(G(i)&&[i.line,i.column].every(e=>Number.isInteger(e)&&e>=0),`sections[${n}].offset is not a line and a column`),K(G(a)&&a.sections===void 0,`sections[${n}].map is not a plain source map`);let o=e.sections[n-1]?.offset;K(!o||o.line<i.line||o.line===i.line&&o.column<=i.column,`sections[${n}] starts before sections[${n-1}]`),Dn(a,t,i.line,i.column)}}function kn(e,t={}){if(!G(t))throw TypeError(`readSourceMap: options is not an object`);if(t.path!==void 0&&typeof t.path!=`string`)throw TypeError(`readSourceMap: options.path is not a string`);let n=e;if(typeof e==`string`||e instanceof Uint8Array)try{let t=typeof e==`string`?e:new TextDecoder(`utf-8`,{fatal:!0}).decode(e);n=JSON.parse(t.replace(/^\)\]\}'[^\n]*\n/u,``))}catch(e){throw new U(`not JSON: ${e.message}`,{cause:e})}K(G(n),`not a JSON object`);let r={files:[],bySource:new Map,mapPath:t.path,parts:[],names:[]};n.sections===void 0?Dn(n,r,0,0):On(n,r);let i={files:r.files};return Cn.set(i,{...Sn(r.parts),nameList:r.names}),i}var An=/\r\n?|[\n\u2028\u2029]/gu;function jn(e){let t=[0];for(let n of e.matchAll(An))t.push(n.index+n[0].length);return t}function Mn(e,t,n,r){let[i,a]=[t,n];for(;i<a;){let t=i+a>>1;e[t]<=r?i=t+1:a=t}return i-1}function q(e,t){let n=Mn(e,0,e.length,t);return[n,t-e[n]]}function Nn(e,[t,n]){if(t>=e.starts.length-1)return-1;let r=e.starts[t],i=Mn(e.columns,r,e.starts[t+1],n);return i<r?-1:i}function Pn(e,t,n,r){let i=wn(e),a=q(t,n),[o,s]=q(t,r),c=new Map,l=Nn(i,a);for(let e=a[0];e<=o&&e<i.starts.length-1;e++){let t=e===a[0]&&l>=0?l:i.starts[e];for(let n=t;n<i.starts[e+1];n++){let t=i.sources[n];if(e===o&&i.columns[n]>=s)break;t>=0&&c.set(t,(c.get(t)??0)+1)}}let[u]=[...c].reduce((e,t)=>t[1]>e[1]?t:e,[-1,0]);return u<0?null:e.files[u]}var J=/\s+/uy,Fn=`
|
|
8
|
-
\r\u2028\u2029`,In=/[\n\r\u2028\u2029]/gu,Ln=/[\n\r\u2028\u2029]/u,Y=/[\w$\u0080-]+/uy,Rn=new Set([`return`,`typeof`,`instanceof`,`in`,`of`,`new`,`delete`,`void`,`throw`,`case`,`default`,`extends`,`do`,`else`,`yield`,`await`]),zn=new Set([`if`,`while`,`for`,`with`]),Bn=new Set([`break`,`continue`,`debugger`]),Vn=new Set([`(`,`[`,"${",`,`,`=`,`:`,`?`,`!`,`~`,`+`,`-`,`*`,`/`,`%`,`&`,`|`,`^`,`<`,`>`]);function Hn(e,t){return e?.type===`word`?t&&[`return`,`yield`].includes(e.value)?!1:Rn.has(e.value)&&![`do`,`else`].includes(e.value):Vn.has(e?.value)}function Un(e){let t=e.at(-1);return t?.type===`word`&&(zn.has(t.value)||t.value===`await`&&e.at(-2)?.value===`for`)}function Wn(e){return e?e.type===`word`?Rn.has(e.value)||Bn.has(e.value)||e.label===!0:e.value===`)`?e.control:e.value===`}`?!e.object:e.type===`punctuator`&&![`++`,`--`,`]`].includes(e.value):!0}var Gn=(e,t)=>e.startsWith(`\r
|
|
9
|
-
`,t+1)?3:2,Kn=/\\(?:u\{([\da-f]+)\}|u([\da-f]{4})|x([\da-f]{2})|([0-3][0-7]{0,2}|[4-7][0-7]?)|(\r\n|[\n\r\u2028\u2029])|(.))/giu,qn={b:`\b`,f:`\f`,n:`
|
|
10
|
-
`,r:`\r`,t:` `,v:`\v`};function Jn(e){return e.includes(`\\`)?e.replace(Kn,(e,t,n,r,i,a,o)=>{if(a!==void 0)return``;if(i!==void 0)return String.fromCodePoint(Number.parseInt(i,8));let s=Number.parseInt(t??n??r,16);return Number.isNaN(s)?qn[o]??o:String.fromCodePoint(Math.min(s,1114111))}):e}function Yn(e,t){let n=e[t],r=t+1;for(;r<e.length&&e[r]!==n&&!Fn.includes(e[r]);)r+=e[r]===`\\`?Gn(e,r):1;return[e[r]===n?Jn(e.slice(t+1,r)):null,r+1]}function Xn(e,t){let n=t+1,r=!1;for(;n<e.length&&!Fn.includes(e[n])&&(r||e[n]!==`/`);)e[n]===`\\`?n++:e[n]===`[`?r=!0:e[n]===`]`&&(r=!1),n++;return Y.lastIndex=n+1,Y.test(e)?Y.lastIndex:n+1}function Zn(e,t,n){for(let r=t;r<e.length;r++)if(e[r]===`\\`)r++;else{if(e[r]==="`")return r+1;if(e[r]===`$`&&e[r+1]===`{`)return n.push(`template`),r+2}return e.length}function Qn(e){let t=[],n=[],r=[],i=0,a=0;for(;i<e.length;){let o=t.length;if(J.lastIndex=i,J.test(e)&&(i=J.lastIndex),i>=e.length)break;let s=e[i],c=e[i+1];if(Y.lastIndex=i,s===`/`&&c===`/`)In.lastIndex=i+2,i=In.test(e)?In.lastIndex-1:e.length;else if(s===`/`&&c===`*`){let t=e.indexOf(`*/`,i+2);i=t<0?e.length:t+2}else if(s===`"`||s===`'`){let[n,r]=Yn(e,i);t.push({type:`string`,value:n}),i=r}else if(s==="`"||s===`}`&&n.at(-1)===`template`){s===`}`&&n.pop();let r=n.length,a=Zn(e,i+1,n),o=s==="`"&&n.length===r&&e[a-1]==="`";t.push({type:`string`,value:o?Jn(e.slice(i+1,a-1)):null}),n.length>r&&t.push({type:`punctuator`,value:"${"}),i=a}else if(s===`/`&&Wn(t.at(-1)))i=Xn(e,i),t.push({type:`regex`});else if(Y.test(e)){let n=Bn.has(t.at(-1)?.value)&&!Ln.test(e.slice(a,i));t.push({type:`word`,value:e.slice(i,Y.lastIndex),...n&&{label:n}}),i=Y.lastIndex}else{s===`{`&&n.push(Hn(t.at(-1),Ln.test(e.slice(a,i)))?`object`:`block`);let o=s===`}`?n.pop():void 0;s===`(`&&r.push(Un(t));let l=(s===`+`||s===`-`)&&c===s||s===`=`&&c===`>`?s+c:s;t.push({type:`punctuator`,value:l,...s===`)`&&{control:r.pop()===!0},...s===`}`&&{object:o===`object`}}),i+=l.length}t.length>o&&(a=i)}return t}var $n=e=>e?.type===`string`&&e.value!==null,er=new Set([`type`,`typeof`]),tr=(e,t)=>e[t+1]?.type===`word`&&(e[t+1].value!==`as`||e[t+2]?.type!==`word`||e[t+2].value===`as`);function nr(e,t){let n=!1;for(let r=t+1;r<e.length&&e[r].value!==`}`;r++)if(!(r>t+1&&e[r-1].value!==`,`)){if(!er.has(e[r].value)||!tr(e,r))return!1;n=!0}return n}function rr(e,t){for(let n=t;n<e.length;n++){let{value:r}=e[n];if(r===`;`||n>t&&(r===`import`||r===`export`))return null;if(r===`from`&&$n(e[n+1]))return e[n+1].value}return null}function ir(e,t){let[n,r,i]=[e[t].value,e[t+1],e[t+2]],a=n===`import`?`import`:`export-from`;if(n===`import`&&$n(r))return{kind:a,specifier:r.value};if(er.has(r?.value)&&![`,`,`from`].includes(i?.value)||r?.value===`{`&&nr(e,t+1)||n===`export`&&![`{`,`*`].includes(r?.value)||n===`import`&&r?.type!==`word`&&![`{`,`*`].includes(r?.value))return null;let o=rr(e,t+1);return o===null?null:{kind:a,specifier:o}}function ar(e,t){let[n,r]=[e[t+2],e[t+3]];if(n?.value!==`)`)return $n(n)&&[`)`,`,`].includes(r?.value)?n.value:null}function or(e,t=new Set){let n=Qn(e),r=[];for(let[e,i]of n.entries()){if(i.type!==`word`||[`.`,`#`,`function`].includes(n[e-1]?.value)||n[e-1]?.value===`=`&&n[e-3]?.value===`type`&&n[e-4]?.value===`import`)continue;let a=n[e+1]?.value===`(`,o=a?ar(n,e):void 0;if((i.value===`require`||t.has(i.value))&&o!==void 0)r.push({kind:`require`,specifier:o,...i.value!==`require`&&{callee:i.value}});else if(i.value===`import`&&a)o!==void 0&&r.push({kind:`dynamic-import`,specifier:o});else if(i.value===`import`||i.value===`export`){let t=ir(n,e);t&&r.push(t)}}return r}var sr=/^[\w$]*__d\(/gmu,cr=([e,t,n,...r])=>(typeof e==`number`||typeof e==`string`)&&(t===void 0||typeof t==`object`)&&(n===void 0||typeof n==`string`)&&r.length===0;function lr(e){let t=/\);?\s*$/u.exec(e)?.index,n=null,r=t===void 0?-1:e.lastIndexOf(`},`,t);for(;r>=0&&/[\d"]/u.test(e[r+2]);){let i;try{i=JSON.parse(`[${e.slice(r+2,t)}]`)}catch{break}if(!cr(i))break;n=i,r=r>0?e.lastIndexOf(`},`,r-1):-1}return n}function ur(e){let t=/^[^(]*\(\s*(?:function\s*[\w$]*\s*)?\(([^)]*)\)/u.exec(e)?.[1].split(`,`).slice(1,4).map(e=>e.trim().replaceAll(`$`,`\\$`));if(!t?.length)return[];let n=e.matchAll(RegExp(`(?<=[^\\w$.#]|\\.\\.\\.)(?:${t.join(`|`)})\\((\\d+|"(?:[^"\\\\]|\\\\.)*")[,)]`,`gu`));return[...new Set([...n].map(e=>JSON.parse(e[1])))]}function dr(e,t){if(Array.isArray(e))return e;let n=Object.entries(e??{}).filter(([e])=>/^\d+$/u.test(e)).map(([,e])=>e);return n.length>0?n:ur(t)}function fr(e,t){let n=new Map(t.files.map((e,t)=>[e,t])),r=e.flatMap((e,t)=>e.file?[{k:t,at:n.get(e.file)}]:[]);for(let n=0;n<(r[0]?.k??0);n++)e[n].file=t.files[r[0].at-r[0].k+n]??null;for(let[n,{k:i,at:a}]of r.entries()){let o=r[n+1];if(!(o&&o.at-a!==o.k-i))for(let n=i+1;n<(o?.k??e.length);n++)e[n].file=t.files[a+n-i]??null}}function pr(e,t){let n=[...e.matchAll(sr)].map(e=>e.index);if(n.length===0)return null;let r=jn(e),i=t=>e.slice(r[t],r[t+1]),a=[];for(let[o,s]of n.entries()){let[c]=q(r,s),[l]=q(r,(n[o+1]??e.length)-1),u=lr(i(l));for(;!u&&l>c;)u=lr(i(--l));if(!u)throw Error(`bundleEdges: the Metro module at line ${c+1} ends in no define params`);let d=r[l+1]??e.length;a.push({id:u[0],file:Pn(t,r,s,d),dependencies:dr(u[1],e.slice(s,d))})}fr(a,t);let o=new Map(a.map(e=>[e.id,e])),{edges:s,link:c}=gn();for(let{file:e,dependencies:t}of a)for(let n of t)c(e,o.get(n)?.file,`dependency`);return s}var mr=e=>e.path!==null&&![`json`,null].includes(tn(e.path)),hr=e=>e.path!==null&&tn(e.path)===null;function gr(e){let t=/^_([A-Za-z]+)\d+$/u.exec(e)?.[1];if(t)return[t,`interopRequireDefault`];let n=/^_(interopRequire(?:Default|Wildcard)|jsx(?:Dev)?Runtime|callSuper)$/u.exec(e)?.[1];return n===`callSuper`?[`getPrototypeOf`,`possibleConstructorReturn`,`interopRequireDefault`]:n?[n]:[]}var _r={jsxRuntime:`react/jsx-runtime`,jsxDevRuntime:`react/jsx-dev-runtime`};function vr(e){let{sources:t,names:n,nameList:r}=wn(e),i=new Map,a=new Map,o=e.files.map(()=>new Set);for(let e=0;e<n.length;e++)n[e]<0||t[e]<0||(a.has(n[e])||a.set(n[e],gr(r[n[e]]).length>0),a.get(n[e])&&o[t[e]].add(r[n[e]]));for(let[t,n]of o.entries()){if(n.size===0)continue;let r=e.files[t],a=new Set(Array.from((r.content??``).matchAll(/(?:function|var|let|const)\s+(_[A-Za-z]+\d*)\b/gu),e=>e[1])),o=[...n].filter(e=>!a.has(e)&&!a.has(e.replace(/\d+$/u,``))).flatMap(gr);o.length>0&&i.set(r,o.map(e=>_r[e]??`@babel/runtime/helpers/${e}`))}return i}function yr(e,t){let n=new Map;for(let[r,i]of e){let e=n.get(r)??n.set(r,new Map).get(r);for(let n of i)e.set(n,yn(t,r,n,()=>null))}let r=new Set([...n.values()].flatMap(e=>[...e.values()].map(e=>e.to))),i=(e,n)=>t.byRoot.get(n).find(e=>!r.has(e))??t.byRoot.get(n)[0];return(e,r)=>{let a=n.get(e)?.get(r);return a?.to?a:yn(t,e,r,i)}}var br=e=>/(?:^|\/)__prelude__$/u.test(e.source??``),xr=e=>e?.package?.name===`metro-runtime`&&e.package.path===`src/polyfills/require.js`;function Sr(e){if(!e.files.some(br)&&!xr(e.files[0]))return null;if(!e.files.some(e=>e.content!==null&&!br(e)&&!xr(e)))throw Error("bundleEdges: the Metro map carries no sourcesContent, which its edges are read from; pass the bundle as `code`");let t=fn(e.files),n=e.files[e.files.findIndex(hr)+1],r=e.files.find(e=>e.package?.name===`metro-runtime`&&e.package.path===`src/modules/asyncRequire.js`),i=new Map(e.files.filter(e=>e.content!==null&&mr(e)).map(e=>[e,or(e.content)])),a=vr(e),o=yr([...[...i].map(([e,t])=>[e,t.flatMap(({specifier:e})=>e===null?[]:[e])]),...a],t),{edges:s,add:c,link:l}=gn();for(let t of e.files){hr(t)&&l(t,n,`dependency`);for(let{kind:e,specifier:n}of i.get(t)??[]){let i=n===null?{to:null}:o(t,n);i.to!==t&&c(t,`${e}\0${JSON.stringify(n)}`,{from:t,kind:e,specifier:n,...i}),e===`dynamic-import`&&l(t,r,`dependency`)}for(let e of a.get(t)??[])l(t,o(t,e).to,`dependency`)}return s}var Cr=(e,t)=>t==null?Sr(e):pr(t,e);function wr(e,t){let n=Cr(e,t);if(!n)throw Error(`bundleEdges: not a Metro ${t==null?`map`:`bundle`}; edges-lite.js reads only those, edges.js reads others`);return{edges:n}}function Tr(e){let t=JSON.parse(e.replace(/^\)\]\}'[^\n]*\n/u,``)),n=kn(t),r=t.sections?t.sections.reduce((e,t)=>e+(t.map.names?.length??0),0):t.names?.length??null;return{json:{version:t.version,file:t.file,sourceRoot:t.sourceRoot},map:n,namesCount:r}}function Er(e){if(e.map)return e.map.files.flatMap(e=>e.source===null?[]:[[e.source,e.content]]);let t=e.json?.sourcesContent??[];return(e.json?.sources??[]).map((e,n)=>[e,t[n]??null])}function Dr(e,t){let n=new Map;for(let{from:r,to:i,specifier:a}of t(e).edges){if(r.source===null||i?.source==null||i.source===r.source)continue;let e=typeof a==`string`?[r.source,i.source,a]:[r.source,i.source];n.set(e.join(`\0`),e)}return[...n.values()]}function Or(e){try{return wr(e)}catch{return{edges:[]}}}var kr=Object.freeze([]);function X(e){return e?.edges?e.edges:e?.map?(e.edges=Dr(e.map,Or),e.edges):kr}var Ar=new WeakMap,jr=new WeakMap;function Mr(e){let t=X(e);if(!Ar.has(t)){let e=new Map;for(let[n,r]of t)e.has(n)||e.set(n,new Set),e.get(n).add(r);Ar.set(t,e)}return Ar.get(t)}function Nr(e){let t=X(e);if(!jr.has(t)){let e=new Map;for(let[n,r,i]of t)i!==void 0&&(e.has(n)||e.set(n,new Map),e.get(n).set(i,r));jr.set(t,e)}return jr.get(t)}var Pr=new WeakMap,Fr=new WeakMap,Ir=new WeakMap,Lr=new WeakMap,Rr=new WeakMap,zr=new WeakMap;function Z(e){if(e?.metadataOnly)return new Map;let t=e?.bundle??e?.json;if(t&&Pr.has(t))return Pr.get(t);let n=new Map;if(!e)return n;if(e.kind===`stasis`){if(!e.bundle)return n;let t=e.bundle.formats;for(let[r,i]of e.bundle.sources)typeof i==`string`&&(P.isResourceFormat(t?.get(r))||n.set(r,i))}else if(e.kind===`sourcemap`)for(let[t,r]of Er(e))typeof r==`string`&&n.set(t,r);return t&&Pr.set(t,n),n}function Br(e){let t=1;for(let n=e.indexOf(`
|
|
11
|
-
`);n!==-1;n=e.indexOf(`
|
|
12
|
-
`,n+1))t++;return t}var Vr=new WeakMap;function Hr(e){let t=Vr.get(e);if(!t){let n=[...e.keys()].toSorted();t={paths:n,numbers:new Map(n.map((e,t)=>[e,t+1]))},Vr.set(e,t)}return t}function Ur(e,t){let n=Array.isArray(t)?t:[];return{integrity:e.integrity,kind:`sourcemap`,size:e.size,json:{version:3,sources:n.map(([e])=>e),sourcesContent:n.map(([,,e])=>typeof e==`string`?e:null)},fileSizes:new Map(n.map(([e,t])=>[e,t])),npmBinaries:new Map(n.filter(([,,e,t])=>typeof e!=`string`&&typeof t==`string`).map(([e,t,,n])=>[e,{size:t,digest:n}]))}}function Wr(e){let t=e?.bundle??e?.json;if(t&&Fr.has(t))return Fr.get(t);let n=new Map(Z(e));for(let[t,r]of e?.npmBinaries??[])n.set(t,{format:`digest`,...r});if(e?.kind===`stasis`&&e.bundle){let t=e.bundle.formats;for(let[r,i]of e.bundle.sources){if(typeof i!=`string`)continue;let e=t?.get(r);e===`resource`?n.set(r,i):e===`resource:base64`&&n.set(r,{format:`base64`,data:i})}}return t&&Fr.set(t,n),n}var Gr=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function Kr(e){let t=e.endsWith(`=`);if(t?e.length%4!=0||e.at(-3)===`=`:e.length%4==1)return null;let n=t?e.slice(0,e.endsWith(`==`)?-2:-1):e;if(/[^A-Za-z0-9+/]/u.test(n))return null;let r=n.length%4;return r>1&&Gr.indexOf(n.at(-1))&(r===2?15:3)?null:Math.floor(n.length*3/4)}function qr(e){return typeof e==`string`?n(e):e?.format===`digest`?e.size:e?.format===`base64`?Kr(e.data):null}function Q(e){if(e?.fileSizes)return e.fileSizes;let t=e?.bundle??e?.json;if(t&&Ir.has(t))return Ir.get(t);let n=new Map,r=Wr(e),i=e?.kind===`stasis`?e.bundle?.sources.keys():e&&Er(e).map(([e])=>e);for(let e of i??[])n.set(e,qr(r.get(e)));return t&&Ir.set(t,n),n}function Jr(e){if(e?.metadataOnly)return e.unsizedFiles??new Set;let t=Q(e);if(zr.has(t))return zr.get(t);let n=new Set;for(let r of Wr(e).keys())t.get(r)===null&&n.add(r);return zr.set(t,n),n}function Yr(e){let t=Q(e);if(Rr.has(t))return Rr.get(t);let n=Jr(e),r=e?.kind===`stasis`?e.bundle?.formats:null,i=new Map;for(let[a,o]of t)o===null&&!n.has(a)||i.set(a,P.isResourceFormat(r?.get(a))||e?.npmBinaries?.has(a)?`resource`:`source`);return Rr.set(t,i),i}function Xr(e){let t=Q(e),n=e?.kind===`stasis`?e.bundle?.formats:null;if(!n||n.size===0)return t;if(Lr.has(t))return Lr.get(t);let r=new Map;for(let[e,i]of t)P.isResourceFormat(n.get(e))||r.set(e,i);return Lr.set(t,r),r}var Zr=new WeakMap;function Qr(e){if(e?.kind!==`stasis`||!e.bundle?.modules)return null;if(Zr.has(e.bundle))return Zr.get(e.bundle);let t=new Map;for(let[n,r]of e.bundle.modules)for(let e of Object.keys(r.files))t.set(n===`.`?e:`${n}/${e}`,n);return Zr.set(e.bundle,t),t}function $r(t,n=null){let r=new Map;if(t?.kind!==`stasis`||!t.bundle?.modules)return r;for(let[i,a]of t.bundle.modules){if(i===`.`||n&&!n.has(i))continue;let t=a?.repo?.github,o=e(a?.repo?.commit);if(typeof t!=`string`||t===``||!o)continue;let s=typeof a.repo.directory==`string`?a.repo.directory:``;r.set(i,{github:t,...s?{directory:s}:{},commit:o})}return r}function ei(e,t=null,n=(e,t)=>t.name){let r=new Map;if(e?.kind!==`stasis`||!e.bundle?.modules)return r;let i=t===null?null:Qr(e),a=t===null?null:new Set([...t].map(e=>i?.get(e)));for(let[t,i]of e.bundle.modules){if(a&&!a.has(t)||!t.includes(`node_modules`)||!i?.name||typeof i.version!=`string`||!i.version)continue;let e=n(t,i),o=r.get(e);o||(o=new Set,r.set(e,o)),o.add(i.version)}return r}var ti=Object.freeze({javascript:`JavaScript`,jsx:`JSX`,typescript:`TypeScript`,tsx:`TSX`,json:`JSON`,css:`CSS`,markup:`HTML`,yaml:`YAML`,bash:`Shell`,markdown:`Markdown`,solidity:`Solidity`,php:`PHP`,rust:`Rust`,ruby:`Ruby`,java:`Java`,cpp:`C++`,c:`C`,objectivec:`Objective-C`,python:`Python`,go:`Go`,kotlin:`Kotlin`,swift:`Swift`,dart:`Dart`,sql:`SQL`,lua:`Lua`,csharp:`C#`,scala:`Scala`,vue:`Vue`,svelte:`Svelte`}),ni=Object.freeze({py:`python`,pyw:`python`,go:`go`,kt:`kotlin`,kts:`kotlin`,swift:`swift`,dart:`dart`,sql:`sql`,lua:`lua`,cs:`csharp`,scala:`scala`,sc:`scala`,vue:`vue`,svelte:`svelte`});function ri(e){let t=typeof e==`string`?e.slice(e.lastIndexOf(`/`)+1):``,n=t.lastIndexOf(`.`),r=n>0?t.slice(n+1).trim().toLowerCase():``,i=Bt(e)??ni[r];return i?{key:i,label:ti[i]??i}:r?{key:`extension:${r}`,label:`.${r}`}:{key:`other`,label:`Other`}}function ii(e,t){let n=new Map,r=0,i=0;for(let[a,o]of e){let e=ri(a),s=n.get(e.key)??{...e,files:0,lines:0,bytes:0};s.files++,s.lines+=o,s.bytes+=t.get(a)??0,n.set(e.key,s),i+=o,r+=t.get(a)??0}return{files:e.size,lines:i,bytes:r,languages:[...n.values()].toSorted((e,t)=>t.lines-e.lines||e.label.localeCompare(t.label))}}var ai=6,$=new WeakMap,oi=new Set([`terminal`,`code`,`search`,`compare`]);function si(e,t=null){return!!t||oi.has(e)}var ci=/^sha512-[A-Za-z0-9+/]{86}==$/u;function li(e){if(e.fileHashes)return Promise.resolve(e.fileHashes);if($.has(e))return $.get(e);let n=(async()=>{let n=[...Z(e)],r=new Map;for(let e=0;e<n.length;e+=32){let i=await Promise.all(n.slice(e,e+32).map(async([e,n])=>[e,await t(n)]));for(let[e,t]of i)r.set(e,t)}return e.fileHashes=r,r})();return $.set(e,n),n.catch(()=>$.delete(e)),n}function ui(e){if(typeof e!=`string`)return 0;let t=/\S/gu,n=/[\r\n]/gu,r=0;for(;t.test(e)&&(r++,n.lastIndex=t.lastIndex,n.test(e));)t.lastIndex=n.lastIndex;return r}function di(e){return e.lineCounts??=new Map([...Z(e)].map(([e,t])=>[e,ui(t)]))}function fi(e){return e instanceof Map?Object.fromEntries([...e].map(([e,t])=>[e,fi(t)])):e}async function pi(e){let t=await li(e),r=Q(e),i=di(e),a={version:ai,integrity:e.integrity,kind:e.kind,size:e.size,codeStats:ii(i,r),files:[...r].map(([e,n])=>[e,n,t.get(e)??null,i.get(e)??null])},o=Jr(e);if(o.size>0&&(a.unsized=[...o]),e.kind===`sourcemap`){let{version:t,file:r,sourceRoot:i,names:o}=e.json,s=Er(e);a.json={version:t,file:r,sourceRoot:i,sources:s.map(([e])=>e)},a.sourceSizes=s.map(([,e])=>typeof e==`string`?n(e):null),a.namesCount=e.namesCount??o?.length??null;let c=new Map(a.files.map(([e],t)=>[e,t]));a.edges=X(e).map(([e,t,...n])=>[c.get(e),c.get(t),...n])}else{let t=e.bundle,n={version:t.version,config:t.config,repo:t.repo,package:t.package,formats:fi(t.formats),imports:fi(t.imports),reason:t.reason,executable:[...t.executable]};if(t.version===0)n.sources=Object.fromEntries([...r.keys()].map(e=>[e,null]));else{let e={},r={};for(let[n,i]of t.modules){let t=n.split(`/`).includes(`node_modules`)?e:r;Object.defineProperty(t,n,{enumerable:!0,value:{name:i.name,version:i.version,ecosystem:i.ecosystem,repo:i.repo,files:Object.fromEntries(Object.keys(i.files).map(e=>[e,null]))}})}n.modules=e,t.config.scope===`full`&&(n.sources=r,n.entries=[...t.entries])}a.bundle=n}return a}function mi(e,t){if(![1,2,3,4,5,ai].includes(e?.version)||e.integrity!==t||![`stasis`,`sourcemap`].includes(e.kind)||!Number.isSafeInteger(e.size)||e.size<0||!Array.isArray(e.files))throw Error(`Invalid bundle metadata`);let n=e.version!==ai,r=e.version===1,i=new Map,a=new Map,o=new Map;for(let t of e.files){if(!Array.isArray(t)||t.length!==4&&!(r&&t.length===3))throw Error(`Invalid bundle metadata file`);let[e,n,s,c]=t;if(typeof e!=`string`||a.has(e)||n!==null&&(!Number.isSafeInteger(n)||n<0)||s!==null&&(typeof s!=`string`||!ci.test(s))||n===null&&s!==null||r&&n!==null&&s===null||c!=null&&(!Number.isSafeInteger(c)||c<0))throw Error(`Invalid bundle metadata file`);a.set(e,n),s!==null&&i.set(e,s),c!=null&&o.set(e,c)}let s=new Set(e.unsized??[]);if(e.unsized!==void 0&&(r||!Array.isArray(e.unsized)||s.size!==e.unsized.length)||[...s].some(e=>typeof e!=`string`||!a.has(e)||a.get(e)!==null))throw Error(`Invalid bundle metadata`);let c={integrity:t,kind:e.kind,size:e.size,metadataOnly:!0,fileSizes:a,fileHashes:i,lineCounts:o,unsizedFiles:s,stale:n};if(e.kind===`stasis`){c.bundle=P.fromJSON(e.bundle);let t=c.bundle.sources;if(t.size!==a.size||[...t.keys()].some(e=>!a.has(e)))throw Error(`Invalid bundle metadata inventory`);let n=c.bundle.formats;if(!r&&[...a].some(([e,t])=>i.has(e)!==(t!==null&&!P.isResourceFormat(n.get(e))))||[...s].some(e=>n.get(e)!==`resource:base64`))throw Error(`Invalid bundle metadata inventory`)}else{if(!e.json||typeof e.json!=`object`||![null,void 0].includes(e.namesCount)&&(!Number.isSafeInteger(e.namesCount)||e.namesCount<0))throw Error(`Invalid sourcemap metadata`);if(!Array.isArray(e.json.sources)||e.json.sources.some(e=>!a.has(e))||!Array.isArray(e.sourceSizes)||e.sourceSizes.length!==e.json.sources.length||e.sourceSizes.some(e=>e!==null&&(!Number.isSafeInteger(e)||e<0))||[...a].some(([e,t])=>i.has(e)!==(t!==null))||s.size>0)throw Error(`Invalid sourcemap inventory`);c.json=e.json,c.sourceSizes=e.sourceSizes,c.namesCount=e.namesCount,e.edges!==void 0&&(c.edges=hi(e.edges,e.files))}if(e.codeStats===void 0)c.codeStats=ii(o,a);else{let t=e.codeStats,n=e=>Number.isSafeInteger(e)&&e>=0;if(!t||![t.files,t.lines,t.bytes].every(n)||!Array.isArray(t.languages)||t.languages.some(e=>!e||typeof e.key!=`string`||typeof e.label!=`string`||![e.files,e.lines,e.bytes].every(n)))throw Error(`Invalid bundle code stats`);c.codeStats=t}return c}function hi(e,t){if(!Array.isArray(e))throw TypeError(`Invalid sourcemap edges`);return e.map(e=>{if(!Array.isArray(e)||![2,3].includes(e.length)||e[0]===e[1]||e.length===3&&typeof e[2]!=`string`||e.slice(0,2).some(e=>!Number.isSafeInteger(e)||e<0||e>=t.length))throw Error(`Invalid sourcemap edges`);return[t[e[0]][0],t[e[1]][0],...e.slice(2)]})}function gi(e,{integrity:t,kind:n,size:r}){if(n===`stasis`)return{integrity:t,kind:n,size:r,bundle:P.parse(e)};if(n!==`sourcemap`)throw Error(`Unsupported bundle format`);return{integrity:t,kind:n,size:r,...Tr(e)}}export{Mt as a,P as b,Bt as c,ii as d,X as e,Mr as f,Nr as g,Z as h,Br as i,Hr as j,Ur as k,Wr as l,qr as m,Q as n,Yr as o,Xr as p,Qr as q,$r as r,ei as s,si as t,li as u,ui as v,di as w,pi as x,mi as y,gi as z};
|
package/out/chunk-WMFDQS2L.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as e,b as t,c as n,d as r}from"./chunk-M3Y6SLC4.js";import{C as i,D as a,E as o,H as s,M as c,N as l,Q as u,S as d,a as f,e as p,f as m,h,i as g,j as _,k as v,m as y,n as b,o as x,p as S,q as ee,r as C,x as w,y as T,z as te}from"./chunk-UCP3JRE2.js";import{a as ne}from"./chunk-Z667U2UJ.js";import{b as re}from"./chunk-DEVAORP2.js";import"./chunk-ZQHLECTI.js";import"./chunk-PXK7EU4V.js";import{a as ie,b as E,c as ae,d as D,f as oe,h as O,i as k,k as se,n as A,q as ce}from"./chunk-JMG5DXII.js";import"./chunk-OOJM4CTU.js";var j=class extends ae{},le=e=>RegExp(`(?:[^ ?:,[\\]{}#&*!|>'"%@\`-]|[-?:](?=[^${e}]))(?:[^:${e}]|:(?=[^${e}])| +(?=[^#:${e}]|:[^${e}]))*`,`uy`),ue={block:le(` `),flow:le(` ,[\\]{}`)},de=/'((?:[^']|'')*)'/uy,fe=/"((?:[^"\\]|\\.)*)"/uy,pe={__proto__:null,0:`\0`,a:`\x07`,b:`\b`,t:` `,n:`
|
|
2
|
-
`,v:`\v`,f:`\f`,r:`\r`,e:`\x1B`," ":` `,'"':`"`,"/":`/`,"\\":`\\`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`},me=/\\(?:x([\dA-Fa-f]{2})|u([\dA-Fa-f]{4})|U([\dA-Fa-f]{8})|(.))/gu;function he(e,t){return e.replace(me,(e,n,r,i,a)=>{if(a!==void 0){if(!(a in pe))throw new j(`unknown escape \\${a}`,t.line);return pe[a]}let o=Number.parseInt(n??r??i,16);if(o>1114111||o>=55296&&o<=57343)throw new j(`${e} is not a Unicode scalar value`,t.line);return String.fromCodePoint(o)})}var ge={__proto__:null,true:!0,false:!1,null:null},_e=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[Ee][+-]?\d+)?$/u,ve=/^(?:~|null|true|false|\.nan|[+-]?(?:\.inf|0[box][\d_a-f]+|(?:\d[\d_]*(?:\.[\d_]*)?|\.[\d_]+)(?:e[+-]?\d+)?))$/iu,ye=/^\d{4}-(?:\d\d-\d\d|\d\d?-\d\d?(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)?(?: *(?:Z|[+-]\d\d?(?::\d\d)?))?)$/u;function be(e,t){if(e in ge)return ge[e];if(_e.test(e)&&e!==`-0`){let n=Number(e);if(Math.abs(n)>2**53-1)throw new j(`number out of range ${E(e)}`,t.line);return n}if(ve.test(e)||ye.test(e))throw new j(`ambiguous scalar ${E(e)}, quote it`,t.line);return e}var M=e=>e.pos<e.text.length?E(e.text.slice(e.pos)):`the end of the line`,xe=(e,t)=>he(e,{line:t});function Se(e,t){let n=A(e,de);return n===null?(n=A(e,fe),n===null?(n=A(e,ue[t]),n===null?void 0:be(n[0],e)):he(n[1],e)):n[1].replaceAll(`''`,`'`)}function Ce(e,t){let n=Se(e,t);if(n===void 0)throw new j(`expected a scalar, found ${M(e)}`,e.line);return n}function N(e,t,n,r){if(typeof t!=`string`)throw new j(`keys must be strings`,r);if(t===`<<`)throw new j(`merge keys are not supported`,r);if(t in e)throw new j(`duplicate key ${E(t)}`,r);e[t]=n}var P=/ */uy,we=/, */uy,Te=/: +/uy,Ee=/:(?: +(?:#.*)?|$)/uy,De=/(?: +#.*| *)$/uy,Oe=64;function F(e,t){let n=t===`]`?[]:Object.create(null);if(e.workflow&&++e.depth>Oe)throw new j(`nested too deep`,e.line);if(e.pos++,A(e,P),e.text[e.pos]!==t)do{if(e.workflow&&e.text[e.pos]===t)break;if(e.workflow)je(e,n,t);else{let r=I(e);if(t===`]`)n.push(r);else{if(A(e,Te)===null)throw new j(`expected ": " after the key, found ${M(e)}`,e.line);N(n,r,I(e),e.line)}}A(e,P)}while(A(e,we)!==null);if(e.text[e.pos]!==t)throw new j(`expected "," or "${t}", found ${M(e)}`,e.line);return e.pos++,e.workflow&&e.depth--,n}function I(e){let t=e.text[e.pos];return e.workflow&&(t===`[`||t===`{`)?F(e,t===`[`?`]`:`}`):Ce(e,`flow`)}var ke=/ *:(?=[ ,\]}]|$)/uy,Ae=/ *:/uy;function je(e,t,n){let r=e.text[e.pos]===`"`||e.text[e.pos]===`'`,i=I(e),a=A(e,r?Ae:ke)!==null;if(n===`]`&&!a){t.push(i);return}A(e,P);let o=a&&e.text[e.pos]!==`,`&&e.text[e.pos]!==n?I(e):null;if(n===`}`){N(t,i,o,e.line);return}let s=Object.create(null);N(s,i,o,e.line),t.push(s)}function L(e,t,n=!1){let r={text:e,pos:0,line:t,workflow:n,depth:0},i=e.startsWith(`{`)?F(r,`}`):e.startsWith(`[`)?F(r,`]`):Ce(r,`block`);if(A(r,De)===null)throw new j(`unexpected ${M(r)} after the value`,t);return i}function Me(e,t){let n={text:e,pos:0,line:t},r=Se(n,`block`),i=n.pos;if(r===void 0||A(n,Ee)===null)return null;if(i>1024)throw new j(`a key longer than 1024 characters is written after "? "`,t);return{key:r,rest:e.slice(n.pos)}}var Ne=2**20,R=128;function z(e){if(e.text.includes(` `))throw new j(`U+0009 is not allowed outside a block scalar`,e.number)}function B(e,t){if(!e.startsWith(`&`))return{anchor:null,rest:e};let n=/^&([^ ,[\]{}]+)(?: +|$)/u.exec(e);if(n===null)throw new j(`expected an anchor's name, found ${E(e)}`,t);let r=e.slice(n[0].length);if(r.startsWith(`*`))throw new j(`an alias with an anchor is not supported`,t);return{anchor:n[1],rest:r}}function Pe(e,t,n){if(/^\*[^ ,[\]{}]+ *:(?: |$)/u.test(t))throw new j(`an alias as a key is not supported`,n);let r=/^\*([^ ,[\]{}]+)(?: +#.*| *)$/u.exec(t);if(r===null)throw new j(`unexpected ${E(t)} after an alias`,n);if(!e.anchors.has(r[1]))throw new j(`unknown alias ${E(`*${r[1]}`)}`,n);return e.aliased=!0,e.anchors.get(r[1])}function Fe(e,t=1){let n=e[0];for(let r=t;r<e.length;r++)if(n===`"`&&e[r]===`\\`)r++;else if(e[r]===n){if(n===`'`&&e[r+1]===`'`)r++;else return r}return-1}function Ie(e,t){let n=/ *$/u.exec(e).index,r=/\\*$/u.exec(e.slice(0,n))[0].length;return t&&r%2==1?n===e.length?{text:e.slice(0,-1),escaped:!0}:{text:e.slice(0,n+1),escaped:!1}:{text:e.slice(0,n),escaped:!1}}function Le(e,t,n){let r=0,i=!1,a=``;for(let[o,s]of e.entries()){let c=o===e.length-1,l=o===0?s:s.replace(/^ +/u,``);if(o>0&&!c&&l===``){r++;continue}if(i&&r>0)throw new j(`an empty line after an escaped line break is not supported`,n);o>0&&(a+=r>0?`
|
|
3
|
-
`.repeat(r):i?``:` `);let u=c?{text:l,escaped:!1}:Ie(l,t);a+=u.text,r=0,i=u.escaped}return a}function Re(e,t,n,r){let i=t[0]===`"`,a=[t.slice(1)],o=[n.number];for(let s=e.line;;s=e.advance()){if(s===void 0||e.isMarker(s))throw new j(`a quoted scalar that does not close`,n.number);z(s),o.push(s.number);let c=Fe(`${t[0]}${s.text}`);if(c===-1){a.push(s.text);continue}if(a.push(s.text.slice(0,c-1)),!/^(?: +#.*| *)$/u.test(s.text.slice(c)))throw new j(`unexpected ${E(s.text.slice(c))} after the value`,s.number);if(e.advance(),i)for(let[e,t]of a.entries())r(t,o[e]);let l=Le(a,i,n.number);return i?r(l,n.number):l.replaceAll(`''`,`'`)}}function ze(e,t,n){if(/(?:^| )#/u.test(t))return t;let r=0,i=t.replace(/ +$/u,``);for(let t=e.line;t!==void 0;t=e.advance())if(t.text===``)r++;else{if(t.indent<=n||t.text.startsWith(`#`)||e.isMarker(t))break;if(z(t),i+=`${r>0?`
|
|
4
|
-
`.repeat(r):` `}${t.text.replace(/ +$/u,``)}`,r=0,/ #/u.test(t.text)){e.advance();break}}return i}function Be(e,t,n){let r=n===`plain`;for(let i=0;i<e.length;i++){let a=e[i];if(a!==` `){if((a===`"`||a===`'`)&&n!==`plain`){let t=Fe(e.slice(i));if(t===-1)return{open:-1,kept:e,last:n,comment:!1};i+=t,n=`quoted`}else{if(a===`#`&&(i===0||e[i-1]===` `))return{open:t,kept:e.slice(0,i),last:n,comment:!0};if(a===`[`||a===`{`)t++,n=`open`;else if(a===`]`||a===`}`){if(n=`close`,--t===0)return{open:t,kept:e.slice(0,i+1),after:e.slice(i+1),last:n,comment:!1}}else if(a===`,`||a===`:`&&/^(?:[ ,[\]{}]|$)/u.test(e[i+1]??``)){if(a===`:`&&r)return{open:t,kept:e,last:n,comment:!1,keyed:!0};n=`indicator`}else n=`plain`}r&&=n===`plain`}}return{open:t,kept:e,last:n,comment:!1}}function Ve(e,t,n,r){let i=0,a=!1,o=null,s=!1,c=Be(t,0,null),l=null,u=``;for(let t=n;;){if(c.open===-1)throw new j(`a quoted scalar in a flow collection does not close on its line`,t.number);let d=c.kept.replace(/ +$/u,``);if(d!==``){let e=s&&!/^(?:[,\]}]|:(?:[ ,[\]{}]|$))/u.test(d);if(e&&a)throw new j(`a plain scalar in a flow collection goes on past a comment`,t.number);if(c.keyed||d.startsWith(`:`)&&!e&&(o===`plain`||o===`quoted`))throw new j(`a key over more than one line is not supported`,t.number);if(e&&l!==null&&z(l),e&&t.indent<=r)throw new j(`bad indentation of a plain scalar in a flow collection`,t.number);u!==``&&(u+=e&&i>1?`
|
|
5
|
-
`.repeat(i-1):` `),u+=d,i=0,o=c.last,s=o===`plain`,a=!1,l=null}if(a||=s&&c.comment,c.after!==void 0){if(!/^(?: +#.*| *)$/u.test(c.after))throw new j(`unexpected ${E(c.after)} after the value`,t.number);return t!==n&&e.advance(),u}if(t=t===n?e.line:e.advance(),t===void 0||e.isMarker(t))throw new j(`a flow collection that does not close`,n.number);let f=/^[\t ]*$/u.test(t.text);!f&&!t.text.startsWith(`#`)?z(t):f&&s&&!a&&t.text.includes(` `)&&(l??=t),i++,c=Be(f?``:t.text,c.open,s&&!a?`plain`:null)}}function He(e){let t=new Map,n=(e,r)=>{if(typeof e!=`object`||!e)return{size:1,height:0};if(r>R)throw new j(`aliases nest the document past ${R} levels`);let i=t.get(e);if(i===void 0){i={size:1,height:0};for(let t of Object.values(e)){let e=n(t,r+1);if(i.size+=e.size,i.height=Math.max(i.height,e.height+1),i.size>Ne)throw new j(`aliases expand the document past ${Ne} nodes`)}t.set(e,i)}if(r+i.height>R)throw new j(`aliases nest the document past ${R} levels`);return i};n(e,0)}var Ue=64,We=RegExp(`(?! )${se.source}`,`u`);function Ge(e){if(typeof e!=`object`||!e)throw TypeError(`expected an options object`);let t=Object.keys(e).find(e=>e!==`workflow`&&e!==`lines`);if(t!==void 0)throw TypeError(`unknown option ${t}`);let{workflow:n=!1,lines:r}=e;if(typeof n!=`boolean`)throw TypeError(`expected workflow to be a boolean`);if(r!==void 0&&!(r instanceof WeakMap))throw TypeError(`expected lines to be a WeakMap`);return{workflow:n,lines:r}}var Ke=e=>e.indent===0&&/^(?:---|\.\.\.)(?: |$)/u.test(e.text);function qe(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let n={text:e,pos:0,number:-1,line:void 0,...Ge(t),anchors:null,aliased:!1};n.workflow&&Object.assign(n,{advance:()=>V(n),isMarker:Ke}),V(n);let r=[];Je(n);do r.push(Ye(n));while(Je(n));return r}function Je(e){return H(e)!==void 0||e.line===void 0?!1:(V(e),!0)}function Ye(e){let t=H(e);if(t===void 0)throw new j(`empty document`,e.line?.number);if(t.indent!==0)throw new j(`the document does not start at column 0`,t.number);e.workflow&&Object.assign(e,{anchors:new Map,aliased:!1});let n=G(e,0,0);if(e.aliased&&He(n),H(e)!==void 0)throw new j(`unexpected content after the document`,e.line.number);if(typeof n!=`object`||!n)throw new j(`the document is a lone scalar, not a mapping or a sequence`,t.number);return n}function V(e){let{text:t,pos:n}=e;if(e.line=void 0,n>=t.length)return;let r=t.indexOf(`
|
|
6
|
-
`,n);r===-1&&(r=t.length),e.pos=r+1;let i=++e.number;if(t[r-1]===`\r`&&r--,r-n>ce)throw new j(`line longer than ${ce} characters`,i);let a=n;for(;t[a]===` `;)a++;let o=t.slice(a,r),s=(e.workflow?We:se).exec(o)?.[0];if(s!==void 0)throw new j(`${ie(s)} is not allowed`,i);return e.line={indent:a-n,text:o,number:i},e.line}function H(e){let t=e.line;for(;t!==void 0&&(t.text===``||t.text[0]===`#`||e.workflow&&/^[\t ]*$/u.test(t.text));)t=V(e);if(t!==void 0&&e.workflow&&z(t),t?.indent!==0||!/^(?:---|\.\.\.(?: |$)|%)/u.test(t.text))return t;if(!/^--- *$/u.test(t.text))throw new j(t.text.startsWith(`---`)?`content on the document marker line`:`document end markers and directives are not supported`,t.number)}var U=e=>/^-(?: |$)/u.test(e.text),W=e=>/^[|>]/u.test(e);function G(e,t,n){let r=H(e);if(n>Ue)throw new j(`nested too deep`,r.number);if(U(r))return Qe(e,t,n);let i=r.text.startsWith(`? `)?void 0:q(e,r);return i===null?(V(e),e.workflow?K(e,r.text,r.indent-1,n,r):L(r.text,r.number)):Ze(e,t,n,i)}function Xe(e,t,n,r){let i;for(i=H(e);i?.indent===t;i=H(e)){if(r?.(i))return;n(i)}if(i?.indent>t)throw new j(`bad indentation`,i.number)}function Ze(e,t,n,r){let i=Object.create(null),a=e.lines&&new Map;e.lines?.set(i,a);let o=r;return Xe(e,t,r=>{if(!r.text.startsWith(`? `)){let s=o??q(e,r);if(o=void 0,s===null)throw new j(`expected a mapping key, found ${E(r.text)}`,r.number);V(e),s.anchor&&e.anchors.set(s.anchor,s.key),N(i,s.key,$e(e,s.rest,t,n,r),r.number),a?.set(s.key,r.number);return}V(e);let s=L(r.text.slice(2),r.number),c=H(e);if(c?.indent!==t||!/^:(?: |$)/u.test(c.text))throw new j(`expected ": " below the explicit key`,(c??r).number);N(i,s,et(e,c,t,n),r.number),a?.set(s,r.number)}),i}function Qe(e,t,n,r=!1){let i=[],a=e.lines&&[];return e.lines?.set(i,a),Xe(e,t,r=>{if(!U(r))throw new j(`expected "- ", found ${E(r.text)}`,r.number);a?.push(r.number),i.push(et(e,r,t,n))},r?e=>!U(e):void 0),i}function $e(e,t,n,r,i){if(e.workflow)return K(e,t,n,r,i);if(W(t))return tt(e,t,n,i);if(t!==``)return L(t,i.number);let a=H(e);if(a?.indent===n&&U(a)&&!U(i))throw new j(`a sequence under a key must be indented`,a.number);if(a===void 0||a.indent<=n)throw new j(`missing value`,i.number);return G(e,a.indent,r+1)}function et(e,t,n,r){let i=/^[-:] *(?:#.*)?/u.exec(t.text)[0].length;if(e.workflow)return at(e,t,n,r,i);let a=t.text.slice(i);return a===``||W(a)?(V(e),$e(e,a,n,r,t)):(e.line={...t,indent:t.indent+i,text:a},G(e,t.indent+i,r+1))}function tt(e,t,n,r){let{folded:i,digit:a,chomp:o}=nt(e,t,r),s=n+Number(a),c=a!==``,l=0,u=``,d=null;for(let t=e.line;t!==void 0&&(t.text===``||t.indent>n);t=V(e)){if(c||(s=Math.max(s,t.indent)),c||=t.text!==``,t.text!==``&&t.indent<s)throw new j(`bad indentation in the block scalar`,t.number);let e=`${` `.repeat(Math.max(t.indent-s,0))}${t.text}`;if(e!==``){let t=/^[\t ]/u.test(e);u+=i?rt(l,d,t):`
|
|
7
|
-
`.repeat(l),u+=e,d=t}l=e===``?l+1:1}return o===`+`?u+`
|
|
8
|
-
`.repeat(l):o===`-`?u:u&&`${u}
|
|
9
|
-
`}function nt(e,t,n){let r=e.workflow?/^([|>])(?:([1-9])([+-]?)|([+-])([1-9]?))?(?: +#.*| *)$/u.exec(t):/^\|([1-9]?)([+-]?)$/u.exec(t);if(r===null)throw new j(`unsupported block scalar ${E(t)}`,n.number);return e.workflow?{folded:r[1]===`>`,digit:r[2]??r[5]??``,chomp:r[3]||r[4]||``}:{folded:!1,digit:r[1],chomp:r[2]}}var rt=(e,t,n)=>t===null||t||n?`
|
|
10
|
-
`.repeat(e):e===1?` `:`
|
|
11
|
-
`.repeat(e-1);function K(e,t,n,r,i){let{anchor:a,rest:o}=B(t,i.number),s=it(e,o.startsWith(`#`)?``:o,n,r,i);return a!==null&&e.anchors.set(a,s),s}function it(e,t,n,r,i){if(t.startsWith(`*`))return Pe(e,t,i.number);if(W(t))return tt(e,t,n,i);if(t.startsWith(`[`)||t.startsWith(`{`))return L(Ve(e,t,i,n),i.number,!0);let a=t.startsWith(`'`)||t.startsWith(`"`);if(a&&Fe(t)===-1)return Re(e,t,i,xe);if(t!==``)return L(a?t:ze(e,t,n),i.number,!0);let o=H(e);return o?.indent===n&&U(o)&&!U(i)?Qe(e,n,r+1,!0):o===void 0||o.indent<=n?null:!U(o)&&!o.text.startsWith(`? `)&&q(e,o)===null?(V(e),K(e,o.text,n,r+1,o)):G(e,o.indent,r+1)}function at(e,t,n,r,i){let a=t.text.slice(i),{anchor:o,rest:s}=B(a,t.number),c=t.indent+i;if(s!==``&&!s.startsWith(`#`)&&(U({text:s})||s.startsWith(`? `))){if(o!==null)throw new j(`an anchor before a block on its own line is not supported`,t.number);return e.line={...t,indent:c,text:s},G(e,c,r+1)}return s!==``&&!s.startsWith(`#`)&&Me(s,t.number)!==null?(e.line={...t,indent:c,text:a},G(e,c,r+1)):(V(e),K(e,a,n,r,t))}function q(e,t){if(!e.workflow||!t.text.startsWith(`&`))return Me(t.text,t.number);let{anchor:n,rest:r}=B(t.text,t.number),i=Me(r,t.number);return i&&{...i,anchor:n}}var ot=`(patch_hash=`;function st(e){let t={start:e.length,peers:e.length};if(!e.endsWith(`)`))return t;let n=1;for(let t=e.length-2;t>=0;t--)if(e[t]===`(`)n--;else if(e[t]===`)`)n++;else if(n===0){if(!e.startsWith(ot,t+1))return{start:t+1,peers:t+1};let n=e.indexOf(`(`,t+2);return{start:t+1,peers:n===-1?e.length:n}}return t}function J(e){if(typeof e!=`string`)throw TypeError(`expected a string`);return e.slice(0,st(e).start)}function ct(e,t,n){let r=[],[i,a]=[0,0];for(let o=0;o<e.length;o++){if(i===0&&(e[o]!==`(`||e[o+1]===`)`||e.startsWith(ot,o)))throw new D(`${O(t)} does not end in peers in parentheses`,n);e[o]===`(`&&i++===0?a=o+1:e[o]===`)`&&--i===0&&r.push(e.slice(a,o))}return r}function lt(e,t){let{start:n,peers:r}=st(e),i;if(n<r){let a=e.slice(n,r);if(i=/^\(patch_hash=([\da-z]+)\)$/u.exec(a)?.[1],i===void 0)throw new D(`${O(a)} is not a patch hash`,t)}return{base:e.slice(0,n),patchHash:i,peers:ct(e.slice(r),e,t)}}var Y=e=>ne(e,{padding:!1}),X=(e,t,n)=>oe(()=>e===e.toLowerCase()&&n(e).length===t,()=>!1);function ut(e,t){let n=e.indexOf(`@`,1);if(n===-1||n===e.length-1)throw new D(`${O(e)} is not a key of the form name@version`,t);if(J(e)!==e)throw new D(`${O(e)} carries a peer or patch suffix, which only a snapshot key does`,t);return{name:w(e.slice(0,n),t),ref:e.slice(n+1)}}var dt=(e,t)=>/^[^:(]*@/u.test(e)?e:`${t}@${e}`;function ft(e,t){let n=b(e,t);if(n.startsWith(`file:`))i(n.slice(5),t);else if(!u(n))throw new D(`${O(n)} is not an http(s) URL or a file: path`,t);return n}var pt=(e,t)=>e===``?`.`:i(e,t),mt=(e,t)=>y(e,`path`,t,(e,t)=>(a(b(e,t).replace(/^\//u,``),t),e));function ht(e,t){p(e,t,[`integrity`,`tarball`,`path`,`gitHosted`]);let{integrity:n,tarball:r}=e;if(n===void 0&&r===void 0)throw new D(`expected an integrity or a tarball`,t);return{type:`tarball`,integrity:y(e,`integrity`,t,l),tarball:y(e,`tarball`,t,ft),path:mt(e,t),gitHosted:C(e.gitHosted,k(t,`gitHosted`))}}function gt(e,t){p(e,t,[`type`,`repo`,`commit`,`path`]);let n=b(e.commit,k(t,`commit`));if(!s(n))throw new D(`${O(n)} is not a full commit hash`,k(t,`commit`));return{type:`git`,repo:c(e.repo,k(t,`repo`)),commit:n,path:mt(e,t)}}function _t(e,t){return p(e,t,[`type`,`directory`]),{type:`directory`,directory:pt(e.directory,k(t,`directory`))}}var vt=new Map([[void 0,ht],[`git`,gt],[`directory`,_t]]);function yt(e,t){let n=p(e,t),r=vt.get(n.type);if(r===void 0)throw new D(`unsupported resolution type, ${f(n.type)}`,k(t,`type`));return r(n,t)}var bt=[`resolution`,`version`,`name`,`engines`,`cpu`,`os`,`libc`,`deprecated`,`hasBin`,`bundledDependencies`,`peerDependencies`,`peerDependenciesMeta`],xt=[`dependencies`,`optionalDependencies`,`optional`,`transitivePeerDependencies`],St=new Set([`bitbucket`,`catalog`,`custom`,`file`,`git`,`github`,`gitlab`,`http`,`https`,`jsr`,`link`,`npm`,`ssh`,`workspace`]);function Ct(e,t,n,r,i){let{type:a,tarball:o}=r,s=o?.startsWith(`file:`);if(T(t)){if(a!==`tarball`||r.integrity===void 0||s||r.gitHosted||r.path!==void 0)throw new D(`expected a registry tarball with an integrity, for the version ${O(t)}`,k(i,`resolution`));if(n.version!==void 0&&n.version!==t)throw new D(`expected the version in the key, ${O(t)}`,k(i,`version`));return o!==void 0&&d(o,e,t,k(k(i,`resolution`),`tarball`)),t}let c=/^([A-Za-z][\w+.-]*):/u.exec(t)?.[1];if(c===void 0)throw new D(`${O(t)} is neither a version nor a source`,i);if(c===`runtime`||!St.has(c)&&T(t.slice(c.length+1)))throw new D(`${O(t)} is from a runtime or a named registry, which is not supported`,i);if(!(c===`file`?t===(a===`directory`?`file:${n.resolution.directory}`:o):a===`git`||a===`tarball`&&o!==void 0&&!s))throw new D(`${O(t)} is not where the resolution says the package comes from`,k(i,`resolution`));if(a===`directory`){if(n.version!==void 0)throw new D(`a directory has no version in the lockfile`,k(i,`version`))}else{if(n.version===void 0)throw new D(`expected a version, for a package not from the registry`,i);return te(n.version,k(i,`version`))}}var wt=(e,t)=>x(e,t,w);function Tt(e,t,n){p(t,n,bt);let{name:r,ref:i}=ut(e,n);if(t.name!==void 0&&t.name!==r)throw new D(`expected the name in the key, ${O(r)}`,k(n,`name`));let a=yt(t.resolution,k(n,`resolution`)),o=t.bundledDependencies;return{name:r,version:Ct(r,i,t,a,n),resolution:a,engines:ee(v(t.engines),k(n,`engines`)),os:y(t,`os`,n,x),cpu:y(t,`cpu`,n,x),libc:y(t,`libc`,n,x),deprecated:y(t,`deprecated`,n,b),hasBin:C(t.hasBin,k(n,`hasBin`)),bundledDependencies:o===void 0||o===!0?o:wt(o,k(n,`bundledDependencies`)),peerDependencies:ee(v(t.peerDependencies),k(n,`peerDependencies`),w),peerDependenciesMeta:Et(t.peerDependenciesMeta,k(n,`peerDependenciesMeta`))}}var Z=(e,t)=>(n,r)=>S(v(n),r,(n,r,i)=>(p(n,r,e),w(i,r),t(n,r))),Et=Z([`optional`],(e,t)=>({optional:C(e.optional,k(t,`optional`))}));function Dt(e,t,n,r,i){if(e.startsWith(`link:`))return`link:${o(n,pt(e.slice(5),i))}`;let a=dt(e,t);if(!(a in r))throw new D(`${O(e)} leads to ${O(a)}, which is not in snapshots`,i);return a}var Ot=(e,t,n)=>S(v(e),t,(e,t,r)=>{let i=b(e,t);if(i===`link:<root>`||i.startsWith(`link:<root>/`))throw new D(`${O(i)} leads into the package that asks for it, which is not supported`,t);return Dt(i,w(r,t),`.`,n,t)});function kt(e,n,r){return p(e,n,xt),{...t(e,n,(e,t)=>Ot(e,t,r)),optional:C(e.optional,k(n,`optional`)),transitivePeerDependencies:y(e,`transitivePeerDependencies`,n,wt)??[]}}var At=e=>X(e,16,Y)||X(e,16,re);function jt(e){let t=e.indexOf(`@`,1);return t===-1?``:e.slice(0,t)}function Q(e){let t=oe(()=>lt(e),()=>{});if(t===void 0)return;let n=t.patchHash===void 0?t.base:`${t.base}(patch_hash=${t.patchHash})`;if(t.peers.length===1&&At(t.peers[0]))return{unpeered:n,peers:void 0};let r=new Map(t.peers.map(e=>[jt(e),e]));return r.size===t.peers.length?{unpeered:n,peers:r}:void 0}var Mt=32;function Nt(e,t,n,r=0){if(e===t)return!0;let[i,a]=[Q(e),Q(t)];if(r>Mt||i===void 0||a===void 0||i.unpeered!==a.unpeered)return!1;if(i.peers===void 0||a.peers===void 0)return!0;let{dependencies:o,optionalDependencies:s}=n[t];return i.peers.entries().every(([e,t])=>{if(!a.peers.has(e))return!1;let i=o[e]??s[e];return i===void 0?t===a.peers.get(e):!i.startsWith(`link:`)&&Nt(t,i,n,r+1)})}function Pt(e,t,n,r,i,a){if(e.length===0||e.length===1&&At(e[0]))return;let o=new Set,s=new Set;for(let[e,r]of Object.entries({...t.dependencies,...t.optionalDependencies})){if(r.startsWith(`link:`)){s.add(e);continue}o.add(r);let t=n.get(J(r));t!==void 0&&(t.version===void 0?s.add(t.name):o.add(`${t.name}@${t.version}`))}let c=t.transitivePeerDependencies;for(let n of e){let e=jt(n);if(e===``)throw new D(`${O(n)} is not a peer, as pnpm writes one in a key`,a);let l=!n.includes(`(`);if(o.has(n)||l&&s.has(e))continue;let u=l&&c.includes(e)&&!T(n.slice(e.length+1));if(!(c.length>0&&(r().has(n)||u))){if(l)throw Ft(n,a);i.push({group:n,snapshot:t,where:a})}}}var Ft=(e,t)=>new D(`the peer ${O(e)} is not one of its dependencies, nor a peer of theirs it resolves`,t);function It(e,t){let n;for(let{group:r,snapshot:i,where:a}of e){let e=Object.values({...i.dependencies,...i.optionalDependencies}).filter(e=>!e.startsWith(`link:`)),o=Q(r)?.unpeered;if(i.transitivePeerDependencies.includes(jt(r))&&o!==void 0&&(n??=Map.groupBy(Object.keys(t),e=>Q(e)?.unpeered),e.push(...n.get(o)??[])),!e.some(e=>Nt(r,e,t)))throw Ft(r,a)}}function Lt(e,t,n){if(e.version===void 0&&t.keys().some(t=>t.startsWith(`${e.name}@`)))throw new D(`a package of no version in the lockfile, which a patch of a version of ${O(e.name)} may be of`,n);let r=`${e.name}@${e.version}`;return e.version!==void 0&&t.has(r)?r:t.has(e.name)?e.name:void 0}function Rt(e,t,n){let r=new Map,i=new Map,a=k(t,`packages`);for(let[t,n,o]of m(v(e.packages),a)){let e=Tt(t,n,o);r.set(t,e),n.version!==void 0&&t===`${e.name}@${e.version}`&&i.set(t,k(o,`version`))}let o=k(t,`snapshots`),s=p(v(e.snapshots),o),c,l=()=>c??=new Set([...Object.keys(s),...r.keys(),...r.values().map(e=>`${e.name}@${e.version}`)]),u=new Set,d=new Set,f=[],h=S(s,o,(e,t,a)=>{let{base:o,patchHash:c,peers:p}=lt(a,t),m=r.get(o);if(m===void 0)throw new D(`${O(o)} is not in packages`,t);let h=Lt(m,n,t);h!==void 0&&d.add(h);let g=h===void 0?void 0:n.get(h).hash;if(g!==c){let e=h===void 0?`none, as patchedDependencies patches no such package`:`${O(g)}, of patchedDependencies[${O(h)}]`;throw new D(`expected the patch hash ${e}, found ${c===void 0?`none`:O(c)}`,t)}u.add(o),a.includes(`:`)&&i.delete(o);let _=kt(e,t,s);return Pt(p,_,r,l,f,t),{...m,patchHash:c,..._}});It(f,h);let g=r.keys().find(e=>!u.has(e));if(g!==void 0)throw new D(`no snapshot is of this package`,k(a,g));let _=n.keys().find(e=>!d.has(e));if(_!==void 0)throw new D(`patches no package in the lockfile, which pnpm refuses to install with`,k(k(t,`patchedDependencies`),_));let[y]=i.values();if(y!==void 0)throw new D(`a registry package has its version in its key, except where a snapshot of it has a source in its peers`,y);return{packages:h,snapshots:s}}var zt=[...e,`dependenciesMeta`,`publishDirectory`,`linkDirectory`],$=[`configDependencies`,`packageManagerDependencies`];function Bt(e,t,n,r,i){let a=Object.create(null),o={specifiers:a},s=Object.create(null);for(let c of t)o[c]=S(v(e[c]),k(r,c),(e,t,r)=>{if(w(r,t),p(e,t,[`specifier`,`version`]),r in a)throw new D(`listed under ${s[r]} too`,t);a[r]=h(e.specifier,k(t,`specifier`)),s[r]=c;let o=k(t,`version`);return Dt(b(e.version,o),r,n,i,o)});return o}var Vt=Z([`injected`,`node`],(e,t)=>({injected:y(e,`injected`,t,g)??!1,node:y(e,`node`,t,b)}));function Ht(t,n,r,a){if(p(t,r,zt),t.linkDirectory!==void 0&&t.linkDirectory!==!1)throw new D(`expected false, the only value pnpm writes`,k(r,`linkDirectory`));return{...Bt(t,e,n,r,a),dependenciesMeta:Vt(t.dependenciesMeta,k(r,`dependenciesMeta`)),publishDirectory:y(t,`publishDirectory`,r,i),linkDirectory:t.linkDirectory!==!1}}function Ut(e,t,n,r){let a=S(e,t,(e,t,a)=>{if(i(a,t),!r)return Ht(e,a,t,n);if(a!==`.`)throw new D(`the env document has no importer but "."`,t);return p(e,t,$),Bt(e,$,a,t,n)});if(r&&!(`.`in a))throw new D(`expected the "." importer`,t);return a}var Wt=[`lockfileVersion`,`settings`,`catalogs`,`overrides`,`patchedDependencies`,`packageExtensionsChecksum`,`pnpmfileChecksum`,`ignoredOptionalDependencies`,`time`,`importers`,`packages`,`snapshots`],Gt=[`lockfileVersion`,`importers`,`packages`,`snapshots`],Kt={__proto__:null,autoInstallPeers:g,dedupePeers:g,excludeLinksFromLockfile:g,injectWorkspacePackages:g,peersSuffixMaxLength:_},qt=(e,t)=>S(p(v(e),t,Object.keys(Kt)),t,(e,t,n)=>Kt[n](e,t)),Jt=(e,t)=>S(v(e),t,(e,t,n)=>(b(n,t),Z([`specifier`,`version`],(e,t)=>({specifier:h(e.specifier,k(t,`specifier`)),version:b(e.version,k(t,`version`))}))(e,t)));function Yt(e,t){if(e.indexOf(`@`,1)===-1)return w(e,t);if(!T(ut(e,t).ref))throw new D(`${O(e)} is not a name and a version, or a name alone, which is not supported`,t)}var Xt=(e,t)=>S(v(e),t,(e,t,n)=>{let r=typeof e!=`string`;r&&p(e,t,[`hash`,`path`]);let a=r?k(t,`hash`):t,o=b(r?e.hash:e,a);if(!X(o,32,re)&&!X(o,16,Y))throw new D(`${O(o)} is not a patch hash`,a);return Yt(n,t),{hash:o,path:r?i(e.path,k(t,`path`)):void 0}});function Zt(e,t){let n=b(e,t);if(X(n,16,re)||X(n,16,Y))return n;if(!n.startsWith(`sha256-`))throw new D(`${O(n)} is not a checksum`,t);return l(n,t)}var Qt=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d+)?Z$/u,$t=(e,t,n)=>S(v(e),t,(e,t,r)=>{if(!(r in n))throw new D(`${O(r)} is not in packages`,t);let i=b(e,t),a=Qt.test(i)?Date.parse(i):NaN;if(Number.isNaN(a)||new Date(a).toISOString().slice(0,19)!==i.slice(0,19))throw new D(`${O(i)} is not a UTC timestamp`,t);return i});function en(e,t,r,i){let a=n(Object.values(e).flatMap(e=>i.map(t=>e[t])),t);if(a!==void 0)throw new D(`no importer depends on it, directly or not`,k(k(r,`snapshots`),a))}function tn(e,t,n){let i=r(t,e,n?{required:$,dev:[],optional:[]}:void 0);for(let e of Object.values(t)){let{dev:t,devOptional:n}=i(e);Object.assign(e,{dev:t,devOptional:n})}}function nn(t,n,r){let i=n===``?void 0:n,a=p(t,i).lockfileVersion;if(a!==`9.0`)throw new D(`unsupported version: expected "9.0", found ${f(a)}`,k(n,`lockfileVersion`));p(t,i,r?Gt:Wt);let o=Xt(t.patchedDependencies,k(n,`patchedDependencies`)),{packages:s,snapshots:c}=Rt(t,n,new Map(Object.entries(o))),l=Ut(t.importers,k(n,`importers`),c,r);return en(l,s,n,r?$:e),tn(l,s,r),r?{lockfileVersion:a,importers:l,packages:s}:{lockfileVersion:a,settings:qt(t.settings,k(n,`settings`)),catalogs:Jt(t.catalogs,k(n,`catalogs`)),overrides:ee(v(t.overrides),k(n,`overrides`),b),patchedDependencies:o,packageExtensionsChecksum:y(t,`packageExtensionsChecksum`,n,Zt),pnpmfileChecksum:y(t,`pnpmfileChecksum`,n,Zt),ignoredOptionalDependencies:y(t,`ignoredOptionalDependencies`,n,x)??[],time:$t(t.time,k(n,`time`),v(t.packages)),importers:l,packages:s}}function rn(e){if(typeof e!=`string`)throw TypeError(`expected a string`);let t=/^---\r?\n/u.exec(e)?.[0];if(t===void 0){let t=qe(e);if(t.length!==1)throw new D(`expected one document, found ${t.length}`);return{lockfile:nn(t[0],``,!1),env:void 0}}let n=/\n---\r?\n/gu;n.lastIndex=t.length;let r=n.exec(e);if(r===null)throw new D(`expected the env document the first "---" starts to end at a line of "---"`);let i=/^(?: *\r?\n)* *$/u.test(e.slice(n.lastIndex)),a=qe(i?e.slice(0,r.index+1):e);if(a.length!==(i?1:2))throw new D(`expected the env document${i?``:` and the lockfile`} between lines of "---" alone, found ${a.length} documents`);return{lockfile:i?void 0:nn(a[1],``,!1),env:nn(a[0],`env`,!0)}}export{D as LockfileError,j as YamlError,J as packageKeyOf,rn as parsePnpmLockfile};
|
package/out/chunk-WREU7JAG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-OOJM4CTU.js";var e=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])),t=(...e)=>e.flatMap(e=>Object.values(e)),n=e=>[...new Set(e)];function r(e){let t=Object.keys(e),n=t=>e[t].dependencies.filter(n=>n!==t&&Object.hasOwn(e,n)),r=[],i=new Set;for(let e of t){if(i.has(e))continue;i.add(e);let t=[[e,n(e).values()]];for(;t.length>0;){let[e,a]=t.at(-1),o=a.next();o.done?(r.push(e),t.pop()):i.has(o.value)||(i.add(o.value),t.push([o.value,n(o.value).values()]))}}let a=new Map(t.map(e=>[e,[]]));for(let e of t)for(let t of n(e))a.get(t).push(e);let o=new Map;for(let e of r.toReversed())if(!o.has(e)){o.set(e,e);for(let t=[e];t.length>0;)for(let n of a.get(t.pop()))o.has(n)||(o.set(n,e),t.push(n))}let s=new Set;for(let e of t)for(let t of n(e))o.get(t)!==o.get(e)&&s.add(o.get(t));return{".":{dependencies:t.filter(e=>!s.has(o.get(e)))}}}function i(e,t){let r=new Map(e.map(e=>[e,new Set]));for(let n=!0;n;){n=!1;for(let i of e)for(let{to:e,extras:a}of t(i,r.get(i)))for(let t of e)for(let e of a){let i=r.get(t);i&&!i.has(e)&&(i.add(e),n=!0)}}return new Map(e.map(e=>[e,n(t(e,r.get(e)).flatMap(e=>e.to)).filter(t=>t!==e)]))}function a(e){let t=new Set;return e.map((e,n)=>{let r=e.version===void 0?e.name:`${e.name}==${e.version}`,i=t.has(r)?`${r} (${n})`:r;return t.add(i),i})}var o=e=>e.toLowerCase().replaceAll(/[-_.]+/gu,`-`);function s(e){if(typeof e!=`string`)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)&&t.workspaces===void 0?t:null}catch{return null}}function c(e,t){if(typeof e!=`string`)return null;try{let r=JSON.parse(e);return n([r?.require,r?.[`require-dev`]].flatMap(e=>e&&typeof e==`object`&&!Array.isArray(e)?Object.keys(e):[]).flatMap(e=>t(e.toLowerCase())))}catch{return null}}var l={async npm(t){let{parseNpmLockfile:n}=await import(`./chunk-TOXMUOIW.js`),r=e=>Object.values(e.edges).map(e=>e.target).filter(e=>e!==void 0),{importers:i,packages:a}=n(t,{checkVersions:!1});return{importers:e(i,e=>({version:e.version,dependencies:r(e)})),packages:e(a,e=>({name:e.name,version:e.version,dependencies:r(e)}))}},async pnpm(n){let{parsePnpmLockfile:r}=await import(`./chunk-WMFDQS2L.js`),{lockfile:i}=r(n);return{importers:e(i?.importers??{},e=>({dependencies:t(e.dependencies,e.devDependencies,e.optionalDependencies)})),packages:e(i?.packages??{},e=>({name:e.name,version:e.version,dependencies:t(e.dependencies,e.optionalDependencies)}))}},async yarn(n,r){if(/^__metadata:/mu.test(n))throw Error(`a yarn.lock of Yarn 2 or later, which is not read`);let{parseYarn1Lockfile:i}=await import(`./chunk-HAZKDK4M.js`),a=s(r),{importers:o,packages:c}=i(n,{checkVersions:!1,...a&&{manifests:{".":a}}}),l=new Map;for(let[e,t]of Object.entries(c))l.has(t)||l.set(t,e);let u=e=>e.startsWith(`link:`)?e:l.get(c[e]);return{importers:e(o??{},e=>({version:a.version,dependencies:t(e.dependencies,e.devDependencies,e.optionalDependencies).map(u)})),packages:Object.fromEntries([...l].map(([e,n])=>[n,{name:/@npm:((?:@[^/@]+\/)?[^/@]+)/u.exec(e.patterns[0]??``)?.[1]??e.name,version:e.version,dependencies:t(e.dependencies,e.optionalDependencies).map(u)}]))}},async bundler(t){let{parseGemfileLock:n}=await import(`./chunk-Y5ZHFNBD.js`),{specs:r,gems:i,dependencies:a}=n(t),o=e=>Object.hasOwn(i,e)?i[e]:[];return{importers:{".":{dependencies:Object.keys(a).flatMap(o)}},packages:e(r,e=>({name:e.name,version:e.platform===`ruby`?e.version:`${e.version}-${e.platform}`,dependencies:Object.keys(e.dependencies).flatMap(o)}))}},async cargo(e){let{parseCargoLock:t}=await import(`./chunk-NXATZJQ2.js`),n=Object.entries(t(e).packages),r=n.filter(([,e])=>e.source===void 0),i=new Map;for(let[,e]of r)i.set(e.name,(i.get(e.name)??0)+1);let a=new Map(r.map(([e,t])=>[e,i.get(t.name)>1?e:t.name])),o=e=>a.has(e)?`link:${a.get(e)}`:e;return{importers:Object.fromEntries(r.map(([e,t])=>[a.get(e),{version:t.version,dependencies:t.dependencies.map(o)}])),packages:Object.fromEntries(n.filter(([e])=>!a.has(e)).map(([e,t])=>[e,{name:t.name,version:t.version,dependencies:t.dependencies.map(o)}]))}},async cocoapods(t){let{parsePodfileLock:r}=await import(`./chunk-M37X4LCF.js`),{pods:i,dependencies:a}=await r(t),o=({name:e})=>Object.hasOwn(i,e)?[e]:[];return{importers:{".":{dependencies:n(a.flatMap(o))}},packages:e(i,e=>({name:e.root,version:e.version,dependencies:n(e.dependencies.flatMap(o))}))}},async composer(t,i){let{parseComposerLock:a}=await import(`./chunk-4ISO5F7Y.js`),o=a(t).packages,s=e(o,e=>({name:e.name,version:e.version,dependencies:n(Object.values(e.require).flatMap(e=>e.targets))})),l=new Map;for(let[e,t]of Object.entries(o))for(let n of[...Object.keys(t.provide),...Object.keys(t.replace)])l.set(n,[...l.get(n)??[],e]);let u=c(i,e=>Object.hasOwn(s,e)?[e]:l.get(e)??[]);return{importers:u?{".":{dependencies:u}}:r(s),packages:s}},async poetry(e){let{parsePoetryLock:t}=await import(`./chunk-4XIH7YTX.js`),s=t(e).packages,c=a(s),l=Map.groupBy(c,(e,t)=>o(s[t].name)),u=new Map(c.map((e,t)=>[e,s[t]])),d=i(c,(e,t)=>{let r=u.get(e),i=new Set([...t].flatMap(e=>(r.extras[e]??[]).map(e=>o(/^[\w.-]+/u.exec(e)?.[0]??``))));return Object.entries(r.dependencies).filter(([e,t])=>t.some(e=>!e.optional)||i.has(o(e))).map(([e,t])=>({to:l.get(o(e))??[],extras:n(t.flatMap(e=>e.extras))}))}),f=Object.fromEntries(c.map((e,t)=>[e,{name:s[t].name,version:s[t].version,dependencies:d.get(e)}]));return{importers:r(f),packages:f}},async uv(e){let{parseUvLock:t}=await import(`./chunk-RRBIJL2B.js`),{packages:n,members:a}=t(e),o=new Map(a.map(e=>[e,n[e].source.path??e])),s=Object.keys(n),c=i(s,(e,t)=>{let r=n[e],i=o.has(e)?[...Object.values(r.optionalDependencies),...Object.values(r.devDependencies)].flat():[...t].flatMap(e=>r.optionalDependencies[e]??[]);return[...r.dependencies,...i].map(e=>({to:[e.package],extras:e.extras}))}),l=e=>o.has(e)?`link:${o.get(e)}`:e,u=Object.fromEntries(s.filter(e=>!o.has(e)).map(e=>[e,{name:n[e].name,version:n[e].version,dependencies:c.get(e).map(l)}])),d=Object.fromEntries(a.map(e=>[o.get(e),{version:n[e].version,dependencies:c.get(e).map(l)}]));return{importers:a.length>0?d:r(u),packages:u}},async pylock(e){let{parsePylock:t}=await import(`./chunk-YF4M5OCI.js`),i=t(e).packages,o=a(i),s=Object.fromEntries(o.map((e,t)=>[e,{name:i[t].name,version:i[t].version,dependencies:n(i[t].dependencies.map(e=>o[e]))}]));return{importers:r(s),packages:s}},async soldeer(e){let{parseSoldeerLockfile:t}=await import(`./chunk-VRX2APNA.js`),n=Object.fromEntries(Object.values(t(e).dependencies).map(e=>[`${e.name}@${e.version}`,{name:e.name,version:e.version,dependencies:[]}]));return{importers:{".":{dependencies:Object.keys(n)}},packages:n}},async foundry(e){let{parseFoundryLockfile:t}=await import(`./chunk-QMVOEBWC.js`),n=Object.fromEntries(Object.entries(t(e).dependencies).map(([e,t])=>[e,{name:e.slice(e.lastIndexOf(`/`)+1),version:t.type===`tag`?t.name:t.type===`branch`?`${t.name}@${t.rev.slice(0,7)}`:t.rev.slice(0,12),dependencies:[]}]));return{importers:{".":{dependencies:Object.keys(n)}},packages:n}}};async function u(e,t,{manifest:n}={}){if(!Object.hasOwn(l,e))throw TypeError(`readLockfile: ${e} lockfiles are not read`);return await l[e](t,n)}export{u as readLockfile};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|