2 lines
107 KiB
JavaScript
2 lines
107 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[5522],{95522:function(e,n,t){t.r(n),t.d(n,{default:function(){return Un}});var i,o=t(1413),a=t(72791),r=t(78687),s=t(57689),c=t(11135),l=t(25787),d=t(81551),u=t(23814),h=t(29439),m=t(57831),f=t(75952),p=t(99779),x=t(61889),b=t(26181),v=t.n(b),j=t(81207),g=t(45248),Z=t(29472),_=t(93433),S=t(78029),C=t.n(S),w=t(72455),T=t(11087),y=t(13400),N=t(38442),E=t(56087),I=t(75578),F=t(87995),k=t(54756),O=t(80184),L=(0,I.Z)(a.lazy((function(){return t.e(2185).then(t.bind(t,62185))}))),P=(0,w.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)({},u.cx),{},{slashSpacingStyle:{margin:"0 5px"}}))})),B=function(e){var n=e.bucketName,t=e.internalPaths,i=e.hidePathButton,o=e.additionalOptions,c=(0,d.TL)(),l=(0,s.s0)(),u=P(),m=(0,r.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),p=(0,r.v9)((function(e){return e.objectBrowser.versionsMode})),b=(0,r.v9)((function(e){return e.objectBrowser.versionedFile})),v=(0,r.v9)((function(e){return e.system.anonymousMode})),j=(0,r.v9)((function(e){return e.system.overrideStyles})),Z=(0,a.useState)(!1),S=(0,h.Z)(Z,2),w=S[0],I=S[1],B=(0,N.F)(n,[E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS])||v,D=t;""!==t&&(D="/".concat(t));var A=D.split("/").filter((function(e){return""!==e})),R=A.length-1,U=A.map((function(e,t){var i="".concat(A.slice(0,t+1).join("/"),"/"),o="/browser/".concat(n,"/").concat(i?"".concat((0,g.LL)(i)):"");return t===R&&e===b?null:(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)("span",{className:u.slashSpacingStyle,children:"/"}),t===R?(0,O.jsx)("span",{style:{cursor:"default"},children:e}):(0,O.jsx)(T.rU,{to:o,onClick:function(){c((0,k.db)({status:!1,objectName:""}))},children:e})]},"breadcrumbs-".concat(t.toString()))})),M=[];p&&(M=[(0,O.jsx)(a.Fragment,{children:(0,O.jsxs)("span",{children:[(0,O.jsx)("span",{className:u.slashSpacingStyle,children:"/"}),b," - Versions"]})},"breadcrumbs-versionedItem")]);var z=[(0,O.jsx)(a.Fragment,{children:(0,O.jsx)(T.rU,{to:"/browser/".concat(n),onClick:function(){c((0,k.db)({status:!1,objectName:""}))},children:n})},"breadcrumbs-root-path")].concat((0,_.Z)(U),(0,_.Z)(M)),G={};return j&&(G={backgroundColor:"transparent"}),(0,O.jsxs)(a.Fragment,{children:[(0,O.jsxs)("div",{className:u.breadcrumbsMain,children:[w&&(0,O.jsx)(L,{modalOpen:w,bucketName:n,folderName:t,onClose:function(){I(!1)}}),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:"".concat(u.breadcrumbs),children:[(0,O.jsx)(y.Z,{onClick:function(){p?c((0,k.db)({status:!1,objectName:""})):l(-1)},sx:{border:"#EAEDEE 1px solid",backgroundColor:"#fff",borderLeft:0,borderRadius:0,width:38,height:38,marginRight:"10px"},children:(0,O.jsx)(f.ubh,{})}),(0,O.jsx)("div",{className:u.breadcrumbsList,dir:"rtl",children:z}),(0,O.jsx)(C(),{text:"".concat(n,"/").concat(A.join("/")),children:(0,O.jsx)(f.zxk,{id:"copy-path",icon:(0,O.jsx)(f.TIy,{style:{width:"12px",height:"12px",fill:"#969FA8",marginTop:-1}}),variant:"regular",onClick:function(){c((0,F.y1)("Path copied to clipboard"))},style:{width:"28px",height:"28px",color:"#969FA8",border:"#969FA8 1px solid",marginRight:5}})}),(0,O.jsx)("div",{className:u.additionalOptions,children:o})]}),!i&&(0,O.jsx)(f.ua7,{tooltip:B?"Choose or create a new path":(0,E.MK)([E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS],"create a new path"),children:(0,O.jsx)(f.zxk,{id:"new-path",onClick:function(){I(!0)},disabled:!v&&(m||!B),icon:(0,O.jsx)(f.N$q,{style:{fill:"#969FA8"}}),style:{whiteSpace:"nowrap"},variant:"regular",label:"Create new path",sx:G})})]}),(0,O.jsx)("div",{className:u.breadcrumbsSecond,children:o})]})},D=t(47922),A=t(14917),R=t(74794),U=t(71715),M=t(77865),z=t(49900),G=t(57064),K=t(27454),W=(0,l.Z)((function(e){return(0,c.Z)({listUploadIcons:{height:20,"& .min-icon":{width:18,fill:"rgba(0,0,0,0.87)"}}})}))((function(e){var n=e.uploadPath,t=e.bucketName,i=e.forceDisable,o=void 0!==i&&i,s=e.uploadFileFunction,c=e.uploadFolderFunction,l=e.classes,d=e.overrideStyles,u=void 0===d?{}:d,m=(0,r.v9)((function(e){return e.system.anonymousMode})),p=(0,a.useState)(null),x=(0,h.Z)(p,2),b=x[0],v=x[1],j=Boolean(b),g=function(){v(null)},Z=(0,N.F)(n,[E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS])||m,_=(0,N.F)(t,[E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS],!1,!0),S=Z||_;return(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)(K.Z,{tooltip:S?"Upload Files":(0,E.MK)([E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS],"upload files to this bucket"),children:(0,O.jsx)(f.zxk,{id:"upload-main","aria-controls":"upload-main-menu","aria-haspopup":"true","aria-expanded":j?"true":void 0,onClick:function(e){v(e.currentTarget)},label:"Upload",icon:(0,O.jsx)(f.rG2,{}),variant:"callAction",disabled:o||!S,sx:u})}),(0,O.jsxs)(U.Z,{id:"upload-main-menu","aria-labelledby":"upload-main",anchorEl:b,open:j,onClose:function(){g()},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[(0,O.jsxs)(M.Z,{onClick:function(){s(g)},disabled:!Z||o,children:[(0,O.jsx)(G.Z,{className:l.listUploadIcons,children:(0,O.jsx)(f.rG2,{})}),(0,O.jsx)(z.Z,{children:"Upload File"})]}),(0,O.jsxs)(M.Z,{onClick:function(){c(g)},disabled:!_||o,children:[(0,O.jsx)(G.Z,{className:l.listUploadIcons,children:(0,O.jsx)(f.oXh,{})}),(0,O.jsx)(z.Z,{children:"Upload Folder"})]})]})]})})),H=(0,w.Z)((function(e){return(0,c.Z)({detailsList:{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}}},closePanel:{position:"absolute",right:0,top:8,"& .min-icon":{width:14}}})})),J=function(e){var n=e.open,t=e.closePanel,i=e.className,o=void 0===i?"":i,a=e.children,r=H();return(0,O.jsxs)(x.ZP,{item:!0,className:"".concat(r.detailsList," ").concat(n?"open":""," ").concat(o," detailsListPanel"),children:[(0,O.jsx)(y.Z,{onClick:t,className:r.closePanel,children:(0,O.jsx)(f.oto,{})}),a]})},V=t(64554),Y=t(34433),q=[{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"}],$=Array.from(Array(31),(function(e,n){return n+1})),X=(new Date).getFullYear(),Q=Array.from(Array(25),(function(e,n){return n+X})),ee=t(56028),ne=t(81159),te=t(83679),ie=t(4942),oe=t(28182),ae=t(30829),re=t(20068),se=t(68096),ce=t(58406),le=t(4834),de=(0,l.Z)((function(e){return(0,c.Z)({root:{"& .MuiSelect-icon":{color:"#000","&.Mui-disabled":{color:"#9c9c9c"}}},input:{borderBottom:0,fontSize:12}})}))(le.ZP),ue=(0,a.forwardRef)((function(e,n){var t=e.classes,i=e.id,o=e.label,r=e.disableOptions,s=void 0!==r&&r,c=e.addSwitch,l=void 0!==c&&c,d=e.tooltip,u=void 0===d?"":d,m=e.borderBottom,p=void 0!==m&&m,b=e.onDateChange,v=e.value,j=void 0===v?"":v;(0,a.useImperativeHandle)(n,(function(){return{resetDate:D}}));var g=(0,a.useState)(!1),Z=(0,h.Z)(g,2),_=Z[0],S=Z[1],C=(0,a.useState)(""),w=(0,h.Z)(C,2),T=w[0],y=w[1],N=(0,a.useState)(""),E=(0,h.Z)(N,2),I=E[0],F=E[1],k=(0,a.useState)(""),L=(0,h.Z)(k,2),P=L[0],B=L[1];(0,a.useEffect)((function(){if(""!==j){var e=j.split("-");B(e[0]),y(e[1]),F("".concat(parseInt(e[2])))}}),[j]),(0,a.useEffect)((function(){var e=function(e,n,t){var i=Date.parse("".concat(e,"-").concat(n,"-").concat(t));if(isNaN(i))return[!1,""];var o=parseInt(n),a=parseInt(t),r=o<10?"0".concat(o):o,s=a<10?"0".concat(a):a,c=new Date(i).toISOString().split("T")[0],l="".concat(e,"-").concat(r,"-").concat(s);return[c===l,l]}(P,T,I),n=(0,h.Z)(e,2),t=n[0],i=n[1];b(i,t)}),[T,I,P,b]);var D=function(){y(""),F(""),B("")},A=function(){return s||!!l&&!_};return(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:(0,oe.Z)(t.fieldContainer,(0,ie.Z)({},t.fieldContainerBorder,p)),children:[(0,O.jsx)("div",{className:t.labelContainer,children:(0,O.jsxs)(x.ZP,{container:!0,children:[(0,O.jsxs)(ae.Z,{htmlFor:i,className:t.inputLabel,children:[(0,O.jsx)("span",{children:o}),""!==u&&(0,O.jsx)("div",{className:t.tooltipContainer,children:(0,O.jsx)(re.Z,{title:u,placement:"top-start",children:(0,O.jsx)("div",{className:t.tooltip,children:(0,O.jsx)(f.byK,{})})})})]}),l&&(0,O.jsx)(ne.Z,{indicatorLabels:["Specific Date","Default (7 Days)"],checked:_,value:"date_enabled",id:"date-status",name:"date-status",onChange:function(e){S(e.target.checked),e.target.checked||b("",!0)},switchOnly:!0})]})}),(0,O.jsxs)("div",{children:[(0,O.jsx)(se.Z,{disabled:A(),className:t.dateInput,children:(0,O.jsxs)(ce.Z,{id:"".concat(i,"-month"),name:"".concat(i,"-month"),value:T,displayEmpty:!0,onChange:function(e){y(e.target.value)},input:(0,O.jsx)(de,{}),children:[(0,O.jsx)(M.Z,{value:"",disabled:!0,children:"<Month>"}),q.map((function(e){return(0,O.jsx)(M.Z,{value:e.value,children:e.label},"select-".concat(i,"-monthOP-").concat(e.label))}))]})}),(0,O.jsx)(se.Z,{disabled:A(),className:t.dateInput,children:(0,O.jsxs)(ce.Z,{id:"".concat(i,"-day"),name:"".concat(i,"-day"),value:I,displayEmpty:!0,onChange:function(e){F(e.target.value)},input:(0,O.jsx)(de,{}),children:[(0,O.jsx)(M.Z,{value:"",disabled:!0,children:"<Day>"}),$.map((function(e){return(0,O.jsx)(M.Z,{value:e,children:e},"select-".concat(i,"-dayOP-").concat(e))}))]})}),(0,O.jsx)(se.Z,{disabled:A(),className:t.dateInput,children:(0,O.jsxs)(ce.Z,{id:"".concat(i,"-year"),name:"".concat(i,"-year"),value:P,displayEmpty:!0,onChange:function(e){B(e.target.value)},input:(0,O.jsx)(de,{}),children:[(0,O.jsx)(M.Z,{value:"",disabled:!0,children:"<Year>"}),Q.map((function(e){return(0,O.jsx)(M.Z,{value:e,children:e},"select-".concat(i,"-yearOP-").concat(e))}))]})})]})]})})),he=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({dateInput:{"&:not(:last-child)":{marginRight:22}}},u.YI),u.Hr),{},{labelContainer:{flex:1},fieldContainer:(0,o.Z)((0,o.Z)({},u.YI.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),fieldContainerBorder:{borderBottom:"#9c9c9c 1px solid",marginBottom:20}}))}))(ue),me=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.DF),u.ID),u.bK),{},{dateSelector:{"& div":{borderBottom:0,marginBottom:0,"& div:nth-child(2)":{border:"1px solid #EAEAEA",paddingLeft:5,"& div":{border:0}}}}}))}))((function(e){var n=e.classes,t=e.open,i=e.closeModalAndRefresh,o=e.objectName,r=e.objectInfo,s=e.bucketName,c=(0,d.TL)(),l=(0,a.useState)(!0),u=(0,h.Z)(l,2),m=u[0],p=u[1],b=(0,a.useState)(""),v=(0,h.Z)(b,2),Z=v[0],_=v[1],S=(0,a.useState)(""),C=(0,h.Z)(S,2),w=C[0],T=C[1],y=(0,a.useState)(!1),N=(0,h.Z)(y,2),E=N[0],I=N[1],k=(0,a.useState)(!1),L=(0,h.Z)(k,2),P=L[0],B=L[1],D=(0,a.useState)(!1),A=(0,h.Z)(D,2),R=A[0],U=A[1];(0,a.useEffect)((function(){if(r.retention_mode&&(_(r.retention_mode.toLowerCase()),U(!0)),r.retention_until_date){var e=new Date(r.retention_until_date);if("Invalid Date"!==e.toString()){var n=e.getFullYear(),t=(o=e.getMonth()+1)<10?"0".concat(o):"".concat(o),i=e.getDate();isNaN(i)||"NaN"===t||isNaN(n)||T("".concat(n,"-").concat(t,"-").concat(i))}U(!0)}var o}),[r]);var M=(0,a.useRef)(null),z=function(){p(!1),_(""),M.current&&M.current.resetDate()},G=R&&("governance"===Z||""===Z);return(0,O.jsxs)(ee.Z,{title:"Set Retention Policy",modalOpen:t,onClose:function(){z(),i(!1)},children:[(0,O.jsxs)("div",{className:n.spacerBottom,children:[(0,O.jsx)("strong",{children:"Selected Object"}),": ",o]}),(0,O.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:[G&&(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,O.jsx)(ne.Z,{value:"status",id:"status",name:"status",checked:m,onChange:function(e){p(!m)},label:"Status",indicatorLabels:["Enabled","Disabled"]})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,O.jsx)(te.Z,{currentSelection:Z,id:"type",name:"type",label:"Type",disableOptions:!m||R&&""!==Z,onChange:function(e){_(e.target.value)},selectorOptions:[{label:"Governance",value:"governance"},{label:"Compliance",value:"compliance"}]})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:"".concat(n.dateSelector," "),children:(0,O.jsx)(he,{id:"date",label:"Date",disableOptions:!(m&&("governance"===Z||"compliance"===Z)),ref:M,value:w,borderBottom:!0,onDateChange:function(e,n){I(n),n&&T(e)}})}),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,O.jsx)(f.zxk,{id:"reset",type:"button",variant:"regular",onClick:z,label:"Reset"}),(0,O.jsx)(f.zxk,{id:"save",type:"submit",variant:"callAction",disabled:m&&""===Z||m&&!E||P,onClick:function(){B(!0);var e=r.name,n=r.version_id,t=m||"governance"!==Z?"".concat(w,"T23:59:59Z"):"";m||"governance"!==Z?function(e,n,t){j.Z.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/retention?prefix=").concat((0,g.LL)(e),"&version_id=").concat(n),{expires:t,mode:Z}).then((function(e){B(!1),i(!0)})).catch((function(e){c((0,F.zb)(e)),B(!1)}))}(e,n,t):function(e,n){j.Z.invoke("DELETE","/api/v1/buckets/".concat(s,"/objects/retention?prefix=").concat((0,g.LL)(e),"&version_id=").concat(n)).then((function(){B(!1),i(!0)})).catch((function(e){c((0,F.zb)(e)),B(!1)}))}(e,n)},label:"Save"})]})]})]})})),fe=t(51691),pe=t(23508),xe=t(9505),be=function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,i=e.selectedBucket,o=e.selectedObject,s=e.versioningInfo,c=e.selectedVersion,l=void 0===c?"":c,u=(0,d.TL)(),m=(0,xe.Z)((function(){return n(!0)}),(function(e){u((0,F.Ih)(e)),"Access Denied."===e.detailedError&&n(!0)})),p=(0,h.Z)(m,2),x=p[0],b=p[1],v=(0,a.useState)(!1),j=(0,h.Z)(v,2),Z=j[0],_=j[1],S=(0,a.useState)(!1),C=(0,h.Z)(S,2),w=C[0],T=C[1],y=(0,r.v9)((function(e){return e.objectBrowser.retentionConfig})),I=(0,N.F)([i],[E.Ft.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===y||void 0===y?void 0:y.mode);if(!o)return null;var k;return(0,O.jsx)(pe.Z,{title:"Delete Object",confirmText:"Delete",isOpen:t,titleIcon:(0,O.jsx)(f.NvT,{}),isLoading:x,onConfirm:function(){var e=(0,g.IO)(o).endsWith("/");b("DELETE","/api/v1/buckets/".concat(i,"/objects?path=").concat(o).concat(""!==l?"&version_id=".concat(l):"&recursive=".concat(e,"&all_versions=").concat(Z)).concat(w?"&bypass=true":""))},onClose:function(){return n(!1)},confirmationContent:(0,O.jsxs)(fe.Z,{sx:{width:"430px"},children:["Are you sure you want to delete: ",(0,O.jsx)("br",{}),(0,O.jsx)("b",{children:(0,g.IO)(o)})," ",""!==l?(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)("br",{}),(0,O.jsx)("br",{}),"Version ID:",(0,O.jsx)("br",{}),(0,O.jsx)("strong",{children:l})]}):"","? ",(0,O.jsx)("br",{}),(0,O.jsx)("br",{}),(k=null===s||void 0===s?void 0:s.Status,("Enabled"===k||"Suspended"===k)&&""===l&&(0,O.jsx)(a.Fragment,{children:(0,O.jsx)(ne.Z,{label:"Delete All Versions",indicatorLabels:["Yes","No"],checked:Z,value:"delete_versions",id:"delete-versions",name:"delete-versions",onChange:function(e){_(!Z)},description:""})})),I&&(Z||""!==l)&&(0,O.jsx)(a.Fragment,{children:(0,O.jsx)("div",{style:{marginTop:10},children:(0,O.jsx)(ne.Z,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:w,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:function(e){T(!w)},description:""})})}),Z&&(0,O.jsxs)(a.Fragment,{children:[(0,O.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,O.jsx)("br",{}),"This action is irreversible."]}),(0,O.jsx)("br",{}),"Are you sure you want to continue?"]})]})})},ve=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.DF),u.ID),u.bK))}))((function(e){var n=e.classes,t=e.open,i=e.closeModalAndRefresh,o=e.objectName,r=e.bucketName,s=e.actualInfo,c=(0,d.TL)(),l=(0,a.useState)(!1),u=(0,h.Z)(l,2),m=u[0],p=u[1],b=(0,a.useState)(!1),Z=(0,h.Z)(b,2),_=Z[0],S=Z[1],C=s.version_id;(0,a.useEffect)((function(){var e=v()(s,"legal_hold_status","OFF");p("ON"===e)}),[s]);var w=function(){p(!1)};return(0,O.jsxs)(ee.Z,{title:"Set Legal Hold",modalOpen:t,onClose:function(){w(),i(!1)},children:[(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.spacerBottom,children:["Object: ",r]}),(0,O.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),S(!0),j.Z.invoke("PUT","/api/v1/buckets/".concat(r,"/objects/legalhold?prefix=").concat((0,g.LL)(o),"&version_id=").concat(C),{status:m?"enabled":"disabled"}).then((function(){S(!1),i(!0)})).catch((function(e){c((0,F.zb)(e)),S(!1)}))}(e)},children:[(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,O.jsx)(ne.Z,{value:"legalhold",id:"legalhold",name:"legalhold",checked:m,onChange:function(e){p(!m)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"})}),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,O.jsx)(f.zxk,{id:"clear",type:"button",variant:"regular",onClick:w,label:"Clear"}),(0,O.jsx)(f.zxk,{id:"save",type:"submit",variant:"callAction",disabled:_,label:" Save"})]})]})]})})),je=t(78562),ge=t(79836),Ze=t(53382),_e=t(35855),Se=t(53994),Ce=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)({titleItem:{width:"35%"}},u.bK),u.$b))}))((function(e){var n=e.metaData,t=e.classes,i=e.linear,o=void 0!==i&&i,r=Object.keys(n);return o?(0,O.jsx)(a.Fragment,{children:r.map((function(e,i){var o=Array.isArray(n[e])?n[e].map(decodeURIComponent).join(", "):decodeURIComponent(n[e]);return(0,O.jsxs)(V.Z,{className:t.metadataLinear,children:[(0,O.jsx)("strong",{children:e}),(0,O.jsx)("br",{}),o]},"box-meta-".concat(e,"-").concat(i.toString()))}))}):(0,O.jsxs)(x.ZP,{container:!0,children:[(0,O.jsx)(x.ZP,{item:!0,xs:12,sx:{marginTop:"25px",marginBottom:"5px"},children:(0,O.jsx)("h3",{style:{marginTop:"0",marginBottom:"0"},children:"Object Metadata"})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,children:(0,O.jsx)(ge.Z,{className:t.table,"aria-label":"simple table",children:(0,O.jsx)(Ze.Z,{children:r.map((function(e,i){var o=Array.isArray(n[e])?n[e].map(decodeURIComponent).join(", "):decodeURIComponent(n[e]);return(0,O.jsxs)(_e.Z,{children:[(0,O.jsx)(Se.Z,{component:"th",scope:"row",className:t.titleItem,children:e}),(0,O.jsx)(Se.Z,{align:"right",children:o})]},"tRow-".concat(i.toString()))}))})})})]})})),we=t(45987),Te=t(36151),ye=["disabled","onClick","icon","label","classes"],Ne=(0,l.Z)((function(e){return(0,c.Z)({root:{padding:"0 15px",height:22,margin:0,color:"#5E5E5E",fontWeight:"normal",fontSize:14,whiteSpace:"nowrap",width:"100%",justifyContent:"flex-start","&:hover":{backgroundColor:"transparent",color:"#000"},"& .min-icon":{width:11},"&:disabled":{color:"#EBEBEB",borderColor:"#EBEBEB"}}})}))((function(e){var n=e.disabled,t=e.onClick,i=e.icon,a=e.label,r=e.classes,s=(0,we.Z)(e,ye);return(0,O.jsx)(Te.Z,(0,o.Z)((0,o.Z)({},s),{},{disabled:n,onClick:t,className:(0,oe.Z)(r.root,"noDefaultHeight"),startIcon:i,sx:{height:"initial"},children:(0,O.jsx)("span",{className:"buttonItem",children:a})}))})),Ee=(0,l.Z)((function(){return(0,c.Z)((0,o.Z)({},u.$b))}))((function(e){var n=e.items,t=e.classes,i=e.title;return(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)("div",{className:t.titleLabel,children:i}),(0,O.jsxs)("ul",{className:t.objectActions,children:[(0,O.jsx)("li",{children:"Actions:"}),n.map((function(e,n){return(0,O.jsx)("li",{children:(0,O.jsx)(K.Z,{tooltip:e.tooltip||"",children:(0,O.jsx)(Ne,{label:e.label,icon:e.icon,onClick:e.action,disabled:e.disabled})})},"action-element-".concat(n.toString()))}))]})]})})),Ie=t(37762),Fe=(0,l.Z)((function(e){return(0,c.Z)({fileName:{display:"flex",alignItems:"center","& .min-icon":{width:16,height:16,marginRight:4,minWidth:16,minHeight:16}},fileNameText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})}))((function(e){var n=e.classes,t=e.icon,i=e.strings;return(0,O.jsxs)("div",{className:n.fileName,children:[t,(0,O.jsx)("span",{className:n.fileNameText,children:i[i.length-1]})]})})),ke=[{icon:(0,O.jsx)(f.n9O,{}),extensions:["mp4","mov","avi","mpeg","mpg"]},{icon:(0,O.jsx)(f.mYf,{}),extensions:["mp3","m4a","aac"]},{icon:(0,O.jsx)(f.UU9,{}),extensions:["pdf"]},{icon:(0,O.jsx)(f.hjP,{}),extensions:["ppt","pptx"]},{icon:(0,O.jsx)(f.hz9,{}),extensions:["xls","xlsx"]},{icon:(0,O.jsx)(f.xDw,{}),extensions:["cer","crt","pem"]},{icon:(0,O.jsx)(f.jG9,{}),extensions:["html","xml","css","py","go","php","cpp","h","java"]},{icon:(0,O.jsx)(f.NqG,{}),extensions:["cfg","yaml"]},{icon:(0,O.jsx)(f.OkY,{}),extensions:["sql"]},{icon:(0,O.jsx)(f.ZAy,{}),extensions:["ttf","otf"]},{icon:(0,O.jsx)(f.p2x,{}),extensions:["doc","docx","txt","rtf"]},{icon:(0,O.jsx)(f.xhr,{}),extensions:["zip","rar","tar","gz"]},{icon:(0,O.jsx)(f.rtI,{}),extensions:["epub","mobi","azw","azw3"]},{icon:(0,O.jsx)(f.q$4,{}),extensions:["jpeg","jpg","gif","tiff","png","heic","dng"]}],Oe=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=e,i=(0,O.jsx)(f.MoH,{});e.endsWith("/")&&(i=(0,O.jsx)(f.BI,{}),t=e.slice(0,-1));for(var o=e.toLowerCase(),a=0,r=ke;a<r.length;a++){var s,c=r[a],l=(0,Ie.Z)(c.extensions);try{for(l.s();!(s=l.n()).done;){var d=s.value;o.endsWith(".".concat(d))&&(i=c.icon)}}catch(h){l.e(h)}finally{l.f()}}!e.endsWith("/")&&e.indexOf(".")<0&&(i=(0,O.jsx)(f.lrl,{}));var u=t.split("/");return n?i:(0,O.jsx)(Fe,{icon:i,strings:u})},Le=t(21435),Pe=t(81918),Be=t(29823),De=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({newTileHeader:{fontSize:18,fontWeight:"bold",color:"#000",margin:"35px 0",paddingBottom:15,display:"flex",alignItems:"center","& > svg":{marginRight:10}},tagsForLabel:{fontSize:16,margin:"20px 0 30px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"},currentTagsContainer:{fontSize:14,fontWeight:"normal"},noTagsForObject:{color:"#858585"},deleteTag:{color:"#C83B51",marginLeft:5}},u.DF),u.ID),u.bK))}))((function(e){var n=e.modalOpen,t=e.onCloseAndUpdate,i=e.bucketName,s=e.actualInfo,c=e.classes,l=(0,d.TL)(),u=(0,r.v9)(F.N5),m=(0,a.useState)(""),p=(0,h.Z)(m,2),b=p[0],Z=p[1],_=(0,a.useState)(""),S=(0,h.Z)(_,2),C=S[0],w=S[1],T=(0,a.useState)(!1),y=(0,h.Z)(T,2),I=y[0],k=y[1],L=(0,a.useState)(!1),P=(0,h.Z)(L,2),B=P[0],D=P[1],A=(0,a.useState)(""),R=(0,h.Z)(A,2),U=R[0],M=R[1],z=(0,a.useState)(""),G=(0,h.Z)(z,2),K=G[0],W=G[1],H=(0,g.LL)(s.name),J=s.tags,Y=Object.keys(J||{}),q=s.name.split("/").pop()||"",$=function(e){return(0,O.jsxs)("div",{className:c.tagsForLabel,children:["Tag",e?"s":""," for: ",(0,O.jsx)("strong",{children:q})]})};return(0,O.jsx)(a.Fragment,{children:(0,O.jsx)(ee.Z,{modalOpen:n,title:B?(0,O.jsx)("span",{style:{color:"#C83B51"},children:"Delete Tag"}):"Edit Tags",onClose:function(){t(!0)},titleIcon:B?(0,O.jsx)(f.dRf,{style:{fill:"#C83B51"}}):(0,O.jsx)(f.T0F,{}),children:B?(0,O.jsx)(a.Fragment,{children:(0,O.jsxs)(x.ZP,{container:!0,children:[$(!1),"Are you sure you want to delete the tag"," ",(0,O.jsxs)("b",{className:c.deleteTag,children:[U," : ",K]})," ","?",(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:[(0,O.jsx)(f.zxk,{id:"cancel",type:"button",variant:"regular",onClick:function(){M(""),W(""),D(!1)},label:"Cancel"}),(0,O.jsx)(f.zxk,{type:"submit",variant:"secondary",onClick:function(){var e=(0,o.Z)({},J);delete e[U];var n=u?s.version_id:"null";j.Z.invoke("PUT","/api/v1/buckets/".concat(i,"/objects/tags?prefix=").concat(H,"&version_id=").concat(n),{tags:e}).then((function(e){t(!0),k(!1)})).catch((function(e){l((0,F.zb)(e)),k(!1)}))},id:"deleteTag",label:"Delete Tag"})]})]})}):(0,O.jsxs)(x.ZP,{container:!0,children:[(0,O.jsx)(N.s,{scopes:[E.Ft.S3_GET_OBJECT_TAGGING,E.Ft.S3_GET_ACTIONS],resource:i,children:(0,O.jsxs)(V.Z,{sx:{display:"flex",flexFlow:"column",width:"100%"},children:[$(!0),(0,O.jsxs)("div",{className:c.currentTagsContainer,children:["Current Tags:",(0,O.jsx)("br",{}),0===Y.length?(0,O.jsx)("span",{className:c.noTagsForObject,children:"There are no tags for this object"}):(0,O.jsx)(a.Fragment,{}),(0,O.jsx)(V.Z,{sx:{marginTop:"5px",marginBottom:"15px"},children:Y.map((function(e,n){var t=v()(J,"".concat(e),"");return""!==t?(0,O.jsx)(N.s,{scopes:[E.Ft.S3_DELETE_OBJECT_TAGGING],resource:i,errorProps:{deleteIcon:null,onDelete:null},children:(0,O.jsx)(Pe.Z,{style:{textTransform:"none",marginRight:"5px",marginBottom:"5px"},size:"small",label:"".concat(e," : ").concat(t),color:"primary",deleteIcon:(0,O.jsx)(Be.Z,{}),onDelete:function(){!function(e,n){M(e),W(n),D(!0)}(e,t)}})},"chip-".concat(n)):null}))})]})]})}),(0,O.jsx)(N.s,{scopes:[E.Ft.S3_PUT_OBJECT_TAGGING,E.Ft.S3_PUT_ACTIONS],resource:i,errorProps:{disabled:!0,onClick:null},children:(0,O.jsxs)(x.ZP,{container:!0,children:[(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:c.newTileHeader,children:[(0,O.jsx)(f.OCT,{})," Add New Tag"]}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,O.jsx)(Le.Z,{value:b,label:"Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter Tag Key",onChange:function(e){Z(e.target.value)}})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,O.jsx)(Le.Z,{value:C,label:"Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter Tag Label",onChange:function(e){w(e.target.value)}})}),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:[(0,O.jsx)(f.zxk,{id:"clear",type:"button",variant:"regular",color:"primary",onClick:function(){w(""),Z("")},label:"Clear"}),(0,O.jsx)(f.zxk,{type:"submit",variant:"callAction",disabled:""===C.trim()||""===b.trim()||I,onClick:function(){k(!0);var e={};e[b]=C;var n=(0,o.Z)((0,o.Z)({},J),e),a=u?s.version_id:"null";j.Z.invoke("PUT","/api/v1/buckets/".concat(i,"/objects/tags?prefix=").concat(H,"&version_id=").concat(a),{tags:n}).then((function(e){t(!0),k(!1)})).catch((function(e){l((0,F.zb)(e)),k(!1)}))},id:"saveTag",label:"Save"})]})]})})]})})})})),Ae=t(74165),Re=t(15861),Ue=t(73669),Me=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.DF),u.ID),u.bK))}))((function(e){var n=e.classes,t=e.closeInspectModalAndRefresh,i=e.inspectOpen,o=e.inspectPath,r=e.volumeName,s=(0,d.TL)(),c=function(){return t(!1)},l=(0,a.useState)(!0),u=(0,h.Z)(l,2),m=u[0],p=u[1],b=(0,a.useState)(""),v=(0,h.Z)(b,2),j=v[0],Z=v[1],_=(0,a.useState)(""),S=(0,h.Z)(_,2),C=S[0],w=S[1];if(!o)return null;var T=function(){var e=(0,Re.Z)((0,Ae.Z)().mark((function e(n){return(0,Ae.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(n,{method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),y=function(){var e=(0,Re.Z)((0,Ae.Z)().mark((function e(){var n,t,i;return(0,Ae.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(0,g.LL)(o+"/xl.meta"),t=(0,g.LL)(r),i="/api/v1/admin/inspect?volume=".concat(t,"&file=").concat(n,"&encrypt=").concat(m),T(i).then(function(){var e=(0,Re.Z)((0,Ae.Z)().mark((function e(n){var t,i,o,a;return(0,Ae.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.ok){e.next=5;break}return e.next=3,n.json();case 3:t=e.sent,s((0,F.Ih)({errorMessage:t.message,detailedError:t.code}));case 5:return e.next=7,n.blob();case 7:if(i=e.sent,o=n.headers.get("content-disposition").split('"')[1],a=(0,g.Do)(o)||"",(0,g.zZ)(i,o),w(o),""!==a){e.next=15;break}return c(),e.abrupt("return");case 15:Z(a);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()).catch((function(e){s((0,F.Ih)(e))}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,O.jsxs)(a.Fragment,{children:[!j&&(0,O.jsx)(ee.Z,{modalOpen:i,titleIcon:(0,O.jsx)(f.Gp8,{}),title:"Inspect Object",onClose:c,children:(0,O.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:["Would you like to encrypt ",(0,O.jsx)("b",{children:(0,g.IO)(o)}),"?"," ",(0,O.jsx)("br",{}),(0,O.jsx)(ne.Z,{label:"Encrypt",indicatorLabels:["Yes","No"],checked:m,value:"encrypt",id:"encrypt",name:"encrypt",onChange:function(e){p(!m)},description:""}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:(0,O.jsx)(f.zxk,{id:"inspect",type:"submit",variant:"callAction",color:"primary",onClick:y,label:"Inspect"})})]})}),j?(0,O.jsx)(ee.Z,{modalOpen:i,title:"Inspect Decryption Key",onClose:function(){(0,g.kT)(C),c(),Z("")},titleIcon:(0,O.jsx)(f.tvm,{}),children:(0,O.jsxs)(fe.Z,{children:[(0,O.jsxs)(V.Z,{children:["This will be displayed only once. It cannot be recovered.",(0,O.jsx)("br",{}),"Use secure medium to share this key."]}),(0,O.jsx)(V.Z,{children:(0,O.jsx)(Ue.Z,{value:j})})]})}):null]})})),ze=t(76610),Ge=(0,w.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.ID),u.DF),u.bK),u.Bz))})),Ke=function(e){var n=e.open,t=e.closeModal,i=e.currentItem,o=e.internalPaths,r=e.actualInfo,s=e.bucketName,c=Ge(),l=(0,d.TL)(),u=(0,a.useState)(i),m=(0,h.Z)(u,2),p=m[0],b=m[1],v=(0,a.useState)(!1),j=(0,h.Z)(v,2),Z=j[0],_=j[1];return(0,O.jsxs)(ee.Z,{title:"Rename Download",modalOpen:n,onClose:t,titleIcon:(0,O.jsx)(f.dY8,{}),children:[(0,O.jsxs)("div",{children:["The file you are trying to download has a long name.",(0,O.jsx)("br",{}),"This can cause issues on Windows Systems by trimming the file name after download.",(0,O.jsx)("br",{}),(0,O.jsx)("br",{})," We recommend to rename the file download"]}),(0,O.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault();var n=(0,g.LL)("".concat(s,"-").concat(r.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),i=(0,ze.YO)(8),a=(0,D.LR)(s,o,r.version_id,parseInt(r.size||"0"),p,i,(function(e){l((0,k.RO)({instanceID:n,progress:e}))}),(function(){l((0,k.oK)(n))}),(function(e){l((0,k.qJ)({instanceID:n,msg:e}))}),(function(){l((0,k.Im)(n))}));(0,ze.EN)(i,a),l((0,k.Mc)({ID:i,bucketName:s,done:!1,instanceID:n,percentage:0,prefix:p,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""})),t()}(e)},children:(0,O.jsxs)(x.ZP,{container:!0,children:[(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:c.modalFormScrollable,children:[(0,O.jsx)(x.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,O.jsx)(Le.Z,{id:"download-filename",name:"download-filename",onChange:function(e){b(e.target.value)},label:"",type:"text",value:p,error:p.length>200&&!Z?"Filename should be less than 200 characters long.":""})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,O.jsx)(ne.Z,{value:"acceptLongName",id:"acceptLongName",name:"acceptLongName",checked:Z,onChange:function(e){_(e.target.checked),e.target.checked&&b(i)},label:"Use Original Name"})})]}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:(0,O.jsx)(f.zxk,{id:"download-file",type:"submit",variant:"callAction",color:"primary",disabled:p.length>200&&!Z,label:"Download File"})})]})})]})},We=function(e,n,t,i){var o=(0,g.LL)("".concat(n,"-").concat(i.name,"-").concat((new Date).getTime(),"-").concat(Math.random()));if(i.name.length>200&&(0,g.mv)().toLowerCase().includes("win"))e((0,k.Hg)(!0));else{var a=(0,ze.YO)(8),r=(0,D.LR)(n,t,i.version_id,parseInt(i.size||"0"),null,a,(function(n){e((0,k.RO)({instanceID:o,progress:n}))}),(function(){e((0,k.oK)(o))}),(function(n){e((0,k.qJ)({instanceID:o,msg:n}))}),(function(){e((0,k.Im)(o))}));(0,ze.EN)(a,r),e((0,k.Mc)({ID:a,bucketName:n,done:!1,instanceID:o,percentage:0,prefix:i.name,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))}},He={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},Je=(0,l.Z)((function(){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({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},headerForSection:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:15,borderBottom:"#E2E2E2 2px solid",fontWeight:"bold",fontSize:18,color:"#000",margin:"20px 22px"},capitalizeFirst:{textTransform:"capitalize"}},u.OR),u.bK),u.VI),u.$b))}))((function(e){var n=e.classes,t=e.internalPaths,i=e.bucketName,s=e.versioningInfo,c=e.locking,l=e.onClosePanel,u=(0,d.TL)(),m=(0,r.v9)(F.N5),p=(0,r.v9)((function(e){return e.objectBrowser.versionsMode})),b=(0,r.v9)((function(e){return e.objectBrowser.selectedVersion})),Z=(0,r.v9)((function(e){return e.objectBrowser.loadingObjectInfo})),_=(0,r.v9)((function(e){return e.system.overrideStyles})),S=(0,a.useState)(!1),C=(0,h.Z)(S,2),w=C[0],T=C[1],y=(0,a.useState)(!1),I=(0,h.Z)(y,2),L=I[0],P=I[1],B=(0,a.useState)(!1),A=(0,h.Z)(B,2),R=A[0],U=A[1],M=(0,a.useState)(!1),z=(0,h.Z)(M,2),G=z[0],W=z[1],H=(0,a.useState)(!1),J=(0,h.Z)(H,2),q=J[0],$=J[1],X=(0,a.useState)(null),Q=(0,h.Z)(X,2),ee=Q[0],ne=Q[1],te=(0,a.useState)([]),ie=(0,h.Z)(te,2),oe=ie[0],ae=ie[1],re=(0,a.useState)(null),se=(0,h.Z)(re,2),ce=se[0],le=se[1],de=(0,a.useState)([]),ue=(0,h.Z)(de,2),he=ue[0],fe=ue[1],pe=(0,a.useState)(!1),xe=(0,h.Z)(pe,2),ge=xe[0],Ze=xe[1],_e=(0,a.useState)(!1),Se=(0,h.Z)(_e,2),we=Se[0],Te=Se[1],ye=(0,a.useState)(0),Ne=(0,h.Z)(ye,2),Ie=Ne[0],Fe=Ne[1],ke=(0,a.useState)(!1),Le=(0,h.Z)(ke,2),Pe=Le[0],Be=Le[1],Ae=(0,a.useState)(null),Re=(0,h.Z)(Ae,2),Ue=Re[0],ze=Re[1],Ge=(0,a.useState)(!1),Je=(0,h.Z)(Ge,2),Ve=Je[0],Ye=Je[1],qe=((0,g.IO)(t)||"").split("/").pop()||"",$e=[];ee&&($e=ee.name.split("/")),(0,a.useEffect)((function(){if(m&&oe&&oe.length>=1){var e=oe.find((function(e){return e.is_latest}))||He;""!==b&&(e=oe.find((function(e){return e.version_id===b}))||He),e.is_delete_marker||Ye(!0),ne(e)}}),[b,m,oe]),(0,a.useEffect)((function(){Z&&""!==t&&j.Z.invoke("GET","/api/v1/buckets/".concat(i,"/objects?prefix=").concat(t).concat(m?"&with_versions=true":"")).then((function(e){var n=e.objects||[];if(m){ae(n),fe(n);var t=n.reduce((function(e,n){return null!==n&&void 0!==n&&n.size?e+parseInt(n.size):e}),0);Fe(t)}else{var i=n[0];ne(i),fe([]),i.is_delete_marker||Ye(!0)}u((0,k.vH)(!1))})).catch((function(e){console.error("Error loading object details",e),u((0,k.vH)(!1))}))}),[Z,i,t,u,m,b]),(0,a.useEffect)((function(){Ve&&""!==t&&j.Z.invoke("GET","/api/v1/buckets/".concat(i,"/objects/metadata?prefix=").concat(t)).then((function(e){var n=v()(e,"objectMetadata",{});ze(n),Ye(!1)})).catch((function(e){console.error("Error Getting Metadata Status: ",e.detailedError),Ye(!1)}))}),[i,t,Ve]);var Xe=[];ee&&ee.tags&&(Xe=Object.keys(ee.tags));var Qe=(0,O.jsx)("div",{style:{textAlign:"center",marginTop:35},children:(0,O.jsx)(f.aNw,{})});if(!ee)return Z?Qe:null;var en=$e.length>0?$e[$e.length-1]:ee.name,nn=[i,qe,[i,ee.name].join("/")],tn=(0,N.F)(i,[E.Ft.S3_PUT_OBJECT_LEGAL_HOLD,E.Ft.S3_PUT_ACTIONS]),on=(0,N.F)(nn,[E.Ft.S3_PUT_OBJECT_TAGGING,E.Ft.S3_PUT_ACTIONS]),an=(0,N.F)(nn,[E.Ft.S3_GET_OBJECT_RETENTION,E.Ft.S3_PUT_OBJECT_RETENTION,E.Ft.S3_GET_ACTIONS,E.Ft.S3_PUT_ACTIONS],!0),rn=(0,N.F)(nn,[E.Ft.ADMIN_INSPECT_DATA]),sn=(0,N.F)(nn,[E.Ft.S3_GET_BUCKET_VERSIONING,E.Ft.S3_PUT_BUCKET_VERSIONING,E.Ft.S3_GET_OBJECT_VERSION,E.Ft.S3_GET_ACTIONS,E.Ft.S3_PUT_ACTIONS]),cn=(0,N.F)(nn,[E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS]),ln=(0,N.F)([i,qe,[i,ee.name].join("/")],[E.Ft.S3_DELETE_OBJECT]),dn=[{action:function(){We(u,i,t,ee)},label:"Download",disabled:!!ee.is_delete_marker||!cn,icon:(0,O.jsx)(f._8t,{}),tooltip:cn?"Download this Object":(0,E.MK)([E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS],"download this object")},{action:function(){T(!0)},label:"Share",disabled:!!ee.is_delete_marker||!cn,icon:(0,O.jsx)(f.aAc,{}),tooltip:cn?"Share this File":(0,E.MK)([E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS],"share this object")},{action:function(){Te(!0)},label:"Preview",disabled:!!ee.is_delete_marker||"none"===(0,D.Bg)(qe)||!cn,icon:(0,O.jsx)(f.P99,{}),tooltip:cn?"Preview this File":(0,E.MK)([E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS],"preview this object")},{action:function(){W(!0)},label:"Legal Hold",disabled:!c||!m||!!ee.is_delete_marker||!tn||""!==b,icon:(0,O.jsx)(f.fNL,{}),tooltip:tn?c?"Change Legal Hold rules for this File":"Object Locking must be enabled on this bucket in order to set Legal Hold":(0,E.MK)([E.Ft.S3_PUT_OBJECT_LEGAL_HOLD,E.Ft.S3_PUT_ACTIONS],"change legal hold settings for this object")},{action:function(){P(!0)},label:"Retention",disabled:!m||!!ee.is_delete_marker||!an||""!==b||!c,icon:(0,O.jsx)(f.E9d,{}),tooltip:an?c?"Change Retention rules for this File":"Object Locking must be enabled on this bucket in order to set Retention Rules":(0,E.MK)([E.Ft.S3_GET_OBJECT_RETENTION,E.Ft.S3_PUT_OBJECT_RETENTION,E.Ft.S3_GET_ACTIONS,E.Ft.S3_PUT_ACTIONS],"change Retention Rules for this object")},{action:function(){U(!0)},label:"Tags",disabled:!!ee.is_delete_marker||""!==b||!on,icon:(0,O.jsx)(f.DgT,{}),tooltip:on?"Change Tags for this File":(0,E.MK)([E.Ft.S3_PUT_OBJECT_TAGGING,E.Ft.S3_GET_OBJECT_TAGGING,E.Ft.S3_GET_ACTIONS,E.Ft.S3_PUT_ACTIONS],"set Tags on this object")},{action:function(){$(!0)},label:"Inspect",disabled:!m||!!ee.is_delete_marker||""!==b||!rn,icon:(0,O.jsx)(f.Gp8,{}),tooltip:rn?"Inspect this file":(0,E.MK)([E.Ft.ADMIN_INSPECT_DATA],"inspect this file")},{action:function(){u((0,k.db)({status:!p,objectName:en}))},label:p?"Hide Object Versions":"Display Object Versions",icon:(0,O.jsx)(f.cRd,{}),disabled:!m||!(ee.version_id&&"null"!==ee.version_id)||!sn,tooltip:sn?ee.version_id&&"null"!==ee.version_id?"Display Versions for this file":"":(0,E.MK)([E.Ft.S3_GET_BUCKET_VERSIONING,E.Ft.S3_PUT_BUCKET_VERSIONING,E.Ft.S3_GET_OBJECT_VERSION,E.Ft.S3_GET_ACTIONS,E.Ft.S3_PUT_ACTIONS],"display all versions of this object")}],un={};return _&&(un={backgroundColor:"transparent"}),(0,O.jsxs)(a.Fragment,{children:[w&&ee&&(0,O.jsx)(Y.default,{open:w,closeModalAndRefresh:function(){le(null),T(!1)},bucketName:i,dataObject:ce||ee}),L&&ee&&(0,O.jsx)(me,{open:L,closeModalAndRefresh:function(e){P(!1),e&&u((0,k.vH)(!0))},objectName:qe,objectInfo:ee,bucketName:i}),ge&&(0,O.jsx)(be,{deleteOpen:ge,selectedBucket:i,selectedObject:t,closeDeleteModalAndRefresh:function(e){Ze(!1),e&&""===b?l(!0):(u((0,k.Eq)(!0)),u((0,k.M3)("")),u((0,k.vH)(!0)))},versioningInfo:m?s:void 0,selectedVersion:b}),G&&ee&&(0,O.jsx)(ve,{open:G,closeModalAndRefresh:function(e){W(!1),e&&u((0,k.vH)(!0))},objectName:ee.name,bucketName:i,actualInfo:ee}),we&&ee&&(0,O.jsx)(je.default,{open:we,bucketName:i,object:{name:ee.name,version_id:ee.version_id||"null",size:parseInt(ee.size||"0"),content_type:"",last_modified:ee.last_modified},onClosePreview:function(){Te(!1)}}),R&&ee&&(0,O.jsx)(De,{modalOpen:R,bucketName:i,actualInfo:ee,onCloseAndUpdate:function(e){U(!1),e&&u((0,k.vH)(!0))}}),q&&ee&&(0,O.jsx)(Me,{inspectOpen:q,volumeName:i,inspectPath:ee.name,closeInspectModalAndRefresh:function(e){$(!1),e&&u((0,k.vH)(!0))}}),Pe&&ee&&(0,O.jsx)(Ke,{open:Pe,closeModal:function(){Be(!1)},currentItem:qe,bucketName:i,internalPaths:t,actualInfo:ee}),Z?(0,O.jsx)(a.Fragment,{children:Qe}):(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)(Ee,{title:(0,O.jsxs)("div",{className:n.ObjectDetailsTitle,children:[Oe(en,!0),(0,O.jsx)("span",{className:n.objectNameContainer,children:en})]}),items:dn}),(0,O.jsx)(K.Z,{tooltip:ln?"":(0,E.MK)([E.Ft.S3_DELETE_OBJECT],"delete this object"),children:(0,O.jsx)(x.ZP,{item:!0,xs:12,sx:{justifyContent:"center",display:"flex"},children:(0,O.jsx)(N.s,{resource:[i,qe,[i,ee.name].join("/")],scopes:[E.Ft.S3_DELETE_OBJECT],errorProps:{disabled:!0},children:(0,O.jsx)(f.zxk,{id:"delete-element-click",icon:(0,O.jsx)(f.pJl,{}),iconLocation:"start",fullWidth:!0,variant:"secondary",onClick:function(){Ze(!0)},disabled:""===b&&ee.is_delete_marker,sx:(0,o.Z)({width:"calc(100% - 44px)",margin:"8px 0"},un),label:"Delete".concat(""!==b?" version":"")})})})}),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.headerForSection,children:[(0,O.jsx)("span",{children:"Object Info"}),(0,O.jsx)(f.Gvh,{})]}),(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"Name:"}),(0,O.jsx)("br",{}),(0,O.jsx)("div",{style:{overflowWrap:"break-word"},children:en})]}),""!==b&&(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"Version ID:"}),(0,O.jsx)("br",{}),b]}),(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"Size:"}),(0,O.jsx)("br",{}),(0,g.ae)(ee.size||"0")]}),ee.version_id&&"null"!==ee.version_id&&""===b&&(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"Versions:"}),(0,O.jsx)("br",{}),he.length," version",1!==he.length?"s":"",","," ",(0,g.l5)(Ie)]}),""===b&&(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"Last Modified:"}),(0,O.jsx)("br",{}),function(e){var n=new Date,t=new Date(e),i=n.getTime()-t.getTime(),o=(0,g.nF)(i,"ms");return""!==o.trim()?"".concat(o," ago"):"Just now"}(ee.last_modified)]}),(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"ETAG:"}),(0,O.jsx)("br",{}),ee.etag||"N/A"]}),(0,O.jsxs)(V.Z,{className:n.detailContainer,children:[(0,O.jsx)("strong",{children:"Tags:"}),(0,O.jsx)("br",{}),0===Xe.length?"N/A":Xe.map((function(e,n){return(0,O.jsxs)("span",{children:[e,":",v()(ee,"tags.".concat(e),""),n<Xe.length-1?", ":""]},"key-vs-".concat(n.toString()))}))]}),(0,O.jsx)(V.Z,{className:n.detailContainer,children:(0,O.jsx)(N.s,{scopes:[E.Ft.S3_GET_OBJECT_LEGAL_HOLD,E.Ft.S3_GET_ACTIONS],resource:i,children:(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)("strong",{children:"Legal Hold:"}),(0,O.jsx)("br",{}),ee.legal_hold_status?"On":"Off"]})})}),(0,O.jsx)(V.Z,{className:n.detailContainer,children:(0,O.jsx)(N.s,{scopes:[E.Ft.S3_GET_OBJECT_RETENTION,E.Ft.S3_GET_ACTIONS],resource:i,children:(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)("strong",{children:"Retention Policy:"}),(0,O.jsx)("br",{}),(0,O.jsx)("span",{className:n.capitalizeFirst,children:(ee.version_id&&ee.version_id,(0,O.jsx)(a.Fragment,{children:ee.retention_mode?ee.retention_mode.toLowerCase():"None"}))})]})})}),!ee.is_delete_marker&&(0,O.jsxs)(a.Fragment,{children:[(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.headerForSection,children:[(0,O.jsx)("span",{children:"Metadata"}),(0,O.jsx)(f.fRO,{})]}),(0,O.jsx)(V.Z,{className:n.detailContainer,children:ee&&Ue?(0,O.jsx)(Ce,{metaData:Ue,linear:!0}):null})]})]})]})})),Ve=t(40986),Ye=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)({},u.oO))}))((function(e){var n=e.classes,t=e.versionToRestore,i=e.bucketName,o=e.objectPath,r=e.restoreOpen,s=e.onCloseAndUpdate,c=(0,d.TL)(),l=(0,a.useState)(!1),u=(0,h.Z)(l,2),m=u[0],p=u[1];return(0,O.jsx)(pe.Z,{title:"Restore File Version",confirmText:"Restore",isOpen:r,isLoading:m,titleIcon:(0,O.jsx)(f.D7Y,{}),onConfirm:function(){p(!0),j.Z.invoke("PUT","/api/v1/buckets/".concat(i,"/objects/restore?prefix=").concat((0,g.LL)(o),"&version_id=").concat(t.version_id)).then((function(e){console.log("REStORE",e),p(!1),s(!0),c((0,k.rI)({prefix:o,objectInfo:t}))})).catch((function(e){c((0,F.Ih)(e)),p(!1)}))},confirmButtonProps:{variant:"secondary",disabled:m},onClose:function(){s(!1)},confirmationContent:(0,O.jsxs)(fe.Z,{id:"alert-dialog-description",children:["Are you sure you want to restore ",(0,O.jsx)("br",{}),(0,O.jsx)("b",{children:o})," ",(0,O.jsx)("br",{})," with Version ID:",(0,O.jsx)("br",{}),(0,O.jsx)("b",{className:n.wrapText,children:t.version_id}),"?"]})})})),qe=function(e){var n="#000",t="";switch(e.type){case"null":n="#07193E",t="NULL VERSION";break;case"deleted":n="#868686",t="DELETED";break;default:n="#174551",t="CURRENT VERSION"}return(0,O.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:t})},$e=t(34866),Xe=(0,l.Z)((function(e){return(0,c.Z)({mainFileVersionItem:{borderBottom:"#E2E2E2 1px solid",padding:"1rem 0",margin:"0 0.5rem 0 2.5rem",cursor:"pointer","&.deleted":{color:"#868686"},"@media (max-width: 799px)":{padding:"5px 0px",margin:0}},intermediateLayer:{margin:"0 1.5rem 0 1.5rem","&:hover, &.selected":{backgroundColor:"#F8F8F8","& > div":{borderBottomColor:"#F8F8F8"}},"@media (max-width: 799px)":{margin:0,"&:hover, &.selected":{backgroundColor:"transparent","& > div":{borderBottomColor:"#E2E2E2"}}}},versionContainer:{fontSize:16,fontWeight:"bold",display:"flex",alignItems:"center","& svg.min-icon":{width:18,height:18,minWidth:18,minHeight:18,marginRight:10},"@media (max-width: 799px)":{fontSize:14,"& svg.min-icon":{display:"none"}}},buttonContainer:{textAlign:"right","& button":{marginLeft:"1.5rem"},"@media (max-width: 600px)":{"& button":{marginLeft:"5px"}}},versionID:{fontSize:"12px",margin:"2px 0",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden"},versionData:{marginRight:"10px",fontSize:12,color:"#868686","@media (max-width: 799px)":{textOverflow:"ellipsis",maxWidth:"95%",overflow:"hidden",whiteSpace:"nowrap"}},ctrItem:{position:"relative","&::before":{content:"' '",display:"block",position:"absolute",width:"2px",height:"calc(100% + 2px)",backgroundColor:"#F8F8F8",left:"24px"},"@media (max-width: 799px)":{"&::before":{display:"none"}}},collapsableInfo:{"@media (max-width: 799px)":{display:"flex",flexDirection:"column"}},versionItem:{"@media (max-width: 799px)":{display:"none"}}})}))((function(e){var n=e.classes,t=e.fileName,i=e.versionInfo,o=e.isSelected,a=e.checkable,r=e.isChecked,s=e.onCheck,c=e.onShare,l=e.onDownload,d=e.onRestore,u=e.onPreview,h=e.globalClick,m=e.index,b=e.key,v=e.style,j=i.is_delete_marker,Z=[{icon:(0,O.jsx)(f.P99,{}),action:u,tooltip:"Preview"},{icon:(0,O.jsx)(f._8t,{}),action:l,tooltip:"Download this version"},{icon:(0,O.jsx)(f.aAc,{}),action:c,tooltip:"Share this version"},{icon:(0,O.jsx)(f.D7Y,{}),action:d,tooltip:"Restore this version"}],_=null;i.is_delete_marker?_="deleted":i.is_latest?_="current":"null"===i.version_id&&(_="null");var S=p.ou.now();return i.last_modified&&(S=p.ou.fromISO(i.last_modified)),(0,O.jsx)(x.ZP,{container:!0,flex:1,className:n.ctrItem,onClick:function(){h(i)},style:v,children:(0,O.jsx)(x.ZP,{item:!0,xs:12,className:"".concat(n.intermediateLayer," ").concat(o?"selected":""),children:(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:"".concat(n.mainFileVersionItem," ").concat(i.is_delete_marker?"deleted":""),children:[(0,O.jsx)(x.ZP,{item:!0,xs:12,justifyContent:"space-between",children:(0,O.jsxs)(x.ZP,{container:!0,children:[(0,O.jsxs)(x.ZP,{item:!0,xs:!0,md:4,className:n.versionContainer,children:[a&&(0,O.jsx)($e.Z,{checked:r,id:"select-".concat(i.version_id),label:"",name:"select-".concat(i.version_id),onChange:function(e){e.stopPropagation(),e.preventDefault(),s(i.version_id||"")},value:i.version_id||"",disabled:i.is_delete_marker,overrideCheckboxStyles:{paddingLeft:0,height:34,width:25},noTopMargin:!0}),Oe(t,!0)," v",m.toString(),(0,O.jsx)("span",{className:n.versionItem,children:_&&(0,O.jsx)(qe,{type:_})})]}),(0,O.jsx)(x.ZP,{item:!0,xs:10,md:8,className:n.buttonContainer,children:Z.map((function(e,t){return(0,O.jsx)(re.Z,{title:e.tooltip,children:(0,O.jsx)(y.Z,{size:"small",id:"version-action-".concat(e.tooltip,"-").concat(t.toString()),className:"".concat(n.spacing," ").concat(j?n.buttonDisabled:""),disabled:j,onClick:function(n){n.stopPropagation(),j?n.preventDefault():e.action(i)},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,O.jsx)(x.ZP,{item:!0,xs:12,className:n.versionID,children:"null"!==i.version_id?i.version_id:"-"}),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.collapsableInfo,children:[(0,O.jsxs)("span",{className:n.versionData,children:[(0,O.jsx)("strong",{children:"Last modified:"})," ",S.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)")]}),(0,O.jsxs)("span",{className:n.versionData,children:[(0,O.jsx)("strong",{children:"Size:"})," ",(0,g.ae)(i.size||"0")]})]})]})})},b)})),Qe=t(90673),en=function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,i=e.selectedBucket,o=e.selectedObject,s=(0,d.TL)(),c=(0,a.useState)(!1),l=(0,h.Z)(c,2),u=l[0],m=l[1],p=(0,a.useState)(""),b=(0,h.Z)(p,2),v=b[0],Z=b[1],_=(0,a.useState)(!1),S=(0,h.Z)(_,2),C=S[0],w=S[1],T=(0,r.v9)((function(e){return e.objectBrowser.retentionConfig})),y=(0,N.F)([i],[E.Ft.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===T||void 0===T?void 0:T.mode);if((0,a.useEffect)((function(){u&&j.Z.invoke("DELETE","/api/v1/buckets/".concat(i,"/objects?path=").concat(o,"&non_current_versions=true").concat(C?"&bypass=true":"")).then((function(){n(!0)})).catch((function(e){s((0,F.Ih)(e)),m(!1)}))}),[u,n,s,o,i,C]),!o)return null;return(0,O.jsx)(pe.Z,{title:"Delete Non-Current versions",confirmText:"Delete",isOpen:t,titleIcon:(0,O.jsx)(f.NvT,{}),isLoading:u,onConfirm:function(){m(!0)},onClose:function(){return n(!1)},confirmButtonProps:{disabled:"YES, PROCEED"!==v||u},confirmationContent:(0,O.jsxs)(fe.Z,{children:["Are you sure you want to delete all the non-current versions for:"," ",(0,O.jsx)("b",{children:(0,g.IO)(o)}),"? ",(0,O.jsx)("br",{}),y&&(0,O.jsx)(a.Fragment,{children:(0,O.jsx)("div",{style:{marginTop:10},children:(0,O.jsx)(ne.Z,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:C,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:function(e){w(!C)},description:""})})}),(0,O.jsx)("br",{}),"To continue please type ",(0,O.jsx)("b",{children:"YES, PROCEED"})," in the box.",(0,O.jsx)(x.ZP,{item:!0,xs:12,children:(0,O.jsx)(Le.Z,{id:"type-confirm",name:"retype-tenant",onChange:function(e){Z(e.target.value)},label:"",value:v})})]})})},nn=function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,i=e.selectedBucket,o=e.selectedVersions,s=e.selectedObject,c=(0,d.TL)(),l=(0,a.useState)(!1),u=(0,h.Z)(l,2),m=u[0],p=u[1],x=(0,a.useState)(!1),b=(0,h.Z)(x,2),v=b[0],g=b[1],Z=(0,r.v9)((function(e){return e.objectBrowser.retentionConfig})),_=(0,N.F)([i],[E.Ft.S3_BYPASS_GOVERNANCE_RETENTION])&&"governance"===(null===Z||void 0===Z?void 0:Z.mode);return(0,a.useEffect)((function(){if(m){var e=o.map((function(e){return{path:s,versionID:e,recursive:!1}}));e.length>0&&j.Z.invoke("POST","/api/v1/buckets/".concat(i,"/delete-objects?all_versions=false").concat(v?"&bypass=true":""),e).then((function(){p(!1),n(!0)})).catch((function(e){c((0,F.Ih)(e)),p(!1)}))}}),[m,n,i,s,o,v,c]),o?(0,O.jsx)(pe.Z,{title:"Delete Selected Versions",confirmText:"Delete",isOpen:t,titleIcon:(0,O.jsx)(f.NvT,{}),isLoading:m,onConfirm:function(){p(!0)},onClose:function(){return n(!1)},confirmationContent:(0,O.jsxs)(fe.Z,{children:["Are you sure you want to delete the selected ",o.length," ","versions for ",(0,O.jsx)("strong",{children:s}),"?",_&&(0,O.jsx)(a.Fragment,{children:(0,O.jsx)("div",{style:{marginTop:10},children:(0,O.jsx)(ne.Z,{label:"Bypass Governance Mode",indicatorLabels:["Yes","No"],checked:v,value:"bypass_governance",id:"bypass_governance",name:"bypass_governance",onChange:function(e){g(!v)},description:""})})})]})}):null},tn=t(5171),on={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},an=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({versionsContainer:{padding:10,"@media (max-width: 799px)":{minHeight:800}},noBottomBorder:{borderBottom:0},versionsVirtualPanel:{flexGrow:1,height:"calc(100% - 120px)",overflow:"auto","@media (max-width: 799px)":{height:600}},screenTitleContainer:{position:"relative","&::before":{content:"' '",display:"block",position:"absolute",width:"2px",backgroundColor:"#F8F8F8",left:"24px",height:"40px",bottom:0},"@media (max-width: 799px)":{"&::before":{display:"none"}}},sortByLabel:{color:"#838383",fontWeight:"bold",whiteSpace:"nowrap",marginRight:12,fontSize:14,"@media (max-width: 600px)":{display:"none"}}},u.OR),u.VX),u.bK),u.VI),u.cx),u.C4),u.Bz))}))((function(e){var n=e.classes,t=e.internalPaths,i=e.bucketName,o=(0,d.TL)(),s=(0,r.v9)((function(e){return e.objectBrowser.searchVersions})),c=(0,r.v9)((function(e){return e.objectBrowser.loadingVersions})),l=(0,r.v9)((function(e){return e.objectBrowser.selectedVersion})),u=(0,r.v9)(F.N5),m=(0,a.useState)(!1),p=(0,h.Z)(m,2),b=p[0],Z=p[1],S=(0,a.useState)(null),C=(0,h.Z)(S,2),w=C[0],T=C[1],y=(0,a.useState)(null),N=(0,h.Z)(y,2),E=N[0],I=N[1],L=(0,a.useState)([]),P=(0,h.Z)(L,2),R=P[0],U=P[1],M=(0,a.useState)(!1),z=(0,h.Z)(M,2),G=z[0],W=z[1],H=(0,a.useState)(null),J=(0,h.Z)(H,2),V=J[0],q=J[1],$=(0,a.useState)("date"),X=(0,h.Z)($,2),Q=X[0],ee=X[1],ne=(0,a.useState)(!1),te=(0,h.Z)(ne,2),ie=te[0],oe=te[1],ae=(0,a.useState)(!1),re=(0,h.Z)(ae,2),se=re[0],ce=re[1],le=(0,a.useState)(!1),de=(0,h.Z)(le,2),ue=de[0],he=de[1],me=(0,a.useState)([]),fe=(0,h.Z)(me,2),pe=fe[0],xe=fe[1],be=(0,a.useState)(!1),ve=(0,h.Z)(be,2),ge=ve[0],Ze=ve[1],_e=[];w&&(_e=w.name.split("/")),(0,a.useEffect)((function(){c||w||o((0,k.Eq)(!0))}),[c,w,o]),(0,a.useEffect)((function(){c&&""!==t&&j.Z.invoke("GET","/api/v1/buckets/".concat(i,"/objects?prefix=").concat(t).concat(u?"&with_versions=true":"")).then((function(e){var n=v()(e,"objects",[]),i=(0,g.IO)(t),a=n.filter((function(e){return e.name===i}));u?(T(a.find((function(e){return e.is_latest}))||on),U(a)):(T(a[0]),U([])),o((0,k.Eq)(!1))})).catch((function(e){o((0,F.Ih)(e)),o((0,k.Eq)(!1))}))}),[c,i,t,o,u]);var Se=function(e){I(e),Z(!0)},Ce=function(e){I(e),oe(!0)},we=function(e){q(e),W(!0)},Te=function(e){!function(e){var n=(0,g.LL)("".concat(i,"-").concat(e.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),a=(0,ze.YO)(8),r=(0,D.LR)(i,t,e.version_id,parseInt(e.size||"0"),null,a,(function(e){o((0,k.RO)({instanceID:n,progress:e}))}),(function(){o((0,k.oK)(n))}),(function(e){o((0,k.qJ)({instanceID:n,msg:e}))}),(function(){o((0,k.Im)(n))}));(0,ze.EN)(a,r),o((0,k.Mc)({ID:a,bucketName:i,done:!1,instanceID:n,percentage:0,prefix:e.name,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))}(e)},ye=function(e){o((0,k.M3)(e.version_id||""))},Ne=R.filter((function(e){return!!e.version_id&&e.version_id.includes(s)})),Ee=R.reduce((function(e,n){return n.size?e+parseInt(n.size):e}),0);Ne.sort((function(e,n){if("size"===Q)return e.size&&n.size?e.size<n.size?-1:e.size>n.size?1:0:0;var t=new Date(e.last_modified).getTime(),i=new Date(n.last_modified).getTime();return t<i?1:t>i?-1:0}));var Ie=function(e){if(pe.includes(e)){var n=pe.filter((function(n){return n!==e}));xe(n)}else{var t=(0,_.Z)(pe);t.push(e),xe(t)}};return(0,O.jsxs)(a.Fragment,{children:[b&&w&&(0,O.jsx)(Y.default,{open:b,closeModalAndRefresh:function(){I(null),Z(!1),oe(!1)},bucketName:i,dataObject:E||w}),G&&w&&V&&(0,O.jsx)(Ye,{restoreOpen:G,bucketName:i,versionToRestore:V,objectPath:w.name,onCloseAndUpdate:function(e){W(!1),q(null),e&&(o((0,k.Eq)(!0)),o((0,k.vH)(!0)))}}),ie&&w&&(0,O.jsx)(je.default,{open:ie,bucketName:i,object:{name:w.name,version_id:E&&E.version_id?E.version_id:"null",size:parseInt(E&&E.size?E.size:"0"),content_type:"",last_modified:w.last_modified},onClosePreview:function(){oe(!1)}}),se&&(0,O.jsx)(en,{deleteOpen:se,closeDeleteModalAndRefresh:function(e){ce(!1),e&&(o((0,k.Eq)(!0)),o((0,k.M3)("")),o((0,k.vH)(!0)))},selectedBucket:i,selectedObject:t}),ge&&(0,O.jsx)(nn,{selectedBucket:i,selectedObject:(0,g.IO)(t),deleteOpen:ge,selectedVersions:pe,closeDeleteModalAndRefresh:function(e){Ze(!1),e&&(o((0,k.Eq)(!0)),o((0,k.M3)("")),o((0,k.vH)(!0)),xe([]))}}),(0,O.jsxs)(x.ZP,{container:!0,className:n.versionsContainer,children:[!w&&(0,O.jsx)(x.ZP,{item:!0,xs:12,children:(0,O.jsx)(Ve.Z,{})}),w&&(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)(x.ZP,{item:!0,xs:12,children:(0,O.jsx)(B,{bucketName:i,internalPaths:(0,g.IO)(t),hidePathButton:!0})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.screenTitleContainer,children:(0,O.jsx)(A.Z,{icon:(0,O.jsx)("span",{className:n.listIcon,children:(0,O.jsx)(f.cRd,{})}),title:(0,O.jsxs)("span",{className:n.titleSpacer,children:[_e.length>0?_e[_e.length-1]:w.name," ","Versions"]}),subTitle:(0,O.jsx)(a.Fragment,{children:(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.bucketDetails,children:[(0,O.jsx)("span",{className:n.detailsSpacer,children:(0,O.jsxs)("strong",{children:[R.length," Version",1===R.length?"":"s","\xa0\xa0\xa0"]})}),(0,O.jsx)("span",{className:n.detailsSpacer,children:(0,O.jsx)("strong",{children:(0,g.l5)(Ee)})})]})}),actions:(0,O.jsxs)(a.Fragment,{children:[(0,O.jsx)(K.Z,{tooltip:"Select Multiple Versions",children:(0,O.jsx)(f.zxk,{id:"select-multiple-versions",onClick:function(){he(!ue)},icon:(0,O.jsx)(f.amE,{}),variant:ue?"callAction":"regular",style:{marginRight:8}})}),ue&&(0,O.jsx)(K.Z,{tooltip:"Delete Selected Versions",children:(0,O.jsx)(f.zxk,{id:"delete-multiple-versions",onClick:function(){Ze(!0)},icon:(0,O.jsx)(f.pJl,{}),variant:"secondary",style:{marginRight:8},disabled:0===pe.length})}),(0,O.jsx)(K.Z,{tooltip:"Delete Non Current Versions",children:(0,O.jsx)(f.zxk,{id:"delete-non-current",onClick:function(){ce(!0)},icon:(0,O.jsx)(f.utM,{}),variant:"secondary",style:{marginRight:15},disabled:R.length<=1})}),(0,O.jsx)("span",{className:n.sortByLabel,children:"Sort by"}),(0,O.jsx)(Qe.Z,{id:"sort-by",label:"",value:Q,onChange:function(e){ee(e.target.value)},name:"sort-by",options:[{label:"Date",value:"date"},{label:"Size",value:"size"}]})]}),className:n.noBottomBorder})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.versionsVirtualPanel,children:w.version_id&&"null"!==w.version_id&&(0,O.jsx)(tn.aV,{style:{width:"100%"},containerStyle:{width:"100%",maxWidth:"100%"},width:1,height:800,rowCount:Ne.length,rowHeight:108,rowRenderer:function(e){var n=e.key,t=e.index,i=(e.isScrolling,e.isVisible,e.style),o=R.length-t;return(0,O.jsx)(Xe,{style:i,fileName:(null===w||void 0===w?void 0:w.name)||"",versionInfo:Ne[t],index:o,onDownload:Te,onRestore:we,onShare:Se,onPreview:Ce,globalClick:ye,isSelected:l===Ne[t].version_id,checkable:ue,onCheck:Ie,isChecked:pe.includes(Ne[t].version_id||"")},n)}})})]})]})]})})),rn=t(9859),sn=function(e){if(e.name.endsWith("/"))return"";var n=p.ou.now(),t=p.ou.fromISO(e.last_modified);return n.hasSame(t,"day")&&n.hasSame(t,"month")&&n.hasSame(t,"year")?"Today, ".concat(t.toFormat("HH:mm")):t.toFormat("ccc, LLL dd yyyy HH:mm (ZZZZ)")},cn=function(e){return e.name.endsWith("/")||!e.size?"-":(0,g.ae)(String(e.size))},ln=[{label:"Name",elementKey:"name",renderFunction:Oe,enableSort:!0},{label:"Last Modified",elementKey:"last_modified",renderFunction:sn,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:cn,renderFullObject:!0,width:100,enableSort:!0}],dn=[{label:"Name",elementKey:"name",renderFunction:Oe,enableSort:!0},{label:"Object Date",elementKey:"last_modified",renderFunction:sn,renderFullObject:!0,enableSort:!0},{label:"Size",elementKey:"size",renderFunction:cn,renderFullObject:!0,width:100,enableSort:!0},{label:"Deleted",elementKey:"delete_flag",renderFunction:function(e){return e?"Yes":"No"},width:60}],un=t(92983),hn=t(46078),mn=(0,w.Z)((function(e){return(0,c.Z)({browsePaper:{border:0,height:"calc(100vh - 290px)","&.isEmbedded":{height:"calc(100vh - 315px)"},"&.actionsPanelOpen":{minHeight:"100%"},"@media (max-width: 800px)":{width:800}},parentWrapper:{position:"relative",height:"calc(100% - 60px)","@media (max-width: 800px)":{overflowX:"auto"}},"@global":{".rowLine:hover .iconFileElm":{backgroundImage:"url(/images/ob_file_filled.svg)"},".rowLine:hover .iconFolderElm":{backgroundImage:"url(/images/ob_folder_filled.svg)"}}})})),fn=function(e){var n=e.internalPaths,t=mn(),i=(0,d.TL)(),o=(0,s.UO)(),c=(0,s.s0)(),l=(0,a.useState)("ASC"),u=(0,h.Z)(l,2),m=u[0],f=u[1],p=(0,a.useState)("name"),x=(0,h.Z)(p,2),b=x[0],j=x[1],Z=o.bucketName||"",S=(0,r.v9)((function(e){return e.objectBrowser.objectDetailsOpen})),C=(0,r.v9)((function(e){return e.objectBrowser.loadingObjects})),w=(0,r.v9)(hn.$4),T=!(null===w||void 0===w||!w.includes("object-browser-only")),y=(0,r.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),I=(0,r.v9)((function(e){return e.objectBrowser.records})),F=(0,r.v9)((function(e){return e.objectBrowser.searchObjects})),L=(0,r.v9)((function(e){return e.objectBrowser.selectedObjects})),P=(0,r.v9)((function(e){return e.system.anonymousMode})),B=(0,N.F)(Z,[E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET]),A=I.filter((function(e){return""===F||e.name.toLowerCase().indexOf(F.toLowerCase())>=0})).sort((0,D.P_)(b)),R=[];R="ASC"===m?A:A.reverse();var U=[{type:"view",label:"View",onClick:function(e){var t=e.name,o="/browser/".concat(Z).concat(t?"/".concat((0,g.LL)(t)):"");!P||null===n||e.name.endsWith("/")?(i((0,k.S2)([])),c(o),P||(i((0,k.vb)(!0)),i((0,k.Eq)(!0)),i((0,k.d_)(!0))),i((0,k.EE)("".concat(t?"".concat((0,g.LL)(t)):"")))):We(i,Z,"".concat((0,g.LL)(t)),e)},sendOnlyId:!1}];return(0,O.jsx)(un.Z,{itemActions:U,columns:y?dn:ln,isLoading:C,entityName:"Objects",idField:"name",records:R,customPaperHeight:"".concat(t.browsePaper," ").concat(T?"isEmbedded":""," ").concat(S?"actionsPanelOpen":""),selectedItems:L,onSelect:P?void 0:function(e){var n=e.target,t=n.value,o=n.checked,a=(0,_.Z)(L);return o?a.push(t):a=a.filter((function(e){return e!==t})),i((0,k.S2)(a)),i((0,k.EE)(null)),a},customEmptyMessage:B||P?"This location is empty".concat(y?"":", please try uploading a new file"):(0,E.MK)([E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET],"view Objects in this bucket"),sortConfig:{currentSort:b,currentDirection:m,triggerSort:function(e){var n=v()(e,"sortDirection","DESC");j(e.sortBy),f(n),i((0,k.Cn)(!0))}},onSelectAll:function(){if(i((0,k.EE)(null)),L.length!==R.length){var e=R.map((function(e){return e.name}));i((0,k.S2)(e))}else i((0,k.S2)([]))},rowStyle:function(e){var n,t=e.index;return null!==(n=R[t])&&void 0!==n&&n.delete_flag?"deleted":""},parentClassName:t.parentWrapper})},pn=t(96382),xn=(0,pn.hg)("objectBrowser/downloadSelected",function(){var e=(0,Re.Z)((0,Ae.Z)().mark((function e(n,t){var i,o,a,r,s,c;return(0,Ae.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.getState,t.rejectWithValue,o=t.dispatch,a=i(),r=function(e){var t=(0,g.LL)("".concat(n,"-").concat(e.name,"-").concat((new Date).getTime(),"-").concat(Math.random())),i=(0,ze.YO)(8),a=(0,D.LR)(n,(0,g.LL)(e.name),e.version_id,e.size,null,i,(function(e){o((0,k.RO)({instanceID:t,progress:e}))}),(function(){o((0,k.oK)(t))}),(function(e){o((0,k.qJ)({instanceID:t,msg:e}))}),(function(){o((0,k.Im)(t))}));(0,ze.EN)(i,a),o((0,k.Mc)({ID:i,bucketName:n,done:!1,instanceID:t,percentage:0,prefix:e.name,type:"download",waitingForFile:!0,failed:!1,cancelled:!1,errorMessage:""}))},0===a.objectBrowser.selectedObjects.length){e.next=12;break}if(s=[],c=function(e){return a.objectBrowser.selectedObjects.includes(e.name)},1!==(s=a.objectBrowser.records.filter(c)).length){e.next=11;break}if(!(s[0].name.length>200&&(0,g.mv)().toLowerCase().includes("win"))){e.next=11;break}return o((0,k.$y)(s[0])),e.abrupt("return");case 11:s.forEach((function(e){r(e)}));case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()),bn=(0,pn.hg)("objectBrowser/openPreview",function(){var e=(0,Re.Z)((0,Ae.Z)().mark((function e(n,t){var i,o,a,r,s;return(0,Ae.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.getState,t.rejectWithValue,o=t.dispatch,1===(a=i()).objectBrowser.selectedObjects.length&&(s=function(e){return a.objectBrowser.selectedObjects.includes(e.name)},(r=a.objectBrowser.records.find(s))&&(o((0,k.eP)(r)),o((0,k.ei)(!0))));case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()),vn=(0,pn.hg)("objectBrowser/openShare",function(){var e=(0,Re.Z)((0,Ae.Z)().mark((function e(n,t){var i,o,a,r,s;return(0,Ae.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.getState,t.rejectWithValue,o=t.dispatch,1===(a=i()).objectBrowser.selectedObjects.length&&(s=function(e){return a.objectBrowser.selectedObjects.includes(e.name)},(r=a.objectBrowser.records.find(s))&&(o((0,k.eP)(r)),o((0,k.Qf)(!0))));case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()),jn=t(59114),gn=function(){var e=(0,d.TL)(),n=(0,r.v9)((function(e){return e.objectBrowser.searchObjects}));return(0,O.jsx)(jn.Z,{placeholder:"Start typing to filter objects in the bucket",onChange:function(n){e((0,k.G4)(n))},value:n})},Zn=(0,I.Z)(a.lazy((function(){return t.e(711).then(t.bind(t,50711))}))),_n=(0,I.Z)(a.lazy((function(){return Promise.resolve().then(t.bind(t,34433))}))),Sn=(0,I.Z)(a.lazy((function(){return Promise.all([t.e(3691),t.e(9683),t.e(6901)]).then(t.bind(t,26901))}))),Cn=(0,I.Z)(a.lazy((function(){return Promise.resolve().then(t.bind(t,78562))}))),wn=(0,w.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({badgeOverlap:{"& .MuiBadge-badge":{top:10,right:1,width:5,height:5,minWidth:5}}},u.VX),u.OR),u.qg),{},{searchField:(0,o.Z)((0,o.Z)({},u.qg.searchField),{},{maxWidth:380}),screenTitleContainer:{border:"#EAEDEE 1px solid"},labelStyle:{color:"#969FA8",fontSize:"12px"},breadcrumbsContainer:{padding:"12px 14px 5px"},fullContainer:{position:"relative","@media (max-width: 799px)":{width:0}},hideListOnSmall:{"@media (max-width: 799px)":{display:"none"}},actionsSection:{display:"flex",justifyContent:"space-between",width:"100%"}},u.C4),u.cx),u.Bz))})),Tn={borderWidth:2,borderRadius:2,borderColor:"#eeeeee",outline:"none"},yn={borderStyle:"dashed",backgroundColor:"#fafafa",borderColor:"#2196f3"},Nn={borderStyle:"dashed",backgroundColor:"#fafafa",borderColor:"#00e676"},En=function(){var e,n=wn(),t=(0,d.TL)(),i=(0,s.UO)(),c=(0,s.s0)(),l=(0,s.TH)(),u=(0,r.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),b=(0,r.v9)((function(e){return e.objectBrowser.rewind.bucketToRewind})),_=(0,r.v9)((function(e){return e.objectBrowser.versionsMode})),S=(0,r.v9)((function(e){return e.objectBrowser.showDeleted})),C=(0,r.v9)((function(e){return e.objectBrowser.objectDetailsOpen})),w=(0,r.v9)((function(e){return e.objectBrowser.selectedInternalPaths})),T=(0,r.v9)((function(e){return e.objectBrowser.loadingObjects})),y=(0,r.v9)((function(e){return e.objectBrowser.simplePath})),I=(0,r.v9)((function(e){return e.objectBrowser.versionInfo})),L=(0,r.v9)((function(e){return e.objectBrowser.lockingEnabled})),P=(0,r.v9)((function(e){return e.objectBrowser.downloadRenameModal})),U=(0,r.v9)((function(e){return e.objectBrowser.selectedPreview})),M=(0,r.v9)((function(e){return e.objectBrowser.shareFileModalOpen})),z=(0,r.v9)((function(e){return e.objectBrowser.previewOpen})),G=(0,r.v9)((function(e){return e.objectBrowser.selectedBucket})),H=(0,r.v9)((function(e){return e.system.anonymousMode})),V=(0,r.v9)((function(e){return e.system.overrideStyles})),Y=(0,r.v9)(rn.HQ),q=(0,r.v9)(rn.G6),$=(0,a.useState)(!1),X=(0,h.Z)($,2),Q=X[0],ee=X[1],ne=(0,a.useState)(!1),te=(0,h.Z)(ne,2),ie=te[0],oe=te[1],ae=(0,a.useState)(!1),re=(0,h.Z)(ae,2),se=re[0],ce=re[1],le=(0,a.useState)(!1),de=(0,h.Z)(le,2),ue=de[0],he=de[1],me=(0,a.useState)(!1),fe=(0,h.Z)(me,2),pe=fe[0],xe=fe[1],be=(0,a.useState)(null),ve=(0,h.Z)(be,2),je=ve[0],ge=ve[1],Ze=i.bucketName||"",_e=l.pathname.split("/browser/".concat(Ze,"/")),Se=2===_e.length?_e[1]:"",Ce=(0,g.IO)(Se),we=Ce.split("/").filter((function(e){return""!==e})),Te=[Ze];we.length>0&&(Te=Te.concat(we));var ye=(0,a.useRef)(null),Ne=(0,a.useRef)(null),Ie=(0,N.F)(Ze,[E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS]),Fe=(0,N.F)(Ze,[E.Ft.S3_DELETE_OBJECT]),ke=(0,N.F)(Te,[E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS],!0,!0)||H,Oe=(0,N.F)(Ze,[E.Ft.S3_DELETE_OBJECT]),Le=(0,r.v9)((function(e){return e.objectBrowser.selectedObjects}));(0,a.useEffect)((function(){t((0,k.G4)("")),t((0,k.Cn)(!0)),t((0,k.S2)([]))}),[y,t]),(0,a.useEffect)((function(){u&&b!==Ze&&t((0,k._w)())}),[u,b,Ze,t]),(0,a.useEffect)((function(){null!==Ne.current&&(Ne.current.setAttribute("directory",""),Ne.current.setAttribute("webkitdirectory",""))}),[Ne]),(0,a.useEffect)((function(){if(1===Le.length){var e=Le[0];"none"!==(0,D.Bg)(e)?xe(!0):xe(!1),e.endsWith("/")?he(!1):he(!0)}else he(!1),xe(!1)}),[Le]),(0,a.useEffect)((function(){je||H||j.Z.invoke("GET","/api/v1/buckets/".concat(Ze,"/quota")).then((function(e){var n=null;e.quota&&(n=e),ge(n)})).catch((function(e){console.error("Error Getting Quota Status: ",e.detailedError),ge(null)}))}),[je,Ze,H]),(0,a.useEffect)((function(){Le.length>0?t((0,k.vb)(!0)):0!==Le.length||null!==w||T||t((0,k.vb)(!1))}),[Le,w,t,T]),(0,a.useEffect)((function(){se||(t((0,rn.d5)(!0)),ce(!0))}),[se,t,ce]),(0,a.useEffect)((function(){Y&&!H&&j.Z.invoke("GET","/api/v1/buckets/".concat(Ze)).then((function(e){t((0,rn.d5)(!1)),t((0,rn.f4)(e)),t((0,k.RS)(Ze))})).catch((function(e){t((0,rn.d5)(!1)),t((0,F.Ih)(e))}))}),[Ze,Y,t,H]),(0,a.useEffect)((function(){""!==G&&j.Z.invoke("GET","/api/v1/buckets/".concat(G,"/retention")).then((function(e){t((0,k.c8)(e))})).catch((function(e){t((0,k.c8)(null))}))}),[G,t]);var Pe=function(e){if(null!==e&&void 0!==e&&null!==e.target.files&&void 0!==e.target.files){e.preventDefault();for(var n=[],t=0;t<e.target.files.length;t++)n.push(e.target.files[t]);Be(n,""),e.target.value=""}},Be=(0,a.useCallback)((function(e,n){var i="";y&&(i=y.endsWith("/")?y:y+"/");!function(e,n,i,o){var a=function(a){return new Promise((function(r,s){var c="api/v1/buckets/".concat(n,"/objects/upload"),l=a.name,d=new Blob([a],{type:a.type}),u="",h=v()(a,"path",""),m=v()(a,"webkitRelativePath",""),f=o,p=(0,ze.YO)(8);if(""!==h?f=h:""!==m&&(f=m),""!==i||""!==f){var x=f.split("/").slice(0,-1).join("/"),b=i.endsWith("/")?i.slice(0,-1):i;u=(0,g.LL)("".concat(b).concat(b.endsWith("/")||""===x||x.startsWith("/")?"":"/").concat(x).concat(!x.endsWith("/")||""===x.trim()&&!i.endsWith("/")?"/":""))}""!==u&&(c="".concat(c,"?prefix=").concat(u));var j=(0,g.LL)("".concat(n,"-").concat(u,"-").concat((new Date).getTime(),"-").concat(Math.random())),Z=new XMLHttpRequest;Z.open("POST",c,!0),H&&Z.setRequestHeader("X-Anonymous","1");var _=e.length>1,S="An error occurred while uploading the file".concat(_?"s":"","."),C={413:"Error - File size too large"};Z.withCredentials=!1,Z.onload=function(e){if(Z.status>=200&&Z.status<300)t((0,k.oK)(j)),r({status:Z.status}),(0,ze.GM)(p);else{if(C[Z.status])S=C[Z.status];else if(Z.response)try{var n=JSON.parse(Z.response);S=n.detailedMessage}catch(i){S="something went wrong"}t((0,k.qJ)({instanceID:j,msg:S})),s({status:Z.status,message:S}),(0,ze.GM)(p)}},Z.upload.addEventListener("error",(function(e){s(S),t((0,k.qJ)({instanceID:j,msg:"A network error occurred."}))})),Z.upload.addEventListener("progress",(function(e){var n=Math.floor(100*e.loaded/e.total);t((0,k.RO)({instanceID:j,progress:n}))})),Z.onerror=function(){s(S),t((0,k.qJ)({instanceID:j,msg:"A network error occurred."}))},Z.onloadend=function(){0===e.length&&t((0,k.Cn)(!0))},Z.onabort=function(){t((0,k.Im)(j))};var w=new FormData;void 0!==a.size&&(w.append(a.size.toString(),d,l),(0,ze.EN)(p,Z),t((0,k.Mc)({ID:p,bucketName:n,done:!1,instanceID:j,percentage:0,prefix:"".concat((0,g.IO)(u)).concat(l),type:"upload",waitingForFile:!1,failed:!1,cancelled:!1,errorMessage:""})),(0,ze.N5)(p,w),(0,ze.EN)(p,Z))}))},r=[];t((0,k.LD)());for(var s=0;s<e.length;s++){var c=e[s];r.push(a(c))}Promise.allSettled(r).then((function(e){var n=e.filter((function(e){return"rejected"===e.status}));if(n.length>0){var i=r.length,o=r.length-n.length,a={errorMessage:"There were some errors during file upload",detailedError:"Uploaded files ".concat(o,"/").concat(i)};t((0,F.Ih)(a))}t((0,k.Cn)(!0)),t((0,k.S2)([]))}))}(e,Ze,i,n)}),[Ze,t,y,H]),De=(0,a.useCallback)((function(e){if(e&&e.length>0&&ke){var n=e[0].path;Be(e,n)}ke||t((0,F.Ih)({errorMessage:"Upload not allowed",detailedError:(0,E.MK)([E.Ft.S3_PUT_OBJECT,E.Ft.S3_PUT_ACTIONS],"upload objects to this location")}))}),[Be]),Ae=(0,m.uI)({noClick:!0,onDrop:De}),Re=Ae.getRootProps,Ue=Ae.getInputProps,Me=Ae.isDragActive,Ge=Ae.isDragAccept,We=(0,a.useMemo)((function(){return(0,o.Z)((0,o.Z)((0,o.Z)({},Tn),Me?yn:{}),Ge?Nn:{})}),[Me,Ge]),He=function(e){if(t((0,k.EE)(null)),t((0,k.db)({status:!1})),C&&null!==w){var n=(0,g.IO)(Se).split("/");n.pop();var i="";n&&n.length>0&&(i="".concat(n.join("/"),"/")),c("/browser/".concat(Ze,"/").concat((0,g.LL)(i)))}t((0,k.vb)(!1)),t((0,k.S2)([])),e&&t((0,k.Cn)(!0))},Ve=p.ou.now();null!==q&&void 0!==q&&q.creation_date&&(Ve=p.ou.fromISO(q.creation_date));var Ye={},qe={};V&&(Ye={backgroundColor:"transparent"},qe={color:v()(V,"buttonStyles.textColor","#fff"),backgroundColor:v()(V,"buttonStyles.backgroundColor","#07193E"),"&:hover":{color:v()(V,"buttonStyles.hoverText","#fff"),backgroundColor:v()(V,"buttonStyles.hoverColor","#0D2453")},"&:active":{color:v()(V,"buttonStyles.activeText","#fff"),backgroundColor:v()(V,"buttonStyles.activeColor","#05132F")}});var Xe=[{action:function(){t(xn(Ze))},label:"Download",disabled:!Ie||0===(null===Le||void 0===Le?void 0:Le.length),icon:(0,O.jsx)(f._8t,{}),tooltip:Ie?"Download Selected":(0,E.MK)([E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS],"download objects from this bucket")},{action:function(){t(vn())},label:"Share",disabled:1!==Le.length||!ue,icon:(0,O.jsx)(f.aAc,{}),tooltip:ue?"Share Selected File":"Sharing unavailable"},{action:function(){t(bn())},label:"Preview",disabled:1!==Le.length||!pe,icon:(0,O.jsx)(f.P99,{}),tooltip:pe?"Preview Selected File":"Preview unavailable"},{action:function(){ee(!0)},label:"Delete",icon:(0,O.jsx)(f.pJl,{}),disabled:!Fe||0===Le.length||!Oe,tooltip:Fe?"Delete Selected Files":(0,E.MK)([E.Ft.S3_DELETE_OBJECT],"delete objects in this bucket")}];return(0,O.jsxs)(a.Fragment,{children:[M&&U&&(0,O.jsx)(_n,{open:M,closeModalAndRefresh:function(){t((0,k.Qf)(!1)),t((0,k.eP)(null))},bucketName:Ze,dataObject:{name:U.name,last_modified:"",version_id:U.version_id}}),Q&&(0,O.jsx)(Zn,{deleteOpen:Q,selectedBucket:Ze,selectedObjects:Le,closeDeleteModalAndRefresh:function(e){ee(!1),e&&(t((0,F.y1)("Objects deleted successfully.")),t((0,k.S2)([])),t((0,k.Cn)(!0)))},versioning:I}),ie&&(0,O.jsx)(Sn,{open:ie,closeModalAndRefresh:function(){oe(!1)},bucketName:Ze}),z&&(0,O.jsx)(Cn,{open:z,bucketName:Ze,object:U,onClosePreview:function(){t((0,k.ei)(!1)),t((0,k.eP)(null))}}),!!P&&(0,O.jsx)(Ke,{open:!!P,closeModal:function(){t((0,k.$y)(null))},currentItem:(null===(e=P.name.split("/"))||void 0===e?void 0:e.pop())||"",bucketName:Ze,internalPaths:Se,actualInfo:{name:P.name,last_modified:"",version_id:P.version_id,size:P.size.toString()}}),(0,O.jsxs)(R.Z,{variant:"full",children:[H&&(0,O.jsx)("div",{style:{paddingBottom:16},children:(0,O.jsx)(gn,{})}),(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.screenTitleContainer,children:(0,O.jsx)(A.Z,{icon:(0,O.jsx)("span",{children:(0,O.jsx)(f.wNb,{style:{width:30}})}),title:(0,O.jsx)("span",{className:n.titleSpacer,children:Ze}),subTitle:H?null:(0,O.jsx)(a.Fragment,{children:(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.bucketDetails,children:[(0,O.jsxs)("span",{className:n.detailsSpacer,children:["Created on:\xa0\xa0",(0,O.jsx)("strong",{children:null!==q&&void 0!==q&&q.creation_date?Ve.toFormat("ccc, LLL dd yyyy HH:mm:ss (ZZZZ)"):""})]}),(0,O.jsxs)("span",{className:n.detailsSpacer,children:["Access:\xa0\xa0\xa0",(0,O.jsx)("strong",{children:(null===q||void 0===q?void 0:q.access)||""})]}),q&&(0,O.jsx)(a.Fragment,{children:(0,O.jsxs)("span",{className:n.detailsSpacer,children:[q.size&&(0,O.jsx)(a.Fragment,{children:(0,g.l5)(q.size)}),q.size&&je&&(0,O.jsxs)(a.Fragment,{children:[" / ",(0,g.l5)(je.quota)]}),q.size&&q.objects?" - ":"",q.objects&&(0,O.jsxs)(a.Fragment,{children:[q.objects,"\xa0Object",q.objects&&1!==q.objects?"s":""]})]})})]})}),actions:(0,O.jsxs)("div",{className:n.actionsSection,children:[!H&&(0,O.jsx)(K.Z,{tooltip:"Rewind Bucket",children:(0,O.jsx)(f.zxk,{id:"rewind-objects-list",label:"Rewind",icon:(0,O.jsx)(Z.Z,{badgeContent:" ",color:"secondary",variant:"dot",invisible:!u,className:n.badgeOverlap,sx:{height:16},children:(0,O.jsx)(f.F_y,{style:{minWidth:16,minHeight:16,width:16,height:16,marginTop:-3}})}),variant:"regular",onClick:function(){oe(!0)},disabled:!I||!(0,N.F)(Ze,[E.Ft.S3_GET_OBJECT,E.Ft.S3_GET_ACTIONS]),sx:Ye})}),(0,O.jsx)(K.Z,{tooltip:"Reload List",children:(0,O.jsx)(f.zxk,{id:"refresh-objects-list",label:"Refresh",icon:(0,O.jsx)(f.DuK,{}),variant:"regular",onClick:function(){_?t((0,k.Eq)(!0)):(t((0,k.o_)()),t((0,k._D)(!0)),t((0,k.Cn)(!0)))},disabled:!H&&(!(0,N.F)(Ze,[E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET])||u),sx:Ye})}),(0,O.jsx)("input",{type:"file",multiple:!0,onChange:Pe,style:{display:"none"},ref:ye}),(0,O.jsx)("input",{type:"file",multiple:!0,onChange:Pe,style:{display:"none"},ref:Ne}),(0,O.jsx)(W,{bucketName:Ze,uploadPath:Te.join("/"),uploadFileFunction:function(e){ye&&ye.current&&ye.current.click(),e()},uploadFolderFunction:function(e){Ne&&Ne.current&&Ne.current.click(),e()},overrideStyles:qe})]})})}),(0,O.jsxs)("div",(0,o.Z)((0,o.Z)({id:"object-list-wrapper"},Re({style:(0,o.Z)({},We)})),{},{children:[(0,O.jsx)("input",(0,o.Z)({},Ue())),(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.tableBlock,sx:{border:"#EAEDEE 1px solid",borderTop:0},children:[_?(0,O.jsx)(a.Fragment,{children:null!==w&&(0,O.jsx)(an,{internalPaths:w,bucketName:Ze})}):(0,O.jsx)(N.s,{scopes:[E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET],resource:Ze,errorProps:{disabled:!0},children:(0,O.jsxs)(x.ZP,{item:!0,xs:12,className:n.fullContainer,children:[!H&&(0,O.jsx)(x.ZP,{item:!0,xs:12,className:n.breadcrumbsContainer,children:(0,O.jsx)(B,{bucketName:Ze,internalPaths:Ce,additionalOptions:!I||u?null:(0,O.jsx)("div",{children:(0,O.jsx)($e.Z,{name:"deleted_objects",id:"showDeletedObjects",value:"deleted_on",label:"Show deleted objects",onChange:function(){t((0,k.o_)()),t((0,k.mz)(!S)),He(!0)},checked:S,overrideLabelClasses:n.labelStyle,className:n.overrideShowDeleted,noTopMargin:!0})}),hidePathButton:!1})}),(0,O.jsx)(fn,{internalPaths:w})]})}),!H&&(0,O.jsx)(N.s,{scopes:[E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET],resource:Ze,errorProps:{disabled:!0},children:(0,O.jsxs)(J,{open:C,closePanel:function(){He(!1)},className:"".concat(_?n.hideListOnSmall:""),children:[Le.length>0&&(0,O.jsx)(Ee,{items:Xe,title:"Selected Objects:"}),null!==w&&(0,O.jsx)(Je,{internalPaths:w,bucketName:Ze,onClosePanel:He,versioningInfo:I,locking:L})]})})]})]}))]})]})},In=t(49535),Fn=t(26824),kn=t(73996),On=t(47974),Ln=t(4677),Pn=function(e){var n=e.bucketName,t=(0,d.TL)(),i=(0,r.v9)(hn.$4),o=(0,r.v9)((function(e){return e.objectBrowser.versionsMode})),c=(0,r.v9)((function(e){return e.objectBrowser.versionedFile})),l=(0,r.v9)((function(e){return e.objectBrowser.searchVersions})),u=!(null===i||void 0===i||!i.includes("object-browser-only")),h=(0,s.s0)(),m=(0,In.Z)(n,[E.Ft.S3_GET_BUCKET_POLICY,E.Ft.S3_PUT_BUCKET_POLICY,E.Ft.S3_GET_BUCKET_VERSIONING,E.Ft.S3_PUT_BUCKET_VERSIONING,E.Ft.S3_GET_BUCKET_ENCRYPTION_CONFIGURATION,E.Ft.S3_PUT_BUCKET_ENCRYPTION_CONFIGURATION,E.Ft.S3_DELETE_BUCKET,E.Ft.S3_GET_BUCKET_NOTIFICATIONS,E.Ft.S3_PUT_BUCKET_NOTIFICATIONS,E.Ft.S3_GET_REPLICATION_CONFIGURATION,E.Ft.S3_PUT_REPLICATION_CONFIGURATION,E.Ft.S3_GET_LIFECYCLE_CONFIGURATION,E.Ft.S3_PUT_LIFECYCLE_CONFIGURATION,E.Ft.ADMIN_GET_BUCKET_QUOTA,E.Ft.ADMIN_SET_BUCKET_QUOTA,E.Ft.S3_PUT_BUCKET_TAGGING,E.Ft.S3_GET_BUCKET_TAGGING,E.Ft.S3_LIST_BUCKET_VERSIONS,E.Ft.S3_GET_BUCKET_POLICY_STATUS,E.Ft.S3_DELETE_BUCKET_POLICY,E.Ft.S3_GET_ACTIONS,E.Ft.S3_PUT_ACTIONS]),p=(0,O.jsx)(a.Fragment,{children:o?(0,O.jsx)(a.Fragment,{children:(0,O.jsx)(jn.Z,{placeholder:"Start typing to filter versions of ".concat(c),onChange:function(e){t((0,k.Pr)(e))},value:l})}):(0,O.jsx)(N.s,{scopes:[E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET],resource:n,errorProps:{disabled:!0},children:(0,O.jsx)(gn,{})})});return(0,O.jsx)(a.Fragment,{children:u?(0,O.jsxs)(f.rjZ,{container:!0,sx:{padding:"20px 32px 0"},children:[(0,O.jsx)(f.rjZ,{children:(0,O.jsx)(kn.Z,{marginRight:30,marginTop:10})}),(0,O.jsxs)(f.rjZ,{item:!0,xs:!0,sx:{display:"flex",gap:10},children:[p,(0,O.jsx)(Ln.Z,{})]})]}):(0,O.jsx)(On.Z,{label:(0,O.jsx)(f.hbI,{label:"Object Browser",onClick:function(){console.log("clicke"),h(E.gA.OBJECT_BROWSER_VIEW)}}),actions:(0,O.jsx)(N.s,{scopes:E.D[E.EI.BUCKET_ADMIN],resource:n,errorProps:{disabled:!0},children:(0,O.jsx)(K.Z,{tooltip:m?"Configure Bucket":"You do not have the required permissions to configure this bucket. Please contact your MinIO administrator to request "+E.EI.BUCKET_ADMIN+" permisions.",children:(0,O.jsx)(f.zxk,{id:"configure-bucket-main",color:"primary","aria-label":"Configure Bucket",onClick:function(){return h("/buckets/".concat(n,"/admin"))},icon:(0,O.jsx)(f.ewm,{style:{width:20,height:20,marginTop:-3}}),style:{padding:"0 10px"}})})}),middleComponent:p})})},Bn=0,Dn=0,An=!1,Rn=function e(n,t){if(!An){An=!0;var o=new URL(window.location.toString()),a=o.port,r=new URL(document.baseURI).pathname,s=(0,Fn.x2)(o.protocol);(i=new WebSocket("".concat(s,"://").concat(o.hostname,":").concat(a).concat(r,"ws/objectManager"))).onopen=function(){An=!1,n&&n(),Dn=0},t&&(i.onmessage=t);var c=function(){Dn<=5?(e((function(){}),t),Dn+=1):console.error("Websocket not available.")};i.onclose=function(){An=!1,console.warn("Websocket Disconnected. Attempting Reconnection..."),setTimeout(c,3e3)},i.onerror=function(){An=!1,console.error("Error in websocket connection. Attempting reconnection...")}}},Un=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)({},u.Bz))}))((function(){var e=(0,d.TL)(),n=(0,s.UO)(),t=(0,s.TH)(),o=(0,r.v9)((function(e){return e.objectBrowser.loadingVersioning})),c=(0,r.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),l=(0,r.v9)((function(e){return e.objectBrowser.rewind.dateToRewind})),u=(0,r.v9)((function(e){return e.objectBrowser.showDeleted})),h=(0,r.v9)((function(e){return e.console.session.allowResources})),m=(0,r.v9)((function(e){return e.objectBrowser.loadingObjects})),f=(0,r.v9)((function(e){return e.objectBrowser.loadingLocking})),p=(0,r.v9)((function(e){return e.objectBrowser.loadRecords})),x=(0,r.v9)((function(e){return e.objectBrowser.selectedInternalPaths})),b=(0,r.v9)((function(e){return e.objectBrowser.simplePath})),v=(0,r.v9)((function(e){return e.objectBrowser.isOpeningObjectDetail})),Z=(0,r.v9)((function(e){return e.system.anonymousMode})),_=n.bucketName||"",S=t.pathname.split("/browser/".concat(_,"/")),C=2===S.length?S[1]:"",w=(0,a.useCallback)((function(n){e((0,k.Cn)(!1));var t=JSON.parse(n.data.toString());if(Bn===t.request_id){if(t.request_id!==Bn)return;if("The Access Key Id you provided does not exist in our records."===t.error)window.location.reload();else if("Access Denied."===t.error){var i=t.prefix,o="";if(i){var a=(0,g.IO)(i);o=a.endsWith("/")?a:a+"/"}var r=(0,D.kh)(_,o,h||[]);return void(r&&0!==r.length?e((0,k.ZJ)(r)):e((0,F.Ih)({errorMessage:t.error,detailedError:t.error})))}if(t.request_end)return e((0,k.Cn)(!1)),void e((0,k._D)(!1));t.data&&e((0,k.rW)(t.data))}}),[e,h,_]),T=(0,a.useCallback)((function(n,t){if(i&&1===i.readyState)try{var o=Bn+1;e((0,k.o_)());var a={bucket_name:_,prefix:(0,g.LL)(n),mode:c||u?"rewind":"objects",date:t.toISOString(),request_id:o};i.send(JSON.stringify(a)),Bn=o}catch(r){console.error(r)}else{Rn((function(){T(n,t)}),w)}}),[_,c,u,e,w]);(0,a.useEffect)((function(){return function(){var e={mode:"cancel",request_id:Bn};i&&1===i.readyState&&i.send(JSON.stringify(e))}}),[]),(0,a.useEffect)((function(){var n=(0,g.IO)(C);e((0,k.IJ)(!0)),n.endsWith("/")||""===n?(e((0,k.vb)(!1)),e((0,k.EE)(null)),e((0,k.Su)(""===n?"/":n))):(e((0,k.vH)(!0)),e((0,k.vb)(!0)),e((0,k.Eq)(!0)),e((0,k.EE)("".concat(n?"".concat((0,g.LL)(n)):""))),e((0,k.Su)("".concat(n.split("/").slice(0,-1).join("/"),"/"))))}),[C,l,c,e]),(0,a.useEffect)((function(){if(!m&&!p&&!c&&!v){var n=(0,g.IO)(C);if(!n.endsWith("/")&&b!==n&&""!==n){(0,k._D)(!0);var t="".concat(n.split("/").slice(0,-1).join("/"),"/");T(t,new Date)}}e((0,k.d_)(!1))}),[m,p,e,C,T,c,b]);var y=(0,In.Z)(_,[E.Ft.S3_LIST_BUCKET,E.Ft.S3_ALL_LIST_BUCKET])||Z;return(0,a.useEffect)((function(){if(m&&y){var n="";if(C){var t=(0,g.IO)(C);n=x===C?"".concat((0,g.IO)(C).split("/").slice(0,-1).join("/"),"/"):t.endsWith("/")?t:t+"/"}var i=new Date;c&&l&&(i=new Date(l)),T(n,i)}else e((0,k.Cn)(!1))}),[m,C,e,l,c,y,T]),(0,a.useEffect)((function(){e((0,k.db)({status:!1}))}),[C,e]),(0,a.useEffect)((function(){o&&!Z&&(y?j.Z.invoke("GET","/api/v1/buckets/".concat(_,"/versioning")).then((function(n){e((0,k.lS)(n)),e((0,k.IJ)(!1))})).catch((function(n){console.error("Error Getting Object Versioning Status: ",n.detailedError),e((0,k.IJ)(!1))})):(e((0,k.IJ)(!1)),e((0,k.o_)())))}),[_,o,e,y,Z]),(0,a.useEffect)((function(){f&&(y?j.Z.invoke("GET","/api/v1/buckets/".concat(_,"/object-locking")).then((function(n){e((0,k.lY)(n.object_locking_enabled)),e((0,k.Jn)(!1))})).catch((function(n){console.error("Error Getting Object Locking Status: ",n.detailedError),e((0,k.Jn)(!1))})):(e((0,k.o_)()),e((0,k.Jn)(!1))))}),[_,f,e,y]),(0,a.useEffect)((function(){f&&(y?j.Z.invoke("GET","/api/v1/buckets/".concat(_,"/object-locking")).then((function(n){e((0,k.lY)(n.object_locking_enabled)),(0,k.Jn)(!1)})).catch((function(e){console.error("Error Getting Object Locking Status: ",e.detailedError),(0,k.Jn)(!1)})):(e((0,k.o_)()),(0,k.Jn)(!1)))}),[_,f,e,y]),(0,O.jsxs)(a.Fragment,{children:[!Z&&(0,O.jsx)(Pn,{bucketName:_}),(0,O.jsx)(En,{})]})}))},34433:function(e,n,t){t.r(n),t.d(n,{default:function(){return T}});var i=t(29439),o=t(1413),a=t(72791),r=t(78687),s=t(75952),c=t(11135),l=t(25787),d=t(78029),u=t.n(d),h=t(61889),m=t(40986),f=t(23814),p=t(81207),x=t(56028),b=t(64163),v=t(30829),j=t(99779),g=t(21435),Z=t(80184),_=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},f.YI),f.Hr),{},{labelContainer:{display:"flex",alignItems:"center",marginBottom:15},fieldContainer:(0,o.Z)((0,o.Z)({},f.YI.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),dateInputContainer:{margin:"0 10px"},durationInputs:{display:"flex",alignItems:"center",justifyContent:"flex-start"},validityIndicator:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:25,marginLeft:10},invalidDurationText:{marginTop:15,display:"flex",color:"red",fontSize:11},reverseInput:{flexFlow:"row-reverse","& > label":{fontWeight:400,marginLeft:15,marginRight:25}},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}}))}))((function(e){var n=e.classes,t=e.id,o=e.initialDate,r=e.label,c=e.maxDays,l=e.entity,d=e.onChange,u=(0,a.useState)(7),m=(0,i.Z)(u,2),f=m[0],p=m[1],x=(0,a.useState)(0),b=(0,i.Z)(x,2),_=b[0],S=b[1],C=(0,a.useState)(0),w=(0,i.Z)(C,2),T=w[0],y=w[1],N=(0,a.useState)(!0),E=(0,i.Z)(N,2),I=E[0],F=E[1],k=(0,a.useState)(j.ou.now()),O=(0,i.Z)(k,2),L=O[0],P=O[1];(0,a.useEffect)((function(){isNaN(_)||isNaN(f)||isNaN(T)||P(function(e,n,t,i){return j.ou.fromJSDate(e).plus({days:n,hours:t,minutes:i})}(o,f,_,T))}),[o,f,_,T]),(0,a.useEffect)((function(){if(I){var e=L.toFormat("yyyy-MM-dd HH:mm:ss");d(e.split(" ").join("T"),!0)}else d("0000-00-00",!1)}),[L,d,I]),(0,a.useEffect)((function(){var e=!0;(f<0||c&&f>c||isNaN(f))&&(e=!1),(_<0||_>23||isNaN(_))&&(e=!1),(T<0||T>59||isNaN(T))&&(e=!1),!c||f!==c||0===_&&0===T||(e=!1),F(e)}),[L,c,d,f,_,T]);var B={style:{textAlign:"center",paddingRight:10,paddingLeft:10,width:25},className:"removeArrows"};return(0,Z.jsx)(a.Fragment,{children:(0,Z.jsxs)(h.ZP,{container:!0,className:n.fieldContainer,children:[(0,Z.jsx)(h.ZP,{item:!0,xs:12,className:n.labelContainer,children:(0,Z.jsx)(v.Z,{htmlFor:t,className:n.inputLabel,sx:{marginLeft:"10px"},children:(0,Z.jsx)("span",{children:r})})}),(0,Z.jsxs)(h.ZP,{item:!0,xs:12,className:n.durationInputs,children:[(0,Z.jsx)(h.ZP,{item:!0,className:n.dateInputContainer,children:(0,Z.jsx)(g.Z,{id:t,className:n.reverseInput,type:"number",min:"0",max:c?c.toString():"999",label:"Days",name:t,onChange:function(e){p(parseInt(e.target.value))},value:f.toString(),extraInputProps:B,noLabelMinWidth:!0})}),(0,Z.jsx)(h.ZP,{item:!0,className:n.dateInputContainer,children:(0,Z.jsx)(g.Z,{id:t,className:n.reverseInput,type:"number",min:"0",max:"23",label:"Hours",name:t,onChange:function(e){S(parseInt(e.target.value))},value:_.toString(),extraInputProps:B,noLabelMinWidth:!0})}),(0,Z.jsx)(h.ZP,{item:!0,className:n.dateInputContainer,children:(0,Z.jsx)(g.Z,{id:t,className:n.reverseInput,type:"number",min:"0",max:"59",label:"Minutes",name:t,onChange:function(e){y(parseInt(e.target.value))},value:T.toString(),extraInputProps:B,noLabelMinWidth:!0})})]}),(0,Z.jsx)(h.ZP,{item:!0,xs:12,className:"".concat(n.validityIndicator," ").concat(n.formFieldRow),children:I?(0,Z.jsxs)("div",{className:n.validityText,children:[(0,Z.jsx)(s.xPt,{}),(0,Z.jsxs)("div",{className:n.validityLabel,children:[l," will be available until:"]})," ",(0,Z.jsx)("div",{className:n.validTill,children:L.toFormat("MM/dd/yyyy HH:mm:ss")})]}):(0,Z.jsx)("div",{className:n.invalidDurationText,children:"Please select a valid duration."})})]})})})),S=t(45248),C=t(87995),w=t(81551),T=(0,l.Z)((function(e){return(0,c.Z)((0,o.Z)((0,o.Z)({shareLinkInfo:{fontSize:14,fontWeight:400},copyShareLink:{display:"flex","@media (max-width: 900px)":{flexFlow:"column",alignItems:"center",justifyContent:"center"}},copyShareLinkInput:{"& div:first-child":{marginTop:0},"@media (max-width: 900px)":{minWidth:250}}},f.ID),f.DF))}))((function(e){var n=e.classes,t=e.open,o=e.closeModalAndRefresh,c=e.bucketName,l=e.dataObject,d=(0,w.TL)(),f=(0,r.v9)(C.N5),v=(0,a.useState)(""),j=(0,i.Z)(v,2),g=j[0],T=j[1],y=(0,a.useState)(!0),N=(0,i.Z)(y,2),E=N[0],I=N[1],F=(0,a.useState)(!1),k=(0,i.Z)(F,2),O=k[0],L=k[1],P=(0,a.useState)(""),B=(0,i.Z)(P,2),D=B[0],A=B[1],R=(0,a.useState)(!0),U=(0,i.Z)(R,2),M=U[0],z=U[1],G=(0,a.useState)("null"),K=(0,i.Z)(G,2),W=K[0],H=K[1],J=new Date;return(0,a.useEffect)((function(){if(void 0===l.version_id)return f?(p.Z.invoke("GET","/api/v1/buckets/".concat(c,"/objects?prefix=").concat((0,S.LL)(l.name)).concat(f?"&with_versions=true":"")).then((function(e){var n=(e.objects||[]).find((function(e){return e.is_latest}));H(n?"".concat(n.version_id):"null")})).catch((function(e){d((0,C.zb)(e))})),void I(!1)):(H("null"),void I(!1));H(l.version_id||"null"),I(!1)}),[c,l,f,d]),(0,a.useEffect)((function(){if(M&&!E){L(!0),T("");var e=new Date("".concat(D)),n=new Date,t=Math.ceil((e.getTime()-n.getTime())/1e3);t>0&&p.Z.invoke("GET","/api/v1/buckets/".concat(c,"/objects/share?prefix=").concat((0,S.LL)(l.name),"&version_id=").concat(W).concat(""!==D?"&expires=".concat(t,"s"):"")).then((function(e){T(e),L(!1)})).catch((function(e){d((0,C.zb)(e)),T(""),L(!1)}))}}),[l,D,c,M,T,d,f,E,W]),(0,Z.jsx)(a.Fragment,{children:(0,Z.jsxs)(x.Z,{title:"Share File",titleIcon:(0,Z.jsx)(s.aAc,{style:{fill:"#4CCB92"}}),modalOpen:t,onClose:function(){o()},children:[E&&(0,Z.jsx)(h.ZP,{item:!0,xs:12,children:(0,Z.jsx)(m.Z,{})}),!E&&(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsxs)(h.ZP,{item:!0,xs:12,className:n.shareLinkInfo,children:["This is a temporary URL with integrated access credentials for sharing objects valid for up to 7 days.",(0,Z.jsx)("br",{}),(0,Z.jsx)("br",{}),"The temporary URL expires after the configured time limit."]}),(0,Z.jsx)("br",{}),(0,Z.jsx)(h.ZP,{item:!0,xs:12,className:n.dateContainer,children:(0,Z.jsx)(_,{initialDate:J,id:"date",label:"Active for",maxDays:7,onChange:function(e,n){z(n),n?A(e):(A(""),T(""))},entity:"Link"})}),(0,Z.jsx)(h.ZP,{item:!0,xs:12,className:"".concat(n.copyShareLink," ").concat(n.formFieldRow," "),children:(0,Z.jsx)(h.ZP,{item:!0,xs:12,className:n.copyShareLinkInput,children:(0,Z.jsx)(b.Z,{content:g,actionButton:(0,Z.jsx)(u(),{text:g,children:(0,Z.jsx)(s.zxk,{id:"copy-path",variant:"regular",onClick:function(){d((0,C.MK)("Share URL Copied to clipboard"))},disabled:""===g||O,style:{marginRight:"5px",width:"28px",height:"28px",padding:"0px"},icon:(0,Z.jsx)(s.TIy,{})})})})})})]})]})})}))},78562:function(e,n,t){t.r(n),t.d(n,{default:function(){return b}});var i=t(72791),o=t(56028),a=t(4942),r=t(29439),s=t(11135),c=t(25787),l=t(61889),d=t(40986),u=t(47922),h=t(45248),m=t(28182),f=t(80184),p=(0,c.Z)((function(){return(0,s.Z)({iframeContainer:{border:"0px",flex:"1 1 auto",width:"100%",height:250,backgroundColor:"transparent",borderRadius:5,"&.image":{height:500},"&.text":{height:700},"&.audio":{height:150},"&.video":{height:350},"&.fullHeight":{height:"calc(100vh - 185px)"}},iframeBase:{backgroundColor:"#fff"},iframeHidden:{display:"none"}})}))((function(e){var n=e.bucketName,t=e.object,o=e.isFullscreen,s=void 0!==o&&o,c=e.classes,p=(0,i.useState)(!0),x=(0,r.Z)(p,2),b=x[0],v=x[1],j="";if(t){var g=(0,h.LL)(t.name),Z=document.baseURI.replace(window.location.origin,"");j="".concat(window.location.origin).concat(Z,"api/v1/buckets/").concat(n,"/objects/download?preview=true&prefix=").concat(g),t.version_id&&(j=j.concat("&version_id=".concat(t.version_id)))}var _=(0,u.Bg)((null===t||void 0===t?void 0:t.name)||""),S=function(){v(!1)};return(0,f.jsxs)(i.Fragment,{children:[b&&(0,f.jsx)(l.ZP,{item:!0,xs:12,children:(0,f.jsx)(d.Z,{})}),(0,f.jsxs)("div",{style:{textAlign:"center"},children:["video"===_&&(0,f.jsx)("video",{style:{width:"auto",height:"auto",maxWidth:"calc(100vw - 100px)",maxHeight:"calc(100vh - 200px)"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:S,children:(0,f.jsx)("source",{src:j,type:"video/mp4"})}),"audio"===_&&(0,f.jsx)("audio",{style:{width:"100%",height:"auto"},autoPlay:!0,controls:!0,muted:!1,playsInline:!0,onPlay:S,children:(0,f.jsx)("source",{src:j,type:"audio/mpeg"})}),"image"===_&&(0,f.jsx)("img",{style:{width:"auto",height:"auto",maxWidth:"100vw",maxHeight:"100vh"},src:j,alt:"preview",onLoad:S}),"video"!==_&&"audio"!==_&&"image"!==_&&(0,f.jsx)("div",{className:(0,m.Z)(c.iframeBase,(0,a.Z)({},c.iframeHidden,b)),children:(0,f.jsx)("iframe",{src:j,title:"File Preview",allowTransparency:!0,className:"".concat(c.iframeContainer," ").concat(s?"fullHeight":_),onLoad:S,children:"File couldn't be loaded. Please try Download instead"})})]})]})})),x=t(75952),b=function(e){var n=e.open,t=e.bucketName,a=e.object,r=e.onClosePreview;return(0,f.jsx)(i.Fragment,{children:(0,f.jsx)(o.Z,{modalOpen:n,title:"Preview - ".concat(null===a||void 0===a?void 0:a.name),onClose:r,wideLimit:!1,titleIcon:(0,f.jsx)(x.$30,{}),children:(0,f.jsx)(p,{bucketName:t,object:a})})})}},47922:function(e,n,t){t.d(n,{Bg:function(){return s},LR:function(){return r},P_:function(){return c},kh:function(){return l}});var i=t(45248),o=t(76610),a=t(81551),r=function(e,n,t,r){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,c=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0,h=arguments.length>9?arguments[9]:void 0,m=document.createElement("a");document.body.appendChild(m);var f=document.baseURI.replace(window.location.origin,""),p=a.ZP.getState().system.anonymousMode,x="".concat(window.location.origin).concat(f,"api/v1/buckets/").concat(e,"/objects/download?prefix=").concat(n).concat(null!==s&&""!==s.trim()?"&override_file_name=".concat((0,i.LL)(s||"")):"");t&&(x=x.concat("&version_id=".concat(t)));var b=new XMLHttpRequest;return b.open("GET",x,!0),p&&b.setRequestHeader("X-Anonymous","1"),b.addEventListener("progress",(function(e){var n=Math.round(e.loaded/r*100);l&&l(n)}),!1),b.responseType="blob",b.onreadystatechange=function(){if(4===b.readyState)if(200===b.status){var e=b.getResponseHeader("Content-Disposition"),n="download";if(e)n=decodeURIComponent(e).split('"')[1];d&&d(),(0,o.GM)(c);var t=document.createElement("a");t.href=window.URL.createObjectURL(b.response),t.download=n,document.body.appendChild(t),t.click(),document.body.removeChild(t)}else{if("application/json"===b.getResponseHeader("Content-Type")){var i=JSON.parse(b.response);if(i.detailedMessage)return void u(i.detailedMessage)}u("Unexpected response status code (".concat(b.status,")."))}},b.onerror=function(){u&&u("A network error occurred.")},b.onabort=function(){h&&h()},b},s=function(e){var n=e.split(".").pop();return n?(n=n.toLowerCase(),["jif","jfif","apng","avif","svg","webp","bmp","ico","jpg","jpe","jpeg","gif","png","heic"].includes(n)?"image":["pdf"].includes(n)?"text":["wav","mp3","alac","aiff","dsd","pcm"].includes(n)?"audio":["mp4","avi","mpg","webm","mov","flv","mkv","wmv","avchd","mpeg-4"].includes(n)?"video":"none"):"none"},c=function(e){switch(e){case"name":return function(e,n){return e.name.localeCompare(n.name)};case"last_modified":return function(e,n){return new Date(e.last_modified).getTime()-new Date(n.last_modified).getTime()};case"size":return function(e,n){return(e.size||-1)-(n.size||-1)}}},l=function(e,n,t){if(0===t.length)return null;var i=t.filter((function(n){return n.resource.endsWith(":".concat(e))||n.resource.includes(":".concat(e,"/"))}));if(0===i.length)return null;var o=[],a=n.split("/");return i.forEach((function(e){var n=(e.resource.split(":").pop()||"").split("/");n.length>1&&n.every((function(e,n){return"*"!==e&&((!a[n]||a[n]===e)&&(a[n]||o.push({name:"".concat(e,"/"),size:0,last_modified:"",version_id:""}),!0))})),"StringEquals"!==e.conditionOperator&&"StringLike"!==e.conditionOperator||e.prefixes.forEach((function(e){if(""!==e){var n=e.split("/"),t=[];n.every((function(e,n){return!e.includes("*")&&""!==e&&(e!==a[n]?(o.push({name:"".concat(t.join("/")).concat(t.length>0?"/":"").concat(e,"/"),size:0,last_modified:"",version_id:""}),!1):(""!==e&&t.push(e),!0))}))}}))})),o}},75578:function(e,n,t){var i=t(1413),o=t(72791),a=t(80184);n.Z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t){return(0,a.jsx)(o.Suspense,{fallback:n,children:(0,a.jsx)(e,(0,i.Z)({},t))})}}},81159:function(e,n,t){var i=t(4942),o=t(1413),a=t(72791),r=t(11135),s=t(25787),c=t(9955),l=t(30829),d=t(20068),u=t(20890),h=t(61889),m=t(23814),f=t(75952),p=t(28182),x=t(80184),b=(0,s.Z)((function(e){return{root:{width:50,height:24,padding:0,margin:0},switchBase:{padding:1,"&$checked":{transform:"translateX(24px)",color:e.palette.common.white,"& + $track":{backgroundColor:"#4CCB92",boxShadow:"inset 0px 1px 4px rgba(0,0,0,0.1)",opacity:1,border:"none"}},"&$focusVisible $thumb":{color:"#4CCB92",border:"6px solid #fff"}},thumb:{width:22,height:22,backgroundColor:"#FAFAFA",border:"2px solid #FFFFFF",marginLeft:1},track:{borderRadius:12,backgroundColor:"#E2E2E2",boxShadow:"inset 0px 1px 4px rgba(0,0,0,0.1)",opacity:1,transition:e.transitions.create(["background-color","border"])},checked:{},focusVisible:{},switchContainer:{display:"flex",alignItems:"center",justifyContent:"flex-end"}}}))(c.Z);n.Z=(0,s.Z)((function(e){return(0,r.Z)((0,o.Z)((0,o.Z)({indicatorLabelOn:{fontWeight:"bold",color:"#081C42 !important"},indicatorLabel:{fontSize:12,color:"#E2E2E2",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"},tooltip:{fontSize:16}},m.OR),m.YI))}))((function(e){var n=e.label,t=void 0===n?"":n,r=e.onChange,s=e.value,c=e.id,m=e.name,v=e.checked,j=void 0!==v&&v,g=e.disabled,Z=void 0!==g&&g,_=e.switchOnly,S=void 0!==_&&_,C=e.tooltip,w=void 0===C?"":C,T=e.description,y=void 0===T?"":T,N=e.classes,E=e.indicatorLabels,I=e.extraInputProps,F=void 0===I?{}:I,k=(0,x.jsxs)(a.Fragment,{children:[!S&&(0,x.jsx)("span",{className:(0,p.Z)(N.indicatorLabel,(0,i.Z)({},N.indicatorLabelOn,!j)),children:E&&E.length>1?E[1]:"OFF"}),(0,x.jsx)(b,{checked:j,onChange:r,color:"primary",name:m,inputProps:(0,o.Z)({"aria-label":"primary checkbox"},F),disabled:Z,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:s,id:c}),!S&&(0,x.jsx)("span",{className:(0,p.Z)(N.indicatorLabel,(0,i.Z)({},N.indicatorLabelOn,j)),children:E?E[0]:"ON"})]});return S?k:(0,x.jsx)("div",{children:(0,x.jsxs)(h.ZP,{container:!0,alignItems:"center",children:[(0,x.jsx)(h.ZP,{item:!0,xs:12,sm:8,md:8,children:""!==t&&(0,x.jsxs)(l.Z,{htmlFor:c,className:N.inputLabel,children:[(0,x.jsx)("span",{children:t}),""!==w&&(0,x.jsx)("div",{className:N.tooltipContainer,children:(0,x.jsx)(d.Z,{title:w,placement:"top-start",children:(0,x.jsx)("div",{className:N.tooltip,children:(0,x.jsx)(f.byK,{})})})})]})}),(0,x.jsx)(h.ZP,{item:!0,xs:12,sm:""!==t?4:12,md:""!==t?4:12,textAlign:"right",justifyContent:"end",className:N.switchContainer,children:k}),""!==y&&(0,x.jsx)(h.ZP,{item:!0,xs:12,textAlign:"left",children:(0,x.jsx)(u.Z,{component:"p",className:N.fieldDescription,children:y})})]})})}))},21435:function(e,n,t){var i=t(29439),o=t(1413),a=t(72791),r=t(27391),s=t(61889),c=t(30829),l=t(20068),d=t(13400),u=t(20165),h=t(3579),m=t(11135),f=t(72455),p=t(25787),x=t(23814),b=t(75952),v=t(28182),j=t(80184),g=(0,f.Z)((function(e){return(0,m.Z)((0,o.Z)({},x.gM))}));function Z(e){var n=g();return(0,j.jsx)(r.Z,(0,o.Z)({InputProps:{classes:n}},e))}n.Z=(0,p.Z)((function(e){return(0,m.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},x.YI),x.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var n=e.label,t=e.onChange,r=e.value,m=e.id,f=e.name,p=e.type,x=void 0===p?"text":p,g=e.autoComplete,_=void 0===g?"off":g,S=e.disabled,C=void 0!==S&&S,w=e.multiline,T=void 0!==w&&w,y=e.tooltip,N=void 0===y?"":y,E=e.index,I=void 0===E?0:E,F=e.error,k=void 0===F?"":F,O=e.required,L=void 0!==O&&O,P=e.placeholder,B=void 0===P?"":P,D=e.min,A=e.max,R=e.overlayId,U=e.overlayIcon,M=void 0===U?null:U,z=e.overlayObject,G=void 0===z?null:z,K=e.extraInputProps,W=void 0===K?{}:K,H=e.overlayAction,J=e.noLabelMinWidth,V=void 0!==J&&J,Y=e.pattern,q=void 0===Y?"":Y,$=e.autoFocus,X=void 0!==$&&$,Q=e.classes,ee=e.className,ne=void 0===ee?"":ee,te=e.onKeyPress,ie=e.onFocus,oe=e.onPaste,ae=(0,o.Z)({"data-index":I},W),re=(0,a.useState)(!1),se=(0,i.Z)(re,2),ce=se[0],le=se[1];"number"===x&&D&&(ae.min=D),"number"===x&&A&&(ae.max=A),""!==q&&(ae.pattern=q);var de=M,ue=x;return"password"===x&&null===M&&(de=ce?(0,j.jsx)(u.Z,{}):(0,j.jsx)(h.Z,{}),ue=ce?"text":"password"),(0,j.jsx)(a.Fragment,{children:(0,j.jsxs)(s.ZP,{container:!0,className:(0,v.Z)(""!==ne?ne:"",""!==k?Q.errorInField:Q.inputBoxContainer),children:[""!==n&&(0,j.jsxs)(c.Z,{htmlFor:m,className:V?Q.noMinWidthLabel:Q.inputLabel,children:[(0,j.jsxs)("span",{children:[n,L?"*":""]}),""!==N&&(0,j.jsx)("div",{className:Q.tooltipContainer,children:(0,j.jsx)(l.Z,{title:N,placement:"top-start",children:(0,j.jsx)("div",{className:Q.tooltip,children:(0,j.jsx)(b.byK,{})})})})]}),(0,j.jsxs)("div",{className:Q.textBoxContainer,children:[(0,j.jsx)(Z,{id:m,name:f,fullWidth:!0,value:r,autoFocus:X,disabled:C,onChange:t,type:ue,multiline:T,autoComplete:_,inputProps:ae,error:""!==k,helperText:k,placeholder:B,className:Q.inputRebase,onKeyPress:te,onFocus:ie,onPaste:oe}),de&&(0,j.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==n?"withLabel":""),children:(0,j.jsx)(d.Z,{onClick:H?function(){H()}:function(){return le(!ce)},id:R,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:de})}),G&&(0,j.jsx)("div",{className:"".concat(Q.overlayAction," ").concat(""!==n?"withLabel":""),children:G})]})]})})}))},64163:function(e,n,t){var i=t(1413),o=t(72791),a=t(61889),r=t(11135),s=t(25787),c=t(23814),l=t(80184);n.Z=(0,s.Z)((function(e){return(0,r.Z)((0,i.Z)({},c.xx))}))((function(e){var n=e.classes,t=e.label,i=void 0===t?"":t,r=e.content,s=e.multiLine,c=void 0!==s&&s,d=e.actionButton;return(0,l.jsx)(o.Fragment,{children:(0,l.jsxs)(a.ZP,{className:n.prefinedContainer,children:[""!==i&&(0,l.jsx)(a.ZP,{item:!0,xs:12,className:n.predefinedTitle,children:i}),(0,l.jsxs)(a.ZP,{item:!0,xs:12,className:"".concat(n.predefinedList," ").concat(d?n.includesActionButton:""),children:[(0,l.jsx)(a.ZP,{item:!0,xs:12,className:c?n.innerContentMultiline:n.innerContent,children:r}),d&&(0,l.jsx)("div",{className:n.overlayShareOption,children:d})]})]})})}))},83679:function(e,n,t){var i=t(4942),o=t(1413),a=(t(72791),t(28182)),r=t(61889),s=t(10765),c=t(85523),l=t(61419),d=t(30829),u=t(20068),h=t(11135),m=t(25787),f=t(72455),p=t(23814),x=t(75952),b=t(80184),v=(0,f.Z)((0,o.Z)({root:{"&:hover":{backgroundColor:"transparent"}}},p.FU)),j=function(e){var n=v();return(0,b.jsx)(l.Z,(0,o.Z)({className:n.root,disableRipple:!0,color:"default",checkedIcon:(0,b.jsx)("span",{className:n.radioSelectedIcon}),icon:(0,b.jsx)("span",{className:n.radioUnselectedIcon})},e))};n.Z=(0,m.Z)((function(e){return(0,h.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},p.YI),p.Hr),{},{optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E",fontWeight:700}}}))}))((function(e){var n=e.selectorOptions,t=void 0===n?[]:n,o=e.currentSelection,l=e.label,h=e.id,m=e.name,f=e.onChange,p=e.tooltip,v=void 0===p?"":p,g=e.disableOptions,Z=void 0!==g&&g,_=e.classes,S=e.displayInColumn,C=void 0!==S&&S;return(0,b.jsxs)(r.ZP,{container:!0,spacing:1,children:[(0,b.jsx)(r.ZP,{item:!0,fontSize:60,children:(0,b.jsxs)(d.Z,{htmlFor:h,className:_.inputLabel,children:[(0,b.jsx)("span",{children:l}),""!==v&&(0,b.jsx)("div",{className:_.tooltipContainer,children:(0,b.jsx)(u.Z,{title:v,placement:"top-start",children:(0,b.jsx)("div",{children:(0,b.jsx)(x.byK,{})})})})]})}),(0,b.jsx)(r.ZP,{item:!0,children:(0,b.jsx)(s.Z,{"aria-label":h,id:h,name:m,value:o,onChange:f,row:!C,style:{display:"flex",textAlign:"right"},children:t.map((function(e){return(0,b.jsx)(c.Z,{value:e.value,control:(0,b.jsx)(j,{}),label:e.label,disabled:Z,className:(0,a.Z)(_.optionLabel,(0,i.Z)({},_.checkedOption,e.value===o))},"rd-".concat(m,"-").concat(e.value))}))})})]})}))},90673:function(e,n,t){var i=t(1413),o=t(72791),a=t(61889),r=t(4834),s=t(30829),c=t(20068),l=t(68096),d=t(58406),u=t(77865),h=t(11135),m=t(25787),f=t(23814),p=t(75952),x=t(80184),b=(0,m.Z)((function(e){return(0,h.Z)({root:{height:38,lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{height:38,position:"relative",color:"#07193E",fontSize:13,fontWeight:600,padding:"8px 20px 10px 10px",border:"#e5e5e5 1px solid",borderRadius:4,display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(r.ZP);n.Z=(0,m.Z)((function(e){return(0,h.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},f.YI),f.Hr),{},{fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var n=e.classes,t=e.id,i=e.name,r=e.onChange,h=e.options,m=e.label,f=e.tooltip,v=void 0===f?"":f,j=e.value,g=e.disabled,Z=void 0!==g&&g;return(0,x.jsx)(o.Fragment,{children:(0,x.jsxs)(a.ZP,{item:!0,xs:12,className:n.fieldContainer,children:[""!==m&&(0,x.jsxs)(s.Z,{htmlFor:t,className:n.inputLabel,children:[(0,x.jsx)("span",{children:m}),""!==v&&(0,x.jsx)("div",{className:n.tooltipContainer,children:(0,x.jsx)(c.Z,{title:v,placement:"top-start",children:(0,x.jsx)("div",{className:n.tooltip,children:(0,x.jsx)(p.byK,{})})})})]}),(0,x.jsx)(l.Z,{fullWidth:!0,children:(0,x.jsx)(d.Z,{id:t,name:i,value:j,onChange:r,input:(0,x.jsx)(b,{}),disabled:Z,children:h.map((function(e){return(0,x.jsx)(u.Z,{value:e.value,children:e.label},"select-".concat(i,"-").concat(e.label))}))})})]})})}))},14917:function(e,n,t){t(72791);var i=t(61889),o=t(72455),a=t(80184),r=(0,o.Z)((function(e){return{headerBarIcon:{marginRight:".7rem",color:e.palette.primary.main,"& .min-icon":{width:44,height:44},"@media (max-width: 600px)":{display:"none"}},headerBarSubheader:{color:"grey","@media (max-width: 900px)":{maxWidth:200}},stContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:8,borderBottom:"1px solid #EAEAEA","@media (max-width: 600px)":{flexFlow:"column"}},titleColumn:{height:"auto",justifyContent:"center",display:"flex",flexFlow:"column",alignItems:"flex-start","& h1":{fontSize:19}},leftItems:{display:"flex",alignItems:"center","@media (max-width: 600px)":{flexFlow:"column",width:"100%"}},rightItems:{display:"flex",alignItems:"center","& button":{marginLeft:8},"@media (max-width: 600px)":{width:"100%"}}}}));n.Z=function(e){var n=e.icon,t=e.title,o=e.subTitle,s=e.actions,c=e.className,l=r();return(0,a.jsx)(i.ZP,{container:!0,children:(0,a.jsxs)(i.ZP,{item:!0,xs:12,className:"".concat(l.stContainer," ").concat(c||""),children:[(0,a.jsxs)("div",{className:l.leftItems,children:[n?(0,a.jsx)("div",{className:l.headerBarIcon,children:n}):null,(0,a.jsxs)("div",{className:l.titleColumn,children:[(0,a.jsx)("h1",{style:{margin:0},children:t}),(0,a.jsx)("span",{className:l.headerBarSubheader,children:o})]})]}),(0,a.jsx)("div",{className:l.rightItems,children:s})]})})}},73669:function(e,n,t){var i=t(29439),o=t(72791),a=t(64554),r=t(75952),s=t(21435),c=t(80184);n.Z=function(e){var n=e.value,t=(0,o.useState)(!1),l=(0,i.Z)(t,2),d=l[0],u=l[1];return(0,c.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",flexFlow:{sm:"row",xs:"column"}},children:[(0,c.jsx)(s.Z,{id:"inspect-dec-key",name:"inspect-dec-key",placeholder:"",label:"",type:d?"text":"password",onChange:function(){},value:n,overlayIcon:(0,c.jsx)(r.TIy,{}),extraInputProps:{readOnly:!0},overlayAction:function(){return navigator.clipboard.writeText(n)}}),(0,c.jsx)(r.zxk,{id:"show-hide-key",style:{marginLeft:"10px"},variant:"callAction",onClick:function(){return u(!d)},label:"Show/Hide"})]})}},26824:function(e,n,t){t.d(n,{HE:function(){return a},V9:function(){return i},ci:function(){return o},x2:function(){return r}});var i=1006,o=1008,a=1011,r=function(e){var n="ws";return"https:"===e&&(n="wss"),n}}}]);
|
|
//# sourceMappingURL=5522.0cd4f3c8.chunk.js.map
|