1import{u as _,a as U,r,cE as i,cP as z,ad as H,w as u,j as e,i as n,cQ as L,cR as f,E as O,aB as q,T as s,f as M,ax as V,C as X,O as Q,x as Y,D as G,a8 as B}from"./index-V_pPJxU6.js";import{g as K}from"./apks-BqHIbKih.js";import{D as Z}from"./Datetime-BDpUgWSr.js";import{P as $}from"./PaginationFooter-_9RkMCmb.js";import{S as w}from"./SearchBar-DEojyjx8.js";import{a as J}from"./EmptyOverlays-CeocoIgl.js";import{S as ee,D as ae}from"./layout-CSz0B4GP.js";import{u as te}from"./navigate-F9uRN6__.js";import{A as re}from"./ArchPicker-CGGTRzer.js";import{b as se,a as ie}from"./pagination-BeLX9dPC.js";import{a as oe}from"./searchParams-Cij4_k9Z.js";import{ApkList as ne}from"./apks.graphql-CGr34a1_.js";import{D as ce}from"./DataGridPro-N8LhTQPm.js";import{F as me}from"./FullPageContainer-DubahEbF.js";import"./keyboard_arrow_left-MJOfjRtc.js";import"./LastPage-BVUq_GZh.js";import"./search-DAb5mb59.js";import"./ToggleButtonGroup-BfnJj8IT.js";import"./GridToolbarQuickFilter-8j_VgHnm.js";import"./linky-DcCtugds.js";import"./tanstack-CeX-HA2N.js";import"./index-PC6CIEdk.js";import"./index-Chjiymov.js";import"./Checkbox-RSB2x3qK.js";import"./SwitchBase-BS5ZujiX.js";import"./FormControlLabel-Ct30Nhcj.js";import"./KeyboardArrowRight-BZLC5UP9.js";import"./TableCell-KevEUvLd.js";import"./LinearProgress-D8fVm8Xl.js";const C=[i.X86_64,i.ARM64],b=[i.X86_64,i.AARCH64],le=({pageSize:c})=>{const{_:t}=_(),{rootUIDP:d}=U(),h=te(),{currentPage:x,queryInputs:o,onPageChange:A,onReset:S,updateNextPageState:j}=se({pageSize:c}),{getSearchParam:E,setSearchParam:R}=oe(),[p,v]=r.useState(i.X86_64),[I,T]=r.useState(),[k]=z(I,500),y=H({query:ne,variables:{organizationId:d,architecture:f(p,b),query:k,...o},pause:!d}),[{data:m,fetching:g,error:D}]=y,P=m?.apkSummaries.totalCount??0,W=r.useMemo(()=>m?.apkSummaries.items.map(({buildTime:a,...l})=>({...l,id:`${l.packageName}-${l.latestVersion}`,buildTime:a?new Date(a):void 0}))??[],[m?.apkSummaries.items]),F=[{field:"packageName",headerName:t({id:"6YtxFj"}),display:"flex",flex:1,minWidth:250,renderCell:({row:a})=>e.jsx(n,{variant:"inherit",color:"primary",noWrap:!0,children:a.packageName})},{field:"latestVersion",headerName:t({id:"zUzYWu"}),minWidth:120,valueFormatter:(a,l)=>l.latestVersion||u},{field:"description",headerName:t({id:"Nu4oKW"}),display:"flex",flex:2,minWidth:300,renderCell:({row:a})=>e.jsx(n,{title:a.description,variant:"inherit",noWrap:!0,children:a.description||u})},{field:"license",headerName:t({id:"iQmbPb"}),display:"flex",flex:1,minWidth:250,renderCell:({row:a})=>e.jsx(n,{title:a.license,variant:"inherit",noWrap:!0,children:a.license||u})},{field:"buildTime",headerName:t({id:"b-4nBk"}),display:"flex",minWidth:125,renderCell:({row:a})=>a.buildTime?e.jsx(Z,{date:a.buildTime,forceAbsolute:!0}):u}],N=a=>
1{v(a),R("arch",a)};return r.useEffect(()=>{g||j(m?.apkSummaries.nextPageToken)},[m?.apkSummaries.nextPageToken,g,j]),r.useEffect(()=>{const a=E("arch");a&&L(a)&&v(f(a,C)||i.X86_64)},[]),r.useEffect(()=>{S()},[p,k,S]),D?e.jsx(O,{query:y}):e.jsx(ce,{columns:F,density:"compact",disableColumnSorting:!0,filterMode:"server",onFilterModelChange:a=>T(a.quickFilterValues?.join(" ")||""),loading:g,paginationMode:"server",rowCount:P,rows:W,slots:{noRowsOverlay:()=>e.jsx(ee,{children:e.jsx(J,{message:t({id:"HYQoLy"}),contactUs:!0})}),noResultsOverlay:()=>e.jsx(s,{id:"9vkDFH"}),toolbar:w,footer:()=>e.jsx($,{variant:"server",count:P,onPageChange:A,currentPage:x,pageSize:o.pageSize,countLabel:a=>e.jsx(s,{id:"xAaom3",values:{count:a}})})},slotProps:{toolbar:{enableSearchQuery:!0,searchPlaceholder:t({id:"hSYK3k"}),truncated:!0,LeftFilters:[e.jsx(re,{archList:C,onChange:N,value:p},"arch-picker")]}},...h(({row:a})=>q("#/packages/:arch/:name/:version",{name:encodeURIComponent(a.packageName),arch:encodeURIComponent(f(p,b)||i.X86_64),version:encodeURIComponent(a.latestVersion)}))})},Oe=()=>{const{organization:c}=M(),[t,d]=r.useState(),h=ie(t,"compact"),{package:{hasEntitlements:x}}=V(),o=c&&c.verified?K(c.name):void 0;return e.jsxs(me,{children:[e.jsx(X,{children:e.jsx(s,{id:"IzOaIb"})}),e.jsxs(n,{variant:"body2",color:"textSecondary",sx:{mb:2},children:[x?e.jsx(s,{id:"UX_aWY"}):e.jsx(s,{id:"lUp6OT"})," ",e.jsx(Q,{href:"https://edu.chainguard.dev/chainguard/chainguard-images/features/packages/private-apk-repos/#authenticating-to-your-private-apk-repository",children:e.jsx(s,{id:"IEbZFZ"})})]}),o&&e.jsxs(e.Fragment,{children:[e.jsxs(Y,{sx:{alignSelf:"flex-start"},children:[e.jsx(n,{color:"textDim",fontWeight:"bold",variant:"caption",children:e.jsx(s,{id:"qiWSmb"})}),e.jsxs(n,{component:"span",variant:"body2",sx:{display:"flex",alignItems:"center"},children:[e.jsx(G,{text:o}),o]})]}),e.jsx(B,{sx:{mt:2}})]}),e.jsx(ae,{setContentHeight:d,sx:{mt:2},children:e.jsx(le,{pageSize:h})})]})};export{Oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.