mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
84 KiB
JavaScript
2 lines
84 KiB
JavaScript
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[7945,614],{30614:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var s=n(65043),o=n(94141),a=n(89923),i=n(56629),l=n(53518),r=n(77403),c=n(64159),d=n(21383),u=n(70579);const h=e=>{let{modalOpen:t,onClose:n,bucket:h,prefilledRoute:m}=e;const x=(0,d.jL)(),[p,j]=(0,s.useState)(""),[b,g]=(0,s.useState)("readonly");(0,s.useEffect)((()=>{m&&j(m)}),[m]);return(0,u.jsx)(o.A,{modalOpen:t,title:"Add Anonymous Access Rule",onClose:n,titleIcon:(0,u.jsx)(a.No_,{}),children:(0,u.jsxs)(a.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,u.jsx)(a.cl_,{value:p,label:"Prefix",id:"prefix",name:"prefix",placeholder:"Enter Prefix",onChange:e=>{j(e.target.value)},tooltip:"Enter '/' to apply the rule to all prefixes and objects at the bucket root. Do not include the wildcard asterisk '*' as part of the prefix *unless* it is an explicit part of the prefix name. The Console automatically appends an asterisk to the appropriate sections of the resulting IAM policy."}),(0,u.jsx)(a.l6P,{id:"access",name:"Access",onChange:e=>{g(e)},label:"Access",value:b,options:[{label:"readonly",value:"readonly"},{label:"writeonly",value:"writeonly"},{label:"readwrite",value:"readwrite"}],disabled:!1,helpTip:(0,u.jsx)(s.Fragment,{children:"Select the desired level of access available to unauthenticated Users"}),helpTipPlacement:"right"}),(0,u.jsxs)(a.xA9,{item:!0,xs:12,sx:r.Uz.modalButtonBar,children:[(0,u.jsx)(a.$nd,{id:"clear",type:"button",variant:"regular",onClick:()=>{j(""),g("readonly")},label:"Clear"}),(0,u.jsx)(a.$nd,{id:"add-access-save",type:"submit",variant:"callAction",disabled:""===p.trim(),onClick:()=>{i.F.bucket.setAccessRuleWithBucket(h,{prefix:p,access:b}).then((e=>{x((0,c.Hk)("Access Rule added successfully")),n()})).catch((e=>{x((0,c.C9)((0,l.S)(e.error))),n()}))},label:"Save"})]})]})})}},27945:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Me});var s=n(65043),o=n(22166),a=n(73216),i=n(56629),l=n(21383),r=n(99161),c=n(6035),d=n(33097),u=n.n(d),h=n(89923),m=n(53518),x=n(94281),p=n(24241),j=n(56483),b=n(61476),g=n.n(b),f=n(94574),v=n(35475),_=n(77938),S=n(72237),O=n(64159);const w=e=>(e.match(/\.([^.]*?)(?=\?|#|$)/)||[])[1],C=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const s=Object.keys(e).reduce(((n,s)=>(w(s)&&s.includes(t)&&(n[s]=e[s]),n)),{});return Object.keys(s).filter((e=>{const o=s[e].some((e=>n.find((t=>{let n=!1;if(-1!==t.indexOf("*")){const s=t.substring(0,t.length-1);n=e.includes(s)}return n||e===t})))),a=e.substring(0,e.indexOf("/*."))==="arn:aws:s3:::".concat(t);return o&&(a&&"arn:aws:s3:::*"!==e)}))};var T=n(70579);const y=(0,S.A)(s.lazy((()=>n.e(7774).then(n.bind(n,97774))))),E=f.Ay.div((()=>({display:"flex","& .additionalOptions":{paddingRight:"10px",display:"flex",alignItems:"center",["@media (max-width: ".concat(h.nmC.lg,"px)")]:{display:"none"}},"& .slashSpacingStyle":{margin:"0 5px"}}))),I=e=>{let{bucketName:t,internalPaths:n,hidePathButton:i,additionalOptions:d}=e;const u=(0,l.jL)(),m=(0,a.Zp)(),x=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),p=(0,o.d4)((e=>e.objectBrowser.versionsMode)),b=(0,o.d4)((e=>e.objectBrowser.versionedFile)),f=(0,o.d4)((e=>e.system.anonymousMode)),[S,w]=(0,s.useState)(!1),[I,N]=(0,s.useState)(!1),A=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],k=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{}));let B=n;""!==n&&(B="/".concat(n));const F=B.split("/").filter((e=>""!==e)),L=F.length-1,V=t+B||t,D=C(k,V,A);(0,s.useEffect)((()=>{N(!1),Object.keys(k).forEach((e=>{e.includes(V)&&e.includes("/*")&&N(!0)}))}),[V,n,k]);const R=(0,_._)([V,...D],A)||f||I;let P=F.map(((e,n)=>{const o="".concat(F.slice(0,n+1).join("/"),"/"),a="/browser/".concat(encodeURIComponent(t),"/").concat(o?"".concat(encodeURIComponent(o)):"");return n===L&&e===b?null:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)("span",{className:"slashSpacingStyle",children:"/"}),n===L?(0,T.jsx)("span",{style:{cursor:"default",whiteSpace:"pre"},children:(0,j.Tw)(e)}):(0,T.jsx)(v.N_,{style:{whiteSpace:"pre"},to:a,onClick:()=>{u((0,c.cQ)({status:!1,objectName:""}))},children:(0,j.Tw)(e)})]},"breadcrumbs-".concat(n.toString()))})),U=[];p&&(U=[(0,T.jsx)(s.Fragment,{children:(0,T.jsxs)("span",{children:[(0,T.jsx)("span",{className:"slashSpacingStyle",children:"/"}),b," - Versions"]})},"breadcrumbs-versionedItem")]);const z=[(0,T.jsx)(s.Fragment,{children:(0,T.jsx)(v.N_,{to:"/browser/".concat(t),onClick:()=>{u((0,c.cQ)({status:!1,objectName:""}))},children:t})},"breadcrumbs-root-path"),...P,...U];return(0,T.jsxs)(s.Fragment,{children:[(0,T.jsxs)(E,{children:[S&&(0,T.jsx)(y,{modalOpen:S,bucketName:t,folderName:n,onClose:()=>{w(!1)},limitedSubPath:I&&!((0,_._)([V,...D],A)||f)}),(0,T.jsx)(h.BIu,{sx:{whiteSpace:"pre"},goBackFunction:()=>{if(p)u((0,c.cQ)({status:!1,objectName:""}));else{if(0===F.length)return void m("/browser");const e=F.slice(0,-1);m("/browser/".concat(t).concat(e.length>0?"/".concat(encodeURIComponent("".concat(e.join("/"),"/"))):""))}},additionalOptions:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)(g(),{text:"".concat(t,"/").concat(F.join("/")),children:(0,T.jsx)(h.$nd,{id:"copy-path",icon:(0,T.jsx)(h.TdU,{style:{width:"12px",height:"12px",fill:"#969FA8",marginTop:-1}}),variant:"regular",onClick:()=>{u((0,O.Hk)("Path copied to clipboard"))},style:{width:"28px",height:"28px",color:"#969FA8",border:"#969FA8 1px solid",marginRight:5}})}),(0,T.jsx)(h.azJ,{className:"additionalOptions",children:d})]}),children:z}),!i&&(0,T.jsx)(h.m_M,{tooltip:R?"Choose or create a new path":(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"create a new path"),children:(0,T.jsx)(h.$nd,{id:"new-path",onClick:()=>{w(!0)},disabled:!f&&(x||!R),icon:(0,T.jsx)(h.pj3,{style:{fill:"#969FA8"}}),style:{whiteSpace:"nowrap"},variant:"regular",label:"Create new path"})})]}),(0,T.jsx)(h.azJ,{sx:{display:"none",marginTop:15,marginBottom:5,justifyContent:"flex-start","& > div":{fontSize:12,fontWeight:"normal",flexDirection:"row",flexWrap:"nowrap"},["@media (max-width: ".concat(h.nmC.lg,"px)")]:{display:"flex"}},children:d})]})};var N=n(93445);const A=e=>"Enabled"===e||"Suspended"===e;var k=n(37414),B=n(39947),F=n(81708),L=n(6681);const V=e=>{let{uploadPath:t,bucketName:n,forceDisable:a=!1,uploadFileFunction:i,uploadFolderFunction:l,overrideStyles:c={}}=e;const[d,u]=(0,s.useState)(null),[m,x]=(0,s.useState)(!1),p=(0,o.d4)((e=>e.system.anonymousMode)),j=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{})),b=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],g=C(j,t,b),f=Boolean(d),v=()=>{u(null)},S=(0,_._)([t,...g],b)||p,O=(0,_._)([n,...g],b,!1,!0),w=S||O;return(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)(L.A,{tooltip:w?"Upload Files":(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload files to this bucket"),children:(0,T.jsx)(h.$nd,{id:"upload-main","aria-controls":"upload-main-menu","aria-haspopup":"true","aria-expanded":f?"true":void 0,onClick:e=>{x(!m),u(e.currentTarget)},label:"Upload",icon:(0,T.jsx)(h.JMY,{}),variant:"callAction",disabled:a||!w,sx:c})}),(0,T.jsx)(h.Vey,{id:"upload-main-menu",options:[{label:"Upload File",icon:(0,T.jsx)(h.JMY,{}),value:"file",disabled:!S||a},{label:"Upload Folder",icon:(0,T.jsx)(h.nDF,{}),value:"folder",disabled:!O||a}],selectedOption:"",onSelect:e=>{"folder"!==e?i(v):l(v)},hideTriggerAction:()=>{x(!1)},open:m,anchorEl:d,anchorOrigin:"end",useAnchorWidth:!0})]})},D=e=>{let{open:t,closePanel:n,className:s="",children:o}=e;return(0,T.jsxs)(h.azJ,{id:"details-panel",sx:{borderColor:"#EAEDEE",borderWidth:0,borderStyle:"solid",borderRadius:3,borderBottomLeftRadius:0,borderBottomRightRadius:0,width:0,transitionDuration:"0.3s",overflowX:"hidden",overflowY:"auto",position:"relative",opacity:0,marginLeft:-1,"&.open":{width:300,minWidth:300,borderLeftWidth:1,opacity:1},"@media (max-width: 799px)":{"&.open":{width:"100%",minWidth:"100%",borderLeftWidth:0}}},className:"".concat(t?"open":""," ").concat(s),children:[(0,T.jsx)(h.$nd,{variant:"text",id:"close-details-list",onClick:n,icon:(0,T.jsx)(h._FR,{}),sx:{position:"absolute",right:5,top:18,padding:0,height:14,"&:hover:not(:disabled)":{backgroundColor:"transparent"}}}),o]})};var R=n(48245);const P=e=>{let{icon:t,strings:n}=e;return(0,T.jsxs)(h.azJ,{sx:{display:"flex",alignItems:"center","& .min-icon":{width:16,height:16,marginRight:4,minWidth:16,minHeight:16},"& .fileNameText":{whiteSpace:"pre",overflow:"hidden",textOverflow:"ellipsis"}},children:[t,(0,T.jsx)("span",{className:"fileNameText",children:(0,j.qf)(n[n.length-1])})]})},U=[{icon:(0,T.jsx)(h.FRZ,{}),extensions:["mp4","mov","avi","mpeg","mpg"]},{icon:(0,T.jsx)(h.jCy,{}),extensions:["mp3","m4a","aac"]},{icon:(0,T.jsx)(h.yTC,{}),extensions:["pdf"]},{icon:(0,T.jsx)(h.QvW,{}),extensions:["ppt","pptx"]},{icon:(0,T.jsx)(h.z9t,{}),extensions:["xls","xlsx"]},{icon:(0,T.jsx)(h.VSs,{}),extensions:["cer","crt","pem"]},{icon:(0,T.jsx)(h.bM2,{}),extensions:["html","xml","css","py","go","php","cpp","h","java"]},{icon:(0,T.jsx)(h.qM2,{}),extensions:["cfg","yaml"]},{icon:(0,T.jsx)(h.ITz,{}),extensions:["sql"]},{icon:(0,T.jsx)(h.PcO,{}),extensions:["ttf","otf"]},{icon:(0,T.jsx)(h.yEV,{}),extensions:["doc","docx","txt","rtf"]},{icon:(0,T.jsx)(h.j_m,{}),extensions:["zip","rar","tar","gz"]},{icon:(0,T.jsx)(h.DUd,{}),extensions:["epub","mobi","azw","azw3"]},{icon:(0,T.jsx)(h.nLN,{}),extensions:["jpeg","jpg","gif","tiff","png","heic","dng"]}],z=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e,s=(0,T.jsx)(h.KlI,{});e.endsWith("/")&&(s=(0,T.jsx)(h.kez,{}),n=e.slice(0,-1));const o=e.toLowerCase();for(const i of U)for(const e of i.extensions)o.endsWith(".".concat(e))&&(s=i.icon);!e.endsWith("/")&&e.indexOf(".")<0&&(s=(0,T.jsx)(h.YJK,{}));const a=n.split("/");return t?s:(0,T.jsx)(P,{icon:s,strings:a})};var G=n(37524);const M=e=>{let{metaData:t}=e;const n=Object.keys(t);return(0,T.jsx)(s.Fragment,{children:n.map(((e,n)=>{const s=(e=>Array.isArray(e)?e.map(j.Tw).join(", "):(0,j.Tw)(e))(t[e]);return(0,T.jsxs)(h.azJ,{sx:{marginBottom:15,fontSize:14,maxHeight:180,overflowY:"auto"},children:[(0,T.jsx)("strong",{children:e}),(0,T.jsx)("br",{}),s]},"box-meta-".concat(e,"-").concat(n.toString()))}))})};var J=n(30718),K=n(85330),W=n(77403);const H=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],Y=Array.from(Array(31),((e,t)=>({value:(t+1).toString(),label:(t+1).toString()}))),$=(new Date).getFullYear(),Z=Array.from(Array(50),((e,t)=>({value:(t+$).toString(),label:(t+$).toString()})));var q=n(94141);const Q=(0,s.forwardRef)(((e,t)=>{let{id:n,label:o,disableOptions:a=!1,tooltip:i="",borderBottom:l=!1,onDateChange:r,value:c=""}=e;(0,s.useImperativeHandle)(t,(()=>({resetDate:b})));const[d,u]=(0,s.useState)(""),[m,x]=(0,s.useState)(""),[p,j]=(0,s.useState)("");(0,s.useEffect)((()=>{if(""!==c){const e=c.split("-");j(e[0]),u(e[1]),x("".concat(parseInt(e[2])))}}),[c]),(0,s.useEffect)((()=>{const[e,t]=((e,t,n)=>{const s=Date.parse("".concat(e,"-").concat(t,"-").concat(n));if(isNaN(s))return[!1,""];const o=parseInt(t),a=parseInt(n),i=o<10?"0".concat(o):o,l=a<10?"0".concat(a):a,r=new Date(s).toISOString().split("T")[0],c="".concat(e,"-").concat(i,"-").concat(l);return[r===c,c]})(p,d,m);r(t,e)}),[d,m,p,r]);const b=()=>{u(""),x(""),j("")},g=()=>a||!1,f=[{value:"",label:"<Month>"},...H],v=[{value:"",label:"<Day>"},...Y],_=[{value:"",label:"<Year>"},...Z];return(0,T.jsxs)(h.azJ,{className:"inputItem",children:[(0,T.jsx)(h.azJ,{sx:{display:"flex",alignItems:"center",gap:5,marginBottom:5},children:(0,T.jsxs)(h.l1Y,{htmlFor:n,children:[(0,T.jsx)("span",{children:o}),""!==i&&(0,T.jsx)(h.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,T.jsx)(h.m_M,{tooltip:i,placement:"top",children:(0,T.jsx)(h.azJ,{sx:{"& .min-icon":{width:13}},children:(0,T.jsx)(h.NTw,{})})})})]})}),(0,T.jsxs)(h.azJ,{sx:{display:"flex",gap:12},children:[(0,T.jsx)(h.l6P,{id:"".concat(n,"-month"),name:"".concat(n,"-month"),value:d,onChange:e=>{u(e)},options:f,label:"",disabled:g()}),(0,T.jsx)(h.l6P,{id:"".concat(n,"-day"),name:"".concat(n,"-day"),value:m,onChange:e=>{x(e)},options:v,label:"",disabled:g()}),(0,T.jsx)(h.l6P,{id:"".concat(n,"-year"),name:"".concat(n,"-year"),value:p,onChange:e=>{j(e)},options:_,label:"",disabled:g(),sx:{marginBottom:12}})]})]})})),X=e=>{let{open:t,closeModalAndRefresh:n,objectName:a,objectInfo:r,bucketName:c}=e;const d=(0,l.jL)(),u=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),[x,p]=(0,s.useState)(!0),[j,b]=(0,s.useState)(""),[g,f]=(0,s.useState)(""),[v,_]=(0,s.useState)(!1),[S,w]=(0,s.useState)(!1),[C,y]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(r.retention_mode&&(b((null===u||void 0===u?void 0:u.mode)||K.BT.Governance),y(!0)),r.retention_until_date){const t=new Date(r.retention_until_date);if("Invalid Date"!==t.toString()){const n=t.getFullYear(),s=(e=t.getMonth()+1)<10?"0".concat(e):"".concat(e),o=t.getDate();isNaN(o)||"NaN"===s||isNaN(n)||f("".concat(n,"-").concat(s,"-").concat(o))}y(!0)}var e}),[r,null===u||void 0===u?void 0:u.mode]);const E=(0,s.useRef)(null),I=()=>{p(!1),b(K.BT.Governance),E.current&&E.current.resetDate()},N=C&&("governance"===j||""===j);return(0,T.jsx)(q.A,{title:"Set Retention Policy",modalOpen:t,onClose:()=>{I(),n(!1)},children:(0,T.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault()})(e)},children:(0,T.jsxs)(h.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,T.jsxs)(h.azJ,{className:"inputItem",children:[(0,T.jsx)("strong",{children:"Selected Object"}),": ",a]}),N&&(0,T.jsx)(h.dOG,{value:"status",id:"status",name:"status",checked:x,onChange:e=>{p(!x)},label:"Status",indicatorLabels:["Enabled","Disabled"]}),(0,T.jsx)(h.z6M,{currentValue:j,id:"type",name:"type",label:"Type",disableOptions:!x||C&&""!==j,onChange:e=>{b(e.target.value)},selectorOptions:[{label:"Governance",value:K.BT.Governance},{label:"Compliance",value:K.BT.Compliance}]}),(0,T.jsx)(Q,{id:"date",label:"Date",disableOptions:!(x&&("governance"===j||"compliance"===j)),ref:E,value:g,borderBottom:!0,onDateChange:(e,t)=>{_(t),t&&f(e)}}),(0,T.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,T.jsx)(h.$nd,{id:"reset",type:"button",variant:"regular",onClick:I,label:"Reset"}),(0,T.jsx)(h.$nd,{id:"save",type:"submit",variant:"callAction",disabled:x&&""===j||x&&!v||S,onClick:()=>{w(!0);const e=r.name||"",t=r.version_id||null,s=x||"governance"!==j?"".concat(g,"T23:59:59Z"):"";x||"governance"!==j?((e,t,s)=>{i.F.buckets.putObjectRetention(c,{prefix:e,version_id:t||""},{expires:s,mode:j}).then((()=>{w(!1),n(!0)})).catch((e=>{d((0,O.Dy)((0,m.S)(e.error))),w(!1)}))})(e,t,s):((e,t)=>{i.F.buckets.deleteObjectRetention(c,{prefix:e,version_id:t||""}).then((()=>{w(!1),n(!0)})).catch((e=>{d((0,O.Dy)((0,m.S)(e.error))),w(!1)}))})(e,t)},label:"Save"})]})]})})})};var ee=n(58661),te=n(25448);const ne=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedObject:i,versioningInfo:c,selectedVersion:d=""}=e;const u=(0,l.jL)(),[m,x]=(0,te.A)((()=>t(!0)),(e=>{u((0,O.C9)(e)),"Access Denied."===e.detailedError&&t(!0)})),[p,j]=(0,s.useState)(!1),[b,g]=(0,s.useState)(!1),f=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),v=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===f||void 0===f?void 0:f.mode);if(!i)return null;return(0,T.jsx)(ee.A,{title:"Delete Object",confirmText:"Delete",isOpen:n,titleIcon:(0,T.jsx)(h.xWY,{}),isLoading:m,onConfirm:()=>{const e=i.endsWith("/");x("DELETE","/api/v1/buckets/".concat(encodeURIComponent(a),"/objects?prefix=").concat(encodeURIComponent(i)).concat(""!==d?"&version_id=".concat(encodeURIComponent(d)):"&recursive=".concat(e,"&all_versions=").concat(p)).concat(b?"&bypass=true":""))},onClose:()=>t(!1),confirmationContent:(0,T.jsxs)(s.Fragment,{children:["Are you sure you want to delete: ",(0,T.jsx)("br",{}),(0,T.jsx)("b",{children:i})," ",""!==d?(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)("br",{}),(0,T.jsx)("br",{}),"Version ID:",(0,T.jsx)("br",{}),(0,T.jsx)("strong",{children:d})]}):"","? ",(0,T.jsx)("br",{}),(0,T.jsx)("br",{}),A(null===c||void 0===c?void 0:c.status)&&""===d&&(0,T.jsx)(s.Fragment,{children:(0,T.jsx)(h.dOG,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:p,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:e=>{j(!p)},description:""})}),v&&(p||""!==d)&&(0,T.jsx)(s.Fragment,{children:(0,T.jsx)("div",{style:{marginTop:10},children:(0,T.jsx)(h.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:b,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{g(!b)},description:""})})}),p&&(0,T.jsxs)(s.Fragment,{children:[(0,T.jsxs)("div",{style:{marginTop:10,border:"#c83b51 1px solid",borderRadius:3,padding:5,backgroundColor:"#c83b5120",color:"#c83b51"},children:["This will remove the object as well as all of its versions,"," ",(0,T.jsx)("br",{}),"This action is irreversible."]}),(0,T.jsx)("br",{}),"Are you sure you want to continue?"]})]})})},se=e=>{let{open:t,closeModalAndRefresh:n,objectName:o,bucketName:a,actualInfo:r}=e;const c=(0,l.jL)(),[d,x]=(0,s.useState)(!1),[p,j]=(0,s.useState)(!1),b=r.version_id;(0,s.useEffect)((()=>{const e=u()(r,"legal_hold_status","OFF");x("ON"===e)}),[r]);const g=()=>{x(!1)};return(0,T.jsx)(q.A,{title:"Set Legal Hold",modalOpen:t,onClose:()=>{g(),n(!1)},children:(0,T.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault(),j(!0),i.F.buckets.putObjectLegalHold(a,{prefix:o,version_id:b||""},{status:d?K.SW.Enabled:K.SW.Disabled}).then((()=>{j(!1),n(!0)})).catch((e=>{c((0,O.Dy)((0,m.S)(e.error))),j(!1)}))})(e)},children:(0,T.jsxs)(h.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,T.jsxs)(h.azJ,{className:"inputItem",children:[(0,T.jsx)("strong",{children:"Object"}),": ",a+"/"+o]}),(0,T.jsx)(h.dOG,{value:"legalhold",id:"legalhold",name:"legalhold",checked:d,onChange:e=>{x(!d)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"}),(0,T.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,T.jsx)(h.$nd,{id:"clear",type:"button",variant:"regular",onClick:g,label:"Clear"}),(0,T.jsx)(h.$nd,{id:"save",type:"submit",variant:"callAction",disabled:p,label:" Save"})]})]})})})},oe=f.Ay.b((e=>{let{theme:t}=e;return{color:u()(t,"signalColors.danger","#C83B51"),marginLeft:5}})),ae=e=>{var t;let{modalOpen:n,onCloseAndUpdate:a,bucketName:c,actualInfo:d}=e;const x=(0,l.jL)(),p=(0,o.d4)(O.Rq),[j,b]=(0,s.useState)(""),[g,f]=(0,s.useState)(""),[v,S]=(0,s.useState)(!1),[w,C]=(0,s.useState)(!1),[y,E]=(0,s.useState)(""),[I,N]=(0,s.useState)(""),A=d.tags,k=Object.keys(A||{}),B=null===(t=d.name)||void 0===t?void 0:t.split("/"),F=(null===B||void 0===B?void 0:B.pop())||"",L=e=>(0,T.jsxs)(h.azJ,{sx:{fontSize:16,margin:"20px 0 30px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:["Tag",e?"s":""," for: ",(0,T.jsx)("strong",{children:F})]});return(0,T.jsx)(s.Fragment,{children:(0,T.jsx)(q.A,{modalOpen:n,title:w?"Delete Tag":"Edit Tags",onClose:()=>{a(!0)},iconColor:w?"delete":"default",titleIcon:w?(0,T.jsx)(h.aaC,{}):(0,T.jsx)(h.cGQ,{}),children:w?(0,T.jsx)(s.Fragment,{children:(0,T.jsxs)(h.xA9,{container:!0,children:[L(!1),"Are you sure you want to delete the tag"," ",(0,T.jsxs)(oe,{children:[y," : ",I]})," ","?",(0,T.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,T.jsx)(h.$nd,{id:"cancel",type:"button",variant:"regular",onClick:()=>{E(""),N(""),C(!1)},label:"Cancel"}),(0,T.jsx)(h.$nd,{type:"submit",variant:"secondary",onClick:()=>{const e={...A};delete e[y];const t=p?d.version_id||"":"null";i.F.buckets.putObjectTags(c,{prefix:d.name||"",version_id:t},{tags:e}).then((()=>{a(!0),S(!1)})).catch((e=>{x((0,O.Dy)((0,m.S)(e.error))),S(!1)}))},id:"deleteTag",label:"Delete Tag"})]})]})}):(0,T.jsxs)(h.azJ,{children:[(0,T.jsx)(_.R,{scopes:[r.OV.S3_GET_OBJECT_TAGGING,r.OV.S3_GET_ACTIONS],resource:c,children:(0,T.jsxs)(h.azJ,{sx:{display:"flex",flexFlow:"column",width:"100%"},children:[L(!0),(0,T.jsxs)(h.azJ,{sx:{fontSize:14,fontWeight:"normal"},children:["Current Tags:",(0,T.jsx)("br",{}),0===k.length?(0,T.jsx)("span",{className:"muted",children:"There are no tags for this object"}):(0,T.jsx)(s.Fragment,{}),(0,T.jsx)(h.azJ,{sx:{marginTop:"5px",marginBottom:"15px"},children:k.map(((e,t)=>{const n=u()(A,"".concat(e),"");return""!==n?(0,T.jsx)(_.R,{scopes:[r.OV.S3_DELETE_OBJECT_TAGGING],resource:c,errorProps:{deleteIcon:null,onDelete:null},children:(0,T.jsx)(h.vwO,{id:"".concat(e," : ").concat(n),label:"".concat(e," : ").concat(n),variant:"regular",color:"default",onDelete:()=>{((e,t)=>{E(e),N(t),C(!0)})(e,n)}})},"chip-".concat(t)):null}))})]})]})}),(0,T.jsx)(_.R,{scopes:[r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_PUT_ACTIONS],resource:c,errorProps:{disabled:!0,onClick:null},children:(0,T.jsxs)(h.azJ,{children:[(0,T.jsx)(h._xt,{icon:(0,T.jsx)(h.b_$,{}),separator:!1,children:"Add New Tag"}),(0,T.jsxs)(h.Hbc,{containerPadding:!1,withBorders:!1,children:[(0,T.jsx)(h.cl_,{value:j,label:"Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter Tag Key",onChange:e=>{b(e.target.value)}}),(0,T.jsx)(h.cl_,{value:g,label:"Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter Tag Label",onChange:e=>{f(e.target.value)}}),(0,T.jsxs)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:[(0,T.jsx)(h.$nd,{id:"clear",type:"button",variant:"regular",color:"primary",onClick:()=>{f(""),b("")},label:"Clear"}),(0,T.jsx)(h.$nd,{type:"submit",variant:"callAction",disabled:""===g.trim()||""===j.trim()||v,onClick:()=>{S(!0);const e={};e[j]=g;const t={...A,...e},n=p?d.version_id||"":"null";i.F.buckets.putObjectTags(c,{prefix:d.name||"",version_id:n},{tags:t}).then((()=>{a(!0),S(!1)})).catch((e=>{x((0,O.Dy)((0,m.S)(e.error))),S(!1)}))},id:"saveTag",label:"Save"})]})]})]})})]})})})};var ie=n(49501);const le=e=>{let{closeInspectModalAndRefresh:t,inspectOpen:n,inspectPath:o,volumeName:a}=e;const i=(0,l.jL)(),r=()=>t(!1),[c,d]=(0,s.useState)(!0),[u,m]=(0,s.useState)(""),[x,p]=(0,s.useState)("");if(!o)return null;return(0,T.jsxs)(s.Fragment,{children:[!u&&(0,T.jsx)(q.A,{modalOpen:n,titleIcon:(0,T.jsx)(h.nTF,{}),title:"Inspect Object",onClose:r,children:(0,T.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault()})(e)},children:["Would you like to encrypt ",(0,T.jsx)("b",{children:o}),"? ",(0,T.jsx)("br",{}),(0,T.jsx)(h.dOG,{label:"Encrypt",indicatorLabels:["Yes","No"],checked:c,value:"encrypt",id:"encrypt",name:"encrypt",onChange:e=>{d(!c)},description:""}),(0,T.jsx)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:(0,T.jsx)(h.$nd,{id:"inspect",type:"submit",variant:"callAction",color:"primary",onClick:async()=>{let e=document.baseURI.replace(window.location.origin,"");(async e=>await fetch(e,{method:"GET"}))("".concat(window.location.origin).concat(e,"/api/v1/admin/inspect?volume=").concat(encodeURIComponent(a),"&file=").concat(encodeURIComponent(o+"/xl.meta"),"&encrypt=").concat(c)).then((async e=>{if(!e.ok){const t=await e.json();i((0,O.C9)({errorMessage:t.message,detailedError:t.code}))}const t=await e.blob(),n=e.headers.get("content-disposition").split('"')[1],s=(0,j.UM)(n)||"";(0,j.OT)(t,n),p(n),""!==s?m(s):r()})).catch((e=>{i((0,O.C9)(e))}))},label:"Inspect"})})]})}),u?(0,T.jsxs)(q.A,{modalOpen:n,title:"Inspect Decryption Key",onClose:()=>{(0,j.Yj)(x),r(),m("")},titleIcon:(0,T.jsx)(h.aJN,{}),children:[(0,T.jsxs)(h.azJ,{children:["This will be displayed only once. It cannot be recovered.",(0,T.jsx)("br",{}),"Use secure medium to share this key."]}),(0,T.jsx)(h.azJ,{children:(0,T.jsx)(ie.A,{value:u})})]}):null]})},re=e=>{let{open:t,closeModal:n,currentItem:o,internalPaths:a,actualInfo:i,bucketName:r}=e;const c=(0,l.jL)(),[d,u]=(0,s.useState)(o),[m,x]=(0,s.useState)(!1);return(0,T.jsxs)(q.A,{title:"Rename Download",modalOpen:t,onClose:n,titleIcon:(0,T.jsx)(h.qUP,{}),children:[(0,T.jsxs)("div",{children:["The file you are trying to download has a long name.",(0,T.jsx)("br",{}),"This can cause issues on Windows Systems by trimming the file name after download.",(0,T.jsx)("br",{}),(0,T.jsx)("br",{})," We recommend to rename the file download"]}),(0,T.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault(),(0,R._)(c,r,a,i),n()})(e)},children:(0,T.jsxs)(h.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,T.jsx)(h.cl_,{id:"download-filename",name:"download-filename",onChange:e=>{u(e.target.value)},label:"",type:"text",value:d,error:d.length>200&&!m?"Filename should be less than 200 characters long.":""}),(0,T.jsx)(h.dOG,{value:"acceptLongName",id:"acceptLongName",name:"acceptLongName",checked:m,onChange:e=>{x(e.target.checked),e.target.checked&&u(o)},label:"Use Original Name"}),(0,T.jsx)(h.xA9,{item:!0,xs:12,sx:W.Uz.modalButtonBar,children:(0,T.jsx)(h.$nd,{id:"download-file",type:"submit",variant:"callAction",color:"primary",disabled:d.length>200&&!m,label:"Download File"})})]})})]})},ce={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},de=e=>{let{internalPaths:t,bucketName:n,versioningInfo:a,locking:d,onClosePanel:m}=e;const x=(0,l.jL)(),p=(0,o.d4)(O.Rq),b=(0,o.d4)((e=>e.objectBrowser.versionsMode)),g=(0,o.d4)((e=>e.objectBrowser.selectedVersion)),f=(0,o.d4)((e=>e.objectBrowser.loadingObjectInfo)),[v,S]=(0,s.useState)(!1),[w,C]=(0,s.useState)(!1),[y,E]=(0,s.useState)(!1),[I,A]=(0,s.useState)(!1),[k,B]=(0,s.useState)(!1),[F,V]=(0,s.useState)(null),[D,P]=(0,s.useState)([]),[U,K]=(0,s.useState)(null),[W,H]=(0,s.useState)([]),[Y,$]=(0,s.useState)(!1),[Z,q]=(0,s.useState)(!1),[Q,ee]=(0,s.useState)(0),[te,oe]=(0,s.useState)(!1),[ie,de]=(0,s.useState)(null),[ue,he]=(0,s.useState)(!1),me=(t||"").split("/").pop()||"";let xe=[];F&&F.name&&(xe=F.name.split("/")),(0,s.useEffect)((()=>{if(p&&D&&D.length>=1){let e=D.find((e=>e.is_latest))||ce;""!==g&&(e=D.find((e=>e.version_id===g))||ce),e.is_delete_marker||he(!0),V(e)}}),[g,p,D]),(0,s.useEffect)((()=>{f&&""!==t&&i.F.buckets.listObjects(n,{prefix:t,with_versions:p}).then((e=>{const t=e.data.objects||[];if(p){P(t),H(t);const e=t.reduce(((e,t)=>null!==t&&void 0!==t&&t.size?e+t.size:e),0);ee(e)}else{const e=t[0];V(e),H([]),e.is_delete_marker||he(!0)}x((0,c.oe)(!1))})).catch((e=>{console.error("Error loading object details",e.error),x((0,c.oe)(!1))}))}),[f,n,t,x,p,g]),(0,s.useEffect)((()=>{ue&&""!==t&&i.F.buckets.getObjectMetadata(n,{prefix:t,versionID:(null===F||void 0===F?void 0:F.version_id)||""}).then((e=>{let t=u()(e.data,"objectMetadata",{});de(t),he(!1)})).catch((e=>{console.error("Error Getting Metadata Status: ",e.detailedError),he(!1)}))}),[n,t,ue,null===F||void 0===F?void 0:F.version_id]);let pe=[];F&&F.tags&&(pe=Object.keys(F.tags));const je=(0,T.jsx)("div",{style:{textAlign:"center",marginTop:35},children:(0,T.jsx)(h.aHM,{})});if(!F)return f?je:null;const be=xe.length>0?xe[xe.length-1]:F.name,ge=[n,me,[n,F.name].join("/")],fe=(0,_._)(n,[r.OV.S3_PUT_OBJECT_LEGAL_HOLD,r.OV.S3_PUT_ACTIONS]),ve=(0,_._)(ge,[r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_PUT_ACTIONS]),_e=(0,_._)(ge,[r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_PUT_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],!0),Se=(0,_._)(ge,[r.OV.ADMIN_INSPECT_DATA]),Oe=(0,_._)(ge,[r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_OBJECT_VERSION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),we=(0,_._)(ge,[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS]),Ce=(0,_._)([n,me,[n,F.name].join("/")],[r.OV.S3_DELETE_OBJECT]);let Te=(0,N.IZ)(ie,me);const ye=[{action:()=>{(0,R._)(x,n,t,F)},label:"Download",disabled:!!F.is_delete_marker||!we,icon:(0,T.jsx)(h.s3U,{}),tooltip:we?"Download this Object":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"download this object")},{action:()=>{S(!0)},label:"Share",disabled:!!F.is_delete_marker||!we,icon:(0,T.jsx)(h.liv,{}),tooltip:we?"Share this File":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"share this object")},{action:()=>{q(!0)},label:"Preview",disabled:!!F.is_delete_marker||"none"===Te&&!we,icon:(0,T.jsx)(h.cyn,{}),tooltip:we?"Preview this File":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"preview this object")},{action:()=>{A(!0)},label:"Legal Hold",disabled:!d||!p||!!F.is_delete_marker||!fe||""!==g,icon:(0,T.jsx)(h.ODz,{}),tooltip:fe?d?"Change Legal Hold rules for this File":"Object Locking must be enabled on this bucket in order to set Legal Hold":(0,r.vj)([r.OV.S3_PUT_OBJECT_LEGAL_HOLD,r.OV.S3_PUT_ACTIONS],"change legal hold settings for this object")},{action:()=>{C(!0)},label:"Retention",disabled:!p||!!F.is_delete_marker||!_e||""!==g||!d,icon:(0,T.jsx)(h.gn6,{}),tooltip:_e?d?"Change Retention rules for this File":"Object Locking must be enabled on this bucket in order to set Retention Rules":(0,r.vj)([r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_PUT_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"change Retention Rules for this object")},{action:()=>{E(!0)},label:"Tags",disabled:!!F.is_delete_marker||""!==g||!ve,icon:(0,T.jsx)(h.P3Z,{}),tooltip:ve?"Change Tags for this File":(0,r.vj)([r.OV.S3_PUT_OBJECT_TAGGING,r.OV.S3_GET_OBJECT_TAGGING,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"set Tags on this object")},{action:()=>{B(!0)},label:"Inspect",disabled:!p||!!F.is_delete_marker||""!==g||!Se,icon:(0,T.jsx)(h.nTF,{}),tooltip:Se?"Inspect this file":(0,r.vj)([r.OV.ADMIN_INSPECT_DATA],"inspect this file")},{action:()=>{x((0,c.cQ)({status:!b,objectName:be}))},label:b?"Hide Object Versions":"Display Object Versions",icon:(0,T.jsx)(h.j1U,{}),disabled:!p||!(F.version_id&&"null"!==F.version_id)||!Oe,tooltip:Oe?F.version_id&&"null"!==F.version_id?"Display Versions for this file":"":(0,r.vj)([r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_OBJECT_VERSION,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS],"display all versions of this object")}];return(0,T.jsxs)(s.Fragment,{children:[v&&F&&(0,T.jsx)(J.default,{open:v,closeModalAndRefresh:()=>{K(null),S(!1)},bucketName:n,dataObject:U||F}),w&&F&&(0,T.jsx)(X,{open:w,closeModalAndRefresh:e=>{C(!1),e&&x((0,c.oe)(!0))},objectName:me,objectInfo:F,bucketName:n}),Y&&(0,T.jsx)(ne,{deleteOpen:Y,selectedBucket:n,selectedObject:t,closeDeleteModalAndRefresh:e=>{$(!1),e&&""===g?m(!0):(x((0,c.SK)(!0)),x((0,c.Ai)("")),x((0,c.oe)(!0)))},versioningInfo:p?a:void 0,selectedVersion:g}),I&&F&&(0,T.jsx)(se,{open:I,closeModalAndRefresh:e=>{A(!1),e&&x((0,c.oe)(!0))},objectName:F.name||"",bucketName:n,actualInfo:F}),Z&&F&&(0,T.jsx)(G.default,{open:Z,bucketName:n,actualInfo:F,onClosePreview:()=>{q(!1)}}),y&&F&&(0,T.jsx)(ae,{modalOpen:y,bucketName:n,actualInfo:F,onCloseAndUpdate:e=>{E(!1),e&&x((0,c.oe)(!0))}}),k&&F&&(0,T.jsx)(le,{inspectOpen:k,volumeName:n,inspectPath:F.name||"",closeInspectModalAndRefresh:e=>{B(!1),e&&x((0,c.oe)(!0))}}),te&&F&&(0,T.jsx)(re,{open:te,closeModal:()=>{oe(!1)},currentItem:me,bucketName:n,internalPaths:t,actualInfo:F}),f?(0,T.jsx)(s.Fragment,{children:je}):(0,T.jsxs)(h.azJ,{sx:{"& .ObjectDetailsTitle":{display:"flex",alignItems:"center","& .min-icon":{width:26,height:26,minWidth:26,minHeight:26}},"& .objectNameContainer":{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",alignItems:"center",marginLeft:10},"& .capitalizeFirst":{textTransform:"capitalize"},"& .detailContainer":{padding:"0 22px",marginBottom:10,fontSize:14}},children:[(0,T.jsx)(h.Smc,{title:(0,T.jsxs)("div",{className:"ObjectDetailsTitle",children:[z(be||"",!0),(0,T.jsx)("span",{className:"objectNameContainer",children:be})]}),items:ye}),(0,T.jsx)(L.A,{tooltip:Ce?"":(0,r.vj)([r.OV.S3_DELETE_OBJECT],"delete this object"),children:(0,T.jsx)(h.xA9,{item:!0,xs:12,sx:{justifyContent:"center",display:"flex"},children:(0,T.jsx)(_.R,{resource:[n,me,[n,F.name].join("/")],scopes:[r.OV.S3_DELETE_OBJECT],errorProps:{disabled:!0},children:(0,T.jsx)(h.$nd,{id:"delete-element-click",icon:(0,T.jsx)(h.d7y,{}),iconLocation:"start",fullWidth:!0,variant:"secondary",onClick:()=>{$(!0)},disabled:""===g&&F.is_delete_marker,sx:{width:"calc(100% - 44px)",margin:"8px 0"},label:"Delete".concat(""!==g?" version":"")})})})}),(0,T.jsx)(h.kCK,{icon:(0,T.jsx)(h.Hch,{}),label:"Object Info"}),(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"Name:"}),(0,T.jsx)("br",{}),(0,T.jsx)("div",{style:{overflowWrap:"break-word"},children:be})]}),""!==g&&(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"Version ID:"}),(0,T.jsx)("br",{}),g]}),(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"Size:"}),(0,T.jsx)("br",{}),(0,j.nO)("".concat(F.size||"0"))]}),F.version_id&&"null"!==F.version_id&&""===g&&(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"Versions:"}),(0,T.jsx)("br",{}),W.length," version",1!==W.length?"s":"",","," ",(0,j.qO)(Q)]}),""===g&&(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"Last Modified:"}),(0,T.jsx)("br",{}),(e=>{const t=new Date,n=new Date(e),s=t.getTime()-n.getTime(),o=(0,j.eQ)(s,"ms");return""!==o.trim()?"".concat(o," ago"):"Just now"})(F.last_modified||"")]}),(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"ETAG:"}),(0,T.jsx)("br",{}),F.etag||"N/A"]}),(0,T.jsxs)(h.azJ,{className:"detailContainer",children:[(0,T.jsx)("strong",{children:"Tags:"}),(0,T.jsx)("br",{}),0===pe.length?"N/A":pe.map(((e,t)=>(0,T.jsxs)("span",{children:[e,":",u()(F,"tags.".concat(e),""),t<pe.length-1?", ":""]},"key-vs-".concat(t.toString()))))]}),(0,T.jsx)(h.azJ,{className:"detailContainer",children:(0,T.jsx)(_.R,{scopes:[r.OV.S3_GET_OBJECT_LEGAL_HOLD,r.OV.S3_GET_ACTIONS],resource:n,children:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)("strong",{children:"Legal Hold:"}),(0,T.jsx)("br",{}),F.legal_hold_status?"On":"Off"]})})}),(0,T.jsx)(h.azJ,{className:"detailContainer",children:(0,T.jsx)(_.R,{scopes:[r.OV.S3_GET_OBJECT_RETENTION,r.OV.S3_GET_ACTIONS],resource:n,children:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)("strong",{children:"Retention Policy:"}),(0,T.jsx)("br",{}),(0,T.jsx)("span",{className:"capitalizeFirst",children:(F.version_id&&F.version_id,(0,T.jsx)(s.Fragment,{children:F.retention_mode?F.retention_mode.toLowerCase():"None"}))})]})})}),!F.is_delete_marker&&(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)(h.kCK,{label:"Metadata",icon:(0,T.jsx)(h.$vN,{})}),(0,T.jsx)(h.azJ,{className:"detailContainer",children:F&&ie?(0,T.jsx)(M,{metaData:ie}):null})]})]})]})},ue=e=>{let{versionToRestore:t,bucketName:n,objectPath:o,restoreOpen:a,onCloseAndUpdate:r}=e;const d=(0,l.jL)(),[u,x]=(0,s.useState)(!1);return(0,T.jsx)(ee.A,{title:"Restore File Version",confirmText:"Restore",isOpen:a,isLoading:u,titleIcon:(0,T.jsx)(h.YkU,{}),onConfirm:()=>{x(!0),i.F.buckets.putObjectRestore(n,{prefix:o,version_id:t.version_id||""}).then((()=>{x(!1),r(!0),d((0,c.NV)({prefix:o,objectInfo:t}))})).catch((e=>{d((0,O.C9)((0,m.S)(e.error))),x(!1)}))},confirmButtonProps:{variant:"secondary",disabled:u},onClose:()=>{r(!1)},confirmationContent:(0,T.jsxs)(h.azJ,{id:"alert-dialog-description",children:["Are you sure you want to restore ",(0,T.jsx)("br",{}),(0,T.jsx)("b",{children:o})," ",(0,T.jsx)("br",{})," with Version ID:",(0,T.jsx)("br",{}),(0,T.jsx)("b",{children:t.version_id}),"?"]})})},he=e=>{let{type:t}=e,n="#000",s="";switch(t){case"null":n="#07193E",s="NULL VERSION";break;case"deleted":n="#868686",s="DELETED";break;default:n="#174551",s="CURRENT VERSION"}return(0,T.jsx)("span",{style:{backgroundColor:n,padding:"0 5px",display:"inline-block",color:"#FFF",fontWeight:"bold",fontSize:12,borderRadius:2,whiteSpace:"nowrap",margin:"0 10px"},children:s})},me=f.Ay.div((e=>{let{theme:t}=e;return{"&:before":{content:"' '",display:"block",position:"absolute",width:"2px",height:"calc(100% + 2px)",backgroundColor:u()(t,"borderColor","#F8F8F8"),left:"24px"},"& .mainFileVersionItem":{borderBottom:"".concat(u()(t,"borderColor","#F8F8F8")," 1px solid"),padding:"1rem 0",margin:"0 0.5rem 0 2.5rem",cursor:"pointer","&.deleted":{color:"#868686"}},"& .intermediateLayer":{margin:"0 1.5rem 0 1.5rem","&:hover, &.selected":{backgroundColor:u()(t,"boxBackground","#F8F8F8"),"& > div":{borderBottomColor:u()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center","& svg.min-icon":{width:18,height:18,minWidth:18,minHeight:18,marginRight:10}},"& .buttonContainer":{textAlign:"right","& button":{marginLeft:"1.5rem"}},"& .versionID":{fontSize:"12px",margin:"2px 0",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden"},"& .versionData":{marginRight:"10px",fontSize:12,color:"#868686"},"@media (max-width: 600px)":{"& .buttonContainer":{"& button":{marginLeft:"5px"}}},"@media (max-width: 799px)":{"&:before":{display:"none"},"& .mainFileVersionItem":{padding:"5px 0px",margin:0},"& .intermediateLayer":{margin:0,"&:hover, &.selected":{backgroundColor:"transparent","& > div":{borderBottomColor:u()(t,"boxBackground","#F8F8F8")}}},"& .versionContainer":{fontSize:14,"& svg.min-icon":{display:"none"}},"& .versionData":{textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden",whiteSpace:"nowrap"},"& .collapsableInfo":{display:"flex",flexDirection:"column"},"& .versionItem":{display:"none"}}}})),xe=e=>{let{fileName:t,versionInfo:n,isSelected:s,checkable:o,isChecked:a,onCheck:i,onShare:l,onDownload:r,onRestore:c,onPreview:d,globalClick:u,index:m,key:x,style:b}=e;const g=n.is_delete_marker,f=[{icon:(0,T.jsx)(h.cyn,{}),action:d,tooltip:"Preview"},{icon:(0,T.jsx)(h.s3U,{}),action:r,tooltip:"Download this version"},{icon:(0,T.jsx)(h.liv,{}),action:l,tooltip:"Share this version"},{icon:(0,T.jsx)(h.YkU,{}),action:c,tooltip:"Restore this version"}];let v=null;n.is_delete_marker?v="deleted":n.is_latest?v="current":"null"===n.version_id&&(v="null");let _=p.c9.now();return n.last_modified&&(_=p.c9.fromISO(n.last_modified)),(0,T.jsx)(me,{children:(0,T.jsx)(h.xA9,{container:!0,className:"ctrItem",onClick:()=>{u(n)},style:b,children:(0,T.jsx)(h.xA9,{item:!0,xs:12,className:"intermediateLayer".concat(" ",s?"selected":""),children:(0,T.jsxs)(h.xA9,{item:!0,xs:!0,className:"mainFileVersionItem ".concat(n.is_delete_marker?"deleted":""),children:[(0,T.jsx)(h.xA9,{item:!0,xs:12,children:(0,T.jsxs)(h.xA9,{container:!0,children:[(0,T.jsxs)(h.xA9,{item:!0,xs:!0,md:4,className:"versionContainer",children:[o&&(0,T.jsx)(h.Sc0,{checked:a,id:"select-".concat(n.version_id),name:"select-".concat(n.version_id),onChange:e=>{e.stopPropagation(),i(n.version_id||"")},value:n.version_id||"",disabled:n.is_delete_marker,sx:{width:"initial"}}),z(t,!0)," v",m.toString(),(0,T.jsx)("span",{className:"versionItem",children:v&&(0,T.jsx)(he,{type:v})})]}),(0,T.jsx)(h.xA9,{item:!0,xs:10,md:8,className:"buttonContainer",children:f.map(((e,t)=>(0,T.jsx)(h.m_M,{tooltip:e.tooltip,children:(0,T.jsx)(h.K0,{size:"small",id:"version-action-".concat(e.tooltip,"-").concat(t.toString()),className:"spacing".concat(" ",g?"buttonDisabled":""),disabled:g,onClick:t=>{t.stopPropagation(),g?t.preventDefault():e.action(n)},sx:{backgroundColor:"#F8F8F8",borderRadius:"100%",width:"28px",height:"28px",padding:"5px","& .min-icon":{width:"14px",height:"14px"}},children:e.icon})},"version-action-".concat(e.tooltip,"-").concat(t.toString()))))})]})}),(0,T.jsx)(h.xA9,{item:!0,xs:12,className:"versionID",children:"null"!==n.version_id?n.version_id:"-"}),(0,T.jsxs)(h.xA9,{item:!0,xs:12,className:"collapsableInfo",children:[(0,T.jsxs)("span",{className:"versionData",children:[(0,T.jsx)("strong",{children:"Last modified:"})," ",_.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)")]}),(0,T.jsxs)("span",{className:"versionData",children:[(0,T.jsx)("strong",{children:"Size:"})," ",(0,j.nO)("".concat(n.size||"0"))]})]})]})})},x)})},pe=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedObject:c}=e;const d=(0,l.jL)(),[u,x]=(0,s.useState)(!1),[p,j]=(0,s.useState)(""),[b,g]=(0,s.useState)(!1),f=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),v=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===f||void 0===f?void 0:f.mode);if((0,s.useEffect)((()=>{u&&i.F.buckets.deleteObject(a,{prefix:c,non_current_versions:!0,bypass:b}).then((()=>{t(!0)})).catch((e=>{d((0,O.C9)((0,m.S)(e.error))),x(!1)}))}),[u,t,d,c,a,b]),!c)return null;return(0,T.jsx)(ee.A,{title:"Delete Non-Current versions",confirmText:"Delete",isOpen:n,titleIcon:(0,T.jsx)(h.xWY,{}),isLoading:u,onConfirm:()=>{x(!0)},onClose:()=>t(!1),confirmButtonProps:{disabled:"YES, PROCEED"!==p||u},confirmationContent:(0,T.jsxs)(s.Fragment,{children:["Are you sure you want to delete all the non-current versions for:"," ",(0,T.jsx)("b",{children:c}),"? ",(0,T.jsx)("br",{}),v&&(0,T.jsx)(s.Fragment,{children:(0,T.jsx)("div",{style:{marginTop:10},children:(0,T.jsx)(h.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:b,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{g(!b)},description:""})})}),(0,T.jsx)("br",{}),"To continue please type ",(0,T.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,T.jsx)("br",{}),(0,T.jsx)("br",{}),(0,T.jsx)(h.xA9,{item:!0,xs:12,children:(0,T.jsx)(h.cl_,{id:"type-confirm",name:"retype-tenant",onChange:e=>{j(e.target.value)},label:"",value:p})})]})})},je=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedBucket:a,selectedVersions:c,selectedObject:d}=e;const u=(0,l.jL)(),[x,p]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),g=(0,o.d4)((e=>e.objectBrowser.retentionConfig)),f=(0,_._)([a],[r.OV.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===g||void 0===g?void 0:g.mode);return(0,s.useEffect)((()=>{if(x){const e=c.map((e=>({path:d,versionID:e,recursive:!1})));e.length>0&&i.F.buckets.deleteMultipleObjects(a,e,{all_versions:!1,bypass:j}).then((()=>{p(!1),t(!0)})).catch((e=>{u((0,O.C9)((0,m.S)(e.error))),p(!1)}))}}),[x,t,a,d,c,j,u]),c?(0,T.jsx)(ee.A,{title:"Delete Selected Versions",confirmText:"Delete",isOpen:n,titleIcon:(0,T.jsx)(h.xWY,{}),isLoading:x,onConfirm:()=>{p(!0)},onClose:()=>t(!1),confirmationContent:(0,T.jsxs)(s.Fragment,{children:["Are you sure you want to delete the selected ",c.length," ","versions for ",(0,T.jsx)("strong",{children:d}),"?",f&&(0,T.jsx)(s.Fragment,{children:(0,T.jsx)("div",{style:{marginTop:10},children:(0,T.jsx)(h.dOG,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:j,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:e=>{b(!j)},description:""})})})]})}):null};var be=n(95098);const ge={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:0,tags:{},version_id:void 0},fe=e=>{let{internalPaths:t,bucketName:n}=e;const a=(0,l.jL)(),r=(0,o.d4)((e=>e.objectBrowser.searchVersions)),d=(0,o.d4)((e=>e.objectBrowser.loadingVersions)),x=(0,o.d4)((e=>e.objectBrowser.selectedVersion)),p=(0,o.d4)(O.Rq),[b,g]=(0,s.useState)(!1),[f,v]=(0,s.useState)(null),[_,S]=(0,s.useState)(null),[w,C]=(0,s.useState)([]),[y,E]=(0,s.useState)(!1),[N,A]=(0,s.useState)(null),[k,B]=(0,s.useState)("date"),[F,V]=(0,s.useState)(!1),[D,P]=(0,s.useState)(!1),[U,z]=(0,s.useState)(!1),[M,K]=(0,s.useState)([]),[W,H]=(0,s.useState)(!1);let Y=[];f&&f.name&&(Y=f.name.split("/")),(0,s.useEffect)((()=>{d||f||a((0,c.SK)(!0))}),[d,f,a]),(0,s.useEffect)((()=>{d&&""!==t&&i.F.buckets.listObjects(n,{prefix:t,with_versions:p}).then((e=>{const n=u()(e.data,"objects",[]).filter((e=>e.name===t));p?(v(n.find((e=>e.is_latest))||ge),C(n)):(v(n[0]),C([])),a((0,c.SK)(!1))})).catch((e=>{a((0,O.C9)((0,m.S)(e.error))),a((0,c.SK)(!1))}))}),[d,n,t,a,p]);const $=e=>{S(e),g(!0)},Z=e=>{S(e),V(!0)},q=e=>{A(e),E(!0)},Q=e=>{(0,R._)(a,n,t,e)},X=e=>{a((0,c.Ai)(e.version_id||""))},ee=w.filter((e=>!!e.version_id&&e.version_id.includes(r))),te=w.reduce(((e,t)=>t.size?e+t.size:e),0);ee.sort(((e,t)=>{if("size"===k)return e.size&&t.size?e.size<t.size?-1:e.size>t.size?1:0:0;{const n=new Date(e.last_modified||"").getTime(),s=new Date(t.last_modified||"").getTime();return n<s?1:n>s?-1:0}}));const ne=e=>{if(M.includes(e)){const t=M.filter((t=>t!==e));return void K(t)}const t=[...M];t.push(e),K(t)};return(0,T.jsxs)(s.Fragment,{children:[b&&f&&(0,T.jsx)(J.default,{open:b,closeModalAndRefresh:()=>{S(null),g(!1),V(!1)},bucketName:n,dataObject:_||f}),y&&f&&N&&(0,T.jsx)(ue,{restoreOpen:y,bucketName:n,versionToRestore:N,objectPath:f.name||"",onCloseAndUpdate:e=>{E(!1),A(null),e&&(a((0,c.SK)(!0)),a((0,c.oe)(!0)))}}),F&&f&&(0,T.jsx)(G.default,{open:F,bucketName:n,actualInfo:{name:f.name||"",version_id:_&&_.version_id?_.version_id:"null",size:_&&_.size?_.size:0,content_type:"",last_modified:f.last_modified||""},onClosePreview:()=>{V(!1)}}),D&&(0,T.jsx)(pe,{deleteOpen:D,closeDeleteModalAndRefresh:e=>{P(!1),e&&(a((0,c.SK)(!0)),a((0,c.Ai)("")),a((0,c.oe)(!0)))},selectedBucket:n,selectedObject:t}),W&&(0,T.jsx)(je,{selectedBucket:n,selectedObject:t,deleteOpen:W,selectedVersions:M,closeDeleteModalAndRefresh:e=>{H(!1),e&&(a((0,c.SK)(!0)),a((0,c.Ai)("")),a((0,c.oe)(!0)),K([]))}}),(0,T.jsxs)(h.xA9,{container:!0,sx:{width:"100%",padding:10,"@media (max-width: 799px)":{minHeight:800}},children:[!f&&(0,T.jsx)(h.xA9,{item:!0,xs:12,children:(0,T.jsx)(h.z21,{})}),f&&(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)(h.xA9,{item:!0,xs:12,children:(0,T.jsx)(I,{bucketName:n,internalPaths:t,hidePathButton:!0})}),(0,T.jsx)(h.xA9,{item:!0,xs:12,sx:{position:"relative","& .detailsSpacer":{marginRight:18,"@media (max-width: 600px)":{marginRight:0}},["@media (max-width: ".concat(h.nmC.md,"px)")]:{"&::before":{display:"none"}}},children:(0,T.jsx)(h.lcx,{icon:(0,T.jsx)("span",{style:{display:"block",marginTop:"-10px"},children:(0,T.jsx)(h.j1U,{style:{width:20,height:20}})}),title:"".concat(Y.length>0?Y[Y.length-1]:f.name," Versions"),subTitle:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)("span",{className:"detailsSpacer",children:(0,T.jsxs)("strong",{children:[w.length," Version",1===w.length?"":"s","\xa0\xa0\xa0"]})}),(0,T.jsx)("span",{className:"detailsSpacer",children:(0,T.jsx)("strong",{children:(0,j.qO)(te)})})]}),actions:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)(L.A,{tooltip:"Select Multiple Versions",children:(0,T.jsx)(h.$nd,{id:"select-multiple-versions",onClick:()=>{z(!U)},icon:(0,T.jsx)(h.IN,{}),variant:U?"callAction":"regular",style:{marginRight:8}})}),U&&(0,T.jsx)(L.A,{tooltip:"Delete Selected Versions",children:(0,T.jsx)(h.$nd,{id:"delete-multiple-versions",onClick:()=>{H(!0)},icon:(0,T.jsx)(h.d7y,{}),variant:"secondary",style:{marginRight:8},disabled:0===M.length})}),(0,T.jsx)(L.A,{tooltip:"Delete Non Current Versions",children:(0,T.jsx)(h.$nd,{id:"delete-non-current",onClick:()=>{P(!0)},icon:(0,T.jsx)(h.rgY,{}),variant:"secondary",style:{marginRight:15},disabled:w.length<=1})}),(0,T.jsx)(h.l6P,{id:"sort-by",options:[{label:"Date",value:"date"},{label:"Size",value:"size"}],value:k,label:"Sort by",onChange:e=>{B(e)},noLabelMinWidth:!0})]}),bottomBorder:!1})}),(0,T.jsx)(h.xA9,{item:!0,xs:12,sx:{flexGrow:1,height:"calc(100% - 120px)",overflow:"auto",["@media (max-width: ".concat(h.nmC.md,"px)")]:{height:600}},children:f.version_id&&"null"!==f.version_id&&(0,T.jsx)(be.B8,{style:{width:"100%"},containerStyle:{width:"100%",maxWidth:"100%"},width:1,height:800,rowCount:ee.length,rowHeight:108,rowRenderer:e=>{let{key:t,index:n,isScrolling:s,isVisible:o,style:a}=e;const i=w.length-n;return(0,T.jsx)(xe,{style:a,fileName:(null===f||void 0===f?void 0:f.name)||"",versionInfo:ee[n],index:i,onDownload:Q,onRestore:q,onShare:$,onPreview:Z,globalClick:X,isSelected:x===ee[n].version_id,checkable:U,onCheck:ne,isChecked:M.includes(ee[n].version_id||"")},t)}})})]})]})]})},ve=e=>{if(e.name.endsWith("/"))return"";const t=p.c9.now(),n=p.c9.fromISO(e.last_modified);return t.hasSame(n,"day")&&t.hasSame(n,"month")&&t.hasSame(n,"year")?"Today, ".concat(n.toFormat("HH:mm")):n.toFormat("ccc, LLL dd yyyy HH:mm (ZZZZ)")},_e=e=>e.name.endsWith("/")||!e.size?"-":(0,j.nO)(String(e.size)),Se=[{label:"Name",elementKey:"name",renderFunction:z,enableSort:!0},{label:"Last Modified",elementKey:"last_modified",renderFunction:ve,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:_e,renderFullObject:!0,width:100,enableSort:!0}],Oe=[{label:"Name",elementKey:"name",renderFunction:z,enableSort:!0},{label:"Object Date",elementKey:"last_modified",renderFunction:ve,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:_e,renderFullObject:!0,width:100,enableSort:!0},{label:"Deleted",elementKey:"delete_flag",renderFunction:e=>e?"Yes":"No",width:60}];var we=n(46537);const Ce=()=>{const e=(0,l.jL)(),t=(0,a.g)(),n=(0,a.Zp)(),[i,d]=(0,s.useState)("ASC"),[m,x]=(0,s.useState)("name"),p=t.bucketName||"",j=(0,o.d4)((e=>e.objectBrowser.objectDetailsOpen)),b=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),g=(0,o.d4)(we.s$),f=!(null===g||void 0===g||!g.includes("object-browser-only")),v=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),S=(0,o.d4)((e=>e.objectBrowser.records)),O=(0,o.d4)((e=>e.objectBrowser.searchObjects)),w=(0,o.d4)((e=>e.objectBrowser.selectedObjects)),C=(0,o.d4)((e=>e.objectBrowser.connectionError)),y=(0,o.d4)((e=>e.system.anonymousMode)),E=(0,_._)(p,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET]),I=S.filter((e=>{if(""===O)return!0;return e.name.toLowerCase().indexOf(O.toLowerCase())>=0})).sort((0,N.$w)(m));let A=[];A="ASC"===i?I:I.reverse();const k=[{type:"view",tooltip:"View",onClick:t=>{var s;const o=t.name||"",a="/browser/".concat(encodeURIComponent(p)).concat(o?"/".concat(encodeURIComponent(o)):"");!y||null!==(s=t.name)&&void 0!==s&&s.endsWith("/")?(e((0,c.KX)([])),n(a),y||(e((0,c.TO)(!0)),e((0,c.SK)(!0))),e((0,c.A7)(o))):(0,R._)(e,p,o,t)},sendOnlyId:!1}];let B=E||y?"This location is empty".concat(v?"":", please try uploading a new file"):(0,r.vj)([r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],"view Objects in this bucket");C&&(B="Objects List unavailable. Please review your WebSockets configuration and try again");let F="calc(100vh - 290px)";return f&&(F="calc(100vh - 315px)"),(0,T.jsx)(h.bQt,{itemActions:k,columns:v?Oe:Se,isLoading:b,entityName:"Objects",idField:"name",records:A,customPaperHeight:F,selectedItems:w,onSelect:y?void 0:t=>{const n=t.target,s=n.value,o=n.checked;let a=[...w];return o?a.push(s):a=a.filter((e=>e!==s)),e((0,c.KX)(a)),e((0,c.A7)(null)),a},customEmptyMessage:B,sortEnabled:{currentSort:m,currentDirection:i,onSortClick:t=>{const n=u()(t,"sortDirection","DESC");x(t.sortBy),d(n),e((0,c.Yw)(!0))}},onSelectAll:()=>{if(e((0,c.A7)(null)),w.length===A.length)return void e((0,c.KX)([]));const t=A.map((e=>e.name));e((0,c.KX)(t))},rowStyle:e=>{var t;let{index:n}=e;return null!==(t=A[n])&&void 0!==t&&t.delete_flag?"deleted":""},sx:{minHeight:j?"100%":"initial"},noBackground:!0})};var Te=n(64681);const ye=()=>{const e=(0,l.jL)(),t=(0,o.d4)((e=>e.objectBrowser.searchObjects));return(0,T.jsx)(Te.A,{placeholder:"Start typing to filter objects in the bucket",onChange:t=>{e((0,c.$X)(t))},value:t})};var Ee=n(30614);const Ie=(0,S.A)(s.lazy((()=>n.e(5941).then(n.bind(n,65941))))),Ne=(0,S.A)(s.lazy((()=>Promise.resolve().then(n.bind(n,30718))))),Ae=(0,S.A)(s.lazy((()=>n.e(2704).then(n.bind(n,32704))))),ke=(0,S.A)(s.lazy((()=>Promise.resolve().then(n.bind(n,37524))))),Be={borderWidth:2,borderRadius:2,borderColor:"transparent",outline:"none"},Fe={borderStyle:"dashed",backgroundColor:"transparent",borderColor:"#2196f3"},Le={borderStyle:"dashed",backgroundColor:"transparent",borderColor:"#00e676"},Ve=()=>{var e;const t=(0,l.jL)(),n=(0,a.g)(),d=(0,a.Zp)(),b=(0,a.zy)(),g=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),f=(0,o.d4)((e=>e.objectBrowser.rewind.bucketToRewind)),v=(0,o.d4)((e=>e.objectBrowser.versionsMode)),S=(0,o.d4)((e=>e.objectBrowser.showDeleted)),y=(0,o.d4)((e=>e.objectBrowser.objectDetailsOpen)),E=(0,o.d4)((e=>e.objectBrowser.selectedInternalPaths)),R=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),P=(0,o.d4)((e=>e.objectBrowser.simplePath)),U=(0,o.d4)((e=>e.objectBrowser.versionInfo)),z=(0,o.d4)((e=>e.objectBrowser.lockingEnabled)),G=(0,o.d4)((e=>e.objectBrowser.downloadRenameModal)),M=(0,o.d4)((e=>e.objectBrowser.selectedPreview)),J=(0,o.d4)((e=>e.objectBrowser.shareFileModalOpen)),K=(0,o.d4)((e=>e.objectBrowser.previewOpen)),W=(0,o.d4)((e=>e.objectBrowser.selectedBucket)),H=(0,o.d4)((e=>e.system.anonymousMode)),Y=(0,o.d4)((e=>e.objectBrowser.anonymousAccessOpen)),$=(0,o.d4)((e=>{var t;return(null===(t=e.objectBrowser)||void 0===t?void 0:t.records)||[]})),Z=(0,o.d4)(B.Nx),q=(0,o.d4)(B.fT),[Q,X]=(0,s.useState)(!1),[ee,te]=(0,s.useState)(!1),[ne,se]=(0,s.useState)(!1),[oe,ae]=(0,s.useState)(!1),[ie,le]=(0,s.useState)(!1),[ce,ue]=(0,s.useState)(null),[he,me]=(0,s.useState)(null),[xe,pe]=(0,s.useState)(!1),je=A(U.status),be=n.bucketName||"",ge=b.pathname.split("/browser/".concat(be,"/")),ve=2===ge.length?decodeURIComponent(ge[1]):"",_e=ve.split("/").filter((e=>""!==e));let Se=[be];_e.length>0&&(Se=Se.concat(_e));const Oe=(0,s.useRef)(null),we=(0,s.useRef)(null),Te=(0,o.d4)((e=>e.console.session&&e.console.session.permissions||{})),Ve=[r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],De=Se.join("/"),Re=function(e,t){const n=C(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).reduce(((e,t)=>{const n=w(t);return n&&e.push(".".concat(n)),e}),[]);return[...new Set(n)].join(",")}(Te,De,Ve),Pe=C(Te,De,Ve),Ue=(0,_._)([De,...Pe],[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS]),ze=(0,_._)(be,[r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS,r.OV.S3_GET_BUCKET_VERSIONING]),Ge=(0,_._)([De,...Pe],[r.OV.S3_DELETE_OBJECT]),Me=(0,_._)([De,...Pe],Ve)||H,Je=(0,_._)(be,[r.OV.S3_GET_BUCKET_POLICY,r.OV.S3_PUT_BUCKET_POLICY,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),Ke=(0,o.d4)((e=>e.objectBrowser.selectedObjects)),We=(()=>{let e=!1;if(1===Ke.length){e=!!$.find((e=>e.name==="".concat(Ke[0])&&e.delete_flag))}return e})(),He=(0,s.useCallback)((()=>{const e=Ke[0];!xe&&e&&i.F.buckets.getObjectMetadata(be,{prefix:e}).then((e=>{let t=u()(e.data,"objectMetadata",{});pe(!0),me(t)})).catch((e=>{console.error("Error Getting Metadata Status: ",e,null===e||void 0===e?void 0:e.detailedError),pe(!0)}))}),[be,Ke,xe]);(0,s.useEffect)((()=>{be&&!We&&He()}),[be,Ke,He,We]),(0,s.useEffect)((()=>{g&&f!==be&&t((0,c.rS)())}),[g,f,be,t]),(0,s.useEffect)((()=>{null!==we.current&&(we.current.setAttribute("directory",""),we.current.setAttribute("webkitdirectory",""))}),[we]),(0,s.useEffect)((()=>{if(1===Ke.length){const e=Ke[0],t=e.endsWith("/");let n=(0,N.IZ)(he,e);le(!("none"===n||!Ue)),ae(!(!Ue||t))}else ae(!1),le(!1)}),[Ke,Ue,he]),(0,s.useEffect)((()=>{ce||H||i.F.buckets.getBucketQuota(be).then((e=>{let t=null;e.data.quota&&(t=e.data),ue(t)})).catch((e=>{console.error("Error Getting Quota Status: ",e.error.detailedMessage),ue(null)}))}),[ce,be,H]),(0,s.useEffect)((()=>{Ke.length>0?t((0,c.TO)(!0)):0!==Ke.length||null!==E||R||t((0,c.TO)(!1))}),[Ke,E,t,R]),(0,s.useEffect)((()=>{ne||(t((0,B.ZU)(!0)),se(!0))}),[ne,t,se]),(0,s.useEffect)((()=>{!R&&!Z||H||i.F.buckets.bucketInfo(be).then((e=>{t((0,B.ZU)(!1)),t((0,B.$T)(e.data))})).catch((e=>{t((0,B.ZU)(!1)),t((0,O.C9)((0,m.S)(e)))}))}),[be,Z,t,H,R]),(0,s.useEffect)((()=>{""!==W&&i.F.buckets.getBucketRetentionConfig(W).then((e=>{t((0,c.PJ)(e.data))})).catch((()=>{t((0,c.PJ)(null))}))}),[W,t]);const Ye=e=>{if(null!==e&&void 0!==e&&null!==e.target.files&&void 0!==e.target.files){e.preventDefault();var t=[];for(let n=0;n<e.target.files.length;n++)t.push(e.target.files[n]);$e(t,""),e.target.value=""}},$e=(0,s.useCallback)(((e,n)=>{let s="";P&&(s=P.endsWith("/")?P:P+"/");((e,n,s,o)=>{let a=a=>new Promise(((i,l)=>{let r="api/v1/buckets/".concat(n,"/objects/upload");const d=a.name,h=new Blob([a],{type:a.type}),m=u()(a,"path",""),x=u()(a,"webkitRelativePath","");let p=o;const j=(0,k.E0)(8);""!==m?p=m:""!==x&&(p=x);let b="";if(""!==s||""!==p){const e=p.split("/").slice(0,-1).join("/"),t=s.endsWith("/")?s.slice(0,-1):s;b="".concat(t).concat(t.endsWith("/")||""===e||e.startsWith("/")?"":"/").concat(e).concat(!e.endsWith("/")||""===e.trim()&&!s.endsWith("/")?"/":"")}r=""!==b?"".concat(r,"?prefix=").concat(encodeURIComponent(b+d)):"".concat(r,"?prefix=").concat(encodeURIComponent(d));const g=encodeURIComponent("".concat(n,"-").concat(b,"-").concat((new Date).getTime(),"-").concat(Math.random()));let f=new XMLHttpRequest;f.open("POST",r,!0),H&&f.setRequestHeader("X-Anonymous","1");const v=e.length>1;let _="An error occurred while uploading the file".concat(v?"s":"",".");const S={413:"Error - File size too large"};f.withCredentials=!1,f.onload=function(){if(f.status>=200&&f.status<300)t((0,c.rx)(g)),i({status:f.status}),(0,k.vy)(j);else{if(S[f.status])_=S[f.status];else if(f.response)try{const e=JSON.parse(f.response);_=e.detailedMessage}catch(e){_="something went wrong"}t((0,c.iL)({instanceID:g,msg:_})),l({status:f.status,message:_}),(0,k.vy)(j)}},f.upload.addEventListener("error",(()=>{l(_),t((0,c.iL)({instanceID:g,msg:"A network error occurred."}))})),f.upload.addEventListener("progress",(e=>{const n=Math.floor(100*e.loaded/e.total);t((0,c.DW)({instanceID:g,progress:n}))})),f.onerror=()=>{l(_),t((0,c.iL)({instanceID:g,msg:"A network error occurred."}))},f.onloadend=()=>{0===e.length&&t((0,c.Yw)(!0))},f.onabort=()=>{t((0,c.Dm)(g))};const O=new FormData;void 0!==a.size&&(O.append(a.size.toString(),h,d),(0,k.FP)(j,f),t((0,c.cP)({ID:j,bucketName:n,done:!1,instanceID:g,percentage:0,prefix:"".concat(b).concat(d),type:"upload",waitingForFile:!1,failed:!1,cancelled:!1,errorMessage:""})),(0,k.vx)(j,O))}));const i=[];t((0,c.Nu)());for(let t=0;t<e.length;t++){const n=e[t];i.push(a(n))}Promise.allSettled(i).then((e=>{const n=e.filter((e=>"rejected"===e.status));if(n.length>0){const e=i.length,s=i.length-n.length,o={errorMessage:"There were some errors during file upload",detailedError:"Uploaded files ".concat(s,"/").concat(e)};t((0,O.C9)(o))}t((0,c.Yw)(!0))}))})(e,be,s,n)}),[be,t,P,H]),Ze=(0,s.useCallback)((e=>{if(e&&e.length>0&&Me){let n=e[0].path,s=e;Re.length>0&&(s=e.filter((e=>{const t=w(e.name);return Re.includes(t)}))),s.length?($e(s,n),console.log("".concat(s.length," Allowed Files Processed out of ").concat(e.length,"."),De,...Pe),s.length!==e.length&&t((0,O.C9)({errorMessage:"Upload is restricted.",detailedError:(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload objects to this location")}))):(t((0,O.C9)({errorMessage:"Could not process drag and drop.",detailedError:(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload objects to this location")})),console.error("Could not process drag and drop . upload may be restricted.",De,...Pe))}Me||t((0,O.C9)({errorMessage:"Upload not allowed",detailedError:(0,r.vj)([r.OV.S3_PUT_OBJECT,r.OV.S3_PUT_ACTIONS],"upload objects to this location")}))}),[$e]),{getRootProps:qe,getInputProps:Qe,isDragActive:Xe,isDragAccept:et}=(0,x.VB)({noClick:!0,onDrop:Ze}),tt=(0,s.useMemo)((()=>({...Be,...Xe?Fe:{},...et?Le:{}})),[Xe,et]),nt=e=>{if(t((0,c.A7)(null)),t((0,c.cQ)({status:!1})),y&&null!==E){const e=ve.split("/");e.pop();let t="";e&&e.length>0&&(t="".concat(e.join("/"),"/")),d("/browser/".concat(encodeURIComponent(be),"/").concat(encodeURIComponent(t)))}t((0,c.TO)(!1)),e&&t((0,c.Yw)(!0))};let st=p.c9.now();null!==q&&void 0!==q&&q.creation_date&&(st=p.c9.fromISO(q.creation_date));const ot=(null===Ke||void 0===Ke?void 0:Ke.length)<=1?"Download Selected":" Download selected objects as Zip. Any Deleted objects in the selection would be skipped from download.",at=[{action:()=>{t((0,F.op)(be))},label:"Download",disabled:!Ue||We,icon:(0,T.jsx)(h.s3U,{}),tooltip:Ue?ot:(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS],"download objects from this bucket")},{action:()=>{t((0,F.mS)())},label:"Share",disabled:1!==Ke.length||!oe||We,icon:(0,T.jsx)(h.liv,{}),tooltip:oe?"Share Selected File":"Sharing unavailable"},{action:()=>{t((0,F.HS)())},label:"Preview",disabled:1!==Ke.length||!ie||We,icon:(0,T.jsx)(h.cyn,{}),tooltip:ie?"Preview Selected File":"Preview unavailable"},{action:()=>{t((0,F.oz)())},label:"Anonymous Access",disabled:1!==Ke.length||!Ke[0].endsWith("/")||!Je,icon:(0,T.jsx)(h._kf,{}),tooltip:1===Ke.length&&Ke[0].endsWith("/")?"Set Anonymous Access to this Folder":"Anonymous Access unavailable"},{action:()=>{X(!0)},label:"Delete",icon:(0,T.jsx)(h.d7y,{}),disabled:!Ge||0===Ke.length,tooltip:Ge?"Delete Selected Files":(0,r.vj)([r.OV.S3_DELETE_OBJECT],"delete objects in this bucket")}];return(0,T.jsxs)(s.Fragment,{children:[J&&M&&(0,T.jsx)(Ne,{open:J,closeModalAndRefresh:()=>{t((0,c.Lf)(!1)),t((0,c.go)(null))},bucketName:be,dataObject:{name:M.name,last_modified:"",version_id:M.version_id}}),Q&&(0,T.jsx)(Ie,{deleteOpen:Q,selectedBucket:be,selectedObjects:Ke,closeDeleteModalAndRefresh:e=>{X(!1),e&&(t((0,O.Hk)("Objects deleted successfully.")),t((0,c.KX)([])),t((0,c.Yw)(!0)))},versioning:U}),ee&&(0,T.jsx)(Ae,{open:ee,closeModalAndRefresh:()=>{te(!1)},bucketName:be}),K&&M&&(0,T.jsx)(ke,{open:K,bucketName:be,actualInfo:{name:M.name||"",last_modified:"",version_id:M.version_id||"",size:M.size||0},onClosePreview:()=>{t((0,c.xE)(!1)),t((0,c.go)(null))}}),!!G&&(0,T.jsx)(re,{open:!!G,closeModal:()=>{t((0,c.Ew)(null))},currentItem:(null===(e=G.name.split("/"))||void 0===e?void 0:e.pop())||"",bucketName:be,internalPaths:ve,actualInfo:{name:G.name,last_modified:"",version_id:G.version_id,size:G.size}}),Y&&(0,T.jsx)(Ee.default,{onClose:()=>{t((0,c.I8)(!1))},bucket:be,modalOpen:Y,prefilledRoute:"".concat(Ke[0],"*")}),(0,T.jsxs)(h.Mxu,{variant:"full",children:[H&&(0,T.jsx)("div",{style:{paddingBottom:16},children:(0,T.jsx)(ye,{})}),(0,T.jsx)(h.azJ,{withBorders:!0,sx:{padding:"0 5px"},children:(0,T.jsx)(h.lcx,{icon:(0,T.jsx)("span",{children:(0,T.jsx)(h.brV,{style:{width:30}})}),title:be,subTitle:H?null:(0,T.jsxs)(h.azJ,{sx:{"& .detailsSpacer":{marginRight:18,"@media (max-width: 600px)":{marginRight:0}}},children:[(0,T.jsxs)("span",{className:"detailsSpacer",children:["Created on:\xa0",(0,T.jsx)("strong",{children:null!==q&&void 0!==q&&q.creation_date?st.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)"):""})]}),(0,T.jsxs)("span",{className:"detailsSpacer",children:["Access:\xa0\xa0",(0,T.jsx)("strong",{children:(null===q||void 0===q?void 0:q.access)||""})]}),q&&(0,T.jsx)(s.Fragment,{children:(0,T.jsxs)("span",{className:"detailsSpacer",children:[q.size&&(0,T.jsx)(s.Fragment,{children:(0,j.qO)(q.size)}),q.size&&ce&&(0,T.jsxs)(s.Fragment,{children:[" ","/ ",(0,j.qO)(ce.quota||0)]}),q.size&&q.objects?" - ":"",q.objects&&(0,T.jsxs)(s.Fragment,{children:[q.objects,"\xa0Object",q.objects&&1!==q.objects?"s":""]})]})})]}),actions:(0,T.jsxs)(s.Fragment,{children:[!H&&(0,T.jsx)(L.A,{tooltip:ze?"Rewind Bucket":(0,r.vj)([r.OV.S3_GET_OBJECT,r.OV.S3_GET_ACTIONS,r.OV.S3_GET_BUCKET_VERSIONING],"apply rewind in this bucket"),children:(0,T.jsx)(h.$nd,{id:"rewind-objects-list",label:"Rewind",icon:(0,T.jsx)(h.Exy,{color:"alert",dotOnly:!0,invisible:!g,children:(0,T.jsx)(h.osr,{style:{minWidth:16,minHeight:16,width:16,height:16,marginTop:-3}})}),variant:"regular",onClick:()=>{te(!0)},disabled:!je||!ze})}),(0,T.jsx)(L.A,{tooltip:"Reload List",children:(0,T.jsx)(h.$nd,{id:"refresh-objects-list",label:"Refresh",icon:(0,T.jsx)(h.fNY,{}),variant:"regular",onClick:()=>{v?t((0,c.SK)(!0)):(t((0,c.A3)()),t((0,c.Yw)(!0)))},disabled:!H&&(!(0,_._)(be,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET])||g)})}),(0,T.jsx)("input",{type:"file",multiple:!0,accept:Re||void 0,onChange:Ye,style:{display:"none"},ref:Oe}),(0,T.jsx)("input",{type:"file",multiple:!0,onChange:Ye,style:{display:"none"},ref:we}),(0,T.jsx)(V,{bucketName:be,uploadPath:De,uploadFileFunction:e=>{Oe&&Oe.current&&Oe.current.click(),e()},uploadFolderFunction:e=>{we&&we.current&&we.current.click(),e()}})]}),bottomBorder:!1})}),(0,T.jsxs)("div",{id:"object-list-wrapper",...qe({style:{...tt}}),children:[(0,T.jsx)("input",{...Qe()}),(0,T.jsxs)(h.azJ,{withBorders:!0,sx:{display:"flex",borderTop:0,padding:0,"& .hideListOnSmall":{"@media (max-width: 799px)":{display:"none"}}},children:[v?(0,T.jsx)(s.Fragment,{children:null!==E&&(0,T.jsx)(fe,{internalPaths:E,bucketName:be})}):(0,T.jsx)(_.R,{scopes:[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],resource:be,errorProps:{disabled:!0},children:(0,T.jsxs)(h.xA9,{item:!0,xs:12,sx:{width:"100%",position:"relative","&.detailsOpen":{"@media (max-width: 799px)":{display:"none"}}},className:y?"detailsOpen":"",children:[!H&&(0,T.jsx)(h.xA9,{item:!0,xs:12,sx:{padding:"12px 14px 5px"},children:(0,T.jsx)(I,{bucketName:be,internalPaths:ve,additionalOptions:!je||g?null:(0,T.jsx)(h.Sc0,{name:"deleted_objects",id:"showDeletedObjects",value:"deleted_on",label:"Show deleted objects",onChange:()=>{t((0,c.A3)()),t((0,c.lA)(!S)),nt(!0)},checked:S,sx:{marginLeft:5,"@media (max-width: 600px)":{marginLeft:0,flexDirection:"row"}}}),hidePathButton:!1})}),(0,T.jsx)(Ce,{})]})}),!H&&(0,T.jsx)(_.R,{scopes:[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],resource:be,errorProps:{disabled:!0},children:(0,T.jsxs)(D,{open:y,closePanel:()=>{nt(!1)},className:"".concat(v?"hideListOnSmall":""),children:[Ke.length>0&&(0,T.jsx)(h.Smc,{items:at,title:"Selected Objects:"}),null!==E&&(0,T.jsx)(de,{internalPaths:E,bucketName:be,onClosePanel:nt,versioningInfo:U,locking:z})]})})]})]})]})]})};var De=n(18218),Re=n(69772),Pe=n(48793),Ue=n(59707),ze=n(55968);const Ge=e=>{let{bucketName:t}=e;const n=(0,l.jL)(),i=(0,o.d4)(we.s$),d=(0,o.d4)((e=>e.objectBrowser.versionsMode)),u=(0,o.d4)((e=>e.objectBrowser.versionedFile)),m=(0,o.d4)((e=>e.objectBrowser.searchVersions)),x=!(null===i||void 0===i||!i.includes("object-browser-only")),p=(0,a.Zp)(),j=(0,De.A)(t,[r.OV.S3_GET_BUCKET_POLICY,r.OV.S3_PUT_BUCKET_POLICY,r.OV.S3_GET_BUCKET_VERSIONING,r.OV.S3_PUT_BUCKET_VERSIONING,r.OV.S3_GET_BUCKET_ENCRYPTION_CONFIGURATION,r.OV.S3_PUT_BUCKET_ENCRYPTION_CONFIGURATION,r.OV.S3_DELETE_BUCKET,r.OV.S3_GET_BUCKET_NOTIFICATIONS,r.OV.S3_PUT_BUCKET_NOTIFICATIONS,r.OV.S3_GET_REPLICATION_CONFIGURATION,r.OV.S3_PUT_REPLICATION_CONFIGURATION,r.OV.S3_GET_LIFECYCLE_CONFIGURATION,r.OV.S3_PUT_LIFECYCLE_CONFIGURATION,r.OV.ADMIN_GET_BUCKET_QUOTA,r.OV.ADMIN_SET_BUCKET_QUOTA,r.OV.S3_PUT_BUCKET_TAGGING,r.OV.S3_GET_BUCKET_TAGGING,r.OV.S3_LIST_BUCKET_VERSIONS,r.OV.S3_GET_BUCKET_POLICY_STATUS,r.OV.S3_DELETE_BUCKET_POLICY,r.OV.S3_GET_ACTIONS,r.OV.S3_PUT_ACTIONS]),b=(0,T.jsx)(s.Fragment,{children:d?(0,T.jsx)(s.Fragment,{children:(0,T.jsx)(Te.A,{placeholder:"Start typing to filter versions of ".concat(u),onChange:e=>{n((0,c.aj)(e))},value:m})}):(0,T.jsx)(_.R,{scopes:[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET],resource:t,errorProps:{disabled:!0},children:(0,T.jsx)(ye,{})})});return(0,s.useEffect)((()=>{n((0,O.ph)("object_browser"))}),[]),(0,T.jsx)(s.Fragment,{children:x?(0,T.jsxs)(h.xA9,{container:!0,sx:{padding:"20px 32px 0"},children:[(0,T.jsx)(h.xA9,{children:(0,T.jsx)(Re.A,{marginRight:30,marginTop:10})}),(0,T.jsxs)(h.xA9,{item:!0,xs:!0,sx:{display:"flex",gap:10},children:[b,(0,T.jsx)(Ue.A,{})]})]}):(0,T.jsx)(Pe.A,{label:(0,T.jsx)(h.EGL,{label:"Object Browser",onClick:()=>{p(r.zZ.OBJECT_BROWSER_VIEW)}}),actions:(0,T.jsxs)(s.Fragment,{children:[(0,T.jsx)(_.R,{scopes:r.pC[r.ac.BUCKET_ADMIN],resource:t,errorProps:{disabled:!0},children:(0,T.jsx)(L.A,{tooltip:j?"Configure Bucket":"You do not have the required permissions to configure this bucket. Please contact your MinIO administrator to request "+r.ac.BUCKET_ADMIN+" permisions.",children:(0,T.jsx)(h.$nd,{id:"configure-bucket-main",color:"primary","aria-label":"Configure Bucket",onClick:()=>p("/buckets/".concat(t,"/admin")),icon:(0,T.jsx)(h.Zes,{style:{width:20,height:20,marginTop:-3}}),style:{padding:"0 10px"}})})}),(0,T.jsx)(ze.A,{})]}),middleComponent:b})})},Me=()=>{const e=(0,l.jL)(),t=(0,a.g)(),n=(0,a.zy)(),d=(0,o.d4)((e=>e.objectBrowser.loadingVersioning)),u=(0,o.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),h=(0,o.d4)((e=>e.objectBrowser.rewind.dateToRewind)),m=(0,o.d4)((e=>e.objectBrowser.showDeleted)),x=(0,o.d4)((e=>e.objectBrowser.requestInProgress)),p=(0,o.d4)((e=>e.objectBrowser.loadingLocking)),j=(0,o.d4)((e=>e.objectBrowser.reloadObjectsList)),b=(0,o.d4)((e=>e.objectBrowser.simplePath)),g=(0,o.d4)((e=>e.system.anonymousMode)),f=(0,o.d4)((e=>e.objectBrowser.selectedBucket)),v=(0,o.d4)((e=>e.objectBrowser.records)),_=t.bucketName||"",S=n.pathname.split("/browser/".concat(encodeURIComponent(_),"/")),O=2===S.length?decodeURIComponent(S[1]):"",w=(0,s.useCallback)((t=>{let n=(new Date).toISOString();null!==h&&u&&(n=h);e({type:"socket/OBRequest",payload:{bucketName:_,path:t,rewindMode:u||m,date:n}})}),[_,m,h,u,e]),C=(0,s.useCallback)((function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e((0,c.cQ)({status:!1}));let n=O;O.endsWith("/")||""===O||(n="".concat(O.split("/").slice(0,-1).join("/"),"/")),"/"===n&&(n=""),(n!==b||_!==f||t)&&(e((0,c.u)(!0)),w(n))}),[O,e,b,f,_,w]);(0,s.useEffect)((()=>()=>{e({type:"socket/OBCancelLast"})}),[e]),(0,s.useEffect)((()=>{e((0,c.vn)(!0)),O.endsWith("/")||""===O?(e((0,c.TO)(!1)),e((0,c.A7)(null)),e((0,c.Qy)(!0))):(e((0,c.oe)(!0)),e((0,c.TO)(!0)),e((0,c.SK)(!0)),e((0,c.A7)(O||"")))}),[_,O,h,u,e]),(0,s.useEffect)((()=>{C(!1)}),[C]),(0,s.useEffect)((()=>{j&&0===v.length&&!x&&C(!0)}),[j,v,x,C]);const y=(0,De.A)(_,[r.OV.S3_LIST_BUCKET,r.OV.S3_ALL_LIST_BUCKET])||g;return(0,s.useEffect)((()=>{d&&!g&&(y?i.F.buckets.getBucketVersioning(_).then((t=>{e((0,c.AP)(t.data)),e((0,c.vn)(!1))})).catch((t=>{console.error("Error Getting Object Versioning Status: ",t.error.detailedMessage),e((0,c.vn)(!1))})):(e((0,c.vn)(!1)),e((0,c.A3)())))}),[_,d,e,y,g]),(0,s.useEffect)((()=>{p&&(y?i.F.buckets.getBucketObjectLockingStatus(_).then((t=>{e((0,c.xW)(t.data.object_locking_enabled)),e((0,c.Qy)(!1))})).catch((t=>{console.error("Error Getting Object Locking Status: ",t.error.detailedMessage),e((0,c.Qy)(!1))})):(e((0,c.A3)()),e((0,c.Qy)(!1))))}),[_,p,e,y]),(0,T.jsxs)(s.Fragment,{children:[!g&&(0,T.jsx)(Ge,{bucketName:_}),(0,T.jsx)(Ve,{})]})}},30718:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_});var s=n(65043),o=n(22166),a=n(89923),i=n(61476),l=n.n(i),r=n(94141),c=n(24241),d=n(70579);const u=e=>{let{id:t,label:n,maxSeconds:o,entity:i,onChange:l}=e;const r=Math.floor(o/86400),u=Math.floor(o%86400/3600),h=Math.floor(o%3600/60),[m,x]=(0,s.useState)(0),[p,j]=(0,s.useState)(0),[b,g]=(0,s.useState)(0),[f,v]=(0,s.useState)(!0),[_,S]=(0,s.useState)(null);(0,s.useEffect)((()=>{x(r),j(u),g(h)}),[r,u,h]),(0,s.useEffect)((()=>{var e,t,n;isNaN(p)||isNaN(m)||isNaN(b)||S((e=m,t=p,n=b,c.c9.now().plus({hours:t+24*e,minutes:n}).toISO()))}),[m,p,b]),(0,s.useEffect)((()=>{if(f&&_){const e=c.c9.fromISO(_).toFormat("yyyy-MM-dd HH:mm:ss");l(e.split(" ").join("T"),!0)}else l("0000-00-00",!1)}),[_,l,f]),(0,s.useEffect)((()=>{let e=!0;(m<0||m>7||m>r||isNaN(m))&&(e=!1),(p<0||p>23||isNaN(p))&&(e=!1),(b<0||b>59||isNaN(b))&&(e=!1),m===r&&(p>u&&(e=!1),p===u&&b>h&&(e=!1)),m<=0&&p<=0&&b<=0&&(e=!1),v(e)}),[_,r,u,h,l,m,p,b]);const O={"& .textBoxContainer":{minWidth:0},"& input":{textAlign:"center",paddingRight:10,paddingLeft:10,width:40}};return(0,d.jsxs)(a.azJ,{className:"inputItem",children:[(0,d.jsx)(a.azJ,{sx:{display:"flex",alignItems:"center",marginBottom:5},children:(0,d.jsx)(a.l1Y,{htmlFor:t,children:n})}),(0,d.jsxs)(a.azJ,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-evenly",gap:10,"& .reverseInput":{flexFlow:"row-reverse","& > label":{fontWeight:400,marginLeft:15,marginRight:25}}},children:[(0,d.jsx)(a.azJ,{children:(0,d.jsx)(a.cl_,{id:t,className:"reverseInput removeArrows",type:"number",min:"0",max:"7",label:"Days",name:t,onChange:e=>{x(parseInt(e.target.value))},value:m.toString(),sx:O,noLabelMinWidth:!0})}),(0,d.jsx)(a.azJ,{children:(0,d.jsx)(a.cl_,{id:t,className:"reverseInput removeArrows",type:"number",min:"0",max:"23",label:"Hours",name:t,onChange:e=>{j(parseInt(e.target.value))},value:p.toString(),sx:O,noLabelMinWidth:!0})}),(0,d.jsx)(a.azJ,{children:(0,d.jsx)(a.cl_,{id:t,className:"reverseInput removeArrows",type:"number",min:"0",max:"59",label:"Minutes",name:t,onChange:e=>{g(parseInt(e.target.value))},value:b.toString(),sx:O,noLabelMinWidth:!0})})]}),(0,d.jsx)(a.azJ,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:25,marginLeft:10,marginBottom:15,"& .validityText":{fontSize:14,marginTop:15,display:"flex",alignItems:"center",justifyContent:"center","@media (max-width: 900px)":{flexFlow:"column"},"& > .min-icon":{color:"#5E5E5E",width:15,height:15,marginRight:10}},"& .validTill":{fontWeight:"bold",marginLeft:15},"& .invalidDurationText":{marginTop:15,display:"flex",color:"red",fontSize:11}},children:f&&_?(0,d.jsxs)("div",{className:"validityText",children:[(0,d.jsx)(a.qYV,{}),(0,d.jsxs)("div",{children:[i," will be available until:"]})," ",(0,d.jsx)("div",{className:"validTill",children:c.c9.fromISO(_).toFormat("MM/dd/yyyy HH:mm:ss ZZZZ")})]}):(0,d.jsx)("div",{className:"invalidDurationText",children:"Please select a valid duration."})})]})};var h=n(56483),m=n(64159),x=n(21383),p=n(56629),j=n(53518),b=n(81708),g=n(6035),f=n(93950),v=n.n(f);const _=e=>{let{open:t,closeModalAndRefresh:n,bucketName:i,dataObject:c}=e;const f=(0,x.jL)(),_=(0,o.d4)(m.Rq),S=(0,o.d4)(g.yL),[O,w]=(0,s.useState)(""),[C,T]=(0,s.useState)(!0),[y,E]=(0,s.useState)(!1),[I,N]=(0,s.useState)(""),[A,k]=(0,s.useState)(!0),[B,F]=(0,s.useState)("null"),L=v()(((e,t)=>{k(t),t?N(e):(N(""),w(""))}),300);return(0,s.useEffect)((()=>{f((0,b.Ex)())}),[f]),(0,s.useEffect)((()=>{if(void 0===c.version_id)return _?(p.F.buckets.listObjects(i,{prefix:c.name||"",with_versions:_}).then((e=>{const t=(e.data.objects||[]).find((e=>e.is_latest));F(t?"".concat(t.version_id):"null")})).catch((e=>{f((0,m.Dy)((0,j.S)(e.error)))})),void T(!1)):(F("null"),void T(!1));F(c.version_id||"null"),T(!1)}),[i,c,_,f]),(0,s.useEffect)((()=>{if(A&&!C){E(!0),w("");const e=new Date("".concat(I)),t=new Date,n=Math.ceil((e.getTime()-t.getTime())/1e3);n>0&&p.F.buckets.shareObject(i,{prefix:c.name||"",version_id:B,expires:""!==I?"".concat(n,"s"):""}).then((e=>{w(e.data),E(!1)})).catch((e=>{f((0,m.Dy)((0,j.S)(e.error))),w(""),E(!1)}))}}),[c,I,i,A,w,f,_,C,B]),(0,d.jsx)(s.Fragment,{children:(0,d.jsxs)(r.A,{title:"Share File",titleIcon:(0,d.jsx)(a.liv,{style:{fill:"#4CCB92"}}),modalOpen:t,onClose:()=>{n()},children:[C&&(0,d.jsx)(a.xA9,{item:!0,xs:12,children:(0,d.jsx)(a.z21,{})}),!C&&(0,d.jsxs)(s.Fragment,{children:[(0,d.jsx)(a.xA9,{item:!0,xs:12,sx:{fontSize:14,fontWeight:400},children:(0,d.jsx)(a.m_M,{placement:"right",tooltip:(0,d.jsxs)("span",{children:["You can reset your session by logging out and logging back in to the web UI. ",(0,d.jsx)("br",{})," ",(0,d.jsx)("br",{}),"You can increase the maximum configuration time by setting the MINIO_STS_DURATION environment variable on all your nodes. ",(0,d.jsx)("br",{})," ",(0,d.jsx)("br",{}),"You can use ",(0,d.jsx)("b",{children:"mc share"})," as an alternative to this UI, where the session length does not limit the URL validity."]}),children:(0,d.jsxs)("span",{children:["The following URL lets you share this object without requiring a login. ",(0,d.jsx)("br",{}),"The URL expires automatically at the earlier of your configured time (",(0,h.K7)(S),") or the expiration of your current web session."]})})}),(0,d.jsx)("br",{}),(0,d.jsx)(a.xA9,{item:!0,xs:12,children:(0,d.jsx)(u,{id:"date",label:"Active for",maxSeconds:S,onChange:L,entity:"Link"})}),(0,d.jsx)(a.xA9,{item:!0,xs:12,sx:{marginBottom:10},children:(0,d.jsx)(a.EmB,{actionButton:(0,d.jsx)(l(),{text:O,children:(0,d.jsx)(a.$nd,{id:"copy-path",variant:"regular",onClick:()=>{f((0,m.h0)("Share URL Copied to clipboard"))},disabled:""===O||y,style:{width:"28px",height:"28px",padding:"0px"},icon:(0,d.jsx)(a.TdU,{})})}),children:O})})]})]})})}},37524:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var s=n(65043),o=n(94141),a=n(89923),i=n(33097),l=n.n(i),r=n(93445),c=n(56629),d=n(77397),u=n(97806),h=n(6584),m=n(70579);d.EA.workerSrc="./scripts/pdf.worker.min.mjs";const x=e=>{let{path:t,loading:n,onLoad:o,downloadFile:i}=e;const[l,r]=(0,s.useState)(!1),[c,d]=(0,s.useState)(0);if(!t)return null;const x=c>5?5:c,p=Array.from(Array(x).keys());return(0,m.jsxs)(s.Fragment,{children:[l&&0===c&&(0,m.jsx)(a.Wei,{variant:"error",title:"Error",message:(0,m.jsxs)(s.Fragment,{children:["File preview couldn't be displayed, Please try Download instead.",(0,m.jsx)(a.azJ,{sx:{display:"flex",justifyContent:"center",marginTop:12},children:(0,m.jsx)(a.$nd,{id:"download-preview",onClick:i,variant:"callAction",children:"Download File"})})]}),sx:{marginBottom:10}}),!n&&!l&&(0,m.jsx)(a.Wei,{variant:"warning",title:"File Preview",message:(0,m.jsxs)(s.Fragment,{children:["This is a File Preview for the first ",p.length," pages of the document, if you wish to work with the full document please download instead.",(0,m.jsx)(a.azJ,{sx:{display:"flex",justifyContent:"center",marginTop:12},children:(0,m.jsx)(a.$nd,{id:"download-preview",onClick:i,variant:"callAction",children:"Download File"})})]}),sx:{marginBottom:10}}),!l&&(0,m.jsx)(a.azJ,{sx:{overflowY:"auto","& .react-pdf__Page__canvas":{margin:"0 auto",backgroundColor:"transparent"}},children:(0,m.jsx)(u.A,{file:t,onLoadSuccess:e=>{let{_pdfInfo:t}=e;d(t.numPages||0),r(!1),o()},onLoadError:e=>{r(!0),o(),console.error(e)},children:p.map((e=>(0,m.jsx)(h.A,{pageNumber:e+1,renderAnnotationLayer:!1,renderTextLayer:!1,renderForms:!1},"render-page-".concat(e))))})})]})};var p=n(48245),j=n(21383);const b=e=>{let{bucketName:t,actualInfo:n,isFullscreen:o=!1}=e;const i=(0,j.jL)(),[d,u]=(0,s.useState)(!0),[h,b]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),v=(null===n||void 0===n?void 0:n.name)||"",_=(0,s.useCallback)((()=>{g||c.F.buckets.getObjectMetadata(t,{prefix:v,versionID:n.version_id||""}).then((e=>{let t=l()(e.data,"objectMetadata",{});f(!0),b(t)})).catch((e=>{console.error("Error Getting Metadata Status: ",e,null===e||void 0===e?void 0:e.detailedError),f(!0)}))}),[t,v,g,n.version_id]);(0,s.useEffect)((()=>{t&&v&&_()}),[t,v,_]);let S="";if(n){let e=document.baseURI.replace(window.location.origin,"");S="".concat(window.location.origin).concat(e,"api/v1/buckets/").concat(encodeURIComponent(t),"/objects/download?preview=true&prefix=").concat(encodeURIComponent(n.name||"")),n.version_id&&(S=S.concat("&version_id=".concat(n.version_id)))}let O=(0,r.IZ)(h,v);const w=()=>{u(!1)};return(0,m.jsxs)(s.Fragment,{children:["none"!==O&&d&&(0,m.jsx)(a.xA9,{item:!0,xs:12,children:(0,m.jsx)(a.z21,{})}),g?(0,m.jsxs)(a.azJ,{sx:{textAlign:"center","& .iframeContainer":{border:"0px",flex:"1 1 auto",width:"100%",height:250,backgroundColor:"transparent",borderRadius:5,"&.image":{height:500},"&.audio":{height:150},"&.video":{height:350},"&.fullHeight":{height:"calc(100vh - 185px)"}},"& .iframeBase":{backgroundColor:"#fff"},"& .iframeHidden":{display:"none"}},children:["video"===O&&(0,m.jsx)("video",{style:{width:"auto",height:"auto",maxWidth:"calc(100vw - 100px)",maxHeight:"calc(100vh - 200px)"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:w,children:(0,m.jsx)("source",{src:S,type:"video/mp4"})}),"audio"===O&&(0,m.jsx)("audio",{style:{width:"100%",height:"auto"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:w,children:(0,m.jsx)("source",{src:S,type:"audio/mpeg"})}),"image"===O&&(0,m.jsx)("img",{style:{width:"auto",height:"auto",maxWidth:"100vw",maxHeight:"100vh"},src:S,alt:"preview",onLoad:w}),"pdf"===O&&(0,m.jsx)(s.Fragment,{children:(0,m.jsx)(x,{path:S,onLoad:w,loading:d,downloadFile:()=>(0,p._)(i,t,S,n)})}),"none"===O&&(0,m.jsx)("div",{children:(0,m.jsx)(a.Wei,{message:" File couldn't be previewed using file extension or mime type. Please try Download instead",title:"Preview unavailable",sx:{margin:"15px 0"}})}),"none"!==O&&"video"!==O&&"audio"!==O&&"image"!==O&&"pdf"!==O&&(0,m.jsx)("div",{className:"iframeBase ".concat(d?"iframeHidden":""),children:(0,m.jsx)("iframe",{src:S,title:"File Preview",allowTransparency:!0,className:"iframeContainer ".concat(o?"fullHeight":O),onLoad:w,children:"File couldn't be loaded. Please try Download instead"})})]}):null]})},g=e=>{let{open:t,bucketName:n,actualInfo:i,onClosePreview:l}=e;return(0,m.jsx)(s.Fragment,{children:(0,m.jsx)(o.A,{modalOpen:t,title:"Preview - ".concat(null===i||void 0===i?void 0:i.name),onClose:l,wideLimit:!1,titleIcon:(0,m.jsx)(a.jG,{}),children:(0,m.jsx)(b,{bucketName:n,actualInfo:i})})})}},72237:(e,t,n)=>{n.d(t,{A:()=>a});var s=n(65043),o=n(70579);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n){return(0,o.jsx)(s.Suspense,{fallback:t,children:(0,o.jsx)(e,{...n})})}}},94141:(e,t,n)=>{n.d(t,{A:()=>d});var s=n(65043),o=n(22166),a=n(89923),i=n(21383),l=n(64159),r=n(49555),c=n(70579);const d=e=>{let{onClose:t,modalOpen:n,title:d,children:u,wideLimit:h=!0,titleIcon:m=null,iconColor:x="default",sx:p}=e;const j=(0,i.jL)(),[b,g]=(0,s.useState)(!1),f=(0,o.d4)((e=>e.system.modalSnackBar));(0,s.useEffect)((()=>{j((0,l.h0)(""))}),[j]),(0,s.useEffect)((()=>{if(f){if(""===f.message)return void g(!1);"error"!==f.type&&g(!0)}}),[f]);let v="";return f&&(v=f.detailedErrorMsg,(""===v||v&&v.length<5)&&(v=f.message)),(0,c.jsxs)(a.ngX,{onClose:t,open:n,title:d,titleIcon:m,widthLimit:h,sx:p,iconColor:x,children:[(0,c.jsx)(r.A,{isModal:!0}),(0,c.jsx)(a.qb_,{onClose:()=>{g(!1),j((0,l.h0)(""))},open:b,message:v,mode:"inline",variant:"error"===f.type?"error":"default",autoHideDuration:"error"===f.type?10:5,condensed:!0}),u]})}},81708:(e,t,n)=>{n.d(t,{Ex:()=>p,HS:()=>h,mS:()=>m,op:()=>u,oz:()=>x});var s=n(80907),o=n(56483),a=n(37414),i=n(93445),l=n(6035),r=n(64159),c=n(24241),d=n(56629);const u=(0,s.zD)("objectBrowser/downloadSelected",(async(e,t)=>{let{getState:n,rejectWithValue:s,dispatch:d}=t;const u=n(),h=t=>{const n=encodeURIComponent("".concat(e,"-").concat(t.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),s=(0,a.E0)(8),o=(0,i.RG)(e,t.name,t.version_id,t.size,null,s,(e=>{d((0,l.DW)({instanceID:n,progress:e}))}),(()=>{d((0,l.rx)(n))}),(e=>{d((0,l.iL)({instanceID:n,msg:e}))}),(()=>{d((0,l.Dm)(n))}),(()=>{d((0,r.Hk)("File download will be handled directly by the browser."))}));(0,a.FP)(s,o),d((0,l.cP)({ID:s,bucketName:e,done:!1,instanceID:n,percentage:0,prefix:t.name,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))};if(0!==u.objectBrowser.selectedObjects.length){let t=[];const n=e=>u.objectBrowser.selectedObjects.includes(e.name);if(t=u.objectBrowser.records.filter(n),1===t.length){if(t[0].name.length>200&&(0,o.oK)().toLowerCase().includes("win"))return void d((0,l.Ew)(t[0]));h(t[0])}else if(1===t.length)h(t[0]);else if(t.length>1){const n="".concat(c.c9.now().toFormat("LL-dd-yyyy-HH-mm-ss"),"_files_list.zip"),s=t.reduce(((e,t)=>{const n=null===t||void 0===t?void 0:t.delete_flag;return t&&!n?e.push(t.name):console.log("Skipping ".concat(null===t||void 0===t?void 0:t.name," from download.")),e}),[]);return void await(0,i.Fj)(e,s,n)}}})),h=(0,s.zD)("objectBrowser/openPreview",(async(e,t)=>{let{getState:n,rejectWithValue:s,dispatch:o}=t;const a=n();if(1===a.objectBrowser.selectedObjects.length){let e;const t=e=>a.objectBrowser.selectedObjects.includes(e.name);e=a.objectBrowser.records.find(t),e&&(o((0,l.go)(e)),o((0,l.xE)(!0)))}})),m=(0,s.zD)("objectBrowser/openShare",(async(e,t)=>{let{getState:n,rejectWithValue:s,dispatch:o}=t;const a=n();if(1===a.objectBrowser.selectedObjects.length){let e;const t=e=>a.objectBrowser.selectedObjects.includes(e.name);e=a.objectBrowser.records.find(t),e&&(o((0,l.go)(e)),o((0,l.Lf)(!0)))}})),x=(0,s.zD)("objectBrowser/openAnonymousAccess",(async(e,t)=>{let{getState:n,dispatch:s}=t;const o=n();1===o.objectBrowser.selectedObjects.length&&o.objectBrowser.selectedObjects[0].endsWith("/")&&s((0,l.I8)(!0))})),p=(0,s.zD)("objectBrowser/maxShareLinkExpTime",(async(e,t)=>{let{rejectWithValue:n,dispatch:s}=t;return d.F.buckets.getMaxShareLinkExp().then((e=>{s((0,l.QV)(e.data.exp))})).catch((async e=>n(e.error)))}))},48245:(e,t,n)=>{n.d(t,{_:()=>r});var s=n(56483),o=n(37414),a=n(93445),i=n(6035),l=n(64159);const r=(e,t,n,r)=>{var c;const d=encodeURIComponent("".concat(t,"-").concat(r.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),u=(0,s.oK)().toLowerCase().includes("win");if(((null===(c=r.name)||void 0===c?void 0:c.length)||0)>200&&u)return void e((0,i.Jl)(!0));const h=(0,o.E0)(8),m=(0,a.RG)(t,n,r.version_id,r.size||0,null,h,(t=>{e((0,i.DW)({instanceID:d,progress:t}))}),(()=>{e((0,i.rx)(d))}),(t=>{e((0,i.iL)({instanceID:d,msg:t}))}),(()=>{e((0,i.Dm)(d))}),(()=>{e((0,l.Hk)("File download will be handled directly by the browser."))}));(0,o.FP)(h,m),e((0,i.cP)({ID:h,bucketName:t,done:!1,instanceID:d,percentage:0,prefix:r.name||"",type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))}},49501:(e,t,n)=>{n.d(t,{A:()=>i});var s=n(65043),o=n(89923),a=n(70579);const i=e=>{let{value:t}=e;const[n,i]=(0,s.useState)(!1);return(0,a.jsxs)(o.azJ,{sx:{display:"flex",alignItems:"center",flexFlow:"row",["@media (max-width: ".concat(o.nmC.sm,"px)")]:{flexFlow:"column"}},children:[(0,a.jsx)(o.cl_,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:n?"text":"password",onChange:()=>{},value:t,overlayIcon:(0,a.jsx)(o.TdU,{}),readOnly:!0,overlayAction:()=>navigator.clipboard.writeText(t)}),(0,a.jsx)(o.$nd,{id:"show-hide-key",style:{marginLeft:"10px"},variant:"callAction",onClick:()=>i(!n),label:"Show/Hide"})]})}}}]);
|
|
//# sourceMappingURL=7945.5cbf1d20.chunk.js.map
|