PageSourceSearch

https://source.coop/_next/static/chunks/585-e53f491e37e73849.js?dpl=dpl_AELrKQVvtRAS44CxJDBVwvrSqdQb

js source.coop collected 2026-09-24 17:40:47 UTC 22,575 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{18243:(e,r,t)=>{"use strict";t.r(r),t.d(r,{ProxyCredentialsGate:()=>p});var s=t(95155),i=t(12115),n=t(20063),a=t(48813),o=t(80776),l=t(31679),c=t(54649),d=t(85646),u=t(30926);let h=(0,u.createServerReference)("00a686e1621891201b30bfba79ec516c72882e585e",u.callServer,void 0,u.findSourceMapURL,"refreshProxyCredentials");function p(){let e=(0,n.useRouter)(),[r,t]=(0,i.useState)("loading"),u=(0,i.useRef)(!1),p=(0,i.useRef)(0),x=(0,i.useRef)(void 0),g=(0,i.useCallback)(async()=>{if(clearTimeout(x.current),++p.current>2)return void t("error");t("loading");try{if(!(await function(e,r){let t,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Operation timed out";return Promise.race([e,new Promise((e,i)=>{t=setTimeout(()=>i(Error(s)),r)})]).finally(()=>clearTimeout(t))}(h(),2e4,"Timed out refreshing proxy credentials")).ok)return void t("error");e.refresh(),x.current=setTimeout(()=>void g(),3e3)}catch(e){t("error")}},[e]);(0,i.useEffect)(()=>{if(!u.current)return u.current=!0,g(),()=>clearTimeout(x.current)},[g]);let j=(0,i.useCallback)(()=>{p.current=0,g()},[g]);return"error"===r?(0,s.jsxs)(a.Root,{color:"red",role:"alert",children:[(0,s.jsx)(a.Text,{children:"We couldn't load your access credentials for this private product. Please try again, and if the problem persists, sign out and back in."}),(0,s.jsx)(o.s,{mt:"2",children:(0,s.jsx)(l.$,{variant:"soft",onClick:j,children:"Try again"})})]}):(0,s.jsxs)(o.s,{align:"center",gap:"2",p:"2",children:[(0,s.jsx)(c.y,{}),(0,s.jsx)(d.E,{color:"gray",children:"Fetching access credentials…"})]})}},23221:(e,r,t)=>{"use strict";t.r(r),t.d(r,{Dropzone:()=>u});var s=t(95155),i=t(95065),n=t(85646),a=t(31719),o=t(11636),l=t(12115),c=t(20063),d=t(45542);function u(e){let{prefix:r,product:t,children:u}=e,{getCredentials:h}=(0,d.y2)(),{uploadFiles:p,getUploadsForScope:x}=(0,d.Su)(),g=(0,c.useRouter)(),j={accountId:t.account_id,productId:t.product_id},m=h(j),f=x(j).some(e=>"uploading"===e.status||"queued"===e.status),y=(0,l.useRef)(!1);(0,l.useEffect)(()=>{y.current&&!f&&g.refresh(),y.current=f},[f,g]);let{getRootProps:v,getInputProps:b,isDragActive:w}=(0,o.VB)({onDrop:e=>{m&&p(e,r,j)},noClick:!0,disabled:!m});return(0,s.jsxs)(i.a,{...m?v():{},style:{position:"relative",...w&&m?{border:"3px dashed var(--accent-9)",borderRadius:"var(--radius-2)",padding:"4px"}:{}},children:[(0,s.jsx)("input",{...b()}),(0,s.jsx)("style",{children:"\n        @keyframes fadeIn {\n          from { opacity: 0; }\n          to { opacity: 1; }\n        }\n      "}),w&&m&&(0,s.jsx)(i.a,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.65)",borderRadius:"var(--radius-2)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,pointerEvents:"none",animation:"fadeIn 0.2s ease"},children:(0,s.jsxs)(i.a,{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[(0,s.jsx)(a.JMY,{width:48,height:48,color:"white"}),(0,s.jsx)(n.E,{size:"6",weight:"medium",style:{color:"white"},children:"Drop files here to upload"})]})}),u]})}},36781:(e,r,t)=>{"use strict";t.d(r,{DateText:()=>a});var s=t(95155),i=t(12115),n=t(20467);function a(e){let{date:r,includeTime:t=!1}=e,[a,o]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{o(!0)},[]),a)?(0,s.jsx)("span",{children:(0,n.Yq)(r,t)}):(0,s.jsx)("span",{children:(0,n.QY)(r)})}},45542:(e,r,t)=>{"use strict";t.d(r,{Su:()=>i.useUploadManager,y2:()=>s.useS3Credentials});var s=t(63097);t(23221),t(92151);var i=t(42172);t(62564),t(98825)},56997:e=>{e.exports={item:"ObjectBrowser_item__v_6Zb",itemContent:"ObjectBrowser_itemContent__AUppS",selectableText:"ObjectBrowser_selectableText__2zVKd",spinningIcon:"ObjectBrowser_spinningIcon__u7YJU",spin:"ObjectBrowser_spin__spdkZ",scrollIndicator:"ObjectBrowser_scrollIndicator__IeP9C",bounce:"ObjectBrowser_bounce__UKT3W"}},68811:(e,r,t)=>{"use strict";t.r(r),t.d(r,{ProductDataUnavailable:()=>c});var s=t(95155),i=t(20063),n=t(95065),a=t(48813),o=t(80776),l=t(31679);function c(e){let{message:r,details:t}=e,c=(0,i.useRouter)();return(0,s.jsxs)(n.a,{mt:"4",children:[(0,s.jsx)(a.Root,{color:"amber",role:"alert",children:(0,s.jsx)(a.Text,{children:null!=r?r:"Your access to this private product's data couldn't be confirmed just now."})}),t&&(0,s.jsxs)("details",{style:{marginTop:"var(--space-3)"},children:[(0,s.jsx)("summary",{style:{cursor:"pointer",fontSize:"var(--font-size-1)",color:"var(--gray-11)"},children:"Error details (visible to maintainers only)"}),(0,s.jsx)("pre",{style:{marginTop:"var(--space-2)",padding:"var(--space-2)",background:"var(--gray-2)",borderRadius:"var(--radius-2)",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"var(--font-size-1)",overflowX:"auto"},children:t})]}),(0,s.jsx)(o.s,{mt:"3",children:(0,s.jsx)(l.$,{variant:"soft",onClick:()=>c.refresh(),children:"Try again"})})]})}}
1,77906:(e,r,t)=>{"use strict";t.r(r),t.d(r,{BreadcrumbNav:()=>c});var s=t(95155),i=t(80776),n=t(52619),a=t.n(n),o=t(31719),l=t(46394);function c(e){let{path:r,fileName:t,baseUrl:n=""}=e,c=0===r.length&&!t,d={color:"var(--gray-11)",textDecorationThickness:"1px"},u=function(e,t){let c=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(0,s.jsxs)(i.s,{align:"center",gap:"1",children:[(0,s.jsx)(o.vKP,{}),(0,s.jsx)("div",{style:{lineHeight:"22px"},children:c?(0,s.jsx)(a(),{href:"".concat(n,"/").concat(r.slice(0,t+1).join("/")),style:d,children:(0,s.jsx)(l.NA,{size:"2",children:e})}):(0,s.jsx)(l.NA,{size:"2",color:"gray",children:e})})]},"".concat(t,"-").concat(e))},h=[];if(r.length>0)if(r.length<=4)h=r.map((e,s)=>u(e,s,s!==r.length-1||!!t));else{let e=r.slice(0,2).map((e,r)=>u(e,r)),n=r.slice(-2).map((e,s)=>u(e,r.length-2+s,1!==s||!!t));h=[...e,(0,s.jsxs)(i.s,{align:"center",gap:"1",children:[(0,s.jsx)(o.vKP,{}),(0,s.jsx)("div",{style:{lineHeight:"22px"},children:(0,s.jsx)(l.NA,{size:"2",color:"gray",children:"..."})})]},"ellipsis"),...n]}return(0,s.jsxs)(i.s,{align:"center",wrap:"wrap",children:[(0,s.jsx)("div",{style:{lineHeight:"22px"},children:c?(0,s.jsx)(l.NA,{size:"2",color:"gray",children:"root"}):(0,s.jsx)(a(),{href:n||"/",style:d,children:(0,s.jsx)(l.NA,{size:"2",children:"root"})})}),h,t&&(0,s.jsxs)(i.s,{align:"center",gap:"1",children:[(0,s.jsx)(o.vKP,{}),(0,s.jsx)("div",{style:{lineHeight:"22px"},children:(0,s.jsx)(l.NA,{size:"2",color:"gray",children:t})})]})]})}},92151:(e,r,t)=>{"use strict";t.r(r),t.d(r,{FetchCredentialsButton:()=>D});var s=t(95155),i=t(31719),n=t(80410),a=t(31679),o=t(54649),l=t(57431),c=t(63097),d=t(42172),u=t(20383),h=t(48813),p=t(57320),x=t(62594),g=t(95065),j=t(78235),m=t(85646),f=t(36186),y=t(80776),v=t(37542),b=t(97385),w=t(12115),_=t(63971);function C(e){let{credentials:r,open:t,onOpenChange:n}=e,o=JSON.stringify({aws_access_key_id:r.accessKeyId,aws_secret_access_key:r.secretAccessKey,aws_session_token:r.sessionToken,region_name:r.region,endpoint_url:r.endpoint},null,2),[l,c]=(0,w.useState)("sh"),d=[["AWS_ACCESS_KEY_ID",r.accessKeyId],["AWS_SECRET_ACCESS_KEY",r.secretAccessKey],["AWS_SESSION_TOKEN",r.sessionToken],["AWS_DEFAULT_REGION",r.region],["AWS_ENDPOINT_URL",r.endpoint]].map(e=>{let[r,t]=e;return"sh"===l?"export ".concat(r,'="').concat(t,'"'):"$env:".concat(r,'="').concat(t,'"')}).join("\n"),v=["[source-coop]","aws_access_key_id = ".concat(r.accessKeyId),"aws_secret_access_key = ".concat(r.secretAccessKey),"aws_session_token = ".concat(r.sessionToken),"endpoint_url = ".concat(r.endpoint)].join("\n");return(0,s.jsx)(u.bL,{open:t,onOpenChange:n,children:(0,s.jsxs)(u.UC,{maxWidth:"600px",children:[(0,s.jsx)(u.hE,{children:"View Credentials"}),(0,s.jsx)(u.VY,{size:"2",mb:"4",children:"Copy these temporary credentials to use in your applications."}),(0,s.jsxs)(h.Root,{size:"1",mb:"4",children:[(0,s.jsx)(h.Icon,{children:(0,s.jsx)(i._TA,{})}),(0,s.jsxs)(h.Text,{children:["Prefer a simpler workflow? The"," ",(0,s.jsx)(p.N,{href:"https://github.com/source-cooperative/source-coop-cli",target:"_blank",rel:"noopener noreferrer",children:"Source Coop CLI"})," ","handles credentials for you, with longer-lived credentials (up to 12 hours)."]})]}),(0,s.jsxs)(x.bL,{defaultValue:"json",children:[(0,s.jsxs)(x.B8,{children:[(0,s.jsx)(x.l9,{value:"json",children:"JSON (SDK)"}),(0,s.jsx)(x.l9,{value:"env",children:"Environment Variables"}),(0,s.jsx)(x.l9,{value:"ini",children:"INI"})]}),(0,s.jsxs)(g.a,{pt:"3",children:[(0,s.jsx)(z,{value:"json",title:"For SDK clients (boto3, AWS SDK, etc.)",content:o}),(0,s.jsx)(z,{value:"env",title:"For terminal/shell usage",content:d,controls:(0,s.jsxs)(j.Root,{size:"1",value:l,onValueChange:e=>c(e),children:[(0,s.jsx)(j.Item,{value:"sh",children:"macOS / Linux"}),(0,s.jsx)(j.Item,{value:"ps",children:"Windows (PowerShell)"})]})}),(0,s.jsx)(z,{value:"ini",title:"For ~/.aws/credentials (AWS CLI profile)",content:v})]})]}),(0,s.jsxs)(g.a,{mb:"4",children:[(0,s.jsx)(g.a,{mb:"2",children:(0,s.jsx)(m.E,{size:"2",color:"gray",weight:"bold",children:"Boundaries"})}),(0,s.jsx)(f.bL,{size:"1",children:[["Expiration",(0,s.jsx)("span",{title:r.expiration,children:new Date(r.expiration).toLocaleStr
1ing(void 0,{timeZoneName:"short"})},"expiration"),r.expiration],["Bucket",(0,s.jsx)(_.N,{children:r.bucket},"bucket"),r.bucket],["Prefix",(0,s.jsx)(_.N,{children:r.prefix},"prefix"),r.prefix]].map(e=>{let[r,t,i]=e;return(0,s.jsxs)(f.q7,{align:"center",children:[(0,s.jsx)(f.JU,{children:r}),(0,s.jsx)(f.WT,{children:(0,s.jsxs)(y.s,{align:"center",gap:"2",children:[t,(0,s.jsx)(S,{content:i,variant:"ghost"})]})})]},r)})})]}),(0,s.jsx)(y.s,{gap:"3",mt:"4",justify:"end",children:(0,s.jsx)(u.bm,{children:(0,s.jsx)(a.$,{variant:"soft",color:"gray",children:"Close"})})})]})})}function k(e){let{children:r}=e;return(0,s.jsx)(g.a,{style:{backgroundColor:"var(--gray-1)",borderRadius:"var(--radius-2)",padding:"var(--space-2)",overflow:"auto",maxHeight:"400px",fontSize:".85rem"},asChild:!0,children:(0,s.jsx)("pre",{children:r})})}function S(e){let{content:r,variant:t="soft"}=e,[n,a]=(0,w.useState)(!1),o=async()=>{await navigator.clipboard.writeText(r),a(!0),setTimeout(()=>a(!1),2e3)};return(0,s.jsx)(v.m,{content:n?"Copied!":"Copy to clipboard",children:(0,s.jsx)(b.K,{size:"1",variant:t,onClick:o,children:n?(0,s.jsx)(i.Srz,{}):(0,s.jsx)(i.TdU,{})})})}function z(e){let{value:r,title:t,content:i,controls:n}=e;return(0,s.jsx)(x.UC,{value:r,children:(0,s.jsxs)(y.s,{direction:"column",gap:"2",children:[(0,s.jsxs)(y.s,{align:"center",justify:"between",gap:"2",children:[(0,s.jsx)(m.E,{size:"1",weight:"regular",color:"gray",children:t}),n]}),(0,s.jsxs)(g.a,{style:{position:"relative"},children:[(0,s.jsx)(g.a,{style:{position:"absolute",top:"var(--space-4)",right:"var(--space-1)",zIndex:1},children:(0,s.jsx)(S,{content:i})}),(0,s.jsx)(k,{children:i})]})]})})}let D=e=>{let{scope:r,prefix:t}=e,{getCredentials:u,getStatus:h,fetchCredentials:p,clearCredentials:x}=(0,c.useS3Credentials)(),{uploadFiles:g}=(0,d.useUploadManager)(),[j,m]=(0,w.useState)(!1),f=u(r),y=h(r),v=!!f,b="loading"===y,_=e=>()=>{if(!f||!v)return;let s=document.createElement("input");s.type="file",s.multiple=!0,s.webkitdirectory=e,s.onchange=e=>{let s=e.target.files;s&&g(Array.from(s),t,r)},s.click()},k=async()=>{f||b||await p(r),m(!0)};return(0,s.jsxs)(n.Root,{children:[(0,s.jsx)(n.Trigger,{children:(0,s.jsxs)(a.$,{variant:"ghost",size:"1",disabled:b,mr:"1",children:[b?(0,s.jsx)(o.y,{}):v?(0,s.jsx)(i._WG,{}):(0,s.jsx)(i.JD_,{}),(0,s.jsx)(l.D3,{})]})}),(0,s.jsxs)(n.Content,{size:"1",children:[(0,s.jsx)(n.CheckboxItem,{checked:v,onCheckedChange:()=>{b||v||p(r)},disabled:b||v,children:"Edit Mode"}),(0,s.jsx)(n.CheckboxItem,{checked:!v,onCheckedChange:()=>{!b&&v&&x(r)},disabled:b||!v,children:"Read Only"}),(0,s.jsx)(n.Separator,{}),(0,s.jsxs)(n.Item,{onClick:k,disabled:b,children:[(0,s.jsx)(i.N5q,{}),"View Credentials"]}),v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.Item,{onClick:_(!1),disabled:!f,children:[(0,s.jsx)(i.JMY,{}),"Upload Files"]}),(0,s.jsxs)(n.Item,{onClick:_(!0),disabled:!f,children:[(0,s.jsx)(i.JMY,{}),"Upload Directory"]})]})]}),f&&(0,s.jsx)(C,{credentials:f,open:j,onOpenChange:m})]})}},96312:(e,r,t)=>{"use strict";t.d(r,{DirectoryList:()=>C});var s=t(95155),i=t(95065),n=t(85646),a=t(31719),o=t(12115),l=t(46074),c=t(63971),d=t(56997),u=t.n(d),h=t(80776),p=t(37542),x=t(97385),g=t(78654),j=t(31679),m=t(52619),f=t.n(m),y=t(20063),v=t(20467),b=t(98502),w=t(45542);function _(e){var r,t,l,d,m,_,C,k,S;let{item:z,index:D,itemsLength:E,itemHeight:I,product:T,focusedIndex:P,setFocusedIndex:R,itemRefs:N,virtualRow:A,onDeleted:K}=e,[W,O]=(0,o.useState)(null),[B,U]=(0,o.useState)(!1),[L,V]=(0,o.useState)(!1),[Y,F]=(0,o.useState)(null),H=(0,y.useRouter)(),{cancelUpload:M,retryUpload:$,getUploadsForScope:J,deleteObject:q,deletePrefix:Z}=(0,w.Su)(),{getCredentials:G}=(0,w.y2)(),Q={accountId:T.account_id,productId:T.product_id},X=J(Q),ee=!!G(Q),er=async()=>{V(!0),F(null);try{z.isDirectory?await Z(z.path,Q):await q(z.path,Q),null==K||K(z.path),U(!1),H.refresh()}catch(r){console.error("Delete failed",r);let e=r instanceof Error?r.message:"request failed";F(z.isDirectory?"Delete may be partial — ".concat(e,". Retry to remove remaining items."):"Delete failed — ".concat(e,". Please retry."))}finally{V(!1)}},et=X.find(e=>e.key===z.path),es=(z.isDirectory,(0,b.bC)(T.account_id,T.product_id,z.path)),ei=A?{position:"absolute",top:0,transform:"translateY(".concat(A.start,"px)"),left:0,width:"100%",height:"".concat(I,"px"),willChange:"transform"}:{marginBottom:D<E-1?"var(--space-2)":0},en=z.uploadProgress&&"completed"!==z.uploadProgress.status,ea=z.uploadProgress?z.uploadProgress.uploadedBytes/z.size*100:0;return(0,s.jsx)(i.a,{style:ei,children:(0,s.jsxs)(h.s,{direction:"column",gap:"1",style:{width:"100%",position:"relative"},children:[(0,s.jsxs)(h.s,{justify:"between",align:"center",style:{width:"100%"},children:[(0,s.jsx)(i.a,{style:{minWidth:0,flex:1},children:(0,s.jsxs)(f(),{title:z.name,href:en?"#":es,className:u().item,ref:e=>{e&&N&&(N.current[D]=e)},onFocus:()=>null==R?void 0:R(D),"data-focused":P===D,onClick:e=>{en&&e.preventDefault()},style:{display:"flex",alignItems:"center",gap:"var(--space-2)",minWidth:0,flex:1,opacity:en?.6:1,cursor:en?"default":"pointer"},children:[z.isDirectory?(0,s.jsx)(a.vKP,{width:16,height:16}):(0,s.jsx)(a.oSV,{width:16,height:16}),(0,s.jsx)(c.N,{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:z.name})]})}),(0,s.jsx)(i.a,{children:(0,s.jsxs)(h.s,{align:"center",gap:"2",children:[!z.isDirectory&&z.size>0&&(0,s.jsx)(c.N,{color:"gray",size:"1",style:{flexShrink:0},children:(0,v.z3)(z.size)}),!z.isDirectory&&en&&et&&(0,s.jsxs)(h.s,{gap:"1",children:[(null==(r=z.uploadProgress)?void 0:r.status)==="error"&&(0,s.jsx)(p.m,{content:"Retry upload",children:(0,s.jsx)(x.K,{variant:"soft",size:"1",color:"amber",onClick:e=>{e.stopPropagation(),$(et.id)},style:{minWidth:"auto",cursor:"pointer"},children:(0,s.jsx)(a.jfu,{width:14,height:14})})}),((null==(t=z.uploadProgress)?void 0:t.status)==="uploading"||(null==(l=z.uploadProgress)?void 0:l.status)==="queued")&&(0,s.jsx)(p.m,{content:"Cancel upload",children:(0,s.jsx)(x.K,{variant:"soft",size:"1",color:"red",onClick:e=>{e.stopPropagation(),M(et.id)},style:{minWidth:"auto",cursor:"pointer"},children:(0,s.jsx)(a.MKb,{width:14,height:14})})})]}),!z.isDirectory&&!en&&(0,s.jsxs)(h.s,{gap:"1",children:[(0,s.jsx)(p.m,{content:"Download ".concat(z.name),children:(0,s.jsx)(x.K,{variant:"solid",size:"1",asChild:!0,style:{minWidth:"auto"},children:(0,s.jsx)("a",{href:"https://data.source.coop/".concat(T.account_id,"/").concat(T.product_id,"/").concat(z.path),download:z.name,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(a.s3U,{width:14,height:14})})})}),(0,s.jsx)(p.m,{content:"Copy URL to clipboard",children:(0,s.jsx)(x.K,{variant:"surface",size:"1",color:W==="url-".concat(D)?"green":"gray",onClick:e=>{var r,t;e.stopPropagation(),r="https://data.source.coop/".concat(T.account_id,"/").concat(T.product_id,"/").concat(z.path),t="url-".concat(D),navigator.clipboard.writeText(r).then(()=>{O(t),setTimeout(()=>{O(null)},1500)})},style:{minWidth:"auto",cursor:"pointer"},children:W==="url-".concat(D)?(0,s.jsx)(a.Srz,{}):(0,s.jsx)(a.TdU,{})})})]}),ee&&!en&&(0,s.jsxs)(g.bL,{open:B,onOpenChange:e=>{U(e),e||F(null)},children:[(0,s.jsx)(g.l9,{children:(0,s.jsx)(x.K,{variant:"soft",size:"1",color:"red",onClick:e=>e.stopPropagation(),style:{minWidth:"auto",cursor:"pointer"},"aria-label":"Delete ".concat(z.name),children:(0,s.jsx)(a.ucK,{width:14,height:14})})}),(0,s.jsxs)(g.UC,{maxWidth:"450px",children:[(0,s.jsxs)(g.hE,{children:["Delete ",z.isDirectory?"folder":"file"]}),(0,s.jsxs)(g.VY,{size:"2",children:["Are you sure you want to delete"," ",(0,s.jsx)("strong",{children:z.name}),z.isDirectory?" and everything inside it":"","? This action cannot be undone."]}),(0,s.jsxs)(h.s,{gap:"3",mt:"4",justify:"end",children:[(0,s.jsx)(g.ZD,{children:(0,s.jsx)(j.$,{variant:"soft",color:"gray",disabled:L,children:"Cancel"})}),(0,s.jsx)(j.$,{color:"red",onClick:er,disabled:L,loading:L,children:"Delete"})]}),Y&&(0,s.jsx)(n.E,{as:"p",size:"1",color:"red",mt:"2",children:Y})]})]})]})})]}),en&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.a,{style:{width:"100%",height:"4px",backgroundColor:"var(--gray-4)",borderRadius:"2px",overflow:"hidden"},children:(0,s.jsx)(i.a,{style:{height:"100%",width:"".concat(ea,"%"),backgroundColor:(null==(d=z.uploadProgress)?void 0:d.status)==="error"?"var(--red-9)":(null==(m=z.uploadProgress)?void 0:m.status)==="uploading"?"var(--accent-9)":"var(--gray-7)",transition:"width 0.2s ease"}})}),(0,s.jsxs)(c.N,{size:"1",color:"gray",style:{fontSize:"10px"},children:[(null==(_=z.uploadProgress)?void 0:_.status)==="queued"&&"Queued...",(null==(C=z.uploadProgress)?void 0:C.status)==="uploading"&&"Uploading ".concat(Math.round(ea),"%"),(null==(k=z.uploadProgress)?void 0:k.status)==="error"&&"Error: ".concat(z.uploadProgress.error),(null==(S=z.uploadProgress)?void 0:S.status)==="cancelled"&&"Cancelled"]})]})]})},z.path)}function C(e){let{objects:r,prefix:t,product:d,focusedIndex:h=0,setFocusedIndex:p}=e,x=(0,o.useRef)(null),[g,j]=(0,o.useState)(!1),m=(0,o.useRef)([]),{getUploadsForScope:f}=(0,w.Su)(),[y,v]=(0,o.useState)(new Set);(0,o.useEffect)(()=>{v(new Set)},[t]);let b=f({accountId:d.account_id,productId:d.product_id}),C=b.map(e=>e.key).join("\n");(0,o.useEffect)(()=>{v(e=>{let r=C.split("\n");if(!r.some(r=>e.has(r)))return e;let t=new Set(e);
1return r.forEach(e=>t.delete(e)),t})},[C]);let k=(function(e,r,t){let s=new Map(e.map(e=>[e.name,e])),i=t.replace(/\/$/,"");for(let e of r){if(!e.key.startsWith(i))continue;let r=i?i.length+1:0,t=e.key.slice(r).split("/").filter(Boolean);if(0===t.length)continue;let n=t[0];if(1===t.length)s.set(n,{...s.get(n)||{name:n,path:e.key,size:e.totalBytes,updated_at:new Date().toISOString(),isDirectory:!1},uploadProgress:{uploadedBytes:e.uploadedBytes,status:e.status,error:e.error}});else if(!s.has(n)){let e=i?"".concat(i,"/").concat(n,"/"):"".concat(n,"/");s.set(n,{name:n,path:e,size:0,updated_at:new Date().toISOString(),isDirectory:!0})}}return Array.from(s.values())})(r.map(e=>({name:e.path.replace(/\/+$/,"").split("/").pop(),path:e.path,size:e.size,updated_at:e.updated_at,isDirectory:"directory"===e.type,object:e})),b,t).filter(e=>!y.has(e.path));k.sort((e,r)=>e.isDirectory&&!r.isDirectory?-1:!e.isDirectory&&r.isDirectory?1:e.name.toLowerCase().localeCompare(r.name.toLowerCase()));let S=e=>{let r=k[e];return(null==r?void 0:r.uploadProgress)&&"completed"!==r.uploadProgress.status?60:40};(0,o.useEffect)(()=>{if(k.length>20){j(!0);let e=setTimeout(()=>{j(!1)},5e3);return()=>clearTimeout(e)}j(!1)},[k.length]);let z={itemsLength:k.length,product:d,focusedIndex:h,setFocusedIndex:p,itemRefs:m,onDeleted:e=>v(r=>new Set(r).add(e))},D=k.length>20,E=(0,l.Te)({count:k.length,getScrollElement:()=>x.current,estimateSize:e=>S(e),overscan:3,scrollPaddingStart:20,scrollPaddingEnd:20,enabled:!0});return(0,s.jsxs)(i.a,{ref:x,style:D?{maxHeight:"".concat(Math.min(40*k.length,800),"px"),overflow:"auto",willChange:"transform",position:"relative"}:{position:"relative"},children:[0===k.length&&(0,s.jsx)(i.a,{p:"4",children:(0,s.jsx)(c.N,{color:"gray",children:"This directory is empty."})}),g&&(0,s.jsxs)(i.a,{className:u().scrollIndicator,style:{position:"fixed",bottom:"8px",left:"50%",transform:"translateX(-50%)",zIndex:10,background:"var(--gray-3)",borderRadius:"var(--radius-2)",padding:"4px 8px",display:"flex",alignItems:"center",gap:"4px",pointerEvents:"none"},children:[(0,s.jsx)(n.E,{size:"1",color:"gray",children:"Scroll for more"}),(0,s.jsx)(a.D3D,{width:12,height:12})]}),(0,s.jsx)(i.a,{style:{width:"100%",...D?{height:"".concat(E.getTotalSize(),"px"),position:"relative"}:{}},children:D?E.getVirtualItems().map(e=>(0,s.jsx)(_,{item:k[e.index],index:e.index,itemHeight:e.size,virtualRow:{start:e.start},...z},k[e.index].path)):k.map((e,r)=>(0,s.jsx)(_,{item:e,index:r,itemHeight:S(r),...z},e.path))})]})}},99021:(e,r,t)=>{"use strict";t.r(r),t.d(r,{ChecksumVerifier:()=>d});var s=t(95155),i=t(12115),n=t(80776),a=t(31679),o=t(85646),l=t(95065),c=t(31719);function d(e){let{objectUrl:r,expectedHash:t,algorithm:d}=e,[u,h]=(0,i.useState)("idle"),[p,x]=(0,i.useState)(null);async function g(){try{h("checking"),x(null);let e=await fetch(r,{method:"HEAD"});if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));let s=e.headers.get("SHA-256"===d?"x-amz-checksum-sha256":"x-amz-checksum-sha1");if(!s){x("Checksum not available in response headers"),h("error");return}h(s.toLowerCase()===t.toLowerCase()?"match":"mismatch")}catch(e){x(e instanceof Error?e.message:"Failed to verify checksum"),h("error")}}return(0,s.jsxs)(n.s,{align:"center",gap:"2",children:[(0,s.jsxs)(a.$,{size:"1",onClick:g,disabled:"checking"===u,children:["Verify ",d]}),"checking"===u&&(0,s.jsxs)(n.s,{align:"center",gap:"1",children:[(0,s.jsx)(c.dAw,{className:"animate-spin"}),(0,s.jsx)(o.E,{size:"1",children:"Verifying..."})]}),"match"===u&&(0,s.jsxs)(n.s,{align:"center",gap:"1",children:[(0,s.jsx)(l.a,{style:{color:"var(--green-9)"},children:(0,s.jsx)(c.KaV,{})}),(0,s.jsx)(o.E,{size:"1",color:"green",children:"Checksum verified"})]}),"mismatch"===u&&(0,s.jsxs)(n.s,{align:"center",gap:"1",children:[(0,s.jsx)(l.a,{style:{color:"var(--red-9)"},children:(0,s.jsx)(c._cW,{})}),(0,s.jsx)(o.E,{size:"1",color:"red",children:"Checksum mismatch"})]}),"error"===u&&(0,s.jsx)(o.E,{size:"1",color:"red",style:{maxWidth:"400px"},children:p})]})}}}]);

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.