@reltio/remotes 1.4.988 → 1.4.989
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/871.js +1 -1
- package/package.json +1 -1
package/871.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[871],{67462:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r),l=n(27536);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,r.forwardRef)(((n,r)=>(0,l.S)()?a().createElement(e,o({},n,{ref:r})):t&&a().createElement(t,o({},n,{ref:r}))));return n.displayName="WithAsyncMount",n}},85777:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(40435),s=n(98989);const c=(0,n(79692).Z)({expandButton:{"&:hover":{backgroundColor:"transparent"}},expandIcon:{transition:"transform .15s ease"},expanded:{transform:"rotate(90deg)"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{const t=c(),{expanded:n,className:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["expanded","className"]);return a().createElement(i.Z,u({icon:s.Z,size:"XXS",disableRipple:!0,iconClassName:o()(t.expandIcon,{[t.expanded]:n}),className:o()(r,t.expandButton)},l))}},91431:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(3073),s=n(28831),c=n(71153),u=n.n(c);const p=(0,n(79692).Z)((()=>({hidden:{visibility:"hidden"}}))),m=e=>{let{rowIndex:t,rowValue:n,className:l}=e;const o=p(),{toggleRowCollapse:c,getIsRowCollapsible:m,getIsRowCollapsed:d}=(0,r.useContext)(i.x),g=m(n),f=d(t);return a().createElement(s.Z,{className:u()(l,{[o.hidden]:!g}),isOpen:!f,onClick:e=>{c(t),e.stopPropagation()}})};m.propTypes={rowIndex:o().number,rowValue:o().object,className:o().string};const d=m},89925:(e,t,n)=>{n.d(t,{J:()=>$});var r=n(24328),a=n.n(r),l=n(95544),o=n(87918),i=n.n(o),s=n(86689),c=n(90436),u=n(43054),p=n(98538),m=n(39475),d=n(52730),g=n(71153),f=n.n(g),b=n(89810),h=n(27502),y=n(63929),x=n(18527);const v=(e,t)=>{const n=e.relatedObjectUris.indexOf(t);if(n>=0)return e.relatedObjectUris[1-n]},E=e=>`${i().date(e,"LT")} ${i().date(e,"LL")}`;var w=n(79692);const C=(0,w.Z)((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),O=e=>{let{comment:t,className:n}=e;const o=C(),s=(0,d.useSelector)(b.ZP.selectors.getEntity),u=(0,d.useSelector)(b.ZP.selectors.getMetadata),p=(0,r.useContext)(y.X);return a().createElement(l.Z,{className:n},(()=>{switch(t.objectType){case h.q7e.ENTITY_ATTRIBUTE:{const e=(0,h.AFK)(t.objectId,s.type),n=(0,h.zeJ)(u,e);return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected attribute:")),a().createElement(c.Z,{className:o.label},null==n?void 0:n.label))}case h.q7e.ENTITY:return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected profile:")),a().createElement(x.Z,{className:f()(o.label,o.link),value:(0,h.wwR)(s)},(0,h.idV)(s.label)));case h.q7e.RELATION:{var e;const n=v(t,s.uri),r={uri:n,label:null===(e=p[n])||void 0===e?void 0:e.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected relation:")),a().createElement(c.Z,{className:o.label},a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(s)},(0,h.idV)(s.label)),n&&a().createElement(a().Fragment,null,` ${i().text("to")} `,a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(r)},r.label?(0,h.idV)(r.label):(0,h.BTI)(r)))))}case h.q7e.POTENTIAL_MATCH:{var n;const e=v(t,s.uri),r={uri:e,label:null===(n=p[e])||void 0===n?void 0:n.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected potential match:")),a().createElement(c.Z,{className:o.label},a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(s)},(0,h.idV)(s.label)),e&&a().createElement(a().Fragment,null,` ${i().text("and")} `,a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(r)},r.label?(0,h.idV)(r.label):(0,h.BTI)(r)))))}default:return null}})())};var S=n(89575);const N=(0,w.Z)((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),T=e=>{let{comment:t,className:n}=e;const l=N(),o=(0,r.useContext)(S.s);return a().createElement(c.Z,{className:f()(l.root,n)},function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"+";const a=[];let l="",o=!1;for(let i=0;i<=e.length;i++){const s=e[i],c=e[i+1],u=i===e.length-1;l+=s,s===r&&0===i&&(o=!0),o&&t.includes(l.slice(r.length))&&(o=!1,a.push(n(l)),l=""),c===r&&(o=!0,a.push(l),l=""),u&&a.push(l)}return a}(t.content,t.namedUsers,(e=>{const t=o.find((t=>t.username===e.slice(1)));return t?a().createElement(s.Z,{href:`mailto:${t.email}`},e):e})).map(((e,t)=>a().createElement(r.Fragment,{key:t},e))))};var k=n(43434);const Z=(0,w.Z)((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(this,arguments)}const A=e=>{let{className:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","children"]);const l=Z();return a().createElement(k.Z,P({},r,{className:f()(l.root,t)}),n.split(".").map((e=>e[0].toUpperCase())).join(""))};var I=n(58142);const L=(0,w.Z)((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),j=e=>{let{onReply:t,className:n,uri:o,comment:g,onStartEditing:f}=e;const h=L(),y=(0,d.useSelector)(b.ZP.selectors.getUserName),x=g.createdBy===y,{resolveThread:v,reOpenThread:w,sending:C,deleteComment:S}=(0,r.useContext)(I.h),N=(0,r.useMemo)((()=>[{text:i().text("Edit"),onClick:f},{text:i().text("Delete"),onClick:()=>S({uri:o,commentId:g.commentId})}]),[f,S,o,g]);return a().createElement(l.Z,{className:n},a().createElement(l.Z,{className:h.header},a().createElement(A,{classes:{root:h.avatar}},g.createdBy),a().createElement(l.Z,{width:"100%"},a().createElement(c.Z,{className:h.username},g.createdBy)),a().createElement(c.Z,{className:h.createdAt},E(g.createdTime)),x&&a().createElement(p.Z,{buttonComponent:m.k,buttonProps:{icon:u.Z,tooltipTitle:i().text("Open menu")},popoverProps:{PopoverClasses:{root:h.dropdownMenu}},menuItems:N,menuId:"collaboration-comment-menu"})),a().createElement(l.Z,{className:h.body},a().createElement(O,{comment:g,className:h.commentTarget}),a().createElement(T,{comment:g,className:h.message}),a().createElement(l.Z,{className:h.buttons},a().createElement(s.Z,{className:h.button,onClick:t,component:"button"},i().text("Reply")),"open"===g.status&&a().createElement(s.Z,{disabled:C,className:h.button,onClick:()=>{v({commentId:g.commentId,uri:o})},component:"button"},i().text("Resolve")),"resolved"===g.status&&a().createElement(s.Z,{disabled:C,className:h.button,onClick:()=>{w({commentId:g.commentId,uri:o})},component:"button"},i().text("Re-open")))))},R=(0,w.Z)((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),D=e=>{let{className:t,reply:n}=e;const{createdBy:r,action:o,createdTime:s}=n,u=R();return a().createElement(l.Z,{className:f()(u.root,t)},a().createElement(A,{classes:{root:u.avatar}},r),a().createElement(l.Z,null,a().createElement(l.Z,{className:u.header},a().createElement(c.Z,{className:u.username},r),"resolve"===o&&a().createElement(c.Z,{className:u.marked},i().text("Marked as resolved")),"reopen"===o&&a().createElement(c.Z,{className:u.marked},i().text("Re-opened"))),"resolve"!==o&&a().createElement(T,{className:u.message,comment:n}),a().createElement(c.Z,{className:u.createdAt},E(s))))};var M=n(77277),V=n(17440),z=n(2271);const U=(0,w.Z)((e=>({root:{width:"100%",backgroundColor:"#fff",fontFamily:"Roboto","&__control":{fontSize:"13px"},"&__highlighter":{padding:"10px 22px",border:"1px solid transparent !important",maxHeight:"70px"},"&__input":{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,maxHeight:"70px",overflow:"auto !important"},"&__suggestions":{padding:"8px 0",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",transform:"translateY(-100%)"},"&__suggestions__list":{maxHeight:"200px",overflowY:"scroll"},"&__suggestions__item":{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover, &--focused":{backgroundColor:"rgba(0,0,0,0.04)"}}},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}const _=e=>{let{onChange:t,className:n}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["onChange","className"]);const o=U(),i=(0,r.useContext)(S.s);return a().createElement(z.r,B({},l,{onChange:(e,n,r,a)=>{t(n,r,(0,V.uniq)(a.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:f()(o.root,n)}),a().createElement(z.p,{trigger:"+",data:i.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:o.mention}))},F=(0,w.Z)({root:{padding:"6px 6px 6px 8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},textField:{maxWidth:"calc(100% - 40px)"},form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:{marginLeft:"40px",marginTop:"8px"},button:{"& + $button":{marginLeft:"8px"}}});var H=n(29627);const W=e=>{switch(e){case"open":return i().text("Reply...");case"resolved":return i().text("Adding a comment will re-open this");default:return""}},q=e=>{let{inputRef:t,className:n,uri:o,relatedObjectUris:s,objectType:c,popperRef:u,comment:p,isEditingComment:m,onCancel:g}=e;const h=F(),y=(0,d.useSelector)(b.ZP.selectors.getUserName),{createReply:x,createComment:v,sending:E,editComment:w}=(0,r.useContext)(I.h),[C,O]=(0,r.useState)(""),[S,N]=(0,r.useState)(""),[T,k]=(0,r.useState)([]),[Z,P]=(0,r.useState)(!1),L=(0,H._)(),j=""!==C.trim(),R=Z||j,D=null==p?void 0:p.status,z=(e,t,n)=>{k(n),O(e),N(t)},U=()=>{null==g||g(),z("","",[])};return(0,r.useEffect)((()=>{u&&u.current.update()}),[u,R]),(0,r.useEffect)((()=>{m?O(p.content):U()}),[m]),a().createElement(l.Z,{className:f()(h.root,n)},a().createElement("form",{onSubmit:e=>{e.preventDefault();const t=(0,V.cond)([[(0,V.always)(!p),()=>v({content:S,namedUsers:T,objectType:c,uri:o,relatedObjectUris:s})],[(0,V.always)(m),()=>w({content:S,namedUsers:T,commentId:p.commentId,objectType:c,replies:p.replies,relatedObjectUris:s,uri:o})],[V.T,()=>x({content:S,namedUsers:T,commentId:p.commentId,action:"open"===p.status?"none":"reopen",uri:o})]]);return L(t()).then(U).catch(console.log)},className:h.form},a().createElement(l.Z,{className:h.main},a().createElement(A,{classes:{root:h.avatar}},y),a().createElement(_,{className:h.textField,disabled:E,onChange:(e,t,n)=>{z(e,t,n)},inputRef:t,value:C,onFocus:()=>P(!0),onBlur:()=>P(!1),placeholder:W(D)})),R&&a().createElement(l.Z,{className:h.buttons},a().createElement(M.Z,{className:h.button,variant:"contained",color:"primary",disabled:!j||E,type:"submit"},((e,t)=>t?i().text("Edit"):"open"===e||"resolved"===e?i().text("Reply"):i().text("Comment"))(D,m)),a().createElement(M.Z,{disabled:E,onClick:()=>U(),className:h.button,variant:"outlined",color:"primary"},i().text("Cancel")))))},Y=(0,w.Z)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),$=(0,r.memo)((e=>{let{uri:t,relatedObjectUris:n,objectType:o,classes:i,popperRef:s,messagesRef:c,comment:u}=e;const p=(0,r.useRef)(),m=Y({classes:i}),[d,g]=(0,r.useState)(!1),f=a().createElement(q,{className:m.sendMessageArea,inputRef:p,popperRef:s,uri:t,relatedObjectUris:n,objectType:o,comment:u,onCancel:()=>g(!1),isEditingComment:d});return a().createElement(l.Z,{className:m.root},u&&a().createElement(a().Fragment,null,a().createElement("div",{className:m.messages,ref:c},a().createElement(j,{comment:u,uri:t,onReply:()=>{d&&g(!1),p.current.focus()},onStartEditing:()=>{g(!0)},className:m.comment}),a().createElement(l.Z,{className:m.replies},u.replies.map((e=>a().createElement(D,{key:e.replyId,className:m.repliedComment,reply:e}))))),f),!u&&f)}))},72316:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(79692),s=n(62901);const c=(0,i.Z)((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},[`.${s.U}:hover &`]:{visibility:"visible"}},showAlways:{}})));var u=n(55962),p=n(58142),m=n(38309),d=n(87918),g=n.n(d),f=n(80030);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const h=e=>a().createElement("svg",b({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),y=(0,i.Z)((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}},childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}))),x=a().forwardRef(((e,t)=>{let{children:n,onClick:r}=e;const l=y();return a().createElement(f.ZP,{title:g().text("Show comment")},a().createElement("div",{ref:t,className:l.root,onClick:r},a().createElement(h,{className:l.icon}),a().createElement("div",{className:l.childrenWrapper},n)))}));x.displayName="CommentButton";const v=x;function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),C=e=>{let{className:t,onClick:n}=e;const r=y();return a().createElement(f.ZP,{title:g().text("Add comment")},a().createElement("div",{className:o()(r.root,t),onClick:n},a().createElement(w,{className:r.icon})))};var O=n(95544),S=n(90436),N=n(27291),T=n(89925),k=n(39475),Z=n(80233);const P=(0,i.Z)((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:e=>{let{hasScroll:t}=e;return{marginLeft:"16px",marginRight:t?"2px":"8px"}},replies:e=>{let{hasScroll:t}=e;return{marginLeft:"8px",marginRight:t?"2px":"8px"}},sendMessageArea:e=>{let{hasScroll:t,scrollWidth:n}=e;return{marginLeft:"8px",marginRight:t?n+2:"8px"}},messages:{maxHeight:"400px",overflowY:"auto"}}))),A=e=>{let{uri:t,relatedObjectUris:n,objectType:l,anchorEl:o,onClose:i,open:s,comment:c}=e;const[u,m]=(0,r.useState)(0),d=P({scrollWidth:u,hasScroll:0!==u}),f=(0,r.useRef)(null),{resolveThread:b,loading:h,sending:y}=(0,r.useContext)(p.h),x=1+(null==c?void 0:c.replies.length);return a().createElement(Z.Z,{popperRef:f,anchorEl:o,open:s,placement:"right-start",onClose:i,className:d.popper},a().createElement(O.Z,{className:d.header},a().createElement(O.Z,{className:d.headerInfo},a().createElement(S.Z,{className:d.title},g().text("Comments")),c&&!h&&a().createElement(S.Z,{className:d.counter},g().number(x)," ",1===x?g().text("item"):g().text("items"))),c&&!h&&a().createElement(k.k,{className:d.resolveButton,size:"S",onClick:()=>{b({commentId:c.commentId,uri:t})},disabled:y,showForDisabled:!0,tooltipTitle:g().text("Resolve"),icon:N.Z,color:"primary"})),!h&&a().createElement(T.J,{popperRef:f,messagesRef:e=>{e&&m(e.offsetWidth-e.clientWidth)},classes:{root:d.collaborationItem,replies:d.replies,sendMessageArea:d.sendMessageArea,messages:d.messages,comment:d.comment},uri:t,relatedObjectUris:n,objectType:l,comment:c}))},I=e=>{let{className:t,uri:n,objectType:l,relatedObjectUris:i,onChangePopupVisibility:s,allowOnlyOneComment:d=!1,showAlways:g=!1}=e;const f=c(),[b,h]=(0,r.useState)(null),[y,x]=(0,r.useState)(!1),E=y&&Boolean(b),{currentComment:w,commentsMap:O,getComment:S,clearCurrentComment:N,objectTypes:T}=(0,r.useContext)(p.h),k=!!O&&(!T||T.includes(l)),Z=((null==O?void 0:O[n])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),P=!d||d&&0===Z.length,I=null===w&&E;(0,u.D)((()=>{s&&s(E)}),[E]);const L=(0,r.useContext)(m.A),j=(0,r.useMemo)((()=>L?[...i,...L]:i),[L,i]);return k&&a().createElement("div",{className:o()(f.root,t)},P&&a().createElement(C,{className:o()(f.addButton,{[f.showAlways]:g||I}),onClick:e=>{h(e.currentTarget),x(!0)}}),Z.map((e=>{let{replies:t,commentId:n}=e;return a().createElement(v,{ref:n===(null==w?void 0:w.commentId)?h:null,key:n,onClick:()=>(e=>{S(e),x(!0)})(n)},1+t)})),a().createElement(A,{anchorEl:b,open:E,onClose:()=>{h(null),N(),x(!1)},uri:n,relatedObjectUris:j,objectType:l,comment:w}))}},80560:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(71153),u=n.n(c),p=n(17440),m=n(27502),d=n(38442),g=n(33117),f=n(41008),b=n(63485),h=n(44876),y=n(94792);const x=(0,n(79692).Z)((()=>({popupContainer:{},container:{"&$popupContainer":{height:"408px",minWidth:"200px"}}})));function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=e=>{let{open:t,anchorEl:n,data:l,onSearch:o,onClose:i,titleText:s,filterText:c,onListItemClick:w,selected:C,hideCheckBox:O,renderGroupTitle:S}=e,N=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["open","anchorEl","data","onSearch","onClose","titleText","filterText","onListItemClick","selected","hideCheckBox","renderGroupTitle"]);const T=(0,r.useCallback)((e=>e.label.toLowerCase().includes(c.toLowerCase())),[c]),k=(0,r.useCallback)((e=>T(e)||(e.children||[]).some(k)),[T]),Z=(0,r.useMemo)((()=>{const e=(0,p.curry)(((e,n,r,a)=>[{item:E({},n,{filterText:c}),level:e,groupId:r,groupName:a},...t(n.children||[],r,a,e+1)])),t=function(t,n,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const l=t=>e(a,t,n,r),o=t.filter(k);return(S?p.map:p.chain)(l,o)};return t}),[c,S,k]),P=(0,r.useCallback)((e=>e.map((e=>({item:e,items:Z(e.attributes,e.id,e.label)}))).filter((e=>e.items.length))),[Z]),A=(0,r.useCallback)((e=>{let{item:t}=e;w(t,!C.find((e=>e.id===t.id||e.id.includes(`${t.id}.`))))}),[w,C]),I=(0,r.useMemo)((()=>(S?P:Z)(l)),[l,S,P,Z]),L=(0,r.useMemo)((()=>(0,f.LG)(I)),[I]),{focusIndex:j,handleKeyDown:R}=(0,h.t)({items:L,open:t,onSelectFocusedItem:A,selectedItems:C}),D=(0,r.useRef)(null);D.current=j;const M=(0,r.useCallback)(((e,t,n)=>{let{item:r,level:l=0}=t;const o=!!C.find((e=>e.id===r.id||e.id.includes(`${r.id}.`))),i=D.current===n;return a().createElement(g.Z,{key:r.id,onClick:w,checked:o,level:l,data:r,label:a().createElement(y.Z,{text:r.label,highlight:r.filterText}),labelInText:r.label,style:e,hideCheckBox:O,isFocused:i,notSelectable:r.notSelectable,LogoIcon:r.LogoIcon})}),[O,w,C]),V=(0,m.fW1)("label")(I)||308,z=x();return a().createElement(d.Z,v({open:t,className:u()(z.container,z.popupContainer),anchorEl:n,onClose:i,onSearch:o,title:s,containerWidth:V,searchInputOnKeyDown:R},N),a().createElement(b.Z,{height:300,renderItem:M,items:L,hideSubtitles:!0,getItemSize:()=>32,containerWidth:V,focusIndex:j,renderGroupTitle:S}))};C.propTypes={open:o().bool,hideCheckBox:o().bool,anchorEl:o().any,selected:o().array,data:o().array,filterText:o().string,titleText:o().string,onClose:o().func,onListItemClick:o().func,onSearch:o().func,renderGroupTitle:o().func},C.defaultProps={data:[],selected:[],titleText:s().text("Show/hide columns"),filterText:""};const O=C},22118:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(77277),s=n(8629),c=n(49429),u=n(38724),p=n(55999),m=n(79249);const d=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),g=e=>{let{open:t,title:n,content:r,onCancel:l,cancelCaption:g=o().text("Cancel"),onDiscard:f,discardCaption:b="",onSave:h,saveCaption:y=o().text("Save"),disabledSave:x=!1}=e;const v=d();return a().createElement(s.Z,{open:t,onClose:l,classes:{paperScrollPaper:v.paper}},a().createElement(m.Z,{classes:{root:v.title}},n),a().createElement(u.Z,{classes:{root:v.content}},a().createElement(p.Z,{classes:{root:v.contentText}},r)),a().createElement(c.Z,{className:v.actionButtons,disableSpacing:!0},l&&a().createElement(i.Z,{onClick:l},g),a().createElement("div",null,f&&a().createElement(i.Z,{onClick:f,classes:{root:v.discardButton}},b),a().createElement(i.Z,{onClick:h,color:"primary",disabled:x,autoFocus:!0},y))))}},87086:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(4190),o=n(60364);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=e=>{let{open:t=!0,children:n}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["open","children"]);const[c,u]=(0,r.useState)(t),p=(0,o.Z)().transitions.duration.leavingScreen;return(0,r.useEffect)((()=>{if(t!==c){if(!t){const e=setTimeout((()=>{u(!1)}),p);return()=>clearTimeout(e)}u(!0)}}),[t,p,c]),a().createElement(l.ZP,i({open:t},s),c&&n)};s.displayName="Drawer";const c=s},19304:(e,t,n)=>{n.d(t,{J:()=>c});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(7522);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>a().createElement(i.Z,s({message:o().text("No data available")},e))},37573:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),l=n(52730),o=n(71153),i=n.n(o),s=n(43434),c=n(27502),u=n(89810);const p=e=>{let{entity:t,avatarClassName:n,imageClassName:r}=e;const o=(0,l.useSelector)(u.ZP.selectors.getMetadata),p=(0,l.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",m=(0,c.uie)(o,p,t),d=(0,c.vPL)(p,(0,c.XH2)(o,t.type)),g=e=>{e.target.onError=null,e.target.src=(0,c.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(s.Z,{className:i()(n,r),src:m,imgProps:{onError:g}},a().createElement("img",{className:r,src:d,alt:"fallback entity avatar",onError:g}))}},20146:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(52730),o=n(71153),i=n.n(o),s=n(90436),c=n(27502),u=n(89810);const p=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),m=e=>{let{entity:t,className:n,size:r="small"}=e;const o=p(),m=(0,l.useSelector)(u.ZP.selectors.getMetadata),d=t.type,g=(0,c.nt9)(m,d)||{},f=(0,c.VD3)(m,g,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Z,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:i()(o[`entityType-${r}`],n),component:"div"},(0,c.jFi)(m,t))}},76773:(e,t,n)=>{n.d(t,{Z:()=>V});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(71153),p=n.n(u),m=n(45767),d=n(86619),g=n(27502),f=n(79692);const b=(0,f.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});var h=n(40435),y=n(38442),x=n(44876),v=n(33117),E=n(94792),w=n(63485);function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}const O=(0,c.always)(32),S=e=>{let{selectedEntityTypes:t,onItemClick:n,focusIndex:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["selectedEntityTypes","onItemClick","focusIndex"]);return a().createElement(w.Z,C({getItemSize:O,renderItem:(e,l,o)=>{let{item:i}=l;const s=!!t.find((e=>i.uri===e)),c=o===r;return a().createElement(v.Z,{key:i.uri,onClick:n,checked:s,data:i,label:a().createElement(E.Z,{text:i.label,highlight:i.filterText}),labelInText:i.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:i.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0},l))};S.propTypes={selectedEntityTypes:o().array,onItemClick:o().func,focusIndex:o().number};const N=(0,r.memo)(S);var T=n(80030);const k=(0,f.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),Z=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:a}=t;if(n.length>0){const[t]=n,l=document.createRange();l.setStart(t,0);for(let n=0;n<e.length;n++){l.setEnd(t,l.endOffset+e[n].length);const{width:o}=l.getBoundingClientRect();if(r+o>a)return n;n!==e.length-1&&l.setEnd(t,l.endOffset+", ".length)}}return-1},P=e=>e.join(", "),A=e=>`calc(${(0,c.isNil)(e)?"100%":`${e}px`} - 35px)`,I=e=>{let{list:t,maxWidth:n}=e;const l=k(),o=(0,r.useRef)(),[i,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=Z(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,o.current))}),[t]);const c=P(t),u=i>0,p=u?P(t.slice(0,-i)):c;return a().createElement(T.ZP,{title:u?c:""},a().createElement("div",{className:l.listLabelContainer},a().createElement("div",{style:{width:A(n)},className:l.listLabel,ref:o},c),a().createElement("div",{className:l.visibleItemsLabel},p),u&&a().createElement("div",{className:l.hiddenCount},`+${i}`)))};I.propTypes={list:o().arrayOf(o().string).isRequired,maxWidth:o().number};const L=I;function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const M=e=>{let{entityTypes:t,selectedEntityTypes:n,single:l,placeholder:o,enableEmptyValueUnderline:i,onChange:u,classes:f={},ListLabelProps:v={},disabled:E=!1}=e;const w=b(),[C,O]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>O(!0)),[]),T=(0,r.useCallback)((()=>O(!1)),[]),[k,Z]=(0,r.useState)(""),P=(0,r.useCallback)((()=>Z("")),[]),A=(0,r.useCallback)((0,c.pipe)(P,T),[T,P]),I=(0,r.useMemo)((()=>t.filter(g.oDv).filter((e=>{let{label:t}=e;return g.P6Y.strings.search(t,k)})).map(((e,t)=>({item:{item:R({},e,{filterText:k})},index:t})))),[t,k]),D=(0,r.useMemo)((()=>n.map((e=>t.find((0,c.propEq)("uri",e)))).map((0,c.prop)("label"))),[n,t]),M=(0,r.useCallback)(((e,t)=>{l?(u(t?[e.uri]:[]),A()):u(t?n.concat(e.uri):n.filter((t=>t!==e.uri)))}),[n,u,l,A]),V=(0,r.useCallback)((e=>{let{item:t}=e;const r=!n.includes(t.uri);M(t,r)}),[n,M]),{focusIndex:z,handleKeyDown:U}=(0,x.t)({items:I,open:C,onSelectFocusedItem:V,selectedItems:n,onClose:A}),B=(0,r.useRef)(),_=B.current?B.current.getBoundingClientRect().width:0,F=Math.max(_,255),H=0===n.length;return a().createElement(a().Fragment,null,a().createElement(d.Z,{label:s().text("Entity type"),ref:B,InputProps:{startAdornment:H&&!o?null:a().createElement("div",{className:p()(w.inputText,f.inputText)},H?a().createElement("div",null,o):a().createElement(L,j({},v,{list:D}))),classes:{root:w.inputRoot,input:p()(w.input,f.input,{[w.emptyInput]:H&&!o}),disabled:p()(w.disabledInput,{[w.disabledPointer]:E}),underline:w.disabledUnderline},endAdornment:a().createElement(h.Z,{size:"L",icon:m.Z,iconClassName:p()(w.icon,{[w["popup-opened-icon"]]:C}),disabled:E}),readOnly:!0,disabled:!0,disableUnderline:H&&!i},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:p()(w.inputLabel,f.label)}},value:"",onClick:E?void 0:S,classes:{root:p()(w.root,f.root)},margin:"dense",variant:"filled",disabled:E,"data-reltio-id":"entity-type-selector"}),a().createElement(y.Z,{open:C,anchorEl:B.current,onClose:A,onSearch:Z,title:s().text("Select entity types"),containerWidth:F,containerHeight:355,searchInputOnKeyDown:U,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":"entity-type-selector-popup"}},a().createElement(N,{items:I,onItemClick:M,selectedEntityTypes:n,width:F,height:245,focusIndex:z})))};M.propTypes={entityTypes:o().arrayOf(g.p8l),selectedEntityTypes:o().arrayOf(o().string).isRequired,onChange:o().func.isRequired,single:o().bool,enableEmptyValueUnderline:o().bool,placeholder:o().string,classes:o().shape({root:o().string,label:o().string,inputText:o().string,input:o().string}),ListLabelProps:o().shape({maxWidth:o().number}),disabled:o().bool};const V=(0,r.memo)(M)},55401:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(90436),s=n(95063);const c=e=>{let{className:t,message:n}=e;const r=(0,s.y)();return n?a().createElement(i.Z,{variant:"caption",className:o()(r.caption,t)},n):null}},93555:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(71153),a=n.n(r),l=n(55401),o=n(42494),i=n(74828),s=n(24328),c=n.n(s),u=n(95063);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const m=(0,s.memo)((e=>{let{errorMessage:t,children:n,className:r,classes:s}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["errorMessage","children","className","classes"]);const d=(0,u.y)(),g=!!t;return c().createElement(o.Z,p({className:a()(d.wrapper,r,null==s?void 0:s.root),error:!0},m),n,g&&c().createElement(i.Z,{className:a()(d.helperText,null==s?void 0:s.helperText)},c().createElement(l.Z,{message:t})))}))},95063:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((e=>({wrapper:{width:"100%"},helperText:{margin:"3px 0 1px 12px"},caption:{display:"flex",color:e.palette.error.main,fontSize:"12px",lineHeight:"16px"}})))},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(17998);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const l=s();return a().createElement(i.Z,{title:n,classes:{root:o()(l.container,t),title:l.title}},r)}},44363:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(17440),s=n(80030),c=n(79692);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const m=(0,i.range)(2,10).reduce(((e,t)=>u({},e,{[`&:nth-child(${t})`]:{paddingLeft:`calc(1em * (${t} - 2))`,"&::before":{content:'"└"',display:"inline-block",fontSize:"1em",marginRight:"5px",color:"rgba(255, 255, 255, 0.28)"}}})),{}),d=(0,c.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px","& p":{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},"& ul":{listStyleType:"none",padding:0,margin:0,"& li":u({fontSize:"10px",lineHeight:"11px",fontWeight:500,color:"rgba(255, 255, 255, 0.7)",marginTop:"4px"},m,{"&:last-child":{color:"white"}}),"& li + li":{marginTop:"2px"}}}})));function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}const f=e=>{let{pathToTitle:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["pathToTitle","children"]);const l=d(),o=t&&t.length?a().createElement("div",{className:l.tooltipContent},a().createElement("p",null,(0,i.last)(t)),t.length>2&&a().createElement("ul",null,t.map((e=>a().createElement("li",{key:e},e))))):"";return a().createElement(s.ZP,g({title:o,disableFocusListener:!0,classes:{tooltip:l.tooltip}},r),n)};f.propTypes={pathToTitle:o().arrayOf(o().string).isRequired,children:o().node};const b=f},94792:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);const l=(0,n(79692).Z)({highlight:{fontWeight:600}}),o=e=>{let{text:t="",highlight:n="",className:r}=e;const o=l(),i=n&&t.split(new RegExp(`(${n})`,"gi"));return a().createElement("span",null,n?i.map(((e,t)=>a().createElement("span",{key:t,className:e.toLocaleLowerCase()===n.toLocaleLowerCase()?r||o.highlight:""},e))):t)}},26729:(e,t,n)=>{n.d(t,{f:()=>b,Z:()=>h});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(80079);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M0 0h24v24H0z"}),a().createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-4.5-9l2.5 3.096V18H5l4.5-5.5 2.5 3.01L16.5 10zm-8-4a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",fillOpacity:.12,fill:"#000",fillRule:"nonzero"})));var u=n(27502);const p=(0,n(79692).Z)((e=>({root:{position:"relative"},image:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,objectFit:"cover",verticalAlign:"bottom"}},defaultContainer:{display:"flex",alignItems:"center",backgroundColor:"rgb(247, 247, 247)"},defaultImage:{width:"40px",height:"40px",marginLeft:"auto",marginRight:"auto",color:e.palette.text.secondary},hideImage:{display:"none"}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}const d="loading",g="loaded",f="error",b={SMALL:{imageWidth:114,imageHeight:114},MEDIUM:{imageWidth:162,imageHeight:162},LARGE:{imageWidth:192,imageHeight:192},OVERRIDE:{imageWidth:"unset",imageHeight:"unset"}},h=(0,r.memo)((e=>{const{src:t,className:n,containerClassName:l,size:s=b.SMALL,overlay:h=null}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["src","className","containerClassName","size","overlay"]),x=s||b.SMALL,v=p(x),[E,w]=(0,r.useState)(d);(0,r.useEffect)((()=>{w(d)}),[t]);const C=E===d,O=E===g;return E===f?a().createElement("div",m({className:o()(v.defaultContainer,v.image,n)},y),a().createElement(i.Z,{className:v.defaultImage})):a().createElement("div",{className:o()(v.root,l)},!(0,u.O27)(t)&&a().createElement("img",m({src:t,className:o()(v.image,n,{[v.hideImage]:C}),onLoad:()=>{w(g)},onError:()=>{w(f)},alt:"image"},y)),C&&a().createElement("div",m({className:o()(v.defaultContainer,v.image,n)},y),a().createElement(c,{className:v.defaultImage})),O&&h)}))},22349:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(17440),s=n(71153),c=n.n(s),u=n(77277),p=n(43054),m=n(40435),d=n(98538),g=n(52669),f=n(81556),b=n(79692);const h=(0,b.Z)((()=>({root:{fontSize:"24px",color:"#fff"}}))),y=e=>{let{checked:t,className:n,onClick:r}=e;const l=h(),o=t?f.Z:g.Z;return a().createElement(o,{className:c()(l.root,n),onClick:r})};var x=n(36746),v=n(79573);const E=(0,b.Z)((()=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"0.2s linear all","&:not($selected):not($selectionMode):hover":{backgroundColor:"rgba(0,0,0,0.6)"},userSelect:"none"},selected:{backgroundColor:"rgba(0,114,206,0.6)"},selectionMode:{cursor:"pointer","&:not($selected)":{backgroundColor:"rgba(0,0,0,0.6)"}},button:{padding:0,width:"100px",height:"36px",color:"#fff",fontSize:"14px",fontWeight:500,lineHeight:"16px",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"rgba(98,2,238,0)"},checkedIcon:{position:"absolute",left:"4px",top:"4px",cursor:"pointer"},actions:{display:"flex",alignItems:"center",position:"absolute",top:"4px",right:"4px"},actionButton:{color:"#fff",fontSize:"24px"},dropDownMenuButton:{margin:"0 2px 0 8px"}}))),w=(0,r.memo)((e=>{const{id:t,canBeSelected:n=!1,selected:l=!1,selectionMode:s=!1,onDeselect:g=v.ZT,onSelect:f=v.ZT,onShareLink:b,onSetAsDefault:h,onDelete:w,onDownload:C=v.ZT,onClick:O}=e,S=E(),[N,T]=(0,r.useState)(!1),k=(0,r.useMemo)((()=>[{text:o().text("Share link"),onClick:b},{text:o().text("Set as default"),onClick:h},{text:o().text("Delete"),onClick:w}].filter((0,i.prop)("onClick"))),[b,h,w]),Z=e=>()=>(0,i.ifElse)((0,i.equals)(!0),g,f)(e),P=n&&(l||N||s),A=!s&&!l&&N,I=n&&l;return a().createElement("div",{className:c()(S.overlay,{[S.selected]:l,[S.selectionMode]:s}),onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),onClick:s?Z(l):e=>{e.currentTarget===e.target&&O()}},P&&a().createElement(y,{className:S.checkedIcon,checked:l,onClick:Z(l)}),A&&a().createElement("div",{className:S.actions},a().createElement(m.Z,{onClick:C,className:S.actionButton,icon:x.Z}),a().createElement(d.Z,{menuId:`image-overlay-actions-${t}`,buttonComponent:m.Z,buttonProps:{icon:p.Z,className:c()(S.actionButton,S.dropDownMenuButton)},menuItems:k})),I&&a().createElement(u.Z,{className:S.button,variant:"outlined",onClick:g},o().text("Deselect")))}))},95596:(e,t,n)=>{n.d(t,{C:()=>v,A:()=>x});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(8629),s=n(38724),c=n(70331),u=n(15223),p=n(95544),m=n(87685),d=n(73115);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}const f=e=>a().createElement("svg",g({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M14 5a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1h10zm6 12v2h-3v-2h3zm2-4v2h-5v-2h5zm0-4v2h-5V9h5zm0-4v2h-5V5h5z",id:"Details_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fillRule:"evenodd"},a().createElement("mask",{id:"Details_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Details_svg__a"})),a().createElement("path",{mask:"url(#Details_svg__b)",d:"M0 0h24v24H0z"})));var b=n(39475),h=n(4270);const y=(0,n(79692).Z)((()=>({paper:{backgroundColor:"rgba(0, 0, 0, .85)"},backdrop:{backgroundColor:"transparent"},toolbar:{paddingLeft:"20px",paddingRight:"20px"},appBar:{position:"relative",background:"linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%)"},closeButton:{marginRight:"28px"},closeIcon:{fontSize:"24px",color:"#fff"},headerLeft:{display:"flex",alignItems:"center",flex:2},headerCenter:{display:"flex",justifyContent:"center",flex:1},headerRight:{flex:2,display:"flex",justifyContent:"flex-end",alignItems:"center"},modeSwitcher:{backgroundColor:"#fff"},content:{padding:0}})));let x;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(x||(x={}));const v=e=>{let{open:t,mode:n,children:l,header:g,onClose:v,onChangeMode:E}=e;const w=y(),C=(0,r.useMemo)((()=>[{id:x.GALLERY_MODE,title:o().text("Gallery"),Icon:d.Z},{id:x.DETAILS_MODE,title:o().text("Details"),Icon:f}]),[]);return a().createElement(i.Z,{classes:{paper:w.paper},open:t,BackdropProps:{className:w.backdrop},fullScreen:!0},a().createElement(c.Z,{classes:{colorPrimary:w.appBar}},a().createElement(u.Z,{className:w.toolbar},a().createElement(p.Z,{className:w.headerLeft},a().createElement(b.k,{tooltipTitle:o().text("Close"),onClick:v,className:w.closeButton,iconClassName:w.closeIcon,icon:m.default}),null==g?void 0:g.left),a().createElement(p.Z,{className:w.headerCenter},a().createElement(h.Z,{modes:C,modeId:n,onChange:E,className:w.modeSwitcher})),a().createElement(p.Z,{className:w.headerRight},null==g?void 0:g.right))),a().createElement(s.Z,{className:w.content},l))}},76283:(e,t,n)=>{n.d(t,{E:()=>d,Z:()=>g});var r=n(24328),a=n.n(r),l=n(4614),o=n(39475),i=n(61932),s=n(27291),c=n(79573),u=n(71153),p=n.n(u);const m=(0,n(79692).Z)({root:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px"},check:{color:"#8CC152"}});let d;!function(e){e[e.INIT=1]="INIT",e[e.PROGRESS=2]="PROGRESS",e[e.SUCCESS=3]="SUCCESS",e[e.DONE=4]="DONE"}(d||(d={}));const g=e=>{let{classes:t={},tooltip:n="",onClick:r=c.ZT,mode:u=d.INIT}=e;const g=m();return a().createElement("div",{className:p()(g.root,t.root)},(()=>{switch(u){case d.INIT:return a().createElement(o.k,{className:t.button,size:"M",tooltipTitle:n,icon:i.Z,onClick:r});case d.PROGRESS:return a().createElement(l.Z,{className:t.spinner,size:24});case d.SUCCESS:return a().createElement(s.Z,{className:p()(g.check,t.check)});default:return null}})())}},87378:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(67358);const s=(0,n(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:n=!1,className:r}=e;const l=s();return a().createElement(a().Fragment,null,a().createElement("div",{className:o()(l.loadingOverlay,r,{[l.transparent]:t,[l.relativePosition]:n})},a().createElement(i.Z,{color:"secondary"})))}},4270:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(77277),o=n(38592),i=n(71153),s=n.n(i),c=n(78223),u=n(79692),p=n(41128);const m=(0,u.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,p.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.U1)(e.palette.primary.main,.24)}}}))),d=(0,c.Z)(l.Z),g=e=>{let{className:t,classes:n={},modes:r=[],modeId:l,onChange:i}=e;const c=m();return a().createElement(o.Z,{className:t},r.map((e=>{let{id:t,title:r,tooltipTitle:o,Icon:u}=e;return a().createElement(d,{key:String(t),className:s()(c.button,{[c.current]:l===t},n.button),tooltipTitle:o,onClick:(p=t,()=>i(p)),"data-reltio-id":`reltio-search-mode-${t}`},u&&a().createElement(u,{className:c.icon}),r&&a().createElement("div",{className:c.title},r));var p})))}},80233:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(27556),s=n(1292),c=n(95544),u=n(7421);const p=(0,n(79692).Z)((e=>{const t=e.palette.background.paper;return{popoverRoot:{backgroundColor:t,maxWidth:1e3},popper:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}})),m=e=>{let{anchorEl:t,placement:n="top",arrow:r=!0,open:l,onClose:m=(()=>{}),children:d,className:g,popperRef:f}=e;const b=p(),[h,y]=a().useState(null);return a().createElement(u.Z,{anchorEl:t,placement:n,className:o()(b.popper,g),modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},arrow:{enabled:r,element:h}},open:l,modal:!1,popperRef:f},a().createElement(c.Z,null,a().createElement(s.Z,{onClickAway:e=>{var t;t=e.target,Array.from(document.querySelectorAll("[data-modal]")).some((e=>e.contains(t)))||m()}},a().createElement(i.Z,{className:b.popoverRoot},r?a().createElement("span",{className:b.arrow,ref:y}):null,a().createElement(c.Z,null,d)))))}},33109:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),p=n(90436),m=n(80030),d=n(87918),g=n.n(d),f=n(27502),b=n(89810),h=n(37573),y=n(63127),x=n(20146);const v=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}},scores:{display:"flex",flexGrow:1,justifyContent:"flex-end",paddingRight:"20px"}})));function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}const w=e=>{let{className:t,entity:n,scoresToShow:l,rangeColorsConfig:o,children:i,classes:d}=e;const w=v({classes:d}),C=(0,c.useSelector)(b.ZP.selectors.getMetadata),O=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const S=(0,f.idV)(n.label),N=n.secondaryLabel,T=(0,f.ptG)(C,n),k=(0,f.Fn9)(n),Z=(0,f.AET)(C,n,l),P=n.uri,A=(0,f.BTI)(n);return a().createElement("div",{className:s()(w.profileBandWrapper,t)},a().createElement("div",{className:s()(w.profileBand,{[w.inactive]:!k}),"data-entity-uri":P},a().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:w.profileIcon,imageClassName:w.imageProfileIcon}),a().createElement("div",{className:w.profileInfo},a().createElement("div",null,a().createElement(p.Z,{variant:"h6",className:w.label},S),N&&a().createElement(p.Z,{variant:"subtitle2",className:w.secondaryLabel},N),T&&a().createElement(p.Z,{variant:"subtitle1",className:w.businessCard},T)),a().createElement("div",{className:w.specialInfo},a().createElement("div",{className:w.entityType},a().createElement(x.Z,{entity:n,size:"medium",className:w.badge}),Z.length>0&&a().createElement("div",{className:w.scores},Z.map((e=>a().createElement(y.Z,E({key:e.uri},e,{rangeColorsConfig:o}))))),!(0,f.ZiX)(P)&&a().createElement(m.ZP,{title:g().text("Copy to clipboard")},a().createElement(p.Z,{display:"inline",variant:"body2",className:w.entityId,onClick:O},g().text("Entity ID"),": ",A))))),i&&a().createElement("div",null,i)))};w.propTypes={className:o().string,entity:o().object,scoresToShow:o().arrayOf(o().string),rangeColorsConfig:o().object,children:o().node,classes:o().object};const C=w},91026:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(52730),s=n(27502),c=n(89810);const u=(0,n(79692).Z)((e=>({container:{position:"relative",display:"flex",fontSize:"12px",lineHeight:"14px",color:e.palette.text.primary,padding:"8px 8px 8px 0",overflow:"hidden"},colorBox:{position:"absolute",opacity:.12,top:0,left:0,bottom:0,width:"32px"},image:{width:"32px",height:"32px"},avatar:{marginRight:"8px",marginLeft:"16px",marginTop:"2px"},info:{overflow:"hidden",display:"flex",flexDirection:"column"},firstRow:{width:"100%"},label:{display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:500,color:e.palette.primary.main},link:{textDecoration:"none"},secondRow:{wordWrap:"break-word",marginTop:"4px",lineHeight:"13px",fontSize:"11px"},thirdRow:{display:"flex",alignItems:"center",fontSize:"12px",color:e.palette.text.secondary,marginTop:"auto"}})));var p=n(37573),m=n(18527),d=n(83088),g=n(20146);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const b=(0,r.memo)((e=>{let{entity:t,classes:n={},disableEntityTypeColor:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","classes","disableEntityTypeColor"]);const b=u(),{secondaryLabel:h,label:y,container:x}=n,v=(0,i.useSelector)(c.ZP.selectors.getMetadata),E=(0,s.idV)(t.label),{secondaryLabel:w,type:C}=t,O=(0,s.nt9)(v,C)||{},S=(0,s.VD3)(v,O,"typeColor")||s.rSc.palette.primary.main;return a().createElement("div",f({className:o()(b.container,x)},l),a().createElement("div",{className:b.colorBox,style:r?void 0:{backgroundColor:S}}),a().createElement(p.Z,{entity:t,avatarClassName:b.avatar,imageClassName:b.image}),a().createElement("div",{className:b.info},a().createElement("div",{className:b.firstRow},a().createElement(m.Z,{value:(0,s.wwR)(t),className:b.link},a().createElement(d.C,{value:E,placement:"top",showOnExceededHeight:!0},a().createElement("span",{className:o()(b.label,y)},E)))),a().createElement("div",{className:b.secondRow},w&&a().createElement(d.C,{value:w,placement:"top",showOnExceededHeight:!0},a().createElement("span",{className:h},w))),a().createElement("div",{className:b.thirdRow},a().createElement(g.Z,{entity:t}),a().createElement("div",null,(0,s.BTI)(t)))))}))},88357:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(79692);const u=(0,c.Z)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));var p=n(87918),m=n.n(p),d=n(6782);const g="46px",f=(0,c.Z)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:g},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:g}}))),b=e=>{let{className:t,rowData:n}=e;const r=f();return a().createElement("div",{className:s()(r.readOnlyLogicOperatorContainer,t)},n&&n.operator?(0,d.Z)(n.operator):m().text("Where"))};b.propTypes={className:o().string,rowData:o().object};const h=b;var y=n(27502);const x=e=>{let{className:t,rowData:n}=e;const r=f();return a().createElement("div",{className:s()(r.readOnlyFilter,t)},n&&n.filter?(0,y.XS2)(n.filter):m().text("equals"))};x.propTypes={className:o().string,rowData:o().object};const v=x;var E=n(53862);const w=e=>{let{classes:t={},rowData:n,previousRowData:r,LogicOperatorComponent:l=h,AttributeSelectorComponent:o,FilterSelectorComponent:i=v,ValuesEditorComponent:c,ActionsComponent:p,filterSelectorRef:m,attributeSelectorProps:d={}}=e,g=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const f=u();return a().createElement("div",{className:s()(f.row,t.root)},a().createElement(l,{className:t.logicOperatorContainer,rowContext:g,rowData:r}),a().createElement("div",{className:s()(f.rowItem,t.attributeSelectorContainer)},a().createElement(o,{attributeSelectorProps:d,rowContext:g,rowData:n})),a().createElement("div",{className:s()(f.rowItem,t.filterSelectorContainer)},a().createElement(i,{textFieldInputRef:m,rowContext:g,rowData:n})),a().createElement("div",{className:s()(f.rowItem,f.fullWidth,t.valuesEditorContainer)},a().createElement(c,{rowContext:g,rowData:n})),a().createElement("div",{className:s()(f.rowItem,t.actionsContainer,{[f.hidden]:!n})},a().createElement(p,{rowContext:g,rowData:n})))};w.propTypes={classes:o().shape({root:o().string,logicOperatorContainer:o().string,attributeSelectorContainer:o().string,filterSelectorContainer:o().string,valuesEditorContainer:o().string,actionsContainer:o().string}),rowData:E.Xw,previousRowData:E.Xw,LogicOperatorComponent:o().elementType,AttributeSelectorComponent:o().elementType,FilterSelectorComponent:o().elementType,ValuesEditorComponent:o().elementType,ActionsComponent:o().elementType,filterSelectorRef:o().object,attributeSelectorProps:o().shape({onRestoreFocus:o().func,onOpen:o().func,disablePopoverRestoreFocus:o().bool})};const C=(0,r.memo)(w)},51586:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(17440),s=n(88357),c=n(53862);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:n,rowsData:r,lastRowAttributeSelectorProps:l,filterSelectorRef:o,filterSelectorRefIndex:c}=e,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const m=(e,t,r)=>{const m=t>0?(0,i.path)([t-1],r):null,d=t===r.length?{attributeSelectorProps:l}:{};return a().createElement(s.Z,u({key:e&&e.id,rowData:e,previousRowData:m,classes:n,filterSelectorRef:t===c?o:void 0},p,d))};return a().createElement("div",{className:t},r.map(m),m(null,r.length,r))};p.propTypes={className:o().string,rowClasses:o().shape({root:o().string,logicOperatorContainer:o().string,attributeSelectorContainer:o().string,filterSelectorContainer:o().string,valuesEditorContainer:o().string,actionsContainer:o().string}),rowsData:o().arrayOf(c.Xw),LogicOperatorComponent:o().elementType,AttributeSelectorComponent:o().elementType,FilterSelectorComponent:o().elementType,ValuesEditorComponent:o().elementType,ActionsComponent:o().elementType,filterSelectorRef:o().object,filterSelectorRefIndex:o().number,lastRowAttributeSelectorProps:o().shape({onRestoreFocus:o().func,onOpen:o().func,disablePopoverRestoreFocus:o().bool})};const m=(0,r.memo)(p)},2633:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(54573),a=n(17440);const l={BY_LABEL:(0,r.c)({stringify:(0,a.prop)("label")})}},62116:(e,t,n)=>{n.d(t,{Z:()=>q});var r=n(24328),a=n.n(r),l=n(17440),o=n(17871),i=n(75047);const s=e=>{let{children:t,className:n,position:a,map:l}=e;const[o,s]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=l.controls[a].length;return l.controls[a].push(e),s(e),()=>{l.controls[a].removeAt(t)}}),[l,a]),(0,r.useEffect)((()=>{o&&n&&o.classList.add(n)}),[n,o]),o?(0,i.createPortal)(t,o):null};var c=n(87918),u=n.n(c),p=n(77277),m=n(78223),d=n(41039);const g="circle",f="polygon",b=.001;function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}const y=e=>a().createElement("svg",h({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const v=e=>a().createElement("svg",x({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var E=n(79692);const w=(0,E.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),C=(0,m.Z)(p.Z),O=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:l,onClearOverlay:o}=e;const i=w(),s=e=>()=>{l(e)};return a().createElement("div",{className:i.container},t||r?a().createElement(C,{tooltipTitle:u().text("Clear area"),className:i.button,onClick:r?o:s(null)},a().createElement(d.Z,{className:i.icon})):n.map((e=>{const t=(e=>{switch(e){case g:return y;case f:return v;default:return null}})(e);return a().createElement(C,{tooltipTitle:u().text("Draw area"),key:e,className:i.button,onClick:s(e)},a().createElement(t,{className:i.icon}))})))};var S=n(5806),N=n(21324);const T=(0,E.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),k=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=T();return a().createElement(S.Z,{classes:{root:r.container,label:r.label},control:a().createElement(N.Z,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:u().text("Search as I move the map")})},Z=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),l=n.lng(),o=r.lat(),i=r.lng(),s=[],c=[];if(!(180===l&&-180===i||-180===l&&180===i)){const e=t.getCenter();s.push([a,e.lng()]),c.push([o,e.lng()])}return[[a,l],...s,[a,i],[o,i],...c,[o,l]]},P=e=>{switch(e){case g:return window.google.maps.drawing.OverlayType.CIRCLE;case f:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},A=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var I=n(91026),L=n(7421),j=n(27502),R=n(3064);const D=(0,E.Z)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(this,arguments)}const V=(0,j.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),z=(0,j.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),U=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=D(),c=(0,r.useRef)(),[u,p]=(0,r.useState)(!1),{activeEntityUri:m}=(0,r.useContext)(R.P),d=(0,l.pathEq)(["entity","uri"],m,t),g={lat:t.point.lat,lng:t.point.lng},f=(0,r.useCallback)((0,j.DsO)(p,50),[]),b=(0,r.useCallback)((()=>f(!0)),[f]),h=(0,r.useCallback)((()=>f(!1)),[f]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(L.Z,{anchorEl:c.current,open:u,className:s.popper,modal:!1,placement:"top"},a().createElement(I.Z,{entity:t.entity,onMouseOver:b,onMouseOut:h})),a().createElement(o.Jx,M({icon:{url:u||d?V:z,scaledSize:new google.maps.Size(22,32)},position:g,onClick:y,visible:!1!==t.visible,onMouseOver:b,onMouseOut:h},i)),a().createElement(o.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))}));var B=n(53857);const _=(0,E.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});var F=n(90690);function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=["drawing"],q=e=>{let{markers:t=[],mapKey:n,defaultZoom:i,defaultCenter:c,loadingElement:u,isSearchOnMapMove:p,isSearchEnabled:m,activeOverlay:d,overlayOptions:g,drawingModes:f=[],markerClusterer:h,markerClustererOptions:y,mapContainerClassName:x,onMapBoundsChanged:v,onOverlayUpdated:E,onMarkerClicked:w}=e;const C=_(),{isLoaded:S,loadError:N}=(0,o.Ji)({googleMapsApiKey:n,libraries:W}),T=(0,r.useRef)(null),[I,L]=(0,r.useState)(null),[j,R]=(0,r.useState)(null),[D,M]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:l}=e;const o=(0,F.D)(t),i=(0,F.D)(n),s=l&&window.google;(0,r.useEffect)((()=>{s&&!a&&t.length&&t!==o?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+b,e.lng()+b)),r.extend(new window.google.maps.LatLng(e.lat()-b,e.lng()-b))}t.fitBounds(r),n&&A(t,n,r)})(t,l,n):s&&n&&n!==i&&A(l,n)}),[l,t,n])})({markers:t,activeOverlay:d,map:I,isSearchOnMapMove:p});const V=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}({},B.r,g||{})),[g]),z=(0,r.useCallback)((e=>{v(e?Z(I):null),M(null),clearTimeout(T.current)}),[I,v]),q=(0,r.useCallback)((()=>{clearTimeout(T.current)}),[]),Y=(0,r.useCallback)((()=>{p&&v(Z(I))}),[p,I,v]),$=(0,r.useCallback)((()=>{p&&(clearTimeout(T.current),T.current=setTimeout(Y,1e3))}),[Y,p]),G=(0,r.useCallback)(((e,t)=>{const n=t||j&&{type:B.vl.POLYGON,overlay:j};if(!(0,l.isEmpty)(n)&&"function"==typeof E){const{overlay:e,type:t}=n,r={[B.vl.POLYGON]:()=>e.getPath().getArray().map((e=>[e.lat(),e.lng()])),[B.vl.CIRCLE]:()=>({radius:e.getRadius()/1e3,center:e.getCenter()})},a=r[t]&&r[t]();a&&E({data:a,type:t})}}),[E,j]),X=(0,r.useCallback)((e=>t=>{G(null,{type:e,overlay:t}),t.setMap(null),M(null)}),[G]),K=(0,r.useCallback)((()=>{E(null)}),[E]),Q=e=>t.filter((0,l.prop)("point")).map((t=>a().createElement(U,{key:t.id,marker:t,clusterer:e,onClick:w})));return N?null:S?a().createElement(o.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:{mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},onLoad:L,zoom:i,center:c,onZoomChanged:q,onDragStart:q,onIdle:$,mapContainerClassName:x},I&&m&&Boolean(f.length)&&a().createElement(s,{className:C.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:I},a().createElement(O,{hasActiveOverlay:!!d,drawingModes:f,drawingMode:D,onDrawingModeChanged:M,onClearOverlay:K})),I&&m&&a().createElement(s,{className:C.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:I},a().createElement(k,{onChangeIsSearchOnMapMove:z,isSearchOnMapMove:p})),h?(J=y,a().createElement(o.XL,{options:J},Q)):Q(),!P(D)&&d&&(0,l.propEq)("type",B.vl.POLYGON,d)&&a().createElement(o.mg,{onLoad:R,path:d.path,editable:!0,options:V,onMouseUp:G,onDragEnd:G}),m&&Boolean(f.length)&&a().createElement(o.j_,{onPolygonComplete:X(B.vl.POLYGON),onCircleComplete:X(B.vl.CIRCLE),drawingMode:P(D),options:{drawingControl:!1,circleOptions:V,polygonOptions:V}})):u;var J}},64435:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(13980),s=n.n(i),c=n(31396),u=n(60364);const p=(0,n(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var m=n(27502);const d=e=>"horizontal"===e,g=e=>{let{className:t,children:n,orientation:l,defaultSize:i,size:s,minSize:g,maxSize:f,allowResize:b,onChange:h}=e;const y=p(),x=(0,u.Z)(),[v,E]=(0,r.useState)(),[w,C]=(0,r.useState)(!0),O=(0,r.useCallback)((()=>C(!0)),[]),S=(0,r.useCallback)((()=>C(!1)),[]),N=()=>d(l)?null==v?void 0:v.clientHeight:null==v?void 0:v.clientWidth,T=(0,r.useCallback)((0,m.DsO)((e=>{const t=N();h({percentageSize:e/t*100+"%",isMaxSize:f>0?e===f:e===t+f,isMinSize:e===g})}),250),[h,l,f,v]),k=(0,r.useMemo)((()=>({transition:x.transitions.create(d(l)?"height":"width",{easing:x.transitions.easing.sharp,duration:x.transitions.duration.leavingScreen})})),[l,x]);return"number"==typeof s&&s<0&&(s=(N()||0)+s),a().createElement("div",{ref:E,className:o()(y.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:b,onChange:T,defaultSize:i,minSize:g,maxSize:f,onDragStarted:S,onDragFinished:O,pane1Style:w?k:void 0},n))},f=s().oneOfType([s().number,s().string]);g.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:f,size:f,minSize:f,maxSize:f,allowResize:s().bool,onChange:s().func};const b=g},63127:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(27502),u=n(74139),p=n(46801);const m=e=>{let{label:t,value:n,uri:r,rangeColorsConfig:l,className:o}=e;const i=(0,p.y)();return a().createElement("div",{className:s()(i.container,o),key:r},a().createElement(u.Z,{attrTypeUri:r,label:t}),a().createElement("span",{className:i.value,style:{color:(0,c.Uz2)(r,n,l)}},n))};m.propTypes={label:o().string,value:o().oneOfType([o().string,o().number]),uri:o().string,rangeColorsConfig:o().object,className:o().string};const d=m},74139:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(46801);const p=()=>{const e=(0,u.m)();return a().createElement(a().Fragment,null,a().createElement("span",null,"DQ"),a().createElement("span",{className:e.dqiq},"IQ"))},m=["analyticsAttributes/DQ/analyticsAttributes/score","analyticsAttributes/DQ"],d=["analyticsAttributes/IQ/analyticsAttributes/score","analyticsAttributes/IQ"],g=e=>{let{label:t="",attrTypeUri:n=""}=e;const r=n.indexOf("analyticsAttributes/"),l=n.substr(r),o=(0,c.includes)(l,m),i=(0,c.includes)(l,d);return(0,c.cond)([[(0,c.always)(o),(0,c.always)(a().createElement(p,null))],[(0,c.always)(i),(0,c.always)(s().text("Rank"))],[c.T,(0,c.always)(t)]])()};g.propTypes={label:o().string,attrTypeUri:o().string};const f=g},46801:(e,t,n)=>{n.d(t,{y:()=>a,m:()=>l});var r=n(79692);const a=(0,r.Z)({container:{display:"flex",flexShrink:0,marginLeft:"10px",alignItems:"center"},value:{marginLeft:"4px",minWidth:"20px",textAlign:"center"}}),l=(0,r.Z)({dqiq:{width:"14px",height:"14px",lineHeight:"14px",background:"#e6605e",color:"#fff",fontSize:"10px",fontWeight:100,marginLeft:"2px",marginRight:"1px",borderRadius:"2px",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,textIndent:0}})},33662:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(71153),a=n.n(r),l=n(17440),o=n(24328),i=n.n(o),s=n(87918),c=n.n(s),u=n(29611),p=n(50581),m=n(87685),d=n(21853),g=n(79573),f=n(40435),b=n(15311);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=(0,o.memo)((e=>{let{value:t,autofocus:n,onSearch:r=g.ZT,rootRef:s,classes:x={},height:v}=e,E=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height"]);const w=(0,b.y)({height:v}),[C,O]=(0,o.useState)(""),S=(0,l.pipe)((0,l.tap)(r),O),N=(0,l.isNil)(t)?C:t;return i().createElement(u.Z,h({startAdornment:i().createElement(p.Z,{position:"start"},i().createElement(d.default,{className:w.icon})),endAdornment:i().createElement(p.Z,{position:"end"},N.length>0&&i().createElement(f.Z,{icon:m.default,className:w.clearButton,onClick:()=>S("")})),autoFocus:n,classes:y({},x,{input:a()(w.input,x.input),root:a()(w.container,x.root)}),placeholder:c().text("Search"),value:N,onChange:(0,l.pipe)(g.NA,S),disableUnderline:!0,ref:s},E))}))},87356:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(33662),o=n(15311);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=e=>{let{classes:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["classes"]);const r=(0,o.y)({});return a().createElement(l.Z,i({classes:s({},t,{focused:r.white})},n))}},15311:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},38442:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(87918),u=n.n(c),p=n(79784),m=n(54275),d=n(33662);const g=e=>{let{title:t,className:n,onSearch:r,hideTitle:l,hideSearchInput:o,headerPlacement:i="top",containerWidth:c,containerHeight:g,searchInputOnKeyDown:f,children:b,searchInputRef:h}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef"]);const x=(0,m.Z)({containerWidth:c,containerHeight:g}),v=a().createElement(a().Fragment,null,!l&&a().createElement("div",{className:x.header},t),!o&&a().createElement(d.Z,{onSearch:r,autofocus:!0,onKeyDown:f,inputRef:h,classes:{root:x.searchInputContainer},placeholder:u().text("Search & add attributes"),height:40}));return a().createElement(p.ZP,y,a().createElement("div",{className:s()(x.container,n),style:{width:c}},"top"===i&&v,a().createElement("div",{className:x.list},b),"bottom"===i&&v))};g.propTypes={className:o().string,title:o().string,headerPlacement:o().oneOf(["top","bottom"]),onSearch:o().func,searchInputOnKeyDown:o().func,containerWidth:o().number,containerHeight:o().number,hideTitle:o().bool,hideSearchInput:o().bool,searchInputRef:o().shape({current:o().instanceOf(Element)}),children:o().node},g.defaultProps={anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};const f=g},44876:(e,t,n)=>{n.d(t,{t:()=>o});var r=n(24328),a=n(17440),l=n(63485);const o=e=>{let{items:t,open:n,onSelectFocusedItem:o,selectedItems:i,onClose:s}=e;const[c,u]=(0,r.useState)(null),p=(0,r.useRef)(!1),m=(0,r.useCallback)((e=>{let n=null===e?m(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&(0,l.c)(t[n]));)n+=1;return n!==t.length?n:m(-1)}),[t]),d=(0,r.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||(0,l.c)(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),g=(0,r.useCallback)((()=>{if(!(0,a.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&o({item:e.item,groupData:e})}}),[o,t,c]),f=(0,r.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(m),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(d),e.preventDefault(),!1;case"Enter":p.current=!0,g();break;case"Tab":s&&s(e);break;default:return}}),[t,m,d,g,s]);return(0,r.useEffect)((()=>{if(p.current){p.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,n,i]),{focusIndex:c,handleKeyDown:f}}},54275:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(79692);const a=(0,r.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},92985:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(13980),a=n.n(r),l=n(24328),o=n.n(l),i=n(71153),s=n.n(i),c=n(32701),u=n(90436);const p=(0,n(79692).Z)({label:{color:"rgba(0,0,0,0.6)",fontSize:"13px",lineHeight:"15px"}});var m=n(27502),d=n(74139);const g=e=>{let{label:t,isRequired:n,className:r,attributeType:a={}}=e;const l=p();return o().createElement(u.Z,{className:s()(l.label,r),component:"span"},o().createElement(d.Z,{label:t,attrTypeUri:a.uri}),n&&o().createElement(c.Z,null))};g.propTypes={label:a().string,isRequired:a().bool,className:a().string,attributeType:m.EMD};const f=g},57412:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(86689),s=n(83543);const c=(0,n(79692).Z)((()=>({viewMoreLessLink:{display:"flex",alignItems:"center",cursor:"pointer"},arrow:{marginRight:"8px",marginLeft:"-2px",transform:"rotate(0deg)",transition:"transform 0.35s ease"},rotated:{transform:"rotate(-180deg)"}})));var u=n(71153),p=n.n(u),m=n(87918),d=n.n(m);const g=e=>{let{active:t,onClick:n,className:r}=e;const l=c();return a().createElement(i.Z,{className:p()(l.viewMoreLessLink,r),onClick:n,underline:"none"},a().createElement(s.Z,{className:p()(l.arrow,{[l.rotated]:t})}),t?d().text("View less"):d().text("View more"))};g.propTypes={active:o().bool,onClick:o().func,className:o().string};const f=g},63485:(e,t,n)=>{n.d(t,{Z:()=>d,c:()=>p});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(50166),s=n(44443);const c=(0,n(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=n(41008);const p=e=>e.titleItemIndex===e.index,m=e=>{let{items:t,getItemSize:n,renderItem:l,renderGroupTitle:o,width:m="100%",height:d,fixedTitle:g=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:b,hideSubtitles:h,focusIndex:y=null,onInnerContainerResize:x}=e;const v=c(),E=(0,r.useRef)(null),w=(0,r.useRef)(null),C=(0,r.useRef)(null),O=(0,r.useRef)([0]),S={topMargin:0},N=(0,r.useMemo)((()=>!h||(t||[]).some((e=>null!==e.titleItemIndex))),[t,h]),T=(0,r.useCallback)((e=>{const r=O.current.length;let a=0;t.slice(r-1,e+1).forEach(((e,t)=>{const l=r+t-1;t>0&&(O.current[l]=O.current[l-1]+a),a=n(l,e.item)}))}),[n,t]),k=(0,r.useCallback)((e=>t[e].titleItemIndex),[t]),Z=(0,r.useCallback)((e=>t[e]),[t]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{E.current&&E.current.scrollTo(0)}))}),[t.length]),(0,r.useEffect)((()=>{E.current&&E.current.resetAfterIndex(0),P();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){T(t);const e=k(t);return{offset:O.current[t],titleHeight:n(e,Z(e).item)}}})(t);if(e&&e.offset&&E.current){const{titleHeight:t}=e,n=e.offset-t;(n<E.current.state.scrollOffset||n>E.current.state.scrollOffset+d)&&requestAnimationFrame((()=>{E.current&&E.current.scrollTo(n-(d-t)/2)}))}}),[T,Z,n,k,d,O,t,E]);const P=()=>{C.current&&w.current&&(C.current.style.width=w.current.offsetWidth+"px")},A=(0,r.useCallback)((e=>{let n=null,r=0;return t.some(((t,a)=>{T(a+10);const l=O.current[a+1];return e>=r&&e<l&&(n={index:a,offset:r,listItem:t}),r=l,n})),n}),[T,O,t]),I=(0,r.useCallback)((e=>n(e,Z(e).item)),[Z,n]),L=(0,r.useCallback)((e=>{let{index:t,style:n,data:r}=e;const a=Z(t);return a.item&&(p(a)&&o(n,a.item)||l(n,a.item,t,r))}),[Z,o,l]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:y,listRef:E}),R=(0,r.useCallback)((()=>t.filter((e=>p(e))).map((e=>(e=>a().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},o({height:n(e.index,e.item)},e.item)))(e)))),[n,t,o]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:C,className:v.stickyTitlesWrapper},g&&R()),x&&w.current&&a().createElement(s.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),a().createElement(i.VariableSizeList,{ref:E,itemCount:t.length,itemSize:I,width:m,height:d,itemKey:f,innerRef:w,onScroll:e=>{let{scrollOffset:r,scrollDirection:a}=e;if(!g||!N)return;const l=A(r),o=l&&k(l.index);var i;null!==o&&(i=o,C.current&&[...C.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===i.toString()?(e.style.visibility="visible",S.index=i):e.style.visibility="hidden"}))),P();const s=null!==o&&n(o,Z(o).item),c=A(r+s+S.topMargin);let u=0;if(c){switch(a){case"forward":c.offset-r>0&&p(c.listItem)&&(u=s-(c.offset-r));break;case"backward":{const e=o>-1&&(m=o,t.findIndex(((e,t)=>p(e)&&m<t))),n=(e=>(T(e),O.current[e]))(e);e>-1&&r<n&&s>=n-r&&(u=s-(n-r))}}(e=>{C.current&&(S.topMargin=-e,C.current.style.top=-e+"px")})(u)}var m},style:b?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},L))};m.propTypes={items:o().arrayOf(o().object).isRequired,getItemSize:o().func.isRequired,renderItem:o().func.isRequired,width:o().oneOfType([o().number,o().string]),height:o().number.isRequired,renderGroupTitle:o().func,fixedTitle:o().bool,hideSubtitles:o().bool,itemKey:o().func,disableHorizontalScrollbar:o().bool,focusIndex:o().number,onInnerContainerResize:o().func};const d=m},41008:(e,t,n)=>{n.d(t,{LG:()=>l,LW:()=>o});var r=n(17440),a=n(24328);const l=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))},o=e=>{let{focusIndex:t,listRef:n,items:r}=e;const l=(0,a.useRef)(null),o=(0,a.useRef)(null),i=(0,a.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;l.current=t,o.current=n}),[]);return(0,a.useEffect)((()=>{n.current&&null!==t&&0!==r.length&&(t<Math.max(l.current+3,0)?n.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(o.current-3,r.length-1)&&n.current.scrollToItem(Math.min(t+3,r.length-1),"end"))}),[t,r.length,n]),{handleOnItemsRendered:i}}},15177:(e,t,n)=>{n.d(t,{Z:()=>A});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(27502),s=n(71153),c=n.n(s),u=n(87918),p=n.n(u),m=n(95544),d=n(90436),g=n(80687),f=n(1730),b=n(52194),h=n(89978),y=n(26978),x=n(79692);const v=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),E=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:u="",excludeUris:x=[],includeUris:E=[],attributesCount:w=16}=e;const C=v(),O=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),S=(0,l.useMemo)((()=>(0,y.U)(s,n.type,E,x)),[x,E,s,n.type]),N=(0,i.fyF)(S,n).filter((e=>{let{values:t}=e;return!(0,i.O27)(t)})).length>0;return N||!(0,i.O27)(u)?o().createElement(g.J.Provider,{value:O},o().createElement(f.Z,{className:t},u&&o().createElement(b.Z,{className:C.header,title:u}),o().createElement(m.Z,{className:c()(C.attributesContainer,{[C.noCaption]:!u})},N?o().createElement(h.Z,{entity:n,attrTypes:S,parentUri:n.uri,drawLines:!1,max:w}):o().createElement(d.Z,{className:C.noData},p().text("No data found"))))):null}));var w=n(17440),C=n(76141),O=n(12212);const S=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});var N=n(1108);function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){k(e,t,n[t])}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:u,caption:p="",excludeUris:d=[],includeUris:g=[],pinnedAttributes:h}=e;const x=S(),v=(0,r.useDispatch)(),E=(0,l.useContext)(O.m),k=(0,r.useSelector)(a.ZP.selectors.getUserRoles),Z=(0,l.useMemo)((()=>(0,i.mC3)(h,k)),[h,k]),P=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),A=(0,l.useMemo)((()=>(0,y.U)(u,P.type,g,d)),[d,g,u,P.type]),I=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>T({},e,{viewId:E}))))),[E,v]),L=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.modifyAttribute,v)(T({},e,{viewId:E}))),[E,v]),j=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.removeAttribute,v)(T({},e,{viewId:E}))),[E,v]);return o().createElement(f.Z,{className:t},p&&o().createElement(b.Z,{className:x.header,title:p}),o().createElement(m.Z,{className:c()(x.attributesContainer,{[x.noCaption]:!p})},o().createElement(N.c.Provider,{value:Z},o().createElement(C.Z,{entity:P,attrTypes:A,parentUri:P.uri,drawLines:!1,mode:s,showEmptyEditors:(0,i.ZiX)(P.uri),crosswalks:P.crosswalks,onAddAttributes:I,onChangeAttribute:L,onDeleteAttribute:j}))))}));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(this,arguments)}const A=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=i.ARY.Viewing,attributesCount:n,pinnedAttributes:r}=e,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes"]);return(0,i.uzs)(t)?o().createElement(E,P({attributesCount:n},a)):o().createElement(Z,P({mode:t,pinnedAttributes:r},a))}))},52239:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l);const i="1px solid #AFD4E9",s=(0,n(79692).Z)({decorator:{marginLeft:8,borderLeft:i,"&:last-child":{borderLeft:"none","&:before":{borderLeft:i}},"&:before":{top:0,height:14,width:5,borderBottom:i,content:'""',display:"block",left:"0"},"&$plain":{"&:before":{width:0}}},plain:{},wrapper:{marginLeft:16,marginTop:-8}}),c=e=>{let{className:t,children:n,plain:r=!1,enabled:l=!1}=e;const i=s();return l?a().createElement("div",{className:o()(i.decorator,{[i.plain]:r},t)},a().createElement("div",{className:i.wrapper},n)):a().createElement(a().Fragment,null,n)}},43253:(e,t,n)=>{n.d(t,{Z:()=>Se});var r=n(24328),a=n.n(r),l=n(52730),o=n(44443),i=n(90436),s=n(89810),c=n(27502),u=n(65510),p=n(17440),m=n(95544),d=n(45203),g=n(15762),f=n(71153),b=n.n(f),h=n(26729),y=n(40435),x=n(79692);const v=(0,x.Z)((e=>({root:{display:"flex",alignContent:"center",flexDirection:"column"},main:{position:"relative",padding:"0 86px",marginTop:"auto"},mainImageContainer:{display:"flex",alignContent:"center",height:"100%",width:"100%"},mainImage:{maxWidth:"calc(100vw - 512px)",maxHeight:"calc(100vh - 192px)",margin:"0 auto",userSelect:"none"},arrowButton:{backgroundColor:e.palette.divider,color:"white","&:hover":{backgroundColor:e.palette.divider}},arrowButtonPrev:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)"},arrowButtonNext:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)"}})));var E=n(60905);const w=(0,x.Z)((()=>({thumbnails:{marginLeft:"12px",marginBottom:"12px",marginTop:"auto",width:"calc(100vw - 364px)",overflowX:"auto",overflowY:"hidden"},gridContainer:{width:"100%"},thumb:{width:"96px",height:"96px",cursor:"pointer",userSelect:"none"},inactiveThumb:{filter:"brightness(0.5)"}}))),C=e=>{let{attributeValues:t,setAttributeValueIndex:n,attributeValueIndex:l}=e;const o=w(),i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(null!=i&&i.current){const e=i.current.scrollLeft,t=i.current.offsetWidth+e,n=96*l+16*l+12;t<n?i.current.scroll&&(n>t+96+16?i.current.scroll(n,0):i.current.scroll(112+e,0)):e+96>n&&i.current.scroll&&i.current.scroll(n-96,0)}}),[l,i]),a().createElement("div",{ref:i,className:o.thumbnails},a().createElement(E.Z,{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:o.gridContainer},t.map(((e,t)=>{let{uri:r,value:i}=e;return a().createElement(E.Z,{item:!0,key:r},a().createElement(h.Z,{onClick:()=>n(t),className:b()(o.thumb,{[o.inactiveThumb]:l!==t}),src:(0,c.efz)({value:i})}))}))))},O=e=>{let{className:t,attributeValues:n,attributeValueIndex:r,setAttributeValueIndex:l}=e;const o=v(),i=n[r],s=(0,c.QXK)(i);return a().createElement("div",{className:b()(o.root,t)},a().createElement("div",{className:o.main},r>0&&a().createElement(y.Z,{icon:d.Z,className:b()(o.arrowButton,o.arrowButtonPrev),onClick:()=>{l(r-1)},size:"XL"}),a().createElement(h.Z,{containerClassName:o.mainImageContainer,className:o.mainImage,size:s&&h.f.OVERRIDE,src:s}),r!==n.length-1&&a().createElement(y.Z,{icon:g.Z,className:b()(o.arrowButton,o.arrowButtonNext),onClick:()=>{l(r+1)},size:"XL"})),a().createElement(C,{attributeValues:n,attributeValueIndex:r,setAttributeValueIndex:l}))};var S=n(87918),N=n.n(S),T=n(21324),k=n(5806),Z=n(33016),P=n(36138),A=n(85256),I=n(89913),L=n(95038),j=n.n(L);const R={get CreationTime(){return N().text("Creation Time")},get CreationDate(){return N().text("Creation Date")},get Dimensions(){return N().text("Dimensions")},get MimeType(){return N().text("Mime Type")},get Size(){return N().text("Size")},get Url(){return N().text("Full image URL (S3)")},get UrlPreview(){return N().text("Preview image URL (S3)")},get UrlThumbnail(){return N().text("Small image URL (S3)")},get CdnUrl(){return N().text("Full image URL (CDN)")},get CdnUrlPreview(){return N().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return N().text("Small image URL (CDN)")}},D=function(){let{value:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail","MimeType"].includes(t)?(0,p.path)([t,0,"value"],e):"CreationDate"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?j()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?j()(e.CreationTimestamp[0].value).format("HH:mm:ss"):"Dimensions"===t&&(0,p.path)(["Height",0,"value"],e)&&(0,p.path)(["Width",0,"value"],e)?`${e.Height[0].value} x ${e.Width[0].value} ${N().text("pixels")}`:"Size"===t&&(0,p.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},V=(e,t)=>{const{includeNames:n=[],excludeNames:r=[],order:a=[]}=t,l=n.length?e.filter((e=>n.includes(e))):e.filter((e=>!r.includes(e)));return 0===a.length?l:l.sort(((e,t)=>{const n=a.indexOf(e),r=a.indexOf(t);return-1===n&&-1!==r?1:-1===r&&-1!==n?-1:n-r}))},z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=M(t.attributes);return V(Object.keys(e.value||{}),n).reduce(((t,n)=>{const a=r.find((e=>{let{name:t}=e;return t===n}));return a?[...t,{attrType:a,values:e.value[n]}]:t}),[])},U=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),B=(0,x.Z)({title:{marginBottom:"10px",color:"white",fontSize:"18px",lineHeight:"21px","&$canAdd":{marginBottom:"3px"}},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},canAdd:{}}),_=e=>{let{attributeType:t,onAddAttributes:n,uri:l}=e;const o=B(),s=M(t.attributes),c=Boolean(n);return a().createElement(m.Z,null,a().createElement(i.Z,{className:b()(o.title,{[o.canAdd]:c})},N().text("Meta info")),c&&a().createElement(r.Fragment,null,a().createElement(I.Z,{label:N().text("Attributes"),data:s,dense:!1,onApply:e=>{n&&n(e.map((e=>({attributeType:e,parentUri:l}))))}}),a().createElement(A.Z,{className:o.divider})))};var F=n(47972);const H=(0,x.Z)((e=>({root:{fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginBottom:"11px"},title:{color:"rgba(255,255,255,0.54)",marginRight:"12px",float:"left"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),W=e=>{let{title:t,content:n,isLink:r,children:l}=e;const o=H();return a().createElement("div",{className:o.root},a().createElement("span",{className:o.title},t),r?a().createElement("a",{className:o.link,href:n},N().text("link")):a().createElement("span",{className:o.content},n||l))},q=(0,x.Z)({root:{padding:"10px 0"},title:{color:"rgba(255,255,255,0.54)",fontSize:"13px"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"}}),Y=e=>{let{attributeValue:t,attributeType:n,imageAttributeFieldsOrder:r}=e;const o=q(),i=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),c=(u=t,p=r,V(Object.keys(R),p).map((e=>D(u,e)?{title:R[e],value:D(u,e),isLink:U(e)}:null)).filter(Boolean));var u,p;const d=z(t,n,r);return a().createElement(m.Z,{className:o.root},c.map((e=>{let{title:t,value:n,isLink:r}=e;return a().createElement(W,{key:t,isLink:r,title:t,content:n})})),i&&d.map((e=>{let{attrType:n,values:r}=e;return a().createElement(F.Z,{key:n.uri,attributeType:n,drawLines:!1,values:r,titleClassName:o.title,contentClassName:o.content,parentUri:t.uri})})))};var $=n(77277),G=n(92203);const X=(0,x.Z)({root:{},form:{padding:"10px 0"},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},actions:{display:"flex",justifyContent:"flex-end",marginTop:"4px"},cancelButton:{color:"white",marginRight:"8px"}}),K=e=>{let{attributeType:t,imageAttributeFieldsOrder:n,attributeValue:r,hasChanges:l,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s,onCancel:u,onApply:p,mode:d}=e;const g=X(),f=z(r,t,n),b=0!==f.length||0===f.length&&l;return a().createElement(m.Z,{className:g.root},a().createElement(m.Z,{className:g.form},f.map((e=>{let{attrType:t,values:n}=e;return a().createElement(G.ZP,{key:t.uri,parentUri:r.uri,attributeType:t,values:n,showEmptyEditors:(0,c.ZiX)(r.uri),mode:d,drawLines:!1,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s})}))),b&&a().createElement(a().Fragment,null,a().createElement(A.Z,{className:g.divider}),a().createElement(m.Z,{className:g.actions},a().createElement($.Z,{disabled:!l,onClick:u,className:g.cancelButton},N().text("Cancel")),a().createElement($.Z,{disabled:!l,onClick:p,color:"primary"},N().text("Apply")))))};var Q=n(12212);const J={palette:{type:"dark",primary:c.rSc.palette.primary,secondary:c.rSc.palette.secondary}},ee=(0,Z.Z)(J),te=e=>{let{imageAttributeFieldsOrder:t,attributeType:n,attributeValue:o}=e;const{addAttributes:i,changeAttribute:u,deleteAttribute:d,clearLocalChanges:g,applyLocalChanges:f,attributeValue:b,hasChanges:h}=(e=>{let{initialAttributeValue:t,attributeType:n}=e;const a=(0,l.useDispatch)(),o=(0,r.useContext)(Q.m),[i,u]=(0,r.useState)(t);(0,r.useEffect)((()=>{u(t)}),[t]);const m=!(0,p.equals)(i,t),d=(0,r.useCallback)((e=>{u((t=>e.reduce(((e,t)=>{const{attributeType:n,parentUri:r,index:a}=t;return(0,c.tPT)({entity:e,attributeType:n,parentUri:r,index:a,nestingLevel:1})}),t)))}),[]),g=(0,r.useCallback)((e=>{let{value:t,attributeType:n,uri:r}=e;u((e=>(0,c.ww$)({entity:e,attributeType:n,uri:r,value:t,nestingLevel:1})))}),[]),f=(0,r.useCallback)((e=>{let{attributeType:t,uri:n}=e;u((e=>(0,c.d$I)({entity:e,attributeType:t,uri:n,nestingLevel:1})))}),[]);return{addAttributes:d,changeAttribute:g,deleteAttribute:f,clearLocalChanges:(0,r.useCallback)((()=>{u(t)}),[t]),applyLocalChanges:(0,r.useCallback)((()=>{a(s.N5.actions.modifyAttribute({value:i,attributeType:n,uri:i.uri,viewId:o}))}),[i,n,o,a]),attributeValue:i,hasChanges:m}})({attributeType:n,initialAttributeValue:o}),y=(0,l.useSelector)(s.ZP.selectors.getMode),x=(0,l.useSelector)(s.ZP.selectors.getIsEditableMode);return a().createElement(P.ThemeProvider,{theme:ee},a().createElement(m.Z,null,a().createElement(_,{attributeType:n,uri:null==b?void 0:b.uri,onAddAttributes:x?i:void 0}),a().createElement(Y,{attributeType:n,attributeValue:b,imageAttributeFieldsOrder:t}),x&&a().createElement(K,{mode:y,imageAttributeFieldsOrder:t,attributeType:n,attributeValue:b,hasChanges:h,onDeleteAttribute:d,onChangeAttribute:u,onAddAttributes:i,onCancel:g,onApply:f})))},ne=(0,x.Z)((e=>({root:{position:"relative",backgroundColor:"#333",maxHeight:"calc(100vh - 64px)",overflow:"hidden"},header:{display:"flex",alignItems:"center",height:"56px",paddingLeft:"16px",boxShadow:`0 1px 0 0 ${e.palette.divider}`},headerTitle:{color:"rgba(255, 255, 255, 0.87)",fontSize:"16px",lineHeight:"19px"},bodyWrapper:{maxHeight:"calc(100% - 56px)",overflow:"auto"},body:{padding:"16px"},formControlLabel:{marginLeft:0,marginBottom:"27px"},checkboxLabel:{marginLeft:"8px",color:"rgba(255,255,255,0.87)",fontSize:"13px",lineHeight:"15px"},checkbox:{color:"white",padding:0}}))),re=e=>{let{className:t,attributeValue:n,handleSetAsDefault:o,attributeType:c}=e;const u=ne(),p=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},d=(0,l.useSelector)((e=>s.ZP.selectors.getModifiedEntity(e,null==p?void 0:p.uri)))||{},g=(0,l.useSelector)(s.ZP.selectors.getIsViewMode)?p:d,f=(0,l.useSelector)(s.ZP.selectors.getImageAttributesFieldsOrder)||{},h=f[null==p?void 0:p.type]||(null==f?void 0:f.default)||{},[y,x]=(0,r.useState)(!1);(0,r.useEffect)((()=>{x((null==g?void 0:g.defaultProfilePic)===(null==n?void 0:n.uri))}),[null==n?void 0:n.uri,g]);const v=(0,r.useCallback)((()=>{o(n.uri)}),[null==n?void 0:n.uri]);return a().createElement(m.Z,{className:b()(u.root,t)},a().createElement(m.Z,{className:u.header},a().createElement(i.Z,{className:u.headerTitle},N().text("Details"))),a().createElement(m.Z,{className:u.bodyWrapper},a().createElement(m.Z,{className:u.body},a().createElement(k.Z,{classes:{root:u.formControlLabel,label:u.checkboxLabel},control:a().createElement(T.Z,{className:u.checkbox,checked:y,onChange:v,color:"default"}),label:N().text("Set as default")}),a().createElement(te,{attributeType:c,imageAttributeFieldsOrder:h,attributeValue:n}))))},ae=(0,x.Z)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),le=e=>{let{attributeValues:t=[],currentAttributeValueUri:n,setCurrentAttributeValueUri:l,handleSetAsDefault:o,attributeType:i}=e;const[s,c]=(0,r.useState)(0);(0,r.useEffect)((()=>{u(n?t.findIndex((e=>e.uri===n)):0)}),[n,t]);const u=(0,r.useCallback)((e=>{var n;c(e),l(null===(n=t[e])||void 0===n?void 0:n.uri)}),[t]),p=ae();return a().createElement(m.Z,{className:p.root},a().createElement(O,{attributeValueIndex:s,setAttributeValueIndex:u,attributeValues:t,className:p.main}),a().createElement(re,{handleSetAsDefault:o,attributeValue:t[s],className:p.details,attributeType:i}))};var oe=n(95596),ie=n(22349);const se=(0,x.Z)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),ce=e=>{let{items:t,selectedItems:n,onSelectImage:r,onDeselectImage:l,onShareLink:o,onSetAsDefault:i,onDownload:s,onClickImage:c,onDelete:u}=e;const p=se(),d=e=>a().createElement(ie.Z,{id:e,selected:n.includes(e),selectionMode:0!==n.length,onSelect:()=>r(e),onDeselect:()=>l(e),onShareLink:()=>o(e),onSetAsDefault:()=>i(e),onDownload:()=>s(e),onClick:()=>c(e),onDelete:u?()=>u(e):void 0,canBeSelected:!0});return a().createElement(m.Z,{className:p.root},a().createElement(E.Z,{container:!0},t.map((e=>{let{id:t,src:n}=e;return a().createElement(E.Z,{key:t,classes:{item:p.item},item:!0},a().createElement(h.Z,{size:h.f.LARGE,onClick:()=>c(t),src:n,overlay:d(t)}))}))))};var ue=n(86689);const pe=(0,x.Z)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),me=e=>{let{selectedItems:t,items:n,onSelectAll:r,onClearAll:l}=e;const o=pe(),i=t.length===n.length;return a().createElement(ue.Z,{component:"button",underline:"none",classes:{button:o.selectButton},onClick:i?l:r},i?N().text("Clear selection"):N().text("Select all images"))};var de=n(94438),ge=n(22983),fe=n(35292),be=n(36746),he=n(39475);const ye=(0,x.Z)((()=>({downloadButton:{color:"#fff",fontSize:"24px",marginLeft:"30px"},shareButton:{color:"#fff",fontSize:"24px",marginLeft:"21px"},deleteButton:{color:"#fff",fontSize:"24px",marginLeft:"24px"},divider:{height:"31px",width:"1px",marginLeft:"10px",backgroundColor:"rgba(255,255,255,0.38)"}}))),xe=e=>{let{onDownload:t,onShare:n,onUpload:r,onDelete:l}=e;const o=ye();return a().createElement(a().Fragment,null,r&&a().createElement($.Z,{variant:"contained",color:"primary",onClick:r,startIcon:a().createElement(de.Z,null)},N().text("Upload")),t&&r&&a().createElement("div",{className:o.divider}),t&&a().createElement(he.k,{className:o.downloadButton,tooltipTitle:N().text("Download selected items"),icon:be.Z,onClick:t}),n&&a().createElement(he.k,{className:o.shareButton,tooltipTitle:N().text("Copy link"),icon:fe.Z,onClick:n}),l&&a().createElement(he.k,{className:o.deleteButton,tooltipTitle:N().text("Delete selected items"),icon:ge.Z,onClick:l}))},ve=e=>{let{attributeValues:t,open:n,onClose:o,currentAttributeValueUri:i,setCurrentAttributeValueUri:u,attributeType:m,onDownload:d,onShareLink:g,onSetAsDefault:f,onUpload:b,onDeleteAttribute:h}=e;const[y,x]=(0,r.useState)([]),[v,E]=(0,r.useState)(oe.A.GALLERY_MODE),w=(0,l.useSelector)(s.ZP.selectors.getIsViewMode);(0,r.useEffect)((()=>{E(i?oe.A.DETAILS_MODE:oe.A.GALLERY_MODE)}),[i]);const C=t.map((e=>({src:(0,c.efz)(e),downloadURL:(0,c.Q5d)(e),id:e.uri}))),O=e=>{g(C.find((0,p.propEq)("id",e)).downloadURL)},S=e=>{const n=t.find((t=>{let{uri:n}=t;return n===e}));f(n)},N=e=>{h({uri:e,attributeType:m})},T=v===oe.A.GALLERY_MODE,k=v===oe.A.DETAILS_MODE,Z=y.length>0,P=k||T&&Z,A=!w&&P,I=!w&&(k||T&&!Z),L=T&&Z&&a().createElement(me,{items:C,selectedItems:y,onClearAll:()=>{x([])},onSelectAll:()=>{x((0,p.pluck)("id",C))}}),j=a().createElement(xe,{onDelete:A?()=>{(T?y:[i]).forEach((e=>{N(e)})),y.length&&x([])}:void 0,onDownload:P?()=>{const e=T?(0,p.pipe)((0,p.filter)((e=>{let{id:t}=e;return y.includes(t)})),(0,p.pluck)("downloadURL"))(C):[C.find((0,p.propEq)("id",i)).downloadURL];d(e)}:void 0,onShare:k?()=>{O(i)}:void 0,onUpload:I?b:void 0});return a().createElement(oe.C,{mode:v,open:n,onChangeMode:E,header:{left:L,right:j},onClose:o},T&&a().createElement(ce,{items:C,selectedItems:y,onSelectImage:e=>{x((t=>[...t,e]))},onDeselectImage:e=>{x((t=>t.filter((t=>t!==e))))},onShareLink:O,onSetAsDefault:S,onDownload:e=>{d([C.find((0,p.propEq)("id",e)).downloadURL])},onClickImage:e=>{u(e),E(oe.A.DETAILS_MODE)},onDelete:w?void 0:N}),k&&a().createElement(le,{handleSetAsDefault:S,setCurrentAttributeValueUri:u,currentAttributeValueUri:i,attributeValues:t,attributeType:m}))};var Ee=n(91446),we=n(94079);const Ce=(0,x.Z)((e=>({imageBox:{position:"relative",display:"flex",width:"100%",flexGrow:1,flexShrink:0,flexWrap:"nowrap",marginTop:"2px",overflow:"hidden"},moreButtonContainer:e=>{let{imageWidth:t,imageHeight:n}=e;return{backgroundColor:"white",width:t,height:n,position:"absolute",right:0,cursor:"pointer"}},moreButton:t=>{let{imageWidth:n,imageHeight:r}=t;return{display:"flex",justifyContent:"center",alignItems:"center",width:n,height:r,backgroundColor:(0,we.fade)(e.palette.primary.main,.06)}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})));function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Se=e=>{let{attributeType:t,attributeValues:n=[],renderImage:p,overlay:m=!1,countFixedItems:d=0,children:g,onUpload:f,onDeleteAttribute:b,imageSize:h=Ee.By,paging:y,parentUri:x,showNonOv:v,requestNextPageOfAttributeValues:E}=e;const w=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},C=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),O=(0,l.useDispatch)(),S=Ce(h);(0,r.useEffect)((()=>{if(y&&E){const e=v?y.totalOvValues:y.totalValues;e>n.length&&E({parentUri:x,attributeTypeUri:t.uri,attributeTypeName:t.name,values:[],defaultMaxValues:e})}}),[y,E,t,x,n.length,v]);const N=(0,r.useRef)(),[T,k]=(0,r.useState)(0),[Z,P]=(0,r.useState)(0),A=(0,r.useContext)(u.P),[I,L]=(0,r.useState)(!1),[j,R]=(0,r.useState)(),D=(0,r.useCallback)((e=>{const{imageMargin:t,imageWidth:r}=h,a=Math.floor((e+t)/(r+t))-d,l=e+t-(a+d)*(r+t)<Ee.lc;k(a),n.length>a?P(n.length-a+(l?1:0)):P(0)}),[n.length,d,h]),M=(0,r.useCallback)((e=>{D(e),N.current=e}),[D]);(0,r.useEffect)((()=>{N.current&&D(N.current)}),[n.length,D]);const V=(0,r.useCallback)((e=>{A||(R(e),L(!0))}),[A]),z=(0,r.useCallback)((()=>{L(!1)}),[]),U=e=>(e=>{e.forEach(((e,t)=>{try{if((e=>!!(e=>e.indexOf("://")>0||0===e.indexOf("//"))(e)&&new URL(e).host!==location.host)(e)){const n=document.createElement("iframe");n.setAttribute("style","display: none;"),n.setAttribute("src",e),document.body.appendChild(n),setTimeout((()=>document.body.removeChild(n)),3e4*(t+1))}else{const t=document.createElement("a");t.href=e,t.download=(e=>e.split("/").pop())(e),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}catch(e){console.error(e)}}))})(e),B=e=>navigator.clipboard.writeText(e),_=(0,r.useCallback)((e=>{C?(0,c.YL3)(w.uri,e.uri).then((t=>{let{status:n}=t;"success"===n&&O(s.N5.entity.actions.setDefaultProfilePic(e))})):O(s.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:w.uri,value:e}))}),[C,w.uri,O]),F=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Oe(e,t,n[t])}))}return e}({onOpenImageGalleryDialog:V},m&&{onDownload:U,onShareLink:B,onSetAsDefault:_});return a().createElement(a().Fragment,null,a().createElement(o.Z,{handleWidth:!0,onResize:M}),a().createElement(ve,{attributeValues:n,open:I,onClose:z,setCurrentAttributeValueUri:R,currentAttributeValueUri:j,attributeType:t,onDownload:U,onShareLink:B,onSetAsDefault:_,onUpload:f,onDeleteAttribute:b}),a().createElement("div",{className:S.imageBox},g,n.slice(0,T).map(p(F)),Z>0&&a().createElement("div",{className:S.moreButtonContainer},a().createElement("div",{className:S.moreButton,onClick:()=>V()},a().createElement(i.Z,{className:S.number},`+${Z}`)))))}},91446:(e,t,n)=>{n.d(t,{lc:()=>o,By:()=>i});var r=n(26729);const a=r.f.SMALL.imageWidth,l=r.f.SMALL.imageHeight,o=8,i={imageMargin:4,imageWidth:a,imageHeight:l}},37457:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(7089),u=n(27502),p=n(79692),m=n(41128);const d=(0,p.Z)((e=>({container:{height:"16px",borderColor:(0,m.U1)(e.palette.primary.main,.54)},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px",color:e.palette.primary.main}})));var g=n(67586);const f=(0,n(78223).Z)(c.Z),b=e=>{let{className:t,attributeType:n,nonOvValues:r=[],nonOvTotal:l}=e;const o=d();if(!l)return null;const i=r.length?r.map(((e,t)=>a().createElement("div",{key:t},(0,u.YkM)(n)?(0,u.idV)(e.label):a().createElement(g.Z,{value:(0,u.kDl)(e),dataTypeDefinition:(0,u.PFL)(n),rich:!1})))):null;return a().createElement(f,{tooltipTitle:i,tooltipPlacement:"top",label:`+ ${l}`,variant:"outlined",classes:{root:s()(o.container,t),label:o.label}})};b.propTypes={className:o().string,nonOvTotal:o().number,attributeType:u.EMD,nonOvValues:o().arrayOf(o().oneOfType([u.cNQ,u.dMV,u.Rtp]))};const h=b},31569:(e,t,n)=>{n.d(t,{m:()=>k});var r=n(24328),a=n.n(r),l=n(52730),o=n(80030),i=n(89810),s=n(27502),c=n(17440),u=n(80687);const p=(e,t)=>{const n=(0,s.xy8)(e);return t.reduce(((t,r)=>{for(const a in r){const l=(e[n]||[]).find((e=>e.uri===a));return Array.isArray(r[a])&&"object"==typeof r[a][0]?t=(t||[]).concat(p(l,r[a])):(t.push(m(r[a],l)),t)}}),[])},m=(e,t)=>e&&e.length&&!(0,c.isNil)(e[0])?{fieldName:(0,s.Tde)(t.uri),filter:t.type===s.oS0.TYPE_BLOB?s.j5E.FULL_TEXT:s.j5E.EQUALS,values:e}:{fieldName:(0,s.Tde)(t.uri),filter:"missing"},d=(e,t,n,r)=>{const a=((e,t)=>{const n=t.find((t=>t.uri===e.uri));return n&&Array.isArray(n.children)?n.children:[]})(e,n);let l=(null==e?void 0:e.attributes)||(null==e?void 0:e.analyticsAttributes)||[];return a.length&&(l=l.filter((e=>a.includes(e.uri)))),l.reduce(((e,a)=>{const l=g(t[a.name],r,n);return l&&l.length&&(Array.isArray(l[0])?e.push({[a.uri]:l[0]}):e.push({[a.uri]:l})),e}),[])},g=(e,t,n)=>{if(e&&0!==e.length)return e.reduce(((e,r)=>{if("type"in r&&r.type){const a="lookupCode"in r?r.lookupCode:r.value,l=(0,s.zeJ)(t,r.type);a&&"object"!=typeof a&&(0,s.OXP)(r)?e.push(f(a,l)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(d(l,a,n,t))}return e}),[])},f=(e,t)=>{switch(null==t?void 0:t.type){case s.oS0.TYPE_DATE:return new Date(e).getTime();case s.oS0.TYPE_TIMESTAMP:return isNaN(Number(e))?new Date(e).getTime():new Date(Number(e)).getTime();default:return e}};function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const h=e=>a().createElement("svg",b({width:11,height:11,viewBox:"0 0 11 11"},e),a().createElement("path",{d:"M2.514 5h2.314V3l2.5 2.5-2.5 2.5V6h-3.8a4.5 4.5 0 10.73-3H.6a5.5 5.5 0 11-.577 3H0V5H2.514z",fill:"#6CACE4",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));var y=n(87918),x=n.n(y),v=n(37573),E=n(18527),w=n(79692);const C=(0,w.Z)((e=>({container:{backgroundColor:"white",width:"360px",minWidth:"360px",maxWidth:"720px"},header:{display:"flex",height:"48px",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px"},title:{color:e.palette.text.primary,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px"},entityTypeLabel:{color:"rgba(0,0,0,0.67)",fontSize:"14px",paddingLeft:"16px",paddingBottom:"12px",lineHeight:"16px"},divider:{height:"24px",width:"1px",backgroundColor:"rgba(0,0,0,0.12)"},headerCount:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:"0.24px",lineHeight:"28px",width:"210px"},body:{borderBottom:"1px solid rgba(0,0,0,0.12)",padding:"0 16px 8px"},footer:{display:"flex",alignItems:"center",height:"31px",paddingLeft:"16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},profileIcon:{height:"16px",width:"16px"},entityContainer:{display:"flex",flexDirection:"row",alignItems:"center"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px",textDecoration:"none",paddingLeft:"8px"},icon:{margin:"auto 8px auto 0"},content:{color:e.palette.primary.main},seeAllButton:{cursor:"pointer"}}))),O=(0,w.Z)({tooltip:{backgroundColor:"white",boxShadow:"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)",padding:0,borderRadius:"4px",maxWidth:"none"},arrow:{"&::before":{backgroundColor:"white"}}});var S=n(29627);function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T=e=>{let{value:t,attributeType:n,config:o={}}=e;const[c,u]=(0,r.useState)([]),[d,g]=(0,r.useState)(0),f=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},b=(0,S._)(),h=(0,l.useDispatch)(),y=C(),w=(0,l.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},O=o.entityType||f.type,T=d>6;(0,r.useEffect)((()=>{const e=function(e,t){let n=[{fieldName:"type",filter:"equals",values:[arguments.length>2&&void 0!==arguments[2]?arguments[2]:""]}];return Array.isArray(e)?n=n.concat(p(t,e)):n.push(m([e],t)),n}(t,n,O),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){N(e,t,n[t])}))}return e}({max:6},w);b(Promise.all([(0,s.ZOr)(e,r),(0,s.j_Q)(e,r)])).then((e=>{const[t,{total:n}]=e;u(Array.isArray(t)?t:[]),g(n)})).catch((()=>{u([]),g(0)}))}),[]);const k=Boolean(o.label);return a().createElement("div",{className:y.container},a().createElement("div",{className:y.header},a().createElement("div",{className:y.title},x().text("Pivot profiles")),a().createElement("div",{className:y.divider}),a().createElement("div",{className:y.headerCount},x().number(d,"0,0")+" "+(1===d?x().text("item"):x().text("items")))),k&&a().createElement("div",{className:y.entityTypeLabel},o.label),a().createElement("div",{className:y.body},c.map((e=>a().createElement("div",{key:e.uri,className:y.entityContainer},a().createElement(v.Z,{entity:e,avatarClassName:y.profileIcon}),a().createElement(E.Z,{className:y.entityLabel,value:(0,s.wwR)(e)},(0,s.idV)(e.label)))))),T&&a().createElement("div",{className:y.footer},a().createElement("a",{className:y.seeAllButton,onClick:()=>{const e=Array.isArray(t)?t.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[(0,s.nIW)(t),n]}))))):((e,t)=>[{[e.name]:t}])(n,t);h(i.ui.actions.openPivotingPerspective({value:e,attributeType:n}))}},x().text("See all"))))},k=e=>{let{value:t,attributeType:n,children:p,className:m}=e;const g=O(),b=C(),y=(0,r.useContext)(u.J)||[],x=(0,s.QZu)(n),v=(0,l.useSelector)(i.ZP.selectors.getMetadata)||{},E=x?d(n,t.value,y,v):f(t.lookupCode||t.value,n),w=y.some((e=>{let{uri:t}=e;return t===n.uri}))&&(Array.isArray(E)&&E.length||!Array.isArray(E)&&!(0,c.isNil)(E)),S=y.find((e=>{let{uri:t}=e;return t===n.uri}));return w?a().createElement(o.ZP,{interactive:!0,arrow:!0,placement:"right-start",classes:g,title:a().createElement(T,{value:E,attributeType:n,config:S.popup})},a().createElement("span",{className:m},a().createElement(h,{className:b.icon}),a().createElement("span",{className:b.content},p))):a().createElement(a().Fragment,null,p)}},30410:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(27502),o=n(39390),i=n(3853),s=n(10768);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const u=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{showEmptyEditors:n,onAddAttributes:r,lazy:u,errors:p,crosswalks:m,showNonOv:d}=t,g=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["showEmptyEditors","onAddAttributes","lazy","errors","crosswalks","showNonOv"]);switch(e.type){case l.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case l.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(o.Z,c({isReltioCrosswalk:(0,l.KVV)(m,t.attributeValue)},g))}}}.build(t,e)}},76141:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(27502),u=n(17440),p=n(92203),m=n(52239),d=n(89913),g=n(86602),f=n(26978);var b=n(1108);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}const y=e=>{let{attrTypes:t,entity:n,parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,drawLines:x,children:v,className:E,alwaysVisibleTypeUris:w=g.S,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:S,additionalControlsRenderer:N,showNonOv:T}=e;const{attributes:k={}}=n,Z=(0,r.useMemo)((()=>(0,c._kX)(i,t)),[t,i]),P=((e,t)=>e.filter((e=>{const n=((e,t)=>{const{attributes:n={},analyticsAttributes:r={}}=t;return(0,u.cond)([[c.kqr,(0,u.always)(t)],[(0,u.both)(c.kQw,(0,u.always)(r)),(0,u.always)(r)],[u.T,(0,u.always)(n)]])(e)})(e,t),r=(e=>(0,c.kqr)(e)?"uri":"name")(e);return!((e.singleValue||(0,c.ian)(e)||(0,c.VFZ)(e))&&(0,u.has)(e[r])(n))})))(Z,n),A=(0,r.useContext)(b.c),I=(0,r.useMemo)((()=>(0,c.Gtj)(t,i,n,o,T,A)),[t,i,n,o,T,A]),[L,j]=(0,r.useMemo)((()=>(0,f.A)(w,I)),[I,w]),R=(0,r.useCallback)((e=>{C(e.map((e=>({attributeType:e,parentUri:l}))))}),[C,l]),D={enabled:x};return a().createElement("div",{className:E},v&&a().createElement(m.Z,D,v),a().createElement(m.Z,h({},D,{plain:!0}),Z.length>0&&a().createElement(d.Z,{label:s().text("More attributes"),onApply:R,dense:x,data:P})),j.concat(L).map((e=>{let{attrType:t,values:n}=e;return a().createElement(p.ZP,{key:t.uri,attributeType:t,drawLines:x,values:n,paging:(0,u.path)(["paging",t.uri],k),parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:S,additionalControlsRenderer:N,showNonOv:T})})))};y.propTypes={attrTypes:o().array,entity:o().object,parentUri:o().string,children:o().node,showEmptyEditors:o().bool,mode:c.XGc,crosswalks:o().array,drawLines:o().bool,showNonOv:o().bool,className:o().string,alwaysVisibleTypeUris:o().array,onAddAttributes:o().func,onChangeAttribute:o().func,onDeleteAttribute:o().func,additionalControlsRenderer:o().func};const x=(0,r.memo)(y)},63928:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),l=n(27502),o=n(90436),i=n(17440),s=n(40901),c=n(87918),u=n.n(c);const p=e=>u().text("${value}",{value:1===e?u().text("value"):u().text("values")}),m=(0,i.has)("minValue"),d=(0,i.has)("maxValue"),g=(0,i.pipe)(d,i.not),f=(0,i.propSatisfies)((e=>1===e),"minValue"),b=e=>{let{minValue:t}=e;return u().text("This attribute can have minimum ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})},h=e=>{let{maxValue:t}=e;return u().text("This attribute can have maximum ${maxValue} ${maxValueCaption}",{maxValue:u().number(t,"0"),maxValueCaption:p(t)})},y=(0,i.cond)([[i.isNil,(0,i.always)("")],[e=>{let{minValue:t,maxValue:n}=e;return t&&t===n},e=>{let{minValue:t}=e;return u().text("This attribute should have ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})}],[(0,i.allPass)([f,d]),h],[(0,i.allPass)([f,g]),(0,i.always)("")],[(0,i.allPass)([m,d]),e=>{let{minValue:t,maxValue:n}=e;return u().text("${minCardinality} and maximum ${maxValue} ${maxValueCaption}",{minCardinality:b({minValue:t}),maxValue:u().number(n,"0"),maxValueCaption:p(n)})}],[d,h],[m,b],[i.T,(0,i.always)("")]]),x=e=>{let{cardinality:t}=e;const n=(0,s.y)();return a().createElement(o.Z,{variant:"caption",className:n.caption},y(t))};x.propTypes={cardinality:l.oA3};const v=x},92203:(e,t,n)=>{n.d(t,{ZP:()=>H});var r=n(52730),a=n(89810),l=n(27502),o=n(24328),i=n.n(o),s=n(17440),c=n(52239),u=n(66078),p=n(55401),m=n(92985),d=n(31992),g=n(35039),f=n(30410),b=n(63928),h=n(40901);const y=(0,s.filter)((0,s.propSatisfies)(l.ZiX,"uri"));var x=n(1108),v=n(37457);const E=e=>{let{max:t,values:n,attributeType:r,parentUri:a,mode:u,drawLines:E,showEmptyEditors:w,errorMessage:C,errors:O,paging:S,crosswalks:N,showNonOv:T,nonVisibleValues:k,onAddAttributes:Z,onDeleteAttribute:P,onChangeAttribute:A,onDeactivateError:I,additionalControlsRenderer:L,requestNextPageOfAttributeValues:j}=e;const R=(0,h.y)(),[D,M]=(0,o.useState)(t),[V,z]=(0,o.useState)(!1),{label:U,required:B,cardinality:_,name:F,uri:H}=r,W=(0,l.KIu)(u),q=(0,o.useContext)(x.c),Y=(0,o.useMemo)((()=>null==q?void 0:q.includes(H)),[H,q]),$=(0,l.O27)(n),G=(!V&&w||B||Y)&&$,X=(0,o.useRef)((0,l.gjI)({parentUri:a,attributeType:r})),K=(0,o.useCallback)((()=>{M(D+1);const e={parentUri:a,index:D,attributeType:r};return Z(G&&!(0,l.YkM)(r.type)?[e,e]:[e])}),[D,Z,a,r,G]),Q=(0,o.useCallback)((0,s.pipe)(P,s.T,z),[P,z]);if($&&!G)return null;if(G&&$&&(n=[X.current]),(0,l.O27)(n))return null;const J=(y(n)||[]).length,ee=T?"totalValues":"totalOvValues",te=(0,s.ifElse)((0,s.has)(ee),(0,s.pipe)((0,s.prop)(ee),(0,s.add)(J)),(0,s.always)(n.length))(S),ne=null!=S&&S.totalValues?S.totalValues-te:null==k?void 0:k.length,re=t<te,ae=re&&D<te,le=re&&D>=te,oe=n.slice(0,D),ie=oe?oe.length-1:0,se=te-D;return i().createElement(c.Z,{enabled:E},i().createElement("div",{className:R.wrapper},i().createElement("div",{className:R.titleWrapper},i().createElement(m.Z,{label:U,isRequired:B,className:R.title,attributeType:r}),i().createElement(v.Z,{nonOvValues:k,attributeType:r,className:R.ovIcon,nonOvTotal:ne})),W&&i().createElement(b.Z,{cardinality:_}),W&&i().createElement(p.Z,{message:C,className:R.typeError}),i().createElement("div",{className:R.attributesWrapper},oe.map(((e,t)=>i().createElement(f.Z,{key:e.uri,attributeValue:e,attributeType:r,lazy:G&&!B,showEmptyEditors:w,errors:O,ownError:(0,l.ADq)(e,t,r.uri,O),mode:u,crosswalks:N,onAddOneMore:ie===t?K:null,onAddAttributes:Z,onDeleteAttribute:Q,onChangeAttribute:A,onDeactivateError:I,additionalControlsRenderer:L}))),ae&&i().createElement(g.Z,{moreNumber:(0,s.min)(t,se),valueNumber:se,onClick:()=>{n.length<te&&j({parentUri:a,attributeTypeUri:H,attributeTypeName:F,values:n,defaultMaxValues:t}),M(D+t)}}),le&&i().createElement(d.Z,{onClick:()=>{M(t)}}))))};var w=n(95544),C=n(90590),O=n(92145),S=n(79692);const N=(0,S.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}});var T=n(40435),k=n(22983);const Z={MultiValue:O.Z},P=e=>{let{values:t,onChange:n,onDelete:c}=e;const u=N(),p=(0,r.useSelector)(a.ZP.selectors.getMetadata),m=(0,r.useSelector)(a.ZP.selectors.getEntity),d=m.uri,g=(0,l.JvE)(p,m.type).map((e=>({value:e.uri,label:e.label}))),f=(t||[]).map((e=>{var t;return{value:e,label:(null===(t=g.find((0,s.propEq)("value",e)))||void 0===t?void 0:t.label)||(0,l.nIW)(e)}})),b=(0,o.useCallback)((e=>{const t=(null==e?void 0:e.map((0,s.prop)("value")))||[];n({value:t,attributeType:l.xPW.roles,uri:d})}),[d,n]),h=(0,o.useCallback)((()=>{c({uri:d,attributeType:l.xPW.roles})}),[d,c]);return i().createElement("div",{className:u.container},i().createElement(C.Z,{label:"",height:40,isMulti:!0,options:g,value:f,onChange:b,components:Z,classes:u,className:u.roleContainer}),!!c&&i().createElement(T.Z,{className:u.deleteButton,icon:k.Z,onClick:h,size:"L"}))};var A=n(7766);const I=(0,S.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},deleteButton:{marginLeft:"8px"}}),L=e=>e?`?filter=${(0,l.Uqd)()((e=>[{filter:"containsWordStartingWith",fieldName:"tags",values:[e]}])(e))}`:"",j=[{fieldName:"tags",orderType:"reversedCount"}],R=e=>(0,l.FK9)({query:L(e),body:j}).then((e=>Object.keys(e.tags))),D=e=>{let{className:t,values:n,onChange:s,onDelete:c}=e;const u=I(),p=(0,r.useSelector)(a.ZP.selectors.getEntityUri),m=(0,o.useCallback)((e=>{s({value:e,attributeType:l.xPW.tags,uri:p})}),[s,p]),d=(0,o.useCallback)((()=>{c({uri:p,attributeType:l.xPW.tags})}),[p,c]);return i().createElement("div",{className:u.container},i().createElement(A.Z,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:n||[],onChange:m,getSuggestions:R}),!!c&&i().createElement(T.Z,{className:u.deleteButton,icon:k.Z,onClick:d,size:"L"}))};function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(this,arguments)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const z=e=>{let{values:t,attributeType:n,parentUri:r,mode:a,errorMessage:c,onDeleteAttribute:u,onChangeAttribute:d,showEmptyEditors:g}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["values","attributeType","parentUri","mode","errorMessage","onDeleteAttribute","onChangeAttribute","showEmptyEditors"]);const x=(0,h.y)(),{label:v,required:E,cardinality:C}=n,O=(0,l.KIu)(a),[S,N]=(0,o.useState)(!1),T=(0,o.useCallback)((0,s.pipe)(u,s.T,N),[u,N]),k=(0,l.O27)(t),Z=!S&&g&&k,A=(0,o.useRef)((0,l.gjI)({parentUri:r,attributeType:n}));return(0,l.j2U)(n)&&k&&!Z?null:i().createElement(w.Z,{className:x.wrapper},i().createElement(m.Z,{label:v,isRequired:E,className:x.title,attributeType:n}),O&&i().createElement(b.Z,{cardinality:C}),O&&i().createElement(p.Z,{message:c}),i().createElement(w.Z,{className:x.attributesWrapper},(()=>{switch(n.uri){case l.xPW.tags.uri:return i().createElement(D,{values:t,onDelete:T,onChange:d});case l.xPW.roles.uri:return i().createElement(P,{values:t,onDelete:T,onChange:d});default:{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){V(e,t,n[t])}))}return e}({},A.current,{value:t[0]||""});return i().createElement(f.Z,M({attributeValue:e,attributeType:n,mode:a,onDeleteAttribute:T,onChangeAttribute:d},y))}}})()))};function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(this,arguments)}var B;!function(e){e.imageLine="imageLine",e.special="special",e.default="default"}(B||(B={}));const _=(0,o.memo)((e=>{let{values:t,attributeType:n,mode:r=l.ARY.Viewing,crosswalks:a,drawLines:o,paging:p={},parentUri:d,errors:g,errorMessage:f,max:b=1/0,showEmptyEditors:y,showNonOv:x,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:S,requestNextPageOfAttributeValues:N}=e;const T=(0,h.y)(),k=(0,s.partition)(l.OXP),[Z,P]=k(t),A=x?t:Z,I=x?[]:P,L={errorMessage:f,errors:g,mode:r,parentUri:d,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:S,showEmptyEditors:y};return(()=>{switch((0,s.cond)([[l.kqr,(0,s.always)(B.special)],[l.Or$,(0,s.always)(B.imageLine)],[s.T,(0,s.always)(B.default)]])(n)){case B.special:return i().createElement(c.Z,{enabled:o},i().createElement(z,U({values:A,attributeType:n},L)));case B.imageLine:return i().createElement(c.Z,{enabled:o},i().createElement("div",{className:T.wrapper},i().createElement(m.Z,{label:null==n?void 0:n.label,attributeType:n}),i().createElement(u.Z,{attributeValues:A,attributeType:n,paging:p,onDeleteAttribute:w,parentUri:d,onChangeAttribute:C,requestNextPageOfAttributeValues:N,showNonOv:x})));default:return i().createElement(E,U({values:A,attributeType:n,max:b,paging:p,crosswalks:a,drawLines:o,requestNextPageOfAttributeValues:N,showNonOv:x,nonVisibleValues:I},L))}})()})),F={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues,onDeactivateError:a.N5.errors.actions.errorDeactivated},H=(0,r.connect)(((e,t)=>{let{parentUri:n,attributeType:r,max:o}=t;return{errors:a.ZP.selectors.getActiveErrorsForAttributesPager(e,n,r),errorMessage:(0,l.tQX)(n,r,a.ZP.selectors.getProfileErrors(e)),max:o||a.ZP.selectors.getDefaultMaxValues(e)}}),F)(_)},40901:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((e=>({caption:{fontSize:"0.7rem",opacity:.54},wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},attributesWrapper:{width:"100%",marginBottom:"10px"},link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"},title:{fontSize:"12px",lineHeight:"14px",paddingLeft:"12px",color:e.palette.text.secondary},typeError:{marginLeft:"12px"},ovIcon:{marginLeft:"8px",marginTop:"-1px",textIndent:0},titleWrapper:{flex:1,paddingBottom:"3px"}})))},21548:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(77277),u=n(40435),p=n(22983),m=n(90436),d=n(87918),g=n.n(d),f=n(27502);const b=(0,n(79692).Z)((e=>({editor:{display:"flex",flex:1,height:"36px",alignItems:"center"},label:{flex:1,marginLeft:"2px",marginTop:"2px",fontSize:"13px",lineHeight:"15px"},actions:{display:"flex",alignItems:"center"},titleContainer:{display:"flex",flex:1,minHeight:"20px"},expandButton:{marginTop:"2px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary},errorWrapperHelperText:{marginLeft:0}})));var h=n(93555),y=n(76141),x=n(85777);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=e=>{let{label:t,attributeTypesList:n,attributeType:l,attributeValue:o,children:i,errors:d,ownError:v,mode:E,metadata:w,crosswalks:C,lazy:O,showEmptyEditors:S,onAddOneMore:N,onAddAttributes:T,onDeleteAttribute:k,onChangeAttribute:Z,additionalControlsRenderer:P,hideDeleteButton:A,state:I,showNonOv:L}=e;const j=b(),R="deleted"===I,D="edited"===I,M=o.uri,V=(0,f.ZiX)(M),[z,U]=(0,r.useState)(V),B=(0,r.useMemo)((()=>(0,f.xv5)({attributeType:l,attributeValue:o,mode:E,metadata:w,isReltioCrosswalk:(0,f.KVV)(C,o)})),[l,o,E,w,C]),_=!R&&!A&&!!k&&B,F=(0,r.useMemo)((()=>(0,f.J6q)(o,d)),[d,o]);(0,r.useEffect)((()=>{F&&U(!0)}),[d,F]),(0,r.useEffect)((()=>{R&&U(!1)}),[R]);const H=(n||[]).some((e=>(0,f.kQw)(e))),W=(0,r.useMemo)((()=>({attributes:H?null:o.value,analyticsAttributes:H?o.value:null})),[o,H]),q=(0,f.e$p)(v)||F&&g().text("Has an incorrect value")||"";return O?a().createElement(c.Z,{variant:"text",color:"primary",onClick:N},"Create attribute"):a().createElement(a().Fragment,null,a().createElement("div",{className:j.editor},a().createElement("div",{className:j.titleContainer},a().createElement(x.Z,{onClick:()=>U((e=>!e)),expanded:z,className:j.expandButton,disabled:R}),a().createElement(h.Z,{errorMessage:q,classes:{helperText:j.errorWrapperHelperText}},a().createElement("div",{className:s()(j.label,{[j.deleted]:R})},t))),a().createElement("div",{className:j.actions},D&&a().createElement(m.Z,{variant:"caption",className:j.editedLabel},"(",g().text("edited"),")"),P&&P({attributeType:l,attributeValue:o}),_&&a().createElement(u.Z,{icon:p.Z,onClick:()=>k({uri:M,attributeType:l,attributeValue:o}),size:"L"}))),z&&a().createElement(y.Z,{attrTypes:n,entity:W,showEmptyEditors:S||V,drawLines:!0,parentUri:M,mode:E,crosswalks:C,onAddAttributes:T,onChangeAttribute:Z,onDeleteAttribute:k,additionalControlsRenderer:P,showNonOv:L},i))};E.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}({label:o().string,children:o().node,attributeTypesList:o().arrayOf(f.EMD),attributeValue:o().oneOfType([f.dMV,f.Rtp])},f.KVe);const w=E},54255:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(13980),s=n.n(i),c=n(76141),u=n(27502);const p=e=>e&&e.attributes,m=e=>{let{entity:t,entityType:n,attributeTypesSelectionStrategy:r=p,mode:a,onAddAttributes:i,onDeleteAttribute:s,onChangeAttribute:u}=e;const m=(0,l.useMemo)((()=>r(n)),[r,n]);return t?o().createElement(c.Z,{key:t.uri,attrTypes:m,entity:t,showEmptyEditors:!0,drawLines:!0,parentUri:t.uri,mode:a,crosswalks:t.crosswalks,onAddAttributes:i,onChangeAttribute:u,onDeleteAttribute:s}):null};m.propTypes={entityUri:s().string,parentUri:s().string,entity:s().object,entityType:s().object,attributeTypesSelectionStrategy:s().func,mode:u.XGc,onAddAttributes:s().func,onDeleteAttribute:s().func,onChangeAttribute:s().func};const d=m,g={onAddAttributes:a.N5.actions.addAttributes,onDeleteAttribute:a.N5.actions.removeAttribute,onChangeAttribute:a.N5.actions.modifyAttribute},f=(0,r.connect)(((e,t)=>({entity:t.entityUri&&a.ZP.selectors.getModifiedEntity(e,t.entityUri)})),g)(d)},72283:(e,t,n)=>{n.d(t,{Z:()=>q});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(27502),p=n(84425),m=n(42662),d=n(12231),g=n(79692);const f=(0,g.Z)({entityContainer:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},entityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.87)",cursor:"pointer",lineHeight:"15px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},emptyEntityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.6)",lineHeight:"15px",marginLeft:"16px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",cursor:"default"},entityAvatar:{transform:"scale(0.5)",marginLeft:"8px",marginRight:"11px"},entitySecondaryLabel:{color:"rgba(0,0,0,0.6)"}}),b=(0,g.Z)((e=>({singleValue:{color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",paddingTop:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},linkValue:{cursor:"pointer",color:e.palette.primary.main,textDecoration:"none"}}))),h=(0,g.Z)((e=>({addLabel:{color:e.palette.primary.main,display:"flex",fontWeight:"500",cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},groupHeading:{fontSize:"13px",height:"36px",padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),y=(0,g.Z)({clearIcon:{cursor:"pointer",height:"20px",width:"20px"}});function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const v=e=>{let{innerRef:t,innerProps:n,selectOption:r,data:l}=e;const o=f(),{uri:i,entityType:c,label:u,secondaryLabel:p}=l;return""!==i?a().createElement(d.Z,x({className:o.entityContainer,ref:t,key:i,onClick:()=>r({label:u,uri:i,entityType:c})},n),a().createElement(m.Z,{className:o.entityAvatar,entityType:c}),a().createElement("span",{className:o.entityLabel},u,p&&a().createElement("span",{className:o.entitySecondaryLabel},", ",p))):a().createElement(d.Z,x({className:o.entityContainer,ref:t,key:i},n,{disabled:!0}),a().createElement("span",{className:o.emptyEntityLabel},s().text("No results found")))};v.propTypes={innerRef:o().oneOfType([o().oneOf([null]),o().func,o().shape({current:o().any.isRequired})]),innerProps:o().object.isRequired,selectOption:o().func.isRequired,data:o().shape({uri:o().string.isRequired,label:o().string.isRequired,entityType:u.pyR.isRequired})};const E=v;var w=n(71153),C=n.n(w),O=n(52730),S=n(89810),N=n(90436),T=n(12212);const k=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:n,disableLinkClick:l},children:o,data:i}=e,p=b(),m=(0,O.useDispatch)(),d=(0,r.useContext)(T.m),g=(0,O.useSelector)(S.ZP.selectors.getUIPath),f=(0,u.ZiX)(i.entityUri)?{className:p.singleValue,component:"span"}:{className:C()(p.singleValue,p.linkValue),onMouseDown:e=>{e.stopPropagation(),l||(0,c.pipe)((0,c.always)({uri:i.entityUri,viewId:d}),S.ui.actions.openEntity,m)()},onClick:e=>e.preventDefault(),href:(0,u.ChB)({uiPath:g,uri:i.entityUri}),component:"a"};return!n&&a().createElement(N.Z,f,(0,u.ZiX)(i.entityUri)?s().text(`New ${t.label} will be created`):(0,u.idV)(o))};k.propTypes={children:o().string,data:o().object.isRequired,selectProps:o().object.isRequired};const Z=k;var P=n(33375),A=n(61837);const I=e=>{const{selectProps:{onClear:t}}=e,n=y();return a().createElement(A.Z,{onClick:t},a().createElement(P.Z,{className:n.clearIcon}))};I.propTypes={selectProps:o().object.isRequired};const L=I;var j=n(54255),R=n(79573),D=n(92391),M=n(65549);const{Group:V}=D.F,z=e=>{const{selectProps:{inputValue:t,onCreate:n},data:r,children:l}=e,o=h();return a().createElement(V,e,a().createElement("div",{className:o.groupHeading},a().createElement("span",null,r.label),n&&a().createElement("span",{onClick:()=>n(t,r.entityType),className:o.addLabel},a().createElement(M.Z,{className:o.addIcon}),s().text(`Create ${t?`"${t}" as `:""}new ${r.label}`))),l)};z.propTypes={selectProps:o().object.isRequired,data:o().object,children:o().array};const U=z,B=(0,g.Z)({creatorWrapper:{marginTop:"20px"}});function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=e=>{let{entity:t={},entityTypesUris:n=[],mode:l,max:o,onChange:i,onCreate:m,metadata:d,globalSearchRequestOptions:g,attributeTypesSelectionStrategy:f,disableLinkClick:b}=e,h=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const y=B(),[x,v]=(0,r.useState)(""),w=(0,r.useMemo)((()=>n.map((e=>(0,u.nt9)(d,e)))),[n,d]),C=[{filter:"equals",fieldName:"type",values:n.map(u.nIW)}],O=F({},g,{max:o}),S=m?(e,t)=>{m(t||n[0],e),v("")}:void 0,N=e=>{null!==e&&(v(""),i(e))},T=(0,r.useMemo)((()=>1!==w.length),[w]),k=((0,c.isEmpty)(t)?w[0]:(0,u.nt9)(d,t.entityType))||{},P=m&&s().text(`Create ${x?`"${x}" as `:""}new ${k.label}`),A=s().text(`Select ${1===w.length?`${w[0].label} `:""}profile`),I=!(0,c.isEmpty)(t)&&(0,u.ZiX)(t.entityUri),D=T?{Group:U,GroupHeading:R.Vd}:{},M=I?{ClearIndicator:L}:{};return a().createElement(a().Fragment,null,a().createElement(p.Z,_({value:(0,c.isEmpty)(t)?void 0:t,inputValue:x,onInputChange:e=>{v(e)},getOptions:e=>(0,u.ZOr)(C,O,e).then((e=>t=>{const n=t.map((t=>F({},t,{label:(0,u.idV)(t.label),entityType:e.find((e=>{let{uri:n}=e;return n===t.type}))}))),r=e=>(0,c.isEmpty)(e)?[{label:"",uri:"",entityType:{}}]:e;return e.length>1?e.map((e=>({label:e.label,entityType:e.uri,options:r(n.filter((t=>t.type===e.uri)))}))):r(n)})(w)),getOptionLabel:(0,c.prop)("entityLabel"),onChange:N,onCreate:S,onClear:()=>{N({})},label:A,createLabel:P,components:F({Option:E,SingleValue:Z},D,M),currentEntityType:k,isClearable:!0,disableLinkClick:b},h)),I&&a().createElement("div",{className:y.creatorWrapper},a().createElement(j.Z,{mode:l,attributeTypesSelectionStrategy:f,entityType:k,entityUri:t.entityUri})))};W.propTypes={entity:u.oZZ,entityTypesUris:o().arrayOf(o().string),max:o().number,mode:u.XGc,dispatch:o().func,metadata:u.pGS,onChange:o().func.isRequired,onCreate:o().func,attributeTypesSelectionStrategy:o().func,globalSearchRequestOptions:o().object,disableLinkClick:o().bool};const q=W},66078:(e,t,n)=>{n.d(t,{Z:()=>$});var r=n(24328),a=n.n(r),l=n(52730),o=n(94438),i=n(89810),s=n(27502),c=n(26729),u=n(22349),p=n(40435),m=n(87918),d=n.n(m),g=n(13896),f=n(58651),b=n(95544),h=n(8629),y=n(90436),x=n(87378),v=n(27556),E=n(74603),w=n(77277),C=n(79692);const O=(0,C.Z)((e=>({root:{width:"328px"},paper:{width:"100%",height:"40px",display:"flex",alignItems:"center",boxShadow:"none",backgroundColor:"rgba(0,0,0,0.03)"},inputRoot:{flex:1},input:{padding:"0 12px",fontSize:"14px","&:placeholder":{color:e.palette.text.secondary}},errorMessage:{marginTop:"8px",fontSize:"12px",color:e.palette.error.main}}))),S=e=>0===e.trim().length,N=e=>{let{onSend:t}=e;const n=O(),[l,o]=(0,r.useState)(""),[i,s]=(0,r.useState)(null);return a().createElement(b.Z,{className:n.root},a().createElement(v.Z,{className:n.paper},a().createElement(E.Z,{value:l,onChange:e=>{const t=e.target.value,n=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);o(t),n||S(t)?s(null):s(d().text("URL is not correct"))},classes:{root:n.inputRoot,input:n.input},placeholder:d().text("Paste an image URL here")}),a().createElement(w.Z,{disabled:Boolean(i)||S(l),variant:"outlined",color:"primary",onClick:()=>{t(l),o(""),s(null)}},d().text("Send"))),i&&a().createElement(y.Z,{className:n.errorMessage},i))};var T=n(71153),k=n.n(T),Z=n(83997);const P=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],A=e=>{let{className:t,onAppendFile:n}=e;return a().createElement(a().Fragment,null,a().createElement("input",{onInput:e=>{n&&n(e.currentTarget.files[0])},style:{display:"none"},accept:P.join(","),id:"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(w.Z,{className:t,variant:"contained",color:"primary",component:"span"},d().text("Select image"))))};function I(){return I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}const L=e=>a().createElement("svg",I({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__c"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"67.572%",y1:"54.952%",x2:"15.212%",y2:"13.907%",id:"UploadIcon_svg__e"},a().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#000",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__f"},a().createElement("stop",{stopColor:"#B8EDFF",offset:"0%"}),a().createElement("stop",{stopColor:"#53ACDE",offset:"100%"})),a().createElement("circle",{id:"UploadIcon_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"UploadIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#UploadIcon_svg__a"})),a().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#UploadIcon_svg__a"}),a().createElement("g",{mask:"url(#UploadIcon_svg__b)"},a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(-1 9)"},a().createElement("path",{d:"M0 107.268c0 35.579 28.703 64.409 64.173 64.409h139.021c29.578 0 53.497-24.035 53.497-53.635 0-28.356-21.935-51.562-49.705-53.515C199.577 27.705 167.2 0 128.346 0 97.425 0 70.59 17.582 57.171 43.274 25.027 46.767 0 74.117 0 107.268z",fill:"#FFF",opacity:.3}),a().createElement("ellipse",{fill:"url(#UploadIcon_svg__c)",opacity:.4,cx:64.553,cy:107.664,rx:61.43,ry:62.336}),a().createElement("path",{d:"M127.979 8.91c38.773 0 70.206 31.895 70.206 71.24 0 39.346-31.433 71.241-70.206 71.241-6.067 0-11.954-.78-17.57-2.249 9.688-11.019 15.574-25.551 15.574-41.478 0-33.7-26.352-61.153-59.286-62.299C78.714 23.611 101.654 8.91 127.98 8.91z",fill:"url(#UploadIcon_svg__d)",opacity:.4})),a().createElement("path",{fill:"url(#UploadIcon_svg__e)",opacity:.12,d:"M82.093 128.474l38.374 37.966-10.666 18.958 72.714 71.94 63.578-57.537v-6.11l-71.107-70.352H97.22z",transform:"translate(-1 9)"}),a().createElement("path",{fill:"url(#UploadIcon_svg__f)",d:"M151.004 128.29v57.591h-40.836V128.29H81l49.5-49.409L180 128.29z",transform:"translate(-1 9)"})))),j=(0,C.Z)((e=>({root:{padding:"36px 0 29px"},isActive:{backgroundColor:"rgba(0,114,206,0.12)"},icon:{width:"190px",height:"190px",marginBottom:"24px"},title:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px"},description:{marginBottom:"24px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),R=e=>{let{onAppendFile:t,className:n}=e;const r=j(),[{canDrop:l,isOver:o},i]=(0,g.useDrop)({accept:[Z.FILE],drop:e=>{e&&t(e.files[0])},collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()})}),s=l&&o;return a().createElement("div",{ref:i,className:k()(r.root,{[r.isActive]:s},n)},a().createElement(L,{className:r.icon}),a().createElement(y.Z,{className:r.title},d().text("Drag an image here")),a().createElement(y.Z,{className:r.description},d().text("Acceptable image types would include JPG, PNG, TIFF, GIF, BMP. Maximum image size: ${MAX_IMAGE_SIZE}Mb",{MAX_IMAGE_SIZE:20})),a().createElement(A,{onAppendFile:t}))},D=(0,C.Z)((e=>({root:{width:"100%",display:"flex",alignItems:"center",padding:"0 30px",boxSizing:"border-box"},border:{borderBottom:`1px solid ${e.palette.text.primary}`,flex:1,opacity:.12},text:{padding:"0 10px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),M=e=>{let{children:t,className:n}=e;const r=D();return a().createElement(b.Z,{className:k()(r.root,n)},a().createElement(b.Z,{className:r.border}),a().createElement(y.Z,{className:r.text},t),a().createElement(b.Z,{className:r.border}))};var V=n(87685),z=n(37265),U=n(39475);const B=(0,C.Z)({closeIcon:{color:"#fff"}}),_=e=>{let{error:t,onClose:n}=e;const r=B();return a().createElement(z.Z,{open:Boolean(t),onClose:n,message:t,action:a().createElement(U.k,{className:r.closeIcon,tooltipTitle:d().text("Close"),icon:V.default,onClick:n})})},F=(0,C.Z)((e=>({root:{},dialogPaper:{position:"relative",maxWidth:"480px"},title:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",padding:"16px"},body:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0 8px 49px",textAlign:"center"},targetBox:{marginBottom:"8px"},divider:{marginBottom:"28px"}}))),H=e=>{let{open:t,onClose:n,onUpload:o}=e;const c=F(),u=(0,l.useSelector)(i.ZP.selectors.getImageServicePath),p=(0,l.useSelector)(i.ZP.selectors.getEnvironment),m=(0,l.useSelector)(i.ZP.selectors.getTenant),[v,E]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),O=e=>{E(!0),(0,s.Ixr)({image:e,imageServicePath:u,environment:p,tenant:m}).then((e=>{o(e),n()})).catch((e=>C(e.errorMessage))).finally((()=>E(!1)))};return a().createElement(g.DndProvider,{backend:f.default},a().createElement(h.Z,{open:t,onClose:n,classes:{paper:c.dialogPaper}},a().createElement(y.Z,{className:c.title},d().text("Add new image")),a().createElement(b.Z,{className:c.body},a().createElement(R,{className:c.targetBox,onAppendFile:e=>{const t=Number((e.size/1024/1024).toFixed(2)),n=P.includes(e.type);t>20?C(d().text("File size exceeds configured max file size.")):n?O(e):C(d().text("File format is not supported."))}}),a().createElement(M,{className:c.divider},d().text("or")),a().createElement(N,{onSend:e=>{O(e)}})),v&&a().createElement(x.Z,null),a().createElement(_,{error:w,onClose:()=>C(null)})))};var W=n(43253),q=n(91446);const Y=(0,C.Z)((()=>({root:{width:"100%",marginBottom:"10px"},image:e=>{let{imageMargin:t}=e;return{marginRight:t,cursor:"pointer","&:last-child":{marginRight:0}}},uploadContainer:e=>{let{imageMargin:t,imageWidth:n,imageHeight:r}=e;return{backgroundColor:"white",width:n,height:r,cursor:"pointer",border:"1px dashed #0072CE",boxSizing:"border-box",marginRight:t,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},uploadButton:{width:"50px",height:"50px"},uploadIcon:{fontSize:"36px"}}))),$=e=>{let{attributeType:t={},attributeValues:n=[],onDeleteAttribute:m,onChangeAttribute:d,requestNextPageOfAttributeValues:g,parentUri:f,paging:b,showNonOv:h,imageSize:y=q.By}=e;const x=Y(y),v=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},E=(0,l.useSelector)((e=>i.ZP.selectors.getModifiedEntityDefaultProfilePic(e,v.uri))),w=(0,l.useDispatch)(),[C,O]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>{O((e=>!e))}),[]),N=(0,r.useCallback)((e=>{const n=(0,s.hm5)(f,t.name),r={};for(const a in e){const l=(t.attributes||[]).find((e=>{let{name:t}=e;return t===a}));l&&(r[a]=[{uri:(0,s.hm5)(n,l.name),ov:!0,value:e[a],type:l.uri}])}d({attributeType:t,uri:n,value:r})}),[d,f,t]),T=(0,r.useCallback)((e=>{if(m(e),E===e.uri){var t;const r=(null===(t=n[0])||void 0===t?void 0:t.uri)===e.uri?n[1]:n[0];w(i.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:v.uri,value:r||{}}))}}),[m,v,E,n]),k=(e,n)=>{const{onOpenImageGalleryDialog:r,onDownload:l,onShareLink:o,onSetAsDefault:i}=e,c=(0,s.Q5d)(n),{uri:p}=n;return a().createElement(u.Z,{id:p,onShareLink:()=>o(c),onSetAsDefault:()=>i(n),onDelete:()=>T({uri:p,attributeType:t}),onDownload:()=>l([c]),onClick:()=>r(p)})};return a().createElement("div",{className:x.root},a().createElement(W.Z,{attributeValues:n,attributeType:t,renderImage:e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,s.efz)(t),{uri:r}=t,{onOpenImageGalleryDialog:l}=e;return a().createElement("div",{className:x.image,key:r},a().createElement(c.Z,{src:n,overlay:k(e,t),onClick:()=>l(r),size:{imageWidth:y.imageWidth,imageHeight:y.imageHeight}}))},overlay:!0,countFixedItems:1,onUpload:S,onDeleteAttribute:T,imageSize:y,requestNextPageOfAttributeValues:g,paging:b,parentUri:f,showNonOv:h},a().createElement("div",{className:x.uploadContainer,onClick:S},a().createElement(p.Z,{className:x.uploadButton,iconClassName:x.uploadIcon,icon:o.Z}))),a().createElement(H,{open:C,onUpload:N,onClose:S}))}},89913:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(13980),s=n.n(i),c=n(17440),u=n(77277);const p=(0,n(79692).Z)({moreAttributes:{display:"flex",paddingBottom:"6px","&$dense":{padding:0}},dense:{},popupContainer:{},moreAttributesPopup:{"&$popupContainer":{}},moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}});var m=n(38442),d=n(33117),g=n(41008),f=n(63485),b=n(44876),h=n(65549),y=n(94792);const x=(0,c.curry)(((e,t)=>(0,c.filter)((t=>t.label.toLowerCase().includes(e.toLowerCase())))(t))),v=e=>{let{label:t,popupTitle:n=t,data:l,dense:i,onApply:s}=e;const v=p(),E=(0,r.useRef)(),[w,C]=(0,r.useState)(!1),[O,S]=(0,r.useState)(""),[N,T]=(0,r.useState)([]),k=(0,r.useCallback)(((e,t)=>{T((0,c.ifElse)((0,c.always)(t),(0,c.append)(e),(0,c.reject)((0,c.propEq)("id",e.id)))(N))}),[N]),Z=(0,r.useMemo)((()=>(0,c.pipe)(x(O),(0,c.map)((e=>({item:{id:e.uri,label:e.label,attrType:e}}))))(l)),[l,O]),P=(0,r.useMemo)((()=>(0,g.LG)(Z)),[Z]),A=(0,r.useCallback)((()=>28),[]),I=(0,r.useCallback)((e=>{let{item:t}=e;k(t,(0,c.not)((0,c.any)((0,c.propEq)("id",t.id))(N)))}),[k,N]),{focusIndex:L,handleKeyDown:j}=(0,b.t)({items:P,open:w,onSelectFocusedItem:I,selectedItems:N}),R=(0,r.useRef)(null);R.current=L;const D=Math.min(255,28*P.length),M=Math.max(140,D+112),V=(0,r.useCallback)(((e,t,n)=>{let{item:r,level:l=0}=t;const o=(0,c.any)((0,c.propEq)("id",r.id))(N),i=R.current===n;return a().createElement(d.Z,{key:r.uri,onClick:k,checked:o,level:l,data:r,label:a().createElement(y.Z,{text:r.label,highlight:O}),labelInText:r.label,style:e,isFocused:i,isRequired:!!r.attrType.required,LogoIcon:r.LogoIcon})}),[O,k,N]);return a().createElement("div",{className:o()(v.moreAttributes,{[v.dense]:i})},a().createElement(u.Z,{color:"primary",onClick:()=>C(!w),ref:E,className:v.moreButton},a().createElement(h.Z,{classes:{root:v.icon}}),a().createElement("div",{className:v.buttonLabel},t)),a().createElement(m.Z,{open:w,className:o()(v.moreAttributesPopup,v.popupContainer),anchorEl:E.current,onClose:(0,c.pipe)((()=>{N.length>0&&s((0,c.pluck)("attrType",N))}),(()=>C(!1)),(()=>S("")),(()=>T([]))),onSearch:S,containerHeight:M,title:n,containerWidth:320,searchInputOnKeyDown:j},a().createElement(f.Z,{getItemSize:A,renderItem:V,items:P,height:D,containerWidth:320,focusIndex:L})))};v.propTypes={label:s().string,popupTitle:s().string,data:s().array,dense:s().bool,onApply:s().func};const E=v},3853:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(27502),o=n(21548);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=e=>{const{attributeValue:t,attributeType:n}=e,r=(0,l.Kxm)(t,n.dataLabelPattern);return a().createElement(o.Z,i({label:(0,l.idV)(r),attributeTypesList:n.attributes||n.analyticsAttributes},e))};s.propTypes=l.j2V;const c=(0,r.memo)(s)},10768:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(13980),s=n.n(i),c=n(71153),u=n.n(c),p=n(17440),m=n(27502),d=n(21548),g=n(72283),f=n(93555);const b=(0,n(79692).Z)({item:{marginBottom:"20px"},dense:{marginBottom:0}});function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=e=>{const t=b(),{modifiedEntity:n,metadata:r,globalSearchRequestOptions:a,onDeleteModifiedEntity:i,onUpdateModifiedEntity:s,onDeactivateError:c}=e,x=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["modifiedEntity","metadata","globalSearchRequestOptions","onDeleteModifiedEntity","onUpdateModifiedEntity","onDeactivateError"]),{attributeValue:v,attributeType:E,mode:w,crosswalks:C,errors:O,onChangeAttribute:S}=x,N=(0,l.useRef)(v),T=(0,m.CZ8)(v),k=(0,m.o96)(v),Z=(0,m.Poc)(E),P=(0,m.nt9)(r,Z),A=n?(0,m.Kxm)(n,P.dataLabelPattern):v.label,I=(0,l.useMemo)((()=>[Z]),[Z]),L=(0,l.useMemo)((()=>(0,m.EtK)(C,k)),[C,k]),j=(0,l.useMemo)((()=>(0,m.mbo)(v,O)),[v,O]),R=(0,l.useMemo)((()=>T&&{entityUri:(0,m.ZTM)(T),entityType:(0,m.uGi)(T),entityLabel:v.label}),[T,v.label]),D=(0,l.useMemo)((()=>(0,m.tF$)(E).map((e=>(0,m.zeJ)(r,e))).filter(p.identity)),[E,r]),M=(0,l.useCallback)((e=>(0,m.ct9)(E,e)),[E]),V=(0,l.useCallback)((e=>{n&&i(n.uri);const t=N.current,r=!(0,p.isEmpty)(e)&&e.uri===(0,m.bwT)(t),a=y({},v,{label:e.label,refEntity:r?t.refEntity:(0,m.fmQ)(e),refRelation:r?t.refRelation:(0,m.NBq)(v)});S({value:a,attributeType:E,uri:v.uri}),j&&c((0,m.iFp)(j))}),[v,E,n,S,i,c,j]),z=(0,l.useCallback)(((e,t)=>{const n=(0,p.pipe)(M,(0,m._kX)(w))(P),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:n,metadata:r,mode:w});V(a),s(a)}),[M,w,P,r,V,s]),U=(0,l.useMemo)((()=>(0,m.yv0)({attributeType:E,attributeValue:v,mode:w,isReltioCrosswalk:(0,m.KVV)(C,v)})),[E,v,w,C]),B=(0,l.useMemo)((()=>(0,m.d89)(w,P)),[w,P]),_=(0,m.e$p)(j);return o().createElement(d.Z,h({},x,{label:(0,m.idV)(A),attributeTypesList:D,crosswalks:L,metadata:r}),o().createElement(f.Z,{errorMessage:_},o().createElement(g.Z,{className:u()(t.item,{[t.dense]:_||R&&(0,m.ZiX)(R.entityUri)}),entity:R||{},entityTypesUris:I,max:20,globalSearchRequestOptions:a,mode:w,onChange:U?V:void 0,onCreate:B?z:void 0,metadata:r,attributeTypesSelectionStrategy:M})))};v.propTypes=y({},m.NkU,{modifiedEntity:m.pyR,metadata:m.pGS,globalSearchRequestOptions:s().object,onDeleteModifiedEntity:s().func,onUpdateModifiedEntity:s().func,onDeactivateError:s().func});const E=(0,l.memo)(v),w={onDeleteModifiedEntity:a.N5.modifiedEntities.actions.entityDeleted,onUpdateModifiedEntity:a.N5.modifiedEntities.actions.entityCreated,onDeactivateError:a.N5.errors.actions.errorDeactivated},C=(0,r.connect)(((e,t)=>{const n=(0,m.bwT)(t.attributeValue);return{modifiedEntity:(0,m.ZiX)(n)?a.ZP.selectors.getModifiedEntity(e,n):null,metadata:a.ZP.selectors.getMetadata(e),globalSearchRequestOptions:a.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"])}}),w)(E)},39390:(e,t,n)=>{n.d(t,{Z:()=>P});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(52730),s=n(71153),c=n.n(s),u=n(17440),p=n(65549),m=n(22983),d=n(90436),g=n(87918),f=n.n(g),b=n(27502),h=n(67586),y=n(65314),x=n(93555),v=n(40435),E=n(12980),w=n(67462),C=n(89810);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N={};const T=(0,n(79692).Z)((e=>({wrapper:{width:"100%"},errorWrapper:{alignSelf:"stretch"},editor:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},"editor-value":{flex:"1 1 auto"},"editor-read-only-value":{marginLeft:"12px",display:"flex",alignItems:"center"},"editor-actions":{display:"flex",alignItems:"center",paddingLeft:"8px"},addButton:{marginRight:"-8px"},button:{color:e.palette.text.secondary},placeholder:{height:"50px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary}})));function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}const Z=e=>{let{className:t,attributeValue:n,attributeType:r,isReltioCrosswalk:l,ownError:o,mode:s,onAddOneMore:g,onDeleteAttribute:w,onChangeAttribute:S,onDeactivateError:Z,additionalControlsRenderer:P,state:A}=e,I=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","attributeValue","attributeType","isReltioCrosswalk","ownError","mode","onAddOneMore","onDeleteAttribute","onChangeAttribute","onDeactivateError","additionalControlsRenderer","state"]);const L=T(),j="deleted"===A,R="edited"===A,D=(0,b.KIu)(s),M=(0,b.PFL)(r),V=(0,E.AG)(n,M),z=(0,b.Vg3)({attributeType:r,mode:s}),U=(0,b.yv0)({attributeType:r,attributeValue:n,mode:s,isReltioCrosswalk:l}),B=(0,b.xv5)({attributeType:r,attributeValue:n,mode:s,isReltioCrosswalk:l}),_=U&&D,F=(0,b.e$p)(o),H=(0,i.useSelector)((e=>(0,b.QEi)(r)?((e,t,n)=>{const r=C.ZP.selectors.getDependentLookupsStructureNode(e,n);if(r){const o=t.uri,{parents:i,missedParentsAttributeTypes:s}=((e,t,n)=>{var r;const a=n.parents.flatMap((t=>{const n=C.ZP.selectors.getDependentLookupsStructureNode(e,t);return n.values.map((e=>O({},e,{type:t,dependentLookupCode:n.attrType.dependentLookupCode})))})),l=C.ZP.selectors.getModifiedEntities(e),o=C.ZP.selectors.getEntityUri(e),i=C.ZP.selectors.getAllRelationsToAddAndEdit(e),s=C.ZP.selectors.getMetadata(e),c=(0,b.vUy)({parentValues:a,valueUri:t,entityUri:o,modifiedEntities:l,connections:i}),p=(0,u.pipe)(b.uDV,(0,u.defaultTo)([]),(0,u.map)((0,u.pipe)((0,u.path)(["valueType","uri"]),b.u5q)),(0,u.prepend)(null===(r=l[o])||void 0===r?void 0:r.type),(0,u.reject)(u.isNil),u.uniq)({entityUri:o,entitiesMap:l,connections:i,metadata:s},t),m=n.parents.filter((e=>p.some((0,b.sOy)(e)))).map((t=>C.ZP.selectors.getDependentLookupsStructureNode(e,t).attrType)).filter((e=>!c.some((t=>{let{type:n,value:r}=t;return r&&n===e.uri}))));return{parents:Object.values(c.reduce(((e,t)=>{var n;return O({},e,{[t.dependentLookupCode]:{type:t.dependentLookupCode,codeValues:(0,u.uniq)([t.value,...(null===(n=e[t.dependentLookupCode])||void 0===n?void 0:n.codeValues)||[]]).filter(Boolean).sort()}})}),{})),missedParentsAttributeTypes:m}})(e,o,r),{isBlocked:c=!1}=C.ZP.selectors.getDependentLookupEditorState(e,o)||{},p=(a=s).length?f().text("Please select value for ${labels} ${attributes}.",{labels:(l=a.map((0,u.pipe)((0,u.prop)("label"),(e=>`'${e}'`))),l.reduce(((e,t,n)=>[e,t].join(n===l.length-1?` ${f().text("and")} `:", ")))),attributes:1===a.length?f().text("attribute"):f().text("attributes")}):"",m=C.ZP.selectors.getLookupAutocomplete(e),d=(0,b.Vmh)(m,n),g=!(null!=t&&t.lookupCode||null!=t&&t.value)&&c&&f().text("Populating values...")||p||"",h={parents:i,disabled:!!p||c,placeholder:g,autopopulationId:d?o:null};return g&&(h.value=null),((e,t)=>{const n=N[e];return(0,u.equals)(t,n)?n:((0,u.equals)(null==n?void 0:n.parents,t.parents)&&(t.parents=n.parents),N[e]=t,t)})(o,h)}var a,l})(e,n,null==r?void 0:r.uri):null)),W=()=>{o&&Z((0,b.iFp)(o))},q=!!g&&z&&!r.singleValue,Y=!j&&!!w&&B,$=!!F,G=j?{disabled:!0}:{};return a().createElement("div",{className:c()(L.editor,t)},a().createElement(x.Z,{errorMessage:F,className:L.errorWrapper},a().createElement("div",{className:c()(L["editor-value"],{[L.deleted]:j},{[L["editor-read-only-value"]]:!_})},_?a().createElement(y.Z,k({fieldName:(0,b.Tde)(r.uri),value:V,dataTypeDefinition:M,error:$,onChange:(0,u.pipe)((0,E.pp)(n,r),S,W),fullWidth:!0},H,I,G)):a().createElement(h.Z,{value:(0,b.kDl)(n),dataTypeDefinition:M}))),a().createElement("div",{className:L["editor-actions"]},R&&a().createElement(d.Z,{variant:"caption",className:L.editedLabel},"(",f().text("edited"),")"),q&&a().createElement(v.Z,{icon:p.Z,onClick:g,size:"L",className:c()(L.addButton,L.button)}),P&&P({attributeType:r,attributeValue:n}),Y&&a().createElement(v.Z,{className:L.button,icon:m.Z,onClick:()=>{w({uri:n.uri,attributeType:r}),(0,b.PcX)(o)!==b.NIO.missed&&W()},size:"L"})))};Z.propTypes={className:o().string,attributeValue:b.cNQ,attributeType:b.EMD,ownError:b.wfT,isReltioCrosswalk:o().bool,state:o().oneOf(["deleted","edited"]),mode:b.XGc,onAddOneMore:o().func,onDeleteAttribute:o().func,onChangeAttribute:o().func,onDeactivateError:o().func,additionalControlsRenderer:o().func};const P=(0,r.memo)((0,w.Z)(Z,(()=>{const e=T();return a().createElement("div",{className:e.placeholder})})))},12980:(e,t,n)=>{n.d(t,{AG:()=>i,Ho:()=>s,pp:()=>c});var r=n(95038),a=n.n(r),l=n(27502),o=n(17440);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t}=arguments.length>1?arguments[1]:void 0;const{value:n,lookupCode:r}=e;switch(t){case l.oS0.TYPE_BOOLEAN:case l.oS0.TYPE_BOOLEAN_RADIO:case l.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.gxP)(n);case l.oS0.TYPE_DATE:return n&&l.P6Y.dates.toLocalDate(n)||null;case l.oS0.TYPE_LOCAL_DATE:case l.oS0.TYPE_TIMESTAMP:case l.oS0.TYPE_ACTIVENESS_DATE:return n&&new Date(n)||null;case l.oS0.TYPE_DEPENDENT_LOOKUP:case l.oS0.TYPE_LOOKUP:return{value:n,lookupCode:r};default:return n}},s=(e,t)=>{const{type:n}=(0,l.PFL)(e);switch(n){case l.oS0.TYPE_BOOLEAN:case l.oS0.TYPE_BOOLEAN_RADIO:case l.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t.toString();case l.oS0.TYPE_DATE:return t&&a()(t).format("YYYY-MM-DD")||"";case l.oS0.TYPE_TIMESTAMP:return t&&a()(t).format()||"";case l.oS0.TYPE_ACTIVENESS_DATE:case l.oS0.TYPE_LOCAL_DATE:return t&&t.valueOf();default:return t||""}},c=(0,o.curry)(((e,t,n)=>({value:s(t,n),uri:e.uri,attributeType:t})))},1108:(e,t,n)=>{n.d(t,{c:()=>a});var r=n(24328);const a=n.n(r)().createContext(null)},26978:(e,t,n)=>{n.d(t,{U:()=>l,A:()=>o});var r=n(17440),a=n(27502);const l=(e,t,n,l)=>{const o=(0,r.pipe)(a.nt9,(0,r.defaultTo)({}),(0,r.props)(["attributes","analyticsAttributes"]),(0,r.reject)(r.isNil),r.flatten,(0,r.concat)(r.__,(0,r.pipe)(r.values,(0,r.reject)((0,r.propEq)("uri",a.xPW.id.uri)))(a.xPW)))(e,t);return n.length?o.filter((e=>{let{uri:t}=e;return n.includes(t)})):o.filter((e=>{let{uri:t}=e;return!l.includes(t)}))},o=(e,t)=>(0,r.partition)((0,r.pipe)((0,r.path)(["attrType","uri"]),(0,r.includes)(r.__,e)),t)},31992:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(96971),a=n(86689),l=n(24328),o=n.n(l),i=n(87918),s=n.n(i),c=n(47608);const u=e=>{let{onClick:t}=e;const n=(0,c.y)();return o().createElement(a.Z,{component:"button",variant:"caption",className:n.link,onClick:t,underline:"none"},o().createElement(r.Z,{className:n["svg-icon__root"]}),s().text("Show less"))}},35039:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4426),a=n(86689),l=n(24328),o=n.n(l),i=n(87918),s=n.n(i),c=n(47608);const u=e=>{let{moreNumber:t,valueNumber:n,onClick:l}=e;const i=(0,c.y)();return o().createElement(a.Z,{component:"button",variant:"caption",className:i.link,onClick:l,underline:"none"},o().createElement(r.Z,{className:i["svg-icon__root"]}),t&&n?s().text("Show ${moreNumber} more of remaining ${valueNumber} value",{moreNumber:t,valueNumber:n}):s().text("Show more"))}},47608:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}})},11013:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(27502),o=n(81489),i=n(88610),s=n(95492);const c=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e.type){case l.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case l.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(o.Z,t)}}}.build(t,e)}},89978:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(17440),o=n(27502),i=n(52239),s=n(47972),c=n(35039),u=n(31992),p=n(86602),m=n(26978);const d=(0,r.memo)((e=>{let{attrTypes:t,entity:n,parentUri:d,drawLines:g,children:f,className:b,max:h,alwaysVisibleTypeUris:y=p.S,showNonOv:x}=e;const[v,E]=(0,r.useState)(h||1/0),w=(0,r.useMemo)((()=>(0,o.fyF)(t,n,x)),[t,n,x]),[C,O]=(0,r.useMemo)((()=>(0,m.A)(y,w)),[w,y]),S=O.slice(0,v),N=h&&S.length<O.length,T=h&&S.length>=O.length&&h<S.length,k={enabled:g};return a().createElement("div",{className:b},f&&a().createElement(i.Z,k,f),S.concat(C).map((e=>{let{attrType:t,values:r}=e;return a().createElement(s.Z,{key:t.uri,attributeType:t,drawLines:g,values:r,paging:(0,l.path)(["paging",t.uri],n.attributes),parentUri:d,showNonOv:x})})),N&&a().createElement(c.Z,{onClick:()=>{E(1/0)}}),T&&a().createElement(u.Z,{onClick:()=>{E(h)}}))}))},47972:(e,t,n)=>{n.d(t,{Z:()=>X});var r=n(52730),a=n(89810),l=n(71153),o=n.n(l),i=n(24328),s=n.n(i),c=n(17440),u=n(27502),p=n(79692);function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g="13px",f="15px",b={titleRow:{display:"block",minHeight:"16px",textIndent:"-1em",paddingLeft:"1em"},title:{whiteSpace:"nowrap"},ovIcon:{marginLeft:"8px",marginRight:"-3px",marginTop:"-1px",textIndent:0}},h=(0,p.Z)({paddingWrapper:{paddingTop:"3px",paddingBottom:"5px","&:last-child":{paddingBottom:"2px"}},paddingWrapperWithLines:{paddingBottom:"1px","&:last-child":{paddingBottom:"2px"}}}),y=(0,p.Z)(m({wrapper:{fontSize:g,lineHeight:f,flex:1},collaborationWrapper:{display:"flex",alignItems:"start",minHeight:"18px"},attribute:{marginLeft:"8px",paddingLeft:"4px",paddingRight:"4px",display:"inline",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},titleIcon:{width:"16px",height:"16px",marginBottom:"-3px",marginRight:"8px",marginLeft:"1px",color:"rgba(0, 0, 0, 0.38)"}},b)),x=(0,p.Z)(m({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",fontSize:g,lineHeight:f},attribute:{"&:last-child":{marginBottom:0},paddingLeft:"4px",paddingRight:"4px",marginLeft:"5px",marginBottom:"4px",whiteSpace:"pre-wrap",wordBreak:"break-word"},attributes:{alignSelf:"stretch"}},b,{titleRow:m({},b.titleRow,{marginBottom:"3px"})}));var v=n(92985),E=n(52239),w=n(62901),C=n(72316),O=n(37457),S=n(11013);const N=e=>{let{value:t,nonVisibleValues:n,attributeType:r,titleClassName:a,contentClassName:l,showNonOv:i,totalNonVisibleValues:c}=e;const p=y(),{label:m}=r;return s().createElement("div",{className:o()(p.collaborationWrapper,w.U)},s().createElement("div",{className:o()(p.titleRow,p.wrapper)},s().createElement(v.Z,{label:m,className:o()(p.title,a),attributeType:r}),s().createElement(O.Z,{nonOvValues:n,attributeType:r,className:p.ovIcon,nonOvTotal:c}),s().createElement(S.Z,{className:o()(p.attribute,l),attributeValue:t,attributeType:r,showNonOv:i,inlined:!0})),s().createElement(C.Z,{uri:t.uri,relatedObjectUris:(0,u.wp9)(u.q7e.ENTITY_ATTRIBUTE,{uri:t.uri}),objectType:u.q7e.ENTITY_ATTRIBUTE}))};var T=n(35039),k=n(31992);const Z=e=>{let{max:t,values:n,nonVisibleValues:r,totalVisibleValues:a,attributeType:l,parentUri:u,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g,totalNonVisibleValues:f}=e;const b=x(),[h,y]=(0,i.useState)(t),E=t<a,w=E&&h<a,C=E&&h>=a,{label:N}=l,Z=n.slice(0,h),P=a-h;return s().createElement("div",{className:b.wrapper},s().createElement("div",{className:b.titleRow},s().createElement(v.Z,{label:N,className:o()(b.title,m),attributeType:l}),s().createElement(O.Z,{nonOvValues:r,attributeType:l,className:b.ovIcon,nonOvTotal:f})),s().createElement("div",{className:b.attributes},Z.map((e=>s().createElement(S.Z,{key:e.uri,className:o()(b.attribute,d),attributeValue:e,attributeType:l,showNonOv:g})))),w&&s().createElement(T.Z,{moreNumber:(0,c.min)(t,P),valueNumber:P,onClick:()=>{n.length<a&&p({parentUri:u,attributeTypeUri:l.uri,attributeTypeName:l.name,values:n,defaultMaxValues:t}),y(h+t)}}),C&&s().createElement(k.Z,{onClick:()=>{y(t)}}))};var P=n(61347),A=n(20404);const I=e=>{let{className:t,values:n,Component:r}=e;return s().createElement("div",{className:t},n.map(((e,t)=>s().createElement(i.Fragment,{key:e},s().createElement(r,{value:e}),t<n.length-1&&", "))))};var L=n(62228),j=n(10591);function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const M=(0,p.Z)({insertAttribute:R({width:"fit-content"},j.zX[j.Y1.insertAttribute]),deleteAttribute:R({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},j.zX[j.Y1.deleteAttribute])}),V=e=>{let{value:t}=e;const n=M(),l=(0,r.useSelector)(a.ZP.selectors.getMetadata),{appearance:o}=(0,i.useContext)(L.m),c=(0,j.YN)("roles",t,o),p=(0,j.o_)(c);return s().createElement("span",{className:n[p]},(0,u.xqc)(l,t))},z=e=>{let{className:t,values:n}=e;return s().createElement(I,{values:n,className:t,Component:V})};var U=n(86689);const B=e=>{let{value:t}=e;const n=M(),l=(0,r.useSelector)(a.ZP.selectors.getUIPath),o=(0,r.useSelector)(a.ZP.selectors.getEntity),{appearance:c}=(0,i.useContext)(L.m),p=(0,j.YN)("tags",t,c),m=(0,j.o_)(p);return s().createElement(U.Z,{underline:"none",className:n[m],href:(0,u.hgZ)({uiPath:l,tag:t,entityUri:o.uri})},t)},_=e=>{let{className:t,values:n}=e;return s().createElement(I,{values:n,className:t,Component:B})},F=e=>{let{values:t,attributeType:n}=e;const r=y(),{label:a}=n;return s().createElement("div",{className:o()(r.titleRow,r.wrapper)},(l=r.titleIcon,n.uri===u.xPW.tags.uri?s().createElement(A.Z,{className:l}):null),s().createElement(v.Z,{label:a,className:r.title,attributeType:n}),(e=>{switch(n.uri){case u.xPW.tags.uri:return s().createElement(_,{className:e,values:t});case u.xPW.roles.uri:return s().createElement(z,{className:e,values:t});default:return s().createElement(S.Z,{className:e,attributeValue:{value:t[0]},attributeType:n,inlined:!0})}})(r.attribute));var l},H="oneLine",W="multiLine",q="imageLine",Y="special",$=(0,i.memo)((e=>{let{values:t,attributeType:n,drawLines:r,paging:a={},parentUri:l,max:i=1/0,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g}=e;const f=h(),b=(0,c.partition)(u.OXP);if(!t||!t.length)return null;const[y,x]=b(t),w=g?t:y,C=g?[]:x,O=g?"totalValues":"totalOvValues",S=(0,c.ifElse)((0,c.has)(O),(0,c.prop)(O),(0,c.always)(w.length))(a),T=null!=a&&a.totalValues?a.totalValues-S:C.length,k=1===S&&!(0,u.YkM)(n);return s().createElement(E.Z,{enabled:r,className:o()({[f.paddingWrapperWithLines]:r})},s().createElement("div",{className:o()({[f.paddingWrapper]:!r})},(()=>{switch((0,c.cond)([[u.kqr,(0,c.always)(Y)],[u.Or$,(0,c.always)(q)],[(0,c.always)(k),(0,c.always)(H)],[c.T,(0,c.always)(W)]])(n)){case H:return s().createElement(N,{value:w[0],nonVisibleValues:C,totalNonVisibleValues:T,attributeType:n,titleClassName:m,contentClassName:d,showNonOv:g});case W:return s().createElement(Z,{values:w,nonVisibleValues:C,totalVisibleValues:S,totalNonVisibleValues:T,attributeType:n,parentUri:l,max:i,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g});case q:return s().createElement(s().Fragment,null,s().createElement(v.Z,{label:null==n?void 0:n.label,attributeType:n}),s().createElement(P.Z,{attributeValues:w,attributeType:n,paging:a,parentUri:l,requestNextPageOfAttributeValues:p,showNonOv:g}));case Y:return s().createElement(F,{values:w,attributeType:n})}})()))})),G={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues},X=(0,r.connect)(((e,t)=>{let{max:n}=t;return{max:n||a.ZP.selectors.getDefaultMaxValues(e)}}),G)($)},13870:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(27502),u=n(90436),p=n(89978),m=n(85777),d=n(72316),g=n(62901);const f=(0,n(79692).Z)({complexContainer:{marginTop:"1px"},labelContainer:{display:"flex",minHeight:"18px"},label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",paddingTop:"1px",marginLeft:"2px"},spacer:{flex:1}}),b=e=>{let{attributeTypesList:t,attributeValue:n,label:l,expanded:o=!1,children:i,showNonOv:b}=e;const h=f(),y=n.uri,[x,v]=(0,r.useState)(!1);(0,r.useEffect)((()=>{v(o)}),[o]);const E=(t||[]).some((e=>(0,c.kQw)(e))),w=(0,r.useMemo)((()=>({attributes:E?null:n.value,analyticsAttributes:E?n.value:null})),[n,E]);return a().createElement("div",{className:h.complexContainer},a().createElement("div",{className:s()(h.labelContainer,g.U)},a().createElement(m.Z,{onClick:()=>v((e=>!e)),expanded:x}),a().createElement(u.Z,{component:"span",variant:"body2",classes:{body2:h.label}},l),a().createElement("div",{className:h.spacer}),a().createElement(d.Z,{uri:n.uri,relatedObjectUris:(0,c.wp9)(c.q7e.ENTITY_ATTRIBUTE,{uri:n.uri}),objectType:c.q7e.ENTITY_ATTRIBUTE})),x&&a().createElement(p.Z,{attrTypes:t,entity:w,drawLines:!0,parentUri:y,showNonOv:b},i))};b.propTypes={children:o().node,label:o().oneOfType([o().string,o().node]),attributeTypesList:o().arrayOf(c.EMD),attributeValue:o().oneOfType([c.dMV,c.Rtp]),expanded:o().bool,showNonOv:o().bool};const h=b},61347:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(27502),o=n(71153),i=n.n(o),s=n(62228),c=n(26729),u=n(43253),p=n(91446),m=n(10591);const d=(0,n(79692).Z)((e=>({image:e=>{let{imageMargin:t,imageHeight:n,imageWidth:r}=e;return{marginRight:t,width:r,height:n,cursor:"pointer","&:last-child":{marginRight:0}}},deleteAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,background:`url('${(0,l.m5F)('<svg xmlns="http://www.w3.org/2000/svg" style="stroke: #D1051E; stroke-width: 1" viewBox="0 0 114 114">\n\t<line x1="5" y1="109" x2="109" y2="5" />\n</svg>')}') no-repeat`,backgroundColor:m.zX[m.Y1.deleteAttribute].backgroundColor,pointerEvents:"none"}},updateAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:m.zX[m.Y1.updateAttribute].backgroundColor,pointerEvents:"none"}},deleteAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.deleteAttribute].color}`,outlineOffset:"-3px"}},insertAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.insertAttribute].color}`,outlineOffset:"-3px"}},updateAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.updateAttribute].color}`,outlineOffset:"-3px"}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,padding:"36px 8px",textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}))),g=e=>{let{attributeType:t,attributeValues:n=[],paging:o,parentUri:g,requestNextPageOfAttributeValues:f,showNonOv:b,imageSize:h=p.By}=e;const y=d(h),{appearance:x}=(0,r.useContext)(s.m);return a().createElement(u.Z,{attributeValues:n,attributeType:t,renderImage:e=>{let{onOpenImageGalleryDialog:t}=e;return e=>{const n=(0,l.efz)(e),{uri:r}=e,o=(0,m.IF)(r,x),s=(0,m.o_)(o);return a().createElement("div",{className:i()(y.image,{[y[s+"Image"]]:s}),key:r},a().createElement(c.Z,{onClick:()=>t(r),className:y[s],src:n,size:{imageWidth:h.imageWidth,imageHeight:h.imageHeight}}))}},imageSize:h,requestNextPageOfAttributeValues:f,paging:o,parentUri:g,showNonOv:b})}},88610:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(24328),a=n.n(r),l=n(95544),o=n(71153),i=n.n(o),s=n(27502),c=n(62228),u=n(10591),p=n(13870),m=n(31569);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const f=(0,n(79692).Z)({label:{textDecoration:"none"},updateAttribute:d({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.updateAttribute]),insertAttribute:d({width:"fit-content"},u.zX[u.Y1.insertAttribute]),deleteAttribute:d({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.deleteAttribute]),pivotingTooltip:{marginLeft:"4px"}});function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const h=e=>{let{attributeValue:t,attributeType:n}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["attributeValue","attributeType"]);const d=f(),{appearance:g}=(0,r.useContext)(c.m),h=(0,r.useMemo)((()=>{const e=(0,u.IF)(t.uri,g),r=(0,u.o_)(e),o=t.label?t.label:(0,s.Kxm)(t,n.dataLabelPattern);return a().createElement(m.m,{className:d.pivotingTooltip,value:t,attributeType:n},a().createElement(l.Z,{component:"span",className:i()(d[r],d.label)},(0,s.idV)(o)))}),[g,d,t,n]);return a().createElement(p.Z,b({label:h,attributeValue:t,attributeTypesList:(0,s.EUG)({},n)},o))};h.propTypes=s.j2V;const y=(0,r.memo)(h)},95492:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(52730),a=n(24328),l=n.n(a),o=n(71153),i=n.n(o),s=n(27502),c=n(62228),u=n(13870),p=n(10591);function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=(0,n(79692).Z)((e=>({label:{color:e.palette.primary.main,textDecoration:"none"},relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary},updateAttribute:m({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.updateAttribute]),insertAttribute:m({width:"fit-content"},p.zX[p.Y1.insertAttribute]),deleteAttribute:m({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.deleteAttribute])})));function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const b=e=>{let{attributeValue:t,metadata:n,attributeType:r,uiPath:o}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["attributeValue","metadata","attributeType","uiPath"]);const d=g(),b=(0,s.bwT)(t),h=(0,a.useMemo)((()=>(0,s.EUG)(n,r)),[r,n]),{appearance:y}=(0,a.useContext)(c.m),x=(0,a.useMemo)((()=>{const e=(0,p.IF)(t.uri,y),n=(0,p.o_)(e);return l().createElement("a",{href:(0,s.O27)(y)?(0,s.ChB)({uiPath:o,uri:b}):void 0,className:i()(d.label,d[n])},(0,s.idV)(t.label),t.relationshipLabel&&l().createElement("span",{className:d.relationshipLabel},t.relationshipLabel))}),[t.uri,t.label,t.relationshipLabel,y,b,d,o]);return l().createElement(u.Z,f({attributeTypesList:h,attributeValue:t,label:x},m))};b.propTypes=s.NkU;const h=(0,a.memo)(b);var y=n(89810);const x=(0,r.connect)((e=>({metadata:y.ZP.selectors.getMetadata(e),uiPath:y.ZP.selectors.getUIPath(e)})))(h)},81489:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(27502),o=n(71153),i=n.n(o),s=n(62901),c=n(62228),u=n(72316),p=n(67586),m=n(31569),d=n(10591);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=(0,n(79692).Z)({root:{display:"flex",alignItems:"start",justifyContent:"space-between"},commentsContainer:{height:"15px",marginRight:"-4px"},attributeValue:{flex:1,wordBreak:"break-all"},updateAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},d.zX[d.Y1.updateAttribute],{"& > a":{color:d.zX[d.Y1.updateAttribute].color}}),insertAttribute:g({width:"fit-content"},d.zX[d.Y1.insertAttribute],{"& > a":{color:d.zX[d.Y1.insertAttribute].color}}),deleteAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px",textDecoration:"line-through"},d.zX[d.Y1.deleteAttribute],{"& > a":{color:d.zX[d.Y1.deleteAttribute].color}}),multilineAttribute:{width:"fit-content"}}),h=e=>{let{className:t,attributeType:n=null,attributeValue:o,inlined:g}=e;const f=b(),{appearance:h}=(0,r.useContext)(c.m),y=(0,d.IF)(o.uri,h),x=(0,d.o_)(y),v=a().createElement(p.Z,{value:(0,l.kDl)(o),dataTypeDefinition:(0,l.PFL)(n)});return g||x?a().createElement("div",{className:t},a().createElement(m.m,{value:o,attributeType:n,key:o.uri,className:i()({[f.multilineAttribute]:!g})},a().createElement("span",{className:f[x]},v))):a().createElement("div",{className:i()(t,f.root,s.U)},a().createElement(m.m,{value:o,attributeType:n,key:o.uri},a().createElement("span",{className:f.attributeValue},v)),a().createElement(u.Z,{className:f.commentsContainer,uri:o.uri,relatedObjectUris:(0,l.wp9)(l.q7e.ENTITY_ATTRIBUTE,{uri:o.uri}),objectType:l.q7e.ENTITY_ATTRIBUTE}))}},10591:(e,t,n)=>{n.d(t,{Y1:()=>a,zX:()=>l,o_:()=>o,IF:()=>m,YN:()=>d});var r=n(17440);let a;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(a||(a={}));const l={[a.insertAttribute]:{color:"#599E0E"},[a.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[a.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},o=e=>{switch(e){case"UPDATE_ATTRIBUTE":return a.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return a.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return a.deleteAttribute;default:return""}},i="/",s=(0,r.pipe)((0,r.split)(i),(0,r.propSatisfies)((0,r.lte)(2),"length")),c=(0,r.pipe)((0,r.split)(i),(0,r.slice)(0,-2),(0,r.join)(i)),u=(0,r.curry)(((e,t)=>(0,r.cond)([[(0,r.has)(e),(0,r.prop)(e)],[()=>s(e),u(c(e))]])(t))),p=e=>(0,r.pipe)(r.keys,(0,r.any)((0,r.startsWith)(e+i))),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=u(e,t);return(0,r.isNil)(n)?p(e)(t)?"UPDATE_ATTRIBUTE":"":n},d=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r||null===(n=r[e])||void 0===n?void 0:n[t]}},86602:(e,t,n)=>{n.d(t,{S:()=>a});var r=n(27502);const a=[r.xPW.roles.uri,r.xPW.tags.uri]},62901:(e,t,n)=>{n.d(t,{U:()=>r});const r="commentsContainerVisibilityArea"},53857:(e,t,n)=>{n.d(t,{vl:()=>r,r:()=>a,Pi:()=>l});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},l=.001},76572:(e,t,n)=>{n.d(t,{g:()=>i});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l);const i=a().createContext({enabled:!1,queueSizeThreshold:0});i.Provider.propTypes={value:o().shape({enabled:o().bool,queueSizeThreshold:o().number})},i.displayName="AsyncMountContext"},65510:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext(!1);a.displayName="BlockImageGalleryDialogContext"},58142:(e,t,n)=>{n.d(t,{h:()=>l});var r=n(24328);const a=()=>{},l=n.n(r)().createContext({comments:[],commentsMap:null,currentComment:null,getComment:a,getComments:()=>new Promise(a),getCommentsCount:a,createComment:()=>new Promise(a),editComment:()=>new Promise(a),createReply:()=>new Promise(a),resolveThread:a,reOpenThread:a,clearCurrentComment:a,deleteComment:a,sending:!1,loading:!1,pageToken:null});l.displayName="CollaborationContext"},63929:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntitiesMapContext"},3064:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},62228:(e,t,n)=>{n.d(t,{m:()=>a});var r=n(24328);const a=n.n(r)().createContext({appearance:void 0,attributes:void 0,roles:void 0,tags:void 0});a.displayName="HistoryDiffContext"},80687:(e,t,n)=>{n.d(t,{J:()=>a});var r=n(24328);const a=n.n(r)().createContext([])},38309:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(24328);const a=n.n(r)().createContext([]);a.displayName="RelatedObjectUrisContext"},89575:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(24328);const a=n.n(r)().createContext([]);a.displayName="UsersContext"},27536:(e,t,n)=>{n.d(t,{S:()=>o});var r=n(24328),a=n(76572);let l=0;const o=()=>{const e=(0,r.useRef)(!0),{enabled:t,queueSizeThreshold:n=0}=(0,r.useContext)(a.g),[o,i]=(0,r.useState)(!t||t&&l<n);e.current&&l++;const s=(0,r.useRef)();return(0,r.useEffect)((()=>{if(l--,!o)return s.current=setTimeout((()=>{i(!0)}),0),()=>clearTimeout(s.current)}),[]),e.current=!1,o}},36746:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}const o=e=>a().createElement("svg",l({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M19 16v3H5v-3H3v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3h-2zm-6-3.33l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z",id:"Download_svg__a"})),a().createElement("g",{transform:"translate(-3 -3)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Download_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Download_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#fff",mask:"url(#Download_svg__b)",d:"M0 0h24v24H0z"})))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[871],{67462:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r),l=n(27536);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,r.forwardRef)(((n,r)=>(0,l.S)()?a().createElement(e,o({},n,{ref:r})):t&&a().createElement(t,o({},n,{ref:r}))));return n.displayName="WithAsyncMount",n}},85777:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(40435),s=n(98989);const c=(0,n(79692).Z)({expandButton:{"&:hover":{backgroundColor:"transparent"}},expandIcon:{transition:"transform .15s ease"},expanded:{transform:"rotate(90deg)"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{const t=c(),{expanded:n,className:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["expanded","className"]);return a().createElement(i.Z,u({icon:s.Z,size:"XXS",disableRipple:!0,iconClassName:o()(t.expandIcon,{[t.expanded]:n}),className:o()(r,t.expandButton)},l))}},91431:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(3073),s=n(28831),c=n(71153),u=n.n(c);const p=(0,n(79692).Z)((()=>({hidden:{visibility:"hidden"}}))),m=e=>{let{rowIndex:t,rowValue:n,className:l}=e;const o=p(),{toggleRowCollapse:c,getIsRowCollapsible:m,getIsRowCollapsed:d}=(0,r.useContext)(i.x),g=m(n),f=d(t);return a().createElement(s.Z,{className:u()(l,{[o.hidden]:!g}),isOpen:!f,onClick:e=>{c(t),e.stopPropagation()}})};m.propTypes={rowIndex:o().number,rowValue:o().object,className:o().string};const d=m},89925:(e,t,n)=>{n.d(t,{J:()=>$});var r=n(24328),a=n.n(r),l=n(95544),o=n(87918),i=n.n(o),s=n(86689),c=n(90436),u=n(43054),p=n(98538),m=n(39475),d=n(52730),g=n(71153),f=n.n(g),b=n(89810),h=n(27502),y=n(63929),x=n(18527);const v=(e,t)=>{const n=e.relatedObjectUris.indexOf(t);if(n>=0)return e.relatedObjectUris[1-n]},E=e=>`${i().date(e,"LT")} ${i().date(e,"LL")}`;var w=n(79692);const C=(0,w.Z)((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),O=e=>{let{comment:t,className:n}=e;const o=C(),s=(0,d.useSelector)(b.ZP.selectors.getEntity),u=(0,d.useSelector)(b.ZP.selectors.getMetadata),p=(0,r.useContext)(y.X);return a().createElement(l.Z,{className:n},(()=>{switch(t.objectType){case h.q7e.ENTITY_ATTRIBUTE:{const e=(0,h.AFK)(t.objectId,s.type),n=(0,h.zeJ)(u,e);return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected attribute:")),a().createElement(c.Z,{className:o.label},null==n?void 0:n.label))}case h.q7e.ENTITY:return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected profile:")),a().createElement(x.Z,{className:f()(o.label,o.link),value:(0,h.wwR)(s)},(0,h.idV)(s.label)));case h.q7e.RELATION:{var e;const n=v(t,s.uri),r={uri:n,label:null===(e=p[n])||void 0===e?void 0:e.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected relation:")),a().createElement(c.Z,{className:o.label},a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(s)},(0,h.idV)(s.label)),n&&a().createElement(a().Fragment,null,` ${i().text("to")} `,a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(r)},r.label?(0,h.idV)(r.label):(0,h.BTI)(r)))))}case h.q7e.POTENTIAL_MATCH:{var n;const e=v(t,s.uri),r={uri:e,label:null===(n=p[e])||void 0===n?void 0:n.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected potential match:")),a().createElement(c.Z,{className:o.label},a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(s)},(0,h.idV)(s.label)),e&&a().createElement(a().Fragment,null,` ${i().text("and")} `,a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(r)},r.label?(0,h.idV)(r.label):(0,h.BTI)(r)))))}default:return null}})())};var S=n(89575);const N=(0,w.Z)((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),T=e=>{let{comment:t,className:n}=e;const l=N(),o=(0,r.useContext)(S.s);return a().createElement(c.Z,{className:f()(l.root,n)},function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"+";const a=[];let l="",o=!1;for(let i=0;i<=e.length;i++){const s=e[i],c=e[i+1],u=i===e.length-1;l+=s,s===r&&0===i&&(o=!0),o&&t.includes(l.slice(r.length))&&(o=!1,a.push(n(l)),l=""),c===r&&(o=!0,a.push(l),l=""),u&&a.push(l)}return a}(t.content,t.namedUsers,(e=>{const t=o.find((t=>t.username===e.slice(1)));return t?a().createElement(s.Z,{href:`mailto:${t.email}`},e):e})).map(((e,t)=>a().createElement(r.Fragment,{key:t},e))))};var k=n(43434);const Z=(0,w.Z)((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(this,arguments)}const A=e=>{let{className:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","children"]);const l=Z();return a().createElement(k.Z,P({},r,{className:f()(l.root,t)}),n.split(".").map((e=>e[0].toUpperCase())).join(""))};var I=n(58142);const L=(0,w.Z)((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),j=e=>{let{onReply:t,className:n,uri:o,comment:g,onStartEditing:f}=e;const h=L(),y=(0,d.useSelector)(b.ZP.selectors.getUserName),x=g.createdBy===y,{resolveThread:v,reOpenThread:w,sending:C,deleteComment:S}=(0,r.useContext)(I.h),N=(0,r.useMemo)((()=>[{text:i().text("Edit"),onClick:f},{text:i().text("Delete"),onClick:()=>S({uri:o,commentId:g.commentId})}]),[f,S,o,g]);return a().createElement(l.Z,{className:n},a().createElement(l.Z,{className:h.header},a().createElement(A,{classes:{root:h.avatar}},g.createdBy),a().createElement(l.Z,{width:"100%"},a().createElement(c.Z,{className:h.username},g.createdBy)),a().createElement(c.Z,{className:h.createdAt},E(g.createdTime)),x&&a().createElement(p.Z,{buttonComponent:m.k,buttonProps:{icon:u.Z,tooltipTitle:i().text("Open menu")},popoverProps:{PopoverClasses:{root:h.dropdownMenu}},menuItems:N,menuId:"collaboration-comment-menu"})),a().createElement(l.Z,{className:h.body},a().createElement(O,{comment:g,className:h.commentTarget}),a().createElement(T,{comment:g,className:h.message}),a().createElement(l.Z,{className:h.buttons},a().createElement(s.Z,{className:h.button,onClick:t,component:"button"},i().text("Reply")),"open"===g.status&&a().createElement(s.Z,{disabled:C,className:h.button,onClick:()=>{v({commentId:g.commentId,uri:o})},component:"button"},i().text("Resolve")),"resolved"===g.status&&a().createElement(s.Z,{disabled:C,className:h.button,onClick:()=>{w({commentId:g.commentId,uri:o})},component:"button"},i().text("Re-open")))))},R=(0,w.Z)((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),D=e=>{let{className:t,reply:n}=e;const{createdBy:r,action:o,createdTime:s}=n,u=R();return a().createElement(l.Z,{className:f()(u.root,t)},a().createElement(A,{classes:{root:u.avatar}},r),a().createElement(l.Z,null,a().createElement(l.Z,{className:u.header},a().createElement(c.Z,{className:u.username},r),"resolve"===o&&a().createElement(c.Z,{className:u.marked},i().text("Marked as resolved")),"reopen"===o&&a().createElement(c.Z,{className:u.marked},i().text("Re-opened"))),"resolve"!==o&&a().createElement(T,{className:u.message,comment:n}),a().createElement(c.Z,{className:u.createdAt},E(s))))};var M=n(77277),V=n(17440),z=n(2271);const U=(0,w.Z)((e=>({root:{width:"100%",backgroundColor:"#fff",fontFamily:"Roboto","&__control":{fontSize:"13px"},"&__highlighter":{padding:"10px 22px",border:"1px solid transparent !important",maxHeight:"70px"},"&__input":{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,maxHeight:"70px",overflow:"auto !important"},"&__suggestions":{padding:"8px 0",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",transform:"translateY(-100%)"},"&__suggestions__list":{maxHeight:"200px",overflowY:"scroll"},"&__suggestions__item":{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover, &--focused":{backgroundColor:"rgba(0,0,0,0.04)"}}},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}const _=e=>{let{onChange:t,className:n}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["onChange","className"]);const o=U(),i=(0,r.useContext)(S.s);return a().createElement(z.r,B({},l,{onChange:(e,n,r,a)=>{t(n,r,(0,V.uniq)(a.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:f()(o.root,n)}),a().createElement(z.p,{trigger:"+",data:i.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:o.mention}))},F=(0,w.Z)({root:{padding:"6px 6px 6px 8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},textField:{maxWidth:"calc(100% - 40px)"},form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:{marginLeft:"40px",marginTop:"8px"},button:{"& + $button":{marginLeft:"8px"}}});var H=n(29627);const W=e=>{switch(e){case"open":return i().text("Reply...");case"resolved":return i().text("Adding a comment will re-open this");default:return""}},q=e=>{let{inputRef:t,className:n,uri:o,relatedObjectUris:s,objectType:c,popperRef:u,comment:p,isEditingComment:m,onCancel:g}=e;const h=F(),y=(0,d.useSelector)(b.ZP.selectors.getUserName),{createReply:x,createComment:v,sending:E,editComment:w}=(0,r.useContext)(I.h),[C,O]=(0,r.useState)(""),[S,N]=(0,r.useState)(""),[T,k]=(0,r.useState)([]),[Z,P]=(0,r.useState)(!1),L=(0,H._)(),j=""!==C.trim(),R=Z||j,D=null==p?void 0:p.status,z=(e,t,n)=>{k(n),O(e),N(t)},U=()=>{null==g||g(),z("","",[])};return(0,r.useEffect)((()=>{u&&u.current.update()}),[u,R]),(0,r.useEffect)((()=>{m?O(p.content):U()}),[m]),a().createElement(l.Z,{className:f()(h.root,n)},a().createElement("form",{onSubmit:e=>{e.preventDefault();const t=(0,V.cond)([[(0,V.always)(!p),()=>v({content:S,namedUsers:T,objectType:c,uri:o,relatedObjectUris:s})],[(0,V.always)(m),()=>w({content:S,namedUsers:T,commentId:p.commentId,objectType:c,replies:p.replies,relatedObjectUris:s,uri:o})],[V.T,()=>x({content:S,namedUsers:T,commentId:p.commentId,action:"open"===p.status?"none":"reopen",uri:o})]]);return L(t()).then(U).catch(console.log)},className:h.form},a().createElement(l.Z,{className:h.main},a().createElement(A,{classes:{root:h.avatar}},y),a().createElement(_,{className:h.textField,disabled:E,onChange:(e,t,n)=>{z(e,t,n)},inputRef:t,value:C,onFocus:()=>P(!0),onBlur:()=>P(!1),placeholder:W(D)})),R&&a().createElement(l.Z,{className:h.buttons},a().createElement(M.Z,{className:h.button,variant:"contained",color:"primary",disabled:!j||E,type:"submit"},((e,t)=>t?i().text("Edit"):"open"===e||"resolved"===e?i().text("Reply"):i().text("Comment"))(D,m)),a().createElement(M.Z,{disabled:E,onClick:()=>U(),className:h.button,variant:"outlined",color:"primary"},i().text("Cancel")))))},Y=(0,w.Z)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),$=(0,r.memo)((e=>{let{uri:t,relatedObjectUris:n,objectType:o,classes:i,popperRef:s,messagesRef:c,comment:u}=e;const p=(0,r.useRef)(),m=Y({classes:i}),[d,g]=(0,r.useState)(!1),f=a().createElement(q,{className:m.sendMessageArea,inputRef:p,popperRef:s,uri:t,relatedObjectUris:n,objectType:o,comment:u,onCancel:()=>g(!1),isEditingComment:d});return a().createElement(l.Z,{className:m.root},u&&a().createElement(a().Fragment,null,a().createElement("div",{className:m.messages,ref:c},a().createElement(j,{comment:u,uri:t,onReply:()=>{d&&g(!1),p.current.focus()},onStartEditing:()=>{g(!0)},className:m.comment}),a().createElement(l.Z,{className:m.replies},u.replies.map((e=>a().createElement(D,{key:e.replyId,className:m.repliedComment,reply:e}))))),f),!u&&f)}))},72316:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(79692),s=n(62901);const c=(0,i.Z)((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},[`.${s.U}:hover &`]:{visibility:"visible"}},showAlways:{}})));var u=n(55962),p=n(58142),m=n(38309),d=n(87918),g=n.n(d),f=n(80030);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const h=e=>a().createElement("svg",b({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),y=(0,i.Z)((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}},childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}))),x=a().forwardRef(((e,t)=>{let{children:n,onClick:r}=e;const l=y();return a().createElement(f.ZP,{title:g().text("Show comment")},a().createElement("div",{ref:t,className:l.root,onClick:r},a().createElement(h,{className:l.icon}),a().createElement("div",{className:l.childrenWrapper},n)))}));x.displayName="CommentButton";const v=x;function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),C=e=>{let{className:t,onClick:n}=e;const r=y();return a().createElement(f.ZP,{title:g().text("Add comment")},a().createElement("div",{className:o()(r.root,t),onClick:n},a().createElement(w,{className:r.icon})))};var O=n(95544),S=n(90436),N=n(27291),T=n(89925),k=n(39475),Z=n(80233);const P=(0,i.Z)((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:e=>{let{hasScroll:t}=e;return{marginLeft:"16px",marginRight:t?"2px":"8px"}},replies:e=>{let{hasScroll:t}=e;return{marginLeft:"8px",marginRight:t?"2px":"8px"}},sendMessageArea:e=>{let{hasScroll:t,scrollWidth:n}=e;return{marginLeft:"8px",marginRight:t?n+2:"8px"}},messages:{maxHeight:"400px",overflowY:"auto"}}))),A=e=>{let{uri:t,relatedObjectUris:n,objectType:l,anchorEl:o,onClose:i,open:s,comment:c}=e;const[u,m]=(0,r.useState)(0),d=P({scrollWidth:u,hasScroll:0!==u}),f=(0,r.useRef)(null),{resolveThread:b,loading:h,sending:y}=(0,r.useContext)(p.h),x=1+(null==c?void 0:c.replies.length);return a().createElement(Z.Z,{popperRef:f,anchorEl:o,open:s,placement:"right-start",onClose:i,className:d.popper},a().createElement(O.Z,{className:d.header},a().createElement(O.Z,{className:d.headerInfo},a().createElement(S.Z,{className:d.title},g().text("Comments")),c&&!h&&a().createElement(S.Z,{className:d.counter},g().number(x)," ",1===x?g().text("item"):g().text("items"))),c&&!h&&a().createElement(k.k,{className:d.resolveButton,size:"S",onClick:()=>{b({commentId:c.commentId,uri:t})},disabled:y,showForDisabled:!0,tooltipTitle:g().text("Resolve"),icon:N.Z,color:"primary"})),!h&&a().createElement(T.J,{popperRef:f,messagesRef:e=>{e&&m(e.offsetWidth-e.clientWidth)},classes:{root:d.collaborationItem,replies:d.replies,sendMessageArea:d.sendMessageArea,messages:d.messages,comment:d.comment},uri:t,relatedObjectUris:n,objectType:l,comment:c}))},I=e=>{let{className:t,uri:n,objectType:l,relatedObjectUris:i,onChangePopupVisibility:s,allowOnlyOneComment:d=!1,showAlways:g=!1}=e;const f=c(),[b,h]=(0,r.useState)(null),[y,x]=(0,r.useState)(!1),E=y&&Boolean(b),{currentComment:w,commentsMap:O,getComment:S,clearCurrentComment:N,objectTypes:T}=(0,r.useContext)(p.h),k=!!O&&(!T||T.includes(l)),Z=((null==O?void 0:O[n])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),P=!d||d&&0===Z.length,I=null===w&&E;(0,u.D)((()=>{s&&s(E)}),[E]);const L=(0,r.useContext)(m.A),j=(0,r.useMemo)((()=>L?[...i,...L]:i),[L,i]);return k&&a().createElement("div",{className:o()(f.root,t)},P&&a().createElement(C,{className:o()(f.addButton,{[f.showAlways]:g||I}),onClick:e=>{h(e.currentTarget),x(!0)}}),Z.map((e=>{let{replies:t,commentId:n}=e;return a().createElement(v,{ref:n===(null==w?void 0:w.commentId)?h:null,key:n,onClick:()=>(e=>{S(e),x(!0)})(n)},1+t)})),a().createElement(A,{anchorEl:b,open:E,onClose:()=>{h(null),N(),x(!1)},uri:n,relatedObjectUris:j,objectType:l,comment:w}))}},80560:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(71153),u=n.n(c),p=n(17440),m=n(27502),d=n(38442),g=n(33117),f=n(41008),b=n(63485),h=n(44876),y=n(94792);const x=(0,n(79692).Z)((()=>({popupContainer:{},container:{"&$popupContainer":{height:"408px",minWidth:"200px"}}})));function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=e=>{let{open:t,anchorEl:n,data:l,onSearch:o,onClose:i,titleText:s,filterText:c,onListItemClick:w,selected:C,hideCheckBox:O,renderGroupTitle:S}=e,N=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["open","anchorEl","data","onSearch","onClose","titleText","filterText","onListItemClick","selected","hideCheckBox","renderGroupTitle"]);const T=(0,r.useCallback)((e=>e.label.toLowerCase().includes(c.toLowerCase())),[c]),k=(0,r.useCallback)((e=>T(e)||(e.children||[]).some(k)),[T]),Z=(0,r.useMemo)((()=>{const e=(0,p.curry)(((e,n,r,a)=>[{item:E({},n,{filterText:c}),level:e,groupId:r,groupName:a},...t(n.children||[],r,a,e+1)])),t=function(t,n,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const l=t=>e(a,t,n,r),o=t.filter(k);return(S?p.map:p.chain)(l,o)};return t}),[c,S,k]),P=(0,r.useCallback)((e=>e.map((e=>({item:e,items:Z(e.attributes,e.id,e.label)}))).filter((e=>e.items.length))),[Z]),A=(0,r.useCallback)((e=>{let{item:t}=e;w(t,!C.find((e=>e.id===t.id||e.id.includes(`${t.id}.`))))}),[w,C]),I=(0,r.useMemo)((()=>(S?P:Z)(l)),[l,S,P,Z]),L=(0,r.useMemo)((()=>(0,f.LG)(I)),[I]),{focusIndex:j,handleKeyDown:R}=(0,h.t)({items:L,open:t,onSelectFocusedItem:A,selectedItems:C}),D=(0,r.useRef)(null);D.current=j;const M=(0,r.useCallback)(((e,t,n)=>{let{item:r,level:l=0}=t;const o=!!C.find((e=>e.id===r.id||e.id.includes(`${r.id}.`))),i=D.current===n;return a().createElement(g.Z,{key:r.id,onClick:w,checked:o,level:l,data:r,label:a().createElement(y.Z,{text:r.label,highlight:r.filterText}),labelInText:r.label,style:e,hideCheckBox:O,isFocused:i,notSelectable:r.notSelectable,LogoIcon:r.LogoIcon})}),[O,w,C]),V=(0,m.fW1)("label")(I)||308,z=x();return a().createElement(d.Z,v({open:t,className:u()(z.container,z.popupContainer),anchorEl:n,onClose:i,onSearch:o,title:s,containerWidth:V,searchInputOnKeyDown:R},N),a().createElement(b.Z,{height:300,renderItem:M,items:L,hideSubtitles:!0,getItemSize:()=>32,containerWidth:V,focusIndex:j,renderGroupTitle:S}))};C.propTypes={open:o().bool,hideCheckBox:o().bool,anchorEl:o().any,selected:o().array,data:o().array,filterText:o().string,titleText:o().string,onClose:o().func,onListItemClick:o().func,onSearch:o().func,renderGroupTitle:o().func},C.defaultProps={data:[],selected:[],titleText:s().text("Show/hide columns"),filterText:""};const O=C},22118:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(77277),s=n(8629),c=n(49429),u=n(38724),p=n(55999),m=n(79249);const d=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),g=e=>{let{open:t,title:n,content:r,onCancel:l,cancelCaption:g=o().text("Cancel"),onDiscard:f,discardCaption:b="",onSave:h,saveCaption:y=o().text("Save"),disabledSave:x=!1}=e;const v=d();return a().createElement(s.Z,{open:t,onClose:l,classes:{paperScrollPaper:v.paper}},a().createElement(m.Z,{classes:{root:v.title}},n),a().createElement(u.Z,{classes:{root:v.content}},a().createElement(p.Z,{classes:{root:v.contentText}},r)),a().createElement(c.Z,{className:v.actionButtons,disableSpacing:!0},l&&a().createElement(i.Z,{onClick:l},g),a().createElement("div",null,f&&a().createElement(i.Z,{onClick:f,classes:{root:v.discardButton}},b),a().createElement(i.Z,{onClick:h,color:"primary",disabled:x,autoFocus:!0},y))))}},87086:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(4190),o=n(60364);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=e=>{let{open:t=!0,children:n}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["open","children"]);const[c,u]=(0,r.useState)(t),p=(0,o.Z)().transitions.duration.leavingScreen;return(0,r.useEffect)((()=>{if(t!==c){if(!t){const e=setTimeout((()=>{u(!1)}),p);return()=>clearTimeout(e)}u(!0)}}),[t,p,c]),a().createElement(l.ZP,i({open:t},s),c&&n)};s.displayName="Drawer";const c=s},19304:(e,t,n)=>{n.d(t,{J:()=>c});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(7522);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>a().createElement(i.Z,s({message:o().text("No data available")},e))},37573:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),l=n(52730),o=n(71153),i=n.n(o),s=n(43434),c=n(27502),u=n(89810);const p=e=>{let{entity:t,avatarClassName:n,imageClassName:r}=e;const o=(0,l.useSelector)(u.ZP.selectors.getMetadata),p=(0,l.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",m=(0,c.uie)(o,p,t),d=(0,c.vPL)(p,(0,c.XH2)(o,t.type)),g=e=>{e.target.onError=null,e.target.src=(0,c.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(s.Z,{className:i()(n,r),src:m,imgProps:{onError:g}},a().createElement("img",{className:r,src:d,alt:"fallback entity avatar",onError:g}))}},20146:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(52730),o=n(71153),i=n.n(o),s=n(90436),c=n(27502),u=n(89810);const p=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),m=e=>{let{entity:t,className:n,size:r="small"}=e;const o=p(),m=(0,l.useSelector)(u.ZP.selectors.getMetadata),d=t.type,g=(0,c.nt9)(m,d)||{},f=(0,c.VD3)(m,g,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Z,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:i()(o[`entityType-${r}`],n),component:"div"},(0,c.jFi)(m,t))}},76773:(e,t,n)=>{n.d(t,{Z:()=>V});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(71153),p=n.n(u),m=n(45767),d=n(86619),g=n(27502),f=n(79692);const b=(0,f.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});var h=n(40435),y=n(38442),x=n(44876),v=n(33117),E=n(94792),w=n(63485);function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(this,arguments)}const O=(0,c.always)(32),S=e=>{let{selectedEntityTypes:t,onItemClick:n,focusIndex:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["selectedEntityTypes","onItemClick","focusIndex"]);return a().createElement(w.Z,C({getItemSize:O,renderItem:(e,l,o)=>{let{item:i}=l;const s=!!t.find((e=>i.uri===e)),c=o===r;return a().createElement(v.Z,{key:i.uri,onClick:n,checked:s,data:i,label:a().createElement(E.Z,{text:i.label,highlight:i.filterText}),labelInText:i.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:i.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0},l))};S.propTypes={selectedEntityTypes:o().array,onItemClick:o().func,focusIndex:o().number};const N=(0,r.memo)(S);var T=n(80030);const k=(0,f.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),Z=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:a}=t;if(n.length>0){const[t]=n,l=document.createRange();l.setStart(t,0);for(let n=0;n<e.length;n++){l.setEnd(t,l.endOffset+e[n].length);const{width:o}=l.getBoundingClientRect();if(r+o>a)return n;n!==e.length-1&&l.setEnd(t,l.endOffset+", ".length)}}return-1},P=e=>e.join(", "),A=e=>`calc(${(0,c.isNil)(e)?"100%":`${e}px`} - 35px)`,I=e=>{let{list:t,maxWidth:n}=e;const l=k(),o=(0,r.useRef)(),[i,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=Z(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,o.current))}),[t]);const c=P(t),u=i>0,p=u?P(t.slice(0,-i)):c;return a().createElement(T.ZP,{title:u?c:""},a().createElement("div",{className:l.listLabelContainer},a().createElement("div",{style:{width:A(n)},className:l.listLabel,ref:o},c),a().createElement("div",{className:l.visibleItemsLabel},p),u&&a().createElement("div",{className:l.hiddenCount},`+${i}`)))};I.propTypes={list:o().arrayOf(o().string).isRequired,maxWidth:o().number};const L=I;function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const M=e=>{let{entityTypes:t,selectedEntityTypes:n,single:l,placeholder:o,enableEmptyValueUnderline:i,onChange:u,classes:f={},ListLabelProps:v={},disabled:E=!1}=e;const w=b(),[C,O]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>O(!0)),[]),T=(0,r.useCallback)((()=>O(!1)),[]),[k,Z]=(0,r.useState)(""),P=(0,r.useCallback)((()=>Z("")),[]),A=(0,r.useCallback)((0,c.pipe)(P,T),[T,P]),I=(0,r.useMemo)((()=>t.filter(g.oDv).filter((e=>{let{label:t}=e;return g.P6Y.strings.search(t,k)})).map(((e,t)=>({item:{item:R({},e,{filterText:k})},index:t})))),[t,k]),D=(0,r.useMemo)((()=>n.map((e=>t.find((0,c.propEq)("uri",e)))).map((0,c.prop)("label"))),[n,t]),M=(0,r.useCallback)(((e,t)=>{l?(u(t?[e.uri]:[]),A()):u(t?n.concat(e.uri):n.filter((t=>t!==e.uri)))}),[n,u,l,A]),V=(0,r.useCallback)((e=>{let{item:t}=e;const r=!n.includes(t.uri);M(t,r)}),[n,M]),{focusIndex:z,handleKeyDown:U}=(0,x.t)({items:I,open:C,onSelectFocusedItem:V,selectedItems:n,onClose:A}),B=(0,r.useRef)(),_=B.current?B.current.getBoundingClientRect().width:0,F=Math.max(_,255),H=0===n.length;return a().createElement(a().Fragment,null,a().createElement(d.Z,{label:s().text("Entity type"),ref:B,InputProps:{startAdornment:H&&!o?null:a().createElement("div",{className:p()(w.inputText,f.inputText)},H?a().createElement("div",null,o):a().createElement(L,j({},v,{list:D}))),classes:{root:w.inputRoot,input:p()(w.input,f.input,{[w.emptyInput]:H&&!o}),disabled:p()(w.disabledInput,{[w.disabledPointer]:E}),underline:w.disabledUnderline},endAdornment:a().createElement(h.Z,{size:"L",icon:m.Z,iconClassName:p()(w.icon,{[w["popup-opened-icon"]]:C}),disabled:E}),readOnly:!0,disabled:!0,disableUnderline:H&&!i},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:p()(w.inputLabel,f.label)}},value:"",onClick:E?void 0:S,classes:{root:p()(w.root,f.root)},margin:"dense",variant:"filled",disabled:E,"data-reltio-id":"entity-type-selector"}),a().createElement(y.Z,{open:C,anchorEl:B.current,onClose:A,onSearch:Z,title:s().text("Select entity types"),containerWidth:F,containerHeight:355,searchInputOnKeyDown:U,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":"entity-type-selector-popup"}},a().createElement(N,{items:I,onItemClick:M,selectedEntityTypes:n,width:F,height:245,focusIndex:z})))};M.propTypes={entityTypes:o().arrayOf(g.p8l),selectedEntityTypes:o().arrayOf(o().string).isRequired,onChange:o().func.isRequired,single:o().bool,enableEmptyValueUnderline:o().bool,placeholder:o().string,classes:o().shape({root:o().string,label:o().string,inputText:o().string,input:o().string}),ListLabelProps:o().shape({maxWidth:o().number}),disabled:o().bool};const V=(0,r.memo)(M)},55401:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(90436),s=n(95063);const c=e=>{let{className:t,message:n}=e;const r=(0,s.y)();return n?a().createElement(i.Z,{variant:"caption",className:o()(r.caption,t)},n):null}},93555:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(71153),a=n.n(r),l=n(55401),o=n(42494),i=n(74828),s=n(24328),c=n.n(s),u=n(95063);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const m=(0,s.memo)((e=>{let{errorMessage:t,children:n,className:r,classes:s}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["errorMessage","children","className","classes"]);const d=(0,u.y)(),g=!!t;return c().createElement(o.Z,p({className:a()(d.wrapper,r,null==s?void 0:s.root),error:!0},m),n,g&&c().createElement(i.Z,{className:a()(d.helperText,null==s?void 0:s.helperText)},c().createElement(l.Z,{message:t})))}))},95063:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((e=>({wrapper:{width:"100%"},helperText:{margin:"3px 0 1px 12px"},caption:{display:"flex",color:e.palette.error.main,fontSize:"12px",lineHeight:"16px"}})))},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(17998);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const l=s();return a().createElement(i.Z,{title:n,classes:{root:o()(l.container,t),title:l.title}},r)}},44363:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(17440),s=n(80030),c=n(79692);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const m=(0,i.range)(2,10).reduce(((e,t)=>u({},e,{[`&:nth-child(${t})`]:{paddingLeft:`calc(1em * (${t} - 2))`,"&::before":{content:'"└"',display:"inline-block",fontSize:"1em",marginRight:"5px",color:"rgba(255, 255, 255, 0.28)"}}})),{}),d=(0,c.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px","& p":{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},"& ul":{listStyleType:"none",padding:0,margin:0,"& li":u({fontSize:"10px",lineHeight:"11px",fontWeight:500,color:"rgba(255, 255, 255, 0.7)",marginTop:"4px"},m,{"&:last-child":{color:"white"}}),"& li + li":{marginTop:"2px"}}}})));function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}const f=e=>{let{pathToTitle:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["pathToTitle","children"]);const l=d(),o=t&&t.length?a().createElement("div",{className:l.tooltipContent},a().createElement("p",null,(0,i.last)(t)),t.length>2&&a().createElement("ul",null,t.map((e=>a().createElement("li",{key:e},e))))):"";return a().createElement(s.ZP,g({title:o,disableFocusListener:!0,classes:{tooltip:l.tooltip}},r),n)};f.propTypes={pathToTitle:o().arrayOf(o().string).isRequired,children:o().node};const b=f},94792:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);const l=(0,n(79692).Z)({highlight:{fontWeight:600}}),o=e=>{let{text:t="",highlight:n="",className:r}=e;const o=l(),i=n&&t.split(new RegExp(`(${n})`,"gi"));return a().createElement("span",null,n?i.map(((e,t)=>a().createElement("span",{key:t,className:e.toLocaleLowerCase()===n.toLocaleLowerCase()?r||o.highlight:""},e))):t)}},26729:(e,t,n)=>{n.d(t,{f:()=>b,Z:()=>h});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(80079);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M0 0h24v24H0z"}),a().createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-4.5-9l2.5 3.096V18H5l4.5-5.5 2.5 3.01L16.5 10zm-8-4a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",fillOpacity:.12,fill:"#000",fillRule:"nonzero"})));var u=n(27502);const p=(0,n(79692).Z)((e=>({root:{position:"relative"},image:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,objectFit:"cover",verticalAlign:"bottom"}},defaultContainer:{display:"flex",alignItems:"center",backgroundColor:"rgb(247, 247, 247)"},defaultImage:{width:"40px",height:"40px",marginLeft:"auto",marginRight:"auto",color:e.palette.text.secondary},hideImage:{display:"none"}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}const d="loading",g="loaded",f="error",b={SMALL:{imageWidth:114,imageHeight:114},MEDIUM:{imageWidth:162,imageHeight:162},LARGE:{imageWidth:192,imageHeight:192},OVERRIDE:{imageWidth:"unset",imageHeight:"unset"}},h=(0,r.memo)((e=>{const{src:t,className:n,containerClassName:l,size:s=b.SMALL,overlay:h=null}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["src","className","containerClassName","size","overlay"]),x=s||b.SMALL,v=p(x),[E,w]=(0,r.useState)(d);(0,r.useEffect)((()=>{w(d)}),[t]);const C=E===d,O=E===g;return E===f?a().createElement("div",m({className:o()(v.defaultContainer,v.image,n)},y),a().createElement(i.Z,{className:v.defaultImage})):a().createElement("div",{className:o()(v.root,l)},!(0,u.O27)(t)&&a().createElement("img",m({src:t,className:o()(v.image,n,{[v.hideImage]:C}),onLoad:()=>{w(g)},onError:()=>{w(f)},alt:"image"},y)),C&&a().createElement("div",m({className:o()(v.defaultContainer,v.image,n)},y),a().createElement(c,{className:v.defaultImage})),O&&h)}))},22349:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(17440),s=n(71153),c=n.n(s),u=n(77277),p=n(43054),m=n(40435),d=n(98538),g=n(52669),f=n(81556),b=n(79692);const h=(0,b.Z)((()=>({root:{fontSize:"24px",color:"#fff"}}))),y=e=>{let{checked:t,className:n,onClick:r}=e;const l=h(),o=t?f.Z:g.Z;return a().createElement(o,{className:c()(l.root,n),onClick:r})};var x=n(36746),v=n(79573);const E=(0,b.Z)((()=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"0.2s linear all","&:not($selected):not($selectionMode):hover":{backgroundColor:"rgba(0,0,0,0.6)"},userSelect:"none"},selected:{backgroundColor:"rgba(0,114,206,0.6)"},selectionMode:{cursor:"pointer","&:not($selected)":{backgroundColor:"rgba(0,0,0,0.6)"}},button:{padding:0,width:"100px",height:"36px",color:"#fff",fontSize:"14px",fontWeight:500,lineHeight:"16px",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"rgba(98,2,238,0)"},checkedIcon:{position:"absolute",left:"4px",top:"4px",cursor:"pointer"},actions:{display:"flex",alignItems:"center",position:"absolute",top:"4px",right:"4px"},actionButton:{color:"#fff",fontSize:"24px"},dropDownMenuButton:{margin:"0 2px 0 8px"}}))),w=(0,r.memo)((e=>{const{id:t,canBeSelected:n=!1,selected:l=!1,selectionMode:s=!1,onDeselect:g=v.ZT,onSelect:f=v.ZT,onShareLink:b,onSetAsDefault:h,onDelete:w,onDownload:C=v.ZT,onClick:O}=e,S=E(),[N,T]=(0,r.useState)(!1),k=(0,r.useMemo)((()=>[{text:o().text("Share link"),onClick:b},{text:o().text("Set as default"),onClick:h},{text:o().text("Delete"),onClick:w}].filter((0,i.prop)("onClick"))),[b,h,w]),Z=e=>()=>(0,i.ifElse)((0,i.equals)(!0),g,f)(e),P=n&&(l||N||s),A=!s&&!l&&N,I=n&&l;return a().createElement("div",{className:c()(S.overlay,{[S.selected]:l,[S.selectionMode]:s}),onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),onClick:s?Z(l):e=>{e.currentTarget===e.target&&O()}},P&&a().createElement(y,{className:S.checkedIcon,checked:l,onClick:Z(l)}),A&&a().createElement("div",{className:S.actions},a().createElement(m.Z,{onClick:C,className:S.actionButton,icon:x.Z}),a().createElement(d.Z,{menuId:`image-overlay-actions-${t}`,buttonComponent:m.Z,buttonProps:{icon:p.Z,className:c()(S.actionButton,S.dropDownMenuButton)},menuItems:k})),I&&a().createElement(u.Z,{className:S.button,variant:"outlined",onClick:g},o().text("Deselect")))}))},95596:(e,t,n)=>{n.d(t,{C:()=>v,A:()=>x});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(8629),s=n(38724),c=n(70331),u=n(15223),p=n(95544),m=n(87685),d=n(73115);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}const f=e=>a().createElement("svg",g({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M14 5a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1h10zm6 12v2h-3v-2h3zm2-4v2h-5v-2h5zm0-4v2h-5V9h5zm0-4v2h-5V5h5z",id:"Details_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fillRule:"evenodd"},a().createElement("mask",{id:"Details_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Details_svg__a"})),a().createElement("path",{mask:"url(#Details_svg__b)",d:"M0 0h24v24H0z"})));var b=n(39475),h=n(4270);const y=(0,n(79692).Z)((()=>({paper:{backgroundColor:"rgba(0, 0, 0, .85)"},backdrop:{backgroundColor:"transparent"},toolbar:{paddingLeft:"20px",paddingRight:"20px"},appBar:{position:"relative",background:"linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%)"},closeButton:{marginRight:"28px"},closeIcon:{fontSize:"24px",color:"#fff"},headerLeft:{display:"flex",alignItems:"center",flex:2},headerCenter:{display:"flex",justifyContent:"center",flex:1},headerRight:{flex:2,display:"flex",justifyContent:"flex-end",alignItems:"center"},modeSwitcher:{backgroundColor:"#fff"},content:{padding:0}})));let x;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(x||(x={}));const v=e=>{let{open:t,mode:n,children:l,header:g,onClose:v,onChangeMode:E}=e;const w=y(),C=(0,r.useMemo)((()=>[{id:x.GALLERY_MODE,title:o().text("Gallery"),Icon:d.Z},{id:x.DETAILS_MODE,title:o().text("Details"),Icon:f}]),[]);return a().createElement(i.Z,{classes:{paper:w.paper},open:t,BackdropProps:{className:w.backdrop},fullScreen:!0},a().createElement(c.Z,{classes:{colorPrimary:w.appBar}},a().createElement(u.Z,{className:w.toolbar},a().createElement(p.Z,{className:w.headerLeft},a().createElement(b.k,{tooltipTitle:o().text("Close"),onClick:v,className:w.closeButton,iconClassName:w.closeIcon,icon:m.default}),null==g?void 0:g.left),a().createElement(p.Z,{className:w.headerCenter},a().createElement(h.Z,{modes:C,modeId:n,onChange:E,className:w.modeSwitcher})),a().createElement(p.Z,{className:w.headerRight},null==g?void 0:g.right))),a().createElement(s.Z,{className:w.content},l))}},76283:(e,t,n)=>{n.d(t,{E:()=>d,Z:()=>g});var r=n(24328),a=n.n(r),l=n(4614),o=n(39475),i=n(61932),s=n(27291),c=n(79573),u=n(71153),p=n.n(u);const m=(0,n(79692).Z)({root:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px"},check:{color:"#8CC152"}});let d;!function(e){e[e.INIT=1]="INIT",e[e.PROGRESS=2]="PROGRESS",e[e.SUCCESS=3]="SUCCESS",e[e.DONE=4]="DONE"}(d||(d={}));const g=e=>{let{classes:t={},tooltip:n="",onClick:r=c.ZT,mode:u=d.INIT}=e;const g=m();return a().createElement("div",{className:p()(g.root,t.root)},(()=>{switch(u){case d.INIT:return a().createElement(o.k,{className:t.button,size:"M",tooltipTitle:n,icon:i.Z,onClick:r});case d.PROGRESS:return a().createElement(l.Z,{className:t.spinner,size:24});case d.SUCCESS:return a().createElement(s.Z,{className:p()(g.check,t.check)});default:return null}})())}},87378:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(67358);const s=(0,n(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:n=!1,className:r}=e;const l=s();return a().createElement(a().Fragment,null,a().createElement("div",{className:o()(l.loadingOverlay,r,{[l.transparent]:t,[l.relativePosition]:n})},a().createElement(i.Z,{color:"secondary"})))}},4270:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(77277),o=n(38592),i=n(71153),s=n.n(i),c=n(78223),u=n(79692),p=n(41128);const m=(0,u.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,p.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.U1)(e.palette.primary.main,.24)}}}))),d=(0,c.Z)(l.Z),g=e=>{let{className:t,classes:n={},modes:r=[],modeId:l,onChange:i}=e;const c=m();return a().createElement(o.Z,{className:t},r.map((e=>{let{id:t,title:r,tooltipTitle:o,Icon:u}=e;return a().createElement(d,{key:String(t),className:s()(c.button,{[c.current]:l===t},n.button),tooltipTitle:o,onClick:(p=t,()=>i(p)),"data-reltio-id":`reltio-search-mode-${t}`},u&&a().createElement(u,{className:c.icon}),r&&a().createElement("div",{className:c.title},r));var p})))}},80233:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(27556),s=n(1292),c=n(95544),u=n(7421);const p=(0,n(79692).Z)((e=>{const t=e.palette.background.paper;return{popoverRoot:{backgroundColor:t,maxWidth:1e3},popper:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}})),m=e=>{let{anchorEl:t,placement:n="top",arrow:r=!0,open:l,onClose:m=(()=>{}),children:d,className:g,popperRef:f}=e;const b=p(),[h,y]=a().useState(null);return a().createElement(u.Z,{anchorEl:t,placement:n,className:o()(b.popper,g),modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},arrow:{enabled:r,element:h}},open:l,modal:!1,popperRef:f},a().createElement(c.Z,null,a().createElement(s.Z,{onClickAway:e=>{var t;t=e.target,Array.from(document.querySelectorAll("[data-modal]")).some((e=>e.contains(t)))||m()}},a().createElement(i.Z,{className:b.popoverRoot},r?a().createElement("span",{className:b.arrow,ref:y}):null,a().createElement(c.Z,null,d)))))}},33109:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),p=n(90436),m=n(80030),d=n(87918),g=n.n(d),f=n(27502),b=n(89810),h=n(37573),y=n(63127),x=n(20146);const v=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}},scores:{display:"flex",flexGrow:1,justifyContent:"flex-end",paddingRight:"20px"}})));function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}const w=e=>{let{className:t,entity:n,scoresToShow:l,rangeColorsConfig:o,children:i,classes:d}=e;const w=v({classes:d}),C=(0,c.useSelector)(b.ZP.selectors.getMetadata),O=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const S=(0,f.idV)(n.label),N=n.secondaryLabel,T=(0,f.ptG)(C,n),k=(0,f.Fn9)(n),Z=(0,f.AET)(C,n,l),P=n.uri,A=(0,f.BTI)(n);return a().createElement("div",{className:s()(w.profileBandWrapper,t)},a().createElement("div",{className:s()(w.profileBand,{[w.inactive]:!k}),"data-entity-uri":P},a().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:w.profileIcon,imageClassName:w.imageProfileIcon}),a().createElement("div",{className:w.profileInfo},a().createElement("div",null,a().createElement(p.Z,{variant:"h6",className:w.label},S),N&&a().createElement(p.Z,{variant:"subtitle2",className:w.secondaryLabel},N),T&&a().createElement(p.Z,{variant:"subtitle1",className:w.businessCard},T)),a().createElement("div",{className:w.specialInfo},a().createElement("div",{className:w.entityType},a().createElement(x.Z,{entity:n,size:"medium",className:w.badge}),Z.length>0&&a().createElement("div",{className:w.scores},Z.map((e=>a().createElement(y.Z,E({key:e.uri},e,{rangeColorsConfig:o}))))),!(0,f.ZiX)(P)&&a().createElement(m.ZP,{title:g().text("Copy to clipboard")},a().createElement(p.Z,{display:"inline",variant:"body2",className:w.entityId,onClick:O},g().text("Entity ID"),": ",A))))),i&&a().createElement("div",null,i)))};w.propTypes={className:o().string,entity:o().object,scoresToShow:o().arrayOf(o().string),rangeColorsConfig:o().object,children:o().node,classes:o().object};const C=w},91026:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(52730),s=n(27502),c=n(89810);const u=(0,n(79692).Z)((e=>({container:{position:"relative",display:"flex",fontSize:"12px",lineHeight:"14px",color:e.palette.text.primary,padding:"8px 8px 8px 0",overflow:"hidden"},colorBox:{position:"absolute",opacity:.12,top:0,left:0,bottom:0,width:"32px"},image:{width:"32px",height:"32px"},avatar:{marginRight:"8px",marginLeft:"16px",marginTop:"2px"},info:{overflow:"hidden",display:"flex",flexDirection:"column"},firstRow:{width:"100%"},label:{display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:500,color:e.palette.primary.main},link:{textDecoration:"none"},secondRow:{wordWrap:"break-word",marginTop:"4px",lineHeight:"13px",fontSize:"11px"},thirdRow:{display:"flex",alignItems:"center",fontSize:"12px",color:e.palette.text.secondary,marginTop:"auto"}})));var p=n(37573),m=n(18527),d=n(83088),g=n(20146);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const b=(0,r.memo)((e=>{let{entity:t,classes:n={},disableEntityTypeColor:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","classes","disableEntityTypeColor"]);const b=u(),{secondaryLabel:h,label:y,container:x}=n,v=(0,i.useSelector)(c.ZP.selectors.getMetadata),E=(0,s.idV)(t.label),{secondaryLabel:w,type:C}=t,O=(0,s.nt9)(v,C)||{},S=(0,s.VD3)(v,O,"typeColor")||s.rSc.palette.primary.main;return a().createElement("div",f({className:o()(b.container,x)},l),a().createElement("div",{className:b.colorBox,style:r?void 0:{backgroundColor:S}}),a().createElement(p.Z,{entity:t,avatarClassName:b.avatar,imageClassName:b.image}),a().createElement("div",{className:b.info},a().createElement("div",{className:b.firstRow},a().createElement(m.Z,{value:(0,s.wwR)(t),className:b.link},a().createElement(d.C,{value:E,placement:"top",showOnExceededHeight:!0},a().createElement("span",{className:o()(b.label,y)},E)))),a().createElement("div",{className:b.secondRow},w&&a().createElement(d.C,{value:w,placement:"top",showOnExceededHeight:!0},a().createElement("span",{className:h},w))),a().createElement("div",{className:b.thirdRow},a().createElement(g.Z,{entity:t}),a().createElement("div",null,(0,s.BTI)(t)))))}))},88357:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(79692);const u=(0,c.Z)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));var p=n(87918),m=n.n(p),d=n(6782);const g="46px",f=(0,c.Z)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:g},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:g}}))),b=e=>{let{className:t,rowData:n}=e;const r=f();return a().createElement("div",{className:s()(r.readOnlyLogicOperatorContainer,t)},n&&n.operator?(0,d.Z)(n.operator):m().text("Where"))};b.propTypes={className:o().string,rowData:o().object};const h=b;var y=n(27502);const x=e=>{let{className:t,rowData:n}=e;const r=f();return a().createElement("div",{className:s()(r.readOnlyFilter,t)},n&&n.filter?(0,y.XS2)(n.filter):m().text("equals"))};x.propTypes={className:o().string,rowData:o().object};const v=x;var E=n(53862);const w=e=>{let{classes:t={},rowData:n,previousRowData:r,LogicOperatorComponent:l=h,AttributeSelectorComponent:o,FilterSelectorComponent:i=v,ValuesEditorComponent:c,ActionsComponent:p,filterSelectorRef:m,attributeSelectorProps:d={}}=e,g=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const f=u();return a().createElement("div",{className:s()(f.row,t.root)},a().createElement(l,{className:t.logicOperatorContainer,rowContext:g,rowData:r}),a().createElement("div",{className:s()(f.rowItem,t.attributeSelectorContainer)},a().createElement(o,{attributeSelectorProps:d,rowContext:g,rowData:n})),a().createElement("div",{className:s()(f.rowItem,t.filterSelectorContainer)},a().createElement(i,{textFieldInputRef:m,rowContext:g,rowData:n})),a().createElement("div",{className:s()(f.rowItem,f.fullWidth,t.valuesEditorContainer)},a().createElement(c,{rowContext:g,rowData:n})),a().createElement("div",{className:s()(f.rowItem,t.actionsContainer,{[f.hidden]:!n})},a().createElement(p,{rowContext:g,rowData:n})))};w.propTypes={classes:o().shape({root:o().string,logicOperatorContainer:o().string,attributeSelectorContainer:o().string,filterSelectorContainer:o().string,valuesEditorContainer:o().string,actionsContainer:o().string}),rowData:E.Xw,previousRowData:E.Xw,LogicOperatorComponent:o().elementType,AttributeSelectorComponent:o().elementType,FilterSelectorComponent:o().elementType,ValuesEditorComponent:o().elementType,ActionsComponent:o().elementType,filterSelectorRef:o().object,attributeSelectorProps:o().shape({onRestoreFocus:o().func,onOpen:o().func,disablePopoverRestoreFocus:o().bool})};const C=(0,r.memo)(w)},51586:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(17440),s=n(88357),c=n(53862);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:n,rowsData:r,lastRowAttributeSelectorProps:l,filterSelectorRef:o,filterSelectorRefIndex:c}=e,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const m=(e,t,r)=>{const m=t>0?(0,i.path)([t-1],r):null,d=t===r.length?{attributeSelectorProps:l}:{};return a().createElement(s.Z,u({key:e&&e.id,rowData:e,previousRowData:m,classes:n,filterSelectorRef:t===c?o:void 0},p,d))};return a().createElement("div",{className:t},r.map(m),m(null,r.length,r))};p.propTypes={className:o().string,rowClasses:o().shape({root:o().string,logicOperatorContainer:o().string,attributeSelectorContainer:o().string,filterSelectorContainer:o().string,valuesEditorContainer:o().string,actionsContainer:o().string}),rowsData:o().arrayOf(c.Xw),LogicOperatorComponent:o().elementType,AttributeSelectorComponent:o().elementType,FilterSelectorComponent:o().elementType,ValuesEditorComponent:o().elementType,ActionsComponent:o().elementType,filterSelectorRef:o().object,filterSelectorRefIndex:o().number,lastRowAttributeSelectorProps:o().shape({onRestoreFocus:o().func,onOpen:o().func,disablePopoverRestoreFocus:o().bool})};const m=(0,r.memo)(p)},2633:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(54573),a=n(17440);const l={BY_LABEL:(0,r.c)({stringify:(0,a.prop)("label")})}},62116:(e,t,n)=>{n.d(t,{Z:()=>q});var r=n(24328),a=n.n(r),l=n(17440),o=n(17871),i=n(75047);const s=e=>{let{children:t,className:n,position:a,map:l}=e;const[o,s]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=l.controls[a].length;return l.controls[a].push(e),s(e),()=>{l.controls[a].removeAt(t)}}),[l,a]),(0,r.useEffect)((()=>{o&&n&&o.classList.add(n)}),[n,o]),o?(0,i.createPortal)(t,o):null};var c=n(87918),u=n.n(c),p=n(77277),m=n(78223),d=n(41039);const g="circle",f="polygon",b=.001;function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}const y=e=>a().createElement("svg",h({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const v=e=>a().createElement("svg",x({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var E=n(79692);const w=(0,E.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),C=(0,m.Z)(p.Z),O=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:l,onClearOverlay:o}=e;const i=w(),s=e=>()=>{l(e)};return a().createElement("div",{className:i.container},t||r?a().createElement(C,{tooltipTitle:u().text("Clear area"),className:i.button,onClick:r?o:s(null)},a().createElement(d.Z,{className:i.icon})):n.map((e=>{const t=(e=>{switch(e){case g:return y;case f:return v;default:return null}})(e);return a().createElement(C,{tooltipTitle:u().text("Draw area"),key:e,className:i.button,onClick:s(e)},a().createElement(t,{className:i.icon}))})))};var S=n(5806),N=n(21324);const T=(0,E.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),k=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=T();return a().createElement(S.Z,{classes:{root:r.container,label:r.label},control:a().createElement(N.Z,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:u().text("Search as I move the map")})},Z=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),l=n.lng(),o=r.lat(),i=r.lng(),s=[],c=[];if(!(180===l&&-180===i||-180===l&&180===i)){const e=t.getCenter();s.push([a,e.lng()]),c.push([o,e.lng()])}return[[a,l],...s,[a,i],[o,i],...c,[o,l]]},P=e=>{switch(e){case g:return window.google.maps.drawing.OverlayType.CIRCLE;case f:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},A=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var I=n(91026),L=n(7421),j=n(27502),R=n(3064);const D=(0,E.Z)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(this,arguments)}const V=(0,j.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),z=(0,j.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),U=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=D(),c=(0,r.useRef)(),[u,p]=(0,r.useState)(!1),{activeEntityUri:m}=(0,r.useContext)(R.P),d=(0,l.pathEq)(["entity","uri"],m,t),g={lat:t.point.lat,lng:t.point.lng},f=(0,r.useCallback)((0,j.DsO)(p,50),[]),b=(0,r.useCallback)((()=>f(!0)),[f]),h=(0,r.useCallback)((()=>f(!1)),[f]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(L.Z,{anchorEl:c.current,open:u,className:s.popper,modal:!1,placement:"top"},a().createElement(I.Z,{entity:t.entity,onMouseOver:b,onMouseOut:h})),a().createElement(o.Jx,M({icon:{url:u||d?V:z,scaledSize:new google.maps.Size(22,32)},position:g,onClick:y,visible:!1!==t.visible,onMouseOver:b,onMouseOut:h},i)),a().createElement(o.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))}));var B=n(53857);const _=(0,E.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});var F=n(90690);function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=["drawing"],q=e=>{let{markers:t=[],mapKey:n,defaultZoom:i,defaultCenter:c,loadingElement:u,isSearchOnMapMove:p,isSearchEnabled:m,activeOverlay:d,overlayOptions:g,drawingModes:f=[],markerClusterer:h,markerClustererOptions:y,mapContainerClassName:x,onMapBoundsChanged:v,onOverlayUpdated:E,onMarkerClicked:w}=e;const C=_(),{isLoaded:S,loadError:N}=(0,o.Ji)({googleMapsApiKey:n,libraries:W}),T=(0,r.useRef)(null),[I,L]=(0,r.useState)(null),[j,R]=(0,r.useState)(null),[D,M]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:l}=e;const o=(0,F.D)(t),i=(0,F.D)(n),s=l&&window.google;(0,r.useEffect)((()=>{s&&!a&&t.length&&t!==o?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+b,e.lng()+b)),r.extend(new window.google.maps.LatLng(e.lat()-b,e.lng()-b))}t.fitBounds(r),n&&A(t,n,r)})(t,l,n):s&&n&&n!==i&&A(l,n)}),[l,t,n])})({markers:t,activeOverlay:d,map:I,isSearchOnMapMove:p});const V=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}({},B.r,g||{})),[g]),z=(0,r.useCallback)((e=>{v(e?Z(I):null),M(null),clearTimeout(T.current)}),[I,v]),q=(0,r.useCallback)((()=>{clearTimeout(T.current)}),[]),Y=(0,r.useCallback)((()=>{p&&v(Z(I))}),[p,I,v]),$=(0,r.useCallback)((()=>{p&&(clearTimeout(T.current),T.current=setTimeout(Y,1e3))}),[Y,p]),G=(0,r.useCallback)(((e,t)=>{const n=t||j&&{type:B.vl.POLYGON,overlay:j};if(!(0,l.isEmpty)(n)&&"function"==typeof E){const{overlay:e,type:t}=n,r={[B.vl.POLYGON]:()=>e.getPath().getArray().map((e=>[e.lat(),e.lng()])),[B.vl.CIRCLE]:()=>({radius:e.getRadius()/1e3,center:e.getCenter()})},a=r[t]&&r[t]();a&&E({data:a,type:t})}}),[E,j]),X=(0,r.useCallback)((e=>t=>{G(null,{type:e,overlay:t}),t.setMap(null),M(null)}),[G]),K=(0,r.useCallback)((()=>{E(null)}),[E]),Q=e=>t.filter((0,l.prop)("point")).map((t=>a().createElement(U,{key:t.id,marker:t,clusterer:e,onClick:w})));return N?null:S?a().createElement(o.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:{mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},onLoad:L,zoom:i,center:c,onZoomChanged:q,onDragStart:q,onIdle:$,mapContainerClassName:x},I&&m&&Boolean(f.length)&&a().createElement(s,{className:C.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:I},a().createElement(O,{hasActiveOverlay:!!d,drawingModes:f,drawingMode:D,onDrawingModeChanged:M,onClearOverlay:K})),I&&m&&a().createElement(s,{className:C.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:I},a().createElement(k,{onChangeIsSearchOnMapMove:z,isSearchOnMapMove:p})),h?(J=y,a().createElement(o.XL,{options:J},Q)):Q(),!P(D)&&d&&(0,l.propEq)("type",B.vl.POLYGON,d)&&a().createElement(o.mg,{onLoad:R,path:d.path,editable:!0,options:V,onMouseUp:G,onDragEnd:G}),m&&Boolean(f.length)&&a().createElement(o.j_,{onPolygonComplete:X(B.vl.POLYGON),onCircleComplete:X(B.vl.CIRCLE),drawingMode:P(D),options:{drawingControl:!1,circleOptions:V,polygonOptions:V}})):u;var J}},64435:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(13980),s=n.n(i),c=n(31396),u=n(60364);const p=(0,n(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var m=n(27502);const d=e=>"horizontal"===e,g=e=>{let{className:t,children:n,orientation:l,defaultSize:i,size:s,minSize:g,maxSize:f,allowResize:b,onChange:h}=e;const y=p(),x=(0,u.Z)(),[v,E]=(0,r.useState)(),[w,C]=(0,r.useState)(!0),O=(0,r.useCallback)((()=>C(!0)),[]),S=(0,r.useCallback)((()=>C(!1)),[]),N=()=>d(l)?null==v?void 0:v.clientHeight:null==v?void 0:v.clientWidth,T=(0,r.useCallback)((0,m.DsO)((e=>{const t=N();h({percentageSize:e/t*100+"%",isMaxSize:f>0?e===f:e===t+f,isMinSize:e===g})}),250),[h,l,f,v]),k=(0,r.useMemo)((()=>({transition:x.transitions.create(d(l)?"height":"width",{easing:x.transitions.easing.sharp,duration:x.transitions.duration.leavingScreen})})),[l,x]);return"number"==typeof s&&s<0&&(s=(N()||0)+s),a().createElement("div",{ref:E,className:o()(y.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:b,onChange:T,defaultSize:i,minSize:g,maxSize:f,onDragStarted:S,onDragFinished:O,pane1Style:w?k:void 0},n))},f=s().oneOfType([s().number,s().string]);g.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:f,size:f,minSize:f,maxSize:f,allowResize:s().bool,onChange:s().func};const b=g},63127:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(27502),u=n(74139),p=n(46801);const m=e=>{let{label:t,value:n,uri:r,rangeColorsConfig:l,className:o}=e;const i=(0,p.y)();return a().createElement("div",{className:s()(i.container,o),key:r},a().createElement(u.Z,{attrTypeUri:r,label:t}),a().createElement("span",{className:i.value,style:{color:(0,c.Uz2)(r,n,l)}},n))};m.propTypes={label:o().string,value:o().oneOfType([o().string,o().number]),uri:o().string,rangeColorsConfig:o().object,className:o().string};const d=m},74139:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(46801);const p=()=>{const e=(0,u.m)();return a().createElement(a().Fragment,null,a().createElement("span",null,"DQ"),a().createElement("span",{className:e.dqiq},"IQ"))},m=["analyticsAttributes/DQ/analyticsAttributes/score","analyticsAttributes/DQ"],d=["analyticsAttributes/IQ/analyticsAttributes/score","analyticsAttributes/IQ"],g=e=>{let{label:t="",attrTypeUri:n=""}=e;const r=n.indexOf("analyticsAttributes/"),l=n.substr(r),o=(0,c.includes)(l,m),i=(0,c.includes)(l,d);return(0,c.cond)([[(0,c.always)(o),(0,c.always)(a().createElement(p,null))],[(0,c.always)(i),(0,c.always)(s().text("Rank"))],[c.T,(0,c.always)(t)]])()};g.propTypes={label:o().string,attrTypeUri:o().string};const f=g},46801:(e,t,n)=>{n.d(t,{y:()=>a,m:()=>l});var r=n(79692);const a=(0,r.Z)({container:{display:"flex",flexShrink:0,marginLeft:"10px",alignItems:"center"},value:{marginLeft:"4px",minWidth:"20px",textAlign:"center"}}),l=(0,r.Z)({dqiq:{width:"14px",height:"14px",lineHeight:"14px",background:"#e6605e",color:"#fff",fontSize:"10px",fontWeight:100,marginLeft:"2px",marginRight:"1px",borderRadius:"2px",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,textIndent:0}})},33662:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(71153),a=n.n(r),l=n(17440),o=n(24328),i=n.n(o),s=n(87918),c=n.n(s),u=n(29611),p=n(50581),m=n(87685),d=n(21853),g=n(79573),f=n(40435),b=n(15311);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=(0,o.memo)((e=>{let{value:t,autofocus:n,onSearch:r=g.ZT,rootRef:s,classes:x={},height:v}=e,E=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height"]);const w=(0,b.y)({height:v}),[C,O]=(0,o.useState)(""),S=(0,l.pipe)((0,l.tap)(r),O),N=(0,l.isNil)(t)?C:t;return i().createElement(u.Z,h({startAdornment:i().createElement(p.Z,{position:"start"},i().createElement(d.default,{className:w.icon})),endAdornment:i().createElement(p.Z,{position:"end"},N.length>0&&i().createElement(f.Z,{icon:m.default,className:w.clearButton,onClick:()=>S("")})),autoFocus:n,classes:y({},x,{input:a()(w.input,x.input),root:a()(w.container,x.root)}),placeholder:c().text("Search"),value:N,onChange:(0,l.pipe)(g.NA,S),disableUnderline:!0,ref:s},E))}))},87356:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(33662),o=n(15311);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=e=>{let{classes:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["classes"]);const r=(0,o.y)({});return a().createElement(l.Z,i({classes:s({},t,{focused:r.white})},n))}},15311:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},38442:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(87918),u=n.n(c),p=n(79784),m=n(54275),d=n(33662);const g=e=>{let{title:t,className:n,onSearch:r,hideTitle:l,hideSearchInput:o,headerPlacement:i="top",containerWidth:c,containerHeight:g,searchInputOnKeyDown:f,children:b,searchInputRef:h}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef"]);const x=(0,m.Z)({containerWidth:c,containerHeight:g}),v=a().createElement(a().Fragment,null,!l&&a().createElement("div",{className:x.header},t),!o&&a().createElement(d.Z,{onSearch:r,autofocus:!0,onKeyDown:f,inputRef:h,classes:{root:x.searchInputContainer},placeholder:u().text("Search & add attributes"),height:40}));return a().createElement(p.ZP,y,a().createElement("div",{className:s()(x.container,n),style:{width:c}},"top"===i&&v,a().createElement("div",{className:x.list},b),"bottom"===i&&v))};g.propTypes={className:o().string,title:o().string,headerPlacement:o().oneOf(["top","bottom"]),onSearch:o().func,searchInputOnKeyDown:o().func,containerWidth:o().number,containerHeight:o().number,hideTitle:o().bool,hideSearchInput:o().bool,searchInputRef:o().shape({current:o().instanceOf(Element)}),children:o().node},g.defaultProps={anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};const f=g},44876:(e,t,n)=>{n.d(t,{t:()=>o});var r=n(24328),a=n(17440),l=n(63485);const o=e=>{let{items:t,open:n,onSelectFocusedItem:o,selectedItems:i,onClose:s}=e;const[c,u]=(0,r.useState)(null),p=(0,r.useRef)(!1),m=(0,r.useCallback)((e=>{let n=null===e?m(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&(0,l.c)(t[n]));)n+=1;return n!==t.length?n:m(-1)}),[t]),d=(0,r.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||(0,l.c)(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),g=(0,r.useCallback)((()=>{if(!(0,a.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&o({item:e.item,groupData:e})}}),[o,t,c]),f=(0,r.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(m),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(d),e.preventDefault(),!1;case"Enter":p.current=!0,g();break;case"Tab":s&&s(e);break;default:return}}),[t,m,d,g,s]);return(0,r.useEffect)((()=>{if(p.current){p.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,n,i]),{focusIndex:c,handleKeyDown:f}}},54275:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(79692);const a=(0,r.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},92985:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(13980),a=n.n(r),l=n(24328),o=n.n(l),i=n(71153),s=n.n(i),c=n(32701),u=n(90436);const p=(0,n(79692).Z)({label:{color:"rgba(0,0,0,0.6)",fontSize:"13px",lineHeight:"15px"}});var m=n(27502),d=n(74139);const g=e=>{let{label:t,isRequired:n,className:r,attributeType:a={}}=e;const l=p();return o().createElement(u.Z,{className:s()(l.label,r),component:"span"},o().createElement(d.Z,{label:t,attrTypeUri:a.uri}),n&&o().createElement(c.Z,null))};g.propTypes={label:a().string,isRequired:a().bool,className:a().string,attributeType:m.EMD};const f=g},57412:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(86689),s=n(83543);const c=(0,n(79692).Z)((()=>({viewMoreLessLink:{display:"flex",alignItems:"center",cursor:"pointer"},arrow:{marginRight:"8px",marginLeft:"-2px",transform:"rotate(0deg)",transition:"transform 0.35s ease"},rotated:{transform:"rotate(-180deg)"}})));var u=n(71153),p=n.n(u),m=n(87918),d=n.n(m);const g=e=>{let{active:t,onClick:n,className:r}=e;const l=c();return a().createElement(i.Z,{className:p()(l.viewMoreLessLink,r),onClick:n,underline:"none"},a().createElement(s.Z,{className:p()(l.arrow,{[l.rotated]:t})}),t?d().text("View less"):d().text("View more"))};g.propTypes={active:o().bool,onClick:o().func,className:o().string};const f=g},63485:(e,t,n)=>{n.d(t,{Z:()=>d,c:()=>p});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(50166),s=n(44443);const c=(0,n(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=n(41008);const p=e=>e.titleItemIndex===e.index,m=e=>{let{items:t,getItemSize:n,renderItem:l,renderGroupTitle:o,width:m="100%",height:d,fixedTitle:g=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:b,hideSubtitles:h,focusIndex:y=null,onInnerContainerResize:x}=e;const v=c(),E=(0,r.useRef)(null),w=(0,r.useRef)(null),C=(0,r.useRef)(null),O=(0,r.useRef)([0]),S={topMargin:0},N=(0,r.useMemo)((()=>!h||(t||[]).some((e=>null!==e.titleItemIndex))),[t,h]),T=(0,r.useCallback)((e=>{const r=O.current.length;let a=0;t.slice(r-1,e+1).forEach(((e,t)=>{const l=r+t-1;t>0&&(O.current[l]=O.current[l-1]+a),a=n(l,e.item)}))}),[n,t]),k=(0,r.useCallback)((e=>t[e].titleItemIndex),[t]),Z=(0,r.useCallback)((e=>t[e]),[t]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{E.current&&E.current.scrollTo(0)}))}),[t.length]),(0,r.useEffect)((()=>{E.current&&E.current.resetAfterIndex(0),P();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){T(t);const e=k(t);return{offset:O.current[t],titleHeight:n(e,Z(e).item)}}})(t);if(e&&e.offset&&E.current){const{titleHeight:t}=e,n=e.offset-t;(n<E.current.state.scrollOffset||n>E.current.state.scrollOffset+d)&&requestAnimationFrame((()=>{E.current&&E.current.scrollTo(n-(d-t)/2)}))}}),[T,Z,n,k,d,O,t,E]);const P=()=>{C.current&&w.current&&(C.current.style.width=w.current.offsetWidth+"px")},A=(0,r.useCallback)((e=>{let n=null,r=0;return t.some(((t,a)=>{T(a+10);const l=O.current[a+1];return e>=r&&e<l&&(n={index:a,offset:r,listItem:t}),r=l,n})),n}),[T,O,t]),I=(0,r.useCallback)((e=>n(e,Z(e).item)),[Z,n]),L=(0,r.useCallback)((e=>{let{index:t,style:n,data:r}=e;const a=Z(t);return a.item&&(p(a)&&o(n,a.item)||l(n,a.item,t,r))}),[Z,o,l]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:y,listRef:E}),R=(0,r.useCallback)((()=>t.filter((e=>p(e))).map((e=>(e=>a().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},o({height:n(e.index,e.item)},e.item)))(e)))),[n,t,o]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:C,className:v.stickyTitlesWrapper},g&&R()),x&&w.current&&a().createElement(s.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),a().createElement(i.VariableSizeList,{ref:E,itemCount:t.length,itemSize:I,width:m,height:d,itemKey:f,innerRef:w,onScroll:e=>{let{scrollOffset:r,scrollDirection:a}=e;if(!g||!N)return;const l=A(r),o=l&&k(l.index);var i;null!==o&&(i=o,C.current&&[...C.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===i.toString()?(e.style.visibility="visible",S.index=i):e.style.visibility="hidden"}))),P();const s=null!==o&&n(o,Z(o).item),c=A(r+s+S.topMargin);let u=0;if(c){switch(a){case"forward":c.offset-r>0&&p(c.listItem)&&(u=s-(c.offset-r));break;case"backward":{const e=o>-1&&(m=o,t.findIndex(((e,t)=>p(e)&&m<t))),n=(e=>(T(e),O.current[e]))(e);e>-1&&r<n&&s>=n-r&&(u=s-(n-r))}}(e=>{C.current&&(S.topMargin=-e,C.current.style.top=-e+"px")})(u)}var m},style:b?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},L))};m.propTypes={items:o().arrayOf(o().object).isRequired,getItemSize:o().func.isRequired,renderItem:o().func.isRequired,width:o().oneOfType([o().number,o().string]),height:o().number.isRequired,renderGroupTitle:o().func,fixedTitle:o().bool,hideSubtitles:o().bool,itemKey:o().func,disableHorizontalScrollbar:o().bool,focusIndex:o().number,onInnerContainerResize:o().func};const d=m},41008:(e,t,n)=>{n.d(t,{LG:()=>l,LW:()=>o});var r=n(17440),a=n(24328);const l=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))},o=e=>{let{focusIndex:t,listRef:n,items:r}=e;const l=(0,a.useRef)(null),o=(0,a.useRef)(null),i=(0,a.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;l.current=t,o.current=n}),[]);return(0,a.useEffect)((()=>{n.current&&null!==t&&0!==r.length&&(t<Math.max(l.current+3,0)?n.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(o.current-3,r.length-1)&&n.current.scrollToItem(Math.min(t+3,r.length-1),"end"))}),[t,r.length,n]),{handleOnItemsRendered:i}}},15177:(e,t,n)=>{n.d(t,{Z:()=>A});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(27502),s=n(71153),c=n.n(s),u=n(87918),p=n.n(u),m=n(95544),d=n(90436),g=n(80687),f=n(1730),b=n(52194),h=n(89978),y=n(26978),x=n(79692);const v=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),E=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:u="",excludeUris:x=[],includeUris:E=[],attributesCount:w=16}=e;const C=v(),O=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),S=(0,l.useMemo)((()=>(0,y.U)(s,n.type,E,x)),[x,E,s,n.type]),N=(0,i.fyF)(S,n).filter((e=>{let{values:t}=e;return!(0,i.O27)(t)})).length>0;return N||!(0,i.O27)(u)?o().createElement(g.J.Provider,{value:O},o().createElement(f.Z,{className:t},u&&o().createElement(b.Z,{className:C.header,title:u}),o().createElement(m.Z,{className:c()(C.attributesContainer,{[C.noCaption]:!u})},N?o().createElement(h.Z,{entity:n,attrTypes:S,parentUri:n.uri,drawLines:!1,max:w}):o().createElement(d.Z,{className:C.noData},p().text("No data found"))))):null}));var w=n(17440),C=n(76141),O=n(12212);const S=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});var N=n(1108);function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){k(e,t,n[t])}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:u,caption:p="",excludeUris:d=[],includeUris:g=[],pinnedAttributes:h}=e;const x=S(),v=(0,r.useDispatch)(),E=(0,l.useContext)(O.m),k=(0,r.useSelector)(a.ZP.selectors.getUserRoles),Z=(0,l.useMemo)((()=>(0,i.mC3)(h,k)),[h,k]),P=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),A=(0,l.useMemo)((()=>(0,y.U)(u,P.type,g,d)),[d,g,u,P.type]),I=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>T({},e,{viewId:E}))))),[E,v]),L=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.modifyAttribute,v)(T({},e,{viewId:E}))),[E,v]),j=(0,l.useCallback)((e=>(0,w.pipe)(a.N5.actions.removeAttribute,v)(T({},e,{viewId:E}))),[E,v]);return o().createElement(f.Z,{className:t},p&&o().createElement(b.Z,{className:x.header,title:p}),o().createElement(m.Z,{className:c()(x.attributesContainer,{[x.noCaption]:!p})},o().createElement(N.c.Provider,{value:Z},o().createElement(C.Z,{entity:P,attrTypes:A,parentUri:P.uri,drawLines:!1,mode:s,showEmptyEditors:(0,i.ZiX)(P.uri),crosswalks:P.crosswalks,onAddAttributes:I,onChangeAttribute:L,onDeleteAttribute:j}))))}));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(this,arguments)}const A=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=i.ARY.Viewing,attributesCount:n,pinnedAttributes:r}=e,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes"]);return(0,i.uzs)(t)?o().createElement(E,P({attributesCount:n},a)):o().createElement(Z,P({mode:t,pinnedAttributes:r},a))}))},52239:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l);const i="1px solid #AFD4E9",s=(0,n(79692).Z)({decorator:{marginLeft:8,borderLeft:i,"&:last-child":{borderLeft:"none","&:before":{borderLeft:i}},"&:before":{top:0,height:14,width:5,borderBottom:i,content:'""',display:"block",left:"0"},"&$plain":{"&:before":{width:0}}},plain:{},wrapper:{marginLeft:16,marginTop:-8}}),c=e=>{let{className:t,children:n,plain:r=!1,enabled:l=!1}=e;const i=s();return l?a().createElement("div",{className:o()(i.decorator,{[i.plain]:r},t)},a().createElement("div",{className:i.wrapper},n)):a().createElement(a().Fragment,null,n)}},43253:(e,t,n)=>{n.d(t,{Z:()=>Se});var r=n(24328),a=n.n(r),l=n(52730),o=n(44443),i=n(90436),s=n(89810),c=n(27502),u=n(65510),p=n(17440),m=n(95544),d=n(45203),g=n(15762),f=n(71153),b=n.n(f),h=n(26729),y=n(40435),x=n(79692);const v=(0,x.Z)((e=>({root:{display:"flex",alignContent:"center",flexDirection:"column"},main:{position:"relative",padding:"0 86px",marginTop:"auto"},mainImageContainer:{display:"flex",alignContent:"center",height:"100%",width:"100%"},mainImage:{maxWidth:"calc(100vw - 512px)",maxHeight:"calc(100vh - 192px)",margin:"0 auto",userSelect:"none"},arrowButton:{backgroundColor:e.palette.divider,color:"white","&:hover":{backgroundColor:e.palette.divider}},arrowButtonPrev:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)"},arrowButtonNext:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)"}})));var E=n(60905);const w=(0,x.Z)((()=>({thumbnails:{marginLeft:"12px",marginBottom:"12px",marginTop:"auto",width:"calc(100vw - 364px)",overflowX:"auto",overflowY:"hidden"},gridContainer:{width:"100%"},thumb:{width:"96px",height:"96px",cursor:"pointer",userSelect:"none"},inactiveThumb:{filter:"brightness(0.5)"}}))),C=e=>{let{attributeValues:t,setAttributeValueIndex:n,attributeValueIndex:l}=e;const o=w(),i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(null!=i&&i.current){const e=i.current.scrollLeft,t=i.current.offsetWidth+e,n=96*l+16*l+12;t<n?i.current.scroll&&(n>t+96+16?i.current.scroll(n,0):i.current.scroll(112+e,0)):e+96>n&&i.current.scroll&&i.current.scroll(n-96,0)}}),[l,i]),a().createElement("div",{ref:i,className:o.thumbnails},a().createElement(E.Z,{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:o.gridContainer},t.map(((e,t)=>{let{uri:r,value:i}=e;return a().createElement(E.Z,{item:!0,key:r},a().createElement(h.Z,{onClick:()=>n(t),className:b()(o.thumb,{[o.inactiveThumb]:l!==t}),src:(0,c.efz)({value:i})}))}))))},O=e=>{let{className:t,attributeValues:n,attributeValueIndex:r,setAttributeValueIndex:l}=e;const o=v(),i=n[r],s=(0,c.QXK)(i);return a().createElement("div",{className:b()(o.root,t)},a().createElement("div",{className:o.main},r>0&&a().createElement(y.Z,{icon:d.Z,className:b()(o.arrowButton,o.arrowButtonPrev),onClick:()=>{l(r-1)},size:"XL"}),a().createElement(h.Z,{containerClassName:o.mainImageContainer,className:o.mainImage,size:s&&h.f.OVERRIDE,src:s}),r!==n.length-1&&a().createElement(y.Z,{icon:g.Z,className:b()(o.arrowButton,o.arrowButtonNext),onClick:()=>{l(r+1)},size:"XL"})),a().createElement(C,{attributeValues:n,attributeValueIndex:r,setAttributeValueIndex:l}))};var S=n(87918),N=n.n(S),T=n(21324),k=n(5806),Z=n(33016),P=n(36138),A=n(85256),I=n(89913),L=n(95038),j=n.n(L);const R={get CreationTime(){return N().text("Creation Time")},get CreationDate(){return N().text("Creation Date")},get Dimensions(){return N().text("Dimensions")},get MimeType(){return N().text("Mime Type")},get Size(){return N().text("Size")},get Url(){return N().text("Full image URL (S3)")},get UrlPreview(){return N().text("Preview image URL (S3)")},get UrlThumbnail(){return N().text("Small image URL (S3)")},get CdnUrl(){return N().text("Full image URL (CDN)")},get CdnUrlPreview(){return N().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return N().text("Small image URL (CDN)")}},D=function(){let{value:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail","MimeType"].includes(t)?(0,p.path)([t,0,"value"],e):"CreationDate"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?j()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?j()(e.CreationTimestamp[0].value).format("HH:mm:ss"):"Dimensions"===t&&(0,p.path)(["Height",0,"value"],e)&&(0,p.path)(["Width",0,"value"],e)?`${e.Height[0].value} x ${e.Width[0].value} ${N().text("pixels")}`:"Size"===t&&(0,p.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},V=(e,t)=>{const{includeNames:n=[],excludeNames:r=[],order:a=[]}=t,l=n.length?e.filter((e=>n.includes(e))):e.filter((e=>!r.includes(e)));return 0===a.length?l:l.sort(((e,t)=>{const n=a.indexOf(e),r=a.indexOf(t);return-1===n&&-1!==r?1:-1===r&&-1!==n?-1:n-r}))},z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=M(t.attributes);return V(Object.keys(e.value||{}),n).reduce(((t,n)=>{const a=r.find((e=>{let{name:t}=e;return t===n}));return a?[...t,{attrType:a,values:e.value[n]}]:t}),[])},U=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),B=(0,x.Z)({title:{marginBottom:"10px",color:"white",fontSize:"18px",lineHeight:"21px","&$canAdd":{marginBottom:"3px"}},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},canAdd:{}}),_=e=>{let{attributeType:t,onAddAttributes:n,uri:l}=e;const o=B(),s=M(t.attributes),c=Boolean(n);return a().createElement(m.Z,null,a().createElement(i.Z,{className:b()(o.title,{[o.canAdd]:c})},N().text("Meta info")),c&&a().createElement(r.Fragment,null,a().createElement(I.Z,{label:N().text("Attributes"),data:s,dense:!1,onApply:e=>{n&&n(e.map((e=>({attributeType:e,parentUri:l}))))}}),a().createElement(A.Z,{className:o.divider})))};var F=n(47972);const H=(0,x.Z)((e=>({root:{fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginBottom:"11px"},title:{color:"rgba(255,255,255,0.54)",marginRight:"12px",float:"left"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),W=e=>{let{title:t,content:n,isLink:r,children:l}=e;const o=H();return a().createElement("div",{className:o.root},a().createElement("span",{className:o.title},t),r?a().createElement("a",{className:o.link,href:n},N().text("link")):a().createElement("span",{className:o.content},n||l))},q=(0,x.Z)({root:{padding:"10px 0"},title:{color:"rgba(255,255,255,0.54)",fontSize:"13px"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"}}),Y=e=>{let{attributeValue:t,attributeType:n,imageAttributeFieldsOrder:r}=e;const o=q(),i=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),c=(u=t,p=r,V(Object.keys(R),p).map((e=>D(u,e)?{title:R[e],value:D(u,e),isLink:U(e)}:null)).filter(Boolean));var u,p;const d=z(t,n,r);return a().createElement(m.Z,{className:o.root},c.map((e=>{let{title:t,value:n,isLink:r}=e;return a().createElement(W,{key:t,isLink:r,title:t,content:n})})),i&&d.map((e=>{let{attrType:n,values:r}=e;return a().createElement(F.Z,{key:n.uri,attributeType:n,drawLines:!1,values:r,titleClassName:o.title,contentClassName:o.content,parentUri:t.uri})})))};var $=n(77277),G=n(92203);const X=(0,x.Z)({root:{},form:{padding:"10px 0"},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},actions:{display:"flex",justifyContent:"flex-end",marginTop:"4px"},cancelButton:{color:"white",marginRight:"8px"}}),K=e=>{let{attributeType:t,imageAttributeFieldsOrder:n,attributeValue:r,hasChanges:l,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s,onCancel:u,onApply:p,mode:d}=e;const g=X(),f=z(r,t,n),b=0!==f.length||0===f.length&&l;return a().createElement(m.Z,{className:g.root},a().createElement(m.Z,{className:g.form},f.map((e=>{let{attrType:t,values:n}=e;return a().createElement(G.ZP,{key:t.uri,parentUri:r.uri,attributeType:t,values:n,showEmptyEditors:(0,c.ZiX)(r.uri),mode:d,drawLines:!1,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s})}))),b&&a().createElement(a().Fragment,null,a().createElement(A.Z,{className:g.divider}),a().createElement(m.Z,{className:g.actions},a().createElement($.Z,{disabled:!l,onClick:u,className:g.cancelButton},N().text("Cancel")),a().createElement($.Z,{disabled:!l,onClick:p,color:"primary"},N().text("Apply")))))};var Q=n(12212);const J={palette:{type:"dark",primary:c.rSc.palette.primary,secondary:c.rSc.palette.secondary}},ee=(0,Z.Z)(J),te=e=>{let{imageAttributeFieldsOrder:t,attributeType:n,attributeValue:o}=e;const{addAttributes:i,changeAttribute:u,deleteAttribute:d,clearLocalChanges:g,applyLocalChanges:f,attributeValue:b,hasChanges:h}=(e=>{let{initialAttributeValue:t,attributeType:n}=e;const a=(0,l.useDispatch)(),o=(0,r.useContext)(Q.m),[i,u]=(0,r.useState)(t);(0,r.useEffect)((()=>{u(t)}),[t]);const m=!(0,p.equals)(i,t),d=(0,r.useCallback)((e=>{u((t=>e.reduce(((e,t)=>{const{attributeType:n,parentUri:r,index:a}=t;return(0,c.tPT)({entity:e,attributeType:n,parentUri:r,index:a,nestingLevel:1})}),t)))}),[]),g=(0,r.useCallback)((e=>{let{value:t,attributeType:n,uri:r}=e;u((e=>(0,c.ww$)({entity:e,attributeType:n,uri:r,value:t,nestingLevel:1})))}),[]),f=(0,r.useCallback)((e=>{let{attributeType:t,uri:n}=e;u((e=>(0,c.d$I)({entity:e,attributeType:t,uri:n,nestingLevel:1})))}),[]);return{addAttributes:d,changeAttribute:g,deleteAttribute:f,clearLocalChanges:(0,r.useCallback)((()=>{u(t)}),[t]),applyLocalChanges:(0,r.useCallback)((()=>{a(s.N5.actions.modifyAttribute({value:i,attributeType:n,uri:i.uri,viewId:o}))}),[i,n,o,a]),attributeValue:i,hasChanges:m}})({attributeType:n,initialAttributeValue:o}),y=(0,l.useSelector)(s.ZP.selectors.getMode),x=(0,l.useSelector)(s.ZP.selectors.getIsEditableMode);return a().createElement(P.ThemeProvider,{theme:ee},a().createElement(m.Z,null,a().createElement(_,{attributeType:n,uri:null==b?void 0:b.uri,onAddAttributes:x?i:void 0}),a().createElement(Y,{attributeType:n,attributeValue:b,imageAttributeFieldsOrder:t}),x&&a().createElement(K,{mode:y,imageAttributeFieldsOrder:t,attributeType:n,attributeValue:b,hasChanges:h,onDeleteAttribute:d,onChangeAttribute:u,onAddAttributes:i,onCancel:g,onApply:f})))},ne=(0,x.Z)((e=>({root:{position:"relative",backgroundColor:"#333",maxHeight:"calc(100vh - 64px)",overflow:"hidden"},header:{display:"flex",alignItems:"center",height:"56px",paddingLeft:"16px",boxShadow:`0 1px 0 0 ${e.palette.divider}`},headerTitle:{color:"rgba(255, 255, 255, 0.87)",fontSize:"16px",lineHeight:"19px"},bodyWrapper:{maxHeight:"calc(100% - 56px)",overflow:"auto"},body:{padding:"16px"},formControlLabel:{marginLeft:0,marginBottom:"27px"},checkboxLabel:{marginLeft:"8px",color:"rgba(255,255,255,0.87)",fontSize:"13px",lineHeight:"15px"},checkbox:{color:"white",padding:0}}))),re=e=>{let{className:t,attributeValue:n,handleSetAsDefault:o,attributeType:c}=e;const u=ne(),p=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},d=(0,l.useSelector)((e=>s.ZP.selectors.getModifiedEntity(e,null==p?void 0:p.uri)))||{},g=(0,l.useSelector)(s.ZP.selectors.getIsViewMode)?p:d,f=(0,l.useSelector)(s.ZP.selectors.getImageAttributesFieldsOrder)||{},h=f[null==p?void 0:p.type]||(null==f?void 0:f.default)||{},[y,x]=(0,r.useState)(!1);(0,r.useEffect)((()=>{x((null==g?void 0:g.defaultProfilePic)===(null==n?void 0:n.uri))}),[null==n?void 0:n.uri,g]);const v=(0,r.useCallback)((()=>{o(n.uri)}),[null==n?void 0:n.uri]);return a().createElement(m.Z,{className:b()(u.root,t)},a().createElement(m.Z,{className:u.header},a().createElement(i.Z,{className:u.headerTitle},N().text("Details"))),a().createElement(m.Z,{className:u.bodyWrapper},a().createElement(m.Z,{className:u.body},a().createElement(k.Z,{classes:{root:u.formControlLabel,label:u.checkboxLabel},control:a().createElement(T.Z,{className:u.checkbox,checked:y,onChange:v,color:"default"}),label:N().text("Set as default")}),a().createElement(te,{attributeType:c,imageAttributeFieldsOrder:h,attributeValue:n}))))},ae=(0,x.Z)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),le=e=>{let{attributeValues:t=[],currentAttributeValueUri:n,setCurrentAttributeValueUri:l,handleSetAsDefault:o,attributeType:i}=e;const[s,c]=(0,r.useState)(0);(0,r.useEffect)((()=>{u(n?t.findIndex((e=>e.uri===n)):0)}),[n,t]);const u=(0,r.useCallback)((e=>{var n;c(e),l(null===(n=t[e])||void 0===n?void 0:n.uri)}),[t]),p=ae();return a().createElement(m.Z,{className:p.root},a().createElement(O,{attributeValueIndex:s,setAttributeValueIndex:u,attributeValues:t,className:p.main}),a().createElement(re,{handleSetAsDefault:o,attributeValue:t[s],className:p.details,attributeType:i}))};var oe=n(95596),ie=n(22349);const se=(0,x.Z)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),ce=e=>{let{items:t,selectedItems:n,onSelectImage:r,onDeselectImage:l,onShareLink:o,onSetAsDefault:i,onDownload:s,onClickImage:c,onDelete:u}=e;const p=se(),d=e=>a().createElement(ie.Z,{id:e,selected:n.includes(e),selectionMode:0!==n.length,onSelect:()=>r(e),onDeselect:()=>l(e),onShareLink:()=>o(e),onSetAsDefault:()=>i(e),onDownload:()=>s(e),onClick:()=>c(e),onDelete:u?()=>u(e):void 0,canBeSelected:!0});return a().createElement(m.Z,{className:p.root},a().createElement(E.Z,{container:!0},t.map((e=>{let{id:t,src:n}=e;return a().createElement(E.Z,{key:t,classes:{item:p.item},item:!0},a().createElement(h.Z,{size:h.f.LARGE,onClick:()=>c(t),src:n,overlay:d(t)}))}))))};var ue=n(86689);const pe=(0,x.Z)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),me=e=>{let{selectedItems:t,items:n,onSelectAll:r,onClearAll:l}=e;const o=pe(),i=t.length===n.length;return a().createElement(ue.Z,{component:"button",underline:"none",classes:{button:o.selectButton},onClick:i?l:r},i?N().text("Clear selection"):N().text("Select all images"))};var de=n(94438),ge=n(22983),fe=n(35292),be=n(36746),he=n(39475);const ye=(0,x.Z)((()=>({downloadButton:{color:"#fff",fontSize:"24px",marginLeft:"30px"},shareButton:{color:"#fff",fontSize:"24px",marginLeft:"21px"},deleteButton:{color:"#fff",fontSize:"24px",marginLeft:"24px"},divider:{height:"31px",width:"1px",marginLeft:"10px",backgroundColor:"rgba(255,255,255,0.38)"}}))),xe=e=>{let{onDownload:t,onShare:n,onUpload:r,onDelete:l}=e;const o=ye();return a().createElement(a().Fragment,null,r&&a().createElement($.Z,{variant:"contained",color:"primary",onClick:r,startIcon:a().createElement(de.Z,null)},N().text("Upload")),t&&r&&a().createElement("div",{className:o.divider}),t&&a().createElement(he.k,{className:o.downloadButton,tooltipTitle:N().text("Download selected items"),icon:be.Z,onClick:t}),n&&a().createElement(he.k,{className:o.shareButton,tooltipTitle:N().text("Copy link"),icon:fe.Z,onClick:n}),l&&a().createElement(he.k,{className:o.deleteButton,tooltipTitle:N().text("Delete selected items"),icon:ge.Z,onClick:l}))},ve=e=>{let{attributeValues:t,open:n,onClose:o,currentAttributeValueUri:i,setCurrentAttributeValueUri:u,attributeType:m,onDownload:d,onShareLink:g,onSetAsDefault:f,onUpload:b,onDeleteAttribute:h}=e;const[y,x]=(0,r.useState)([]),[v,E]=(0,r.useState)(oe.A.GALLERY_MODE),w=(0,l.useSelector)(s.ZP.selectors.getIsViewMode);(0,r.useEffect)((()=>{E(i?oe.A.DETAILS_MODE:oe.A.GALLERY_MODE)}),[i]);const C=t.map((e=>({src:(0,c.efz)(e),downloadURL:(0,c.Q5d)(e),id:e.uri}))),O=e=>{g(C.find((0,p.propEq)("id",e)).downloadURL)},S=e=>{const n=t.find((t=>{let{uri:n}=t;return n===e}));f(n)},N=e=>{h({uri:e,attributeType:m})},T=v===oe.A.GALLERY_MODE,k=v===oe.A.DETAILS_MODE,Z=y.length>0,P=k||T&&Z,A=!w&&P,I=!w&&(k||T&&!Z),L=T&&Z&&a().createElement(me,{items:C,selectedItems:y,onClearAll:()=>{x([])},onSelectAll:()=>{x((0,p.pluck)("id",C))}}),j=a().createElement(xe,{onDelete:A?()=>{(T?y:[i]).forEach((e=>{N(e)})),y.length&&x([])}:void 0,onDownload:P?()=>{const e=T?(0,p.pipe)((0,p.filter)((e=>{let{id:t}=e;return y.includes(t)})),(0,p.pluck)("downloadURL"))(C):[C.find((0,p.propEq)("id",i)).downloadURL];d(e)}:void 0,onShare:k?()=>{O(i)}:void 0,onUpload:I?b:void 0});return a().createElement(oe.C,{mode:v,open:n,onChangeMode:E,header:{left:L,right:j},onClose:o},T&&a().createElement(ce,{items:C,selectedItems:y,onSelectImage:e=>{x((t=>[...t,e]))},onDeselectImage:e=>{x((t=>t.filter((t=>t!==e))))},onShareLink:O,onSetAsDefault:S,onDownload:e=>{d([C.find((0,p.propEq)("id",e)).downloadURL])},onClickImage:e=>{u(e),E(oe.A.DETAILS_MODE)},onDelete:w?void 0:N}),k&&a().createElement(le,{handleSetAsDefault:S,setCurrentAttributeValueUri:u,currentAttributeValueUri:i,attributeValues:t,attributeType:m}))};var Ee=n(91446),we=n(94079);const Ce=(0,x.Z)((e=>({imageBox:{position:"relative",display:"flex",width:"100%",flexGrow:1,flexShrink:0,flexWrap:"nowrap",marginTop:"2px",overflow:"hidden"},moreButtonContainer:e=>{let{imageWidth:t,imageHeight:n}=e;return{backgroundColor:"white",width:t,height:n,position:"absolute",right:0,cursor:"pointer"}},moreButton:t=>{let{imageWidth:n,imageHeight:r}=t;return{display:"flex",justifyContent:"center",alignItems:"center",width:n,height:r,backgroundColor:(0,we.fade)(e.palette.primary.main,.06)}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})));function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Se=e=>{let{attributeType:t,attributeValues:n=[],renderImage:p,overlay:m=!1,countFixedItems:d=0,children:g,onUpload:f,onDeleteAttribute:b,imageSize:h=Ee.By,paging:y,parentUri:x,showNonOv:v,requestNextPageOfAttributeValues:E}=e;const w=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},C=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),O=(0,l.useDispatch)(),S=Ce(h);(0,r.useEffect)((()=>{if(y&&E){const e=v?y.totalOvValues:y.totalValues;e>n.length&&E({parentUri:x,attributeTypeUri:t.uri,attributeTypeName:t.name,values:[],defaultMaxValues:e})}}),[y,E,t,x,n.length,v]);const N=(0,r.useRef)(),[T,k]=(0,r.useState)(0),[Z,P]=(0,r.useState)(0),A=(0,r.useContext)(u.P),[I,L]=(0,r.useState)(!1),[j,R]=(0,r.useState)(),D=(0,r.useCallback)((e=>{const{imageMargin:t,imageWidth:r}=h,a=Math.floor((e+t)/(r+t))-d,l=e+t-(a+d)*(r+t)<Ee.lc;k(a),n.length>a?P(n.length-a+(l?1:0)):P(0)}),[n.length,d,h]),M=(0,r.useCallback)((e=>{D(e),N.current=e}),[D]);(0,r.useEffect)((()=>{N.current&&D(N.current)}),[n.length,D]);const V=(0,r.useCallback)((e=>{A||(R(e),L(!0))}),[A]),z=(0,r.useCallback)((()=>{L(!1)}),[]),U=e=>(e=>{e.forEach(((e,t)=>{try{if((e=>!!(e=>e.indexOf("://")>0||0===e.indexOf("//"))(e)&&new URL(e).host!==location.host)(e)){const n=document.createElement("iframe");n.setAttribute("style","display: none;"),n.setAttribute("src",e),document.body.appendChild(n),setTimeout((()=>document.body.removeChild(n)),3e4*(t+1))}else{const t=document.createElement("a");t.href=e,t.download=(e=>e.split("/").pop())(e),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}catch(e){console.error(e)}}))})(e),B=e=>navigator.clipboard.writeText(e),_=(0,r.useCallback)((e=>{C?(0,c.YL3)(w.uri,e.uri).then((t=>{let{status:n}=t;"success"===n&&O(s.N5.entity.actions.setDefaultProfilePic(e))})):O(s.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:w.uri,value:e}))}),[C,w.uri,O]),F=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Oe(e,t,n[t])}))}return e}({onOpenImageGalleryDialog:V},m&&{onDownload:U,onShareLink:B,onSetAsDefault:_});return a().createElement(a().Fragment,null,a().createElement(o.Z,{handleWidth:!0,onResize:M}),a().createElement(ve,{attributeValues:n,open:I,onClose:z,setCurrentAttributeValueUri:R,currentAttributeValueUri:j,attributeType:t,onDownload:U,onShareLink:B,onSetAsDefault:_,onUpload:f,onDeleteAttribute:b}),a().createElement("div",{className:S.imageBox},g,n.slice(0,T).map(p(F)),Z>0&&a().createElement("div",{className:S.moreButtonContainer},a().createElement("div",{className:S.moreButton,onClick:()=>V()},a().createElement(i.Z,{className:S.number},`+${Z}`)))))}},91446:(e,t,n)=>{n.d(t,{lc:()=>o,By:()=>i});var r=n(26729);const a=r.f.SMALL.imageWidth,l=r.f.SMALL.imageHeight,o=8,i={imageMargin:4,imageWidth:a,imageHeight:l}},37457:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(7089),u=n(27502),p=n(79692),m=n(41128);const d=(0,p.Z)((e=>({container:{height:"16px",borderColor:(0,m.U1)(e.palette.primary.main,.54)},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px",color:e.palette.primary.main}})));var g=n(67586);const f=(0,n(78223).Z)(c.Z),b=e=>{let{className:t,attributeType:n,nonOvValues:r=[],nonOvTotal:l}=e;const o=d();if(!l)return null;const i=r.length?r.map(((e,t)=>a().createElement("div",{key:t},(0,u.YkM)(n)?(0,u.idV)(e.label):a().createElement(g.Z,{value:(0,u.kDl)(e),dataTypeDefinition:(0,u.PFL)(n),rich:!1})))):null;return a().createElement(f,{tooltipTitle:i,tooltipPlacement:"top",label:`+ ${l}`,variant:"outlined",classes:{root:s()(o.container,t),label:o.label}})};b.propTypes={className:o().string,nonOvTotal:o().number,attributeType:u.EMD,nonOvValues:o().arrayOf(o().oneOfType([u.cNQ,u.dMV,u.Rtp]))};const h=b},31569:(e,t,n)=>{n.d(t,{m:()=>k});var r=n(24328),a=n.n(r),l=n(52730),o=n(80030),i=n(89810),s=n(27502),c=n(17440),u=n(80687);const p=(e,t)=>{const n=(0,s.xy8)(e);return t.reduce(((t,r)=>{for(const a in r){const l=(e[n]||[]).find((e=>e.uri===a));return Array.isArray(r[a])&&"object"==typeof r[a][0]?t=(t||[]).concat(p(l,r[a])):(t.push(m(r[a],l)),t)}}),[])},m=(e,t)=>e&&e.length&&!(0,c.isNil)(e[0])&&""!==e[0]?{fieldName:(0,s.Tde)(t.uri),filter:t.type===s.oS0.TYPE_BLOB?s.j5E.FULL_TEXT:s.j5E.EQUALS,values:e}:{fieldName:(0,s.Tde)(t.uri),filter:"missing"},d=(e,t,n,r)=>{const a=((e,t)=>{const n=t.find((t=>t.uri===e.uri));return n&&Array.isArray(n.children)?n.children:[]})(e,n);let l=(null==e?void 0:e.attributes)||(null==e?void 0:e.analyticsAttributes)||[];return a.length&&(l=l.filter((e=>a.includes(e.uri)))),l.reduce(((e,a)=>{const l=g(t[a.name],r,n);return l&&l.length&&(Array.isArray(l[0])?e.push({[a.uri]:l[0]}):e.push({[a.uri]:l})),e}),[])},g=(e,t,n)=>{if(e&&0!==e.length)return e.reduce(((e,r)=>{if("type"in r&&r.type){const a="lookupCode"in r?r.lookupCode:r.value,l=(0,s.zeJ)(t,r.type);a&&"object"!=typeof a&&(0,s.OXP)(r)?e.push(f(a,l)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(d(l,a,n,t))}return e}),[])},f=(e,t)=>{switch(null==t?void 0:t.type){case s.oS0.TYPE_DATE:return new Date(e).getTime();case s.oS0.TYPE_TIMESTAMP:return isNaN(Number(e))?new Date(e).getTime():new Date(Number(e)).getTime();default:return e}};function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const h=e=>a().createElement("svg",b({width:11,height:11,viewBox:"0 0 11 11"},e),a().createElement("path",{d:"M2.514 5h2.314V3l2.5 2.5-2.5 2.5V6h-3.8a4.5 4.5 0 10.73-3H.6a5.5 5.5 0 11-.577 3H0V5H2.514z",fill:"#6CACE4",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));var y=n(87918),x=n.n(y),v=n(37573),E=n(18527),w=n(79692);const C=(0,w.Z)((e=>({container:{backgroundColor:"white",width:"360px",minWidth:"360px",maxWidth:"720px"},header:{display:"flex",height:"48px",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px"},title:{color:e.palette.text.primary,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px"},entityTypeLabel:{color:"rgba(0,0,0,0.67)",fontSize:"14px",paddingLeft:"16px",paddingBottom:"12px",lineHeight:"16px"},divider:{height:"24px",width:"1px",backgroundColor:"rgba(0,0,0,0.12)"},headerCount:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:"0.24px",lineHeight:"28px",width:"210px"},body:{borderBottom:"1px solid rgba(0,0,0,0.12)",padding:"0 16px 8px"},footer:{display:"flex",alignItems:"center",height:"31px",paddingLeft:"16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},profileIcon:{height:"16px",width:"16px"},entityContainer:{display:"flex",flexDirection:"row",alignItems:"center"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px",textDecoration:"none",paddingLeft:"8px"},icon:{margin:"auto 8px auto 0"},content:{color:e.palette.primary.main},seeAllButton:{cursor:"pointer"}}))),O=(0,w.Z)({tooltip:{backgroundColor:"white",boxShadow:"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)",padding:0,borderRadius:"4px",maxWidth:"none"},arrow:{"&::before":{backgroundColor:"white"}}});var S=n(29627);function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T=e=>{let{value:t,attributeType:n,config:o={}}=e;const[c,u]=(0,r.useState)([]),[d,g]=(0,r.useState)(0),f=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},b=(0,S._)(),h=(0,l.useDispatch)(),y=C(),w=(0,l.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},O=o.entityType||f.type,T=d>6;(0,r.useEffect)((()=>{const e=function(e,t){let n=[{fieldName:"type",filter:"equals",values:[arguments.length>2&&void 0!==arguments[2]?arguments[2]:""]}];return Array.isArray(e)?n=n.concat(p(t,e)):n.push(m([e],t)),n}(t,n,O),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){N(e,t,n[t])}))}return e}({max:6},w);b(Promise.all([(0,s.ZOr)(e,r),(0,s.j_Q)(e,r)])).then((e=>{const[t,{total:n}]=e;u(Array.isArray(t)?t:[]),g(n)})).catch((()=>{u([]),g(0)}))}),[]);const k=Boolean(o.label);return a().createElement("div",{className:y.container},a().createElement("div",{className:y.header},a().createElement("div",{className:y.title},x().text("Pivot profiles")),a().createElement("div",{className:y.divider}),a().createElement("div",{className:y.headerCount},x().number(d,"0,0")+" "+(1===d?x().text("item"):x().text("items")))),k&&a().createElement("div",{className:y.entityTypeLabel},o.label),a().createElement("div",{className:y.body},c.map((e=>a().createElement("div",{key:e.uri,className:y.entityContainer},a().createElement(v.Z,{entity:e,avatarClassName:y.profileIcon}),a().createElement(E.Z,{className:y.entityLabel,value:(0,s.wwR)(e)},(0,s.idV)(e.label)))))),T&&a().createElement("div",{className:y.footer},a().createElement("a",{className:y.seeAllButton,onClick:()=>{const e=Array.isArray(t)?t.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[(0,s.nIW)(t),n]}))))):((e,t)=>[{[e.name]:t}])(n,t);h(i.ui.actions.openPivotingPerspective({value:e,attributeType:n}))}},x().text("See all"))))},k=e=>{let{value:t,attributeType:n,children:p,className:m}=e;const g=O(),b=C(),y=(0,r.useContext)(u.J)||[],x=(0,s.QZu)(n),v=(0,l.useSelector)(i.ZP.selectors.getMetadata)||{},E=x?d(n,t.value,y,v):f(t.lookupCode||t.value,n),w=y.some((e=>{let{uri:t}=e;return t===n.uri}))&&(Array.isArray(E)&&E.length||!Array.isArray(E)&&!(0,c.isNil)(E)),S=y.find((e=>{let{uri:t}=e;return t===n.uri}));return w?a().createElement(o.ZP,{interactive:!0,arrow:!0,placement:"right-start",classes:g,title:a().createElement(T,{value:E,attributeType:n,config:S.popup})},a().createElement("span",{className:m},a().createElement(h,{className:b.icon}),a().createElement("span",{className:b.content},p))):a().createElement(a().Fragment,null,p)}},30410:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(27502),o=n(39390),i=n(3853),s=n(10768);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const u=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{showEmptyEditors:n,onAddAttributes:r,lazy:u,errors:p,crosswalks:m,showNonOv:d}=t,g=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["showEmptyEditors","onAddAttributes","lazy","errors","crosswalks","showNonOv"]);switch(e.type){case l.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case l.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(o.Z,c({isReltioCrosswalk:(0,l.KVV)(m,t.attributeValue)},g))}}}.build(t,e)}},76141:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(27502),u=n(17440),p=n(92203),m=n(52239),d=n(89913),g=n(86602),f=n(26978);var b=n(1108);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}const y=e=>{let{attrTypes:t,entity:n,parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,drawLines:x,children:v,className:E,alwaysVisibleTypeUris:w=g.S,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:S,additionalControlsRenderer:N,showNonOv:T}=e;const{attributes:k={}}=n,Z=(0,r.useMemo)((()=>(0,c._kX)(i,t)),[t,i]),P=((e,t)=>e.filter((e=>{const n=((e,t)=>{const{attributes:n={},analyticsAttributes:r={}}=t;return(0,u.cond)([[c.kqr,(0,u.always)(t)],[(0,u.both)(c.kQw,(0,u.always)(r)),(0,u.always)(r)],[u.T,(0,u.always)(n)]])(e)})(e,t),r=(e=>(0,c.kqr)(e)?"uri":"name")(e);return!((e.singleValue||(0,c.ian)(e)||(0,c.VFZ)(e))&&(0,u.has)(e[r])(n))})))(Z,n),A=(0,r.useContext)(b.c),I=(0,r.useMemo)((()=>(0,c.Gtj)(t,i,n,o,T,A)),[t,i,n,o,T,A]),[L,j]=(0,r.useMemo)((()=>(0,f.A)(w,I)),[I,w]),R=(0,r.useCallback)((e=>{C(e.map((e=>({attributeType:e,parentUri:l}))))}),[C,l]),D={enabled:x};return a().createElement("div",{className:E},v&&a().createElement(m.Z,D,v),a().createElement(m.Z,h({},D,{plain:!0}),Z.length>0&&a().createElement(d.Z,{label:s().text("More attributes"),onApply:R,dense:x,data:P})),j.concat(L).map((e=>{let{attrType:t,values:n}=e;return a().createElement(p.ZP,{key:t.uri,attributeType:t,drawLines:x,values:n,paging:(0,u.path)(["paging",t.uri],k),parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:S,additionalControlsRenderer:N,showNonOv:T})})))};y.propTypes={attrTypes:o().array,entity:o().object,parentUri:o().string,children:o().node,showEmptyEditors:o().bool,mode:c.XGc,crosswalks:o().array,drawLines:o().bool,showNonOv:o().bool,className:o().string,alwaysVisibleTypeUris:o().array,onAddAttributes:o().func,onChangeAttribute:o().func,onDeleteAttribute:o().func,additionalControlsRenderer:o().func};const x=(0,r.memo)(y)},63928:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),l=n(27502),o=n(90436),i=n(17440),s=n(40901),c=n(87918),u=n.n(c);const p=e=>u().text("${value}",{value:1===e?u().text("value"):u().text("values")}),m=(0,i.has)("minValue"),d=(0,i.has)("maxValue"),g=(0,i.pipe)(d,i.not),f=(0,i.propSatisfies)((e=>1===e),"minValue"),b=e=>{let{minValue:t}=e;return u().text("This attribute can have minimum ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})},h=e=>{let{maxValue:t}=e;return u().text("This attribute can have maximum ${maxValue} ${maxValueCaption}",{maxValue:u().number(t,"0"),maxValueCaption:p(t)})},y=(0,i.cond)([[i.isNil,(0,i.always)("")],[e=>{let{minValue:t,maxValue:n}=e;return t&&t===n},e=>{let{minValue:t}=e;return u().text("This attribute should have ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})}],[(0,i.allPass)([f,d]),h],[(0,i.allPass)([f,g]),(0,i.always)("")],[(0,i.allPass)([m,d]),e=>{let{minValue:t,maxValue:n}=e;return u().text("${minCardinality} and maximum ${maxValue} ${maxValueCaption}",{minCardinality:b({minValue:t}),maxValue:u().number(n,"0"),maxValueCaption:p(n)})}],[d,h],[m,b],[i.T,(0,i.always)("")]]),x=e=>{let{cardinality:t}=e;const n=(0,s.y)();return a().createElement(o.Z,{variant:"caption",className:n.caption},y(t))};x.propTypes={cardinality:l.oA3};const v=x},92203:(e,t,n)=>{n.d(t,{ZP:()=>H});var r=n(52730),a=n(89810),l=n(27502),o=n(24328),i=n.n(o),s=n(17440),c=n(52239),u=n(66078),p=n(55401),m=n(92985),d=n(31992),g=n(35039),f=n(30410),b=n(63928),h=n(40901);const y=(0,s.filter)((0,s.propSatisfies)(l.ZiX,"uri"));var x=n(1108),v=n(37457);const E=e=>{let{max:t,values:n,attributeType:r,parentUri:a,mode:u,drawLines:E,showEmptyEditors:w,errorMessage:C,errors:O,paging:S,crosswalks:N,showNonOv:T,nonVisibleValues:k,onAddAttributes:Z,onDeleteAttribute:P,onChangeAttribute:A,onDeactivateError:I,additionalControlsRenderer:L,requestNextPageOfAttributeValues:j}=e;const R=(0,h.y)(),[D,M]=(0,o.useState)(t),[V,z]=(0,o.useState)(!1),{label:U,required:B,cardinality:_,name:F,uri:H}=r,W=(0,l.KIu)(u),q=(0,o.useContext)(x.c),Y=(0,o.useMemo)((()=>null==q?void 0:q.includes(H)),[H,q]),$=(0,l.O27)(n),G=(!V&&w||B||Y)&&$,X=(0,o.useRef)((0,l.gjI)({parentUri:a,attributeType:r})),K=(0,o.useCallback)((()=>{M(D+1);const e={parentUri:a,index:D,attributeType:r};return Z(G&&!(0,l.YkM)(r.type)?[e,e]:[e])}),[D,Z,a,r,G]),Q=(0,o.useCallback)((0,s.pipe)(P,s.T,z),[P,z]);if($&&!G)return null;if(G&&$&&(n=[X.current]),(0,l.O27)(n))return null;const J=(y(n)||[]).length,ee=T?"totalValues":"totalOvValues",te=(0,s.ifElse)((0,s.has)(ee),(0,s.pipe)((0,s.prop)(ee),(0,s.add)(J)),(0,s.always)(n.length))(S),ne=null!=S&&S.totalValues?S.totalValues-te:null==k?void 0:k.length,re=t<te,ae=re&&D<te,le=re&&D>=te,oe=n.slice(0,D),ie=oe?oe.length-1:0,se=te-D;return i().createElement(c.Z,{enabled:E},i().createElement("div",{className:R.wrapper},i().createElement("div",{className:R.titleWrapper},i().createElement(m.Z,{label:U,isRequired:B,className:R.title,attributeType:r}),i().createElement(v.Z,{nonOvValues:k,attributeType:r,className:R.ovIcon,nonOvTotal:ne})),W&&i().createElement(b.Z,{cardinality:_}),W&&i().createElement(p.Z,{message:C,className:R.typeError}),i().createElement("div",{className:R.attributesWrapper},oe.map(((e,t)=>i().createElement(f.Z,{key:e.uri,attributeValue:e,attributeType:r,lazy:G&&!B,showEmptyEditors:w,errors:O,ownError:(0,l.ADq)(e,t,r.uri,O),mode:u,crosswalks:N,onAddOneMore:ie===t?K:null,onAddAttributes:Z,onDeleteAttribute:Q,onChangeAttribute:A,onDeactivateError:I,additionalControlsRenderer:L}))),ae&&i().createElement(g.Z,{moreNumber:(0,s.min)(t,se),valueNumber:se,onClick:()=>{n.length<te&&j({parentUri:a,attributeTypeUri:H,attributeTypeName:F,values:n,defaultMaxValues:t}),M(D+t)}}),le&&i().createElement(d.Z,{onClick:()=>{M(t)}}))))};var w=n(95544),C=n(90590),O=n(92145),S=n(79692);const N=(0,S.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}});var T=n(40435),k=n(22983);const Z={MultiValue:O.Z},P=e=>{let{values:t,onChange:n,onDelete:c}=e;const u=N(),p=(0,r.useSelector)(a.ZP.selectors.getMetadata),m=(0,r.useSelector)(a.ZP.selectors.getEntity),d=m.uri,g=(0,l.JvE)(p,m.type).map((e=>({value:e.uri,label:e.label}))),f=(t||[]).map((e=>{var t;return{value:e,label:(null===(t=g.find((0,s.propEq)("value",e)))||void 0===t?void 0:t.label)||(0,l.nIW)(e)}})),b=(0,o.useCallback)((e=>{const t=(null==e?void 0:e.map((0,s.prop)("value")))||[];n({value:t,attributeType:l.xPW.roles,uri:d})}),[d,n]),h=(0,o.useCallback)((()=>{c({uri:d,attributeType:l.xPW.roles})}),[d,c]);return i().createElement("div",{className:u.container},i().createElement(C.Z,{label:"",height:40,isMulti:!0,options:g,value:f,onChange:b,components:Z,classes:u,className:u.roleContainer}),!!c&&i().createElement(T.Z,{className:u.deleteButton,icon:k.Z,onClick:h,size:"L"}))};var A=n(7766);const I=(0,S.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},deleteButton:{marginLeft:"8px"}}),L=e=>e?`?filter=${(0,l.Uqd)()((e=>[{filter:"containsWordStartingWith",fieldName:"tags",values:[e]}])(e))}`:"",j=[{fieldName:"tags",orderType:"reversedCount"}],R=e=>(0,l.FK9)({query:L(e),body:j}).then((e=>Object.keys(e.tags))),D=e=>{let{className:t,values:n,onChange:s,onDelete:c}=e;const u=I(),p=(0,r.useSelector)(a.ZP.selectors.getEntityUri),m=(0,o.useCallback)((e=>{s({value:e,attributeType:l.xPW.tags,uri:p})}),[s,p]),d=(0,o.useCallback)((()=>{c({uri:p,attributeType:l.xPW.tags})}),[p,c]);return i().createElement("div",{className:u.container},i().createElement(A.Z,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:n||[],onChange:m,getSuggestions:R}),!!c&&i().createElement(T.Z,{className:u.deleteButton,icon:k.Z,onClick:d,size:"L"}))};function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(this,arguments)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const z=e=>{let{values:t,attributeType:n,parentUri:r,mode:a,errorMessage:c,onDeleteAttribute:u,onChangeAttribute:d,showEmptyEditors:g}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["values","attributeType","parentUri","mode","errorMessage","onDeleteAttribute","onChangeAttribute","showEmptyEditors"]);const x=(0,h.y)(),{label:v,required:E,cardinality:C}=n,O=(0,l.KIu)(a),[S,N]=(0,o.useState)(!1),T=(0,o.useCallback)((0,s.pipe)(u,s.T,N),[u,N]),k=(0,l.O27)(t),Z=!S&&g&&k,A=(0,o.useRef)((0,l.gjI)({parentUri:r,attributeType:n}));return(0,l.j2U)(n)&&k&&!Z?null:i().createElement(w.Z,{className:x.wrapper},i().createElement(m.Z,{label:v,isRequired:E,className:x.title,attributeType:n}),O&&i().createElement(b.Z,{cardinality:C}),O&&i().createElement(p.Z,{message:c}),i().createElement(w.Z,{className:x.attributesWrapper},(()=>{switch(n.uri){case l.xPW.tags.uri:return i().createElement(D,{values:t,onDelete:T,onChange:d});case l.xPW.roles.uri:return i().createElement(P,{values:t,onDelete:T,onChange:d});default:{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){V(e,t,n[t])}))}return e}({},A.current,{value:t[0]||""});return i().createElement(f.Z,M({attributeValue:e,attributeType:n,mode:a,onDeleteAttribute:T,onChangeAttribute:d},y))}}})()))};function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(this,arguments)}var B;!function(e){e.imageLine="imageLine",e.special="special",e.default="default"}(B||(B={}));const _=(0,o.memo)((e=>{let{values:t,attributeType:n,mode:r=l.ARY.Viewing,crosswalks:a,drawLines:o,paging:p={},parentUri:d,errors:g,errorMessage:f,max:b=1/0,showEmptyEditors:y,showNonOv:x,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:S,requestNextPageOfAttributeValues:N}=e;const T=(0,h.y)(),k=(0,s.partition)(l.OXP),[Z,P]=k(t),A=x?t:Z,I=x?[]:P,L={errorMessage:f,errors:g,mode:r,parentUri:d,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:S,showEmptyEditors:y};return(()=>{switch((0,s.cond)([[l.kqr,(0,s.always)(B.special)],[l.Or$,(0,s.always)(B.imageLine)],[s.T,(0,s.always)(B.default)]])(n)){case B.special:return i().createElement(c.Z,{enabled:o},i().createElement(z,U({values:A,attributeType:n},L)));case B.imageLine:return i().createElement(c.Z,{enabled:o},i().createElement("div",{className:T.wrapper},i().createElement(m.Z,{label:null==n?void 0:n.label,attributeType:n}),i().createElement(u.Z,{attributeValues:A,attributeType:n,paging:p,onDeleteAttribute:w,parentUri:d,onChangeAttribute:C,requestNextPageOfAttributeValues:N,showNonOv:x})));default:return i().createElement(E,U({values:A,attributeType:n,max:b,paging:p,crosswalks:a,drawLines:o,requestNextPageOfAttributeValues:N,showNonOv:x,nonVisibleValues:I},L))}})()})),F={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues,onDeactivateError:a.N5.errors.actions.errorDeactivated},H=(0,r.connect)(((e,t)=>{let{parentUri:n,attributeType:r,max:o}=t;return{errors:a.ZP.selectors.getActiveErrorsForAttributesPager(e,n,r),errorMessage:(0,l.tQX)(n,r,a.ZP.selectors.getProfileErrors(e)),max:o||a.ZP.selectors.getDefaultMaxValues(e)}}),F)(_)},40901:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((e=>({caption:{fontSize:"0.7rem",opacity:.54},wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},attributesWrapper:{width:"100%",marginBottom:"10px"},link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"},title:{fontSize:"12px",lineHeight:"14px",paddingLeft:"12px",color:e.palette.text.secondary},typeError:{marginLeft:"12px"},ovIcon:{marginLeft:"8px",marginTop:"-1px",textIndent:0},titleWrapper:{flex:1,paddingBottom:"3px"}})))},21548:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(77277),u=n(40435),p=n(22983),m=n(90436),d=n(87918),g=n.n(d),f=n(27502);const b=(0,n(79692).Z)((e=>({editor:{display:"flex",flex:1,height:"36px",alignItems:"center"},label:{flex:1,marginLeft:"2px",marginTop:"2px",fontSize:"13px",lineHeight:"15px"},actions:{display:"flex",alignItems:"center"},titleContainer:{display:"flex",flex:1,minHeight:"20px"},expandButton:{marginTop:"2px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary},errorWrapperHelperText:{marginLeft:0}})));var h=n(93555),y=n(76141),x=n(85777);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=e=>{let{label:t,attributeTypesList:n,attributeType:l,attributeValue:o,children:i,errors:d,ownError:v,mode:E,metadata:w,crosswalks:C,lazy:O,showEmptyEditors:S,onAddOneMore:N,onAddAttributes:T,onDeleteAttribute:k,onChangeAttribute:Z,additionalControlsRenderer:P,hideDeleteButton:A,state:I,showNonOv:L}=e;const j=b(),R="deleted"===I,D="edited"===I,M=o.uri,V=(0,f.ZiX)(M),[z,U]=(0,r.useState)(V),B=(0,r.useMemo)((()=>(0,f.xv5)({attributeType:l,attributeValue:o,mode:E,metadata:w,isReltioCrosswalk:(0,f.KVV)(C,o)})),[l,o,E,w,C]),_=!R&&!A&&!!k&&B,F=(0,r.useMemo)((()=>(0,f.J6q)(o,d)),[d,o]);(0,r.useEffect)((()=>{F&&U(!0)}),[d,F]),(0,r.useEffect)((()=>{R&&U(!1)}),[R]);const H=(n||[]).some((e=>(0,f.kQw)(e))),W=(0,r.useMemo)((()=>({attributes:H?null:o.value,analyticsAttributes:H?o.value:null})),[o,H]),q=(0,f.e$p)(v)||F&&g().text("Has an incorrect value")||"";return O?a().createElement(c.Z,{variant:"text",color:"primary",onClick:N},"Create attribute"):a().createElement(a().Fragment,null,a().createElement("div",{className:j.editor},a().createElement("div",{className:j.titleContainer},a().createElement(x.Z,{onClick:()=>U((e=>!e)),expanded:z,className:j.expandButton,disabled:R}),a().createElement(h.Z,{errorMessage:q,classes:{helperText:j.errorWrapperHelperText}},a().createElement("div",{className:s()(j.label,{[j.deleted]:R})},t))),a().createElement("div",{className:j.actions},D&&a().createElement(m.Z,{variant:"caption",className:j.editedLabel},"(",g().text("edited"),")"),P&&P({attributeType:l,attributeValue:o}),_&&a().createElement(u.Z,{icon:p.Z,onClick:()=>k({uri:M,attributeType:l,attributeValue:o}),size:"L"}))),z&&a().createElement(y.Z,{attrTypes:n,entity:W,showEmptyEditors:S||V,drawLines:!0,parentUri:M,mode:E,crosswalks:C,onAddAttributes:T,onChangeAttribute:Z,onDeleteAttribute:k,additionalControlsRenderer:P,showNonOv:L},i))};E.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}({label:o().string,children:o().node,attributeTypesList:o().arrayOf(f.EMD),attributeValue:o().oneOfType([f.dMV,f.Rtp])},f.KVe);const w=E},54255:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(13980),s=n.n(i),c=n(76141),u=n(27502);const p=e=>e&&e.attributes,m=e=>{let{entity:t,entityType:n,attributeTypesSelectionStrategy:r=p,mode:a,onAddAttributes:i,onDeleteAttribute:s,onChangeAttribute:u}=e;const m=(0,l.useMemo)((()=>r(n)),[r,n]);return t?o().createElement(c.Z,{key:t.uri,attrTypes:m,entity:t,showEmptyEditors:!0,drawLines:!0,parentUri:t.uri,mode:a,crosswalks:t.crosswalks,onAddAttributes:i,onChangeAttribute:u,onDeleteAttribute:s}):null};m.propTypes={entityUri:s().string,parentUri:s().string,entity:s().object,entityType:s().object,attributeTypesSelectionStrategy:s().func,mode:u.XGc,onAddAttributes:s().func,onDeleteAttribute:s().func,onChangeAttribute:s().func};const d=m,g={onAddAttributes:a.N5.actions.addAttributes,onDeleteAttribute:a.N5.actions.removeAttribute,onChangeAttribute:a.N5.actions.modifyAttribute},f=(0,r.connect)(((e,t)=>({entity:t.entityUri&&a.ZP.selectors.getModifiedEntity(e,t.entityUri)})),g)(d)},72283:(e,t,n)=>{n.d(t,{Z:()=>q});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),u=n(27502),p=n(84425),m=n(42662),d=n(12231),g=n(79692);const f=(0,g.Z)({entityContainer:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},entityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.87)",cursor:"pointer",lineHeight:"15px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},emptyEntityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.6)",lineHeight:"15px",marginLeft:"16px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",cursor:"default"},entityAvatar:{transform:"scale(0.5)",marginLeft:"8px",marginRight:"11px"},entitySecondaryLabel:{color:"rgba(0,0,0,0.6)"}}),b=(0,g.Z)((e=>({singleValue:{color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",paddingTop:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},linkValue:{cursor:"pointer",color:e.palette.primary.main,textDecoration:"none"}}))),h=(0,g.Z)((e=>({addLabel:{color:e.palette.primary.main,display:"flex",fontWeight:"500",cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},groupHeading:{fontSize:"13px",height:"36px",padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),y=(0,g.Z)({clearIcon:{cursor:"pointer",height:"20px",width:"20px"}});function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const v=e=>{let{innerRef:t,innerProps:n,selectOption:r,data:l}=e;const o=f(),{uri:i,entityType:c,label:u,secondaryLabel:p}=l;return""!==i?a().createElement(d.Z,x({className:o.entityContainer,ref:t,key:i,onClick:()=>r({label:u,uri:i,entityType:c})},n),a().createElement(m.Z,{className:o.entityAvatar,entityType:c}),a().createElement("span",{className:o.entityLabel},u,p&&a().createElement("span",{className:o.entitySecondaryLabel},", ",p))):a().createElement(d.Z,x({className:o.entityContainer,ref:t,key:i},n,{disabled:!0}),a().createElement("span",{className:o.emptyEntityLabel},s().text("No results found")))};v.propTypes={innerRef:o().oneOfType([o().oneOf([null]),o().func,o().shape({current:o().any.isRequired})]),innerProps:o().object.isRequired,selectOption:o().func.isRequired,data:o().shape({uri:o().string.isRequired,label:o().string.isRequired,entityType:u.pyR.isRequired})};const E=v;var w=n(71153),C=n.n(w),O=n(52730),S=n(89810),N=n(90436),T=n(12212);const k=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:n,disableLinkClick:l},children:o,data:i}=e,p=b(),m=(0,O.useDispatch)(),d=(0,r.useContext)(T.m),g=(0,O.useSelector)(S.ZP.selectors.getUIPath),f=(0,u.ZiX)(i.entityUri)?{className:p.singleValue,component:"span"}:{className:C()(p.singleValue,p.linkValue),onMouseDown:e=>{e.stopPropagation(),l||(0,c.pipe)((0,c.always)({uri:i.entityUri,viewId:d}),S.ui.actions.openEntity,m)()},onClick:e=>e.preventDefault(),href:(0,u.ChB)({uiPath:g,uri:i.entityUri}),component:"a"};return!n&&a().createElement(N.Z,f,(0,u.ZiX)(i.entityUri)?s().text(`New ${t.label} will be created`):(0,u.idV)(o))};k.propTypes={children:o().string,data:o().object.isRequired,selectProps:o().object.isRequired};const Z=k;var P=n(33375),A=n(61837);const I=e=>{const{selectProps:{onClear:t}}=e,n=y();return a().createElement(A.Z,{onClick:t},a().createElement(P.Z,{className:n.clearIcon}))};I.propTypes={selectProps:o().object.isRequired};const L=I;var j=n(54255),R=n(79573),D=n(92391),M=n(65549);const{Group:V}=D.F,z=e=>{const{selectProps:{inputValue:t,onCreate:n},data:r,children:l}=e,o=h();return a().createElement(V,e,a().createElement("div",{className:o.groupHeading},a().createElement("span",null,r.label),n&&a().createElement("span",{onClick:()=>n(t,r.entityType),className:o.addLabel},a().createElement(M.Z,{className:o.addIcon}),s().text(`Create ${t?`"${t}" as `:""}new ${r.label}`))),l)};z.propTypes={selectProps:o().object.isRequired,data:o().object,children:o().array};const U=z,B=(0,g.Z)({creatorWrapper:{marginTop:"20px"}});function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=e=>{let{entity:t={},entityTypesUris:n=[],mode:l,max:o,onChange:i,onCreate:m,metadata:d,globalSearchRequestOptions:g,attributeTypesSelectionStrategy:f,disableLinkClick:b}=e,h=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const y=B(),[x,v]=(0,r.useState)(""),w=(0,r.useMemo)((()=>n.map((e=>(0,u.nt9)(d,e)))),[n,d]),C=[{filter:"equals",fieldName:"type",values:n.map(u.nIW)}],O=F({},g,{max:o}),S=m?(e,t)=>{m(t||n[0],e),v("")}:void 0,N=e=>{null!==e&&(v(""),i(e))},T=(0,r.useMemo)((()=>1!==w.length),[w]),k=((0,c.isEmpty)(t)?w[0]:(0,u.nt9)(d,t.entityType))||{},P=m&&s().text(`Create ${x?`"${x}" as `:""}new ${k.label}`),A=s().text(`Select ${1===w.length?`${w[0].label} `:""}profile`),I=!(0,c.isEmpty)(t)&&(0,u.ZiX)(t.entityUri),D=T?{Group:U,GroupHeading:R.Vd}:{},M=I?{ClearIndicator:L}:{};return a().createElement(a().Fragment,null,a().createElement(p.Z,_({value:(0,c.isEmpty)(t)?void 0:t,inputValue:x,onInputChange:e=>{v(e)},getOptions:e=>(0,u.ZOr)(C,O,e).then((e=>t=>{const n=t.map((t=>F({},t,{label:(0,u.idV)(t.label),entityType:e.find((e=>{let{uri:n}=e;return n===t.type}))}))),r=e=>(0,c.isEmpty)(e)?[{label:"",uri:"",entityType:{}}]:e;return e.length>1?e.map((e=>({label:e.label,entityType:e.uri,options:r(n.filter((t=>t.type===e.uri)))}))):r(n)})(w)),getOptionLabel:(0,c.prop)("entityLabel"),onChange:N,onCreate:S,onClear:()=>{N({})},label:A,createLabel:P,components:F({Option:E,SingleValue:Z},D,M),currentEntityType:k,isClearable:!0,disableLinkClick:b},h)),I&&a().createElement("div",{className:y.creatorWrapper},a().createElement(j.Z,{mode:l,attributeTypesSelectionStrategy:f,entityType:k,entityUri:t.entityUri})))};W.propTypes={entity:u.oZZ,entityTypesUris:o().arrayOf(o().string),max:o().number,mode:u.XGc,dispatch:o().func,metadata:u.pGS,onChange:o().func.isRequired,onCreate:o().func,attributeTypesSelectionStrategy:o().func,globalSearchRequestOptions:o().object,disableLinkClick:o().bool};const q=W},66078:(e,t,n)=>{n.d(t,{Z:()=>$});var r=n(24328),a=n.n(r),l=n(52730),o=n(94438),i=n(89810),s=n(27502),c=n(26729),u=n(22349),p=n(40435),m=n(87918),d=n.n(m),g=n(13896),f=n(58651),b=n(95544),h=n(8629),y=n(90436),x=n(87378),v=n(27556),E=n(74603),w=n(77277),C=n(79692);const O=(0,C.Z)((e=>({root:{width:"328px"},paper:{width:"100%",height:"40px",display:"flex",alignItems:"center",boxShadow:"none",backgroundColor:"rgba(0,0,0,0.03)"},inputRoot:{flex:1},input:{padding:"0 12px",fontSize:"14px","&:placeholder":{color:e.palette.text.secondary}},errorMessage:{marginTop:"8px",fontSize:"12px",color:e.palette.error.main}}))),S=e=>0===e.trim().length,N=e=>{let{onSend:t}=e;const n=O(),[l,o]=(0,r.useState)(""),[i,s]=(0,r.useState)(null);return a().createElement(b.Z,{className:n.root},a().createElement(v.Z,{className:n.paper},a().createElement(E.Z,{value:l,onChange:e=>{const t=e.target.value,n=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);o(t),n||S(t)?s(null):s(d().text("URL is not correct"))},classes:{root:n.inputRoot,input:n.input},placeholder:d().text("Paste an image URL here")}),a().createElement(w.Z,{disabled:Boolean(i)||S(l),variant:"outlined",color:"primary",onClick:()=>{t(l),o(""),s(null)}},d().text("Send"))),i&&a().createElement(y.Z,{className:n.errorMessage},i))};var T=n(71153),k=n.n(T),Z=n(83997);const P=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],A=e=>{let{className:t,onAppendFile:n}=e;return a().createElement(a().Fragment,null,a().createElement("input",{onInput:e=>{n&&n(e.currentTarget.files[0])},style:{display:"none"},accept:P.join(","),id:"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(w.Z,{className:t,variant:"contained",color:"primary",component:"span"},d().text("Select image"))))};function I(){return I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(this,arguments)}const L=e=>a().createElement("svg",I({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__c"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"67.572%",y1:"54.952%",x2:"15.212%",y2:"13.907%",id:"UploadIcon_svg__e"},a().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#000",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__f"},a().createElement("stop",{stopColor:"#B8EDFF",offset:"0%"}),a().createElement("stop",{stopColor:"#53ACDE",offset:"100%"})),a().createElement("circle",{id:"UploadIcon_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"UploadIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#UploadIcon_svg__a"})),a().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#UploadIcon_svg__a"}),a().createElement("g",{mask:"url(#UploadIcon_svg__b)"},a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(-1 9)"},a().createElement("path",{d:"M0 107.268c0 35.579 28.703 64.409 64.173 64.409h139.021c29.578 0 53.497-24.035 53.497-53.635 0-28.356-21.935-51.562-49.705-53.515C199.577 27.705 167.2 0 128.346 0 97.425 0 70.59 17.582 57.171 43.274 25.027 46.767 0 74.117 0 107.268z",fill:"#FFF",opacity:.3}),a().createElement("ellipse",{fill:"url(#UploadIcon_svg__c)",opacity:.4,cx:64.553,cy:107.664,rx:61.43,ry:62.336}),a().createElement("path",{d:"M127.979 8.91c38.773 0 70.206 31.895 70.206 71.24 0 39.346-31.433 71.241-70.206 71.241-6.067 0-11.954-.78-17.57-2.249 9.688-11.019 15.574-25.551 15.574-41.478 0-33.7-26.352-61.153-59.286-62.299C78.714 23.611 101.654 8.91 127.98 8.91z",fill:"url(#UploadIcon_svg__d)",opacity:.4})),a().createElement("path",{fill:"url(#UploadIcon_svg__e)",opacity:.12,d:"M82.093 128.474l38.374 37.966-10.666 18.958 72.714 71.94 63.578-57.537v-6.11l-71.107-70.352H97.22z",transform:"translate(-1 9)"}),a().createElement("path",{fill:"url(#UploadIcon_svg__f)",d:"M151.004 128.29v57.591h-40.836V128.29H81l49.5-49.409L180 128.29z",transform:"translate(-1 9)"})))),j=(0,C.Z)((e=>({root:{padding:"36px 0 29px"},isActive:{backgroundColor:"rgba(0,114,206,0.12)"},icon:{width:"190px",height:"190px",marginBottom:"24px"},title:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px"},description:{marginBottom:"24px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),R=e=>{let{onAppendFile:t,className:n}=e;const r=j(),[{canDrop:l,isOver:o},i]=(0,g.useDrop)({accept:[Z.FILE],drop:e=>{e&&t(e.files[0])},collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()})}),s=l&&o;return a().createElement("div",{ref:i,className:k()(r.root,{[r.isActive]:s},n)},a().createElement(L,{className:r.icon}),a().createElement(y.Z,{className:r.title},d().text("Drag an image here")),a().createElement(y.Z,{className:r.description},d().text("Acceptable image types would include JPG, PNG, TIFF, GIF, BMP. Maximum image size: ${MAX_IMAGE_SIZE}Mb",{MAX_IMAGE_SIZE:20})),a().createElement(A,{onAppendFile:t}))},D=(0,C.Z)((e=>({root:{width:"100%",display:"flex",alignItems:"center",padding:"0 30px",boxSizing:"border-box"},border:{borderBottom:`1px solid ${e.palette.text.primary}`,flex:1,opacity:.12},text:{padding:"0 10px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),M=e=>{let{children:t,className:n}=e;const r=D();return a().createElement(b.Z,{className:k()(r.root,n)},a().createElement(b.Z,{className:r.border}),a().createElement(y.Z,{className:r.text},t),a().createElement(b.Z,{className:r.border}))};var V=n(87685),z=n(37265),U=n(39475);const B=(0,C.Z)({closeIcon:{color:"#fff"}}),_=e=>{let{error:t,onClose:n}=e;const r=B();return a().createElement(z.Z,{open:Boolean(t),onClose:n,message:t,action:a().createElement(U.k,{className:r.closeIcon,tooltipTitle:d().text("Close"),icon:V.default,onClick:n})})},F=(0,C.Z)((e=>({root:{},dialogPaper:{position:"relative",maxWidth:"480px"},title:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",padding:"16px"},body:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0 8px 49px",textAlign:"center"},targetBox:{marginBottom:"8px"},divider:{marginBottom:"28px"}}))),H=e=>{let{open:t,onClose:n,onUpload:o}=e;const c=F(),u=(0,l.useSelector)(i.ZP.selectors.getImageServicePath),p=(0,l.useSelector)(i.ZP.selectors.getEnvironment),m=(0,l.useSelector)(i.ZP.selectors.getTenant),[v,E]=(0,r.useState)(!1),[w,C]=(0,r.useState)(null),O=e=>{E(!0),(0,s.Ixr)({image:e,imageServicePath:u,environment:p,tenant:m}).then((e=>{o(e),n()})).catch((e=>C(e.errorMessage))).finally((()=>E(!1)))};return a().createElement(g.DndProvider,{backend:f.default},a().createElement(h.Z,{open:t,onClose:n,classes:{paper:c.dialogPaper}},a().createElement(y.Z,{className:c.title},d().text("Add new image")),a().createElement(b.Z,{className:c.body},a().createElement(R,{className:c.targetBox,onAppendFile:e=>{const t=Number((e.size/1024/1024).toFixed(2)),n=P.includes(e.type);t>20?C(d().text("File size exceeds configured max file size.")):n?O(e):C(d().text("File format is not supported."))}}),a().createElement(M,{className:c.divider},d().text("or")),a().createElement(N,{onSend:e=>{O(e)}})),v&&a().createElement(x.Z,null),a().createElement(_,{error:w,onClose:()=>C(null)})))};var W=n(43253),q=n(91446);const Y=(0,C.Z)((()=>({root:{width:"100%",marginBottom:"10px"},image:e=>{let{imageMargin:t}=e;return{marginRight:t,cursor:"pointer","&:last-child":{marginRight:0}}},uploadContainer:e=>{let{imageMargin:t,imageWidth:n,imageHeight:r}=e;return{backgroundColor:"white",width:n,height:r,cursor:"pointer",border:"1px dashed #0072CE",boxSizing:"border-box",marginRight:t,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},uploadButton:{width:"50px",height:"50px"},uploadIcon:{fontSize:"36px"}}))),$=e=>{let{attributeType:t={},attributeValues:n=[],onDeleteAttribute:m,onChangeAttribute:d,requestNextPageOfAttributeValues:g,parentUri:f,paging:b,showNonOv:h,imageSize:y=q.By}=e;const x=Y(y),v=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},E=(0,l.useSelector)((e=>i.ZP.selectors.getModifiedEntityDefaultProfilePic(e,v.uri))),w=(0,l.useDispatch)(),[C,O]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>{O((e=>!e))}),[]),N=(0,r.useCallback)((e=>{const n=(0,s.hm5)(f,t.name),r={};for(const a in e){const l=(t.attributes||[]).find((e=>{let{name:t}=e;return t===a}));l&&(r[a]=[{uri:(0,s.hm5)(n,l.name),ov:!0,value:e[a],type:l.uri}])}d({attributeType:t,uri:n,value:r})}),[d,f,t]),T=(0,r.useCallback)((e=>{if(m(e),E===e.uri){var t;const r=(null===(t=n[0])||void 0===t?void 0:t.uri)===e.uri?n[1]:n[0];w(i.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:v.uri,value:r||{}}))}}),[m,v,E,n]),k=(e,n)=>{const{onOpenImageGalleryDialog:r,onDownload:l,onShareLink:o,onSetAsDefault:i}=e,c=(0,s.Q5d)(n),{uri:p}=n;return a().createElement(u.Z,{id:p,onShareLink:()=>o(c),onSetAsDefault:()=>i(n),onDelete:()=>T({uri:p,attributeType:t}),onDownload:()=>l([c]),onClick:()=>r(p)})};return a().createElement("div",{className:x.root},a().createElement(W.Z,{attributeValues:n,attributeType:t,renderImage:e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,s.efz)(t),{uri:r}=t,{onOpenImageGalleryDialog:l}=e;return a().createElement("div",{className:x.image,key:r},a().createElement(c.Z,{src:n,overlay:k(e,t),onClick:()=>l(r),size:{imageWidth:y.imageWidth,imageHeight:y.imageHeight}}))},overlay:!0,countFixedItems:1,onUpload:S,onDeleteAttribute:T,imageSize:y,requestNextPageOfAttributeValues:g,paging:b,parentUri:f,showNonOv:h},a().createElement("div",{className:x.uploadContainer,onClick:S},a().createElement(p.Z,{className:x.uploadButton,iconClassName:x.uploadIcon,icon:o.Z}))),a().createElement(H,{open:C,onUpload:N,onClose:S}))}},89913:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),i=n(13980),s=n.n(i),c=n(17440),u=n(77277);const p=(0,n(79692).Z)({moreAttributes:{display:"flex",paddingBottom:"6px","&$dense":{padding:0}},dense:{},popupContainer:{},moreAttributesPopup:{"&$popupContainer":{}},moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}});var m=n(38442),d=n(33117),g=n(41008),f=n(63485),b=n(44876),h=n(65549),y=n(94792);const x=(0,c.curry)(((e,t)=>(0,c.filter)((t=>t.label.toLowerCase().includes(e.toLowerCase())))(t))),v=e=>{let{label:t,popupTitle:n=t,data:l,dense:i,onApply:s}=e;const v=p(),E=(0,r.useRef)(),[w,C]=(0,r.useState)(!1),[O,S]=(0,r.useState)(""),[N,T]=(0,r.useState)([]),k=(0,r.useCallback)(((e,t)=>{T((0,c.ifElse)((0,c.always)(t),(0,c.append)(e),(0,c.reject)((0,c.propEq)("id",e.id)))(N))}),[N]),Z=(0,r.useMemo)((()=>(0,c.pipe)(x(O),(0,c.map)((e=>({item:{id:e.uri,label:e.label,attrType:e}}))))(l)),[l,O]),P=(0,r.useMemo)((()=>(0,g.LG)(Z)),[Z]),A=(0,r.useCallback)((()=>28),[]),I=(0,r.useCallback)((e=>{let{item:t}=e;k(t,(0,c.not)((0,c.any)((0,c.propEq)("id",t.id))(N)))}),[k,N]),{focusIndex:L,handleKeyDown:j}=(0,b.t)({items:P,open:w,onSelectFocusedItem:I,selectedItems:N}),R=(0,r.useRef)(null);R.current=L;const D=Math.min(255,28*P.length),M=Math.max(140,D+112),V=(0,r.useCallback)(((e,t,n)=>{let{item:r,level:l=0}=t;const o=(0,c.any)((0,c.propEq)("id",r.id))(N),i=R.current===n;return a().createElement(d.Z,{key:r.uri,onClick:k,checked:o,level:l,data:r,label:a().createElement(y.Z,{text:r.label,highlight:O}),labelInText:r.label,style:e,isFocused:i,isRequired:!!r.attrType.required,LogoIcon:r.LogoIcon})}),[O,k,N]);return a().createElement("div",{className:o()(v.moreAttributes,{[v.dense]:i})},a().createElement(u.Z,{color:"primary",onClick:()=>C(!w),ref:E,className:v.moreButton},a().createElement(h.Z,{classes:{root:v.icon}}),a().createElement("div",{className:v.buttonLabel},t)),a().createElement(m.Z,{open:w,className:o()(v.moreAttributesPopup,v.popupContainer),anchorEl:E.current,onClose:(0,c.pipe)((()=>{N.length>0&&s((0,c.pluck)("attrType",N))}),(()=>C(!1)),(()=>S("")),(()=>T([]))),onSearch:S,containerHeight:M,title:n,containerWidth:320,searchInputOnKeyDown:j},a().createElement(f.Z,{getItemSize:A,renderItem:V,items:P,height:D,containerWidth:320,focusIndex:L})))};v.propTypes={label:s().string,popupTitle:s().string,data:s().array,dense:s().bool,onApply:s().func};const E=v},3853:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(27502),o=n(21548);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=e=>{const{attributeValue:t,attributeType:n}=e,r=(0,l.Kxm)(t,n.dataLabelPattern);return a().createElement(o.Z,i({label:(0,l.idV)(r),attributeTypesList:n.attributes||n.analyticsAttributes},e))};s.propTypes=l.j2V;const c=(0,r.memo)(s)},10768:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(52730),a=n(89810),l=n(24328),o=n.n(l),i=n(13980),s=n.n(i),c=n(71153),u=n.n(c),p=n(17440),m=n(27502),d=n(21548),g=n(72283),f=n(93555);const b=(0,n(79692).Z)({item:{marginBottom:"20px"},dense:{marginBottom:0}});function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=e=>{const t=b(),{modifiedEntity:n,metadata:r,globalSearchRequestOptions:a,onDeleteModifiedEntity:i,onUpdateModifiedEntity:s,onDeactivateError:c}=e,x=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["modifiedEntity","metadata","globalSearchRequestOptions","onDeleteModifiedEntity","onUpdateModifiedEntity","onDeactivateError"]),{attributeValue:v,attributeType:E,mode:w,crosswalks:C,errors:O,onChangeAttribute:S}=x,N=(0,l.useRef)(v),T=(0,m.CZ8)(v),k=(0,m.o96)(v),Z=(0,m.Poc)(E),P=(0,m.nt9)(r,Z),A=n?(0,m.Kxm)(n,P.dataLabelPattern):v.label,I=(0,l.useMemo)((()=>[Z]),[Z]),L=(0,l.useMemo)((()=>(0,m.EtK)(C,k)),[C,k]),j=(0,l.useMemo)((()=>(0,m.mbo)(v,O)),[v,O]),R=(0,l.useMemo)((()=>T&&{entityUri:(0,m.ZTM)(T),entityType:(0,m.uGi)(T),entityLabel:v.label}),[T,v.label]),D=(0,l.useMemo)((()=>(0,m.tF$)(E).map((e=>(0,m.zeJ)(r,e))).filter(p.identity)),[E,r]),M=(0,l.useCallback)((e=>(0,m.ct9)(E,e)),[E]),V=(0,l.useCallback)((e=>{n&&i(n.uri);const t=N.current,r=!(0,p.isEmpty)(e)&&e.uri===(0,m.bwT)(t),a=y({},v,{label:e.label,refEntity:r?t.refEntity:(0,m.fmQ)(e),refRelation:r?t.refRelation:(0,m.NBq)(v)});S({value:a,attributeType:E,uri:v.uri}),j&&c((0,m.iFp)(j))}),[v,E,n,S,i,c,j]),z=(0,l.useCallback)(((e,t)=>{const n=(0,p.pipe)(M,(0,m._kX)(w))(P),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:n,metadata:r,mode:w});V(a),s(a)}),[M,w,P,r,V,s]),U=(0,l.useMemo)((()=>(0,m.yv0)({attributeType:E,attributeValue:v,mode:w,isReltioCrosswalk:(0,m.KVV)(C,v)})),[E,v,w,C]),B=(0,l.useMemo)((()=>(0,m.d89)(w,P)),[w,P]),_=(0,m.e$p)(j);return o().createElement(d.Z,h({},x,{label:(0,m.idV)(A),attributeTypesList:D,crosswalks:L,metadata:r}),o().createElement(f.Z,{errorMessage:_},o().createElement(g.Z,{className:u()(t.item,{[t.dense]:_||R&&(0,m.ZiX)(R.entityUri)}),entity:R||{},entityTypesUris:I,max:20,globalSearchRequestOptions:a,mode:w,onChange:U?V:void 0,onCreate:B?z:void 0,metadata:r,attributeTypesSelectionStrategy:M})))};v.propTypes=y({},m.NkU,{modifiedEntity:m.pyR,metadata:m.pGS,globalSearchRequestOptions:s().object,onDeleteModifiedEntity:s().func,onUpdateModifiedEntity:s().func,onDeactivateError:s().func});const E=(0,l.memo)(v),w={onDeleteModifiedEntity:a.N5.modifiedEntities.actions.entityDeleted,onUpdateModifiedEntity:a.N5.modifiedEntities.actions.entityCreated,onDeactivateError:a.N5.errors.actions.errorDeactivated},C=(0,r.connect)(((e,t)=>{const n=(0,m.bwT)(t.attributeValue);return{modifiedEntity:(0,m.ZiX)(n)?a.ZP.selectors.getModifiedEntity(e,n):null,metadata:a.ZP.selectors.getMetadata(e),globalSearchRequestOptions:a.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"])}}),w)(E)},39390:(e,t,n)=>{n.d(t,{Z:()=>P});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(52730),s=n(71153),c=n.n(s),u=n(17440),p=n(65549),m=n(22983),d=n(90436),g=n(87918),f=n.n(g),b=n(27502),h=n(67586),y=n(65314),x=n(93555),v=n(40435),E=n(12980),w=n(67462),C=n(89810);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N={};const T=(0,n(79692).Z)((e=>({wrapper:{width:"100%"},errorWrapper:{alignSelf:"stretch"},editor:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},"editor-value":{flex:"1 1 auto"},"editor-read-only-value":{marginLeft:"12px",display:"flex",alignItems:"center"},"editor-actions":{display:"flex",alignItems:"center",paddingLeft:"8px"},addButton:{marginRight:"-8px"},button:{color:e.palette.text.secondary},placeholder:{height:"50px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary}})));function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}const Z=e=>{let{className:t,attributeValue:n,attributeType:r,isReltioCrosswalk:l,ownError:o,mode:s,onAddOneMore:g,onDeleteAttribute:w,onChangeAttribute:S,onDeactivateError:Z,additionalControlsRenderer:P,state:A}=e,I=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","attributeValue","attributeType","isReltioCrosswalk","ownError","mode","onAddOneMore","onDeleteAttribute","onChangeAttribute","onDeactivateError","additionalControlsRenderer","state"]);const L=T(),j="deleted"===A,R="edited"===A,D=(0,b.KIu)(s),M=(0,b.PFL)(r),V=(0,E.AG)(n,M),z=(0,b.Vg3)({attributeType:r,mode:s}),U=(0,b.yv0)({attributeType:r,attributeValue:n,mode:s,isReltioCrosswalk:l}),B=(0,b.xv5)({attributeType:r,attributeValue:n,mode:s,isReltioCrosswalk:l}),_=U&&D,F=(0,b.e$p)(o),H=(0,i.useSelector)((e=>(0,b.QEi)(r)?((e,t,n)=>{const r=C.ZP.selectors.getDependentLookupsStructureNode(e,n);if(r){const o=t.uri,{parents:i,missedParentsAttributeTypes:s}=((e,t,n)=>{var r;const a=n.parents.flatMap((t=>{const n=C.ZP.selectors.getDependentLookupsStructureNode(e,t);return n.values.map((e=>O({},e,{type:t,dependentLookupCode:n.attrType.dependentLookupCode})))})),l=C.ZP.selectors.getModifiedEntities(e),o=C.ZP.selectors.getEntityUri(e),i=C.ZP.selectors.getAllRelationsToAddAndEdit(e),s=C.ZP.selectors.getMetadata(e),c=(0,b.vUy)({parentValues:a,valueUri:t,entityUri:o,modifiedEntities:l,connections:i}),p=(0,u.pipe)(b.uDV,(0,u.defaultTo)([]),(0,u.map)((0,u.pipe)((0,u.path)(["valueType","uri"]),b.u5q)),(0,u.prepend)(null===(r=l[o])||void 0===r?void 0:r.type),(0,u.reject)(u.isNil),u.uniq)({entityUri:o,entitiesMap:l,connections:i,metadata:s},t),m=n.parents.filter((e=>p.some((0,b.sOy)(e)))).map((t=>C.ZP.selectors.getDependentLookupsStructureNode(e,t).attrType)).filter((e=>!c.some((t=>{let{type:n,value:r}=t;return r&&n===e.uri}))));return{parents:Object.values(c.reduce(((e,t)=>{var n;return O({},e,{[t.dependentLookupCode]:{type:t.dependentLookupCode,codeValues:(0,u.uniq)([t.value,...(null===(n=e[t.dependentLookupCode])||void 0===n?void 0:n.codeValues)||[]]).filter(Boolean).sort()}})}),{})),missedParentsAttributeTypes:m}})(e,o,r),{isBlocked:c=!1}=C.ZP.selectors.getDependentLookupEditorState(e,o)||{},p=(a=s).length?f().text("Please select value for ${labels} ${attributes}.",{labels:(l=a.map((0,u.pipe)((0,u.prop)("label"),(e=>`'${e}'`))),l.reduce(((e,t,n)=>[e,t].join(n===l.length-1?` ${f().text("and")} `:", ")))),attributes:1===a.length?f().text("attribute"):f().text("attributes")}):"",m=C.ZP.selectors.getLookupAutocomplete(e),d=(0,b.Vmh)(m,n),g=!(null!=t&&t.lookupCode||null!=t&&t.value)&&c&&f().text("Populating values...")||p||"",h={parents:i,disabled:!!p||c,placeholder:g,autopopulationId:d?o:null};return g&&(h.value=null),((e,t)=>{const n=N[e];return(0,u.equals)(t,n)?n:((0,u.equals)(null==n?void 0:n.parents,t.parents)&&(t.parents=n.parents),N[e]=t,t)})(o,h)}var a,l})(e,n,null==r?void 0:r.uri):null)),W=()=>{o&&Z((0,b.iFp)(o))},q=!!g&&z&&!r.singleValue,Y=!j&&!!w&&B,$=!!F,G=j?{disabled:!0}:{};return a().createElement("div",{className:c()(L.editor,t)},a().createElement(x.Z,{errorMessage:F,className:L.errorWrapper},a().createElement("div",{className:c()(L["editor-value"],{[L.deleted]:j},{[L["editor-read-only-value"]]:!_})},_?a().createElement(y.Z,k({fieldName:(0,b.Tde)(r.uri),value:V,dataTypeDefinition:M,error:$,onChange:(0,u.pipe)((0,E.pp)(n,r),S,W),fullWidth:!0},H,I,G)):a().createElement(h.Z,{value:(0,b.kDl)(n),dataTypeDefinition:M}))),a().createElement("div",{className:L["editor-actions"]},R&&a().createElement(d.Z,{variant:"caption",className:L.editedLabel},"(",f().text("edited"),")"),q&&a().createElement(v.Z,{icon:p.Z,onClick:g,size:"L",className:c()(L.addButton,L.button)}),P&&P({attributeType:r,attributeValue:n}),Y&&a().createElement(v.Z,{className:L.button,icon:m.Z,onClick:()=>{w({uri:n.uri,attributeType:r}),(0,b.PcX)(o)!==b.NIO.missed&&W()},size:"L"})))};Z.propTypes={className:o().string,attributeValue:b.cNQ,attributeType:b.EMD,ownError:b.wfT,isReltioCrosswalk:o().bool,state:o().oneOf(["deleted","edited"]),mode:b.XGc,onAddOneMore:o().func,onDeleteAttribute:o().func,onChangeAttribute:o().func,onDeactivateError:o().func,additionalControlsRenderer:o().func};const P=(0,r.memo)((0,w.Z)(Z,(()=>{const e=T();return a().createElement("div",{className:e.placeholder})})))},12980:(e,t,n)=>{n.d(t,{AG:()=>i,Ho:()=>s,pp:()=>c});var r=n(95038),a=n.n(r),l=n(27502),o=n(17440);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t}=arguments.length>1?arguments[1]:void 0;const{value:n,lookupCode:r}=e;switch(t){case l.oS0.TYPE_BOOLEAN:case l.oS0.TYPE_BOOLEAN_RADIO:case l.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.gxP)(n);case l.oS0.TYPE_DATE:return n&&l.P6Y.dates.toLocalDate(n)||null;case l.oS0.TYPE_LOCAL_DATE:case l.oS0.TYPE_TIMESTAMP:case l.oS0.TYPE_ACTIVENESS_DATE:return n&&new Date(n)||null;case l.oS0.TYPE_DEPENDENT_LOOKUP:case l.oS0.TYPE_LOOKUP:return{value:n,lookupCode:r};default:return n}},s=(e,t)=>{const{type:n}=(0,l.PFL)(e);switch(n){case l.oS0.TYPE_BOOLEAN:case l.oS0.TYPE_BOOLEAN_RADIO:case l.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t.toString();case l.oS0.TYPE_DATE:return t&&a()(t).format("YYYY-MM-DD")||"";case l.oS0.TYPE_TIMESTAMP:return t&&a()(t).format()||"";case l.oS0.TYPE_ACTIVENESS_DATE:case l.oS0.TYPE_LOCAL_DATE:return t&&t.valueOf();default:return t||""}},c=(0,o.curry)(((e,t,n)=>({value:s(t,n),uri:e.uri,attributeType:t})))},1108:(e,t,n)=>{n.d(t,{c:()=>a});var r=n(24328);const a=n.n(r)().createContext(null)},26978:(e,t,n)=>{n.d(t,{U:()=>l,A:()=>o});var r=n(17440),a=n(27502);const l=(e,t,n,l)=>{const o=(0,r.pipe)(a.nt9,(0,r.defaultTo)({}),(0,r.props)(["attributes","analyticsAttributes"]),(0,r.reject)(r.isNil),r.flatten,(0,r.concat)(r.__,(0,r.pipe)(r.values,(0,r.reject)((0,r.propEq)("uri",a.xPW.id.uri)))(a.xPW)))(e,t);return n.length?o.filter((e=>{let{uri:t}=e;return n.includes(t)})):o.filter((e=>{let{uri:t}=e;return!l.includes(t)}))},o=(e,t)=>(0,r.partition)((0,r.pipe)((0,r.path)(["attrType","uri"]),(0,r.includes)(r.__,e)),t)},31992:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(96971),a=n(86689),l=n(24328),o=n.n(l),i=n(87918),s=n.n(i),c=n(47608);const u=e=>{let{onClick:t}=e;const n=(0,c.y)();return o().createElement(a.Z,{component:"button",variant:"caption",className:n.link,onClick:t,underline:"none"},o().createElement(r.Z,{className:n["svg-icon__root"]}),s().text("Show less"))}},35039:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4426),a=n(86689),l=n(24328),o=n.n(l),i=n(87918),s=n.n(i),c=n(47608);const u=e=>{let{moreNumber:t,valueNumber:n,onClick:l}=e;const i=(0,c.y)();return o().createElement(a.Z,{component:"button",variant:"caption",className:i.link,onClick:l,underline:"none"},o().createElement(r.Z,{className:i["svg-icon__root"]}),t&&n?s().text("Show ${moreNumber} more of remaining ${valueNumber} value",{moreNumber:t,valueNumber:n}):s().text("Show more"))}},47608:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}})},11013:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(27502),o=n(81489),i=n(88610),s=n(95492);const c=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e.type){case l.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case l.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(o.Z,t)}}}.build(t,e)}},89978:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(17440),o=n(27502),i=n(52239),s=n(47972),c=n(35039),u=n(31992),p=n(86602),m=n(26978);const d=(0,r.memo)((e=>{let{attrTypes:t,entity:n,parentUri:d,drawLines:g,children:f,className:b,max:h,alwaysVisibleTypeUris:y=p.S,showNonOv:x}=e;const[v,E]=(0,r.useState)(h||1/0),w=(0,r.useMemo)((()=>(0,o.fyF)(t,n,x)),[t,n,x]),[C,O]=(0,r.useMemo)((()=>(0,m.A)(y,w)),[w,y]),S=O.slice(0,v),N=h&&S.length<O.length,T=h&&S.length>=O.length&&h<S.length,k={enabled:g};return a().createElement("div",{className:b},f&&a().createElement(i.Z,k,f),S.concat(C).map((e=>{let{attrType:t,values:r}=e;return a().createElement(s.Z,{key:t.uri,attributeType:t,drawLines:g,values:r,paging:(0,l.path)(["paging",t.uri],n.attributes),parentUri:d,showNonOv:x})})),N&&a().createElement(c.Z,{onClick:()=>{E(1/0)}}),T&&a().createElement(u.Z,{onClick:()=>{E(h)}}))}))},47972:(e,t,n)=>{n.d(t,{Z:()=>X});var r=n(52730),a=n(89810),l=n(71153),o=n.n(l),i=n(24328),s=n.n(i),c=n(17440),u=n(27502),p=n(79692);function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g="13px",f="15px",b={titleRow:{display:"block",minHeight:"16px",textIndent:"-1em",paddingLeft:"1em"},title:{whiteSpace:"nowrap"},ovIcon:{marginLeft:"8px",marginRight:"-3px",marginTop:"-1px",textIndent:0}},h=(0,p.Z)({paddingWrapper:{paddingTop:"3px",paddingBottom:"5px","&:last-child":{paddingBottom:"2px"}},paddingWrapperWithLines:{paddingBottom:"1px","&:last-child":{paddingBottom:"2px"}}}),y=(0,p.Z)(m({wrapper:{fontSize:g,lineHeight:f,flex:1},collaborationWrapper:{display:"flex",alignItems:"start",minHeight:"18px"},attribute:{marginLeft:"8px",paddingLeft:"4px",paddingRight:"4px",display:"inline",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},titleIcon:{width:"16px",height:"16px",marginBottom:"-3px",marginRight:"8px",marginLeft:"1px",color:"rgba(0, 0, 0, 0.38)"}},b)),x=(0,p.Z)(m({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",fontSize:g,lineHeight:f},attribute:{"&:last-child":{marginBottom:0},paddingLeft:"4px",paddingRight:"4px",marginLeft:"5px",marginBottom:"4px",whiteSpace:"pre-wrap",wordBreak:"break-word"},attributes:{alignSelf:"stretch"}},b,{titleRow:m({},b.titleRow,{marginBottom:"3px"})}));var v=n(92985),E=n(52239),w=n(62901),C=n(72316),O=n(37457),S=n(11013);const N=e=>{let{value:t,nonVisibleValues:n,attributeType:r,titleClassName:a,contentClassName:l,showNonOv:i,totalNonVisibleValues:c}=e;const p=y(),{label:m}=r;return s().createElement("div",{className:o()(p.collaborationWrapper,w.U)},s().createElement("div",{className:o()(p.titleRow,p.wrapper)},s().createElement(v.Z,{label:m,className:o()(p.title,a),attributeType:r}),s().createElement(O.Z,{nonOvValues:n,attributeType:r,className:p.ovIcon,nonOvTotal:c}),s().createElement(S.Z,{className:o()(p.attribute,l),attributeValue:t,attributeType:r,showNonOv:i,inlined:!0})),s().createElement(C.Z,{uri:t.uri,relatedObjectUris:(0,u.wp9)(u.q7e.ENTITY_ATTRIBUTE,{uri:t.uri}),objectType:u.q7e.ENTITY_ATTRIBUTE}))};var T=n(35039),k=n(31992);const Z=e=>{let{max:t,values:n,nonVisibleValues:r,totalVisibleValues:a,attributeType:l,parentUri:u,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g,totalNonVisibleValues:f}=e;const b=x(),[h,y]=(0,i.useState)(t),E=t<a,w=E&&h<a,C=E&&h>=a,{label:N}=l,Z=n.slice(0,h),P=a-h;return s().createElement("div",{className:b.wrapper},s().createElement("div",{className:b.titleRow},s().createElement(v.Z,{label:N,className:o()(b.title,m),attributeType:l}),s().createElement(O.Z,{nonOvValues:r,attributeType:l,className:b.ovIcon,nonOvTotal:f})),s().createElement("div",{className:b.attributes},Z.map((e=>s().createElement(S.Z,{key:e.uri,className:o()(b.attribute,d),attributeValue:e,attributeType:l,showNonOv:g})))),w&&s().createElement(T.Z,{moreNumber:(0,c.min)(t,P),valueNumber:P,onClick:()=>{n.length<a&&p({parentUri:u,attributeTypeUri:l.uri,attributeTypeName:l.name,values:n,defaultMaxValues:t}),y(h+t)}}),C&&s().createElement(k.Z,{onClick:()=>{y(t)}}))};var P=n(61347),A=n(20404);const I=e=>{let{className:t,values:n,Component:r}=e;return s().createElement("div",{className:t},n.map(((e,t)=>s().createElement(i.Fragment,{key:e},s().createElement(r,{value:e}),t<n.length-1&&", "))))};var L=n(62228),j=n(10591);function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const M=(0,p.Z)({insertAttribute:R({width:"fit-content"},j.zX[j.Y1.insertAttribute]),deleteAttribute:R({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},j.zX[j.Y1.deleteAttribute])}),V=e=>{let{value:t}=e;const n=M(),l=(0,r.useSelector)(a.ZP.selectors.getMetadata),{appearance:o}=(0,i.useContext)(L.m),c=(0,j.YN)("roles",t,o),p=(0,j.o_)(c);return s().createElement("span",{className:n[p]},(0,u.xqc)(l,t))},z=e=>{let{className:t,values:n}=e;return s().createElement(I,{values:n,className:t,Component:V})};var U=n(86689);const B=e=>{let{value:t}=e;const n=M(),l=(0,r.useSelector)(a.ZP.selectors.getUIPath),o=(0,r.useSelector)(a.ZP.selectors.getEntity),{appearance:c}=(0,i.useContext)(L.m),p=(0,j.YN)("tags",t,c),m=(0,j.o_)(p);return s().createElement(U.Z,{underline:"none",className:n[m],href:(0,u.hgZ)({uiPath:l,tag:t,entityUri:o.uri})},t)},_=e=>{let{className:t,values:n}=e;return s().createElement(I,{values:n,className:t,Component:B})},F=e=>{let{values:t,attributeType:n}=e;const r=y(),{label:a}=n;return s().createElement("div",{className:o()(r.titleRow,r.wrapper)},(l=r.titleIcon,n.uri===u.xPW.tags.uri?s().createElement(A.Z,{className:l}):null),s().createElement(v.Z,{label:a,className:r.title,attributeType:n}),(e=>{switch(n.uri){case u.xPW.tags.uri:return s().createElement(_,{className:e,values:t});case u.xPW.roles.uri:return s().createElement(z,{className:e,values:t});default:return s().createElement(S.Z,{className:e,attributeValue:{value:t[0]},attributeType:n,inlined:!0})}})(r.attribute));var l},H="oneLine",W="multiLine",q="imageLine",Y="special",$=(0,i.memo)((e=>{let{values:t,attributeType:n,drawLines:r,paging:a={},parentUri:l,max:i=1/0,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g}=e;const f=h(),b=(0,c.partition)(u.OXP);if(!t||!t.length)return null;const[y,x]=b(t),w=g?t:y,C=g?[]:x,O=g?"totalValues":"totalOvValues",S=(0,c.ifElse)((0,c.has)(O),(0,c.prop)(O),(0,c.always)(w.length))(a),T=null!=a&&a.totalValues?a.totalValues-S:C.length,k=1===S&&!(0,u.YkM)(n);return s().createElement(E.Z,{enabled:r,className:o()({[f.paddingWrapperWithLines]:r})},s().createElement("div",{className:o()({[f.paddingWrapper]:!r})},(()=>{switch((0,c.cond)([[u.kqr,(0,c.always)(Y)],[u.Or$,(0,c.always)(q)],[(0,c.always)(k),(0,c.always)(H)],[c.T,(0,c.always)(W)]])(n)){case H:return s().createElement(N,{value:w[0],nonVisibleValues:C,totalNonVisibleValues:T,attributeType:n,titleClassName:m,contentClassName:d,showNonOv:g});case W:return s().createElement(Z,{values:w,nonVisibleValues:C,totalVisibleValues:S,totalNonVisibleValues:T,attributeType:n,parentUri:l,max:i,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g});case q:return s().createElement(s().Fragment,null,s().createElement(v.Z,{label:null==n?void 0:n.label,attributeType:n}),s().createElement(P.Z,{attributeValues:w,attributeType:n,paging:a,parentUri:l,requestNextPageOfAttributeValues:p,showNonOv:g}));case Y:return s().createElement(F,{values:w,attributeType:n})}})()))})),G={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues},X=(0,r.connect)(((e,t)=>{let{max:n}=t;return{max:n||a.ZP.selectors.getDefaultMaxValues(e)}}),G)($)},13870:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),i=n(71153),s=n.n(i),c=n(27502),u=n(90436),p=n(89978),m=n(85777),d=n(72316),g=n(62901);const f=(0,n(79692).Z)({complexContainer:{marginTop:"1px"},labelContainer:{display:"flex",minHeight:"18px"},label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",paddingTop:"1px",marginLeft:"2px"},spacer:{flex:1}}),b=e=>{let{attributeTypesList:t,attributeValue:n,label:l,expanded:o=!1,children:i,showNonOv:b}=e;const h=f(),y=n.uri,[x,v]=(0,r.useState)(!1);(0,r.useEffect)((()=>{v(o)}),[o]);const E=(t||[]).some((e=>(0,c.kQw)(e))),w=(0,r.useMemo)((()=>({attributes:E?null:n.value,analyticsAttributes:E?n.value:null})),[n,E]);return a().createElement("div",{className:h.complexContainer},a().createElement("div",{className:s()(h.labelContainer,g.U)},a().createElement(m.Z,{onClick:()=>v((e=>!e)),expanded:x}),a().createElement(u.Z,{component:"span",variant:"body2",classes:{body2:h.label}},l),a().createElement("div",{className:h.spacer}),a().createElement(d.Z,{uri:n.uri,relatedObjectUris:(0,c.wp9)(c.q7e.ENTITY_ATTRIBUTE,{uri:n.uri}),objectType:c.q7e.ENTITY_ATTRIBUTE})),x&&a().createElement(p.Z,{attrTypes:t,entity:w,drawLines:!0,parentUri:y,showNonOv:b},i))};b.propTypes={children:o().node,label:o().oneOfType([o().string,o().node]),attributeTypesList:o().arrayOf(c.EMD),attributeValue:o().oneOfType([c.dMV,c.Rtp]),expanded:o().bool,showNonOv:o().bool};const h=b},61347:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(27502),o=n(71153),i=n.n(o),s=n(62228),c=n(26729),u=n(43253),p=n(91446),m=n(10591);const d=(0,n(79692).Z)((e=>({image:e=>{let{imageMargin:t,imageHeight:n,imageWidth:r}=e;return{marginRight:t,width:r,height:n,cursor:"pointer","&:last-child":{marginRight:0}}},deleteAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,background:`url('${(0,l.m5F)('<svg xmlns="http://www.w3.org/2000/svg" style="stroke: #D1051E; stroke-width: 1" viewBox="0 0 114 114">\n\t<line x1="5" y1="109" x2="109" y2="5" />\n</svg>')}') no-repeat`,backgroundColor:m.zX[m.Y1.deleteAttribute].backgroundColor,pointerEvents:"none"}},updateAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:m.zX[m.Y1.updateAttribute].backgroundColor,pointerEvents:"none"}},deleteAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.deleteAttribute].color}`,outlineOffset:"-3px"}},insertAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.insertAttribute].color}`,outlineOffset:"-3px"}},updateAttribute:e=>{let{imageWidth:t,imageHeight:n}=e;return{width:t,height:n,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.updateAttribute].color}`,outlineOffset:"-3px"}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,padding:"36px 8px",textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}))),g=e=>{let{attributeType:t,attributeValues:n=[],paging:o,parentUri:g,requestNextPageOfAttributeValues:f,showNonOv:b,imageSize:h=p.By}=e;const y=d(h),{appearance:x}=(0,r.useContext)(s.m);return a().createElement(u.Z,{attributeValues:n,attributeType:t,renderImage:e=>{let{onOpenImageGalleryDialog:t}=e;return e=>{const n=(0,l.efz)(e),{uri:r}=e,o=(0,m.IF)(r,x),s=(0,m.o_)(o);return a().createElement("div",{className:i()(y.image,{[y[s+"Image"]]:s}),key:r},a().createElement(c.Z,{onClick:()=>t(r),className:y[s],src:n,size:{imageWidth:h.imageWidth,imageHeight:h.imageHeight}}))}},imageSize:h,requestNextPageOfAttributeValues:f,paging:o,parentUri:g,showNonOv:b})}},88610:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(24328),a=n.n(r),l=n(95544),o=n(71153),i=n.n(o),s=n(27502),c=n(62228),u=n(10591),p=n(13870),m=n(31569);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const f=(0,n(79692).Z)({label:{textDecoration:"none"},updateAttribute:d({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.updateAttribute]),insertAttribute:d({width:"fit-content"},u.zX[u.Y1.insertAttribute]),deleteAttribute:d({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.deleteAttribute]),pivotingTooltip:{marginLeft:"4px"}});function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const h=e=>{let{attributeValue:t,attributeType:n}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["attributeValue","attributeType"]);const d=f(),{appearance:g}=(0,r.useContext)(c.m),h=(0,r.useMemo)((()=>{const e=(0,u.IF)(t.uri,g),r=(0,u.o_)(e),o=t.label?t.label:(0,s.Kxm)(t,n.dataLabelPattern);return a().createElement(m.m,{className:d.pivotingTooltip,value:t,attributeType:n},a().createElement(l.Z,{component:"span",className:i()(d[r],d.label)},(0,s.idV)(o)))}),[g,d,t,n]);return a().createElement(p.Z,b({label:h,attributeValue:t,attributeTypesList:(0,s.EUG)({},n)},o))};h.propTypes=s.j2V;const y=(0,r.memo)(h)},95492:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(52730),a=n(24328),l=n.n(a),o=n(71153),i=n.n(o),s=n(27502),c=n(62228),u=n(13870),p=n(10591);function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=(0,n(79692).Z)((e=>({label:{color:e.palette.primary.main,textDecoration:"none"},relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary},updateAttribute:m({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.updateAttribute]),insertAttribute:m({width:"fit-content"},p.zX[p.Y1.insertAttribute]),deleteAttribute:m({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.deleteAttribute])})));function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const b=e=>{let{attributeValue:t,metadata:n,attributeType:r,uiPath:o}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["attributeValue","metadata","attributeType","uiPath"]);const d=g(),b=(0,s.bwT)(t),h=(0,a.useMemo)((()=>(0,s.EUG)(n,r)),[r,n]),{appearance:y}=(0,a.useContext)(c.m),x=(0,a.useMemo)((()=>{const e=(0,p.IF)(t.uri,y),n=(0,p.o_)(e);return l().createElement("a",{href:(0,s.O27)(y)?(0,s.ChB)({uiPath:o,uri:b}):void 0,className:i()(d.label,d[n])},(0,s.idV)(t.label),t.relationshipLabel&&l().createElement("span",{className:d.relationshipLabel},t.relationshipLabel))}),[t.uri,t.label,t.relationshipLabel,y,b,d,o]);return l().createElement(u.Z,f({attributeTypesList:h,attributeValue:t,label:x},m))};b.propTypes=s.NkU;const h=(0,a.memo)(b);var y=n(89810);const x=(0,r.connect)((e=>({metadata:y.ZP.selectors.getMetadata(e),uiPath:y.ZP.selectors.getUIPath(e)})))(h)},81489:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(27502),o=n(71153),i=n.n(o),s=n(62901),c=n(62228),u=n(72316),p=n(67586),m=n(31569),d=n(10591);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=(0,n(79692).Z)({root:{display:"flex",alignItems:"start",justifyContent:"space-between"},commentsContainer:{height:"15px",marginRight:"-4px"},attributeValue:{flex:1,wordBreak:"break-all"},updateAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},d.zX[d.Y1.updateAttribute],{"& > a":{color:d.zX[d.Y1.updateAttribute].color}}),insertAttribute:g({width:"fit-content"},d.zX[d.Y1.insertAttribute],{"& > a":{color:d.zX[d.Y1.insertAttribute].color}}),deleteAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px",textDecoration:"line-through"},d.zX[d.Y1.deleteAttribute],{"& > a":{color:d.zX[d.Y1.deleteAttribute].color}}),multilineAttribute:{width:"fit-content"}}),h=e=>{let{className:t,attributeType:n=null,attributeValue:o,inlined:g}=e;const f=b(),{appearance:h}=(0,r.useContext)(c.m),y=(0,d.IF)(o.uri,h),x=(0,d.o_)(y),v=a().createElement(p.Z,{value:(0,l.kDl)(o),dataTypeDefinition:(0,l.PFL)(n)});return g||x?a().createElement("div",{className:t},a().createElement(m.m,{value:o,attributeType:n,key:o.uri,className:i()({[f.multilineAttribute]:!g})},a().createElement("span",{className:f[x]},v))):a().createElement("div",{className:i()(t,f.root,s.U)},a().createElement(m.m,{value:o,attributeType:n,key:o.uri},a().createElement("span",{className:f.attributeValue},v)),a().createElement(u.Z,{className:f.commentsContainer,uri:o.uri,relatedObjectUris:(0,l.wp9)(l.q7e.ENTITY_ATTRIBUTE,{uri:o.uri}),objectType:l.q7e.ENTITY_ATTRIBUTE}))}},10591:(e,t,n)=>{n.d(t,{Y1:()=>a,zX:()=>l,o_:()=>o,IF:()=>m,YN:()=>d});var r=n(17440);let a;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(a||(a={}));const l={[a.insertAttribute]:{color:"#599E0E"},[a.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[a.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},o=e=>{switch(e){case"UPDATE_ATTRIBUTE":return a.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return a.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return a.deleteAttribute;default:return""}},i="/",s=(0,r.pipe)((0,r.split)(i),(0,r.propSatisfies)((0,r.lte)(2),"length")),c=(0,r.pipe)((0,r.split)(i),(0,r.slice)(0,-2),(0,r.join)(i)),u=(0,r.curry)(((e,t)=>(0,r.cond)([[(0,r.has)(e),(0,r.prop)(e)],[()=>s(e),u(c(e))]])(t))),p=e=>(0,r.pipe)(r.keys,(0,r.any)((0,r.startsWith)(e+i))),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=u(e,t);return(0,r.isNil)(n)?p(e)(t)?"UPDATE_ATTRIBUTE":"":n},d=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r||null===(n=r[e])||void 0===n?void 0:n[t]}},86602:(e,t,n)=>{n.d(t,{S:()=>a});var r=n(27502);const a=[r.xPW.roles.uri,r.xPW.tags.uri]},62901:(e,t,n)=>{n.d(t,{U:()=>r});const r="commentsContainerVisibilityArea"},53857:(e,t,n)=>{n.d(t,{vl:()=>r,r:()=>a,Pi:()=>l});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},l=.001},76572:(e,t,n)=>{n.d(t,{g:()=>i});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l);const i=a().createContext({enabled:!1,queueSizeThreshold:0});i.Provider.propTypes={value:o().shape({enabled:o().bool,queueSizeThreshold:o().number})},i.displayName="AsyncMountContext"},65510:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext(!1);a.displayName="BlockImageGalleryDialogContext"},58142:(e,t,n)=>{n.d(t,{h:()=>l});var r=n(24328);const a=()=>{},l=n.n(r)().createContext({comments:[],commentsMap:null,currentComment:null,getComment:a,getComments:()=>new Promise(a),getCommentsCount:a,createComment:()=>new Promise(a),editComment:()=>new Promise(a),createReply:()=>new Promise(a),resolveThread:a,reOpenThread:a,clearCurrentComment:a,deleteComment:a,sending:!1,loading:!1,pageToken:null});l.displayName="CollaborationContext"},63929:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntitiesMapContext"},3064:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},62228:(e,t,n)=>{n.d(t,{m:()=>a});var r=n(24328);const a=n.n(r)().createContext({appearance:void 0,attributes:void 0,roles:void 0,tags:void 0});a.displayName="HistoryDiffContext"},80687:(e,t,n)=>{n.d(t,{J:()=>a});var r=n(24328);const a=n.n(r)().createContext([])},38309:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(24328);const a=n.n(r)().createContext([]);a.displayName="RelatedObjectUrisContext"},89575:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(24328);const a=n.n(r)().createContext([]);a.displayName="UsersContext"},27536:(e,t,n)=>{n.d(t,{S:()=>o});var r=n(24328),a=n(76572);let l=0;const o=()=>{const e=(0,r.useRef)(!0),{enabled:t,queueSizeThreshold:n=0}=(0,r.useContext)(a.g),[o,i]=(0,r.useState)(!t||t&&l<n);e.current&&l++;const s=(0,r.useRef)();return(0,r.useEffect)((()=>{if(l--,!o)return s.current=setTimeout((()=>{i(!0)}),0),()=>clearTimeout(s.current)}),[]),e.current=!1,o}},36746:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}const o=e=>a().createElement("svg",l({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M19 16v3H5v-3H3v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3h-2zm-6-3.33l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z",id:"Download_svg__a"})),a().createElement("g",{transform:"translate(-3 -3)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Download_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Download_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#fff",mask:"url(#Download_svg__b)",d:"M0 0h24v24H0z"})))}}]);
|