@reltio/remotes 1.4.1621 → 1.4.1622
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/1039.js +1 -1
- package/1146.js +1 -1
- package/1148.js +1 -1
- package/1334.js +1 -1
- package/1425.js +1 -1
- package/1572.js +1 -1
- package/1664.js +1 -1
- package/1707.js +1 -1
- package/1790.js +1 -1
- package/1840.js +1 -1
- package/1925.js +1 -1
- package/2049.js +1 -1
- package/2066.js +1 -1
- package/2201.js +1 -1
- package/2400.js +1 -1
- package/2404.js +1 -1
- package/2463.js +1 -1
- package/2641.js +1 -1
- package/3096.js +1 -1
- package/3348.js +1 -1
- package/3358.js +1 -1
- package/3358.js.map +1 -1
- package/3373.js +1 -1
- package/3381.js +1 -1
- package/3383.js +1 -1
- package/3463.js +1 -1
- package/3469.js +1 -1
- package/3538.js +1 -1
- package/356.js +1 -1
- package/3727.js +1 -1
- package/3875.js +1 -1
- package/3902.js +1 -1
- package/3926.js +1 -1
- package/415.js +1 -1
- package/4212.js +1 -1
- package/4390.js +1 -1
- package/4481.js +1 -1
- package/4703.js +1 -1
- package/4780.js +1 -1
- package/4806.js +1 -1
- package/4838.js +1 -1
- package/50.js +1 -1
- package/5034.js +1 -1
- package/5039.js +1 -1
- package/5053.js +1 -1
- package/5108.js +1 -1
- package/5163.js +1 -1
- package/5617.js +1 -1
- package/6020.js +1 -1
- package/6173.js +1 -1
- package/6228.js +1 -1
- package/6280.js +1 -1
- package/6287.js +1 -1
- package/6531.js +1 -1
- package/6606.js +1 -1
- package/673.js +1 -1
- package/6799.js +1 -1
- package/6844.js +1 -1
- package/6853.js +1 -1
- package/6860.js +1 -1
- package/6903.js +1 -1
- package/7340.js +1 -1
- package/735.js +1 -1
- package/7422.js +1 -1
- package/7626.js +1 -1
- package/764.js +1 -1
- package/7896.js +1 -1
- package/8168.js +1 -1
- package/820.js +1 -1
- package/8207.js +1 -1
- package/8322.js +1 -1
- package/8565.js +1 -1
- package/8741.js +1 -1
- package/9016.js +1 -1
- package/9028.js +1 -1
- package/9283.js +1 -1
- package/9309.js +1 -1
- package/9328.js +1 -1
- package/9387.js +1 -1
- package/9719.js +1 -1
- package/9736.js +1 -1
- package/9861.js +1 -1
- package/987.js +1 -1
- package/99.js +1 -1
- package/9960.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
package/3358.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fecb4f0d-5dcb-4c1d-820a-70919e25ead6",e._sentryDebugIdIdentifier="sentry-dbid-fecb4f0d-5dcb-4c1d-820a-70919e25ead6")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1622"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3358],{25601:(e,t,n)=>{n.d(t,{K:()=>g,N:()=>h});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(38677),c=n(95341),s=n(79312);const u=(0,n(72342).makeStyles)((e=>({button:{whiteSpace:"nowrap",fontSize:"14px",lineHeight:"16px",letterSpacing:0,padding:"9px 16px 9px 12px","& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},iconButton:{"& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},startIcon:{marginLeft:0,marginRight:"8px",width:"18px",height:"18px",alignItems:"center"},overflowStyle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},menuIcon:{marginRight:"12px"},menuItem:{minHeight:"28px",padding:"2px 16px 2px 12px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}})));var p=n(79573),d=n(40007),m=n(39475);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(this,arguments)}let h;!function(e){e.iconButton="iconButton",e.button="button",e.menuItem="menuItem"}(h||(h={}));const g=(0,a.forwardRef)(((e,t)=>{let{className:n,mode:a=h.iconButton,label:l,disabled:g,icon:b,onClick:y=p.ZT,onMenuClose:v=p.ZT}=e,E=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","mode","label","disabled","icon","onClick","onMenuClose"]);const x=u();return(()=>{switch(a){case"iconButton":return r().createElement(m.k,f({disabled:g,className:o()(x.iconButton,n),size:"S",tooltipTitle:l,onClick:y,icon:b,showForDisabled:!0},E));case"button":return r().createElement(i.Z,f({className:o()(x.button,n),disabled:g,startIcon:r().createElement(b,null),onClick:y,color:"primary",classes:{startIcon:x.startIcon}},E),r().createElement(d.Z,{value:l},r().createElement("div",{className:x.overflowStyle},l)));case"menuItem":{const e=()=>{v(),y()};return r().createElement(c.Z,f({classes:{root:x.menuItem},onClick:e,disabled:g,ref:t},E),r().createElement(r().Fragment,null,r().createElement(b,{className:x.menuIcon}),r().createElement(s.Z,{classes:{root:x.menuText}},l)))}}})()}));g.displayName="ActionButton"},14625:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(24328),r=n.n(a),l=n(52730),o=n(50673),i=n(17512),c=n(42639);const s=(0,n(72342).makeStyles)({icon:{maxHeight:"25px",maxWidth:"25px",marginRight:"16px"}}),u=e=>{let{group:t,metadata:n}=e;const a=s(),u=(0,l.useSelector)(o.ZP.selectors.getAbsoluteImagePath),p=(0,i.XH8)(n,{type:t.id}),d=(0,i.vPL)(u,p);return r().createElement(c.Z,{className:a.icon,icon:d,avatarText:t.title[0]})}},12933:(e,t,n)=>{n.d(t,{Z:()=>W});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(71153),c=n.n(i),s=n(50914),u=n(22311),p=n(26638),d=n(65643),m=n(40007),f=n(40435),h=n(72342);const g=(0,h.makeStyles)({attribute:{cursor:"pointer",lineHeight:"16px",flexBasis:"100%",display:"flex",alignItems:"center",padding:"0 10px 0 16px",width:"calc(100% - 32px)","&$attributeWithValue":{borderBottom:"1px solid rgba(0,0,0,0.38)"},"&$disabled":{cursor:"default"}},disabled:{},attributeWithValue:{},noSelect:{},name:{fontSize:"14px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",direction:"rtl",textAlign:"left",flex:"1 0",width:"0","& $noSelect":{color:"rgba(0,0,0,0.38)"},"&$disabled":{color:"rgba(0,0,0,0.26)","& $noSelect":{color:"rgba(0,0,0,0.26)"}}}}),b=(0,s.either)((0,s.prop)("title"),(0,s.prop)("fieldName")),y=e=>{let{value:t,getLabel:n=b,onSelectAttributeClick:a,disabled:l=!1}=e;const i=g(),s=t&&n(t);return r().createElement("div",{onClick:l?void 0:a,className:c()(i.attribute,{[i.attributeWithValue]:!!s},{[i.disabled]:l})},r().createElement(m.Z,{value:s},r().createElement("div",{className:c()(i.name,{[i.disabled]:l})},s||r().createElement("span",{className:i.noSelect},o().text("Select attribute")))),r().createElement(f.Z,{size:"M",icon:d.Z,disabled:l}))};var v=n(17512);function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 w=(0,s.eqBy)((0,s.pick)(["fieldName","uri","entityTypeUri"])),O=(e,t)=>t&&!!t.find(w(e)),C=(e,t)=>e.title.toLowerCase().includes(t.toLowerCase()),S=(e,t)=>C(e,t)||(e.children||[]).some((e=>S(e,t))),R=(e,t)=>e.findIndex(w(t)),k=(0,v.fW1)("title"),M=function(e,t,n,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const o=C(e,a);return[{item:a?E({},e,{filterText:a}):e,level:r,groupId:t,groupName:n}].concat(e.children?e.children.filter((e=>l||o||S(e,a))).flatMap((e=>M(e,t,n,a,r+1,l||o))):[]).flat()},P=(0,s.curry)(((e,t)=>t.map((t=>({item:t,items:t.attributes.filter((t=>S(t,e))).map((n=>M(n,t.id,t.title,e)))}))).filter((e=>e.items.length))));var j=n(52730),T=n(35488),I=n(50673),N=n(33117),B=n(63485),D=n(94792),A=n(14625);const z=(0,h.makeStyles)({subHeader:{backgroundColor:"#f5f5f5",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500}});function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Z.apply(this,arguments)}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 H=(0,a.memo)((e=>{let{selectedAttributes:t,onItemClick:n,focusIndex:a,hideCheckBox:l}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["selectedAttributes","onItemClick","focusIndex","hideCheckBox"]);const i=z(),c=(0,j.useSelector)(I.ZP.selectors.getMetadata);return r().createElement(B.Z,Z({getItemSize:(e,t)=>t.items?40:28,renderItem:(e,o,i)=>{let{item:c,level:s,groupId:u,groupName:p}=o;const d=O(c,t),m=i===a;return r().createElement(N.Z,{key:`item-${u}-${c.fieldName}`,onClick:n,checked:d,data:_({},c,{groupName:p}),notSelectable:c.notSelectable,hideCheckBox:l,label:r().createElement(D.Z,{text:c.title,highlight:c.filterText}),labelInText:c.title,level:s,style:e,isFocused:m,groupId:u,LogoIcon:c.LogoIcon})},renderGroupTitle:(e,t)=>r().createElement(T.ZP,{component:"div",className:i.subHeader,style:e,key:`group-${t.item.id}`},t.item.needGroupIcon&&r().createElement(A.Z,{group:t.item,metadata:c}),t.item.title),focusIndex:a},o))}));var L=n(41008);const V=(0,h.makeStyles)({selector:{minWidth:"200px",alignItems:"stretch",background:"rgba(0,0,0, 0.0267)",boxSizing:"border-box",borderRadius:"4px",display:"flex"}}),W=(0,a.memo)((e=>{let{className:t,itemsGroups:n,value:l,getLabel:i,onSelect:d,onRestoreFocus:m=s.identity,onOpenPopup:f=s.identity,disableRestoreFocus:h=!1,disableEnforceFocus:g=!1,single:b=!1,ungroup:v=!1,disabled:x=!1,hideCheckBox:C=!1}=e;const S=V(),[M,j]=(0,a.useState)(null),T=(0,a.useCallback)((()=>j(null)),[]),I=!!M,[N,B]=(0,a.useState)(""),D=(0,a.useCallback)((()=>B("")),[]),[A,z]=(0,a.useState)([]),Z=(0,a.useCallback)((()=>z([])),[]),_=(0,a.useMemo)((()=>P(N,n)),[n,N]),F=(0,a.useMemo)((()=>(0,s.pipe)((0,s.when)((0,s.always)(v),(0,s.chain)((0,s.pipe)((0,s.prop)("items"),s.flatten,(0,s.map)((0,s.pick)(["item","level"]))))),L.LG)(_)),[v,_]),W=(0,a.useMemo)((()=>Math.max(k(_),308)),[_]),U=(0,s.pipe)((0,s.tap)((0,s.pipe)(Z,D,T)),m),G=(0,a.useRef)(),q=(0,a.useCallback)(((e,t)=>{d({checked:t,attribute:e,index:t?A.length:R(A,e),selectedAttributes:A}),b?(z(t?[e]:[]),U({})):(z((e=>{let{attribute:t,selectedAttributes:n,checked:a}=e;return a?n.concat(t):n.filter((e=>!w(t,e)))})({selectedAttributes:A,attribute:e,checked:t})),G.current&&G.current.focus())}),[A,d,b,U,G]),$=(0,a.useCallback)((e=>{let{onListItemClick:t,selectedAttributes:n}=e;return e=>{let{item:a,groupData:r}=e;const l=O(a,n);t(E({},a,{groupName:r.groupName}),!l)}})({onListItemClick:q,selectedAttributes:A}),[q,A]),{focusIndex:X,handleKeyDown:Y}=(0,p.t)({items:F,open:I,onSelectFocusedItem:$,selectedItems:A,onClose:U});return r().createElement("div",{className:c()(S.selector,t),"data-reltio-id":"attribute-selector"},r().createElement(y,{value:l,getLabel:i,onSelectAttributeClick:e=>{f(),j(e.currentTarget)},disabled:x}),r().createElement(u.Z,{open:I,anchorEl:M,onClose:U,onSearch:B,title:o().text("Select attribute"),containerWidth:W,containerHeight:507,searchInputOnKeyDown:Y,anchorOrigin:{horizontal:"right",vertical:"bottom"},searchInputRef:G,disableRestoreFocus:h,disableEnforceFocus:g},r().createElement(H,{items:F,onItemClick:q,selectedAttributes:A,width:W,height:400,focusIndex:X,hideCheckBox:C})))}))},48030:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(24328),r=n(50914),l=n(17512);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){i(e,t,n[t])}))}return e}function i(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{rowIndex:t,columnData:{id:n},cellIndex:a}=e;return`${n}[${t}][${a}]`},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;const[t,n]=(0,a.useState)({}),i=(0,a.useRef)({}),s=(e,t)=>{i.current[e]=t},u=(0,a.useCallback)((0,l.DsO)((()=>{n((e=>{const t=o({},i.current);return(0,r.equals)(e,t)?e:t}))})),[]),p=(0,a.useCallback)((()=>{i.current={}}),[]),d=(0,a.useCallback)((0,r.pipe)(e,(0,r.prop)(r.__,t)),[t]),m=(0,a.useCallback)((0,r.curry)((0,r.useWith)((0,r.pipe)(s,u),[e,r.identity])),[]);return{getDynamicRowCellHeight:d,changeRowCellHeight:m,clearHeightsCache:p}}},33945:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(2507),c=n.n(i),s=n(79573),u=n(50914),p=n(76799);const d=(0,n(72342).makeStyles)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",flexShrink:0,borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none",boxSizing:"border-box",overflowY:"hidden",containerType:"inline-size","& .MuiInputBase-root":{display:"none","@container (min-width: 420px)":{display:"inline-flex"}}},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",display:"none","@container (min-width: 420px)":{display:"block"}},displayedRows:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px!important"}});function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 h=e=>{let{classes:t={},count:n,rowsPerPageOptions:l,page:i,onChangePage:f,rowsPerPage:h,onChangeRowsPerPage:g,basicTableRef:b,labelRowsPerPage:y}=e;const v=d(),E=(0,a.useCallback)((()=>{(0,u.pathOr)(u.identity,["current","resetScrollbarPosition"],b)()}),[b]),x=(0,a.useCallback)((e=>{f(e),E()}),[f,E]),w=(0,a.useCallback)((e=>{f(0),g(e),E()}),[f,g,E]);return r().createElement(p.Z,{classes:m({},t,{root:o()(v.pagination,t.root),select:o()(v.select,t.select),selectLabel:o()(v.caption,t.selectLabel),displayedRows:o()(v.displayedRows,t.displayedRows),input:o()(v.selectRoot,t.selectRoot),actions:v.actions}),backIconButtonProps:{size:"large"},nextIconButtonProps:{size:"large"},component:"div",labelRowsPerPage:y||c().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return c().text("${fromRow}-${toRow} of ${countRows}",{fromRow:c().number(t,"0,0"),toRow:c().number(n,"0,0"),countRows:c().number(a,"0,0")})},count:n,rowsPerPageOptions:l,page:i,onPageChange:(0,u.pipe)((0,u.nthArg)(1),x),rowsPerPage:h,onRowsPerPageChange:(0,u.pipe)(s.NA,w)})};h.displayName="BasicTablePagination";const g=(0,a.memo)(h)},91431:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(3073),c=n(28831),s=n(71153),u=n.n(s);const p=(0,n(72342).makeStyles)((()=>({hidden:{visibility:"hidden"}}))),d=e=>{let{rowIndex:t,rowValue:n,className:l}=e;const o=p(),{toggleRowCollapse:s,getIsRowCollapsible:d,getIsRowCollapsed:m}=(0,a.useContext)(i.x),f=d(n),h=m(t);return r().createElement(c.Z,{className:u()(l,{[o.hidden]:!f}),isOpen:!h,onClick:e=>{s(t),e.stopPropagation()}})};d.propTypes={rowIndex:o().number,rowValue:o().object,className:o().string};const m=d},96253:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(24328),r=n.n(a),l=n(44443),o=n(55962);const i=e=>{let{onChangeHeight:t,children:n}=e,i=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["onChangeHeight","children"]);const c=(0,a.useRef)(),{rowValue:s,rowIndex:u,columnData:p,cellIndex:d}=i,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:s}),f=()=>c.current&&m(c.current.clientHeight);return(0,o.D)(f,[s.rawValue]),(0,a.useEffect)((()=>()=>m(void 0)),[]),r().createElement("div",{ref:c},r().createElement(l.Z,{handleHeight:!0,onResize:f}),n)}},28831:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(39475),c=n(63655);const s=(0,n(72342).makeStyles)({collapseButton:{cursor:"pointer"},expandLess:{transform:"rotate( -180deg )"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const p=e=>{let{isOpen:t=!1,tooltipTitle:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["isOpen","tooltipTitle"]);const l=s(),p={icon:c.Z,className:l.collapseButton,iconClassName:o()({[l.expandLess]:t})},d={tooltipTitle:n};return r().createElement(i.k,u({"data-reltio-id":"collapse-button"},p,d,a))}},22118:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(38677),c=n(69089),s=n(79811),u=n(290),p=n(75779),d=n(35936);const m=(0,n(72342).makeStyles)({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"}}),f=e=>{let{open:t,title:n,content:a,onCancel:l,cancelCaption:f=o().text("Cancel"),onDiscard:h,discardCaption:g="",onSave:b,saveCaption:y=o().text("Save"),disabledSave:v=!1}=e;const E=m();return r().createElement(c.Z,{open:t,onClose:l,classes:{paperScrollPaper:E.paper}},r().createElement(d.Z,{classes:{root:E.title}},n),r().createElement(u.Z,{classes:{root:E.content}},r().createElement(p.Z,{classes:{root:E.contentText}},a)),r().createElement(s.Z,{className:E.actionButtons,disableSpacing:!0},l&&r().createElement(i.Z,{onClick:l},f),r().createElement("div",null,h&&r().createElement(i.Z,{onClick:h,classes:{root:E.discardButton}},g),r().createElement(i.Z,{onClick:b,color:"primary",disabled:v,autoFocus:!0},y))))}},85596:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(17512),c=n(50914),s=n(64651),u=n(65629);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}const d=e=>{let{relation:t={},inRelationTypes:n=[],outRelationTypes:l=[],onChange:o=c.identity,applyFirstByDefault:i=!1,reversedContextLabels:d=!1}=e,m=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:f,fromEditorValue:h,toEditorValue:g}=(0,s.n)({reversedContextLabels:d}),b=(0,a.useMemo)((()=>f(n,l)),[f,n,l]),y=(0,a.useCallback)((0,c.pipe)(h(n,l),o),[h,n,l,o]),v=!!t.relationType;return(0,a.useEffect)((()=>{i&&b.length&&!v&&y(b[0])}),[b,i,y,v]),r().createElement(u.Z,p({value:g(t,b),options:b,onChange:y},m))};d.propTypes={className:o().string,relation:i.bNA,inRelationTypes:o().arrayOf(i.IYE),outRelationTypes:o().arrayOf(i.IYE),applyFirstByDefault:o().bool,reversedContextLabels:o().bool,onChange:o().func};const m=d},79002:(e,t,n)=>{n.d(t,{B9:()=>g,tC:()=>h,ZP:()=>b});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(50914),c=n(79312),s=n(38677);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(this,arguments)}const f=(0,n(72342).makeStyles)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"10px",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box","&$root_small":{minHeight:"160px"},"& $text":{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px",letterSpacing:"0.25px",textAlign:"center"},"& $secondaryText":{color:e.palette.text.secondary,fontSize:"15px",fontWeight:300,lineHeight:"18px",letterSpacing:"0.11px",textAlign:"center",paddingTop:"3px"}},root_small:{},embedded:{flexShrink:0,width:"190px",height:"190px",padding:"8px"},full:{width:"256px",height:"256px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:500,marginTop:"16px"},text:{},secondaryText:{},button:{minHeight:36,minWidth:64,maxWidth:500,padding:"10px 16px",borderRadius:"2px",boxShadow:"0 0 2px 0 rgba(0,0,0,0.12), 0 2px 2px 0 rgba(0,0,0,0.24), 0 0 8px 0 rgba(0,0,0,0.12), 0 8px 8px 0 rgba(0,0,0,0.24)",fontSize:"14px",fontWeight:500,lineHeight:"16px",marginTop:"24px"}})));let h;!function(e){e.full="full",e.embedded="embedded",e.small="small"}(h||(h={}));const g={SEARCH_RESULTS:e=>r().createElement("svg",u({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("radialGradient",{cx:"50%",cy:"100%",fx:"50%",fy:"100%",r:"81.681%",gradientTransform:"matrix(.98998 0 0 .612 .005 .388)",id:"EmptySearchResults_svg__c"},r().createElement("stop",{stopColor:"#00BFFF",stopOpacity:.5,offset:"0%"}),r().createElement("stop",{stopColor:"#9EE8FF",stopOpacity:0,offset:"100%"})),r().createElement("radialGradient",{cx:"50%",cy:"111.651%",fx:"50%",fy:"111.651%",r:"87.693%",gradientTransform:"matrix(0 -.97693 .7263 0 -.31 1.605)",id:"EmptySearchResults_svg__f"},r().createElement("stop",{stopColor:"#91F8E5",stopOpacity:.6,offset:"0%"}),r().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),r().createElement("radialGradient",{cx:"50%",cy:"103.659%",fx:"50%",fy:"103.659%",r:"90.207%",gradientTransform:"matrix(0 -1 2.23905 0 -1.821 1.537)",id:"EmptySearchResults_svg__g"},r().createElement("stop",{stopColor:"#FFF",offset:"0%"}),r().createElement("stop",{stopColor:"#73FAFF",stopOpacity:.21,offset:"59.38%"}),r().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),r().createElement("linearGradient",{x1:"50%",y1:"170.771%",x2:"50%",y2:"10.303%",id:"EmptySearchResults_svg__e"},r().createElement("stop",{stopColor:"#91F8E5",offset:"0%"}),r().createElement("stop",{stopColor:"#99FCFF",stopOpacity:0,offset:"100%"})),r().createElement("filter",{x:"-25.9%",y:"-26.2%",width:"151.8%",height:"152.3%",filterUnits:"objectBoundingBox",id:"EmptySearchResults_svg__d"},r().createElement("feGaussianBlur",{stdDeviation:15,in:"SourceGraphic"})),r().createElement("circle",{id:"EmptySearchResults_svg__a",cx:128,cy:128,r:128})),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"EmptySearchResults_svg__b",fill:"#fff"},r().createElement("use",{xlinkHref:"#EmptySearchResults_svg__a"})),r().createElement("use",{fillOpacity:.2,fill:"#A792CD",xlinkHref:"#EmptySearchResults_svg__a"}),r().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},r().createElement("g",{transform:"translate(56 34)"},r().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},r().createElement("path",{d:"M0 6.99C0 3.13 3.137 0 7 0h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H7c-3.866 0-7-3.143-7-6.99V6.99z"}),r().createElement("path",{d:"M13 25.99c0-3.86 3.137-6.99 7-6.99h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H20c-3.866 0-7-3.143-7-6.99V25.99z",opacity:.4})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 45.833)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),r().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),r().createElement("path",{d:"M35.365.861h69.768a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M34.274 15.048h126.164a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),r().createElement("rect",{fill:"#645F6D",opacity:.5,x:21.756,y:17.46,width:87.022,height:12.004,rx:6.002}),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 87.302)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),r().createElement("rect",{fill:"#E3EBF4",x:0,y:1.091,width:20.668,height:20.734,rx:10.334}),r().createElement("path",{d:"M35.365.861h82.647a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M34.274 15.048H174.58a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M33.182 24.869h113.119a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 128.77)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),r().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),r().createElement("path",{d:"M35.365.861h110.929a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M34.274 15.048h92.443a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})))),r().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},r().createElement("path",{fill:"#446275",d:"M72.246 84.033l8.66 5-35.5 61.488-8.66-5-12.556-24.729-51.307-29.622 20.431-35.388 50.648 29.242z"}),r().createElement("path",{d:"M62.906 120.21l-80.091-46.24 10.5-18.188 50.647 29.242 28.284-.99 8.66 5-18 31.176z",fillOpacity:.2,fill:"#FFF"}),r().createElement("path",{d:"M27.566 75.558L3.877 109.065l-5.013-2.895 26.045-32.146 2.657 1.534zm9.467 5.466L13.345 114.53l-5.014-2.895L34.377 79.49l2.656 1.534zm8.158 4.71l-22.32 34.297-5.013-2.895L43.903 84.99l1.288.744z",fill:"#527585"}),r().createElement("path",{d:"M11.524 90.544l13.385-16.52 2.657 1.534-12.174 17.22-3.868-2.234zm9.467 5.467L34.377 79.49l2.656 1.534-12.174 17.22-3.868-2.233zm9.527 5.5L43.903 84.99l1.288.744-11.47 17.626-3.203-1.85z",fill:"#76A2B5",opacity:.6}),r().createElement("path",{d:"M.355 59.848l-23.689 33.507-5.013-2.895 26.045-32.146 2.657 1.534zm9.468 5.466L-13.866 98.82l-5.013-2.895L7.166 63.78l2.657 1.534zm8.158 4.71L-4.34 104.32l-5.014-2.895L16.692 69.28l1.289.744z",fillOpacity:.1,fill:"#000"}),r().createElement("g",null,r().createElement("path",{fill:"url(#EmptySearchResults_svg__c)",opacity:.993,filter:"url(#EmptySearchResults_svg__d)",d:"M.63 0h173.74L123 172H52z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"url(#EmptySearchResults_svg__e)",opacity:.3,d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"url(#EmptySearchResults_svg__f)",opacity:.3,d:"M4 2h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"url(#EmptySearchResults_svg__g)",d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"#FFF",opacity:.196,d:"M212.363 205.344l-1 1.732L60.418 124.52l4.977-8.62z"})),r().createElement("path",{fill:"#76A2B5",d:"M73.112 84.533l-35.5 61.488-.866-.5 35.5-61.488z"}),r().createElement("path",{fill:"#F3F3F3",d:"M80.906 89.033l-35.5 61.488-.866-.5 35.5-61.488z"}),r().createElement("path",{fill:"#538196",d:"M55.112 115.71l-17.5 30.311-.866-.5 17.5-30.31z"})))),SELECT_ATTRIBUTES:e=>r().createElement("svg",p({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),r().createElement("mask",{id:"SelectAttributes_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},r().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),r().createElement("g",{mask:"url(#SelectAttributes_svg__a)"},r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#SelectAttributes_svg__paint0_linear_0_19219)"}),r().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#SelectAttributes_svg__paint1_linear_0_19219)"}),r().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),r().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),r().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),r().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),r().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),r().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2V140.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),r().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),r().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zM148 37a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),r().createElement("defs",null,r().createElement("linearGradient",{id:"SelectAttributes_svg__paint0_linear_0_19219",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},r().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),r().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),r().createElement("linearGradient",{id:"SelectAttributes_svg__paint1_linear_0_19219",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},r().createElement("stop",{stopOpacity:.01}),r().createElement("stop",{offset:1})))),NO_DATA:e=>r().createElement("svg",d({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__b"},r().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:0,offset:"0%"}),r().createElement("stop",{stopColor:"#F4F4F4",offset:"100%"})),r().createElement("linearGradient",{x1:"69.573%",y1:"86.747%",x2:"38.144%",y2:"33.403%",id:"NoData_svg__d"},r().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),r().createElement("stop",{stopColor:"#000",offset:"100%"})),r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__e"},r().createElement("stop",{stopColor:"#EEFBFF",offset:"0%"}),r().createElement("stop",{stopColor:"#0072CE",offset:"100%"})),r().createElement("filter",{x:"-7.7%",y:"-7.5%",width:"115.3%",height:"115%",filterUnits:"objectBoundingBox",id:"NoData_svg__f"},r().createElement("feOffset",{dx:0,dy:2,in:"SourceAlpha",result:"shadowOffsetOuter1"}),r().createElement("feGaussianBlur",{stdDeviation:2,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r().createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0",type:"matrix",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),r().createElement("feMerge",null,r().createElement("feMergeNode",{in:"shadowMatrixOuter1"}),r().createElement("feMergeNode",{in:"SourceGraphic"}))),r().createElement("circle",{id:"NoData_svg__a",cx:128,cy:128,r:128})),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"NoData_svg__c",fill:"#fff"},r().createElement("use",{xlinkHref:"#NoData_svg__a"})),r().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#NoData_svg__a"}),r().createElement("path",{fill:"url(#NoData_svg__b)",mask:"url(#NoData_svg__c)",d:"M0 9h256v247H0z"}),r().createElement("g",{mask:"url(#NoData_svg__c)"},r().createElement("g",{transform:"translate(29 37)"},r().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},r().createElement("path",{fillOpacity:.8,opacity:.5,d:"M14.565 8h228.144v176.476H14.565z"}),r().createElement("path",{d:"M0 8.01C0 3.586 3.576 0 7.997 0h223.838a7.997 7.997 0 017.997 8.01v152.401c0 4.424-3.577 8.01-7.997 8.01H7.997A7.997 7.997 0 010 160.411V8.01z"})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 42.105)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),r().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),r().createElement("path",{d:"M32.488.791h64.093a3.509 3.509 0 110 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M31.486 13.824h115.902a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),r().createElement("rect",{fill:"#645F6D",opacity:.5,x:19.986,y:16.04,width:79.944,height:11.028,rx:5.514}),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 80.2)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),r().createElement("rect",{fill:"#E3EBF4",x:0,y:1.003,width:18.987,height:19.048,rx:9.493}),r().createElement("path",{d:"M32.488.791h75.925a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M31.486 13.824h128.893a2.506 2.506 0 110 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M30.483 22.846h103.918a1.504 1.504 0 010 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 118.296)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),r().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),r().createElement("path",{d:"M32.488.791h101.906a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M31.486 13.824h84.924a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})))),r().createElement("g",{mask:"url(#NoData_svg__c)"},r().createElement("path",{d:"M154.445 45.134v154.072H36.625V45.134h.811C35.508 62.52 41.07 80.609 54.12 93.944c22.74 23.235 59.61 23.235 82.352 0 13.05-13.335 18.612-31.424 16.683-48.81h1.29z",fill:"url(#NoData_svg__d)",opacity:.1,transform:"rotate(-30 291.014 34.548)"}),r().createElement("path",{d:"M27.473 93.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"url(#NoData_svg__e)",opacity:.2,transform:"translate(70 86)"}),r().createElement("g",{filter:"url(#NoData_svg__f)",strokeWidth:1,fill:"none",transform:"translate(70 86)"},r().createElement("path",{d:"M59.697 0c32.97 0 59.697 26.746 59.697 59.738 0 15.185-5.662 29.047-14.988 39.587l51.204 51.24a89.336 89.336 0 01-10.097 9.392l-51.38-51.416c-9.73 6.888-21.61 10.936-34.436 10.936C26.727 119.477 0 92.73 0 59.738 0 26.746 26.727 0 59.697 0zm0 17.756c-23.17 0-41.953 18.796-41.953 41.982s18.783 41.982 41.953 41.982 41.953-18.796 41.953-41.982-18.783-41.982-41.953-41.982z",fill:"#B5C8C9"}),r().createElement("path",{d:"M21.508 105.656C8.365 94.698 0 78.196 0 59.738 0 26.746 26.727 0 59.697 0c18.444 0 34.935 8.37 45.885 21.523l-9.794 9.8c-8.408-10.68-21.45-17.537-36.091-17.537-25.361 0-45.92 20.573-45.92 45.952 0 14.652 6.852 27.702 17.525 36.117l-9.794 9.8z",fillOpacity:.4,fill:"#FFF"})),r().createElement("path",{d:"M97.473 179.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"#D9F5FF",opacity:.4,style:{mixBlendMode:"soft-light"}}),r().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.87,fill:"#000",style:{mixBlendMode:"overlay"}}),r().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.38,fill:"#3C74B4"})))),ERROR:e=>r().createElement("svg",m({width:88,height:88,viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("mask",{id:"Error_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:88,height:88},r().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#fff"})),r().createElement("g",{mask:"url(#Error_svg__a)"},r().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#CAC4D5",fillOpacity:.3}),r().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M19.987 6.73l49.449 6.072a.687.687 0 01.596.767l-7.845 63.888a.688.688 0 01-.766.6L7.214 71.4a.688.688 0 01-.599-.763l.408-3.326L19.987 6.73z",fill:"#fff"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M1.267 25.921l45.86-19.466a.687.687 0 01.9.366l25.15 59.251a.61.61 0 01-.386.84L22.34 82.765a.719.719 0 01-.887-.445l-20.185-56.4z",fill:"#fff"}),r().createElement("path",{d:"M65.631 9.23H11.017a.688.688 0 00-.687.687v64.37c0 .38.307.687.687.687h54.614c.38 0 .688-.308.688-.687V9.917a.688.688 0 00-.688-.688z",fill:"#F9F9F9"}),r().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.95l3.105-1.666 7.31-4.025 8.852 3.472 7.89-5.223 8.036-2.628 8.113 5.193 3.352-10.255v16.967H14.935l-.05-1.835z",fill:"#9C6CF0"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 32.331l3.105-3.761 7.31 4.31 8.852 1.656 7.89-2.205 8.036 1.827 8.113-12.643 3.352.742V36.36H14.935l-.05-4.029z",fill:"#FA82AA"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.946l3.105.432 7.31 1.01 8.852-5.117 7.89 3.675 8.036 1.839 8.113-1.839 3.352.811v1.028H14.935l-.05-1.839z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M61.543 35.288l-.05 1.497H14.885v-5.239l3.352-.276 8.114 4.697 8.036-.679 7.889.82 8.852-.616 7.31-1.601 3.105 1.397z",fill:"#4DBEE9"}),r().createElement("path",{d:"M21.036 40.178h-5.09a.636.636 0 000 1.272h5.09a.636.636 0 100-1.272z",fill:"#ACACAC"}),r().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM25.914 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM39.91 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM21.248 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM35.245 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM30.58 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM44.577 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272z",fill:"#BDBDBD"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.272-1.273zM25.914 62.658c.702 0 1.272.57 1.272 1.273v5.09a1.272 1.272 0 11-2.545 0v-5.09c0-.703.57-1.273 1.273-1.273zM39.91 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.273-1.273zM21.248 66.477c.702 0 1.272.57 1.272 1.272v1.273a1.273 1.273 0 01-2.545 0v-1.273c0-.703.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),r().createElement("path",{d:"M36.518 65.628a1.272 1.272 0 00-2.545 0v3.393a1.272 1.272 0 102.545 0v-3.393zM31.852 62.234a1.272 1.272 0 10-2.545 0v6.787a1.272 1.272 0 102.545 0v-6.787z",fill:"#4DBEE9"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.577 60.962c.702 0 1.272.57 1.272 1.272v6.787a1.273 1.273 0 01-2.545 0v-6.787c0-.702.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),r().createElement("path",{d:"M18.915 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#9C6CF0"}),r().createElement("path",{opacity:.5,d:"M34.185 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.3,d:"M49.454 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.8,d:"M26.55 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#FB6597"}),r().createElement("path",{d:"M41.82 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.2,d:"M57.09 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.5,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM31.851 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 110-.849zM47.121 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 010-.849zM24.217 19.818h4.665a.424.424 0 010 .849h-4.665a.424.424 0 010-.849zM39.486 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM54.756 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849z",fill:"#ACACAC"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.946 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM15.946 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM15.946 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM23.58 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM23.58 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM23.58 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM49.454 43.571h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 46.116h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 48.661h11.028a.636.636 0 010 1.273H49.454a.636.636 0 110-1.273zM31.215 43.571h15.27a.636.636 0 110 1.273h-15.27a.636.636 0 010-1.273zM31.215 46.116h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM31.215 48.661h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM15.946 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM23.58 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM49.454 51.206h11.028a.636.636 0 010 1.272H49.454a.636.636 0 110-1.272zM31.215 51.206h15.27a.636.636 0 110 1.272h-15.27a.636.636 0 010-1.272z",fill:"#E9E9E9"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 55.872h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 110-1.273z",fill:"#ACACAC"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 59.69h11.029a.636.636 0 010 1.272H49.878a.636.636 0 110-1.273zM49.878 62.234h11.029a.636.636 0 010 1.273H49.878a.636.636 0 010-1.273zM49.878 64.78h11.029a.636.636 0 010 1.272H49.878a.636.636 0 010-1.273z",fill:"#E9E9E9"}),r().createElement("path",{d:"M54.968 67.324h-5.09a.636.636 0 000 1.273h5.09a.636.636 0 000-1.273z",fill:"#E9E9E9"}),r().createElement("g",{filter:"url(#Error_svg__filter0_d)"},r().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#000"})),r().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#F25252"}),r().createElement("path",{opacity:.15,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 34.719c12.34 0 22.344 10.003 22.344 22.343S69.746 79.406 57.406 79.406c-12.34 0-22.343-10.003-22.343-22.344 0-12.34 10.003-22.343 22.343-22.343zm-.172 2.406c-10.916 0-19.765 8.85-19.765 19.766 0 10.916 8.85 19.765 19.765 19.765C68.151 76.656 77 67.806 77 56.891c0-10.917-8.85-19.766-19.766-19.766z",fill:"#F25252"}),r().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 38.844c10.062 0 18.219 8.157 18.219 18.218 0 10.062-8.157 18.22-18.219 18.22-10.062 0-18.218-8.158-18.218-18.22 0-10.061 8.156-18.218 18.218-18.218zm0 2.043c-8.933 0-16.175 7.242-16.175 16.175 0 8.934 7.242 16.176 16.175 16.176 8.934 0 16.176-7.242 16.176-16.175 0-8.934-7.242-16.176-16.176-16.176z",fill:"#F25252"}),r().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 26.469C74.303 26.469 88 40.166 88 57.062c0 16.897-13.697 30.594-30.594 30.594-16.896 0-30.593-13.697-30.593-30.594 0-16.896 13.697-30.593 30.593-30.593zm-.172 3.437c-14.903 0-26.984 12.082-26.984 26.985 0 14.903 12.081 26.984 26.984 26.984 14.903 0 26.985-12.081 26.985-26.984 0-14.903-12.082-26.985-26.985-26.985z",fill:"#F25252"}),r().createElement("path",{d:"M57.406 71.844c8.164 0 14.782-6.618 14.782-14.781 0-8.164-6.618-14.782-14.782-14.782-8.163 0-14.781 6.618-14.781 14.782 0 8.163 6.618 14.78 14.781 14.78z",fill:"#FF6A6A"}),r().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M58.298 46.448L75.18 63.331l-9.114 12.078h-2.029l-7.582-7.582 1.006-3.178.837-18.2z",fill:"url(#Error_svg__paint0_linear)"}),r().createElement("g",{filter:"url(#Error_svg__filter1_d)"},r().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#000"})),r().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#fff"}),r().createElement("g",{filter:"url(#Error_svg__filter2_d)"},r().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#000"})),r().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#fff"})),r().createElement("defs",null,r().createElement("filter",{id:"Error_svg__filter0_d",x:36.219,y:37.875,width:42.375,height:42.375,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),r().createElement("feOffset",{dy:2}),r().createElement("feGaussianBlur",{stdDeviation:2}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),r().createElement("filter",{id:"Error_svg__filter1_d",x:51.688,y:62.625,width:11.438,height:11.438,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),r().createElement("feOffset",{dy:2}),r().createElement("feGaussianBlur",{stdDeviation:2}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),r().createElement("filter",{id:"Error_svg__filter2_d",x:51.688,y:44.063,width:11.438,height:23.813,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),r().createElement("feOffset",{dy:2}),r().createElement("feGaussianBlur",{stdDeviation:2}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),r().createElement("linearGradient",{id:"Error_svg__paint0_linear",x1:68.438,y1:71.571,x2:60.119,y2:58.801,gradientUnits:"userSpaceOnUse"},r().createElement("stop",{stopOpacity:0}),r().createElement("stop",{offset:1}))))},b=e=>{let{variant:t=h.full,LogoRenderer:n=g.SEARCH_RESULTS,text:a,secondaryText:l,buttonTitle:u,onClick:p=i.identity,access:d}=e;const m=f(),b=d&&u;return r().createElement("div",{className:o()(m.root,m[`root_${t}`])},r().createElement(n,{className:m[`${t}`]}),r().createElement("div",{className:m.textBox},r().createElement(c.Z,{variant:"h5",classes:{h5:m.text}},a),l&&r().createElement(c.Z,{variant:"subtitle1",classes:{subtitle1:m.secondaryText}},l)),b&&r().createElement(s.Z,{className:m.button,variant:"contained",color:"primary",onClick:p},u))}},8419:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(2507),c=n.n(i),s=n(17512),u=n(37573),p=n(18527),d=n(40007),m=n(20146),f=n(72342);const h=(0,f.makeStyles)((e=>({image:{width:"40px",height:"40px"},info:{marginLeft:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:400,fontSize:"13px",lineHeight:"15px",color:e.palette.primary.main},secondaryLabel:{marginTop:"4px",fontWeight:400,fontSize:"10px",lineHeight:"12px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},link:{textDecoration:"none"},thirdRow:{display:"flex",overflow:"hidden",alignItems:"center",marginTop:"auto",paddingTop:"4px"},entityId:{display:"flex",overflow:"hidden",alignItems:"baseline",whiteSpace:"nowrap",fontWeight:400,fontSize:"12px",lineHeight:"16px"},entityIdLabel:{color:e.palette.text.secondary},entityIdValue:{marginLeft:"8px",color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis","&[aria-describedby]":{cursor:"pointer","&:hover":{textDecoration:"underline"}}}}))),g=e=>{let{entity:t,classes:n={}}=e;const l=h(),{secondaryLabel:i,label:f}=n,g=(0,s.idV)(t.label),{secondaryLabel:b}=t,y=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,s.BTI)(t))}),[t]);return r().createElement(r().Fragment,null,r().createElement(u.Z,{entity:t,imageClassName:l.image}),r().createElement("div",{className:l.info},r().createElement(p.Z,{value:(0,s.wwR)(t),className:l.link},r().createElement(d.Z,{value:g,placement:"top",showOnExceededHeight:!0},r().createElement("div",{className:o()(l.label,f)},g))),b&&r().createElement(d.Z,{value:b,placement:"top",showOnExceededHeight:!0},r().createElement("div",{className:o()(l.secondaryLabel,i)},b)),r().createElement("div",{className:l.thirdRow},r().createElement(m.Z,{entity:t,size:"medium"}),r().createElement("div",{className:l.entityId,onClick:y},r().createElement("div",{className:l.entityIdLabel},c().text("ID:")),r().createElement(d.Z,{value:`Copy to clipboard ${(0,s.BTI)(t)}`,placement:"top"},r().createElement("div",{className:l.entityIdValue},(0,s.BTI)(t)))))))},b=(0,f.makeStyles)({"@keyframes keyframes-wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},wave:{overflow:"hidden",position:"relative","&:after":{top:"0",left:"0",right:"0",bottom:"0",content:'""',position:"absolute",animation:"$keyframes-wave 1.6s linear 0.5s infinite",transform:"translateX(-100%)",background:"linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);"}},avatar:{flex:"none",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.11)"},info:{marginLeft:"12px",flex:"auto"},label:{width:"40%",height:"15px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},secondaryLabel:{marginTop:"4px",width:"100%",height:"12px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},thirdRow:{marginTop:"4px",width:"60%",height:"24px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"}}),y=()=>{const e=b();return r().createElement(r().Fragment,null,r().createElement("div",{className:o()(e.avatar,e.wave)}),r().createElement("div",{className:e.info},r().createElement("div",{className:o()(e.label,e.wave)}),r().createElement("div",{className:o()(e.secondaryLabel,e.wave)}),r().createElement("div",{className:o()(e.thirdRow,e.wave)})))},v=(0,f.makeStyles)({container:{display:"flex",padding:"16px",overflow:"hidden"}});function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},E.apply(this,arguments)}const x=(0,a.memo)((e=>{let{entity:t,classes:n={},variant:a="normal"}=e,l=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["entity","classes","variant"]);const i=v(),{container:c}=n;return r().createElement("div",E({className:o()(i.container,c)},l),"normal"===a?r().createElement(g,{entity:t,classes:n}):r().createElement(y,null))}))},3466:(e,t,n)=>{n.d(t,{n:()=>p});var a=n(24328),r=n.n(a),l=n(11802),o=n(28101),i=n(14201),c=n(50914);const s=(0,n(72342).makeStyles)((()=>({resizablePanesWrapper:{flexGrow:1,height:"100%",marginRight:"1px"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}))),u=480,p=e=>{let{perspectiveId:t,children:n,buttonsProps:p,disabled:d,defaultTab:m}=e;const f=s(),{perspectiveSettings:h,updatePerspectiveSettings:g}=(0,i._)(t),{width:b=u}=h||{},y=m||(null==h?void 0:h.active),v=!(0,c.isNil)(y)&&!d,E=(0,a.useCallback)((e=>{g(e)}),[g]),x=(0,a.useCallback)((e=>{E({active:y===e?null:e})}),[y,E]),w=(0,a.useCallback)((()=>{E({active:null})}),[E]),O=(0,a.useCallback)((e=>{let{size:t}=e;E({width:t})}),[E]);return r().createElement(r().Fragment,null,r().createElement(l.u,{className:f.resizablePanesWrapper,primary:"second",orientation:"vertical",size:v?b:0,minSize:320,maxSize:640,allowResize:v,onChange:O,debounceInterval:2500},r().createElement("div",{className:f.pane},n[0]),r().createElement("div",{className:f.pane},(0,a.cloneElement)(n[1],{active:y,onClose:w}))),r().createElement(o.G,{disabled:d,buttonsProps:p,onButtonClick:x,activeIndexId:y}))};p.displayName="ProfileResizablePanes"},79145:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(71153),c=n.n(i),s=n(2507),u=n.n(s),p=n(72342);const d="46px",m=(0,p.makeStyles)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:d},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:d}})));var f=n(7342);const h=e=>{let{className:t,rowData:n}=e;const a=m();return r().createElement("div",{className:c()(a.readOnlyLogicOperatorContainer,t)},n&&n.operator?(0,f.Z)(n.operator):u().text("Where"))};h.propTypes={className:o().string,rowData:o().object};const g=h;var b=n(17512);const y=e=>{let{className:t,rowData:n}=e;const a=m();return r().createElement("div",{className:c()(a.readOnlyFilter,t)},n&&n.filter?(0,b.XS2)(n.filter):u().text("equals"))};var v=n(53862);const E=(0,p.makeStyles)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));const x=e=>{let{classes:t={},rowData:n,previousRowData:a,LogicOperatorComponent:l=g,AttributeSelectorComponent:o,FilterSelectorComponent:i=y,ValuesEditorComponent:s,ActionsComponent:u,filterSelectorRef:p,attributeSelectorProps:d={}}=e,m=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const f=E();return r().createElement("div",{className:c()(f.row,t.root),"data-reltio-id":"query-builder-row"},r().createElement(l,{className:t.logicOperatorContainer,rowContext:m,rowData:a}),r().createElement("div",{className:c()(f.rowItem,t.attributeSelectorContainer)},r().createElement(o,{attributeSelectorProps:d,rowContext:m,rowData:n})),r().createElement("div",{className:c()(f.rowItem,t.filterSelectorContainer)},r().createElement(i,{textFieldInputRef:p,rowContext:m,rowData:n})),r().createElement("div",{className:c()(f.rowItem,f.fullWidth,t.valuesEditorContainer)},r().createElement(s,{rowContext:m,rowData:n})),r().createElement("div",{className:c()(f.rowItem,t.actionsContainer,{[f.hidden]:!n})},r().createElement(u,{rowContext:m,rowData:n})))};x.propTypes={classes:o().shape({root:o().string,logicOperatorContainer:o().string,attributeSelectorContainer:o().string,filterSelectorContainer:o().string,valuesEditorContainer:o().string,actionsContainer:o().string}),rowData:v.Xw,previousRowData:v.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 w=(0,a.memo)(x)},51586:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(50914),c=n(79145),s=n(53862);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:n,rowsData:a,lastRowAttributeSelectorProps:l,filterSelectorRef:o,filterSelectorRefIndex:s}=e,p=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const d=(e,t,a)=>{const d=t>0?(0,i.path)([t-1],a):null,m=t===a.length?{attributeSelectorProps:l}:{};return r().createElement(c.Z,u({key:e&&e.id,rowData:e,previousRowData:d,classes:n,filterSelectorRef:t===s?o:void 0},p,m))};return r().createElement("div",{className:t},a.map(d),d(null,a.length,a))};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(s.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 d=(0,a.memo)(p)},15793:(e,t,n)=>{n.d(t,{Z:()=>M});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(50914),c=n(70347);const s=(0,n(4515).Z)(c.ZP);var u=n(49861),p=n(12350),d=n(95341),m=n(80852),f=n(71153),h=n.n(f),g=n(40007);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}function y(e){const{innerProps:t,innerRef:n,children:a,isFocused:l,isSelected:o,selectProps:{classes:i},label:c}=e;return r().createElement(d.Z,b({className:h()(i.option,{[i["option--selected"]]:o}),ref:n,selected:l,component:"div"},t),r().createElement(m.Z,{color:"primary",checked:o}),r().createElement(g.Z,{value:c},r().createElement("div",{className:i["option--item"]},a)))}y.propTypes={children:o().node,innerProps:o().shape({id:o().string.isRequired,key:o().string,onClick:o().func.isRequired,onMouseMove:o().func.isRequired,onMouseOver:o().func.isRequired,tabIndex:o().number.isRequired}).isRequired,innerRef:o().oneOfType([o().oneOf([null]),o().func,o().shape({current:o().any.isRequired})]),isFocused:o().bool.isRequired,isSelected:o().bool.isRequired,label:o().string,selectProps:o().shape({classes:o().shape({option:o().string})})};const v={Option:y};var E=n(72342),x=n(79573);function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},w.apply(this,arguments)}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 S=(0,E.makeStyles)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let R=0;function k(e){const{label:t,creatable:n,getOptions:l,loadingIndicator:o,components:c,classes:d,styles:m,onChange:f,onInputChange:h,menuPlacement:g="auto"}=e,b=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),y=n?s:l?p.Z:u.Z,[E,C]=(0,a.useState)(""),k=S((0,i.omit)(["classes"],e)),M="custom-select-"+R++,P=O({},v,c),j=(0,x.ze)(k,d),T=O({indicatorSeparator:e=>O({},e,{margin:"10px 0"}),loadingIndicator:e=>O({},e,{display:o?e.display:"none"}),loadingMessage:e=>O({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},m),I=t?{inputId:M,TextFieldProps:O({label:t,InputLabelProps:{htmlFor:M,shrink:!(!e.value||!e.value.length)||void 0,className:j.label}},e.TextFieldProps)}:{};return r().createElement(y,w({isMulti:!0,inputId:M,inputValue:E,onChange:function(e,t){f(e,t),"create-option"===t.action&&(C(""),h("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;h(e,{action:n}),"set-value"!==n&&C(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:j,components:P,styles:T,menuPlacement:g,loadOptions:l},I,b))}k.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},k.propTypes={creatable:o().bool,cacheOptions:o().bool,defaultOptions:o().bool,value:o().arrayOf(o().shape({label:o().string.isRequired,value:o().any})),options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().any})),onChange:o().func,onInputChange:o().func,placeholder:o().string,label:o().string,loadingIndicator:o().bool,components:o().shape({ClearIndicator:o().func,Control:o().func,DropdownIndicator:o().func,DownChevron:o().func,CrossIcon:o().func,Group:o().func,GroupHeading:o().func,IndicatorsContainer:o().func,IndicatorSeparator:o().func,Input:o().func,LoadingIndicator:o().func,Menu:o().func,MenuList:o().func,MenuPortal:o().func,LoadingMessage:o().func,NoOptionsMessage:o().func,MultiValue:o().func,MultiValueContainer:o().func,MultiValueLabel:o().func,MultiValueRemove:o().func,Option:o().func,Placeholder:o().func,SelectContainer:o().func,SingleValue:o().func,ValueContainer:o().func}),classes:o().shape({control:o().string,valueContainer:o().string,multiValue:o().string,noOptionsMessage:o().string,singleValue:o().string,placeholder:o().string,menu:o().string,clearIndicator:o().string,dropdownIndicator:o().string,option:o().string,"option--selected":o().string,label:o().string}),styles:o().shape({clearIndicator:o().func,container:o().func,control:o().func,dropdownIndicator:o().func,group:o().func,groupHeading:o().func,indicatorsContainer:o().func,indicatorSeparator:o().func,input:o().func,loadingIndicator:o().func,loadingMessage:o().func,menu:o().func,menuList:o().func,menuPortal:o().func,multiValue:o().func,multiValueLabel:o().func,multiValueRemove:o().func,noOptionsMessage:o().func,option:o().func,placeholder:o().func,singleValue:o().func,valueContainer:o().func}),TextFieldProps:o().object,getOptions:o().func,menuPlacement:o().string,menuPortalTarget:o().object,menuShouldBlockScroll:o().bool,captureMenuScroll:o().bool,getOptionValue:o().func,isSearchable:o().bool,inputRef:o().shape({current:o().object})};const M=k},67275:(e,t,n)=>{n.d(t,{n:()=>g});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(17512),c=n(79386),s=n(60883),u=n(72316),p=n(1824),d=n(62901),m=n(36852),f=n(75647);const h=(0,n(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),g=(0,a.memo)((e=>{let{entity:t,className:n,historySlice:l}=e;const g=h(),b=(0,a.useMemo)((()=>(0,i.L5S)(t)),[t]),y=(0,m.C)({objectIds:b}),v=(0,i.wwR)(t);return r().createElement(p.e,{collaboration:y},r().createElement(c.Z,{className:o()(n,d.U),entity:(null==l?void 0:l.aEntity)||t},l?r().createElement(f.Z,null):r().createElement(r().Fragment,null,r().createElement(s.a,{className:g.profileBandNavigation}),r().createElement(u.Z,{className:g.comments,uri:v,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:v}),objectType:i.q7e.ENTITY}))))}));g.displayName="ScreenProfileBand"},28101:(e,t,n)=>{n.d(t,{G:()=>d});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(39475),c=n(47591);const s=(0,n(72342).makeStyles)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,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)"},active:{backgroundColor:(0,c.Fq)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const d=e=>{let{disabled:t,buttonsProps:n,activeIndexId:a,className:l,onButtonClick:c,classes:d={}}=e;const m=s(),{active:f,buttonWrapper:h}=d,g=p(d,["active","buttonWrapper"]);return r().createElement("div",{className:o()(m.container,l)},n.map((e=>{let{id:n}=e,l=p(e,["id"]);return r().createElement(i.k,u({},l,{disabled:t,classes:g,size:"S",key:n,className:o()({[o()(m.active,f)]:a===n},m.buttonWrapper,h),onClick:()=>c(n),"data-reltio-id":`reltio-profile-right-side-button-${n}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>o});var a=n(24328),r=n.n(a);const l=(0,n(72342).makeStyles)((e=>({contentWrapper:{display:"flex",boxSizing:"border-box",flex:1,flexDirection:"column",backgroundColor:e.palette.background.paper,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)",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),o=e=>{let{width:t,open:n,children:a}=e;const o=l();return r().createElement("div",{className:o.contentWrapper,"data-reltio-id":"side-panel",style:{width:t?`${n?t:0}px`:"100%"}},n&&r().createElement(r().Fragment,null,a))}},65629:(e,t,n)=>{n.d(t,{Z:()=>S});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(2507),c=n.n(i),s=n(50914),u=n(71153),p=n.n(u),d=n(95341),m=n(79312);const f=(0,n(72342).makeStyles)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var h=n(96379),g=n(40007);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}const y=e=>{let{innerRef:t,innerProps:n,selectOption:a,data:l}=e;const o=f(),{value:i,label:c,startObject:s,endObject:u}=l,y=s.objectType.label+" ↔ "+u.objectType.label;return r().createElement(d.Z,b({className:o.container,ref:t,key:i,onClick:()=>a({label:c,value:i,startObject:s,endObject:u})},n),r().createElement("div",{className:o.icons},r().createElement(h.Z,{className:o.iconTop,entityType:s.objectType}),r().createElement(h.Z,{className:o.iconBottom,entityType:u.objectType})),r().createElement("div",{className:o.text},r().createElement(g.Z,{value:c},r().createElement(m.Z,{className:p()(o.textItem,o.primaryTextItem)},c)),r().createElement(g.Z,{value:y},r().createElement(m.Z,{color:"textSecondary",className:p()(o.textItem,o.secondaryTextItem)},y))))};y.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({value:o().string.isRequired,label:o().string.isRequired,startObject:o().object,endObject:o().object})};const v=y;var E=n(84425);function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},x.apply(this,arguments)}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 O=e=>{let{value:t={},options:n=[],onChange:l=s.identity,TextFieldProps:o}=e,i=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["value","options","onChange","TextFieldProps"]);const u=(0,a.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){w(e,t,n[t])}))}return e}({},(0,s.defaultTo)({},o),{"data-reltio-id":"relation-type-selector"})),[o]);return r().createElement(E.Z,x({value:t,options:n,onChange:l,label:c().text("Select relationship type "),components:{Option:v},TextFieldProps:u},i))},C=o().shape({label:o().string.isRequired,value:o().string.isRequired,startObject:o().object,endObject:o().object});O.propTypes={value:C,options:o().arrayOf(C),onChange:o().func};const S=O},45226:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(17512),r=n(24328),l=n.n(r),o=n(11013),i=n(61347);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const d=e=>{let{values:t,valueContainerClassName:n}=e,a=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:n},l().createElement(o.Z,u({attributeValue:e},a))))))},m=(0,r.memo)((e=>{let{expanded:t,LabelRenderer:n,RightSlot:r}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:s,values:u,valueContainerClassName:m}=o;switch(s.type){case a.oS0.TYPE_NESTED:case a.oS0.TYPE_REFERENCE:return d(c({expanded:t,LabelRenderer:n,RightSlot:r},o));case a.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:s,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(c({},o))}}))},14201:(e,t,n)=>{n.d(t,{n:()=>r,_:()=>l});var a=n(24328);const r=n.n(a)().createContext({settings:{},onChange:()=>{}});r.displayName="PerspectivesSettingsContext";const l=e=>{const{settings:t,onChange:n}=(0,a.useContext)(r)||{},l=null==t?void 0:t[e];return{updatePerspectiveSettings:(0,a.useCallback)((t=>{n(e,t)}),[e,n]),perspectiveSettings:l}}},64651:(e,t,n)=>{n.d(t,{n:()=>o});var a=n(24328),r=n(17512),l=n(50914);const o=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,a.useCallback)(((e,n)=>{const a={},o=(0,l.pipe)(r.PjQ,(0,l.tap)((e=>a[e]=(0,l.propOr)(0,e,a)+1))),i=(0,l.ascend)((0,l.prop)("label")),c=(0,l.curry)(((e,n)=>{let{uri:a,label:l,startObject:i,endObject:c}=n;const s=e===(t?r.Nsj.OUT:r.Nsj.IN)?i:c;return{label:{directionalLabel:o(s),typeLabel:l},value:`${a},${e}`,startObject:i,endObject:c}}));return e.map(c(r.Nsj.IN)).concat(n.map(c(r.Nsj.OUT))).map((0,l.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?a[t]>1?`${t} (${n})`:t:n}})).sort(i)}),[t]),fromEditorValue:(0,a.useCallback)(((e,t)=>n=>{const[a,o]=n.value.split(",");return{type:(o===r.Nsj.IN?e:t).find((0,l.propEq)("uri",a)),direction:o}}),[]),toEditorValue:(0,a.useCallback)(((e,t)=>t.find((0,l.propEq)("value",`${e.relationType},${e.direction}`))),[])}}},18408:(e,t,n)=>{n.d(t,{D:()=>m});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(50914),c=n(83820),s=n(38677),u=n(10050),p=n(79573);const d=3e5,m=function(){let{anchorOrigin:e={vertical:"bottom",horizontal:"center"},showDismiss:t,dismissTitle:n=o().text("Dismiss"),autoHideDuration:l=d,onDismissClick:m=p.ZT}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[f,h]=(0,a.useState)(!1),[g,b]=(0,a.useState)(""),y=(0,a.useCallback)((()=>{h(!1),b("")}),[]),v=(0,a.useCallback)(((e,t)=>{"clickaway"!==t&&y()}),[y]),E=(0,a.useCallback)((e=>{h(!0),b(e)}),[]),x=(0,a.useCallback)((()=>r().createElement(c.Z,{container:document.body},r().createElement(u.Z,{open:f,anchorOrigin:e,autoHideDuration:l,onClose:v,message:g,style:{maxWidth:500},action:t?r().createElement(s.Z,{color:"primary",onClick:(0,i.pipe)(y,m)},n):void 0}))),[f,y,g]);return{SnackbarRenderer:x,showSnackbarMessage:E}}},96850:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ll});var a=n(9366),r=n(24328),l=n.n(r),o=n(44443),i=n(54426),c=n(40855),s=n(41633),u=n(52730),p=n(50914),d=n(17512),m=n(50673),f=n(18408),h=n(28220),g=n(43751),b=n(3466),y=n(67275),v=n(11821);let E,x;!function(e){e[e.PotentialMatches=0]="PotentialMatches",e[e.FindMatches=1]="FindMatches",e[e.NotAMatch=2]="NotAMatch"}(E||(E={})),function(e){e.TABLE="TABLE",e.COLUMNS="COLUMNS"}(x||(x={}));var w=n(55962),O=n(33945),C=n(87378);const S=(0,r.createContext)({reloadData:()=>{},addReloadHandler:()=>{},removeReloadHandler:()=>{}}),R=e=>{let{children:t}=e;const n=(0,r.useMemo)((()=>(()=>{const e=[];return{reloadData:()=>{e.forEach((e=>e()))},addReloadHandler:t=>{e.push(t)},removeReloadHandler:t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}})()),[]);return l().createElement(S.Provider,{value:n},t)},k=()=>{const e=(0,r.useContext)(S);if(void 0===e)throw new Error("useReloadData must be used within a ReloadDataProvider");return e};var M=n(19701);function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){j(e,t,n[t])}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=n(17569),I=n(75975),N=n(79573);function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 A="RESET",z="SET_OPTIONS",Z=B({},I.ZP.actions,{reset:(0,N.zD)(A),setOptions:(0,N.zD)(z)}),_=(e,t)=>{switch(t.type){case A:return B({},t.payload);case z:return B({},e,{options:t.payload});default:return I.ZP.reducer(e,t)}};function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 L=(0,r.createContext)(null),V=(0,r.createContext)(null),W="SET_GLOBAL_SPINNER",U="SET_SELECTED_ITEMS",G="DESELECT_BY_ENTITIES",q="TOGGLE_SELECT",$="ACTUALIZE_SELECTED_ITEMS_COLORS",X="SET_LIMIT_SELECTION",Y="SET_COMPARISON_VIEW_MODE",K="SET_ENTITIES_MAP",Q="DELETE_EXTRA_MATCHES",J={setGlobalSpinner:(0,N.zD)(W),setSelectedItems:(0,N.zD)(U),deselectByEntities:(0,N.zD)(G),toggleSelect:(0,N.zD)(q),actualizeSelectedItemsColors:(0,N.zD)($),setLimitSelection:(0,N.zD)(X),setComparisonViewMode:(0,N.zD)(Y),setEntitiesMap:(0,N.zD)(K),deleteExtraMatches:(0,N.zD)(Q)},ee=(e,t)=>{switch(t.type){case W:return F({},e,{isGlobalSpinnerActive:t.payload});case Q:return F({},e,{selectedItems:e.selectedItems.slice(0,e.limitSelection)});case U:return F({},e,{selectedItems:t.payload.slice(0,e.limitSelection)});case G:return(0,p.evolve)({selectedItems:e=>e.filter((e=>{let{object:n}=e;return!t.payload.some((e=>{let{uri:t}=e;return t===n.uri}))}))},e);case q:return(0,p.evolve)({selectedItems:e=>{const n=t.payload,a=e.findIndex((e=>{var t,a;return(null==e||null===(t=e.object)||void 0===t?void 0:t.uri)===(null==n||null===(a=n.object)||void 0===a?void 0:a.uri)}));return a>-1?(0,p.remove)(a,1,e):(0,p.append)(n,e)}},e);case $:return(0,p.evolve)({entityColors:t=>{const n=e.selectedItems.map(d.ev7),a=n.filter((e=>!t.find((0,p.propEq)("entityUri",e))));return t.map((e=>(0,p.includes)(e.entityUri,n)?e:F({},e,{entityUri:a.shift()})))}},e);case X:return F({},e,{limitSelection:t.payload});case Y:{const n=t.payload;return F({},e,{comparisonViewMode:n,limitSelection:n===x.COLUMNS?4:void 0})}case K:{const n=t.payload;return F({},e,{entitiesMap:n})}}},te=e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(ee,{isGlobalSpinnerActive:!1,selectedItems:[],comparisonViewMode:x.COLUMNS,limitSelection:4,entitiesMap:{},entityColors:(0,d.gFw)().map((e=>({entityUri:"",color:e})))}),o=(0,T.o)({actions:J,dispatch:a});return l().createElement(L.Provider,{value:n},l().createElement(V.Provider,{value:o},t))},ne=()=>{const e=(0,r.useContext)(L);if(void 0===e)throw new Error("useViewState must be used within a ViewStateProvider");return e},ae=()=>{const e=(0,r.useContext)(V);if(void 0===e)throw new Error("useViewStateActions must be used within a ViewStateProvider");return e};var re=n(2507),le=n.n(re);const oe=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const r=ie(e,t,n,a),l=(t.children||[]).map((n=>oe(e,n,"",a.concat({name:t.name,label:t.label}))));return l.length&&(r.children=l,r.notSelectable=!0),r},ie=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const r=(0,p.omit)(["children"],t),l=r.label||r.name;return{title:l,fieldName:n||(0,d.Tde)(r.uri,a)}},ce=(e,t)=>t?(0,d.k66)(e,t).map((t=>oe(e,t))):[],se=(0,p.pipe)((0,p.map)((e=>({id:(0,d.Tde)(e.uri),label:(0,d.idV)(e.label),dataTypeDefinition:(0,d.PFL)(e)})))),ue=(0,p.pipe)(d.Fof,se),pe=(0,p.curry)(((e,t)=>e.map((e=>(0,d.Tde)(e))).some((e=>t.id===e||me(t)&&fe(t,e))))),de=e=>(0,d.QZu)(e.dataTypeDefinition),me=e=>(0,d.YkG)(e.dataTypeDefinition),fe=(0,p.curry)(((e,t)=>t.startsWith(`${e.id}.`))),he=(0,p.curry)(((e,t)=>de(t)&&e.some((e=>{let{id:n}=e;return fe(t,n)})))),ge=e=>(0,p.either)((0,p.includes)(p.__,e),he(e)),be=(e,t)=>(0,p.pipe)((0,p.reject)(de),(0,p.filter)(pe(e)))(t),ye=[20,50,100],ve=[{id:"label",get label(){return le().text("Profile name")}},{id:"matchRules",get label(){return le().text("Match rule")}},{id:"mlMatchRules",get label(){return le().text("Match IQ")},dataTypeDefinition:{type:d.oS0.TYPE_SELECT}},{id:"id",get label(){return le().text("Entity ID")}}],Ee=[{id:"score",get label(){return le().text("Match score")}},{id:"relevanceScores.relevance",get label(){return le().text("Relevance score")}},{id:"relevanceScores.actionLabel",get label(){return le().text("Match action")}}],xe=[{id:"label",get label(){return le().text("Profile name")}},{id:"id",get label(){return le().text("Entity ID")}}],we=(0,p.pluck)("id"),Oe=e=>(0,p.flatten)(e.map((0,p.prop)("values"))).join(","),Ce=e=>{let{fieldName:t}=e;return(0,p.pipe)(p.values,(0,p.pluck)("name"),(0,p.any)((0,p.equals)(t)))(d.S91)};function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Re(e,t,n[t])}))}return e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ye[0];const t={page:0,rowsPerPage:e,selectedItems:[],limitSelection:null},[n,a]=(0,r.useReducer)(_,t),l=(0,T.o)({actions:Z,dispatch:a}),o=ae(),i=ne();return[Se({},l,o),Se({},n,i),a]};var Me=n(25601),Pe=n(84236),je=n(97333);const Te=e=>{console.error(e),je.Z.addError({title:le().text("Error"),message:le().text("Can't add relationship")})},Ie=e=>{console.error(e),je.Z.addError({title:le().text("Error"),message:(0,d.xU7)(e,le().text("Something went wrong..."))})},Ne=e=>{const t=e.error;(null==t?void 0:t.errorCode)!==d.Xt7.DCR_ALREADY_EXISTS&&Ie(t)},Be=()=>{const{setGlobalSpinner:e}=ae(),{isGlobalSpinnerActive:t}=ne(),{reloadData:n}=k();return{onStartRequest:(0,r.useCallback)((()=>{e(!0)}),[e]),onFinishRequest:(0,r.useCallback)((()=>{e(!1),n()}),[n,e]),isGlobalSpinnerActive:t}};function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},De.apply(this,arguments)}const Ae=(0,r.forwardRef)(((e,t)=>{let{className:n,entities:a,entity:r,mode:o=Me.N.iconButton,size:i,onMenuClose:c=N.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:u,onStartRequest:p}=Be(),{deselectByEntities:d}=ae();return l().createElement(Pe.H,De({className:n,disabled:s,entities:a,entity:r,mode:o},i?{size:i}:{},{onMenuClose:c,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{d(a)},onError:Ie,"data-reltio-id":"reltio-potential-matches-merge-button",ref:t}))}));Ae.displayName="mergeButton";var ze=n(48376);function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ze.apply(this,arguments)}const _e=(0,r.forwardRef)(((e,t)=>{let{className:n,entities:a,entity:r,mode:o=Me.N.iconButton,size:i,onMenuClose:c=N.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:u,onStartRequest:p}=Be(),{deselectByEntities:d}=ae();return l().createElement(ze.i,Ze({className:n,disabled:s,entities:a,entity:r,mode:o},i?{size:i}:{},{onMenuClose:c,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{d(a)},onError:Ie,"data-reltio-id":"reltio-potential-matches-not-match-button",ref:t}))}));function Fe(){return Fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Fe.apply(this,arguments)}_e.displayName="NotMatchButton";const He=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",Fe({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{d:"M9 4c4.42 0 8 3.58 8 8s-3.58 8-8 8a8 8 0 01-7.419-5h2.224A6.002 6.002 0 009 18c3.31 0 6-2.69 6-6s-2.69-6-6-6a6.002 6.002 0 00-5.196 3H1.581A8 8 0 019 4zm8 .26c3.45.89 6 4.01 6 7.74 0 3.73-2.55 6.85-6 7.74v-2.09a5.99 5.99 0 000-11.3V4.26zM8 7.5l4.5 4.5L8 16.5V13H0v-2h8V7.5z",fillOpacity:".541"}))},Le=(0,r.forwardRef)(((e,t)=>{let{entity:n,entities:a,className:o,mode:i=Me.N.iconButton,onMenuClose:c=N.ZT}=e;const{deselectByEntities:s}=ae(),[u,p]=(e=>{let{entities:t,entity:n,onSuccess:a}=e;const{setGlobalSpinner:l}=ae(),{isGlobalSpinnerActive:o}=ne(),{reloadData:i}=k();return[o,(0,r.useCallback)((()=>{l(!0),(0,d.ck9)(n.uri,t).then((()=>{null==a||a()})).catch(Ie).finally((()=>{l(!1),i()}))}),[t,n,l,i,a])]})({entity:n,entities:a,onSuccess:()=>{s(a)}});return l().createElement(Me.K,{className:o,disabled:u,mode:i,label:le().text("Save on potential matches"),icon:He,onClick:p,onMenuClose:c,ref:t})}));function Ve(){return Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ve.apply(this,arguments)}Le.displayName="SetAMatchButton";const We=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",Ve({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),l().createElement("defs",null,l().createElement("path",{d:"M10 6v2H4v12.22h12V14h2v6c0 1.05-.82 1.918-1.851 1.994L16 22H4c-1.05 0-1.918-.82-1.994-1.851L2 20V8c0-1.05.82-1.918 1.851-1.994L4 6h6zm4 10v2H6v-2h8zm-3.997-3l-.001 2H6v-2h4.003zM21 2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-7l-2 2 .005-11c0-.55.445-1 .995-1h8zm-10.996 8l-.001 2H6v-2h4.004zm9.286-6.3l-3.17 3.17-1.41-1.42-1.41 1.41 2.82 2.84 4.59-4.58-1.42-1.42z",id:"svg3192636834a"})),l().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l().createElement("mask",{id:"svg3192636834b",fill:"#fff"},l().createElement("use",{xlinkHref:"#svg3192636834a"})),l().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg3192636834b)",d:"M0 0h24v24H0z"})))},Ue=(0,r.forwardRef)(((e,t)=>{let{className:n,entities:a,entity:o,mode:i=Me.N.iconButton,onMenuClose:c=N.ZT}=e;const s=(0,r.useContext)(g.S),[f,h]=(e=>{let{entities:t,entity:n,showSnackbarMessage:a}=e;const{selectors:l}=m.ZP,{setGlobalSpinner:o}=ae(),{isGlobalSpinnerActive:i}=ne(),c=(0,u.useSelector)(l.getWorkflowPath),s=(0,u.useSelector)(l.getWorkflowEnvironmentUrl),f=(0,u.useSelector)(l.getTenant),h=(0,p.prop)("uri"),g=(0,p.pipe)(p.concat,(0,p.map)(h))([n],t);return[i,(0,r.useCallback)((()=>{o(!0),(0,d.t6d)({workflowPath:c,processType:"potentialMatchReview",objectURIs:g,tenant:f,environment:s}).then((()=>{null==a||a(le().text("Potential match request: Done"))})).catch(Ne).finally((()=>{o(!1)}))}),[o,c,g,f,s,a])]})({entity:o,entities:a,showSnackbarMessage:s}),b=(0,u.useSelector)(m.ZP.selectors.getCanUserStartProcessFromQuery),y=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath);return b&&!(0,d.O27)(y)?l().createElement(Me.K,{className:n,disabled:f,mode:i,label:f?"":le().text("Potential match request"),icon:We,onClick:h,onMenuClose:c,"data-reltio-id":"reltio-potential-matches-dcr-review-button",ref:t}):null}));Ue.displayName="DCRReviewButton";const Ge=(0,r.forwardRef)(((e,t)=>{let{entity:n,entities:a,className:o,mode:i=Me.N.iconButton,onMenuClose:c=N.ZT}=e;const s=(0,r.useContext)(g.S),{deselectByEntities:p}=ae(),[f,h]=(e=>{let{entities:t,entity:n,showSnackbarMessage:a,onSuccess:l}=e;const{setGlobalSpinner:o}=ae(),{isGlobalSpinnerActive:i}=ne(),{reloadData:c}=k(),s=(0,u.useSelector)(m.ZP.selectors.getDtssPath),p=(0,u.useSelector)(m.ZP.selectors.getTenant);return[i,(0,r.useCallback)((()=>{o(!0);const e={dtssPath:s,customerTenant:p,entity:n,entities:t};((0,d.biM)(n)?(0,d.XkY)(e):(0,d.uQS)(e)).then((()=>{null==a||a(le().text("Save as potential match: Done")),null==l||l()})).catch(Ie).finally((()=>{o(!1),c()}))}),[o,s,p,n,t,a,c,l])]})({entity:n,entities:a,showSnackbarMessage:s,onSuccess:()=>{p(a)}});return l().createElement(Me.K,{className:o,disabled:f,mode:i,label:le().text("Save as potential match"),icon:He,onClick:h,onMenuClose:c,ref:t})}));function qe(){return qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},qe.apply(this,arguments)}Ge.displayName="ReinstateMatchButton";const $e=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",qe({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),l().createElement("defs",null,l().createElement("path",{d:"M19 14v3h3v2h-3v3h-2v-3h-3v-2l3-.001V14h2zM17 2a3 3 0 11-1.293 5.708l-4.535 4.535a5 5 0 11-1.414-1.414l4.534-4.536A3 3 0 0117 2zM7 12a3 3 0 100 6 3 3 0 000-6zm10-8a1 1 0 100 2 1 1 0 000-2z",id:"svg2192258504a"})),l().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l().createElement("mask",{id:"svg2192258504b",fill:"#fff"},l().createElement("use",{xlinkHref:"#svg2192258504a"})),l().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2192258504b)",d:"M0 0h24v24H0z"})))},Xe=(0,r.forwardRef)(((e,t)=>{let{className:n,mainEntity:a,currentEntity:r,matchRules:o,mode:i=Me.N.iconButton,onClick:c=N.ZT,permission:s,onMenuClose:u=N.ZT}=e;return l().createElement(Me.K,{className:n,mode:i,label:le().text("Add relationship"),icon:$e,onClick:()=>c({mainEntity:a,currentEntity:r,matchRules:o,permission:s}),onMenuClose:u,ref:t})}));Xe.displayName="CreateRelationButton";var Ye=n(80852),Ke=n(98273);const Qe=l().createContext({onClose:()=>{}});var Je=n(12933),et=n(72342);const tt=(0,et.makeStyles)((()=>({attributeSelect:{width:"100%",height:"40px"}}))),nt=(0,r.memo)((e=>{let{onChange:t,options:n,field:a}=e;const o=tt(),i=(0,r.useMemo)((()=>{const e=null==a?void 0:a.split("."),t=null==e?void 0:e.length,r=n=>{const l=n[0].fieldName.split(".").length;if(l===t||1===l&&a.includes("relevanceScores."))return n.find((e=>e.fieldName===a));if(l<t){var o;const t=e.slice(0,l).join("."),a=null===(o=n.find((e=>e.fieldName===t)))||void 0===o?void 0:o.children;if(a)return r(a)}};for(const e of n){const t=r(e.attributes);if(t)return t}}),[a,n]),c=(0,r.useCallback)((e=>{t(e.attribute.fieldName)}),[t]);return l().createElement(Je.Z,{hideCheckBox:!0,className:o.attributeSelect,value:i,itemsGroups:n,onSelect:c,ungroup:!0,single:!0})}));var at=n(74654),rt=n(71153),lt=n.n(rt),ot=n(87037);const it=(0,et.makeStyles)((()=>({rowCheckbox:{marginRight:"20px",position:"relative",padding:"12px",alignSelf:"baseline"},header:{padding:"8px 12px 8px 0",border:"rgba(0,0,0,0.05) 1px solid",borderTop:0,display:"flex",justifyContent:"space-between"},selector:{width:"160px"},sorting:{display:"flex"},arrow:{transition:"transform 0.3s ease-in"},rotate:{transform:"rotate(180deg)"}})));function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ct.apply(this,arguments)}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ut(e,t,n[t])}))}return e}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pt=e=>{let{selectedCount:t,totalCount:n,onSelect:a,sortOptions:o,sorting:i,onSorting:c,totalOnPage:s,children:u}=e;const p=it(),m=(0,r.useContext)(Qe);return l().createElement(l().Fragment,null,l().createElement(Ke.P,ct({},m,{secondTitle:!!n&&le().text("${n} Profiles",{n})})),u,!!s&&l().createElement("div",{className:p.header},l().createElement(Ye.Z,{className:p.rowCheckbox,checked:t===s,indeterminate:t>0&&t<s,onChange:a}),l().createElement("div",{className:p.sorting},l().createElement(nt,{field:null==i?void 0:i.field,options:o,onChange:e=>{c(st({},i,{field:e}))}}),l().createElement(ot.Z,{onClick:()=>{c(st({},i,{order:i.order===d.KM9.asc?d.KM9.desc:d.KM9.asc}))},classes:{root:lt()(p.arrow,{[p.rotate]:i.order===d.KM9.desc})},size:"large"},l().createElement(at.Z,null)))))},dt=(e,t,n,a)=>(0,r.useMemo)((()=>{const r=((e,t)=>[{title:"",attributes:ce(e,(0,d.nt9)(e,t))}])(n,a);return[{title:"",attributes:e.concat(t||[]).map((e=>({title:e.label,fieldName:e.id})))},...r]}),[n,a,e,t]);var mt=n(56961),ft=n(62901),ht=n(18527),gt=n(72316),bt=n(23074),yt=n(92454),vt=n(51277),Et=n(40322);const xt=e=>{const{entityColors:t}=ne(),n=(0,p.find)((0,p.propEq)("entityUri",e))(t);return n?n.color:""},wt=(0,et.makeStyles)((e=>({hidden:{visibility:"hidden"},rowCheckbox:{marginLeft:"-9px",marginRight:"9px",position:"relative",padding:"9px",alignSelf:"baseline"},entity:{paddingTop:"12px",paddingBottom:"8px",overflow:"hidden",flex:1},entityHeader:{display:"flex",justifyContent:"space-between",whiteSpace:"pre"},actions:{marginLeft:"auto",marginRight:0,display:"flex",height:"17px"},actionButtons:{display:"none"},active:{display:"flex"},wrapper:{position:"relative",padding:"0 15px 0 15px",color:"rgba(0,0,0,0.87)","&::after":{content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none"},"&:hover":{backgroundColor:"rgba(0,0,0,0.04)","& $actionButtons":{display:"flex"},"& $commentsContainer":{borderLeft:"1px solid rgba(0,0,0,0.12)"}},display:"flex",boxSizing:"border-box",borderBottom:"1px rgba(0,0,0,0.05) solid",paddingLeft:"12px"},entityLabel:{color:e.palette.primary.main,cursor:"pointer",textDecoration:"none",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis"},matchRulesWrapper:{padding:"12px 15px 4px 2px",display:"flex",alignItems:"center",boxSizing:"border-box","& $dividerWrapper:nth-child(2):not(:last-child)":{display:"block"}},selectedRow:{backgroundColor:"rgba(0, 114, 206, 0.12)"},coloredRow:{"&:before":{content:'""',position:"absolute",left:0,top:0,width:"4px",height:"100%",borderRadius:"0px 4px 4px 0px",background:e=>{let{color:t}=e;return t}}},matchScore:{paddingLeft:"12px",color:"rgba(0,0,0,0.54)"},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",height:"24px",marginLeft:"6px"},border:{borderLeft:"1px solid rgba(0,0,0,0.12)"},rightButton:{marginLeft:"8px"},tenantIcon:{marginLeft:"12px"},dividerWrapper:{display:"none",marginLeft:"12px",alignSelf:"stretch"},divider:{borderColor:"rgba(0,0,0,0.12)"},relevanceBadge:{marginLeft:"12px"}}))),Ot=(0,r.memo)((e=>{var t;let{rowIndex:n,match:a,toggleSelect:o,entityToMatch:i,isRowSelected:c,isColumnViewMode:s,actionButtonsRenderer:u,metadata:p,entitiesMap:m={}}=e;const f=a.object,h=xt(f.uri),g=wt({color:h}),[b,y]=(0,r.useState)(!1),v=f!==i,E=u,x=null===(t=a.matchRuleSummaries)||void 0===t?void 0:t.some(d.KB$);return l().createElement("div",{className:lt()(g.wrapper,ft.U,{[g.coloredRow]:s&&c,[g.selectedRow]:c})},l().createElement(Ye.Z,{className:lt()(g.rowCheckbox,{[g.hidden]:!v}),checked:c,onChange:()=>o(a),"data-reltio-id":`reltio-matches-table-checkbox-${n}`}),l().createElement("div",{className:g.entity},l().createElement("div",{className:g.entityHeader},l().createElement(ht.Z,{value:(0,d.wwR)(f),className:g.entityLabel},(0,d.idV)(f.label)),l().createElement("div",{className:g.actions},l().createElement("div",{className:lt()(g.actionButtons,{[g.active]:b})},l().createElement(E,{buttonClassName:g.rightButton,hoveredMatch:a,onActionsMenuOpen:()=>y(!0),onActionsMenuClose:()=>y(!1)})),i&&l().createElement(gt.Z,{className:lt()(g.commentsContainer,{[g.border]:b}),uri:(0,d.E_P)(i.uri,a.object.uri),objectType:d.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,d.wp9)(d.q7e.POTENTIAL_MATCH,{entityUri:i.uri,matchEntityUri:a.object.uri}),allowOnlyOneComment:!0,showAlways:b}))),l().createElement("div",{className:g.matchRulesWrapper},l().createElement(bt.Z,{entitiesMap:m,entity:f,match:a,metadata:p,variant:yt.g.excludeNotMatch}),l().createElement("div",{className:g.dividerWrapper},l().createElement(mt.Z,{orientation:"vertical",className:g.divider})),x&&l().createElement(vt.Z,{className:g.relevanceBadge,matchRuleSummaries:a.matchRuleSummaries}),!x&&!!a.matchScore&&l().createElement("div",{className:g.matchScore},a.matchScore),(0,d.biM)(f)&&l().createElement(Et.R,{className:g.tenantIcon,dataTenantId:f.dataTenant}))))})),Ct=(0,et.makeStyles)((()=>({view:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden"}}))),St=e=>{let{entityToMatch:t,matches:n,toggleSelect:a,actionButtonsRenderer:r,metadata:o,entitiesMap:i,selectedItems:c,isLoading:s}=e;const u=Ct(),{comparisonViewMode:p}=ne();return l().createElement("div",{className:u.view},s&&l().createElement(C.Z,null),n.map(((e,s)=>l().createElement(Ot,{key:e.object.uri,rowIndex:s,match:e,entityToMatch:t,toggleSelect:a,actionButtonsRenderer:r,matches:n,matchRules:e.matchRules,metadata:o,entitiesMap:i,isColumnViewMode:p===x.COLUMNS,isRowSelected:c.some((t=>t.object.uri===e.object.uri))}))))};var Rt=n(69719),kt=n(33662);const Mt=(0,et.makeStyles)({root:{display:"flex",padding:"8px 16px",gap:"8px",borderBottom:"rgba(0,0,0,0.05) 1px solid"},inputRoot:{borderRadius:"4px"},menuButtonRoot:{padding:0}}),Pt=(0,r.memo)((e=>{let{onSearch:t,searchTenant:n,onChangeSearchTenant:a,entityTypeUri:o}=e;const i=Mt(),c=(0,r.useRef)(),[s,u]=(0,r.useState)(""),d=(0,r.useCallback)((0,p.when)((0,p.propEq)("key","Enter"),(0,p.pipe)((0,p.always)(s),p.trim,t)),[s,t]),m=(0,r.useCallback)((e=>{u(e),(0,p.isEmpty)(e)&&document.activeElement!==c.current&&t(e)}),[t]);return t?l().createElement("div",{className:i.root},l().createElement(Rt.H,{entityTypeUri:o,selectedTenant:n,onChangeTenant:a}),l().createElement(kt.Z,{classes:{root:i.inputRoot},inputRef:c,fullWidth:!0,height:40,autofocus:!1,value:s,onSearch:m,onKeyPress:d})):null}));var jt=n(98538),Tt=n(39475),It=n(50985);function Nt(){return Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Nt.apply(this,arguments)}const Bt=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=p.identity}=e;const{ActionButton:r,props:o}=n;return l().createElement(r,Nt({ref:t,mode:"menuItem",onMenuClose:a},o))}));Bt.displayName="MenuItemRenderer";const Dt=Bt;function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},At.apply(this,arguments)}const zt=e=>{let{actions:t,numberOfButtons:n=2,mode:a="normal",actionButtonSize:r,classes:o,onActionsMenuOpen:i,onActionsMenuClose:c}=e;const[s,u]=(0,p.splitAt)(n,t),d="normal"===a?Me.N.button:Me.N.iconButton,m="normal"===a?"MPlus":"S";return l().createElement(l().Fragment,null,s.map(((e,t)=>{let{ActionButton:n,props:a}=e;return l().createElement(n,At({key:t,mode:d,className:null==o?void 0:o.actionButton},r?{size:r}:{},a))})),u.length>0&&l().createElement(jt.Z,{buttonComponent:Tt.k,buttonProps:{icon:It.Z,size:m,tooltipTitle:le().text("More actions"),"data-reltio-id":"reltio-potential-matches-actions-dropdown-menu-button"},className:null==o?void 0:o.moreOptions,menuId:"matches-view-actions",menuItems:u,onMenuOpen:i,onMenuClose:c,MenuItemRenderer:Dt}))},Zt=(0,et.makeStyles)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),_t=(0,r.memo)((e=>{let{entity:t,metadata:n,filters:a,sorting:o,onSorting:i,config:c}=e;const s=Zt(),[f,h]=ke(),{changeRowsPerPage:g,changePage:b,setSelectedItems:y,toggleSelect:v}=f,{page:E,rowsPerPage:x,selectedItems:S,isGlobalSpinnerActive:R}=h,{uri:j,type:T}=t||{},I=(0,u.useSelector)(m.ZP.selectors.getTenantObject),[N,B]=(0,r.useState)(""),[D,A]=(0,r.useState)(I),z=(0,r.useCallback)((e=>{A(e),b(0)}),[b]),Z=(0,r.useMemo)((()=>[(0,p.isEmpty)(N)?null:{filter:"containsWordStartingWith",fieldName:"attributes",values:[N]},{filter:"equals",fieldName:"type",values:[T]},{filter:"not equals",fieldName:"uri",values:[j]},...a].filter(p.identity)),[T,j,N,a]),_=dt(xe,[],n,T),{entities:F,total:H,findEntities:L,loading:V}=(e=>{let{entityType:t,filters:n,sorting:a,page:l,rowsPerPage:o,enabled:i,searchTenantId:c}=e;const{order:s,field:f}=a,h=(0,u.useSelector)(m.ZP.selectors.getDtssPath),g=(0,u.useSelector)(m.ZP.selectors.getTenantObject),{activityFilter:b,globalFilter:y}=(0,u.useSelector)(m.ZP.selectors.getGlobalSearchRequestOptions)||{},[v,E]=(0,r.useState)(!1),[x,w]=(0,r.useState)(0),[O,C]=(0,r.useState)([]),S=(0,M._)(),R=["uri","label","type","secondaryLabel","attributes","crosswalks"],k=(0,r.useMemo)((()=>(0,d.Uqd)()(n)),[n]),j=(0,r.useCallback)((()=>{if(i){E(!0);const e=c!==g.id,t={customerTenant:g.id,dataTenant:c,dtssPath:h},a={offset:l*o,max:o,sort:f,order:s,select:R.join(","),globalFilter:y,activityFilter:b},r=e?(0,d.uqV)(P({filters:n,options:a},t)).then((0,p.map)((0,d.E7G)(c))):(0,d.ZOr)(n,a),i={activityFilter:b,globalFilter:y},u=e?(0,d.J$m)(P({filters:n,options:i},t)):(0,d.j_Q)(n,i);S(Promise.all([r,u])).then((e=>{const[t,n]=e,{total:a}=n;C(t.map((e=>({object:e})))),w(a)})).finally((()=>E(!1)))}}),[t,k,f,s,l,o,i,b,y,c,g]);return(0,r.useEffect)((()=>{j()}),[j]),{entities:O,total:x,findEntities:j,loading:v}})({enabled:!!j,entityType:T,filters:Z,sorting:o,page:E,rowsPerPage:x,searchTenantId:D.id}),{addReloadHandler:W,removeReloadHandler:U}=k();(0,r.useEffect)((()=>(W(L),()=>U(L))),[L,W,U]);const G=()=>{b(0)},q=(0,r.useCallback)((()=>{y([])}),[y]),$=(0,r.useCallback)((()=>{y(F)}),[y,F]);(0,w.D)((()=>{G(),q()}),[j]),(0,w.D)((()=>{G()}),[a,N]);const X=(0,r.useCallback)((e=>{let{hoveredMatch:a,buttonClassName:r,onActionsMenuOpen:o,onActionsMenuClose:i}=e;const{canMerge:s,canMark:u}=(0,d.hXd)(n,c,a.object,t,a.matchRules),m=[a.object],f=(0,d.biM)(a.object),h=f&&(0,d.biM)(t),g=[{ActionButton:Ae,show:s&&!h,props:{entity:t,entities:m}},{ActionButton:_e,show:u,props:{entity:t,entities:m}},{ActionButton:Le,show:u&&!f,props:{entity:t,entities:m}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:g,classes:{actionButton:r,moreOptions:r},mode:"hover",numberOfButtons:3,onActionsMenuOpen:o,onActionsMenuClose:i})}),[t,c,n]),Y=(0,r.useMemo)((()=>F.map((e=>null==S?void 0:S.find((0,p.pathEq)(["object","uri"],e.object.uri)))).filter(p.identity).length),[S,F]);return l().createElement("div",{className:s.mainArea},l().createElement(pt,{selectedCount:Y,totalCount:H,totalOnPage:F.length,sortOptions:_,sorting:o,onSorting:i,onSelect:Y?q:$},l().createElement(Pt,{searchTenant:D,onChangeSearchTenant:z,entityTypeUri:T,onSearch:B})),l().createElement(St,{entityToMatch:t,toggleSelect:v,actionButtonsRenderer:X,matches:F,metadata:n,selectedItems:S,isLoading:V}),l().createElement(O.Z,{rowsPerPageOptions:ye,count:H,page:E,onChangePage:b,rowsPerPage:x,onChangeRowsPerPage:g}),R&&l().createElement(C.Z,null))}));_t.displayName="FindMatchesView";var Ft=n(36852),Ht=n(1824),Lt=n(63929),Vt=n(23044),Wt=n(79312),Ut=n(38677),Gt=n(69089),qt=n(79811),$t=n(290),Xt=n(35936),Yt=n(8007),Kt=n(85596),Qt=n(76141);const Jt=(0,et.makeStyles)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"16px 16px 0"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px"},path:{color:e.palette.text.secondary,fontize:"13px",letterSpacing:0,lineHeight:"15px",padding:"6px 0"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}})));function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){tn(e,t,n[t])}))}return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nn=e=>{let{config:t,mainEntity:n,currentEntity:a,matchRules:o,open:i,onClose:c=p.identity,permission:s}=e;const f=Jt(),h=(0,u.useDispatch)(),g=(0,u.useSelector)(m.ZP.selectors.getMetadata),b=(0,r.useRef)(null),{onFinishRequest:y}=Be(),{deselectByEntities:v}=ae(),{relation:E={}}=(0,u.useSelector)((e=>m.ZP.selectors.getRelationToAddByViewId(e,t.id)))||{},{inRelations:x=[],outRelations:w=[]}=(0,r.useMemo)((()=>((e,t,n,a,r)=>{const{isNotDuplicatedInRelation:l,isNotDuplicatedOutRelation:o}=(0,d.xE1)(),i=t=>(0,p.pipe)((0,p.assocPath)(["startObject","objectType"],(0,d.nt9)(e,t.startObject.objectTypeURI)),(0,p.assocPath)(["endObject","objectType"],(0,d.nt9)(e,t.endObject.objectTypeURI)))(t),c=(0,d.nt9)(e,a.type),s=(0,p.propOr)({},"matchActions",t),u=(0,d.dzT)(s,c,r),[m]=u.map((e=>{let{createRelation:t}=e;return t})).filter(p.identity);return(0,p.evolve)({inRelations:(0,p.pipe)((0,p.filter)((0,d.rny)(e,a,n)),(0,p.map)((0,d.V3K)(e)),(0,p.filter)(l),(0,p.map)(i)),outRelations:(0,p.pipe)((0,p.filter)((0,d.rny)(e,n,a)),(0,p.map)((0,d.V3K)(e)),(0,p.filter)(o),(0,p.map)(i))},m)||{}})(g,t,n,a,o)),[t,n,a,o,g]),{relationUri:O,relationType:C={}}=E,S=(0,p.pathOr)({},["object","attributes"],E),R=(0,r.useMemo)((()=>(0,d.xF8)(g,C)),[C,g]),k=(0,r.useMemo)((()=>en({attributes:S},(0,d.p2l)(E))),[E,S]),M=t.id,P=(0,r.useCallback)((0,p.pipe)(m.N5.relations.actions.setRelationType(t.id,O),h),[t,O,h]),j=(0,r.useCallback)((e=>(0,p.pipe)(m.N5.actions.addAttributes,h)(e.map((e=>en({},e,{viewId:M}))))),[M,h]),T=(0,r.useCallback)((e=>(0,p.pipe)(m.N5.actions.modifyAttribute,h)(en({},e,{viewId:M}))),[M,h]),I=(0,r.useCallback)((e=>(0,p.pipe)(m.N5.actions.removeAttribute,h)(en({},e,{viewId:M}))),[M,h]),N=(0,r.useCallback)((()=>c(O)),[O,c]),B=(0,r.useCallback)((()=>h(m.N5.errors.actions.errorsSet([]))),[h]),D=(0,r.useCallback)((()=>{const e=(0,d.xkB)(g,{relation:E});return h(m.N5.errors.actions.errorsSet(e)),0===e.length}),[E,g,h]),A=(0,r.useCallback)((()=>{B(),N()}),[B,N]),z=`${(0,d.idV)(a.label)} → ${(0,d.idV)(n.label)}`,Z=(0,p.isEmpty)(C),_=b.current,F=(0,r.useMemo)((()=>({element:_,priority:["left","right","top","bottom"]})),[_]);return l().createElement(Gt.Z,{open:i,fullWidth:!0,maxWidth:"sm",onClose:A,classes:{paper:f.dialogPaper}},l().createElement(Xt.Z,{classes:{root:f.dialogTitle}},l().createElement(Wt.Z,{variant:"subtitle1",classes:{root:f.titleText}},le().text("Add relationship")),l().createElement(Wt.Z,{variant:"body2",classes:{root:f.path}},z)),l().createElement($t.Z,{classes:{root:f.content},ref:b},l().createElement(Yt.p.Provider,{value:F},l().createElement(Kt.Z,{relation:E,metadata:g,inRelationTypes:x,outRelationTypes:w,onChange:P,applyFirstByDefault:!0}),l().createElement(Qt.Z,{className:f.attributeList,attrTypes:R,entity:k,showEmptyEditors:!0,mode:d.fO_.EDITING,parentUri:O,onAddAttributes:j,onChangeAttribute:T,onDeleteAttribute:I}))),l().createElement(qt.Z,null,l().createElement(Ut.Z,{onClick:A},le().text("Cancel")),l().createElement(Ut.Z,{disabled:Z,color:"primary",onClick:()=>{const{relationType:e,startDate:t,endDate:r}=E;D()&&((0,d.DsR)({startEntityUri:n.uri,endEntityUri:a.uri,relationType:e,attributes:(0,p.pathOr)({},["object","attributes"],E),startDate:t,endDate:r}).then((async()=>{null!=s&&s.canMark&&(await(0,d.zGm)(a.uri,[n]),v([a]),y())})).catch(Te),N())}},le().text("Add"))))};function an(){return an=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},an.apply(this,arguments)}const rn=e=>{const[t,n]=(0,r.useState)(!1),[a,o]=(0,r.useState)({}),i=(0,u.useDispatch)(),c=(0,r.useCallback)((t=>{let{mainEntity:a,currentEntity:r,matchRules:l,permission:c}=t;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{relation:{relationUri:(0,d.ncP)()},entity:e,isNew:!0}}(r);(0,p.pipe)(m.N5.relations.actions.openRelationEditor(e.id),i)(s),o({mainEntity:a,currentEntity:r,matchRules:l,permission:c}),n(!0)}),[e,i]),s=(0,r.useCallback)((t=>{(0,p.pipe)(m.N5.relations.actions.closeRelationEditor,i)(e.id,t),n(!1)}),[e,i]),f=(0,r.useCallback)((()=>t?l().createElement(nn,an({config:e,open:t,onClose:s},a)):null),[t,e,s,a]);return{showDialog:t,openAddRelationDialog:c,AddRelationDialogRenderer:f}},ln={showTransitiveMatches:!1},on=(0,et.makeStyles)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),cn=(0,r.memo)((e=>{let{entity:t,metadata:n,filters:a,options:o=ln,sorting:i,onSorting:c,config:s}=e;const f=on(),[h,g]=ke(),{changeRowsPerPage:b,changePage:y,setSelectedItems:v,toggleSelect:E}=h,{page:x,rowsPerPage:S,selectedItems:R,isGlobalSpinnerActive:M}=g,P=(0,u.useSelector)(m.ZP.selectors.getCanUserStartProcessFromQuery),j=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath),T=P&&!(0,d.O27)(j),{uri:I,type:N}=t||{},{showDialog:B,openAddRelationDialog:D,AddRelationDialogRenderer:A}=rn(s),z=dt(ve,Ee,n,N),[Z,_]=(0,r.useMemo)((()=>(0,p.partition)(Ce)(a)),[a]),F=(0,r.useMemo)((()=>(0,d.Uqd)()(_)),[_]),{matches:H,total:L,entitiesMap:V,loadMatches:W,loading:U}=(e=>{let{entity:t,filter:n,rules:a,sorting:l,page:o,rowsPerPage:i,options:c,enabled:s}=e;const{setEntitiesMap:u}=ae(),[p,d]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>{d(!0)}),[d]),f=(0,r.useCallback)((()=>{d(!1)}),[d]),{total:h,matches:g,entitiesMap:b,loadMatches:y}=(0,Vt.s)({enabled:s,entity:t,filter:n,rules:a,onFinishLoading:f,onStartLoading:m,options:c,page:o,rowsPerPage:i,sorting:l,markMatchedValues:!0});return(0,r.useEffect)((()=>{u(b)}),[u,b]),{matches:g,total:h,entitiesMap:b,loadMatches:y,loading:p}})({enabled:!!I,entity:t,filter:F,page:x,sorting:i,rowsPerPage:S,options:o,rules:Oe(Z)}),{addReloadHandler:G,removeReloadHandler:q}=k();(0,r.useEffect)((()=>(G(W),()=>q(W))),[W,G,q]);const $=(0,r.useCallback)((()=>{v([])}),[v]),X=(0,r.useCallback)((()=>{v(H)}),[v,H]);(0,w.D)((()=>{y(0),$()}),[I,o]);const Y=(0,r.useMemo)((()=>(0,d.NVY)(I,Object.keys(V))),[I,V]),K=(0,Ft.C)({objectIds:Y}),Q=(0,r.useCallback)((e=>{let{hoveredMatch:a,buttonClassName:r,onActionsMenuOpen:o,onActionsMenuClose:i}=e;const c=(0,d.hXd)(n,s,a.object,t,a.matchRules),{canMerge:u,canAddRelation:m,canMark:f}=c,h=[a.object],g=[...h,t].some(d.biM),b=[...h,t].every(d.biM),y=[{ActionButton:Ae,show:u&&!b,props:{entity:t,entities:h}},{ActionButton:_e,show:f,props:{entity:t,entities:h}},{ActionButton:Ue,show:!g&&T,props:{entity:t,entities:h}},{ActionButton:Xe,show:m&&!g,props:{mainEntity:t,currentEntity:a.object,matchRules:a.matchRules,onClick:D,permission:c}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:y,classes:{actionButton:r,moreOptions:r},mode:"hover",numberOfButtons:2,onActionsMenuOpen:o,onActionsMenuClose:i})}),[t,s,n,D,T]),J=(0,r.useMemo)((()=>H.map((e=>null==R?void 0:R.find((0,p.equals)(e)))).filter(p.identity).length),[R,H]);return l().createElement(Ht.e,{collaboration:K},l().createElement(Lt.X.Provider,{value:V},l().createElement("div",{className:f.mainArea},l().createElement(pt,{selectedCount:J,totalCount:L,totalOnPage:H.length,sortOptions:z,sorting:i,onSorting:c,onSelect:J?$:X}),l().createElement(St,{entityToMatch:t,toggleSelect:E,actionButtonsRenderer:Q,matches:H,metadata:n,entitiesMap:V,selectedItems:R,isLoading:U}),l().createElement(O.Z,{rowsPerPageOptions:ye,count:L,page:x,onChangePage:y,rowsPerPage:S,onChangeRowsPerPage:b}),M&&l().createElement(C.Z,null)),B&&l().createElement(A,null)))}));cn.displayName="MatchesView";const sn=cn;var un=n(18907);function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dn=(0,et.makeStyles)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),mn=(0,r.memo)((e=>{let{entity:t,metadata:n,filters:a,sorting:o,onSorting:i,config:c}=e;const s=dn(),[f,h]=ke(),{changeRowsPerPage:g,changePage:b,setSelectedItems:y,toggleSelect:v}=f,{page:E,rowsPerPage:x,selectedItems:S,isGlobalSpinnerActive:R}=h,{uri:P,type:j}=t||{},T=(0,u.useSelector)(m.ZP.selectors.getCanUserStartProcessFromQuery),I=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath),N=T&&!(0,d.O27)(I),{matches:B,total:D,entitiesMap:A,loadNotMatches:z,loading:Z}=(e=>{let{entityUri:t,filter:n,sorting:a,page:l,rowsPerPage:o,enabled:i}=e;const{order:c,field:s}=a||{},[p,f]=(0,r.useState)(0),[h,g]=(0,r.useState)(!1),[b,y]=(0,r.useState)([]),[v,E]=(0,r.useState)({}),x=(0,u.useSelector)(m.ZP.selectors.getTenant),w=(0,u.useSelector)(m.ZP.selectors.getDtssPath),O=(0,u.useSelector)(m.ZP.selectors.getDataTenants),{activityFilter:C,globalFilter:S}=(0,u.useSelector)(m.ZP.selectors.getGlobalSearchRequestOptions)||{},R=(0,r.useMemo)((()=>({dtssPath:w,dataTenants:O,entity:{uri:t},customerTenant:x,dtssRequest:d.WSA})),[w,O,t,x]),k=(0,r.useCallback)((0,d.U_T)(R,d.pg),[R]),P=(0,un.a)(k),j=(0,M._)(),T=e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){pn(e,t,n[t])}))}return e}({matchRules:[d.h_8]},e),I=(0,r.useCallback)((e=>{i&&(g(!0),j(P({entityUri:t,offset:l*o,max:o,filter:(0,d.vyX)(S,n)||"",sort:s,force:e,order:c,activeness:C})).then((e=>{const{response:t,total:n,originalResponse:a}=e;f(n),y(t.map(T)),t.map((e=>{let{uri:t}=e;return t})).length>0&&E((0,d.KPC)(a))})).finally((()=>g(!1))))}),[t,n,s,c,l,o,C,i,S]);return(0,r.useEffect)((()=>{I()}),[I]),{matches:b,total:p,entitiesMap:v,loadNotMatches:(0,r.useCallback)((()=>{I(!0)}),[I]),loading:h}})({enabled:!!P,entityUri:P,filter:(0,d.Uqd)()(a),page:E,rowsPerPage:x,sorting:o}),_=(0,r.useMemo)((()=>(0,d.NVY)(P,Object.keys(A))),[P,A]),F=(0,Ft.C)({objectIds:_}),H=dt(xe,[],n,j),{addReloadHandler:L,removeReloadHandler:V}=k();(0,r.useEffect)((()=>(L(z),()=>V(z))),[z,L,V]);const W=(0,r.useCallback)((()=>{y([])}),[y]),U=(0,r.useCallback)((()=>{y(B)}),[y,B]);(0,w.D)((()=>{b(0),W()}),[P]);const G=(0,r.useCallback)((e=>{let{hoveredMatch:a,buttonClassName:r,onActionsMenuOpen:o,onActionsMenuClose:i}=e;const{canMerge:s,canMark:u}=(0,d.hXd)(n,c,a.object,t,a.matchRules),m=[a.object],f=[...m,t].some(d.biM),h=[...m,t].every(d.biM),g=[{ActionButton:Ae,show:s&&!h,props:{entity:t,entities:m}},{ActionButton:Ge,show:u,props:{entity:t,entities:m}},{ActionButton:Ue,show:!f&&N,props:{entity:t,entities:m}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:g,classes:{actionButton:r,moreOptions:r},mode:"hover",numberOfButtons:2,onActionsMenuOpen:o,onActionsMenuClose:i})}),[t,c,n,N]),q=(0,r.useMemo)((()=>B.map((e=>null==S?void 0:S.find((0,p.equals)(e)))).filter(p.identity).length),[S,B]);return l().createElement(Ht.e,{collaboration:F},l().createElement(Lt.X.Provider,{value:A},l().createElement("div",{className:s.mainArea},l().createElement(pt,{selectedCount:q,totalCount:D,totalOnPage:B.length,sortOptions:H,sorting:o,onSorting:i,onSelect:q?W:U}),l().createElement(St,{entityToMatch:t,toggleSelect:v,actionButtonsRenderer:G,matches:B,metadata:n,selectedItems:S,isLoading:Z}),l().createElement(O.Z,{rowsPerPageOptions:ye,count:D,page:E,onChangePage:b,rowsPerPage:x,onChangeRowsPerPage:g}),R&&l().createElement(C.Z,null))))}));mn.displayName="NotMatchView";const fn=e=>{let{entity:t,metadata:n,filters:a,options:r,sorting:o,onSorting:i,config:c,activeView:s}=e;return(()=>{switch(s){case E.PotentialMatches:return l().createElement(sn,{entity:t,metadata:n,filters:a,options:r,config:c,sorting:o,onSorting:i});case E.FindMatches:return l().createElement(_t,{entity:t,metadata:n,filters:a,config:c,sorting:o,onSorting:i});case E.NotAMatch:return l().createElement(mn,{entity:t,metadata:n,filters:a,config:c,sorting:o,onSorting:i});default:return l().createElement("div",null)}})()},hn=(0,et.makeStyles)({wrapper:{width:"100%",height:"100%",display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=(0,r.memo)((e=>{let{active:t,tabs:n,onClose:a,config:o}=e;const i=hn(),c=(0,u.useSelector)(m.ZP.selectors.getMetadata),s=(0,u.useSelector)(m.ZP.selectors.getEntity),d=!(0,p.isNil)(t),f=(0,r.useMemo)((()=>{var e;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){gn(e,t,n[t])}))}return e}({},null===(e=n[t])||void 0===e?void 0:e.headerProps,{onClose:a})}),[a,t,n]),{sorting:h,filters:g,options:b,onSorting:y}=n[t]||{};return l().createElement("div",{className:i.wrapper},l().createElement(v.h,{open:d},l().createElement(Qe.Provider,{value:f},l().createElement(fn,{config:o,entity:s,filters:g,options:b,sorting:h,onSorting:y,metadata:c,activeView:t}))))}));bn.displayName="RightSidePanel";var yn=n(30936),vn=n(17998),En=n(79935),xn=n(29742),wn=n(87825),On=n(4270);const Cn=(0,et.makeStyles)((()=>({button:{"&.MuiButtonGroup-grouped":{minWidth:"90px",padding:"8px 12px"}}})));var Sn=n(95775),Rn=n(18523);function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mn=[{id:x.COLUMNS,tooltipTitle:le().text("Column"),title:le().text("Column"),Icon:Sn.Z},{id:x.TABLE,tooltipTitle:le().text("Table"),title:le().text("Table"),Icon:Rn.Z}],Pn=e=>{let{className:t}=e;const n=Cn(),{comparisonViewMode:a,selectedItems:r}=ne(),{setComparisonViewMode:o}=ae(),i=r.length>4;return l().createElement(On.Z,{className:t,classes:{button:n.button},modes:Mn.map((e=>e.id===x.COLUMNS?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){kn(e,t,n[t])}))}return e}({},e,{disabled:i,tooltipTitle:i?le().text("Column view supports maximum ${maxProfiles} profiles",{maxProfiles:4}):e.tooltipTitle}):e)),modeId:a,onChange:o})},jn=(0,et.makeStyles)((e=>({header:{padding:"0 8px 0 16px",backgroundColor:"#fff","& $splitter":{height:"32px",marginRight:"16px",marginLeft:"4px",color:"rgba(0, 0, 0, 0.12)"}},title:{fontSize:"16px",fontWeight:400,lineHeight:"24px",letterSpacing:"0.15px",color:e.palette.text.primary},clearAllButton:{marginLeft:"16px"},mergeButton:{marginRight:"12px"},total:{color:e.palette.text.secondary},splitter:{},actionSplitter:{height:"32px",margin:"0 8px",color:"rgba(0, 0, 0, 0.12)"}}))),Tn=(0,p.map)((0,p.prop)("object")),In=e=>{let{config:t,columnsData:n,selectedColumns:a,onChangeColumns:o,showNonOv:i,onChangeShowNonOv:c}=e;const s=jn(),f=(0,u.useSelector)(m.ZP.selectors.getEntity),h=(0,u.useSelector)(m.ZP.selectors.getMetadata),{selectedItems:g,limitSelection:b}=ne(),{setSelectedItems:y}=ae(),v=Tn(g),{canMerge:E,canMark:x}=(0,d.OCS)(h,t,f,g),w=[...v,f].some(d.biM),O=v.some(d.biM)&&(0,d.biM)(f),C=(0,r.useMemo)((()=>[{ActionButton:Ae,show:E&&!O,props:{entity:f,entities:v}},{ActionButton:_e,show:x,props:{entity:f,entities:v}},{ActionButton:Ue,show:!w,props:{entity:f,entities:v}}].filter((0,p.prop)("show"))),[x,E,f,v,w,O]),S=0!==g.length,R=(0,r.useCallback)((()=>{c(p.not)}),[c]),k=(0,r.useMemo)((()=>[{selected:!i,text:le().text("Show only OV"),onClick:R,id:"showNonOv"}]),[R,i]);return l().createElement(vn.Z,{title:"",classes:{root:s.header},"data-reltio-id":"reltio-potential-matches-table-header"},l().createElement(Wt.Z,{className:s.title},l().createElement("span",null,le().text("Match Review")),S&&l().createElement("span",{className:s.total}," ","(",g.length,b&&"/"+b,")")),S&&l().createElement(Ut.Z,{onClick:()=>{y([])},className:s.clearAllButton,color:"primary"},le().text("Clear All")),l().createElement(En.Z,null),S&&l().createElement(l().Fragment,null,l().createElement(zt,{actions:C,numberOfButtons:2}),l().createElement(mt.Z,{orientation:"vertical",classes:{vertical:s.actionSplitter}})),l().createElement(xn.Z,{items:k,menuId:"matches-view-settings"}),l().createElement(wn.Z,{columnsData:n,selectedColumns:a,onChangeColumns:o}),l().createElement(mt.Z,{orientation:"vertical",classes:{vertical:s.splitter}}),l().createElement(Pn,null))};var Nn=n(53850),Bn=n(79002),Dn=n(45226),An=n(54837);const zn=l().createContext({expandedMap:{},onExpandType:()=>{}});function Zn(){return Zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Zn.apply(this,arguments)}zn.displayName="ExpandedContext";const _n=e=>{const t=(0,r.forwardRef)(((t,n)=>{const{attributeType:a}=t,{expandedMap:o}=(0,r.useContext)(zn),i=o[a.uri];return l().createElement(e,Zn({},t,{expanded:i,ref:n}))}));return t.displayName="WithExpanded",t};var Fn=n(23883);const Hn="rgba(140, 193, 82, 0.12)",Ln=(0,et.makeStyles)({complexAttributesHeadRenderer:{height:"100%",width:"100%",display:"flex",alignItems:"flex-start"},complexAttributesHeadLabel:{flex:1,marginLeft:"5px"},arrowButton:{cursor:"pointer",marginLeft:"-3px"},attribute:{whiteSpace:"pre-wrap"},matchedAttribute:{fontWeight:500,position:"relative","&::after":{content:'""',position:"absolute",left:"-1000px",top:0,width:"5000px",height:"100%",background:Hn,pointerEvents:"none"}}}),Vn=(0,et.makeStyles)({badge:{borderRadius:"50%",background:Hn,fontWeight:500,height:"20px",width:"20px",display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"flex-start",marginBottom:"2px",marginTop:"-2px"}}),Wn=e=>{let{attributeValue:t}=e;const n=Vn(),{highlightedValuesUris:a=[]}=(0,r.useContext)(An.j),o=a.filter((e=>(0,d.sOy)(e,t.uri))).length;return o>0?l().createElement(Fn.Z,{title:1===o?le().text("${count} match",{count:o}):le().text("${count} matches",{count:o})},l().createElement("div",{className:n.badge},o)):null},Un=_n(Dn.Z),Gn=e=>{let{value:{attributeType:t,attributeValues:n,matchedValuesUris:a,showNonOv:o}}=e;const i=Ln(),c=(0,r.useMemo)((()=>({highlightedValuesUris:a,highlightedClassName:i.matchedAttribute})),[a,i.matchedAttribute]);return l().createElement("div",{className:i.attribute},l().createElement(An.j.Provider,{value:c},l().createElement(Un,{values:n,attributeType:t,showNonOv:o,RightSlot:Wn})))};var qn=n(40435);const $n=l().createContext({});$n.displayName="ColumnDataContext";const Xn=(0,et.makeStyles)({menuButtonWrapper:{display:"none",position:"absolute",top:"-4px",right:"-14px"},headCell:{display:"flex",position:"relative","th:hover &":{"& $menuButtonWrapper":{display:"block"}}},active:{display:"block"}}),Yn=e=>{let{label:t,id:n,hideable:a}=e;const o=Xn(),{setAnchor:i,setHoveredId:c,hoveredId:s}=(0,r.useContext)($n),u=(0,r.useRef)();return l().createElement("div",{className:o.headCell},t,!1!==a&&l().createElement("div",{className:lt()(o.menuButtonWrapper,{[o.active]:s===n}),ref:u},l().createElement(qn.Z,{icon:It.Z,onClick:()=>{i(u.current),c(n)},size:"S"})))};var Kn=n(85777);const Qn=e=>{let{label:t,attributeType:n,id:a}=e;const o=Ln(),{expandedMap:i,onExpandType:c}=(0,r.useContext)(zn),s=(0,r.useCallback)((()=>c(n.uri)),[c,n]),u=i[n.uri];return l().createElement("div",{className:o.complexAttributesHeadRenderer},l().createElement(Kn.Z,{expanded:u,onClick:s,className:o.arrowButton}),l().createElement("div",{className:o.complexAttributesHeadLabel},l().createElement(Yn,{label:t,id:a})))};var Jn=n(8419),ea=n(92679);const ta=l().createContext({hoveredEntity:null,resetHoveredEntity:()=>{}});ta.displayName="HoveredEntityContext";const na=(0,r.memo)((e=>{let{value:{mainEntity:t,entity:n,matchRules:a,permission:r},onActionsMenuClose:o,onActionsMenuOpen:i,openAddRelationDialog:c,classes:s={},mode:u="hover"}=e;const{canMerge:m,canAddRelation:f,canMark:h}=r,g=[t,n].some(d.biM),b=[t,n].every(d.biM),y=!a,v=!y&&a.includes(d.h_8),E=!v&&!y,x=[{ActionButton:Ae,show:m&&!b&&(v||E||y),props:{entity:t,entities:[n]}},{ActionButton:_e,show:h&&(E||y),props:{entity:t,entities:[n]}},{ActionButton:Ge,show:h&&v,props:{entity:t,entities:[n]}},{ActionButton:Ue,show:!g&&(v||E),props:{entity:t,entities:[n]}},{ActionButton:Le,show:h&&y&&!(0,d.biM)(n),props:{entity:t,entities:[n]}},{ActionButton:Xe,show:f&&!g,props:{mainEntity:t,currentEntity:n,matchRules:a,onClick:c,permission:r}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:x,numberOfButtons:2,mode:u,actionButtonSize:"hover"===u?"XS":void 0,classes:{actionButton:s.actionButton,moreOptions:s.moreOptions},onActionsMenuClose:o,onActionsMenuOpen:i})})),aa=(0,et.makeStyles)({container:{position:"relative",width:"100%",height:"140px",display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden"},hovered:{backgroundColor:"rgb(245, 245, 245)"},colored:{"&:before":{content:'""',position:"absolute",left:0,top:0,width:"100%",height:"4px",background:e=>{let{color:t}=e;return t}}},removeButton:{position:"absolute",zIndex:1,margin:"4px"},matchControlsContainer:{display:"flex",alignItems:"center",height:"45px",margin:"4px 8px"},rightButton:{display:"flex",alignItems:"center"},moreOptions:{marginLeft:"8px"}});function ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var la=n(35536),oa=n(94009),ia=n(14834),ca=n(19262),sa=n(94215),ua=n(58365),pa=n(54064);const da=e=>"potentialMatchReview"===e.processType,ma=l().createContext((()=>{}));ma.displayName="WorkflowTasksAvailabilityContext";const fa=(0,et.makeStyles)({container:{position:"relative",minHeight:"86px",display:"flex",overflow:"hidden",margin:"-16px"},assigneeContainer:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"16px 14px 16px 48px"}});function ha(){return ha=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ha.apply(this,arguments)}const ga=(0,p.pick)(["processInstanceComments","taskId"]),ba=e=>{let{entity:t,match:n}=e;const a=fa(),o=(e=>{let{entity:t,match:n}=e;const a=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath),l=(0,u.useSelector)(m.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,u.useSelector)(m.ZP.selectors.getTenant),i=(0,M._)(),{uri:c}=t,s=(0,d.ev7)(n),[f,h]=(0,r.useState)(!1),[g,b]=(0,r.useState)([]),y=(0,pa.b)(),v=(0,r.useCallback)((()=>{a&&s!==c&&(h(!0),i((0,d.uT0)({entityUri:c,workflowPath:a,environment:l,tenant:o})).then((e=>{const{data:t}=e,n=(0,p.propSatisfies)((0,p.includes)(s),"objectURIs"),a=(0,p.allPass)([da,n]),r=t.filter(a);b(r)})).catch((e=>{console.warn("Workflow error:",e),b([])})).finally((()=>h(!1))))}),[c,l,o,a,s]),E=(0,r.useCallback)(((e,t)=>{b((0,p.map)((0,p.when)((0,p.propEq)("taskId",e),(0,p.mergeLeft)(t))))}),[]),{deselectByEntities:x}=ae(),w=(0,r.useCallback)((e=>{y(e),x([n.object])}),[y,x,n.object]);return{loading:f,tasks:g,loadTasks:v,updateTaskState:E,total:g.length,onActionSuccess:w}})({entity:t,match:n}),{tasks:i,loadTasks:c}=o,s=(0,r.useContext)(ma);(0,r.useEffect)((()=>{c()}),[c]);const f=i[0],h=(0,d.ev7)(n);(0,r.useEffect)((()=>{null==s||s(h,!!f)}),[s,h,f]);const{actions:g,actionRequestIsInProgress:b}=(0,la.t)({taskId:null==f?void 0:f.taskId,possibleActions:null==f?void 0:f.possibleActions,assignee:null==f?void 0:f.assignee,isOpen:null==f?void 0:f.isOpen}),y=f&&l().createElement(oa.Z,{actions:g,isInProgress:b});return f?l().createElement(ia.O.Provider,{value:o},l().createElement("div",{className:a.container},l().createElement(ca.Z,ha({},(e=>({date:e.dueDate,type:e.processDefinitionDisplayName,createdBy:e.createdBy,step:e.displayName}))(f),{Actions:y}),l().createElement("div",{className:a.assigneeContainer},l().createElement(sa.Z,{assignee:f.assignee,taskId:f.taskId,isTaskOpen:f.isOpen})),l().createElement(ua.V,ha({},ga(f),{workflowActions:g,actionRequestIsInProgress:b,preferredAction:f.preferredAction}))))):null},ya=[{id:"profile",label:le().text("Profile name"),dataTypeDefinition:{type:d.oS0.TYPE_STRING},hideable:!1,draggable:!1,initialWidth:280,autoResize:!1,modes:[x.COLUMNS,x.TABLE]},{id:"matchRules",label:le().text("Match method"),dataTypeDefinition:{type:d.oS0.TYPE_SELECT},initialWidth:130,minWidth:130,autoResize:!1,modes:[x.COLUMNS,x.TABLE]},{id:"workflowCard",label:le().text("Workflow"),modes:[x.COLUMNS]},{id:"entityId",label:le().text("Entity ID"),dataTypeDefinition:{type:d.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1,modes:[x.COLUMNS,x.TABLE]},{id:"score",label:le().text("Match score"),dataTypeDefinition:{type:d.oS0.TYPE_INT},initialWidth:100,modes:[x.TABLE,x.COLUMNS]},{id:"relevanceScore",label:le().text("Relevance score"),initialWidth:130,minWidth:130,modes:[x.TABLE,x.COLUMNS]},{id:"sources",label:le().text("Sources"),modes:[x.COLUMNS,x.TABLE]},{id:"crosswalks",label:le().text("Crosswalks"),modes:[x.COLUMNS]}];var va=n(60590);const Ea=(0,et.makeStyles)({crosswalk:{marginBottom:"8px"},crosswalkIcon:{marginRight:"5px"},labelContainer:{display:"flex",alignItems:"center",width:"100%"},spacer:{flex:1}}),xa=e=>{let{attributeValue:t}=e;const n=Ea(),a=(0,u.useSelector)(m.ZP.selectors.getMetadata),r=t.value.crosswalk;return l().createElement("div",{className:n.labelContainer},l().createElement(va.Z,{className:n.crosswalkIcon,crosswalk:r,showTooltip:!1}),l().createElement("div",null,(0,d.tH7)(a,r.type)),l().createElement("div",{className:n.spacer}),l().createElement("div",null,r.value))},wa=_n(Dn.Z),Oa=(0,et.makeStyles)({wrapper:{display:"flex",flexWrap:"wrap",marginBottom:"-8px"},crosswalkIcon:{marginRight:"5px",marginBottom:"8px"}}),Ca=e=>{let{value:t,children:n}=e;const{crosswalks:a,dataTenant:r}=t,o=Oa(),i=(0,d.biM)(t);return i||!(0,d.O27)(a)?l().createElement("div",{className:o.wrapper},n,a.map((e=>l().createElement(va.Z,{key:e.uri,className:o.crosswalkIcon,crosswalk:e}))),i&&l().createElement(Et.R,{dataTenantId:r})):null},Sa=(0,et.makeStyles)({inline:{display:"inline-flex"}}),Ra=e=>{let{value:t}=e;const n=Sa();return l().createElement(vt.Z,{className:n.inline,matchRuleSummaries:t})};function ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Ma(e,t,n[t])}))}return e}function Ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pa={profile:{cellRenderer:e=>{let{value:{entity:t,config:n,isSelectedEntity:a,onRemove:o}}=e,i=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e.value,["entity","config","isSelectedEntity","onRemove"]);const c=xt(t.uri),s=aa({color:c}),{hoveredEntity:u,resetHoveredEntity:p}=(0,r.useContext)(ta),m=(0,d.BTI)(t)===u,{showDialog:f,openAddRelationDialog:h,AddRelationDialogRenderer:g}=rn(n),b=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ra(e,t,n[t])}))}return e}({},i,{entity:t})),[i,t]);return l().createElement(l().Fragment,null,l().createElement("div",{className:lt()(s.container,{[s.hovered]:a&&m,[s.colored]:a})},a&&l().createElement(qn.Z,{className:s.removeButton,icon:ea.default,onClick:o,size:"XXS"}),l().createElement(Jn.Z,{entity:t}),a&&l().createElement("div",{className:s.matchControlsContainer},l().createElement(na,{mode:"normal",value:b,onActionsMenuClose:p,openAddRelationDialog:h,classes:{actionButton:s.rightButton,moreOptions:s.moreOptions}}))),f&&l().createElement(g,null))},headCellRenderer:Yn,label:""},matchRules:{cellRenderer:e=>{let{value:{metadata:t,entity:n,match:a,entitiesMap:r,show:o}}=e;return o?l().createElement(bt.Z,{entity:n,match:a,entitiesMap:r,metadata:t}):null},headCellRenderer:Yn},workflowCard:{cellRenderer:e=>{let{value:{entity:t,match:n}}=e;return l().createElement(ba,{entity:t,match:n})},headCellRenderer:Yn},sources:{cellRenderer:Ca,headCellRenderer:Yn},entityId:{headCellRenderer:Yn},crosswalks:{cellRenderer:e=>{let{value:{crosswalks:t,attributeType:n}}=e;const a=Ea(),o=(0,u.useSelector)(m.ZP.selectors.getMetadata),i=(0,r.useMemo)((()=>null==t?void 0:t.map((e=>((e,t,n)=>t.attributes.reduce(((t,a)=>(a.uri===d.G39.sourceSystems.uri?t.value[a.uri]=(0,d.tH7)(n,e.type):e[a.uri]&&(t.value[a.uri]=e[a.uri]),t)),{value:{crosswalk:e},uri:e.uri}))(e,n,o)))),[o,t,n]);return i?l().createElement(wa,{values:i,attributeType:n,LabelRenderer:xa,valueContainerClassName:a.crosswalk}):null},headCellRenderer:Qn,attributeType:{uri:"crosswalks",name:"crosswalks",type:"Nested",attributes:Object.values(d.G39)}},score:{headCellRenderer:Yn},relevanceScore:{headCellRenderer:Yn,cellRenderer:Ra}},ja=ya.filter((e=>{let{modes:t}=e;return t.includes(x.COLUMNS)})).map((e=>ka({},(0,p.pick)(["id","label","hideable"],e),Pa[e.id]))),Ta=(0,p.pipe)((0,p.split)("/"),p.last),Ia=e=>(0,p.when)(p.identity,(0,p.pipe)(p.values,(0,p.chain)((0,p.chain)((0,p.cond)([[(0,p.path)(["value","uri"]),(0,p.path)(["value","uri"])],[(0,p.path)(["value","values"]),(0,p.pipe)((0,p.path)(["value","values"]),(0,p.map)((0,p.prop)("uri")))]]))),(0,p.filter)(p.identity)))(e),Na=(e,t,n,a,r,l,o,i)=>{const{object:c,isMainEntity:s,matchRules:u,matchedValues:m,matchScore:f,matchRuleSummaries:h}=t;switch(r.id){case"entityId":return(0,d.BTI)(c);case"profile":return{mainEntity:a,isSelectedEntity:!s,onRemove:()=>o(t),entity:c,matchRules:u,permission:(0,d.hXd)(e,l,c,a,u),config:l};case"matchRules":return{metadata:e,entity:a,match:t,entitiesMap:n,show:!s&&!!u};case"sources":return c;case"crosswalks":return{crosswalks:c.crosswalks,attributeType:r.attributeType};case"workflowCard":return{entity:a,match:t};case"score":return f||0;case"relevanceScore":return h}if((0,d.vZp)(r.id)){const e=(0,d.xy8)(r.attributeType),t=(0,p.pipe)((0,p.pathOr)([],[e,r.attributeType.name]),(0,p.when)((0,p.always)(!i),(0,p.filter)(d.OXP)))(c);return{attributeType:r.attributeType,attributeValues:t,matchedValuesUris:Ia(m),showNonOv:i}}},Ba=l().createContext((()=>{}));Ba.displayName="ColumnHandlerContext";const Da=(0,p.pipe)((0,p.split)("."),(0,p.slice)(0,2),(0,p.join)(".")),Aa=(0,p.pipe)((0,p.map)((0,p.when)(d.vZp,Da)),p.uniq);var za=n(47019),Za=n(81774),_a=n(35488),Fa=n(82056);let Ha;!function(e){e.INSERT_BELOW="below",e.INSERT_ABOVE="above",e.HIDE="hide"}(Ha||(Ha={}));const La={[Ha.INSERT_BELOW]:le().text("Insert row below"),[Ha.INSERT_ABOVE]:le().text("Insert row above"),[Ha.HIDE]:le().text("Hide row")},Va=e=>{let{open:t,anchorEl:n,onClick:a,onClose:r,actions:o}=e;return l().createElement(za.ZP,{open:t,anchorEl:n,onClose:r},l().createElement(Za.Z,{component:"div"},o.map(((e,t)=>((e,t,n)=>l().createElement(_a.ZP,{button:!0,component:"div",key:n,onClick:t},l().createElement(Fa.Z,{primary:La[e],primaryTypographyProps:{variant:"body2"}})))(e,(e=>()=>{a(e)})(e),t)))))};var Wa=n(45013);function Ua(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ga=(e,t)=>e.filter(t).map((e=>e.columns?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Ua(e,t,n[t])}))}return e}({},e,{columns:Ga(e.columns,t)}):e)),qa=(0,r.memo)((e=>{let{anchorEl:t,onClose:n,actions:a,id:o,selectedAttributes:i,setSelectedAttributes:c,groupColumnsData:s}=e;const u=(0,r.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Ga(e,(e=>!t.some((t=>e.id===t))))}(s,i)),[s,i]),[p,d]=(0,r.useState)(),[m,f]=(0,r.useState)(!1);(0,r.useEffect)((()=>{t&&f(!0)}),[t]);const h=()=>{d(null),f(!1),n()};return l().createElement(l().Fragment,null,l().createElement(Va,{open:m,anchorEl:t,actions:a,onClose:()=>{f(!1),p||n()},onClick:e=>{if(e!==Ha.HIDE)d(e),f(!1);else{const e=[...i],t=i.indexOf(o);t>-1&&(e.splice(t,1),c(e),h())}}}),l().createElement(Wa.G,{hideCheckBox:!0,anchorEl:p?t:void 0,columnsData:u,selectedColumns:i,onColumnClick:e=>{let{id:t}=e;const n=[...i],a=i.indexOf(o),r=p===Ha.INSERT_ABOVE?a:a+1;n.splice(r,0,t),c(n),h()},onClose:h,title:le().text("Add row")}))}));function $a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xa="1px solid rgba(0,0,0,0.12)",Ya=(0,et.makeStyles)((e=>({container:{overflow:"auto",height:"100%",width:"100%"},comparisonTableWrapper:{display:"flex",alignItems:"flex-start",position:"relative"},collapsedRow:{display:"none"},comparisonTable:{borderSpacing:0,"& tbody tr:hover td, & tbody tr:hover th":{backgroundColor:"rgb(235, 235, 235)"},"table& tbody tr:hover td:nth-child(2)":{backgroundColor:"rgb(215, 228, 239)"},"& td, & th":{borderRight:Xa,borderBottom:Xa,margin:0,verticalAlign:"top",textAlign:"left",fontSize:"13px",minHeight:"16px",boxSizing:"border-box",wordBreak:"break-word",wordWrap:"break-word",backgroundColor:"white"},"& td":{minWidth:310,maxWidth:310,padding:"16px",overflow:"hidden",height:0},"& td:empty, th:empty":{padding:"0px 16px"},"& th":{minWidth:212,maxWidth:212,padding:"16px"},"& td:first-child, th:first-child":{borderLeft:Xa,position:"sticky",left:"0",zIndex:2,backgroundColor:"rgb(245, 245, 245)",color:e.palette.text.secondary,fontWeight:"normal"},"& td:nth-child(2), th:nth-child(2)":{borderRight:"2px solid rgba(0,0,0,0.12)",position:"sticky",left:"212px",zIndex:2},"& thead tr:first-child td, & thead tr:first-child th":{borderTop:"none",position:"sticky",top:"0",height:141,padding:0,zIndex:2},"& thead tr:nth-child(-n+2) td:nth-child(-n+2), & thead tr:nth-child(-n+2) th:nth-child(-n+2)":{zIndex:3},"table& tr td:nth-child(2), th:nth-child(2)":{backgroundColor:"rgb(224, 238, 249)"}},emptyState:{position:"sticky",top:"10vh",display:"flex",width:"100%"}})));function Ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Qa(e,t,n[t])}))}return e}function Qa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ja=[Ha.INSERT_BELOW,Ha.INSERT_ABOVE,Ha.HIDE],er=e=>{let{className:t,entity:n,metadata:a,config:o,selectedColumns:i,setSelectedColumns:c,selectedRows:s,setSelectedRows:u,entitiesMap:m={},rowsData:f,showNonOv:h=!1}=e;const g=Ya(),[b,y]=(0,r.useState)(s),[v,E]=(0,r.useState)(i),[x,w]=(0,r.useState)(null),[O,C]=(0,r.useState)(),[S,R]=(0,r.useState)();(0,r.useEffect)((()=>{y(s)}),[s]),(0,r.useEffect)((()=>{E(i)}),[i]);const k=(0,r.useMemo)((()=>v.slice(-4)),[v]),M=(0,r.useMemo)((()=>Aa(b)),[b]),P=(0,r.useMemo)((()=>((e,t,n)=>n.map((n=>{const a=ja.find((e=>{let{id:t}=e;return t===n}));if(a)return a;if(!(0,d.vZp)(n))return null;const r=(0,d.h2W)(n,t.type),l=(0,d.zeJ)(e,r,t.type),o=(0,d.xy8)(r);return l?{id:`${o}.${Ta(r)}`,label:l.label,attributeType:l,cellRenderer:Gn,headCellRenderer:(0,d.YkM)(l)?Qn:Yn}:null})).filter(p.identity))(a,n,M)),[a,n,M]),j=(0,r.useContext)(Ba),T=(0,r.useMemo)((()=>function(e,t,n,a,r,l,o){let i=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return[{object:n,isMainEntity:!0}].concat(a).map((a=>t.reduce(((t,c)=>(t[c.id]=Na(e,a,r,n,c,l,o,i),ka({},t,{isDraggable:!a.isMainEntity,id:a.object.uri}))),{})))}(a,P,n,k,m,o,j,h)),[a,P,k,n,m,o,j,h]),[I,N]=(0,r.useState)({}),B=(0,r.useCallback)((e=>{N((t=>Ka({},t,{[e]:!t[e]})))}),[]),D=(0,r.useMemo)((()=>({expandedMap:I,onExpandType:B})),[B,I]),A=(0,r.useMemo)((()=>({setHoveredId:C,setAnchor:R,hoveredId:O})),[O]),z=(0,r.useCallback)((()=>{C(null),R(null)}),[]),Z=(0,r.useMemo)((()=>P.map((0,p.prop)("id"))),[P]),_=(0,r.useCallback)((()=>{w(null)}),[]),F=(0,r.useMemo)((()=>({hoveredEntity:x,resetHoveredEntity:_})),[x,_]),{isThereAnyTask:H,setWorkflowTaskAvailability:L}=(e=>{const[t,n]=(0,r.useState)({}),a=(0,r.useCallback)(((e,t)=>{n((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){$a(e,t,n[t])}))}return e}({},n,{[e]:t})))}),[]);return{isThereAnyTask:(0,p.pipe)((0,p.map)(d.ev7),(0,p.any)((e=>t[e])))(e),setWorkflowTaskAvailability:a}})(k),V=H?void 0:g.collapsedRow,W=(0,r.useMemo)((()=>P.map((e=>V&&"workflowCard"===e.id?Ka({},e,{rowClassName:V}):e))),[P,V]);return l().createElement("div",{"data-reltio-id":"reltio-comparison-table-container",className:lt()(g.container,t)},l().createElement("div",{className:g.comparisonTableWrapper},l().createElement(ta.Provider,{value:F},l().createElement(zn.Provider,{value:D},l().createElement($n.Provider,{value:A},l().createElement(ma.Provider,{value:L},l().createElement(Nn.Z,{className:g.comparisonTable,rowsData:W,columnsData:T,theadRowsNumber:1,onMoveRow:(e,t)=>{const n=(0,p.pipe)((0,p.groupBy)((e=>(0,d.vZp)(e)?(0,d.hWO)(e):e)),p.toPairs)(b),a=n.findIndex((t=>{let[n]=t;return n===e})),r=n.findIndex((e=>{let[n]=e;return n===t})),l=n[a];l&&y((0,p.pipe)((0,p.remove)(a,1),(0,p.insert)(r,l),(0,p.chain)((0,p.nth)(1)))(n))},onDropRow:()=>{u(b)},onMoveColumn:(e,t)=>{const n=v.findIndex((t=>{let{object:n}=t;return n.uri===e})),a=v.findIndex((e=>{let{object:n}=e;return n.uri===t})),r=v[n];r&&E((0,p.pipe)((0,p.remove)(n,1),(0,p.insert)(a,r))(v))},onDropColumn:()=>{c(v)},setHoveredColumn:e=>{w((null==e?void 0:e.entityId)||null)},resetHoveredColumn:_}))))),!k.length&&l().createElement("div",{className:g.emptyState},l().createElement(Bn.ZP,{LogoRenderer:Bn.B9.SELECT_ATTRIBUTES,variant:Bn.tC.embedded,text:le().text("Select profiles"),secondaryText:le().text("Select one or more profiles to compare it with the current profile")})),l().createElement(qa,{id:O,anchorEl:S,onClose:z,actions:Ja,selectedAttributes:Z,setSelectedAttributes:u,groupColumnsData:f})))},tr=(0,et.makeStyles)({container:{display:"flex",flexDirection:"column"},table:{flex:1}}),nr=e=>{let{classes:t={},selectedRows:n,setSelectedRows:a,selectedColumns:r,setSelectedColumns:o,config:i,metadata:c,entity:s,entitiesMap:u={},rowsData:p,showNonOv:d}=e;const m=tr();return l().createElement("div",{className:lt()(t.root,m.container)},l().createElement(er,{className:m.table,entity:s,metadata:c,config:i,selectedRows:n,setSelectedRows:a,selectedColumns:r,setSelectedColumns:o,rowsData:p,entitiesMap:u,showNonOv:d}))};var ar=n(48030),rr=n(85103),lr=n(87907),or=n(49290),ir=n(45108),cr=n(92332),sr=n(25843),ur=n(47591);function pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){dr(e,t,n[t])}))}return e}function dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mr={position:"relative",whiteSpace:"pre",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"},color:"rgba(0,0,0,0.87)"},fr={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},hr=(e,t)=>({"& > *":{position:"relative"},"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:e,pointerEvents:"none","div.hoveredRow &":{background:t||"none"}},"& $defaultWrapper::after":{background:`linear-gradient(to right, ${(0,ur.Fq)(e,0)}, ${e} 100%)`,"div.hoveredRow &":{background:t&&`linear-gradient(to right, ${(0,ur.Fq)(t,0)}, ${t} 100%)`}}}),gr=(0,et.makeStyles)((e=>{const t=(0,ur.$n)(e.palette.primary.main,.88),n=(0,ur.$n)(e.palette.primary.main,.82),a=(0,ur.$n)("rgb(140,193,82)",.88),r=(0,ur.$n)("rgb(0, 114, 206)",.88),l={color:e.palette.primary.main,cursor:"pointer",textDecoration:"none"};return{link:l,hidden:{visibility:"hidden"},rowCloseIcon:{color:"rgba(0, 0, 0, 0.54)",margin:"0 24px 0 8px"},headCell:{display:"flex",alignItems:"center",height:"56px",fontSize:"12px",position:"relative",flex:1,overflow:"hidden",color:"rgba(0,0,0,0.87)",backgroundColor:"rgba(0, 0, 0, 0.06)","&::after":pr({},fr,{width:"30px",backgroundImage:"none"})},firstHeadCell:{paddingLeft:"42px"},headCellWithEntity:{height:"100%",display:"flex",flexDirection:"column"},rowCell:{fontSize:"12px",overflow:"hidden"},rowCellFirstColumn:{height:"100%"},firstEntityCell:{maxHeight:"200px"},entityRowCell:{fontSize:"12px",position:"relative"},entityRowCellSelected:hr(r),rowCellHighlighted:hr(a),rowCellSelected:hr(t,n),defaultWrapper:pr({},mr,{"&::after":pr({},fr,{"div.hoveredRow &":{background:"linear-gradient(to right, rgba(238, 238, 238, 0), rgba(238, 238, 238, 1) 100%)"}})}),hoveredDefaultWrapper:pr({},mr),entityWrapper:{paddingLeft:"12px"},profileWrapper:{height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",position:"relative"},entityLabel:pr({},l,{fontWeight:500}),commentsContainer:{position:"absolute",right:0,top:0,zIndex:1,height:"100%",display:"flex",alignItems:"center",paddingRight:"15px",backgroundColor:"#fff","&$checked":{backgroundColor:t}},checked:{},matchRulesWrapper:{padding:"15px 15px 8px 10px",display:"flex",flexDirection:"column",boxSizing:"border-box"},blobWrapper:pr({},mr,{whiteSpace:"pre-wrap",height:"100px",boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}),imageWrapper:pr({},mr,{display:"flex","& > img":{height:"64px",width:"64px"}}),referenceWrapper:{display:"flex",alignItems:"center",boxSizing:"border-box",height:"48px",paddingTop:0,"&:last-child":{paddingBottom:0}},entityAvatar:{transform:"scale(0.5)",marginLeft:"-10px"},collapseButton:{position:"absolute",left:"40px",zIndex:2},dragIndicator:{position:"absolute",left:"-5px",zIndex:2,cursor:"grab"},dragIndicatorIcon:{opacity:.38},ovFalse:e.inactive,expandButton:{marginRight:"5px",marginBottom:"8px"}}})),br=(0,sr.Z)((e=>{const t=gr();return l().createElement("div",{className:t.headCell},l().createElement(cr.default,e))}));var yr=n(67586);const vr=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const{value:a,ov:r}=t,o=gr();return l().createElement("div",{className:lt()(o.defaultWrapper,{[o.ovFalse]:!1===r})},l().createElement(yr.Z,{value:a,dataTypeDefinition:n}))};var Er=n(60824),xr=n(91431),wr=n(30488),Or=n(89323);const Cr=(0,wr.Z)(((e,t)=>{let{onToggleSelect:n,entityToMatch:a}=e,{rowValue:r,value:l}=t;const{rawValue:o}=r;return{onRemove:()=>n(o),isRowRemovable:l!==a,entityToMatch:a}}))((e=>{let{value:t,rowIndex:n,rowValue:a,onRemove:o,entityToMatch:i,isRowSelected:c,hoverRowIndex:s,dragRef:u}=e;const p=gr(),m=(0,r.useContext)(Er.B),f=t!==i,h=n===s,g=0===n,b=h?p.hoveredDefaultWrapper:p.defaultWrapper,y=t.uri!==i.uri&&!h;return l().createElement(l().Fragment,null,l().createElement("div",{className:lt()(b,p.profileWrapper,p.entityWrapper,{[p.firstEntityCell]:g&&!f})},l().createElement("div",{ref:u,style:{opacity:h?1:0},className:p.dragIndicator},l().createElement(Or.Z,{className:p.dragIndicatorIcon})),l().createElement(xr.Z,{className:p.collapseButton,rowIndex:n,rowValue:a}),l().createElement(qn.Z,{icon:ea.default,size:"XS",className:lt()(p.rowCloseIcon,{[p.hidden]:!f}),onClick:o,"data-reltio-id":`reltio-matches-table-${m?m+"-":""}checkbox-${n}`}),l().createElement(ht.Z,{value:(0,d.wwR)(t),className:p.entityLabel},(0,d.idV)(t.label)),y&&l().createElement(gt.Z,{className:lt()(p.commentsContainer,{[p.checked]:c}),uri:(0,d.E_P)(i.uri,t.uri),objectType:d.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,d.wp9)(d.q7e.POTENTIAL_MATCH,{entityUri:i.uri,matchEntityUri:t.uri}),allowOnlyOneComment:!0})))})),Sr=(0,wr.Z)()((0,sr.Z)((e=>{const t=0===e.headIndex,n=gr();return l().createElement("div",{className:lt()(n.headCell,{[n.firstHeadCell]:t})},l().createElement(cr.default,e))}))),Rr=e=>{let{value:t}=e;const n=gr();if(!t)return null;const{metadata:a,match:r,entitiesMap:o,entity:i,variant:c}=t;return l().createElement("div",{className:n.matchRulesWrapper},l().createElement(bt.Z,{variant:c,metadata:a,entitiesMap:o,match:r,entity:i}))},kr=e=>{let{value:t}=e;const{value:n,ov:a}=t,r=gr();return l().createElement("div",{className:lt()(r.blobWrapper,{[r.ovFalse]:!1===a}),onScroll:N.UW},n)},Mr=e=>{let{value:t}=e;const{value:n}=t,a=gr(),r=(0,d.efz)({value:n});return r&&l().createElement("div",{className:a.imageWrapper},l().createElement("img",{src:r}))};var Pr=n(96379);const jr=e=>{let{value:t}=e;const n=gr(),a=(0,u.useSelector)(m.ZP.selectors.getMetadata);return t&&l().createElement("div",{className:lt()(n.defaultWrapper,n.referenceWrapper,{[n.ovFalse]:!1===t.ov})},l().createElement(Pr.Z,{className:n.entityAvatar,entityType:(0,d.nt9)(a,(0,d.CZ8)(t).type)}),l().createElement(ht.Z,{value:(0,d.CZ8)(t).objectURI,className:n.link},(0,d.idV)(t.label)))};var Tr=n(3073);const Ir=l().createContext(null);Ir.displayName="EntityRowCollapseContext";var Nr=n(78223),Br=n(19926);const Dr=(0,et.makeStyles)({chipContainer:{position:"absolute",height:"16px",top:"6px",right:"6px",zIndex:2},chipLabel:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px"}}),Ar=(0,Nr.Z)(Br.Z),zr=e=>{let{needShowChip:t,crosswalks:n,dataTenant:a}=e;const o=Dr(),i=(0,r.useContext)(Tr.x),c=(0,r.useContext)(Ir)||i,s=(0,u.useSelector)(m.ZP.selectors.getMetadata)||{},f=(0,u.useSelector)(m.ZP.selectors.getDataTenants)||[];if(!t)return null;const h=l().createElement(l().Fragment,null,n.slice(c.maxRowValuesCount).map(((e,t)=>l().createElement("div",{key:t},"-",(0,d.tH7)(s,e.type)))),a?l().createElement("div",null,"-",(0,p.pipe)((0,p.find)((0,p.propEq)("id",a)),(0,p.prop)("label"))(f)):null);return l().createElement(Ar,{tooltipTitle:h,label:"+ "+(n.length+(a?1:0)-c.maxRowValuesCount),variant:"outlined",classes:{root:o.chipContainer,label:o.chipLabel}})},Zr=e=>{let{value:{crosswalks:t,dataTenant:n}}=e;const a=gr(),[o,i]=(0,r.useState)(!0),c=(0,r.useContext)(Tr.x),s=(0,r.useContext)(Ir)||c,u=(0,r.useCallback)((()=>{i((e=>!e))}),[]),d=(0,r.useMemo)((()=>(0,p.when)((0,p.always)(o),(0,p.slice)(0,s.maxRowValuesCount))(t)),[o,s.maxRowValuesCount,t]),m=!o||d.length<s.maxRowValuesCount,f=(0,r.useMemo)((()=>({crosswalks:d,dataTenant:m?n:void 0})),[n,d,m]),h=t.length+(n?1:0)>s.maxRowValuesCount,g=o&&h;return l().createElement(l().Fragment,null,l().createElement(Ca,{value:f},h&&l().createElement(Kn.Z,{className:a.expandButton,expanded:!o,onClick:u})),l().createElement(zr,{needShowChip:g,crosswalks:t,dataTenant:n}))},_r=e=>{let{value:t}=e;const n=gr();return l().createElement("div",{className:n.defaultWrapper},l().createElement(Ra,{value:t.matchRuleSummaries}))};function Fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hr=(0,p.split)("."),Lr=(e,t,n,a,r)=>n.map((n=>{const l=n.object,o=n.matchRules||[],i=n.matchScore||0,c=(0,d.w80)(e,l.type,o),s={entity:l,metadata:e,match:n,entitiesMap:r,matchScore:i},u=t.filter((e=>{let{modes:t}=e;return!t||t.includes(x.TABLE)}));return(0,p.pipe)((0,p.reduce)(((e,t)=>(0,p.assoc)(t.id,((e,t,n)=>{let{entity:a,metadata:r,match:l,entitiesMap:o,matchScore:i}=t;switch(e.id){case"profile":return a;case"entityId":return{value:(0,d.BTI)(a)};case"matchRules":return{metadata:r,match:l,entitiesMap:o,entity:a,variant:"all"};case"score":return{value:i};case"sources":{const e=(0,p.propOr)([],"crosswalks",a);return(0,d.biM)(a)?{crosswalks:e,dataTenant:a.dataTenant}:{crosswalks:e}}case"relevanceScore":return{matchRuleSummaries:l.matchRuleSummaries};default:{const[t,...r]=Hr(e.id);return(0,p.pipe)((0,p.prop)(t),(0,p.ifElse)((0,p.always)(n),(0,d.pfb)(r),(0,d.BgZ)(r)))(a)}}})(t,s,a),e)),{}),(0,p.assoc)("matchAttributes",c),(0,p.assoc)("rawValue",n))(u)})),Vr=e=>{if((0,d.vZp)(e)){const[,...t]=Hr(e);return t.length>1?t.slice(0,-1):null}return null},Wr=e=>{switch(e.id){case"profile":return Cr;case"matchRules":return Rr;case"sources":return Zr;case"relevanceScore":return _r;default:return(e=>{switch(e){case d.oS0.TYPE_BLOB:return kr;case d.oS0.TYPE_IMAGE:return Mr;case d.oS0.TYPE_REFERENCE:return jr;default:return vr}})(e.dataTypeDefinition.type)}},Ur=(0,Nr.Z)(Br.Z),Gr=e=>{let{columnData:t,rowValue:n,cellIndex:a,rowIndex:o}=e;const i=Dr(),c=(0,r.useContext)(Tr.x),s=(0,r.useContext)(Ir)||c,u=t.id.startsWith("attributes."),p=t.id,m=u?n[p]:[],f=m.flat().length;if(!(u&&0===a&&f>(null==s?void 0:s.maxRowValuesCount)&&(null==s?void 0:s.getIsRowCollapsed(o))))return null;const h=m.slice(s.maxRowValuesCount).map(((e,n)=>l().createElement("div",{key:n},(0,d.YkM)(t.dataTypeDefinition)?(0,d.idV)(e.label):(0,d.VGB)(e).map(((e,n)=>l().createElement(yr.Z,{key:n,value:(0,d.kDl)(e),dataTypeDefinition:t.dataTypeDefinition,rich:!1}))))));return l().createElement(Ur,{tooltipTitle:h,label:"+ "+(f-s.maxRowValuesCount),variant:"outlined",classes:{root:i.chipContainer,label:i.chipLabel}})};function qr(){return qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},qr.apply(this,arguments)}const $r=(0,wr.Z)(((e,t)=>{let{selected:n}=e,{columnData:a,rowValue:r,cell:l}=t;return{isRowSelected:!!n&&n.includes(r.rawValue),isCellHighlighted:pe(r.matchAttributes,a)&&!l.values.every(d.O27)}}))((e=>{let{rowValue:t,cell:n,CellValueRenderer:a,isRowSelected:r,isCellHighlighted:o,columnIndex:i,cellWrapperClassName:c,someRowIsDragging:s}=e,u=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["rowValue","cell","CellValueRenderer","isRowSelected","isCellHighlighted","columnIndex","cellWrapperClassName","someRowIsDragging"]);const p=gr(),d=0===i,m=!s||d,{cellIndex:f,columnData:h,rowIndex:g}=u;return l().createElement("div",{className:lt()({[p.rowCellSelected]:r,[p.rowCellHighlighted]:o,[p.rowCellFirstColumn]:d},p.rowCell,c)},m&&l().createElement(l().Fragment,null,n.values.map(((e,n)=>l().createElement(a,qr({key:n,value:e,rowValue:t,isRowSelected:r},u)))),l().createElement(Gr,{cellIndex:f,rowIndex:g,rowValue:t,columnData:h})))}));var Xr=n(96253);const Yr=(0,et.makeStyles)((e=>({tableContainer:{flex:1,display:"flex",color:"rgba(0,0,0,0.54)",overflow:"hidden",background:e.palette.background.paper},rowActionButtonsWrapper:{height:"100%",display:"flex",alignItems:"center",marginRight:"1px"},rowActionButtons:{backgroundColor:"rgba(238, 238, 238, 1)","&$checked":{backgroundColor:(0,ur.$n)(e.palette.primary.main,.82)}},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",backgroundColor:"rgba(238, 238, 238, 1)",borderLeft:"1px solid rgba(0,0,0,0.12)","&$checked":{backgroundColor:(0,ur.$n)(e.palette.primary.main,.82)}},checked:{},actionButton:{marginLeft:"12px","&:last-child":{marginRight:"3px"}},hoveredRowRightContentContainer:{alignItems:"center !important"},dragColumnHead:{"& #headCell":{border:"1px solid",borderColor:e.palette.primary.main},"& #entityCell":{borderLeft:"1px solid",borderRight:"1px solid",borderLeftColor:e.palette.primary.main,borderRightColor:e.palette.primary.main}},dragColumnBody:{borderLeft:"1px solid",borderRight:"1px solid",borderLeftColor:e.palette.primary.main,borderRightColor:e.palette.primary.main},sourcesCell:{display:"flex",flexWrap:"wrap",padding:"15px",columnGap:"5px",rowGap:"8px",alignItems:"center"}})));function Kr(){return Kr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Kr.apply(this,arguments)}const Qr=e=>{let{hoverRowIndex:t,hoveredRowRightContent:n,basicTableRef:a,changeRowCellHeight:r}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["hoverRowIndex","hoveredRowRightContent","basicTableRef","changeRowCellHeight"]);const i=Yr();switch(o.columnData.id){case"profile":return l().createElement($r,Kr({},o,{hoverRowIndex:t,actionsContent:n,tableRef:a}));case"matchRules":return l().createElement(Xr.Z,Kr({onChangeHeight:r},o),l().createElement($r,o));case"sources":return l().createElement(Xr.Z,Kr({onChangeHeight:r},o),l().createElement($r,Kr({cellWrapperClassName:i.sourcesCell},o)));default:return l().createElement($r,o)}};function Jr(){return Jr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Jr.apply(this,arguments)}const el=e=>e.profile.uri,tl=e=>{let{columnData:{id:t},cellIndex:n,rowValue:a}=e;return`${t}[${el(a)}][${n}]`},nl=e=>{let{entity:t,matches:n,metadata:a,columnsData:o,onReorderingColumn:i,config:c,filters:s,onFilter:u,sorting:m,onSort:f,selected:h,onToggleSelect:g,onResetSelect:b,onSelectAll:y,entitiesMap:v,basicTableRef:E,isComparisonViewShown:w,showNonOv:O}=e;const C=Yr(),[S,R]=(0,r.useState)(n);(0,r.useEffect)((()=>{R(n)}),[n]);const k=(0,r.useCallback)(((e,t)=>{R((0,p.move)(e,t)),W(t)}),[]),M=(0,r.useMemo)((()=>Lr(a,o,S,O,v)),[a,o,S,O,v]),P=!!f,j=(0,r.useMemo)((()=>((e,t)=>(0,p.pipe)((0,p.filter)((e=>{let{modes:t}=e;return!t||t.includes(x.TABLE)})),(0,p.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Fr(e,t,n[t])}))}return e}({sortable:e},t,{resizable:!0,nestedPath:Vr(t.id),headCellRenderer:"profile"===t.id?Sr:br,rowCellValueRenderer:Wr(t),draggable:(0,p.propOr)(!0,"draggable")(t)}))))(t))(P,o)),[o,P]),T=(0,r.useMemo)((()=>t?Lr(a,o,[{object:t}],O):[]),[t,a,o,O]),I=(0,r.useCallback)((e=>{let{what:t,where:n}=e;const a=j[t.columnIndex].id,r=j[n.columnIndex].id;i(a,r)}),[j]),N=(0,r.useMemo)((()=>({isAllSelected:h.length>0&&h.length===n.length,entityToMatch:t,selected:h,onToggleSelect:g,onResetSelect:b,onSelectAll:y,isComparisonViewShown:w})),[t,h,g,b,y,n,w]),{getDynamicRowCellHeight:B,changeRowCellHeight:D,clearHeightsCache:A}=(0,ar.Z)(tl),[z,Z]=(0,r.useState)(!1),_=(0,r.useCallback)((()=>Z(!0)),[]),F=(0,r.useCallback)((()=>Z(!1)),[]),[H,L]=(0,r.useState)(!1),[V,W]=(0,r.useState)(null),U=(0,r.useCallback)((e=>{W((t=>z||H?t:e))}),[z,H]),{showDialog:G,openAddRelationDialog:q,AddRelationDialogRenderer:$}=rn(c),X=(0,r.useMemo)((()=>{if(null===V)return null;const e=S[V];if(!e)return null;const n=(0,d.hXd)(a,c,e.object,t,e.matchRules),r=h.includes(e);return l().createElement("div",{className:lt()(C.rowActionButtonsWrapper)},l().createElement("div",{className:lt()(C.rowActionButtons,{[C.checked]:r})},l().createElement(na,{value:{mainEntity:t,entity:e.object,matchRules:e.matchRules,permission:n},openAddRelationDialog:q,onActionsMenuClose:F,onActionsMenuOpen:_,classes:{actionButton:C.actionButton,moreOptions:C.actionButton}})),t&&l().createElement(gt.Z,{className:lt()(C.commentsContainer,{[C.checked]:r}),uri:(0,d.E_P)(t.uri,e.object.uri),objectType:d.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,d.wp9)(d.q7e.POTENTIAL_MATCH,{entityUri:t.uri,matchEntityUri:e.object.uri}),onChangePopupVisibility:L,allowOnlyOneComment:!0,showAlways:!0}))}),[V,S,h,C,t,c,a,_,F,q]),Y=(0,r.useCallback)((e=>l().createElement(Qr,Jr({hoverRowIndex:V,hoveredRowRightContent:X,basicTableRef:E,changeRowCellHeight:D},e))),[V,X,E,D]),K=(0,r.useCallback)((0,p.either)(B,rr.Z),[B,rr.Z]),Q=(0,r.useMemo)((()=>({hoveredRowRightContentContainer:C.hoveredRowRightContentContainer,dragColumnHead:C.dragColumnHead,dragColumnBody:C.dragColumnBody})),[C]),{getDynamicRowCellHeight:J,changeRowCellHeight:ee,clearHeightsCache:te}=(0,ar.Z)(tl),ne=(0,r.useCallback)((e=>l().createElement(Qr,Jr({changeRowCellHeight:ee},e))),[ee]),ae=(0,r.useCallback)((0,p.either)(J,rr.Z),[J,rr.Z]),{getRowHeight:re,getHeightForSubRow:le,tableRowsData:oe,collapseContextValue:ie}=(0,lr.Z)({rowsData:T,columnsData:j,maxRowValuesCount:3,getRowCellHeight:ae,renderRowCell:ne,getIdFromRowValue:el}),ce=re(null==t?void 0:t.uri),se=(0,r.useMemo)((()=>{const e=((e,t,n,a,r,o)=>i=>c=>{const s=gr();return l().createElement(Er.B.Provider,{value:"tableHeader"},l().createElement("div",{className:s.headCellWithEntity},l().createElement("div",{id:"headCell"},l().createElement(i,c)),l().createElement(e,{className:lt()(s.entityRowCell,s.entityRowCellSelected),columnId:c.headCellData.id,rowIndex:0,getHeightForSubRow:n,tableRowsData:a,getRowHeight:r,columnsData:o,collapseContextValue:t,id:"entityCell"})))})(or.r,ie,le,oe,re,j);return j.map((0,p.evolve)({headCellRenderer:e}))}),[ie,le,oe,re,j]);return(0,r.useLayoutEffect)((()=>{A(),te()}),[te,A,null==t?void 0:t.uri]),l().createElement("div",{"data-reltio-id":"reltio-matches-table-container",className:C.tableContainer},l().createElement(ir.Z,{fixFirstColumn:!0,columnsData:se,rowsData:M,context:N,sorting:m,onSort:f,filters:s,onFilter:u,defaultColumnWidth:250,defaultColumnMinWidth:100,headRowHeight:56+ce,renderRowCell:Y,getRowCellHeight:K,hoverStateEnabled:!0,hoveredRowRightContent:X,hoverRowIndex:V,onRowHover:U,classes:Q,getIdFromRowValue:el,maxRowValuesCount:3,dndRowReorderingEnabled:!0,dndColumnReorderingEnabled:!0,dndColumnReorderingHandler:I,dndRowReorderingHandler:k,ref:E,hoveredContentPosition:0}),G&&l().createElement($,null))},al=(0,et.makeStyles)({comparisonView:{width:"100%",overflow:"auto"}});function rl(){return rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},rl.apply(this,arguments)}const ll=e=>{let{config:t,isLoaded:n,savedState:a,onUpdateSavedState:o}=e;const i=(0,u.useSelector)(m.ZP.selectors.getMetadata),c=(0,u.useSelector)(m.ZP.selectors.getEntity),s=(0,u.useDispatch)(),{selectedItems:f,entitiesMap:h,comparisonViewMode:g}=ne(),{toggleSelect:b,setSelectedItems:y,setComparisonViewMode:v,actualizeSelectedItemsColors:E}=ae(),{isGlobalSpinnerActive:w}=Be(),{uri:O}=c||{};((e,t)=>{const{setSelectedItems:n,setGlobalSpinner:a}=ae(),l=(0,r.useCallback)((()=>{a(!0)}),[a]),o=(0,r.useCallback)((()=>{a(!1)}),[a]),i=(0,p.prop)("uri",t),c=(0,p.prop)("dataTenant",t),s=(0,r.useMemo)((()=>({enabled:!!i,entity:t,filter:"",page:0,sorting:{field:"score",order:d.KM9.desc},rowsPerPage:3,options:ln,onStartLoading:l,onFinishLoading:o})),[c,i]),{matches:u}=(0,Vt.s)(s);(0,r.useEffect)((()=>{n(u)}),[u,n])})(0,c),(0,r.useEffect)((()=>{E()}),[f]);const{addReloadHandler:S,removeReloadHandler:R}=k();(0,r.useEffect)((()=>{const e=()=>{s(m.N5.entity.actions.loadEntity({uri:(0,d.wwR)(c)}))};return S(e),()=>R(e)}),[c,s,S,R]);const M=(0,r.useMemo)((()=>(0,d.NVY)(O,Object.keys(h))),[O,h]),P=(0,Ft.C)({objectIds:M}),j=al(),[T,I,N]=(e=>{let{defaultColumnsData:t,additionalColumnsData:n,metadata:a,entityTypeUri:l}=e;return(0,r.useMemo)((()=>{const e=ue(a,l),r=t.concat(n||[]).concat(e),o=(0,d.qhs)(a,l),i=((e,t)=>{const[n,a]=(0,p.pipe)((0,p.reject)(de),(0,p.partition)(pe(e)))(t);return n.length?[{id:"match",label:le().text("Match attributes"),columns:t.filter(ge(n))},{id:"all",label:le().text("All attributes"),columns:t.filter(ge(a))}]:t})(o,r);return[r,i,(0,p.pipe)(be,(0,p.concat)(t),we)(o,e)]}),[t,n,a,l])})({defaultColumnsData:ya,metadata:i,entityTypeUri:c.type}),[B,D]=(0,r.useState)(N),[A,z]=(0,r.useState)(!1),Z=(0,r.useMemo)((()=>B.map((e=>T.find((0,p.propEq)("id",e)))).filter(p.identity)),[B,T]),_=(0,r.useCallback)(((e,t)=>{const n=B.indexOf(e),a=B.indexOf(t);D((0,p.move)(n,a))}),[B]),F={entity:c,metadata:i,selectedColumns:f||[],setSelectedColumns:y,config:t,selectedRows:B,setSelectedRows:D,entitiesMap:h,rowsData:I,showNonOv:A},H={entity:c,metadata:i,entitiesMap:h,config:t,matches:f,columnsData:Z,onReorderingColumn:_,onSelectAll:()=>{},onToggleSelect:b,onResetSelect:()=>{},selected:[],isComparisonViewShown:!1,showNonOv:A};return(0,r.useEffect)((()=>{n&&(null!=a&&a.visibleColumns&&D(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,p.pipe)((0,p.filter)((0,p.propEq)("hideable",!1)),(0,p.map)((0,p.prop)("id"))),n=(0,p.pipe)(p.concat,p.uniq),a=t(ya);return n(a,e)}(a.visibleColumns)),null!=a&&a.comparisonViewMode&&v(a.comparisonViewMode),(0,p.has)("showNonOv",a)&&z(a.showNonOv))}),[n,a]),(0,r.useEffect)((()=>{n&&o({comparisonViewMode:g,visibleColumns:B,showNonOv:A})}),[B,g,A]),l().createElement(l().Fragment,null,l().createElement(In,{config:t,columnsData:I,selectedColumns:B,onChangeColumns:D,showNonOv:A,onChangeShowNonOv:z}),l().createElement(Ht.e,{collaboration:P},g===x.COLUMNS?l().createElement(yn.l,null,l().createElement(Ba.Provider,{value:b},n&&l().createElement(nr,rl({},F,{classes:{root:j.comparisonView}})))):n&&l().createElement(nl,H)),w&&l().createElement(C.Z,null))};var ol=n(22118);function il(){return il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},il.apply(this,arguments)}const cl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",il({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.25 3H3.75c-.825 0-1.5.675-1.5 1.5v9c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-9c0-.825-.675-1.5-1.5-1.5zm-9 10.5h-1.5v-6h1.5v6zM3.75 6h1.5V4.5h-1.5V6zm6 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6zm7.5 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6z",fill:"#000",fillOpacity:".541"}))},sl=(0,et.makeStyles)({flexBox:{display:"flex",alignItems:"center"},icon:{display:"flex",alignItems:"center",margin:"0 4px"}}),ul=()=>{const{selectedItems:e,comparisonViewMode:t,limitSelection:n}=ne(),{setComparisonViewMode:a,deleteExtraMatches:o}=ae(),i=sl(),c=(0,r.useCallback)((()=>{a(x.TABLE)}),[a]),s=t===x.COLUMNS&&e.length>n,u=le().text("Switch to table view"),p=l().createElement("div",{className:i.flexBox},le().text("Please switch to"),l().createElement("div",{className:i.icon},l().createElement(cl,null)),le().text("Table View to compare more than ${max} profiles",{max:4}));return l().createElement(ol.Z,{open:s,title:u,content:p,onSave:c,onDiscard:o,saveCaption:le().text("Proceed"),discardCaption:le().text("Cancel")})},pl=(0,et.makeStyles)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},potentialMatchesWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},potentialMatchesContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var dl=n(83104);function ml(){return ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ml.apply(this,arguments)}const fl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",ml({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{d:"M20 4v14h2V4c0-1.1-.9-2-2-2H6v2h14zM2 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12z",fill:"currentColor"}))};function hl(){return hl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},hl.apply(this,arguments)}const gl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",hl({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{d:"M10 12a4 4 0 100-8 4 4 0 000 8zM10.35 14.01C7.62 13.91 2 15.27 2 18v2h9.54c-2.47-2.76-1.23-5.89-1.19-5.99zM19.43 18.02c.36-.59.57-1.28.57-2.02 0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4c.74 0 1.43-.22 2.02-.57L20.59 22 22 20.59l-2.57-2.57zM16 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor"}))};function bl(){return bl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bl.apply(this,arguments)}const yl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",bl({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 20h15.002L21 23l1.27-1.27-20-20.01L1 2.99l6.172 6.175a4.007 4.007 0 002.66 2.662l2.23 2.23A10.754 10.754 0 0011 14c-2.67 0-8 1.34-8 4v2zm8-16a3.987 3.987 0 00-2.795 1.137l5.656 5.659A3.999 3.999 0 0011 4z",fill:"#000",fillOpacity:".54"}))};var vl=n(37346),El=n(31780),xl=n(14787);const wl=(0,et.makeStyles)({input:{margin:0,borderRadius:"4px",width:"100%",paddingTop:0,paddingBottom:0}});function Ol(){return Ol=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ol.apply(this,arguments)}const Cl=e=>{let{rowData:t,rowContext:n}=e;const a=wl(),{values:o=[],attribute:{attrType:i,fieldName:c=null}={},filter:s,id:u}=t||{},{changeFilter:m}=n,{entityType:f}=n,h=(0,r.useCallback)((e=>{m({fieldName:c,filter:s,values:e},u)}),[m,u,c,s]),g=(0,r.useMemo)((()=>({InputProps:{classes:{root:a.input}}})),[a]),b={values:o[0]||[],onChange:(0,p.pipe)(d.FTe,h),TextFieldProps:g,fullWidth:!0};return(0,d.pzC)(i)?l().createElement(vl.Z,Ol({},b,{name:i.name,entityType:f})):(0,d.OFd)(i)?l().createElement(El.Z,b):l().createElement(xl.Z,{rowContext:n,rowData:t})};var Sl=n(30721),Rl=n(51548),kl=n(7342);function Ml(){return Ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ml.apply(this,arguments)}const Pl=(0,et.makeStyles)({divider:{marginBottom:"14px",marginRight:"16px",borderColor:"rgba(0, 0, 0, 0.121569)"},optionLabel:{fontSize:"13px",paddingLeft:"10px"}}),jl={FilterSelector:e=>{const{rowData:t}=e,{attribute:{attrType:n}={}}=t||{},a=(0,d.pzC)(n)?[d.j5E.EQUALS].map((e=>({value:e,label:(0,kl.Z)((0,d.XS2)(e))}))):null;return l().createElement(Rl.Z,Ml({},e,{options:a}))},ValuesEditor:Cl},Tl=e=>{let{filters:t,onChange:n,attributeTypes:a,options:o}=e;const i=Pl(),[c,s]=(0,r.useState)(o.showTransitiveMatches);return l().createElement(dl.Z,{dataReltioId:"potential-matches-filter-button",filters:t,onChange:e=>n(e,{showTransitiveMatches:c}),attributeTypes:a,components:jl,onTogglePopup:e=>{e&&s(o.showTransitiveMatches)},isFiltersApplied:!!(0,d.Uqd)()(t)||o.showTransitiveMatches},l().createElement(Sl.Z,{classes:{label:i.optionLabel},control:l().createElement(Ye.Z,{checked:c,onChange:e=>s(e.target.checked),color:"primary"}),label:le().text("Show transitive matches")}),l().createElement(mt.Z,{light:!0,className:i.divider}))};function Il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Nl(e,t,n[t])}))}return e}function Nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bl={ValuesEditor:Cl},Dl=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(ln),[o,i]=(0,r.useState)([]),[c,s]=(0,r.useState)([]),[p,f]=(0,r.useState)({field:Ee[0].id,order:d.KM9.desc}),[h,g]=(0,r.useState)({field:we(xe)[0],order:d.KM9.asc}),[b,y]=(0,r.useState)({field:we(xe)[0],order:d.KM9.asc}),[v,x]=(0,r.useState)(null),w=(0,u.useSelector)(m.ZP.selectors.getMetadata),O=(0,u.useSelector)(m.ZP.selectors.getEntity),C=(0,r.useCallback)((e=>{x((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{x(null)}),[]),R=(0,d.nt9)(w,null==O?void 0:O.type),k=(0,r.useMemo)((()=>(e=>((null==e?void 0:e.attributes)||[]).concat((null==e?void 0:e.analyticsAttributes)||[]).filter(d.Uty))(R)),[R]),M=(0,r.useMemo)((()=>[Il({},d.S91.matchRules,{check:d.Ir}),Il({},d.S91.MLRecommendedMatch,{check:d.XQO})].reduce(((e,t)=>{let{check:n}=t,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(t,["check"]);return n(R)&&e.push(a),e}),[])),[R]),P=(0,r.useMemo)((()=>[...M,d.C68.relevanceScore,d.C68.matchAction,...k]),[k,M]),j=(0,r.useMemo)((()=>[d.xPW.id,d.G39.sourceSystems,...k]),[k]),T=(e,n)=>{a(n),t(e)};return{active:v,tabs:(0,r.useMemo)((()=>[{buttonProps:{id:E.PotentialMatches,icon:fl,tooltipTitle:le().text("Potential Matches")},headerProps:{mainTitle:le().text("Potential Matches"),rightContent:l().createElement(Tl,{filters:e,onChange:T,attributeTypes:P,options:n})},filters:e,options:n,sorting:p,onSorting:f},{buttonProps:{id:E.FindMatches,icon:gl,tooltipTitle:le().text("Find Matches")},headerProps:{mainTitle:le().text("Find Matches"),rightContent:l().createElement(dl.Z,{filters:o,onChange:i,attributeTypes:j,components:Bl})},filters:o,sorting:h,onSorting:g},{buttonProps:{id:E.NotAMatch,icon:yl,tooltipTitle:le().text("Not a Match")},headerProps:{mainTitle:le().text("Not a Match"),rightContent:l().createElement(dl.Z,{filters:c,onChange:s,attributeTypes:k})},filters:c,sorting:b,onSorting:y}]),[e,n,o,c,P,j,p,h,b,k]),toggleActive:C,onClose:S}},Al=()=>{const{isGlobalSpinnerActive:e}=Be();return e?l().createElement(C.Z,null):null};function zl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Zl(e,t,n[t])}))}return e}function Zl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _l=e=>{let{config:t,getSavedState:n,saveState:a}=e;const o=pl(),i=(0,u.useSelector)(m.ZP.selectors.getEntity),{SnackbarRenderer:c,showSnackbarMessage:s}=(0,f.D)({autoHideDuration:3e4}),d=(0,r.useRef)(),{isLoaded:v,savedState:E,updateSavedState:x}=(0,h.w)({getSavedState:n,saveState:a,entityTypeUri:i.type}),{tabs:w}=Dl();(0,r.useEffect)((()=>{v&&(d.current=E||{})}),[v,E]);const O=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!d.current)return;const t=zl({},d.current,e);(0,p.equals)(t,d.current)||(x(t),d.current=t)}),[x]);return l().createElement(te,null,l().createElement(R,null,l().createElement(g.S.Provider,{value:s},l().createElement("div",{className:o.perspectiveView},l().createElement(Al,null),(null==i?void 0:i.uri)&&l().createElement(l().Fragment,null,l().createElement("div",{className:o.potentialMatchesContainer},l().createElement(b.n,{buttonsProps:(0,p.pluck)("buttonProps",w),perspectiveId:"potentialMatches"},l().createElement("div",{className:o.potentialMatchesWrapper},l().createElement(y.n,{entity:i}),l().createElement(ll,{config:t,isLoaded:v,savedState:E,onUpdateSavedState:O})),l().createElement(bn,{tabs:w,config:t}))),l().createElement(c,null),l().createElement(ul,null))))))};var Fl=n(63532);const Hl=(0,i.Z)({productionPrefix:"potentialMatchesView",disableGlobal:!0,seed:"pm"}),Ll=e=>{let{config:t,store:n,onResize:i=p.identity,saveState:m,getSavedState:f}=e;const h=(0,r.useCallback)((0,d.aYu)(f),[f]);return l().createElement(u.Provider,{store:n},l().createElement(Fl.m.Provider,{value:t.id},l().createElement(c.ZP,{generateClassName:Hl},l().createElement(s._,{dateAdapter:a.Q},l().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>i(Math.floor(e),Math.floor(t))}),t&&l().createElement(_l,{config:t,saveState:m,getSavedState:h}),l().createElement(je.Z,null)))))}}}]);
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4ace1be0-e5b8-42d2-8669-0f83d7f77a95",e._sentryDebugIdIdentifier="sentry-dbid-4ace1be0-e5b8-42d2-8669-0f83d7f77a95")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1623"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3358],{25601:(e,t,n)=>{n.d(t,{K:()=>g,N:()=>h});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(38677),c=n(95341),s=n(79312);const u=(0,n(72342).makeStyles)((e=>({button:{whiteSpace:"nowrap",fontSize:"14px",lineHeight:"16px",letterSpacing:0,padding:"9px 16px 9px 12px","& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},iconButton:{"& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},startIcon:{marginLeft:0,marginRight:"8px",width:"18px",height:"18px",alignItems:"center"},overflowStyle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},menuIcon:{marginRight:"12px"},menuItem:{minHeight:"28px",padding:"2px 16px 2px 12px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}})));var p=n(79573),d=n(40007),m=n(39475);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(this,arguments)}let h;!function(e){e.iconButton="iconButton",e.button="button",e.menuItem="menuItem"}(h||(h={}));const g=(0,a.forwardRef)(((e,t)=>{let{className:n,mode:a=h.iconButton,label:l,disabled:g,icon:b,onClick:y=p.ZT,onMenuClose:v=p.ZT}=e,E=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","mode","label","disabled","icon","onClick","onMenuClose"]);const x=u();return(()=>{switch(a){case"iconButton":return r().createElement(m.k,f({disabled:g,className:o()(x.iconButton,n),size:"S",tooltipTitle:l,onClick:y,icon:b,showForDisabled:!0},E));case"button":return r().createElement(i.Z,f({className:o()(x.button,n),disabled:g,startIcon:r().createElement(b,null),onClick:y,color:"primary",classes:{startIcon:x.startIcon}},E),r().createElement(d.Z,{value:l},r().createElement("div",{className:x.overflowStyle},l)));case"menuItem":{const e=()=>{v(),y()};return r().createElement(c.Z,f({classes:{root:x.menuItem},onClick:e,disabled:g,ref:t},E),r().createElement(r().Fragment,null,r().createElement(b,{className:x.menuIcon}),r().createElement(s.Z,{classes:{root:x.menuText}},l)))}}})()}));g.displayName="ActionButton"},14625:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(24328),r=n.n(a),l=n(52730),o=n(50673),i=n(17512),c=n(42639);const s=(0,n(72342).makeStyles)({icon:{maxHeight:"25px",maxWidth:"25px",marginRight:"16px"}}),u=e=>{let{group:t,metadata:n}=e;const a=s(),u=(0,l.useSelector)(o.ZP.selectors.getAbsoluteImagePath),p=(0,i.XH8)(n,{type:t.id}),d=(0,i.vPL)(u,p);return r().createElement(c.Z,{className:a.icon,icon:d,avatarText:t.title[0]})}},12933:(e,t,n)=>{n.d(t,{Z:()=>W});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(71153),c=n.n(i),s=n(50914),u=n(22311),p=n(26638),d=n(65643),m=n(40007),f=n(40435),h=n(72342);const g=(0,h.makeStyles)({attribute:{cursor:"pointer",lineHeight:"16px",flexBasis:"100%",display:"flex",alignItems:"center",padding:"0 10px 0 16px",width:"calc(100% - 32px)","&$attributeWithValue":{borderBottom:"1px solid rgba(0,0,0,0.38)"},"&$disabled":{cursor:"default"}},disabled:{},attributeWithValue:{},noSelect:{},name:{fontSize:"14px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",direction:"rtl",textAlign:"left",flex:"1 0",width:"0","& $noSelect":{color:"rgba(0,0,0,0.38)"},"&$disabled":{color:"rgba(0,0,0,0.26)","& $noSelect":{color:"rgba(0,0,0,0.26)"}}}}),b=(0,s.either)((0,s.prop)("title"),(0,s.prop)("fieldName")),y=e=>{let{value:t,getLabel:n=b,onSelectAttributeClick:a,disabled:l=!1}=e;const i=g(),s=t&&n(t);return r().createElement("div",{onClick:l?void 0:a,className:c()(i.attribute,{[i.attributeWithValue]:!!s},{[i.disabled]:l})},r().createElement(m.Z,{value:s},r().createElement("div",{className:c()(i.name,{[i.disabled]:l})},s||r().createElement("span",{className:i.noSelect},o().text("Select attribute")))),r().createElement(f.Z,{size:"M",icon:d.Z,disabled:l}))};var v=n(17512);function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 w=(0,s.eqBy)((0,s.pick)(["fieldName","uri","entityTypeUri"])),O=(e,t)=>t&&!!t.find(w(e)),C=(e,t)=>e.title.toLowerCase().includes(t.toLowerCase()),S=(e,t)=>C(e,t)||(e.children||[]).some((e=>S(e,t))),R=(e,t)=>e.findIndex(w(t)),k=(0,v.fW1)("title"),M=function(e,t,n,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const o=C(e,a);return[{item:a?E({},e,{filterText:a}):e,level:r,groupId:t,groupName:n}].concat(e.children?e.children.filter((e=>l||o||S(e,a))).flatMap((e=>M(e,t,n,a,r+1,l||o))):[]).flat()},P=(0,s.curry)(((e,t)=>t.map((t=>({item:t,items:t.attributes.filter((t=>S(t,e))).map((n=>M(n,t.id,t.title,e)))}))).filter((e=>e.items.length))));var j=n(52730),T=n(35488),I=n(50673),N=n(33117),B=n(63485),D=n(94792),A=n(14625);const z=(0,h.makeStyles)({subHeader:{backgroundColor:"#f5f5f5",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500}});function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Z.apply(this,arguments)}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 H=(0,a.memo)((e=>{let{selectedAttributes:t,onItemClick:n,focusIndex:a,hideCheckBox:l}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["selectedAttributes","onItemClick","focusIndex","hideCheckBox"]);const i=z(),c=(0,j.useSelector)(I.ZP.selectors.getMetadata);return r().createElement(B.Z,Z({getItemSize:(e,t)=>t.items?40:28,renderItem:(e,o,i)=>{let{item:c,level:s,groupId:u,groupName:p}=o;const d=O(c,t),m=i===a;return r().createElement(N.Z,{key:`item-${u}-${c.fieldName}`,onClick:n,checked:d,data:_({},c,{groupName:p}),notSelectable:c.notSelectable,hideCheckBox:l,label:r().createElement(D.Z,{text:c.title,highlight:c.filterText}),labelInText:c.title,level:s,style:e,isFocused:m,groupId:u,LogoIcon:c.LogoIcon})},renderGroupTitle:(e,t)=>r().createElement(T.ZP,{component:"div",className:i.subHeader,style:e,key:`group-${t.item.id}`},t.item.needGroupIcon&&r().createElement(A.Z,{group:t.item,metadata:c}),t.item.title),focusIndex:a},o))}));var L=n(41008);const V=(0,h.makeStyles)({selector:{minWidth:"200px",alignItems:"stretch",background:"rgba(0,0,0, 0.0267)",boxSizing:"border-box",borderRadius:"4px",display:"flex"}}),W=(0,a.memo)((e=>{let{className:t,itemsGroups:n,value:l,getLabel:i,onSelect:d,onRestoreFocus:m=s.identity,onOpenPopup:f=s.identity,disableRestoreFocus:h=!1,disableEnforceFocus:g=!1,single:b=!1,ungroup:v=!1,disabled:x=!1,hideCheckBox:C=!1}=e;const S=V(),[M,j]=(0,a.useState)(null),T=(0,a.useCallback)((()=>j(null)),[]),I=!!M,[N,B]=(0,a.useState)(""),D=(0,a.useCallback)((()=>B("")),[]),[A,z]=(0,a.useState)([]),Z=(0,a.useCallback)((()=>z([])),[]),_=(0,a.useMemo)((()=>P(N,n)),[n,N]),F=(0,a.useMemo)((()=>(0,s.pipe)((0,s.when)((0,s.always)(v),(0,s.chain)((0,s.pipe)((0,s.prop)("items"),s.flatten,(0,s.map)((0,s.pick)(["item","level"]))))),L.LG)(_)),[v,_]),W=(0,a.useMemo)((()=>Math.max(k(_),308)),[_]),U=(0,s.pipe)((0,s.tap)((0,s.pipe)(Z,D,T)),m),G=(0,a.useRef)(),q=(0,a.useCallback)(((e,t)=>{d({checked:t,attribute:e,index:t?A.length:R(A,e),selectedAttributes:A}),b?(z(t?[e]:[]),U({})):(z((e=>{let{attribute:t,selectedAttributes:n,checked:a}=e;return a?n.concat(t):n.filter((e=>!w(t,e)))})({selectedAttributes:A,attribute:e,checked:t})),G.current&&G.current.focus())}),[A,d,b,U,G]),$=(0,a.useCallback)((e=>{let{onListItemClick:t,selectedAttributes:n}=e;return e=>{let{item:a,groupData:r}=e;const l=O(a,n);t(E({},a,{groupName:r.groupName}),!l)}})({onListItemClick:q,selectedAttributes:A}),[q,A]),{focusIndex:X,handleKeyDown:Y}=(0,p.t)({items:F,open:I,onSelectFocusedItem:$,selectedItems:A,onClose:U});return r().createElement("div",{className:c()(S.selector,t),"data-reltio-id":"attribute-selector"},r().createElement(y,{value:l,getLabel:i,onSelectAttributeClick:e=>{f(),j(e.currentTarget)},disabled:x}),r().createElement(u.Z,{open:I,anchorEl:M,onClose:U,onSearch:B,title:o().text("Select attribute"),containerWidth:W,containerHeight:507,searchInputOnKeyDown:Y,anchorOrigin:{horizontal:"right",vertical:"bottom"},searchInputRef:G,disableRestoreFocus:h,disableEnforceFocus:g},r().createElement(H,{items:F,onItemClick:q,selectedAttributes:A,width:W,height:400,focusIndex:X,hideCheckBox:C})))}))},48030:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(24328),r=n(50914),l=n(17512);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){i(e,t,n[t])}))}return e}function i(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{rowIndex:t,columnData:{id:n},cellIndex:a}=e;return`${n}[${t}][${a}]`},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;const[t,n]=(0,a.useState)({}),i=(0,a.useRef)({}),s=(e,t)=>{i.current[e]=t},u=(0,a.useCallback)((0,l.DsO)((()=>{n((e=>{const t=o({},i.current);return(0,r.equals)(e,t)?e:t}))})),[]),p=(0,a.useCallback)((()=>{i.current={}}),[]),d=(0,a.useCallback)((0,r.pipe)(e,(0,r.prop)(r.__,t)),[t]),m=(0,a.useCallback)((0,r.curry)((0,r.useWith)((0,r.pipe)(s,u),[e,r.identity])),[]);return{getDynamicRowCellHeight:d,changeRowCellHeight:m,clearHeightsCache:p}}},33945:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(2507),c=n.n(i),s=n(79573),u=n(50914),p=n(76799);const d=(0,n(72342).makeStyles)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",flexShrink:0,borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none",boxSizing:"border-box",overflowY:"hidden",containerType:"inline-size","& .MuiInputBase-root":{display:"none","@container (min-width: 420px)":{display:"inline-flex"}}},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",display:"none","@container (min-width: 420px)":{display:"block"}},displayedRows:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px!important"}});function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 h=e=>{let{classes:t={},count:n,rowsPerPageOptions:l,page:i,onChangePage:f,rowsPerPage:h,onChangeRowsPerPage:g,basicTableRef:b,labelRowsPerPage:y}=e;const v=d(),E=(0,a.useCallback)((()=>{(0,u.pathOr)(u.identity,["current","resetScrollbarPosition"],b)()}),[b]),x=(0,a.useCallback)((e=>{f(e),E()}),[f,E]),w=(0,a.useCallback)((e=>{f(0),g(e),E()}),[f,g,E]);return r().createElement(p.Z,{classes:m({},t,{root:o()(v.pagination,t.root),select:o()(v.select,t.select),selectLabel:o()(v.caption,t.selectLabel),displayedRows:o()(v.displayedRows,t.displayedRows),input:o()(v.selectRoot,t.selectRoot),actions:v.actions}),backIconButtonProps:{size:"large"},nextIconButtonProps:{size:"large"},component:"div",labelRowsPerPage:y||c().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return c().text("${fromRow}-${toRow} of ${countRows}",{fromRow:c().number(t,"0,0"),toRow:c().number(n,"0,0"),countRows:c().number(a,"0,0")})},count:n,rowsPerPageOptions:l,page:i,onPageChange:(0,u.pipe)((0,u.nthArg)(1),x),rowsPerPage:h,onRowsPerPageChange:(0,u.pipe)(s.NA,w)})};h.displayName="BasicTablePagination";const g=(0,a.memo)(h)},91431:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(3073),c=n(28831),s=n(71153),u=n.n(s);const p=(0,n(72342).makeStyles)((()=>({hidden:{visibility:"hidden"}}))),d=e=>{let{rowIndex:t,rowValue:n,className:l}=e;const o=p(),{toggleRowCollapse:s,getIsRowCollapsible:d,getIsRowCollapsed:m}=(0,a.useContext)(i.x),f=d(n),h=m(t);return r().createElement(c.Z,{className:u()(l,{[o.hidden]:!f}),isOpen:!h,onClick:e=>{s(t),e.stopPropagation()}})};d.propTypes={rowIndex:o().number,rowValue:o().object,className:o().string};const m=d},96253:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(24328),r=n.n(a),l=n(44443),o=n(55962);const i=e=>{let{onChangeHeight:t,children:n}=e,i=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["onChangeHeight","children"]);const c=(0,a.useRef)(),{rowValue:s,rowIndex:u,columnData:p,cellIndex:d}=i,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:s}),f=()=>c.current&&m(c.current.clientHeight);return(0,o.D)(f,[s.rawValue]),(0,a.useEffect)((()=>()=>m(void 0)),[]),r().createElement("div",{ref:c},r().createElement(l.Z,{handleHeight:!0,onResize:f}),n)}},28831:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(39475),c=n(63655);const s=(0,n(72342).makeStyles)({collapseButton:{cursor:"pointer"},expandLess:{transform:"rotate( -180deg )"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const p=e=>{let{isOpen:t=!1,tooltipTitle:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["isOpen","tooltipTitle"]);const l=s(),p={icon:c.Z,className:l.collapseButton,iconClassName:o()({[l.expandLess]:t})},d={tooltipTitle:n};return r().createElement(i.k,u({"data-reltio-id":"collapse-button"},p,d,a))}},22118:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(38677),c=n(69089),s=n(79811),u=n(290),p=n(75779),d=n(35936);const m=(0,n(72342).makeStyles)({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"}}),f=e=>{let{open:t,title:n,content:a,onCancel:l,cancelCaption:f=o().text("Cancel"),onDiscard:h,discardCaption:g="",onSave:b,saveCaption:y=o().text("Save"),disabledSave:v=!1}=e;const E=m();return r().createElement(c.Z,{open:t,onClose:l,classes:{paperScrollPaper:E.paper}},r().createElement(d.Z,{classes:{root:E.title}},n),r().createElement(u.Z,{classes:{root:E.content}},r().createElement(p.Z,{classes:{root:E.contentText}},a)),r().createElement(s.Z,{className:E.actionButtons,disableSpacing:!0},l&&r().createElement(i.Z,{onClick:l},f),r().createElement("div",null,h&&r().createElement(i.Z,{onClick:h,classes:{root:E.discardButton}},g),r().createElement(i.Z,{onClick:b,color:"primary",disabled:v,autoFocus:!0},y))))}},85596:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(17512),c=n(50914),s=n(64651),u=n(65629);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}const d=e=>{let{relation:t={},inRelationTypes:n=[],outRelationTypes:l=[],onChange:o=c.identity,applyFirstByDefault:i=!1,reversedContextLabels:d=!1}=e,m=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:f,fromEditorValue:h,toEditorValue:g}=(0,s.n)({reversedContextLabels:d}),b=(0,a.useMemo)((()=>f(n,l)),[f,n,l]),y=(0,a.useCallback)((0,c.pipe)(h(n,l),o),[h,n,l,o]),v=!!t.relationType;return(0,a.useEffect)((()=>{i&&b.length&&!v&&y(b[0])}),[b,i,y,v]),r().createElement(u.Z,p({value:g(t,b),options:b,onChange:y},m))};d.propTypes={className:o().string,relation:i.bNA,inRelationTypes:o().arrayOf(i.IYE),outRelationTypes:o().arrayOf(i.IYE),applyFirstByDefault:o().bool,reversedContextLabels:o().bool,onChange:o().func};const m=d},79002:(e,t,n)=>{n.d(t,{B9:()=>g,tC:()=>h,ZP:()=>b});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(50914),c=n(79312),s=n(38677);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(this,arguments)}function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(this,arguments)}const f=(0,n(72342).makeStyles)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"10px",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box","&$root_small":{minHeight:"160px"},"& $text":{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px",letterSpacing:"0.25px",textAlign:"center"},"& $secondaryText":{color:e.palette.text.secondary,fontSize:"15px",fontWeight:300,lineHeight:"18px",letterSpacing:"0.11px",textAlign:"center",paddingTop:"3px"}},root_small:{},embedded:{flexShrink:0,width:"190px",height:"190px",padding:"8px"},full:{width:"256px",height:"256px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:500,marginTop:"16px"},text:{},secondaryText:{},button:{minHeight:36,minWidth:64,maxWidth:500,padding:"10px 16px",borderRadius:"2px",boxShadow:"0 0 2px 0 rgba(0,0,0,0.12), 0 2px 2px 0 rgba(0,0,0,0.24), 0 0 8px 0 rgba(0,0,0,0.12), 0 8px 8px 0 rgba(0,0,0,0.24)",fontSize:"14px",fontWeight:500,lineHeight:"16px",marginTop:"24px"}})));let h;!function(e){e.full="full",e.embedded="embedded",e.small="small"}(h||(h={}));const g={SEARCH_RESULTS:e=>r().createElement("svg",u({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("radialGradient",{cx:"50%",cy:"100%",fx:"50%",fy:"100%",r:"81.681%",gradientTransform:"matrix(.98998 0 0 .612 .005 .388)",id:"EmptySearchResults_svg__c"},r().createElement("stop",{stopColor:"#00BFFF",stopOpacity:.5,offset:"0%"}),r().createElement("stop",{stopColor:"#9EE8FF",stopOpacity:0,offset:"100%"})),r().createElement("radialGradient",{cx:"50%",cy:"111.651%",fx:"50%",fy:"111.651%",r:"87.693%",gradientTransform:"matrix(0 -.97693 .7263 0 -.31 1.605)",id:"EmptySearchResults_svg__f"},r().createElement("stop",{stopColor:"#91F8E5",stopOpacity:.6,offset:"0%"}),r().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),r().createElement("radialGradient",{cx:"50%",cy:"103.659%",fx:"50%",fy:"103.659%",r:"90.207%",gradientTransform:"matrix(0 -1 2.23905 0 -1.821 1.537)",id:"EmptySearchResults_svg__g"},r().createElement("stop",{stopColor:"#FFF",offset:"0%"}),r().createElement("stop",{stopColor:"#73FAFF",stopOpacity:.21,offset:"59.38%"}),r().createElement("stop",{stopColor:"#14F7FF",stopOpacity:0,offset:"100%"})),r().createElement("linearGradient",{x1:"50%",y1:"170.771%",x2:"50%",y2:"10.303%",id:"EmptySearchResults_svg__e"},r().createElement("stop",{stopColor:"#91F8E5",offset:"0%"}),r().createElement("stop",{stopColor:"#99FCFF",stopOpacity:0,offset:"100%"})),r().createElement("filter",{x:"-25.9%",y:"-26.2%",width:"151.8%",height:"152.3%",filterUnits:"objectBoundingBox",id:"EmptySearchResults_svg__d"},r().createElement("feGaussianBlur",{stdDeviation:15,in:"SourceGraphic"})),r().createElement("circle",{id:"EmptySearchResults_svg__a",cx:128,cy:128,r:128})),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"EmptySearchResults_svg__b",fill:"#fff"},r().createElement("use",{xlinkHref:"#EmptySearchResults_svg__a"})),r().createElement("use",{fillOpacity:.2,fill:"#A792CD",xlinkHref:"#EmptySearchResults_svg__a"}),r().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},r().createElement("g",{transform:"translate(56 34)"},r().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},r().createElement("path",{d:"M0 6.99C0 3.13 3.137 0 7 0h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H7c-3.866 0-7-3.143-7-6.99V6.99z"}),r().createElement("path",{d:"M13 25.99c0-3.86 3.137-6.99 7-6.99h247.067c3.866 0 7 3.144 7 6.99v169.353c0 3.86-3.137 6.99-7 6.99H20c-3.866 0-7-3.143-7-6.99V25.99z",opacity:.4})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 45.833)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),r().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),r().createElement("path",{d:"M35.365.861h69.768a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M34.274 15.048h126.164a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),r().createElement("rect",{fill:"#645F6D",opacity:.5,x:21.756,y:17.46,width:87.022,height:12.004,rx:6.002}),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 87.302)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),r().createElement("rect",{fill:"#E3EBF4",x:0,y:1.091,width:20.668,height:20.734,rx:10.334}),r().createElement("path",{d:"M35.365.861h82.647a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M34.274 15.048H174.58a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M33.182 24.869h113.119a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(21.756 128.77)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:213.204,cy:5.456,rx:4.351,ry:4.365}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:197.976,cy:5.456,rx:4.351,ry:4.365}),r().createElement("path",{d:"M10.334 1.091c5.707 0 10.334 4.627 10.334 10.334v.067c0 5.707-4.627 10.333-10.334 10.333S0 17.2 0 11.492v-.067C0 5.718 4.627 1.091 10.334 1.091z",fill:"#E3EBF4"}),r().createElement("path",{d:"M35.365.861h110.929a3.82 3.82 0 010 7.639H35.365a3.82 3.82 0 010-7.639z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M34.274 15.048h92.443a2.728 2.728 0 010 5.456H34.274a2.728 2.728 0 110-5.456z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M33.182 24.869H73.89a1.637 1.637 0 110 3.274H33.182a1.637 1.637 0 010-3.274z",fill:"#B1AABD",opacity:.2})))),r().createElement("g",{mask:"url(#EmptySearchResults_svg__b)"},r().createElement("path",{fill:"#446275",d:"M72.246 84.033l8.66 5-35.5 61.488-8.66-5-12.556-24.729-51.307-29.622 20.431-35.388 50.648 29.242z"}),r().createElement("path",{d:"M62.906 120.21l-80.091-46.24 10.5-18.188 50.647 29.242 28.284-.99 8.66 5-18 31.176z",fillOpacity:.2,fill:"#FFF"}),r().createElement("path",{d:"M27.566 75.558L3.877 109.065l-5.013-2.895 26.045-32.146 2.657 1.534zm9.467 5.466L13.345 114.53l-5.014-2.895L34.377 79.49l2.656 1.534zm8.158 4.71l-22.32 34.297-5.013-2.895L43.903 84.99l1.288.744z",fill:"#527585"}),r().createElement("path",{d:"M11.524 90.544l13.385-16.52 2.657 1.534-12.174 17.22-3.868-2.234zm9.467 5.467L34.377 79.49l2.656 1.534-12.174 17.22-3.868-2.233zm9.527 5.5L43.903 84.99l1.288.744-11.47 17.626-3.203-1.85z",fill:"#76A2B5",opacity:.6}),r().createElement("path",{d:"M.355 59.848l-23.689 33.507-5.013-2.895 26.045-32.146 2.657 1.534zm9.468 5.466L-13.866 98.82l-5.013-2.895L7.166 63.78l2.657 1.534zm8.158 4.71L-4.34 104.32l-5.014-2.895L16.692 69.28l1.289.744z",fillOpacity:.1,fill:"#000"}),r().createElement("g",null,r().createElement("path",{fill:"url(#EmptySearchResults_svg__c)",opacity:.993,filter:"url(#EmptySearchResults_svg__d)",d:"M.63 0h173.74L123 172H52z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"url(#EmptySearchResults_svg__e)",opacity:.3,d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"url(#EmptySearchResults_svg__f)",opacity:.3,d:"M4 2h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"url(#EmptySearchResults_svg__g)",d:"M4 9h166.37L120.73 172.299H53.64z",transform:"rotate(120 90.404 138.861)"}),r().createElement("path",{fill:"#FFF",opacity:.196,d:"M212.363 205.344l-1 1.732L60.418 124.52l4.977-8.62z"})),r().createElement("path",{fill:"#76A2B5",d:"M73.112 84.533l-35.5 61.488-.866-.5 35.5-61.488z"}),r().createElement("path",{fill:"#F3F3F3",d:"M80.906 89.033l-35.5 61.488-.866-.5 35.5-61.488z"}),r().createElement("path",{fill:"#538196",d:"M55.112 115.71l-17.5 30.311-.866-.5 17.5-30.31z"})))),SELECT_ATTRIBUTES:e=>r().createElement("svg",p({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),r().createElement("mask",{id:"SelectAttributes_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},r().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),r().createElement("g",{mask:"url(#SelectAttributes_svg__a)"},r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#SelectAttributes_svg__paint0_linear_0_19219)"}),r().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#SelectAttributes_svg__paint1_linear_0_19219)"}),r().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),r().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),r().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),r().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),r().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),r().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),r().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2V140.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),r().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),r().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zM148 37a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),r().createElement("defs",null,r().createElement("linearGradient",{id:"SelectAttributes_svg__paint0_linear_0_19219",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},r().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),r().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),r().createElement("linearGradient",{id:"SelectAttributes_svg__paint1_linear_0_19219",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},r().createElement("stop",{stopOpacity:.01}),r().createElement("stop",{offset:1})))),NO_DATA:e=>r().createElement("svg",d({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),r().createElement("defs",null,r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__b"},r().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:0,offset:"0%"}),r().createElement("stop",{stopColor:"#F4F4F4",offset:"100%"})),r().createElement("linearGradient",{x1:"69.573%",y1:"86.747%",x2:"38.144%",y2:"33.403%",id:"NoData_svg__d"},r().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),r().createElement("stop",{stopColor:"#000",offset:"100%"})),r().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"NoData_svg__e"},r().createElement("stop",{stopColor:"#EEFBFF",offset:"0%"}),r().createElement("stop",{stopColor:"#0072CE",offset:"100%"})),r().createElement("filter",{x:"-7.7%",y:"-7.5%",width:"115.3%",height:"115%",filterUnits:"objectBoundingBox",id:"NoData_svg__f"},r().createElement("feOffset",{dx:0,dy:2,in:"SourceAlpha",result:"shadowOffsetOuter1"}),r().createElement("feGaussianBlur",{stdDeviation:2,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r().createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0",type:"matrix",in:"shadowBlurOuter1",result:"shadowMatrixOuter1"}),r().createElement("feMerge",null,r().createElement("feMergeNode",{in:"shadowMatrixOuter1"}),r().createElement("feMergeNode",{in:"SourceGraphic"}))),r().createElement("circle",{id:"NoData_svg__a",cx:128,cy:128,r:128})),r().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r().createElement("mask",{id:"NoData_svg__c",fill:"#fff"},r().createElement("use",{xlinkHref:"#NoData_svg__a"})),r().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#NoData_svg__a"}),r().createElement("path",{fill:"url(#NoData_svg__b)",mask:"url(#NoData_svg__c)",d:"M0 9h256v247H0z"}),r().createElement("g",{mask:"url(#NoData_svg__c)"},r().createElement("g",{transform:"translate(29 37)"},r().createElement("g",{opacity:.9,strokeWidth:1,fill:"#FFF"},r().createElement("path",{fillOpacity:.8,opacity:.5,d:"M14.565 8h228.144v176.476H14.565z"}),r().createElement("path",{d:"M0 8.01C0 3.586 3.576 0 7.997 0h223.838a7.997 7.997 0 017.997 8.01v152.401c0 4.424-3.577 8.01-7.997 8.01H7.997A7.997 7.997 0 010 160.411V8.01z"})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 42.105)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),r().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),r().createElement("path",{d:"M32.488.791h64.093a3.509 3.509 0 110 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M31.486 13.824h115.902a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),r().createElement("rect",{fill:"#645F6D",opacity:.5,x:19.986,y:16.04,width:79.944,height:11.028,rx:5.514}),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 80.2)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),r().createElement("rect",{fill:"#E3EBF4",x:0,y:1.003,width:18.987,height:19.048,rx:9.493}),r().createElement("path",{d:"M32.488.791h75.925a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M31.486 13.824h128.893a2.506 2.506 0 110 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M30.483 22.846h103.918a1.504 1.504 0 010 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})),r().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(19.986 118.296)"},r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:195.862,cy:5.013,rx:3.997,ry:4.01}),r().createElement("ellipse",{fill:"#6DBCFF",opacity:.5,cx:181.872,cy:5.013,rx:3.997,ry:4.01}),r().createElement("path",{d:"M9.493 1.003a9.493 9.493 0 019.494 9.493v.06a9.493 9.493 0 01-18.987 0v-.06a9.493 9.493 0 019.493-9.493z",fill:"#E3EBF4"}),r().createElement("path",{d:"M32.488.791h101.906a3.509 3.509 0 010 7.018H32.488a3.509 3.509 0 110-7.018z",fill:"#B1AABD",opacity:.5}),r().createElement("path",{d:"M31.486 13.824h84.924a2.506 2.506 0 010 5.012H31.486a2.506 2.506 0 010-5.012z",fill:"#B1AABD",opacity:.43}),r().createElement("path",{d:"M30.483 22.846H67.88a1.504 1.504 0 110 3.008H30.483a1.504 1.504 0 110-3.008z",fill:"#B1AABD",opacity:.2})))),r().createElement("g",{mask:"url(#NoData_svg__c)"},r().createElement("path",{d:"M154.445 45.134v154.072H36.625V45.134h.811C35.508 62.52 41.07 80.609 54.12 93.944c22.74 23.235 59.61 23.235 82.352 0 13.05-13.335 18.612-31.424 16.683-48.81h1.29z",fill:"url(#NoData_svg__d)",opacity:.1,transform:"rotate(-30 291.014 34.548)"}),r().createElement("path",{d:"M27.473 93.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"url(#NoData_svg__e)",opacity:.2,transform:"translate(70 86)"}),r().createElement("g",{filter:"url(#NoData_svg__f)",strokeWidth:1,fill:"none",transform:"translate(70 86)"},r().createElement("path",{d:"M59.697 0c32.97 0 59.697 26.746 59.697 59.738 0 15.185-5.662 29.047-14.988 39.587l51.204 51.24a89.336 89.336 0 01-10.097 9.392l-51.38-51.416c-9.73 6.888-21.61 10.936-34.436 10.936C26.727 119.477 0 92.73 0 59.738 0 26.746 26.727 0 59.697 0zm0 17.756c-23.17 0-41.953 18.796-41.953 41.982s18.783 41.982 41.953 41.982 41.953-18.796 41.953-41.982-18.783-41.982-41.953-41.982z",fill:"#B5C8C9"}),r().createElement("path",{d:"M21.508 105.656C8.365 94.698 0 78.196 0 59.738 0 26.746 26.727 0 59.697 0c18.444 0 34.935 8.37 45.885 21.523l-9.794 9.8c-8.408-10.68-21.45-17.537-36.091-17.537-25.361 0-45.92 20.573-45.92 45.952 0 14.652 6.852 27.702 17.525 36.117l-9.794 9.8z",fillOpacity:.4,fill:"#FFF"})),r().createElement("path",{d:"M97.473 179.234c17.964 18.355 47.09 18.355 65.054 0s17.964-48.113 0-66.468c-17.964-18.355-47.09-18.355-65.054 0s-17.964 48.113 0 66.468z",fill:"#D9F5FF",opacity:.4,style:{mixBlendMode:"soft-light"}}),r().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.87,fill:"#000",style:{mixBlendMode:"overlay"}}),r().createElement("path",{d:"M123.885 158.736c0-3.929.444-7.03 1.332-9.304.888-2.274 2.328-4.245 4.32-5.914 1.99-1.668 3.504-3.195 4.54-4.581 1.037-1.386 1.555-2.913 1.555-4.581 0-4.064-1.75-6.095-5.248-6.095-1.614 0-2.92.592-3.915 1.776-.996 1.184-1.52 2.785-1.574 4.803H111.25c.054-5.382 1.75-9.573 5.086-12.574 3.337-3 8.02-4.5 14.047-4.5 6.001 0 10.65 1.386 13.946 4.157 3.297 2.772 4.945 6.714 4.945 11.827 0 2.234-.444 4.265-1.332 6.095-.888 1.83-2.315 3.7-4.279 5.61l-4.642 4.32c-1.318 1.265-2.233 2.563-2.745 3.895-.51 1.332-.793 3.02-.847 5.066h-11.545zm-1.655 12.27c0-1.99.72-3.625 2.16-4.904 1.44-1.278 3.236-1.917 5.389-1.917 2.152 0 3.949.64 5.388 1.917 1.44 1.279 2.16 2.913 2.16 4.905 0 1.991-.72 3.626-2.16 4.904-1.44 1.278-3.236 1.917-5.388 1.917-2.153 0-3.95-.639-5.389-1.917-1.44-1.278-2.16-2.913-2.16-4.904z",fillOpacity:.38,fill:"#3C74B4"})))),ERROR:e=>r().createElement("svg",m({width:88,height:88,viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("mask",{id:"Error_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:88,height:88},r().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#fff"})),r().createElement("g",{mask:"url(#Error_svg__a)"},r().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#CAC4D5",fillOpacity:.3}),r().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M19.987 6.73l49.449 6.072a.687.687 0 01.596.767l-7.845 63.888a.688.688 0 01-.766.6L7.214 71.4a.688.688 0 01-.599-.763l.408-3.326L19.987 6.73z",fill:"#fff"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M1.267 25.921l45.86-19.466a.687.687 0 01.9.366l25.15 59.251a.61.61 0 01-.386.84L22.34 82.765a.719.719 0 01-.887-.445l-20.185-56.4z",fill:"#fff"}),r().createElement("path",{d:"M65.631 9.23H11.017a.688.688 0 00-.687.687v64.37c0 .38.307.687.687.687h54.614c.38 0 .688-.308.688-.687V9.917a.688.688 0 00-.688-.688z",fill:"#F9F9F9"}),r().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.95l3.105-1.666 7.31-4.025 8.852 3.472 7.89-5.223 8.036-2.628 8.113 5.193 3.352-10.255v16.967H14.935l-.05-1.835z",fill:"#9C6CF0"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 32.331l3.105-3.761 7.31 4.31 8.852 1.656 7.89-2.205 8.036 1.827 8.113-12.643 3.352.742V36.36H14.935l-.05-4.029z",fill:"#FA82AA"}),r().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.946l3.105.432 7.31 1.01 8.852-5.117 7.89 3.675 8.036 1.839 8.113-1.839 3.352.811v1.028H14.935l-.05-1.839z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.1,fillRule:"evenodd",clipRule:"evenodd",d:"M61.543 35.288l-.05 1.497H14.885v-5.239l3.352-.276 8.114 4.697 8.036-.679 7.889.82 8.852-.616 7.31-1.601 3.105 1.397z",fill:"#4DBEE9"}),r().createElement("path",{d:"M21.036 40.178h-5.09a.636.636 0 000 1.272h5.09a.636.636 0 100-1.272z",fill:"#ACACAC"}),r().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM25.914 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM39.91 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM21.248 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM35.245 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM30.58 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM44.577 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272z",fill:"#BDBDBD"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.272-1.273zM25.914 62.658c.702 0 1.272.57 1.272 1.273v5.09a1.272 1.272 0 11-2.545 0v-5.09c0-.703.57-1.273 1.273-1.273zM39.91 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.273-1.273zM21.248 66.477c.702 0 1.272.57 1.272 1.272v1.273a1.273 1.273 0 01-2.545 0v-1.273c0-.703.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),r().createElement("path",{d:"M36.518 65.628a1.272 1.272 0 00-2.545 0v3.393a1.272 1.272 0 102.545 0v-3.393zM31.852 62.234a1.272 1.272 0 10-2.545 0v6.787a1.272 1.272 0 102.545 0v-6.787z",fill:"#4DBEE9"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.577 60.962c.702 0 1.272.57 1.272 1.272v6.787a1.273 1.273 0 01-2.545 0v-6.787c0-.702.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),r().createElement("path",{d:"M18.915 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#9C6CF0"}),r().createElement("path",{opacity:.5,d:"M34.185 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.3,d:"M49.454 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.8,d:"M26.55 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#FB6597"}),r().createElement("path",{d:"M41.82 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.2,d:"M57.09 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),r().createElement("path",{opacity:.5,fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM31.851 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 110-.849zM47.121 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 010-.849zM24.217 19.818h4.665a.424.424 0 010 .849h-4.665a.424.424 0 010-.849zM39.486 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM54.756 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849z",fill:"#ACACAC"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.946 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM15.946 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM15.946 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM23.58 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM23.58 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM23.58 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM49.454 43.571h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 46.116h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 48.661h11.028a.636.636 0 010 1.273H49.454a.636.636 0 110-1.273zM31.215 43.571h15.27a.636.636 0 110 1.273h-15.27a.636.636 0 010-1.273zM31.215 46.116h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM31.215 48.661h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM15.946 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM23.58 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM49.454 51.206h11.028a.636.636 0 010 1.272H49.454a.636.636 0 110-1.272zM31.215 51.206h15.27a.636.636 0 110 1.272h-15.27a.636.636 0 010-1.272z",fill:"#E9E9E9"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 55.872h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 110-1.273z",fill:"#ACACAC"}),r().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 59.69h11.029a.636.636 0 010 1.272H49.878a.636.636 0 110-1.273zM49.878 62.234h11.029a.636.636 0 010 1.273H49.878a.636.636 0 010-1.273zM49.878 64.78h11.029a.636.636 0 010 1.272H49.878a.636.636 0 010-1.273z",fill:"#E9E9E9"}),r().createElement("path",{d:"M54.968 67.324h-5.09a.636.636 0 000 1.273h5.09a.636.636 0 000-1.273z",fill:"#E9E9E9"}),r().createElement("g",{filter:"url(#Error_svg__filter0_d)"},r().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#000"})),r().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#F25252"}),r().createElement("path",{opacity:.15,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 34.719c12.34 0 22.344 10.003 22.344 22.343S69.746 79.406 57.406 79.406c-12.34 0-22.343-10.003-22.343-22.344 0-12.34 10.003-22.343 22.343-22.343zm-.172 2.406c-10.916 0-19.765 8.85-19.765 19.766 0 10.916 8.85 19.765 19.765 19.765C68.151 76.656 77 67.806 77 56.891c0-10.917-8.85-19.766-19.766-19.766z",fill:"#F25252"}),r().createElement("path",{opacity:.3,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 38.844c10.062 0 18.219 8.157 18.219 18.218 0 10.062-8.157 18.22-18.219 18.22-10.062 0-18.218-8.158-18.218-18.22 0-10.061 8.156-18.218 18.218-18.218zm0 2.043c-8.933 0-16.175 7.242-16.175 16.175 0 8.934 7.242 16.176 16.175 16.176 8.934 0 16.176-7.242 16.176-16.175 0-8.934-7.242-16.176-16.176-16.176z",fill:"#F25252"}),r().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 26.469C74.303 26.469 88 40.166 88 57.062c0 16.897-13.697 30.594-30.594 30.594-16.896 0-30.593-13.697-30.593-30.594 0-16.896 13.697-30.593 30.593-30.593zm-.172 3.437c-14.903 0-26.984 12.082-26.984 26.985 0 14.903 12.081 26.984 26.984 26.984 14.903 0 26.985-12.081 26.985-26.984 0-14.903-12.082-26.985-26.985-26.985z",fill:"#F25252"}),r().createElement("path",{d:"M57.406 71.844c8.164 0 14.782-6.618 14.782-14.781 0-8.164-6.618-14.782-14.782-14.782-8.163 0-14.781 6.618-14.781 14.782 0 8.163 6.618 14.78 14.781 14.78z",fill:"#FF6A6A"}),r().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M58.298 46.448L75.18 63.331l-9.114 12.078h-2.029l-7.582-7.582 1.006-3.178.837-18.2z",fill:"url(#Error_svg__paint0_linear)"}),r().createElement("g",{filter:"url(#Error_svg__filter1_d)"},r().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#000"})),r().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#fff"}),r().createElement("g",{filter:"url(#Error_svg__filter2_d)"},r().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#000"})),r().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#fff"})),r().createElement("defs",null,r().createElement("filter",{id:"Error_svg__filter0_d",x:36.219,y:37.875,width:42.375,height:42.375,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),r().createElement("feOffset",{dy:2}),r().createElement("feGaussianBlur",{stdDeviation:2}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),r().createElement("filter",{id:"Error_svg__filter1_d",x:51.688,y:62.625,width:11.438,height:11.438,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),r().createElement("feOffset",{dy:2}),r().createElement("feGaussianBlur",{stdDeviation:2}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),r().createElement("filter",{id:"Error_svg__filter2_d",x:51.688,y:44.063,width:11.438,height:23.813,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),r().createElement("feOffset",{dy:2}),r().createElement("feGaussianBlur",{stdDeviation:2}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),r().createElement("linearGradient",{id:"Error_svg__paint0_linear",x1:68.438,y1:71.571,x2:60.119,y2:58.801,gradientUnits:"userSpaceOnUse"},r().createElement("stop",{stopOpacity:0}),r().createElement("stop",{offset:1}))))},b=e=>{let{variant:t=h.full,LogoRenderer:n=g.SEARCH_RESULTS,text:a,secondaryText:l,buttonTitle:u,onClick:p=i.identity,access:d}=e;const m=f(),b=d&&u;return r().createElement("div",{className:o()(m.root,m[`root_${t}`])},r().createElement(n,{className:m[`${t}`]}),r().createElement("div",{className:m.textBox},r().createElement(c.Z,{variant:"h5",classes:{h5:m.text}},a),l&&r().createElement(c.Z,{variant:"subtitle1",classes:{subtitle1:m.secondaryText}},l)),b&&r().createElement(s.Z,{className:m.button,variant:"contained",color:"primary",onClick:p},u))}},8419:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(2507),c=n.n(i),s=n(17512),u=n(37573),p=n(18527),d=n(40007),m=n(20146),f=n(72342);const h=(0,f.makeStyles)((e=>({image:{width:"40px",height:"40px"},info:{marginLeft:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:400,fontSize:"13px",lineHeight:"15px",color:e.palette.primary.main},secondaryLabel:{marginTop:"4px",fontWeight:400,fontSize:"10px",lineHeight:"12px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},link:{textDecoration:"none"},thirdRow:{display:"flex",overflow:"hidden",alignItems:"center",marginTop:"auto",paddingTop:"4px"},entityId:{display:"flex",overflow:"hidden",alignItems:"baseline",whiteSpace:"nowrap",fontWeight:400,fontSize:"12px",lineHeight:"16px"},entityIdLabel:{color:e.palette.text.secondary},entityIdValue:{marginLeft:"8px",color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis","&[aria-describedby]":{cursor:"pointer","&:hover":{textDecoration:"underline"}}}}))),g=e=>{let{entity:t,classes:n={}}=e;const l=h(),{secondaryLabel:i,label:f}=n,g=(0,s.idV)(t.label),{secondaryLabel:b}=t,y=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,s.BTI)(t))}),[t]);return r().createElement(r().Fragment,null,r().createElement(u.Z,{entity:t,imageClassName:l.image}),r().createElement("div",{className:l.info},r().createElement(p.Z,{value:(0,s.wwR)(t),className:l.link},r().createElement(d.Z,{value:g,placement:"top",showOnExceededHeight:!0},r().createElement("div",{className:o()(l.label,f)},g))),b&&r().createElement(d.Z,{value:b,placement:"top",showOnExceededHeight:!0},r().createElement("div",{className:o()(l.secondaryLabel,i)},b)),r().createElement("div",{className:l.thirdRow},r().createElement(m.Z,{entity:t,size:"medium"}),r().createElement("div",{className:l.entityId,onClick:y},r().createElement("div",{className:l.entityIdLabel},c().text("ID:")),r().createElement(d.Z,{value:`Copy to clipboard ${(0,s.BTI)(t)}`,placement:"top"},r().createElement("div",{className:l.entityIdValue},(0,s.BTI)(t)))))))},b=(0,f.makeStyles)({"@keyframes keyframes-wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},wave:{overflow:"hidden",position:"relative","&:after":{top:"0",left:"0",right:"0",bottom:"0",content:'""',position:"absolute",animation:"$keyframes-wave 1.6s linear 0.5s infinite",transform:"translateX(-100%)",background:"linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);"}},avatar:{flex:"none",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.11)"},info:{marginLeft:"12px",flex:"auto"},label:{width:"40%",height:"15px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},secondaryLabel:{marginTop:"4px",width:"100%",height:"12px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"},thirdRow:{marginTop:"4px",width:"60%",height:"24px",borderRadius:"2px",backgroundColor:"rgba(0, 0, 0, 0.11)"}}),y=()=>{const e=b();return r().createElement(r().Fragment,null,r().createElement("div",{className:o()(e.avatar,e.wave)}),r().createElement("div",{className:e.info},r().createElement("div",{className:o()(e.label,e.wave)}),r().createElement("div",{className:o()(e.secondaryLabel,e.wave)}),r().createElement("div",{className:o()(e.thirdRow,e.wave)})))},v=(0,f.makeStyles)({container:{display:"flex",padding:"16px",overflow:"hidden"}});function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},E.apply(this,arguments)}const x=(0,a.memo)((e=>{let{entity:t,classes:n={},variant:a="normal"}=e,l=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["entity","classes","variant"]);const i=v(),{container:c}=n;return r().createElement("div",E({className:o()(i.container,c)},l),"normal"===a?r().createElement(g,{entity:t,classes:n}):r().createElement(y,null))}))},3466:(e,t,n)=>{n.d(t,{n:()=>p});var a=n(24328),r=n.n(a),l=n(11802),o=n(28101),i=n(14201),c=n(50914);const s=(0,n(72342).makeStyles)((()=>({resizablePanesWrapper:{flexGrow:1,height:"100%",marginRight:"1px"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}))),u=480,p=e=>{let{perspectiveId:t,children:n,buttonsProps:p,disabled:d,defaultTab:m}=e;const f=s(),{perspectiveSettings:h,updatePerspectiveSettings:g}=(0,i._)(t),{width:b=u}=h||{},y=m||(null==h?void 0:h.active),v=!(0,c.isNil)(y)&&!d,E=(0,a.useCallback)((e=>{g(e)}),[g]),x=(0,a.useCallback)((e=>{E({active:y===e?null:e})}),[y,E]),w=(0,a.useCallback)((()=>{E({active:null})}),[E]),O=(0,a.useCallback)((e=>{let{size:t}=e;E({width:t})}),[E]);return r().createElement(r().Fragment,null,r().createElement(l.u,{className:f.resizablePanesWrapper,primary:"second",orientation:"vertical",size:v?b:0,minSize:320,maxSize:640,allowResize:v,onChange:O,debounceInterval:2500},r().createElement("div",{className:f.pane},n[0]),r().createElement("div",{className:f.pane},(0,a.cloneElement)(n[1],{active:y,onClose:w}))),r().createElement(o.G,{disabled:d,buttonsProps:p,onButtonClick:x,activeIndexId:y}))};p.displayName="ProfileResizablePanes"},79145:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(71153),c=n.n(i),s=n(2507),u=n.n(s),p=n(72342);const d="46px",m=(0,p.makeStyles)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:d},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:d}})));var f=n(7342);const h=e=>{let{className:t,rowData:n}=e;const a=m();return r().createElement("div",{className:c()(a.readOnlyLogicOperatorContainer,t)},n&&n.operator?(0,f.Z)(n.operator):u().text("Where"))};h.propTypes={className:o().string,rowData:o().object};const g=h;var b=n(17512);const y=e=>{let{className:t,rowData:n}=e;const a=m();return r().createElement("div",{className:c()(a.readOnlyFilter,t)},n&&n.filter?(0,b.XS2)(n.filter):u().text("equals"))};var v=n(53862);const E=(0,p.makeStyles)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));const x=e=>{let{classes:t={},rowData:n,previousRowData:a,LogicOperatorComponent:l=g,AttributeSelectorComponent:o,FilterSelectorComponent:i=y,ValuesEditorComponent:s,ActionsComponent:u,filterSelectorRef:p,attributeSelectorProps:d={}}=e,m=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const f=E();return r().createElement("div",{className:c()(f.row,t.root),"data-reltio-id":"query-builder-row"},r().createElement(l,{className:t.logicOperatorContainer,rowContext:m,rowData:a}),r().createElement("div",{className:c()(f.rowItem,t.attributeSelectorContainer)},r().createElement(o,{attributeSelectorProps:d,rowContext:m,rowData:n})),r().createElement("div",{className:c()(f.rowItem,t.filterSelectorContainer)},r().createElement(i,{textFieldInputRef:p,rowContext:m,rowData:n})),r().createElement("div",{className:c()(f.rowItem,f.fullWidth,t.valuesEditorContainer)},r().createElement(s,{rowContext:m,rowData:n})),r().createElement("div",{className:c()(f.rowItem,t.actionsContainer,{[f.hidden]:!n})},r().createElement(u,{rowContext:m,rowData:n})))};x.propTypes={classes:o().shape({root:o().string,logicOperatorContainer:o().string,attributeSelectorContainer:o().string,filterSelectorContainer:o().string,valuesEditorContainer:o().string,actionsContainer:o().string}),rowData:v.Xw,previousRowData:v.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 w=(0,a.memo)(x)},51586:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(50914),c=n(79145),s=n(53862);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:n,rowsData:a,lastRowAttributeSelectorProps:l,filterSelectorRef:o,filterSelectorRefIndex:s}=e,p=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const d=(e,t,a)=>{const d=t>0?(0,i.path)([t-1],a):null,m=t===a.length?{attributeSelectorProps:l}:{};return r().createElement(c.Z,u({key:e&&e.id,rowData:e,previousRowData:d,classes:n,filterSelectorRef:t===s?o:void 0},p,m))};return r().createElement("div",{className:t},a.map(d),d(null,a.length,a))};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(s.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 d=(0,a.memo)(p)},15793:(e,t,n)=>{n.d(t,{Z:()=>M});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(50914),c=n(70347);const s=(0,n(4515).Z)(c.ZP);var u=n(49861),p=n(12350),d=n(95341),m=n(80852),f=n(71153),h=n.n(f),g=n(40007);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}function y(e){const{innerProps:t,innerRef:n,children:a,isFocused:l,isSelected:o,selectProps:{classes:i},label:c}=e;return r().createElement(d.Z,b({className:h()(i.option,{[i["option--selected"]]:o}),ref:n,selected:l,component:"div"},t),r().createElement(m.Z,{color:"primary",checked:o}),r().createElement(g.Z,{value:c},r().createElement("div",{className:i["option--item"]},a)))}y.propTypes={children:o().node,innerProps:o().shape({id:o().string.isRequired,key:o().string,onClick:o().func.isRequired,onMouseMove:o().func.isRequired,onMouseOver:o().func.isRequired,tabIndex:o().number.isRequired}).isRequired,innerRef:o().oneOfType([o().oneOf([null]),o().func,o().shape({current:o().any.isRequired})]),isFocused:o().bool.isRequired,isSelected:o().bool.isRequired,label:o().string,selectProps:o().shape({classes:o().shape({option:o().string})})};const v={Option:y};var E=n(72342),x=n(79573);function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},w.apply(this,arguments)}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 S=(0,E.makeStyles)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let R=0;function k(e){const{label:t,creatable:n,getOptions:l,loadingIndicator:o,components:c,classes:d,styles:m,onChange:f,onInputChange:h,menuPlacement:g="auto"}=e,b=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),y=n?s:l?p.Z:u.Z,[E,C]=(0,a.useState)(""),k=S((0,i.omit)(["classes"],e)),M="custom-select-"+R++,P=O({},v,c),j=(0,x.ze)(k,d),T=O({indicatorSeparator:e=>O({},e,{margin:"10px 0"}),loadingIndicator:e=>O({},e,{display:o?e.display:"none"}),loadingMessage:e=>O({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},m),I=t?{inputId:M,TextFieldProps:O({label:t,InputLabelProps:{htmlFor:M,shrink:!(!e.value||!e.value.length)||void 0,className:j.label}},e.TextFieldProps)}:{};return r().createElement(y,w({isMulti:!0,inputId:M,inputValue:E,onChange:function(e,t){f(e,t),"create-option"===t.action&&(C(""),h("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;h(e,{action:n}),"set-value"!==n&&C(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:j,components:P,styles:T,menuPlacement:g,loadOptions:l},I,b))}k.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},k.propTypes={creatable:o().bool,cacheOptions:o().bool,defaultOptions:o().bool,value:o().arrayOf(o().shape({label:o().string.isRequired,value:o().any})),options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().any})),onChange:o().func,onInputChange:o().func,placeholder:o().string,label:o().string,loadingIndicator:o().bool,components:o().shape({ClearIndicator:o().func,Control:o().func,DropdownIndicator:o().func,DownChevron:o().func,CrossIcon:o().func,Group:o().func,GroupHeading:o().func,IndicatorsContainer:o().func,IndicatorSeparator:o().func,Input:o().func,LoadingIndicator:o().func,Menu:o().func,MenuList:o().func,MenuPortal:o().func,LoadingMessage:o().func,NoOptionsMessage:o().func,MultiValue:o().func,MultiValueContainer:o().func,MultiValueLabel:o().func,MultiValueRemove:o().func,Option:o().func,Placeholder:o().func,SelectContainer:o().func,SingleValue:o().func,ValueContainer:o().func}),classes:o().shape({control:o().string,valueContainer:o().string,multiValue:o().string,noOptionsMessage:o().string,singleValue:o().string,placeholder:o().string,menu:o().string,clearIndicator:o().string,dropdownIndicator:o().string,option:o().string,"option--selected":o().string,label:o().string}),styles:o().shape({clearIndicator:o().func,container:o().func,control:o().func,dropdownIndicator:o().func,group:o().func,groupHeading:o().func,indicatorsContainer:o().func,indicatorSeparator:o().func,input:o().func,loadingIndicator:o().func,loadingMessage:o().func,menu:o().func,menuList:o().func,menuPortal:o().func,multiValue:o().func,multiValueLabel:o().func,multiValueRemove:o().func,noOptionsMessage:o().func,option:o().func,placeholder:o().func,singleValue:o().func,valueContainer:o().func}),TextFieldProps:o().object,getOptions:o().func,menuPlacement:o().string,menuPortalTarget:o().object,menuShouldBlockScroll:o().bool,captureMenuScroll:o().bool,getOptionValue:o().func,isSearchable:o().bool,inputRef:o().shape({current:o().object})};const M=k},67275:(e,t,n)=>{n.d(t,{n:()=>g});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(17512),c=n(79386),s=n(60883),u=n(72316),p=n(1824),d=n(62901),m=n(36852),f=n(75647);const h=(0,n(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),g=(0,a.memo)((e=>{let{entity:t,className:n,historySlice:l}=e;const g=h(),b=(0,a.useMemo)((()=>(0,i.L5S)(t)),[t]),y=(0,m.C)({objectIds:b}),v=(0,i.wwR)(t);return r().createElement(p.e,{collaboration:y},r().createElement(c.Z,{className:o()(n,d.U),entity:(null==l?void 0:l.aEntity)||t},l?r().createElement(f.Z,null):r().createElement(r().Fragment,null,r().createElement(s.a,{className:g.profileBandNavigation}),r().createElement(u.Z,{className:g.comments,uri:v,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:v}),objectType:i.q7e.ENTITY}))))}));g.displayName="ScreenProfileBand"},28101:(e,t,n)=>{n.d(t,{G:()=>d});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l),i=n(39475),c=n(47591);const s=(0,n(72342).makeStyles)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,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)"},active:{backgroundColor:(0,c.Fq)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const d=e=>{let{disabled:t,buttonsProps:n,activeIndexId:a,className:l,onButtonClick:c,classes:d={}}=e;const m=s(),{active:f,buttonWrapper:h}=d,g=p(d,["active","buttonWrapper"]);return r().createElement("div",{className:o()(m.container,l)},n.map((e=>{let{id:n}=e,l=p(e,["id"]);return r().createElement(i.k,u({},l,{disabled:t,classes:g,size:"S",key:n,className:o()({[o()(m.active,f)]:a===n},m.buttonWrapper,h),onClick:()=>c(n),"data-reltio-id":`reltio-profile-right-side-button-${n}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>o});var a=n(24328),r=n.n(a);const l=(0,n(72342).makeStyles)((e=>({contentWrapper:{display:"flex",boxSizing:"border-box",flex:1,flexDirection:"column",backgroundColor:e.palette.background.paper,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)",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),o=e=>{let{width:t,open:n,children:a}=e;const o=l();return r().createElement("div",{className:o.contentWrapper,"data-reltio-id":"side-panel",style:{width:t?`${n?t:0}px`:"100%"}},n&&r().createElement(r().Fragment,null,a))}},65629:(e,t,n)=>{n.d(t,{Z:()=>S});var a=n(24328),r=n.n(a),l=n(13980),o=n.n(l),i=n(2507),c=n.n(i),s=n(50914),u=n(71153),p=n.n(u),d=n(95341),m=n(79312);const f=(0,n(72342).makeStyles)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var h=n(96379),g=n(40007);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}const y=e=>{let{innerRef:t,innerProps:n,selectOption:a,data:l}=e;const o=f(),{value:i,label:c,startObject:s,endObject:u}=l,y=s.objectType.label+" ↔ "+u.objectType.label;return r().createElement(d.Z,b({className:o.container,ref:t,key:i,onClick:()=>a({label:c,value:i,startObject:s,endObject:u})},n),r().createElement("div",{className:o.icons},r().createElement(h.Z,{className:o.iconTop,entityType:s.objectType}),r().createElement(h.Z,{className:o.iconBottom,entityType:u.objectType})),r().createElement("div",{className:o.text},r().createElement(g.Z,{value:c},r().createElement(m.Z,{className:p()(o.textItem,o.primaryTextItem)},c)),r().createElement(g.Z,{value:y},r().createElement(m.Z,{color:"textSecondary",className:p()(o.textItem,o.secondaryTextItem)},y))))};y.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({value:o().string.isRequired,label:o().string.isRequired,startObject:o().object,endObject:o().object})};const v=y;var E=n(84425);function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},x.apply(this,arguments)}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 O=e=>{let{value:t={},options:n=[],onChange:l=s.identity,TextFieldProps:o}=e,i=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["value","options","onChange","TextFieldProps"]);const u=(0,a.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){w(e,t,n[t])}))}return e}({},(0,s.defaultTo)({},o),{"data-reltio-id":"relation-type-selector"})),[o]);return r().createElement(E.Z,x({value:t,options:n,onChange:l,label:c().text("Select relationship type "),components:{Option:v},TextFieldProps:u},i))},C=o().shape({label:o().string.isRequired,value:o().string.isRequired,startObject:o().object,endObject:o().object});O.propTypes={value:C,options:o().arrayOf(C),onChange:o().func};const S=O},45226:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(17512),r=n(24328),l=n.n(r),o=n(11013),i=n(61347);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const d=e=>{let{values:t,valueContainerClassName:n}=e,a=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:n},l().createElement(o.Z,u({attributeValue:e},a))))))},m=(0,r.memo)((e=>{let{expanded:t,LabelRenderer:n,RightSlot:r}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:s,values:u,valueContainerClassName:m}=o;switch(s.type){case a.oS0.TYPE_NESTED:case a.oS0.TYPE_REFERENCE:return d(c({expanded:t,LabelRenderer:n,RightSlot:r},o));case a.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:s,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(c({},o))}}))},14201:(e,t,n)=>{n.d(t,{n:()=>r,_:()=>l});var a=n(24328);const r=n.n(a)().createContext({settings:{},onChange:()=>{}});r.displayName="PerspectivesSettingsContext";const l=e=>{const{settings:t,onChange:n}=(0,a.useContext)(r)||{},l=null==t?void 0:t[e];return{updatePerspectiveSettings:(0,a.useCallback)((t=>{n(e,t)}),[e,n]),perspectiveSettings:l}}},64651:(e,t,n)=>{n.d(t,{n:()=>o});var a=n(24328),r=n(17512),l=n(50914);const o=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,a.useCallback)(((e,n)=>{const a={},o=(0,l.pipe)(r.PjQ,(0,l.tap)((e=>a[e]=(0,l.propOr)(0,e,a)+1))),i=(0,l.ascend)((0,l.prop)("label")),c=(0,l.curry)(((e,n)=>{let{uri:a,label:l,startObject:i,endObject:c}=n;const s=e===(t?r.Nsj.OUT:r.Nsj.IN)?i:c;return{label:{directionalLabel:o(s),typeLabel:l},value:`${a},${e}`,startObject:i,endObject:c}}));return e.map(c(r.Nsj.IN)).concat(n.map(c(r.Nsj.OUT))).map((0,l.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?a[t]>1?`${t} (${n})`:t:n}})).sort(i)}),[t]),fromEditorValue:(0,a.useCallback)(((e,t)=>n=>{const[a,o]=n.value.split(",");return{type:(o===r.Nsj.IN?e:t).find((0,l.propEq)("uri",a)),direction:o}}),[]),toEditorValue:(0,a.useCallback)(((e,t)=>t.find((0,l.propEq)("value",`${e.relationType},${e.direction}`))),[])}}},18408:(e,t,n)=>{n.d(t,{D:()=>m});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(50914),c=n(83820),s=n(38677),u=n(10050),p=n(79573);const d=3e5,m=function(){let{anchorOrigin:e={vertical:"bottom",horizontal:"center"},showDismiss:t,dismissTitle:n=o().text("Dismiss"),autoHideDuration:l=d,onDismissClick:m=p.ZT}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[f,h]=(0,a.useState)(!1),[g,b]=(0,a.useState)(""),y=(0,a.useCallback)((()=>{h(!1),b("")}),[]),v=(0,a.useCallback)(((e,t)=>{"clickaway"!==t&&y()}),[y]),E=(0,a.useCallback)((e=>{h(!0),b(e)}),[]),x=(0,a.useCallback)((()=>r().createElement(c.Z,{container:document.body},r().createElement(u.Z,{open:f,anchorOrigin:e,autoHideDuration:l,onClose:v,message:g,style:{maxWidth:500},action:t?r().createElement(s.Z,{color:"primary",onClick:(0,i.pipe)(y,m)},n):void 0}))),[f,y,g]);return{SnackbarRenderer:x,showSnackbarMessage:E}}},96850:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ll});var a=n(9366),r=n(24328),l=n.n(r),o=n(44443),i=n(54426),c=n(40855),s=n(41633),u=n(52730),p=n(50914),d=n(17512),m=n(50673),f=n(18408),h=n(28220),g=n(43751),b=n(3466),y=n(67275),v=n(11821);let E,x;!function(e){e[e.PotentialMatches=0]="PotentialMatches",e[e.FindMatches=1]="FindMatches",e[e.NotAMatch=2]="NotAMatch"}(E||(E={})),function(e){e.TABLE="TABLE",e.COLUMNS="COLUMNS"}(x||(x={}));var w=n(55962),O=n(33945),C=n(87378);const S=(0,r.createContext)({reloadData:()=>{},addReloadHandler:()=>{},removeReloadHandler:()=>{}}),R=e=>{let{children:t}=e;const n=(0,r.useMemo)((()=>(()=>{const e=[];return{reloadData:()=>{e.forEach((e=>e()))},addReloadHandler:t=>{e.push(t)},removeReloadHandler:t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}})()),[]);return l().createElement(S.Provider,{value:n},t)},k=()=>{const e=(0,r.useContext)(S);if(void 0===e)throw new Error("useReloadData must be used within a ReloadDataProvider");return e};var M=n(19701);function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){j(e,t,n[t])}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=n(17569),I=n(75975),N=n(79573);function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 A="RESET",z="SET_OPTIONS",Z=B({},I.ZP.actions,{reset:(0,N.zD)(A),setOptions:(0,N.zD)(z)}),_=(e,t)=>{switch(t.type){case A:return B({},t.payload);case z:return B({},e,{options:t.payload});default:return I.ZP.reducer(e,t)}};function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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 L=(0,r.createContext)(null),V=(0,r.createContext)(null),W="SET_GLOBAL_SPINNER",U="SET_SELECTED_ITEMS",G="DESELECT_BY_ENTITIES",q="TOGGLE_SELECT",$="ACTUALIZE_SELECTED_ITEMS_COLORS",X="SET_LIMIT_SELECTION",Y="SET_COMPARISON_VIEW_MODE",K="SET_ENTITIES_MAP",Q="DELETE_EXTRA_MATCHES",J={setGlobalSpinner:(0,N.zD)(W),setSelectedItems:(0,N.zD)(U),deselectByEntities:(0,N.zD)(G),toggleSelect:(0,N.zD)(q),actualizeSelectedItemsColors:(0,N.zD)($),setLimitSelection:(0,N.zD)(X),setComparisonViewMode:(0,N.zD)(Y),setEntitiesMap:(0,N.zD)(K),deleteExtraMatches:(0,N.zD)(Q)},ee=(e,t)=>{switch(t.type){case W:return F({},e,{isGlobalSpinnerActive:t.payload});case Q:return F({},e,{selectedItems:e.selectedItems.slice(0,e.limitSelection)});case U:return F({},e,{selectedItems:t.payload.slice(0,e.limitSelection)});case G:return(0,p.evolve)({selectedItems:e=>e.filter((e=>{let{object:n}=e;return!t.payload.some((e=>{let{uri:t}=e;return t===n.uri}))}))},e);case q:return(0,p.evolve)({selectedItems:e=>{const n=t.payload,a=e.findIndex((e=>{var t,a;return(null==e||null===(t=e.object)||void 0===t?void 0:t.uri)===(null==n||null===(a=n.object)||void 0===a?void 0:a.uri)}));return a>-1?(0,p.remove)(a,1,e):(0,p.append)(n,e)}},e);case $:return(0,p.evolve)({entityColors:t=>{const n=e.selectedItems.map(d.ev7),a=n.filter((e=>!t.find((0,p.propEq)("entityUri",e))));return t.map((e=>(0,p.includes)(e.entityUri,n)?e:F({},e,{entityUri:a.shift()})))}},e);case X:return F({},e,{limitSelection:t.payload});case Y:{const n=t.payload;return F({},e,{comparisonViewMode:n,limitSelection:n===x.COLUMNS?4:void 0})}case K:{const n=t.payload;return F({},e,{entitiesMap:n})}}},te=e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(ee,{isGlobalSpinnerActive:!1,selectedItems:[],comparisonViewMode:x.COLUMNS,limitSelection:4,entitiesMap:{},entityColors:(0,d.gFw)().map((e=>({entityUri:"",color:e})))}),o=(0,T.o)({actions:J,dispatch:a});return l().createElement(L.Provider,{value:n},l().createElement(V.Provider,{value:o},t))},ne=()=>{const e=(0,r.useContext)(L);if(void 0===e)throw new Error("useViewState must be used within a ViewStateProvider");return e},ae=()=>{const e=(0,r.useContext)(V);if(void 0===e)throw new Error("useViewStateActions must be used within a ViewStateProvider");return e};var re=n(2507),le=n.n(re);const oe=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const r=ie(e,t,n,a),l=(t.children||[]).map((n=>oe(e,n,"",a.concat({name:t.name,label:t.label}))));return l.length&&(r.children=l,r.notSelectable=!0),r},ie=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const r=(0,p.omit)(["children"],t),l=r.label||r.name;return{title:l,fieldName:n||(0,d.Tde)(r.uri,a)}},ce=(e,t)=>t?(0,d.k66)(e,t).map((t=>oe(e,t))):[],se=(0,p.pipe)((0,p.map)((e=>({id:(0,d.Tde)(e.uri),label:(0,d.idV)(e.label),dataTypeDefinition:(0,d.PFL)(e)})))),ue=(0,p.pipe)(d.Fof,se),pe=(0,p.curry)(((e,t)=>e.map((e=>(0,d.Tde)(e))).some((e=>t.id===e||me(t)&&fe(t,e))))),de=e=>(0,d.QZu)(e.dataTypeDefinition),me=e=>(0,d.YkG)(e.dataTypeDefinition),fe=(0,p.curry)(((e,t)=>t.startsWith(`${e.id}.`))),he=(0,p.curry)(((e,t)=>de(t)&&e.some((e=>{let{id:n}=e;return fe(t,n)})))),ge=e=>(0,p.either)((0,p.includes)(p.__,e),he(e)),be=(e,t)=>(0,p.pipe)((0,p.reject)(de),(0,p.filter)(pe(e)))(t),ye=[20,50,100],ve=[{id:"label",get label(){return le().text("Profile name")}},{id:"matchRules",get label(){return le().text("Match rule")}},{id:"mlMatchRules",get label(){return le().text("Match IQ")},dataTypeDefinition:{type:d.oS0.TYPE_SELECT}},{id:"id",get label(){return le().text("Entity ID")}}],Ee=[{id:"score",get label(){return le().text("Match score")}},{id:"relevanceScores.relevance",get label(){return le().text("Relevance score")}},{id:"relevanceScores.actionLabel",get label(){return le().text("Match action")}}],xe=[{id:"label",get label(){return le().text("Profile name")}},{id:"id",get label(){return le().text("Entity ID")}}],we=(0,p.pluck)("id"),Oe=e=>(0,p.flatten)(e.map((0,p.prop)("values"))).join(","),Ce=e=>{let{fieldName:t}=e;return(0,p.pipe)(p.values,(0,p.pluck)("name"),(0,p.any)((0,p.equals)(t)))(d.S91)};function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Re(e,t,n[t])}))}return e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ye[0];const t={page:0,rowsPerPage:e,selectedItems:[],limitSelection:null},[n,a]=(0,r.useReducer)(_,t),l=(0,T.o)({actions:Z,dispatch:a}),o=ae(),i=ne();return[Se({},l,o),Se({},n,i),a]};var Me=n(25601),Pe=n(84236),je=n(97333);const Te=e=>{console.error(e),je.Z.addError({title:le().text("Error"),message:le().text("Can't add relationship")})},Ie=e=>{console.error(e),je.Z.addError({title:le().text("Error"),message:(0,d.xU7)(e,le().text("Something went wrong..."))})},Ne=e=>{const t=e.error;(null==t?void 0:t.errorCode)!==d.Xt7.DCR_ALREADY_EXISTS&&Ie(t)},Be=()=>{const{setGlobalSpinner:e}=ae(),{isGlobalSpinnerActive:t}=ne(),{reloadData:n}=k();return{onStartRequest:(0,r.useCallback)((()=>{e(!0)}),[e]),onFinishRequest:(0,r.useCallback)((()=>{e(!1),n()}),[n,e]),isGlobalSpinnerActive:t}};function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},De.apply(this,arguments)}const Ae=(0,r.forwardRef)(((e,t)=>{let{className:n,entities:a,entity:r,mode:o=Me.N.iconButton,size:i,onMenuClose:c=N.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:u,onStartRequest:p}=Be(),{deselectByEntities:d}=ae();return l().createElement(Pe.H,De({className:n,disabled:s,entities:a,entity:r,mode:o},i?{size:i}:{},{onMenuClose:c,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{d(a)},onError:Ie,"data-reltio-id":"reltio-potential-matches-merge-button",ref:t}))}));Ae.displayName="mergeButton";var ze=n(48376);function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ze.apply(this,arguments)}const _e=(0,r.forwardRef)(((e,t)=>{let{className:n,entities:a,entity:r,mode:o=Me.N.iconButton,size:i,onMenuClose:c=N.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:u,onStartRequest:p}=Be(),{deselectByEntities:d}=ae();return l().createElement(ze.i,Ze({className:n,disabled:s,entities:a,entity:r,mode:o},i?{size:i}:{},{onMenuClose:c,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{d(a)},onError:Ie,"data-reltio-id":"reltio-potential-matches-not-match-button",ref:t}))}));function Fe(){return Fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Fe.apply(this,arguments)}_e.displayName="NotMatchButton";const He=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",Fe({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{d:"M9 4c4.42 0 8 3.58 8 8s-3.58 8-8 8a8 8 0 01-7.419-5h2.224A6.002 6.002 0 009 18c3.31 0 6-2.69 6-6s-2.69-6-6-6a6.002 6.002 0 00-5.196 3H1.581A8 8 0 019 4zm8 .26c3.45.89 6 4.01 6 7.74 0 3.73-2.55 6.85-6 7.74v-2.09a5.99 5.99 0 000-11.3V4.26zM8 7.5l4.5 4.5L8 16.5V13H0v-2h8V7.5z",fillOpacity:".541"}))},Le=(0,r.forwardRef)(((e,t)=>{let{entity:n,entities:a,className:o,mode:i=Me.N.iconButton,onMenuClose:c=N.ZT}=e;const{deselectByEntities:s}=ae(),[u,p]=(e=>{let{entities:t,entity:n,onSuccess:a}=e;const{setGlobalSpinner:l}=ae(),{isGlobalSpinnerActive:o}=ne(),{reloadData:i}=k();return[o,(0,r.useCallback)((()=>{l(!0),(0,d.ck9)(n.uri,t).then((()=>{null==a||a()})).catch(Ie).finally((()=>{l(!1),i()}))}),[t,n,l,i,a])]})({entity:n,entities:a,onSuccess:()=>{s(a)}});return l().createElement(Me.K,{className:o,disabled:u,mode:i,label:le().text("Save on potential matches"),icon:He,onClick:p,onMenuClose:c,ref:t})}));function Ve(){return Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ve.apply(this,arguments)}Le.displayName="SetAMatchButton";const We=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",Ve({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),l().createElement("defs",null,l().createElement("path",{d:"M10 6v2H4v12.22h12V14h2v6c0 1.05-.82 1.918-1.851 1.994L16 22H4c-1.05 0-1.918-.82-1.994-1.851L2 20V8c0-1.05.82-1.918 1.851-1.994L4 6h6zm4 10v2H6v-2h8zm-3.997-3l-.001 2H6v-2h4.003zM21 2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-7l-2 2 .005-11c0-.55.445-1 .995-1h8zm-10.996 8l-.001 2H6v-2h4.004zm9.286-6.3l-3.17 3.17-1.41-1.42-1.41 1.41 2.82 2.84 4.59-4.58-1.42-1.42z",id:"svg3192636834a"})),l().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l().createElement("mask",{id:"svg3192636834b",fill:"#fff"},l().createElement("use",{xlinkHref:"#svg3192636834a"})),l().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg3192636834b)",d:"M0 0h24v24H0z"})))},Ue=(0,r.forwardRef)(((e,t)=>{let{className:n,entities:a,entity:o,mode:i=Me.N.iconButton,onMenuClose:c=N.ZT}=e;const s=(0,r.useContext)(g.S),[f,h]=(e=>{let{entities:t,entity:n,showSnackbarMessage:a}=e;const{selectors:l}=m.ZP,{setGlobalSpinner:o}=ae(),{isGlobalSpinnerActive:i}=ne(),c=(0,u.useSelector)(l.getWorkflowPath),s=(0,u.useSelector)(l.getWorkflowEnvironmentUrl),f=(0,u.useSelector)(l.getTenant),h=(0,p.prop)("uri"),g=(0,p.pipe)(p.concat,(0,p.map)(h))([n],t);return[i,(0,r.useCallback)((()=>{o(!0),(0,d.t6d)({workflowPath:c,processType:"potentialMatchReview",objectURIs:g,tenant:f,environment:s}).then((()=>{null==a||a(le().text("Potential match request: Done"))})).catch(Ne).finally((()=>{o(!1)}))}),[o,c,g,f,s,a])]})({entity:o,entities:a,showSnackbarMessage:s}),b=(0,u.useSelector)(m.ZP.selectors.getCanUserStartProcessFromQuery),y=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath);return b&&!(0,d.O27)(y)?l().createElement(Me.K,{className:n,disabled:f,mode:i,label:f?"":le().text("Potential match request"),icon:We,onClick:h,onMenuClose:c,"data-reltio-id":"reltio-potential-matches-dcr-review-button",ref:t}):null}));Ue.displayName="DCRReviewButton";const Ge=(0,r.forwardRef)(((e,t)=>{let{entity:n,entities:a,className:o,mode:i=Me.N.iconButton,onMenuClose:c=N.ZT}=e;const s=(0,r.useContext)(g.S),{deselectByEntities:p}=ae(),[f,h]=(e=>{let{entities:t,entity:n,showSnackbarMessage:a,onSuccess:l}=e;const{setGlobalSpinner:o}=ae(),{isGlobalSpinnerActive:i}=ne(),{reloadData:c}=k(),s=(0,u.useSelector)(m.ZP.selectors.getDtssPath),p=(0,u.useSelector)(m.ZP.selectors.getTenant);return[i,(0,r.useCallback)((()=>{o(!0);const e={dtssPath:s,customerTenant:p,entity:n,entities:t};((0,d.biM)(n)?(0,d.XkY)(e):(0,d.uQS)(e)).then((()=>{null==a||a(le().text("Save as potential match: Done")),null==l||l()})).catch(Ie).finally((()=>{o(!1),c()}))}),[o,s,p,n,t,a,c,l])]})({entity:n,entities:a,showSnackbarMessage:s,onSuccess:()=>{p(a)}});return l().createElement(Me.K,{className:o,disabled:f,mode:i,label:le().text("Save as potential match"),icon:He,onClick:h,onMenuClose:c,ref:t})}));function qe(){return qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},qe.apply(this,arguments)}Ge.displayName="ReinstateMatchButton";const $e=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",qe({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),l().createElement("defs",null,l().createElement("path",{d:"M19 14v3h3v2h-3v3h-2v-3h-3v-2l3-.001V14h2zM17 2a3 3 0 11-1.293 5.708l-4.535 4.535a5 5 0 11-1.414-1.414l4.534-4.536A3 3 0 0117 2zM7 12a3 3 0 100 6 3 3 0 000-6zm10-8a1 1 0 100 2 1 1 0 000-2z",id:"svg2192258504a"})),l().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l().createElement("mask",{id:"svg2192258504b",fill:"#fff"},l().createElement("use",{xlinkHref:"#svg2192258504a"})),l().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2192258504b)",d:"M0 0h24v24H0z"})))},Xe=(0,r.forwardRef)(((e,t)=>{let{className:n,mainEntity:a,currentEntity:r,matchRules:o,mode:i=Me.N.iconButton,onClick:c=N.ZT,permission:s,onMenuClose:u=N.ZT}=e;return l().createElement(Me.K,{className:n,mode:i,label:le().text("Add relationship"),icon:$e,onClick:()=>c({mainEntity:a,currentEntity:r,matchRules:o,permission:s}),onMenuClose:u,ref:t})}));Xe.displayName="CreateRelationButton";var Ye=n(80852),Ke=n(98273);const Qe=l().createContext({onClose:()=>{}});var Je=n(12933),et=n(72342);const tt=(0,et.makeStyles)((()=>({attributeSelect:{width:"100%",height:"40px"}}))),nt=(0,r.memo)((e=>{let{onChange:t,options:n,field:a}=e;const o=tt(),i=(0,r.useMemo)((()=>{const e=null==a?void 0:a.split("."),t=null==e?void 0:e.length,r=n=>{const l=n[0].fieldName.split(".").length;if(l===t||1===l&&a.includes("relevanceScores."))return n.find((e=>e.fieldName===a));if(l<t){var o;const t=e.slice(0,l).join("."),a=null===(o=n.find((e=>e.fieldName===t)))||void 0===o?void 0:o.children;if(a)return r(a)}};for(const e of n){const t=r(e.attributes);if(t)return t}}),[a,n]),c=(0,r.useCallback)((e=>{t(e.attribute.fieldName)}),[t]);return l().createElement(Je.Z,{hideCheckBox:!0,className:o.attributeSelect,value:i,itemsGroups:n,onSelect:c,ungroup:!0,single:!0})}));var at=n(74654),rt=n(71153),lt=n.n(rt),ot=n(87037);const it=(0,et.makeStyles)((()=>({rowCheckbox:{marginRight:"20px",position:"relative",padding:"12px",alignSelf:"baseline"},header:{padding:"8px 12px 8px 0",border:"rgba(0,0,0,0.05) 1px solid",borderTop:0,display:"flex",justifyContent:"space-between"},selector:{width:"160px"},sorting:{display:"flex"},arrow:{transition:"transform 0.3s ease-in"},rotate:{transform:"rotate(180deg)"}})));function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ct.apply(this,arguments)}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ut(e,t,n[t])}))}return e}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pt=e=>{let{selectedCount:t,totalCount:n,onSelect:a,sortOptions:o,sorting:i,onSorting:c,totalOnPage:s,children:u}=e;const p=it(),m=(0,r.useContext)(Qe);return l().createElement(l().Fragment,null,l().createElement(Ke.P,ct({},m,{secondTitle:!!n&&le().text("${n} Profiles",{n})})),u,!!s&&l().createElement("div",{className:p.header},l().createElement(Ye.Z,{className:p.rowCheckbox,checked:t===s,indeterminate:t>0&&t<s,onChange:a}),l().createElement("div",{className:p.sorting},l().createElement(nt,{field:null==i?void 0:i.field,options:o,onChange:e=>{c(st({},i,{field:e}))}}),l().createElement(ot.Z,{onClick:()=>{c(st({},i,{order:i.order===d.KM9.asc?d.KM9.desc:d.KM9.asc}))},classes:{root:lt()(p.arrow,{[p.rotate]:i.order===d.KM9.desc})},size:"large"},l().createElement(at.Z,null)))))},dt=(e,t,n,a)=>(0,r.useMemo)((()=>{const r=((e,t)=>[{title:"",attributes:ce(e,(0,d.nt9)(e,t))}])(n,a);return[{title:"",attributes:e.concat(t||[]).map((e=>({title:e.label,fieldName:e.id})))},...r]}),[n,a,e,t]);var mt=n(56961),ft=n(62901),ht=n(18527),gt=n(72316),bt=n(23074),yt=n(92454),vt=n(51277),Et=n(40322);const xt=e=>{const{entityColors:t}=ne(),n=(0,p.find)((0,p.propEq)("entityUri",e))(t);return n?n.color:""},wt=(0,et.makeStyles)((e=>({hidden:{visibility:"hidden"},rowCheckbox:{marginLeft:"-9px",marginRight:"9px",position:"relative",padding:"9px",alignSelf:"baseline"},entity:{paddingTop:"12px",paddingBottom:"8px",overflow:"hidden",flex:1},entityHeader:{display:"flex",justifyContent:"space-between",whiteSpace:"pre"},actions:{marginLeft:"auto",marginRight:0,display:"flex",height:"17px"},actionButtons:{display:"none"},active:{display:"flex"},wrapper:{position:"relative",padding:"0 15px 0 15px",color:"rgba(0,0,0,0.87)","&::after":{content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none"},"&:hover":{backgroundColor:"rgba(0,0,0,0.04)","& $actionButtons":{display:"flex"},"& $commentsContainer":{borderLeft:"1px solid rgba(0,0,0,0.12)"}},display:"flex",boxSizing:"border-box",borderBottom:"1px rgba(0,0,0,0.05) solid",paddingLeft:"12px"},entityLabel:{color:e.palette.primary.main,cursor:"pointer",textDecoration:"none",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis"},matchRulesWrapper:{padding:"12px 15px 4px 2px",display:"flex",alignItems:"center",boxSizing:"border-box","& $dividerWrapper:nth-child(2):not(:last-child)":{display:"block"}},selectedRow:{backgroundColor:"rgba(0, 114, 206, 0.12)"},coloredRow:{"&:before":{content:'""',position:"absolute",left:0,top:0,width:"4px",height:"100%",borderRadius:"0px 4px 4px 0px",background:e=>{let{color:t}=e;return t}}},matchScore:{paddingLeft:"12px",color:"rgba(0,0,0,0.54)"},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",height:"24px",marginLeft:"6px"},border:{borderLeft:"1px solid rgba(0,0,0,0.12)"},rightButton:{marginLeft:"8px"},tenantIcon:{marginLeft:"12px"},dividerWrapper:{display:"none",marginLeft:"12px",alignSelf:"stretch"},divider:{borderColor:"rgba(0,0,0,0.12)"},relevanceBadge:{marginLeft:"12px"}}))),Ot=(0,r.memo)((e=>{var t;let{rowIndex:n,match:a,toggleSelect:o,entityToMatch:i,isRowSelected:c,isColumnViewMode:s,actionButtonsRenderer:u,metadata:p,entitiesMap:m={}}=e;const f=a.object,h=xt(f.uri),g=wt({color:h}),[b,y]=(0,r.useState)(!1),v=f!==i,E=u,x=null===(t=a.matchRuleSummaries)||void 0===t?void 0:t.some(d.KB$);return l().createElement("div",{className:lt()(g.wrapper,ft.U,{[g.coloredRow]:s&&c,[g.selectedRow]:c})},l().createElement(Ye.Z,{className:lt()(g.rowCheckbox,{[g.hidden]:!v}),checked:c,onChange:()=>o(a),"data-reltio-id":`reltio-matches-table-checkbox-${n}`}),l().createElement("div",{className:g.entity},l().createElement("div",{className:g.entityHeader},l().createElement(ht.Z,{value:(0,d.wwR)(f),className:g.entityLabel},(0,d.idV)(f.label)),l().createElement("div",{className:g.actions},l().createElement("div",{className:lt()(g.actionButtons,{[g.active]:b})},l().createElement(E,{buttonClassName:g.rightButton,hoveredMatch:a,onActionsMenuOpen:()=>y(!0),onActionsMenuClose:()=>y(!1)})),i&&l().createElement(gt.Z,{className:lt()(g.commentsContainer,{[g.border]:b}),uri:(0,d.E_P)(i.uri,a.object.uri),objectType:d.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,d.wp9)(d.q7e.POTENTIAL_MATCH,{entityUri:i.uri,matchEntityUri:a.object.uri}),allowOnlyOneComment:!0,showAlways:b}))),l().createElement("div",{className:g.matchRulesWrapper},l().createElement(bt.Z,{entitiesMap:m,entity:f,match:a,metadata:p,variant:yt.g.excludeNotMatch}),l().createElement("div",{className:g.dividerWrapper},l().createElement(mt.Z,{orientation:"vertical",className:g.divider})),x&&l().createElement(vt.Z,{className:g.relevanceBadge,matchRuleSummaries:a.matchRuleSummaries}),!x&&!!a.matchScore&&l().createElement("div",{className:g.matchScore},a.matchScore),(0,d.biM)(f)&&l().createElement(Et.R,{className:g.tenantIcon,dataTenantId:f.dataTenant}))))})),Ct=(0,et.makeStyles)((()=>({view:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden"}}))),St=e=>{let{entityToMatch:t,matches:n,toggleSelect:a,actionButtonsRenderer:r,metadata:o,entitiesMap:i,selectedItems:c,isLoading:s}=e;const u=Ct(),{comparisonViewMode:p}=ne();return l().createElement("div",{className:u.view},s&&l().createElement(C.Z,null),n.map(((e,s)=>l().createElement(Ot,{key:e.object.uri,rowIndex:s,match:e,entityToMatch:t,toggleSelect:a,actionButtonsRenderer:r,matches:n,matchRules:e.matchRules,metadata:o,entitiesMap:i,isColumnViewMode:p===x.COLUMNS,isRowSelected:c.some((t=>t.object.uri===e.object.uri))}))))};var Rt=n(69719),kt=n(33662);const Mt=(0,et.makeStyles)({root:{display:"flex",padding:"8px 16px",gap:"8px",borderBottom:"rgba(0,0,0,0.05) 1px solid"},inputRoot:{borderRadius:"4px"},menuButtonRoot:{padding:0}}),Pt=(0,r.memo)((e=>{let{onSearch:t,searchTenant:n,onChangeSearchTenant:a,entityTypeUri:o}=e;const i=Mt(),c=(0,r.useRef)(),[s,u]=(0,r.useState)(""),d=(0,r.useCallback)((0,p.when)((0,p.propEq)("key","Enter"),(0,p.pipe)((0,p.always)(s),p.trim,t)),[s,t]),m=(0,r.useCallback)((e=>{u(e),(0,p.isEmpty)(e)&&document.activeElement!==c.current&&t(e)}),[t]);return t?l().createElement("div",{className:i.root},l().createElement(Rt.H,{entityTypeUri:o,selectedTenant:n,onChangeTenant:a}),l().createElement(kt.Z,{classes:{root:i.inputRoot},inputRef:c,fullWidth:!0,height:40,autofocus:!1,value:s,onSearch:m,onKeyPress:d})):null}));var jt=n(98538),Tt=n(39475),It=n(50985);function Nt(){return Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Nt.apply(this,arguments)}const Bt=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=p.identity}=e;const{ActionButton:r,props:o}=n;return l().createElement(r,Nt({ref:t,mode:"menuItem",onMenuClose:a},o))}));Bt.displayName="MenuItemRenderer";const Dt=Bt;function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},At.apply(this,arguments)}const zt=e=>{let{actions:t,numberOfButtons:n=2,mode:a="normal",actionButtonSize:r,classes:o,onActionsMenuOpen:i,onActionsMenuClose:c}=e;const[s,u]=(0,p.splitAt)(n,t),d="normal"===a?Me.N.button:Me.N.iconButton,m="normal"===a?"MPlus":"S";return l().createElement(l().Fragment,null,s.map(((e,t)=>{let{ActionButton:n,props:a}=e;return l().createElement(n,At({key:t,mode:d,className:null==o?void 0:o.actionButton},r?{size:r}:{},a))})),u.length>0&&l().createElement(jt.Z,{buttonComponent:Tt.k,buttonProps:{icon:It.Z,size:m,tooltipTitle:le().text("More actions"),"data-reltio-id":"reltio-potential-matches-actions-dropdown-menu-button"},className:null==o?void 0:o.moreOptions,menuId:"matches-view-actions",menuItems:u,onMenuOpen:i,onMenuClose:c,MenuItemRenderer:Dt}))},Zt=(0,et.makeStyles)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),_t=(0,r.memo)((e=>{let{entity:t,metadata:n,filters:a,sorting:o,onSorting:i,config:c}=e;const s=Zt(),[f,h]=ke(),{changeRowsPerPage:g,changePage:b,setSelectedItems:y,toggleSelect:v}=f,{page:E,rowsPerPage:x,selectedItems:S,isGlobalSpinnerActive:R}=h,{uri:j,type:T}=t||{},I=(0,u.useSelector)(m.ZP.selectors.getTenantObject),[N,B]=(0,r.useState)(""),[D,A]=(0,r.useState)(I),z=(0,r.useCallback)((e=>{A(e),b(0)}),[b]),Z=(0,r.useMemo)((()=>[(0,p.isEmpty)(N)?null:{filter:"containsWordStartingWith",fieldName:"attributes",values:[N]},{filter:"equals",fieldName:"type",values:[T]},{filter:"not equals",fieldName:"uri",values:[j]},...a].filter(p.identity)),[T,j,N,a]),_=dt(xe,[],n,T),{entities:F,total:H,findEntities:L,loading:V}=(e=>{let{entityType:t,filters:n,sorting:a,page:l,rowsPerPage:o,enabled:i,searchTenantId:c}=e;const{order:s,field:f}=a,h=(0,u.useSelector)(m.ZP.selectors.getDtssPath),g=(0,u.useSelector)(m.ZP.selectors.getTenantObject),{activityFilter:b,globalFilter:y}=(0,u.useSelector)(m.ZP.selectors.getGlobalSearchRequestOptions)||{},[v,E]=(0,r.useState)(!1),[x,w]=(0,r.useState)(0),[O,C]=(0,r.useState)([]),S=(0,M._)(),R=["uri","label","type","secondaryLabel","attributes","crosswalks"],k=(0,r.useMemo)((()=>(0,d.Uqd)()(n)),[n]),j=(0,r.useCallback)((()=>{if(i){E(!0);const e=c!==g.id,t={customerTenant:g.id,dataTenant:c,dtssPath:h},a={offset:l*o,max:o,sort:f,order:s,select:R.join(","),globalFilter:y,activityFilter:b},r=e?(0,d.uqV)(P({filters:n,options:a},t)).then((0,p.map)((0,d.E7G)(c))):(0,d.ZOr)(n,a),i={activityFilter:b,globalFilter:y},u=e?(0,d.J$m)(P({filters:n,options:i},t)):(0,d.j_Q)(n,i);S(Promise.all([r,u])).then((e=>{const[t,n]=e,{total:a}=n;C(t.map((e=>({object:e})))),w(a)})).finally((()=>E(!1)))}}),[t,k,f,s,l,o,i,b,y,c,g]);return(0,r.useEffect)((()=>{j()}),[j]),{entities:O,total:x,findEntities:j,loading:v}})({enabled:!!j,entityType:T,filters:Z,sorting:o,page:E,rowsPerPage:x,searchTenantId:D.id}),{addReloadHandler:W,removeReloadHandler:U}=k();(0,r.useEffect)((()=>(W(L),()=>U(L))),[L,W,U]);const G=()=>{b(0)},q=(0,r.useCallback)((()=>{y([])}),[y]),$=(0,r.useCallback)((()=>{y(F)}),[y,F]);(0,w.D)((()=>{G(),q()}),[j]),(0,w.D)((()=>{G()}),[a,N]);const X=(0,r.useCallback)((e=>{let{hoveredMatch:a,buttonClassName:r,onActionsMenuOpen:o,onActionsMenuClose:i}=e;const{canMerge:s,canMark:u}=(0,d.hXd)(n,c,a.object,t,a.matchRules),m=[a.object],f=(0,d.biM)(a.object),h=f&&(0,d.biM)(t),g=[{ActionButton:Ae,show:s&&!h,props:{entity:t,entities:m}},{ActionButton:_e,show:u,props:{entity:t,entities:m}},{ActionButton:Le,show:u&&!f,props:{entity:t,entities:m}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:g,classes:{actionButton:r,moreOptions:r},mode:"hover",numberOfButtons:3,onActionsMenuOpen:o,onActionsMenuClose:i})}),[t,c,n]),Y=(0,r.useMemo)((()=>F.map((e=>null==S?void 0:S.find((0,p.pathEq)(["object","uri"],e.object.uri)))).filter(p.identity).length),[S,F]);return l().createElement("div",{className:s.mainArea},l().createElement(pt,{selectedCount:Y,totalCount:H,totalOnPage:F.length,sortOptions:_,sorting:o,onSorting:i,onSelect:Y?q:$},l().createElement(Pt,{searchTenant:D,onChangeSearchTenant:z,entityTypeUri:T,onSearch:B})),l().createElement(St,{entityToMatch:t,toggleSelect:v,actionButtonsRenderer:X,matches:F,metadata:n,selectedItems:S,isLoading:V}),l().createElement(O.Z,{rowsPerPageOptions:ye,count:H,page:E,onChangePage:b,rowsPerPage:x,onChangeRowsPerPage:g}),R&&l().createElement(C.Z,null))}));_t.displayName="FindMatchesView";var Ft=n(36852),Ht=n(1824),Lt=n(63929),Vt=n(23044),Wt=n(79312),Ut=n(38677),Gt=n(69089),qt=n(79811),$t=n(290),Xt=n(35936),Yt=n(8007),Kt=n(85596),Qt=n(76141);const Jt=(0,et.makeStyles)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"16px 16px 0"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px"},path:{color:e.palette.text.secondary,fontize:"13px",letterSpacing:0,lineHeight:"15px",padding:"6px 0"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}})));function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){tn(e,t,n[t])}))}return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nn=e=>{let{config:t,mainEntity:n,currentEntity:a,matchRules:o,open:i,onClose:c=p.identity,permission:s}=e;const f=Jt(),h=(0,u.useDispatch)(),g=(0,u.useSelector)(m.ZP.selectors.getMetadata),b=(0,r.useRef)(null),{onFinishRequest:y}=Be(),{deselectByEntities:v}=ae(),{relation:E={}}=(0,u.useSelector)((e=>m.ZP.selectors.getRelationToAddByViewId(e,t.id)))||{},{inRelations:x=[],outRelations:w=[]}=(0,r.useMemo)((()=>((e,t,n,a,r)=>{const{isNotDuplicatedInRelation:l,isNotDuplicatedOutRelation:o}=(0,d.xE1)(),i=t=>(0,p.pipe)((0,p.assocPath)(["startObject","objectType"],(0,d.nt9)(e,t.startObject.objectTypeURI)),(0,p.assocPath)(["endObject","objectType"],(0,d.nt9)(e,t.endObject.objectTypeURI)))(t),c=(0,d.nt9)(e,a.type),s=(0,p.propOr)({},"matchActions",t),u=(0,d.dzT)(s,c,r),[m]=u.map((e=>{let{createRelation:t}=e;return t})).filter(p.identity);return(0,p.evolve)({inRelations:(0,p.pipe)((0,p.filter)((0,d.rny)(e,a,n)),(0,p.map)((0,d.V3K)(e)),(0,p.filter)(l),(0,p.map)(i)),outRelations:(0,p.pipe)((0,p.filter)((0,d.rny)(e,n,a)),(0,p.map)((0,d.V3K)(e)),(0,p.filter)(o),(0,p.map)(i))},m)||{}})(g,t,n,a,o)),[t,n,a,o,g]),{relationUri:O,relationType:C={}}=E,S=(0,p.pathOr)({},["object","attributes"],E),R=(0,r.useMemo)((()=>(0,d.xF8)(g,C)),[C,g]),k=(0,r.useMemo)((()=>en({attributes:S},(0,d.p2l)(E))),[E,S]),M=t.id,P=(0,r.useCallback)((0,p.pipe)(m.N5.relations.actions.setRelationType(t.id,O),h),[t,O,h]),j=(0,r.useCallback)((e=>(0,p.pipe)(m.N5.actions.addAttributes,h)(e.map((e=>en({},e,{viewId:M}))))),[M,h]),T=(0,r.useCallback)((e=>(0,p.pipe)(m.N5.actions.modifyAttribute,h)(en({},e,{viewId:M}))),[M,h]),I=(0,r.useCallback)((e=>(0,p.pipe)(m.N5.actions.removeAttribute,h)(en({},e,{viewId:M}))),[M,h]),N=(0,r.useCallback)((()=>c(O)),[O,c]),B=(0,r.useCallback)((()=>h(m.N5.errors.actions.errorsSet([]))),[h]),D=(0,r.useCallback)((()=>{const e=(0,d.xkB)(g,{relation:E});return h(m.N5.errors.actions.errorsSet(e)),0===e.length}),[E,g,h]),A=(0,r.useCallback)((()=>{B(),N()}),[B,N]),z=`${(0,d.idV)(a.label)} → ${(0,d.idV)(n.label)}`,Z=(0,p.isEmpty)(C),_=b.current,F=(0,r.useMemo)((()=>({element:_,priority:["left","right","top","bottom"]})),[_]);return l().createElement(Gt.Z,{open:i,fullWidth:!0,maxWidth:"sm",onClose:A,classes:{paper:f.dialogPaper}},l().createElement(Xt.Z,{classes:{root:f.dialogTitle}},l().createElement(Wt.Z,{variant:"subtitle1",classes:{root:f.titleText}},le().text("Add relationship")),l().createElement(Wt.Z,{variant:"body2",classes:{root:f.path}},z)),l().createElement($t.Z,{classes:{root:f.content},ref:b},l().createElement(Yt.p.Provider,{value:F},l().createElement(Kt.Z,{relation:E,metadata:g,inRelationTypes:x,outRelationTypes:w,onChange:P,applyFirstByDefault:!0}),l().createElement(Qt.Z,{className:f.attributeList,attrTypes:R,entity:k,showEmptyEditors:!0,mode:d.fO_.EDITING,parentUri:O,onAddAttributes:j,onChangeAttribute:T,onDeleteAttribute:I}))),l().createElement(qt.Z,null,l().createElement(Ut.Z,{onClick:A},le().text("Cancel")),l().createElement(Ut.Z,{disabled:Z,color:"primary",onClick:()=>{const{relationType:e,startDate:t,endDate:r}=E;D()&&((0,d.DsR)({startEntityUri:n.uri,endEntityUri:a.uri,relationType:e,attributes:(0,p.pathOr)({},["object","attributes"],E),startDate:t,endDate:r}).then((async()=>{null!=s&&s.canMark&&(await(0,d.zGm)(a.uri,[n]),v([a]),y())})).catch(Te),N())}},le().text("Add"))))};function an(){return an=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},an.apply(this,arguments)}const rn=e=>{const[t,n]=(0,r.useState)(!1),[a,o]=(0,r.useState)({}),i=(0,u.useDispatch)(),c=(0,r.useCallback)((t=>{let{mainEntity:a,currentEntity:r,matchRules:l,permission:c}=t;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{relation:{relationUri:(0,d.ncP)()},entity:e,isNew:!0}}(r);(0,p.pipe)(m.N5.relations.actions.openRelationEditor(e.id),i)(s),o({mainEntity:a,currentEntity:r,matchRules:l,permission:c}),n(!0)}),[e,i]),s=(0,r.useCallback)((t=>{(0,p.pipe)(m.N5.relations.actions.closeRelationEditor,i)(e.id,t),n(!1)}),[e,i]),f=(0,r.useCallback)((()=>t?l().createElement(nn,an({config:e,open:t,onClose:s},a)):null),[t,e,s,a]);return{showDialog:t,openAddRelationDialog:c,AddRelationDialogRenderer:f}},ln={showTransitiveMatches:!1},on=(0,et.makeStyles)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),cn=(0,r.memo)((e=>{let{entity:t,metadata:n,filters:a,options:o=ln,sorting:i,onSorting:c,config:s}=e;const f=on(),[h,g]=ke(),{changeRowsPerPage:b,changePage:y,setSelectedItems:v,toggleSelect:E}=h,{page:x,rowsPerPage:S,selectedItems:R,isGlobalSpinnerActive:M}=g,P=(0,u.useSelector)(m.ZP.selectors.getCanUserStartProcessFromQuery),j=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath),T=P&&!(0,d.O27)(j),{uri:I,type:N}=t||{},{showDialog:B,openAddRelationDialog:D,AddRelationDialogRenderer:A}=rn(s),z=dt(ve,Ee,n,N),[Z,_]=(0,r.useMemo)((()=>(0,p.partition)(Ce)(a)),[a]),F=(0,r.useMemo)((()=>(0,d.Uqd)()(_)),[_]),{matches:H,total:L,entitiesMap:V,loadMatches:W,loading:U}=(e=>{let{entity:t,filter:n,rules:a,sorting:l,page:o,rowsPerPage:i,options:c,enabled:s}=e;const{setEntitiesMap:u}=ae(),[p,d]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>{d(!0)}),[d]),f=(0,r.useCallback)((()=>{d(!1)}),[d]),{total:h,matches:g,entitiesMap:b,loadMatches:y}=(0,Vt.s)({enabled:s,entity:t,filter:n,rules:a,onFinishLoading:f,onStartLoading:m,options:c,page:o,rowsPerPage:i,sorting:l,markMatchedValues:!0});return(0,r.useEffect)((()=>{u(b)}),[u,b]),{matches:g,total:h,entitiesMap:b,loadMatches:y,loading:p}})({enabled:!!I,entity:t,filter:F,page:x,sorting:i,rowsPerPage:S,options:o,rules:Oe(Z)}),{addReloadHandler:G,removeReloadHandler:q}=k();(0,r.useEffect)((()=>(G(W),()=>q(W))),[W,G,q]);const $=(0,r.useCallback)((()=>{v([])}),[v]),X=(0,r.useCallback)((()=>{v(H)}),[v,H]);(0,w.D)((()=>{y(0),$()}),[I,o]);const Y=(0,r.useMemo)((()=>(0,d.NVY)(I,Object.keys(V))),[I,V]),K=(0,Ft.C)({objectIds:Y}),Q=(0,r.useCallback)((e=>{let{hoveredMatch:a,buttonClassName:r,onActionsMenuOpen:o,onActionsMenuClose:i}=e;const c=(0,d.hXd)(n,s,a.object,t,a.matchRules),{canMerge:u,canAddRelation:m,canMark:f}=c,h=[a.object],g=[...h,t].some(d.biM),b=[...h,t].every(d.biM),y=[{ActionButton:Ae,show:u&&!b,props:{entity:t,entities:h}},{ActionButton:_e,show:f,props:{entity:t,entities:h}},{ActionButton:Ue,show:!g&&T,props:{entity:t,entities:h}},{ActionButton:Xe,show:m&&!g,props:{mainEntity:t,currentEntity:a.object,matchRules:a.matchRules,onClick:D,permission:c}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:y,classes:{actionButton:r,moreOptions:r},mode:"hover",numberOfButtons:2,onActionsMenuOpen:o,onActionsMenuClose:i})}),[t,s,n,D,T]),J=(0,r.useMemo)((()=>H.map((e=>null==R?void 0:R.find((0,p.equals)(e)))).filter(p.identity).length),[R,H]);return l().createElement(Ht.e,{collaboration:K},l().createElement(Lt.X.Provider,{value:V},l().createElement("div",{className:f.mainArea},l().createElement(pt,{selectedCount:J,totalCount:L,totalOnPage:H.length,sortOptions:z,sorting:i,onSorting:c,onSelect:J?$:X}),l().createElement(St,{entityToMatch:t,toggleSelect:E,actionButtonsRenderer:Q,matches:H,metadata:n,entitiesMap:V,selectedItems:R,isLoading:U}),l().createElement(O.Z,{rowsPerPageOptions:ye,count:L,page:x,onChangePage:y,rowsPerPage:S,onChangeRowsPerPage:b}),M&&l().createElement(C.Z,null)),B&&l().createElement(A,null)))}));cn.displayName="MatchesView";const sn=cn;var un=n(18907);function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dn=(0,et.makeStyles)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),mn=(0,r.memo)((e=>{let{entity:t,metadata:n,filters:a,sorting:o,onSorting:i,config:c}=e;const s=dn(),[f,h]=ke(),{changeRowsPerPage:g,changePage:b,setSelectedItems:y,toggleSelect:v}=f,{page:E,rowsPerPage:x,selectedItems:S,isGlobalSpinnerActive:R}=h,{uri:P,type:j}=t||{},T=(0,u.useSelector)(m.ZP.selectors.getCanUserStartProcessFromQuery),I=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath),N=T&&!(0,d.O27)(I),{matches:B,total:D,entitiesMap:A,loadNotMatches:z,loading:Z}=(e=>{let{entityUri:t,filter:n,sorting:a,page:l,rowsPerPage:o,enabled:i}=e;const{order:c,field:s}=a||{},[p,f]=(0,r.useState)(0),[h,g]=(0,r.useState)(!1),[b,y]=(0,r.useState)([]),[v,E]=(0,r.useState)({}),x=(0,u.useSelector)(m.ZP.selectors.getTenant),w=(0,u.useSelector)(m.ZP.selectors.getDtssPath),O=(0,u.useSelector)(m.ZP.selectors.getDataTenants),{activityFilter:C,globalFilter:S}=(0,u.useSelector)(m.ZP.selectors.getGlobalSearchRequestOptions)||{},R=(0,r.useMemo)((()=>({dtssPath:w,dataTenants:O,entity:{uri:t},customerTenant:x,dtssRequest:d.WSA})),[w,O,t,x]),k=(0,r.useCallback)((0,d.U_T)(R,d.pg),[R]),P=(0,un.a)(k),j=(0,M._)(),T=e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){pn(e,t,n[t])}))}return e}({matchRules:[d.h_8]},e),I=(0,r.useCallback)((e=>{i&&(g(!0),j(P({entityUri:t,offset:l*o,max:o,filter:(0,d.vyX)(S,n)||"",sort:s,force:e,order:c,activeness:C})).then((e=>{const{response:t,total:n,originalResponse:a}=e;f(n),y(t.map(T)),t.map((e=>{let{uri:t}=e;return t})).length>0&&E((0,d.KPC)(a))})).finally((()=>g(!1))))}),[t,n,s,c,l,o,C,i,S]);return(0,r.useEffect)((()=>{I()}),[I]),{matches:b,total:p,entitiesMap:v,loadNotMatches:(0,r.useCallback)((()=>{I(!0)}),[I]),loading:h}})({enabled:!!P,entityUri:P,filter:(0,d.Uqd)()(a),page:E,rowsPerPage:x,sorting:o}),_=(0,r.useMemo)((()=>(0,d.NVY)(P,Object.keys(A))),[P,A]),F=(0,Ft.C)({objectIds:_}),H=dt(xe,[],n,j),{addReloadHandler:L,removeReloadHandler:V}=k();(0,r.useEffect)((()=>(L(z),()=>V(z))),[z,L,V]);const W=(0,r.useCallback)((()=>{y([])}),[y]),U=(0,r.useCallback)((()=>{y(B)}),[y,B]);(0,w.D)((()=>{b(0),W()}),[P]);const G=(0,r.useCallback)((e=>{let{hoveredMatch:a,buttonClassName:r,onActionsMenuOpen:o,onActionsMenuClose:i}=e;const{canMerge:s,canMark:u}=(0,d.hXd)(n,c,a.object,t,a.matchRules),m=[a.object],f=[...m,t].some(d.biM),h=[...m,t].every(d.biM),g=[{ActionButton:Ae,show:s&&!h,props:{entity:t,entities:m}},{ActionButton:Ge,show:u,props:{entity:t,entities:m}},{ActionButton:Ue,show:!f&&N,props:{entity:t,entities:m}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:g,classes:{actionButton:r,moreOptions:r},mode:"hover",numberOfButtons:2,onActionsMenuOpen:o,onActionsMenuClose:i})}),[t,c,n,N]),q=(0,r.useMemo)((()=>B.map((e=>null==S?void 0:S.find((0,p.equals)(e)))).filter(p.identity).length),[S,B]);return l().createElement(Ht.e,{collaboration:F},l().createElement(Lt.X.Provider,{value:A},l().createElement("div",{className:s.mainArea},l().createElement(pt,{selectedCount:q,totalCount:D,totalOnPage:B.length,sortOptions:H,sorting:o,onSorting:i,onSelect:q?W:U}),l().createElement(St,{entityToMatch:t,toggleSelect:v,actionButtonsRenderer:G,matches:B,metadata:n,selectedItems:S,isLoading:Z}),l().createElement(O.Z,{rowsPerPageOptions:ye,count:D,page:E,onChangePage:b,rowsPerPage:x,onChangeRowsPerPage:g}),R&&l().createElement(C.Z,null))))}));mn.displayName="NotMatchView";const fn=e=>{let{entity:t,metadata:n,filters:a,options:r,sorting:o,onSorting:i,config:c,activeView:s}=e;return(()=>{switch(s){case E.PotentialMatches:return l().createElement(sn,{entity:t,metadata:n,filters:a,options:r,config:c,sorting:o,onSorting:i});case E.FindMatches:return l().createElement(_t,{entity:t,metadata:n,filters:a,config:c,sorting:o,onSorting:i});case E.NotAMatch:return l().createElement(mn,{entity:t,metadata:n,filters:a,config:c,sorting:o,onSorting:i});default:return l().createElement("div",null)}})()},hn=(0,et.makeStyles)({wrapper:{width:"100%",height:"100%",display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=(0,r.memo)((e=>{let{active:t,tabs:n,onClose:a,config:o}=e;const i=hn(),c=(0,u.useSelector)(m.ZP.selectors.getMetadata),s=(0,u.useSelector)(m.ZP.selectors.getEntity),d=!(0,p.isNil)(t),f=(0,r.useMemo)((()=>{var e;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){gn(e,t,n[t])}))}return e}({},null===(e=n[t])||void 0===e?void 0:e.headerProps,{onClose:a})}),[a,t,n]),{sorting:h,filters:g,options:b,onSorting:y}=n[t]||{};return l().createElement("div",{className:i.wrapper},l().createElement(v.h,{open:d},l().createElement(Qe.Provider,{value:f},l().createElement(fn,{config:o,entity:s,filters:g,options:b,sorting:h,onSorting:y,metadata:c,activeView:t}))))}));bn.displayName="RightSidePanel";var yn=n(30936),vn=n(17998),En=n(79935),xn=n(29742),wn=n(87825),On=n(4270);const Cn=(0,et.makeStyles)((()=>({button:{"&.MuiButtonGroup-grouped":{minWidth:"90px",padding:"8px 12px"}}})));var Sn=n(95775),Rn=n(18523);function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mn=[{id:x.COLUMNS,tooltipTitle:le().text("Column"),title:le().text("Column"),Icon:Sn.Z},{id:x.TABLE,tooltipTitle:le().text("Table"),title:le().text("Table"),Icon:Rn.Z}],Pn=e=>{let{className:t}=e;const n=Cn(),{comparisonViewMode:a,selectedItems:r}=ne(),{setComparisonViewMode:o}=ae(),i=r.length>4;return l().createElement(On.Z,{className:t,classes:{button:n.button},modes:Mn.map((e=>e.id===x.COLUMNS?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){kn(e,t,n[t])}))}return e}({},e,{disabled:i,tooltipTitle:i?le().text("Column view supports maximum ${maxProfiles} profiles",{maxProfiles:4}):e.tooltipTitle}):e)),modeId:a,onChange:o})},jn=(0,et.makeStyles)((e=>({header:{padding:"0 8px 0 16px",backgroundColor:"#fff","& $splitter":{height:"32px",marginRight:"16px",marginLeft:"4px",color:"rgba(0, 0, 0, 0.12)"}},title:{fontSize:"16px",fontWeight:400,lineHeight:"24px",letterSpacing:"0.15px",color:e.palette.text.primary},clearAllButton:{marginLeft:"16px"},mergeButton:{marginRight:"12px"},total:{color:e.palette.text.secondary},splitter:{},actionSplitter:{height:"32px",margin:"0 8px",color:"rgba(0, 0, 0, 0.12)"}}))),Tn=(0,p.map)((0,p.prop)("object")),In=e=>{let{config:t,columnsData:n,selectedColumns:a,onChangeColumns:o,showNonOv:i,onChangeShowNonOv:c}=e;const s=jn(),f=(0,u.useSelector)(m.ZP.selectors.getEntity),h=(0,u.useSelector)(m.ZP.selectors.getMetadata),{selectedItems:g,limitSelection:b}=ne(),{setSelectedItems:y}=ae(),v=Tn(g),{canMerge:E,canMark:x}=(0,d.OCS)(h,t,f,g),w=[...v,f].some(d.biM),O=v.some(d.biM)&&(0,d.biM)(f),C=(0,r.useMemo)((()=>[{ActionButton:Ae,show:E&&!O,props:{entity:f,entities:v}},{ActionButton:_e,show:x,props:{entity:f,entities:v}},{ActionButton:Ue,show:!w,props:{entity:f,entities:v}}].filter((0,p.prop)("show"))),[x,E,f,v,w,O]),S=0!==g.length,R=(0,r.useCallback)((()=>{c(p.not)}),[c]),k=(0,r.useMemo)((()=>[{selected:!i,text:le().text("Show only OV"),onClick:R,id:"showNonOv"}]),[R,i]);return l().createElement(vn.Z,{title:"",classes:{root:s.header},"data-reltio-id":"reltio-potential-matches-table-header"},l().createElement(Wt.Z,{className:s.title},l().createElement("span",null,le().text("Match Review")),S&&l().createElement("span",{className:s.total}," ","(",g.length,b&&"/"+b,")")),S&&l().createElement(Ut.Z,{onClick:()=>{y([])},className:s.clearAllButton,color:"primary"},le().text("Clear All")),l().createElement(En.Z,null),S&&l().createElement(l().Fragment,null,l().createElement(zt,{actions:C,numberOfButtons:2}),l().createElement(mt.Z,{orientation:"vertical",classes:{vertical:s.actionSplitter}})),l().createElement(xn.Z,{items:k,menuId:"matches-view-settings"}),l().createElement(wn.Z,{columnsData:n,selectedColumns:a,onChangeColumns:o}),l().createElement(mt.Z,{orientation:"vertical",classes:{vertical:s.splitter}}),l().createElement(Pn,null))};var Nn=n(53850),Bn=n(79002),Dn=n(45226),An=n(54837);const zn=l().createContext({expandedMap:{},onExpandType:()=>{}});function Zn(){return Zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Zn.apply(this,arguments)}zn.displayName="ExpandedContext";const _n=e=>{const t=(0,r.forwardRef)(((t,n)=>{const{attributeType:a}=t,{expandedMap:o}=(0,r.useContext)(zn),i=o[a.uri];return l().createElement(e,Zn({},t,{expanded:i,ref:n}))}));return t.displayName="WithExpanded",t};var Fn=n(23883);const Hn="rgba(140, 193, 82, 0.12)",Ln=(0,et.makeStyles)({complexAttributesHeadRenderer:{height:"100%",width:"100%",display:"flex",alignItems:"flex-start"},complexAttributesHeadLabel:{flex:1,marginLeft:"5px"},arrowButton:{cursor:"pointer",marginLeft:"-3px"},attribute:{whiteSpace:"pre-wrap"},matchedAttribute:{fontWeight:500,position:"relative","&::after":{content:'""',position:"absolute",left:"-1000px",top:0,width:"5000px",height:"100%",background:Hn,pointerEvents:"none"}}}),Vn=(0,et.makeStyles)({badge:{borderRadius:"50%",background:Hn,fontWeight:500,height:"20px",width:"20px",display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"flex-start",marginBottom:"2px",marginTop:"-2px"}}),Wn=e=>{let{attributeValue:t}=e;const n=Vn(),{highlightedValuesUris:a=[]}=(0,r.useContext)(An.j),o=a.filter((e=>(0,d.sOy)(e,t.uri))).length;return o>0?l().createElement(Fn.Z,{title:1===o?le().text("${count} match",{count:o}):le().text("${count} matches",{count:o})},l().createElement("div",{className:n.badge},o)):null},Un=_n(Dn.Z),Gn=e=>{let{value:{attributeType:t,attributeValues:n,matchedValuesUris:a,showNonOv:o}}=e;const i=Ln(),c=(0,r.useMemo)((()=>({highlightedValuesUris:a,highlightedClassName:i.matchedAttribute})),[a,i.matchedAttribute]);return l().createElement("div",{className:i.attribute},l().createElement(An.j.Provider,{value:c},l().createElement(Un,{values:n,attributeType:t,showNonOv:o,RightSlot:Wn})))};var qn=n(40435);const $n=l().createContext({});$n.displayName="ColumnDataContext";const Xn=(0,et.makeStyles)({menuButtonWrapper:{display:"none",position:"absolute",top:"-4px",right:"-14px"},headCell:{display:"flex",position:"relative","th:hover &":{"& $menuButtonWrapper":{display:"block"}}},active:{display:"block"}}),Yn=e=>{let{label:t,id:n,hideable:a}=e;const o=Xn(),{setAnchor:i,setHoveredId:c,hoveredId:s}=(0,r.useContext)($n),u=(0,r.useRef)();return l().createElement("div",{className:o.headCell},t,!1!==a&&l().createElement("div",{className:lt()(o.menuButtonWrapper,{[o.active]:s===n}),ref:u},l().createElement(qn.Z,{icon:It.Z,onClick:()=>{i(u.current),c(n)},size:"S"})))};var Kn=n(85777);const Qn=e=>{let{label:t,attributeType:n,id:a}=e;const o=Ln(),{expandedMap:i,onExpandType:c}=(0,r.useContext)(zn),s=(0,r.useCallback)((()=>c(n.uri)),[c,n]),u=i[n.uri];return l().createElement("div",{className:o.complexAttributesHeadRenderer},l().createElement(Kn.Z,{expanded:u,onClick:s,className:o.arrowButton}),l().createElement("div",{className:o.complexAttributesHeadLabel},l().createElement(Yn,{label:t,id:a})))};var Jn=n(8419),ea=n(92679);const ta=l().createContext({hoveredEntity:null,resetHoveredEntity:()=>{}});ta.displayName="HoveredEntityContext";const na=(0,r.memo)((e=>{let{value:{mainEntity:t,entity:n,matchRules:a,permission:r},onActionsMenuClose:o,onActionsMenuOpen:i,openAddRelationDialog:c,classes:s={},mode:u="hover"}=e;const{canMerge:m,canAddRelation:f,canMark:h}=r,g=[t,n].some(d.biM),b=[t,n].every(d.biM),y=!a,v=!y&&a.includes(d.h_8),E=!v&&!y,x=[{ActionButton:Ae,show:m&&!b&&(v||E||y),props:{entity:t,entities:[n]}},{ActionButton:_e,show:h&&(E||y),props:{entity:t,entities:[n]}},{ActionButton:Ge,show:h&&v,props:{entity:t,entities:[n]}},{ActionButton:Ue,show:!g&&(v||E),props:{entity:t,entities:[n]}},{ActionButton:Le,show:h&&y&&!(0,d.biM)(n),props:{entity:t,entities:[n]}},{ActionButton:Xe,show:f&&!g,props:{mainEntity:t,currentEntity:n,matchRules:a,onClick:c,permission:r}}].filter((0,p.prop)("show"));return l().createElement(zt,{actions:x,numberOfButtons:2,mode:u,actionButtonSize:"hover"===u?"XS":void 0,classes:{actionButton:s.actionButton,moreOptions:s.moreOptions},onActionsMenuClose:o,onActionsMenuOpen:i})})),aa=(0,et.makeStyles)({container:{position:"relative",width:"100%",height:"140px",display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden"},hovered:{backgroundColor:"rgb(245, 245, 245)"},colored:{"&:before":{content:'""',position:"absolute",left:0,top:0,width:"100%",height:"4px",background:e=>{let{color:t}=e;return t}}},removeButton:{position:"absolute",zIndex:1,margin:"4px"},matchControlsContainer:{display:"flex",alignItems:"center",height:"45px",margin:"4px 8px"},rightButton:{display:"flex",alignItems:"center"},moreOptions:{marginLeft:"8px"}});function ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var la=n(35536),oa=n(94009),ia=n(14834),ca=n(19262),sa=n(94215),ua=n(58365),pa=n(54064);const da=e=>"potentialMatchReview"===e.processType,ma=l().createContext((()=>{}));ma.displayName="WorkflowTasksAvailabilityContext";const fa=(0,et.makeStyles)({container:{position:"relative",minHeight:"86px",display:"flex",overflow:"hidden",margin:"-16px"},assigneeContainer:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"16px 14px 16px 48px"}});function ha(){return ha=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ha.apply(this,arguments)}const ga=(0,p.pick)(["processInstanceComments","taskId"]),ba=e=>{let{entity:t,match:n}=e;const a=fa(),o=(e=>{let{entity:t,match:n}=e;const a=(0,u.useSelector)(m.ZP.selectors.getWorkflowPath),l=(0,u.useSelector)(m.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,u.useSelector)(m.ZP.selectors.getTenant),i=(0,M._)(),{uri:c}=t,s=(0,d.ev7)(n),[f,h]=(0,r.useState)(!1),[g,b]=(0,r.useState)([]),y=(0,pa.b)(),v=(0,r.useCallback)((()=>{a&&s!==c&&(h(!0),i((0,d.uT0)({entityUri:c,workflowPath:a,environment:l,tenant:o})).then((e=>{const{data:t}=e,n=(0,p.propSatisfies)((0,p.includes)(s),"objectURIs"),a=(0,p.allPass)([da,n]),r=t.filter(a);b(r)})).catch((e=>{console.warn("Workflow error:",e),b([])})).finally((()=>h(!1))))}),[c,l,o,a,s]),E=(0,r.useCallback)(((e,t)=>{b((0,p.map)((0,p.when)((0,p.propEq)("taskId",e),(0,p.mergeLeft)(t))))}),[]),{deselectByEntities:x}=ae(),w=(0,r.useCallback)((e=>{y(e),x([n.object])}),[y,x,n.object]);return{loading:f,tasks:g,loadTasks:v,updateTaskState:E,total:g.length,onActionSuccess:w}})({entity:t,match:n}),{tasks:i,loadTasks:c}=o,s=(0,r.useContext)(ma);(0,r.useEffect)((()=>{c()}),[c]);const f=i[0],h=(0,d.ev7)(n);(0,r.useEffect)((()=>{null==s||s(h,!!f)}),[s,h,f]);const{actions:g,actionRequestIsInProgress:b}=(0,la.t)({taskId:null==f?void 0:f.taskId,possibleActions:null==f?void 0:f.possibleActions,assignee:null==f?void 0:f.assignee,isOpen:null==f?void 0:f.isOpen}),y=f&&l().createElement(oa.Z,{actions:g,isInProgress:b});return f?l().createElement(ia.O.Provider,{value:o},l().createElement("div",{className:a.container},l().createElement(ca.Z,ha({},(e=>({date:e.dueDate,type:e.processDefinitionDisplayName,createdBy:e.createdBy,step:e.displayName}))(f),{Actions:y}),l().createElement("div",{className:a.assigneeContainer},l().createElement(sa.Z,{assignee:f.assignee,taskId:f.taskId,isTaskOpen:f.isOpen})),l().createElement(ua.V,ha({},ga(f),{workflowActions:g,actionRequestIsInProgress:b,preferredAction:f.preferredAction}))))):null},ya=[{id:"profile",label:le().text("Profile name"),dataTypeDefinition:{type:d.oS0.TYPE_STRING},hideable:!1,draggable:!1,initialWidth:280,autoResize:!1,modes:[x.COLUMNS,x.TABLE]},{id:"matchRules",label:le().text("Match method"),dataTypeDefinition:{type:d.oS0.TYPE_SELECT},initialWidth:130,minWidth:130,autoResize:!1,modes:[x.COLUMNS,x.TABLE]},{id:"workflowCard",label:le().text("Workflow"),modes:[x.COLUMNS]},{id:"entityId",label:le().text("Entity ID"),dataTypeDefinition:{type:d.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1,modes:[x.COLUMNS,x.TABLE]},{id:"score",label:le().text("Match score"),dataTypeDefinition:{type:d.oS0.TYPE_INT},initialWidth:100,modes:[x.TABLE,x.COLUMNS]},{id:"relevanceScore",label:le().text("Relevance score"),initialWidth:130,minWidth:130,modes:[x.TABLE,x.COLUMNS]},{id:"sources",label:le().text("Sources"),modes:[x.COLUMNS,x.TABLE]},{id:"crosswalks",label:le().text("Crosswalks"),modes:[x.COLUMNS]}];var va=n(60590);const Ea=(0,et.makeStyles)({crosswalk:{marginBottom:"8px"},crosswalkIcon:{marginRight:"5px"},labelContainer:{display:"flex",alignItems:"center",width:"100%"},spacer:{flex:1}}),xa=e=>{let{attributeValue:t}=e;const n=Ea(),a=(0,u.useSelector)(m.ZP.selectors.getMetadata),r=t.value.crosswalk;return l().createElement("div",{className:n.labelContainer},l().createElement(va.Z,{className:n.crosswalkIcon,crosswalk:r,showTooltip:!1}),l().createElement("div",null,(0,d.tH7)(a,r.type)),l().createElement("div",{className:n.spacer}),l().createElement("div",null,r.value))},wa=_n(Dn.Z),Oa=(0,et.makeStyles)({wrapper:{display:"flex",flexWrap:"wrap",marginBottom:"-8px"},crosswalkIcon:{marginRight:"5px",marginBottom:"8px"}}),Ca=e=>{let{value:t,children:n}=e;const{crosswalks:a,dataTenant:r}=t,o=Oa(),i=(0,d.biM)(t);return i||!(0,d.O27)(a)?l().createElement("div",{className:o.wrapper},n,a.map((e=>l().createElement(va.Z,{key:e.uri,className:o.crosswalkIcon,crosswalk:e}))),i&&l().createElement(Et.R,{dataTenantId:r})):null},Sa=(0,et.makeStyles)({inline:{display:"inline-flex"}}),Ra=e=>{let{value:t}=e;const n=Sa();return l().createElement(vt.Z,{className:n.inline,matchRuleSummaries:t})};function ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Ma(e,t,n[t])}))}return e}function Ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pa={profile:{cellRenderer:e=>{let{value:{entity:t,config:n,isSelectedEntity:a,onRemove:o}}=e,i=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e.value,["entity","config","isSelectedEntity","onRemove"]);const c=xt(t.uri),s=aa({color:c}),{hoveredEntity:u,resetHoveredEntity:p}=(0,r.useContext)(ta),m=(0,d.BTI)(t)===u,{showDialog:f,openAddRelationDialog:h,AddRelationDialogRenderer:g}=rn(n),b=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ra(e,t,n[t])}))}return e}({},i,{entity:t})),[i,t]);return l().createElement(l().Fragment,null,l().createElement("div",{className:lt()(s.container,{[s.hovered]:a&&m,[s.colored]:a})},a&&l().createElement(qn.Z,{className:s.removeButton,icon:ea.default,onClick:o,size:"XXS"}),l().createElement(Jn.Z,{entity:t}),a&&l().createElement("div",{className:s.matchControlsContainer},l().createElement(na,{mode:"normal",value:b,onActionsMenuClose:p,openAddRelationDialog:h,classes:{actionButton:s.rightButton,moreOptions:s.moreOptions}}))),f&&l().createElement(g,null))},headCellRenderer:Yn,label:""},matchRules:{cellRenderer:e=>{let{value:{metadata:t,entity:n,match:a,entitiesMap:r,show:o}}=e;return o?l().createElement(bt.Z,{entity:n,match:a,entitiesMap:r,metadata:t}):null},headCellRenderer:Yn},workflowCard:{cellRenderer:e=>{let{value:{entity:t,match:n}}=e;return l().createElement(ba,{entity:t,match:n})},headCellRenderer:Yn},sources:{cellRenderer:Ca,headCellRenderer:Yn},entityId:{headCellRenderer:Yn},crosswalks:{cellRenderer:e=>{let{value:{crosswalks:t,attributeType:n}}=e;const a=Ea(),o=(0,u.useSelector)(m.ZP.selectors.getMetadata),i=(0,r.useMemo)((()=>null==t?void 0:t.map((e=>((e,t,n)=>t.attributes.reduce(((t,a)=>(a.uri===d.G39.sourceSystems.uri?t.value[a.uri]=(0,d.tH7)(n,e.type):e[a.uri]&&(t.value[a.uri]=e[a.uri]),t)),{value:{crosswalk:e},uri:e.uri}))(e,n,o)))),[o,t,n]);return i?l().createElement(wa,{values:i,attributeType:n,LabelRenderer:xa,valueContainerClassName:a.crosswalk}):null},headCellRenderer:Qn,attributeType:{uri:"crosswalks",name:"crosswalks",type:"Nested",attributes:Object.values(d.G39)}},score:{headCellRenderer:Yn},relevanceScore:{headCellRenderer:Yn,cellRenderer:Ra}},ja=ya.filter((e=>{let{modes:t}=e;return t.includes(x.COLUMNS)})).map((e=>ka({},(0,p.pick)(["id","label","hideable"],e),Pa[e.id]))),Ta=(0,p.pipe)((0,p.split)("/"),p.last),Ia=e=>(0,p.when)(p.identity,(0,p.pipe)(p.values,(0,p.chain)((0,p.chain)((0,p.cond)([[(0,p.path)(["value","uri"]),(0,p.path)(["value","uri"])],[(0,p.path)(["value","values"]),(0,p.pipe)((0,p.path)(["value","values"]),(0,p.map)((0,p.prop)("uri")))]]))),(0,p.filter)(p.identity)))(e),Na=(e,t,n,a,r,l,o,i)=>{const{object:c,isMainEntity:s,matchRules:u,matchedValues:m,matchScore:f,matchRuleSummaries:h}=t;switch(r.id){case"entityId":return(0,d.BTI)(c);case"profile":return{mainEntity:a,isSelectedEntity:!s,onRemove:()=>o(t),entity:c,matchRules:u,permission:(0,d.hXd)(e,l,c,a,u),config:l};case"matchRules":return{metadata:e,entity:a,match:t,entitiesMap:n,show:!s&&!!u};case"sources":return c;case"crosswalks":return{crosswalks:c.crosswalks,attributeType:r.attributeType};case"workflowCard":return{entity:a,match:t};case"score":return f||0;case"relevanceScore":return h}if((0,d.vZp)(r.id)){const e=(0,d.xy8)(r.attributeType),t=(0,p.pipe)((0,p.pathOr)([],[e,r.attributeType.name]),(0,p.when)((0,p.always)(!i),(0,p.filter)(d.OXP)))(c);return{attributeType:r.attributeType,attributeValues:t,matchedValuesUris:Ia(m),showNonOv:i}}},Ba=l().createContext((()=>{}));Ba.displayName="ColumnHandlerContext";const Da=(0,p.pipe)((0,p.split)("."),(0,p.slice)(0,2),(0,p.join)(".")),Aa=(0,p.pipe)((0,p.map)((0,p.when)(d.vZp,Da)),p.uniq);var za=n(47019),Za=n(81774),_a=n(35488),Fa=n(82056);let Ha;!function(e){e.INSERT_BELOW="below",e.INSERT_ABOVE="above",e.HIDE="hide"}(Ha||(Ha={}));const La={[Ha.INSERT_BELOW]:le().text("Insert row below"),[Ha.INSERT_ABOVE]:le().text("Insert row above"),[Ha.HIDE]:le().text("Hide row")},Va=e=>{let{open:t,anchorEl:n,onClick:a,onClose:r,actions:o}=e;return l().createElement(za.ZP,{open:t,anchorEl:n,onClose:r},l().createElement(Za.Z,{component:"div"},o.map(((e,t)=>((e,t,n)=>l().createElement(_a.ZP,{button:!0,component:"div",key:n,onClick:t},l().createElement(Fa.Z,{primary:La[e],primaryTypographyProps:{variant:"body2"}})))(e,(e=>()=>{a(e)})(e),t)))))};var Wa=n(45013);function Ua(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ga=(e,t)=>e.filter(t).map((e=>e.columns?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Ua(e,t,n[t])}))}return e}({},e,{columns:Ga(e.columns,t)}):e)),qa=(0,r.memo)((e=>{let{anchorEl:t,onClose:n,actions:a,id:o,selectedAttributes:i,setSelectedAttributes:c,groupColumnsData:s}=e;const u=(0,r.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Ga(e,(e=>!t.some((t=>e.id===t))))}(s,i)),[s,i]),[p,d]=(0,r.useState)(),[m,f]=(0,r.useState)(!1);(0,r.useEffect)((()=>{t&&f(!0)}),[t]);const h=()=>{d(null),f(!1),n()};return l().createElement(l().Fragment,null,l().createElement(Va,{open:m,anchorEl:t,actions:a,onClose:()=>{f(!1),p||n()},onClick:e=>{if(e!==Ha.HIDE)d(e),f(!1);else{const e=[...i],t=i.indexOf(o);t>-1&&(e.splice(t,1),c(e),h())}}}),l().createElement(Wa.G,{hideCheckBox:!0,anchorEl:p?t:void 0,columnsData:u,selectedColumns:i,onColumnClick:e=>{let{id:t}=e;const n=[...i],a=i.indexOf(o),r=p===Ha.INSERT_ABOVE?a:a+1;n.splice(r,0,t),c(n),h()},onClose:h,title:le().text("Add row")}))}));function $a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xa="1px solid rgba(0,0,0,0.12)",Ya=(0,et.makeStyles)((e=>({container:{overflow:"auto",height:"100%",width:"100%"},comparisonTableWrapper:{display:"flex",alignItems:"flex-start",position:"relative"},collapsedRow:{display:"none"},comparisonTable:{borderSpacing:0,"& tbody tr:hover td, & tbody tr:hover th":{backgroundColor:"rgb(235, 235, 235)"},"table& tbody tr:hover td:nth-child(2)":{backgroundColor:"rgb(215, 228, 239)"},"& td, & th":{borderRight:Xa,borderBottom:Xa,margin:0,verticalAlign:"top",textAlign:"left",fontSize:"13px",minHeight:"16px",boxSizing:"border-box",wordBreak:"break-word",wordWrap:"break-word",backgroundColor:"white"},"& td":{minWidth:310,maxWidth:310,padding:"16px",overflow:"hidden",height:0},"& td:empty, th:empty":{padding:"0px 16px"},"& th":{minWidth:212,maxWidth:212,padding:"16px"},"& td:first-child, th:first-child":{borderLeft:Xa,position:"sticky",left:"0",zIndex:2,backgroundColor:"rgb(245, 245, 245)",color:e.palette.text.secondary,fontWeight:"normal"},"& td:nth-child(2), th:nth-child(2)":{borderRight:"2px solid rgba(0,0,0,0.12)",position:"sticky",left:"212px",zIndex:2},"& thead tr:first-child td, & thead tr:first-child th":{borderTop:"none",position:"sticky",top:"0",height:141,padding:0,zIndex:2},"& thead tr:nth-child(-n+2) td:nth-child(-n+2), & thead tr:nth-child(-n+2) th:nth-child(-n+2)":{zIndex:3},"table& tr td:nth-child(2), th:nth-child(2)":{backgroundColor:"rgb(224, 238, 249)"}},emptyState:{position:"sticky",top:"10vh",display:"flex",width:"100%"}})));function Ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Qa(e,t,n[t])}))}return e}function Qa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ja=[Ha.INSERT_BELOW,Ha.INSERT_ABOVE,Ha.HIDE],er=e=>{let{className:t,entity:n,metadata:a,config:o,selectedColumns:i,setSelectedColumns:c,selectedRows:s,setSelectedRows:u,entitiesMap:m={},rowsData:f,showNonOv:h=!1}=e;const g=Ya(),[b,y]=(0,r.useState)(s),[v,E]=(0,r.useState)(i),[x,w]=(0,r.useState)(null),[O,C]=(0,r.useState)(),[S,R]=(0,r.useState)();(0,r.useEffect)((()=>{y(s)}),[s]),(0,r.useEffect)((()=>{E(i)}),[i]);const k=(0,r.useMemo)((()=>v.slice(-4)),[v]),M=(0,r.useMemo)((()=>Aa(b)),[b]),P=(0,r.useMemo)((()=>((e,t,n)=>n.map((n=>{const a=ja.find((e=>{let{id:t}=e;return t===n}));if(a)return a;if(!(0,d.vZp)(n))return null;const r=(0,d.h2W)(n,t.type),l=(0,d.zeJ)(e,r,t.type),o=(0,d.xy8)(r);return l?{id:`${o}.${Ta(r)}`,label:l.label,attributeType:l,cellRenderer:Gn,headCellRenderer:(0,d.YkM)(l)?Qn:Yn}:null})).filter(p.identity))(a,n,M)),[a,n,M]),j=(0,r.useContext)(Ba),T=(0,r.useMemo)((()=>function(e,t,n,a,r,l,o){let i=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return[{object:n,isMainEntity:!0}].concat(a).map((a=>t.reduce(((t,c)=>(t[c.id]=Na(e,a,r,n,c,l,o,i),ka({},t,{isDraggable:!a.isMainEntity,id:a.object.uri}))),{})))}(a,P,n,k,m,o,j,h)),[a,P,k,n,m,o,j,h]),[I,N]=(0,r.useState)({}),B=(0,r.useCallback)((e=>{N((t=>Ka({},t,{[e]:!t[e]})))}),[]),D=(0,r.useMemo)((()=>({expandedMap:I,onExpandType:B})),[B,I]),A=(0,r.useMemo)((()=>({setHoveredId:C,setAnchor:R,hoveredId:O})),[O]),z=(0,r.useCallback)((()=>{C(null),R(null)}),[]),Z=(0,r.useMemo)((()=>P.map((0,p.prop)("id"))),[P]),_=(0,r.useCallback)((()=>{w(null)}),[]),F=(0,r.useMemo)((()=>({hoveredEntity:x,resetHoveredEntity:_})),[x,_]),{isThereAnyTask:H,setWorkflowTaskAvailability:L}=(e=>{const[t,n]=(0,r.useState)({}),a=(0,r.useCallback)(((e,t)=>{n((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){$a(e,t,n[t])}))}return e}({},n,{[e]:t})))}),[]);return{isThereAnyTask:(0,p.pipe)((0,p.map)(d.ev7),(0,p.any)((e=>t[e])))(e),setWorkflowTaskAvailability:a}})(k),V=H?void 0:g.collapsedRow,W=(0,r.useMemo)((()=>P.map((e=>V&&"workflowCard"===e.id?Ka({},e,{rowClassName:V}):e))),[P,V]);return l().createElement("div",{"data-reltio-id":"reltio-comparison-table-container",className:lt()(g.container,t)},l().createElement("div",{className:g.comparisonTableWrapper},l().createElement(ta.Provider,{value:F},l().createElement(zn.Provider,{value:D},l().createElement($n.Provider,{value:A},l().createElement(ma.Provider,{value:L},l().createElement(Nn.Z,{className:g.comparisonTable,rowsData:W,columnsData:T,theadRowsNumber:1,onMoveRow:(e,t)=>{const n=(0,p.pipe)((0,p.groupBy)((e=>(0,d.vZp)(e)?(0,d.hWO)(e):e)),p.toPairs)(b),a=n.findIndex((t=>{let[n]=t;return n===e})),r=n.findIndex((e=>{let[n]=e;return n===t})),l=n[a];l&&y((0,p.pipe)((0,p.remove)(a,1),(0,p.insert)(r,l),(0,p.chain)((0,p.nth)(1)))(n))},onDropRow:()=>{u(b)},onMoveColumn:(e,t)=>{const n=v.findIndex((t=>{let{object:n}=t;return n.uri===e})),a=v.findIndex((e=>{let{object:n}=e;return n.uri===t})),r=v[n];r&&E((0,p.pipe)((0,p.remove)(n,1),(0,p.insert)(a,r))(v))},onDropColumn:()=>{c(v)},setHoveredColumn:e=>{w((null==e?void 0:e.entityId)||null)},resetHoveredColumn:_}))))),!k.length&&l().createElement("div",{className:g.emptyState},l().createElement(Bn.ZP,{LogoRenderer:Bn.B9.SELECT_ATTRIBUTES,variant:Bn.tC.embedded,text:le().text("Select profiles"),secondaryText:le().text("Select one or more profiles to compare it with the current profile")})),l().createElement(qa,{id:O,anchorEl:S,onClose:z,actions:Ja,selectedAttributes:Z,setSelectedAttributes:u,groupColumnsData:f})))},tr=(0,et.makeStyles)({container:{display:"flex",flexDirection:"column"},table:{flex:1}}),nr=e=>{let{classes:t={},selectedRows:n,setSelectedRows:a,selectedColumns:r,setSelectedColumns:o,config:i,metadata:c,entity:s,entitiesMap:u={},rowsData:p,showNonOv:d}=e;const m=tr();return l().createElement("div",{className:lt()(t.root,m.container)},l().createElement(er,{className:m.table,entity:s,metadata:c,config:i,selectedRows:n,setSelectedRows:a,selectedColumns:r,setSelectedColumns:o,rowsData:p,entitiesMap:u,showNonOv:d}))};var ar=n(48030),rr=n(85103),lr=n(87907),or=n(49290),ir=n(45108),cr=n(92332),sr=n(25843),ur=n(47591);function pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){dr(e,t,n[t])}))}return e}function dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mr={position:"relative",whiteSpace:"pre",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"},color:"rgba(0,0,0,0.87)"},fr={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},hr=(e,t)=>({"& > *":{position:"relative"},"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:e,pointerEvents:"none","div.hoveredRow &":{background:t||"none"}},"& $defaultWrapper::after":{background:`linear-gradient(to right, ${(0,ur.Fq)(e,0)}, ${e} 100%)`,"div.hoveredRow &":{background:t&&`linear-gradient(to right, ${(0,ur.Fq)(t,0)}, ${t} 100%)`}}}),gr=(0,et.makeStyles)((e=>{const t=(0,ur.$n)(e.palette.primary.main,.88),n=(0,ur.$n)(e.palette.primary.main,.82),a=(0,ur.$n)("rgb(140,193,82)",.88),r=(0,ur.$n)("rgb(0, 114, 206)",.88),l={color:e.palette.primary.main,cursor:"pointer",textDecoration:"none"};return{link:l,hidden:{visibility:"hidden"},rowCloseIcon:{color:"rgba(0, 0, 0, 0.54)",margin:"0 24px 0 8px"},headCell:{display:"flex",alignItems:"center",height:"56px",fontSize:"12px",position:"relative",flex:1,overflow:"hidden",color:"rgba(0,0,0,0.87)",backgroundColor:"rgba(0, 0, 0, 0.06)","&::after":pr({},fr,{width:"30px",backgroundImage:"none"})},firstHeadCell:{paddingLeft:"42px"},headCellWithEntity:{height:"100%",display:"flex",flexDirection:"column"},rowCell:{fontSize:"12px",overflow:"hidden"},rowCellFirstColumn:{height:"100%"},firstEntityCell:{maxHeight:"200px"},entityRowCell:{fontSize:"12px",position:"relative"},entityRowCellSelected:hr(r),rowCellHighlighted:hr(a),rowCellSelected:hr(t,n),defaultWrapper:pr({},mr,{"&::after":pr({},fr,{"div.hoveredRow &":{background:"linear-gradient(to right, rgba(238, 238, 238, 0), rgba(238, 238, 238, 1) 100%)"}})}),hoveredDefaultWrapper:pr({},mr),entityWrapper:{paddingLeft:"12px"},profileWrapper:{height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",position:"relative"},entityLabel:pr({},l,{fontWeight:500}),commentsContainer:{position:"absolute",right:0,top:0,zIndex:1,height:"100%",display:"flex",alignItems:"center",paddingRight:"15px",backgroundColor:"#fff","&$checked":{backgroundColor:t}},checked:{},matchRulesWrapper:{padding:"15px 15px 8px 10px",display:"flex",flexDirection:"column",boxSizing:"border-box"},blobWrapper:pr({},mr,{whiteSpace:"pre-wrap",height:"100px",boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}),imageWrapper:pr({},mr,{display:"flex","& > img":{height:"64px",width:"64px"}}),referenceWrapper:{display:"flex",alignItems:"center",boxSizing:"border-box",height:"48px",paddingTop:0,"&:last-child":{paddingBottom:0}},entityAvatar:{transform:"scale(0.5)",marginLeft:"-10px"},collapseButton:{position:"absolute",left:"40px",zIndex:2},dragIndicator:{position:"absolute",left:"-5px",zIndex:2,cursor:"grab"},dragIndicatorIcon:{opacity:.38},ovFalse:e.inactive,expandButton:{marginRight:"5px",marginBottom:"8px"}}})),br=(0,sr.Z)((e=>{const t=gr();return l().createElement("div",{className:t.headCell},l().createElement(cr.default,e))}));var yr=n(67586);const vr=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const{value:a,ov:r}=t,o=gr();return l().createElement("div",{className:lt()(o.defaultWrapper,{[o.ovFalse]:!1===r})},l().createElement(yr.Z,{value:a,dataTypeDefinition:n}))};var Er=n(60824),xr=n(91431),wr=n(30488),Or=n(89323);const Cr=(0,wr.Z)(((e,t)=>{let{onToggleSelect:n,entityToMatch:a}=e,{rowValue:r,value:l}=t;const{rawValue:o}=r;return{onRemove:()=>n(o),isRowRemovable:l!==a,entityToMatch:a}}))((e=>{let{value:t,rowIndex:n,rowValue:a,onRemove:o,entityToMatch:i,isRowSelected:c,hoverRowIndex:s,dragRef:u}=e;const p=gr(),m=(0,r.useContext)(Er.B),f=t!==i,h=n===s,g=0===n,b=h?p.hoveredDefaultWrapper:p.defaultWrapper,y=t.uri!==i.uri&&!h;return l().createElement(l().Fragment,null,l().createElement("div",{className:lt()(b,p.profileWrapper,p.entityWrapper,{[p.firstEntityCell]:g&&!f})},l().createElement("div",{ref:u,style:{opacity:h?1:0},className:p.dragIndicator},l().createElement(Or.Z,{className:p.dragIndicatorIcon})),l().createElement(xr.Z,{className:p.collapseButton,rowIndex:n,rowValue:a}),l().createElement(qn.Z,{icon:ea.default,size:"XS",className:lt()(p.rowCloseIcon,{[p.hidden]:!f}),onClick:o,"data-reltio-id":`reltio-matches-table-${m?m+"-":""}checkbox-${n}`}),l().createElement(ht.Z,{value:(0,d.wwR)(t),className:p.entityLabel},(0,d.idV)(t.label)),y&&l().createElement(gt.Z,{className:lt()(p.commentsContainer,{[p.checked]:c}),uri:(0,d.E_P)(i.uri,t.uri),objectType:d.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,d.wp9)(d.q7e.POTENTIAL_MATCH,{entityUri:i.uri,matchEntityUri:t.uri}),allowOnlyOneComment:!0})))})),Sr=(0,wr.Z)()((0,sr.Z)((e=>{const t=0===e.headIndex,n=gr();return l().createElement("div",{className:lt()(n.headCell,{[n.firstHeadCell]:t})},l().createElement(cr.default,e))}))),Rr=e=>{let{value:t}=e;const n=gr();if(!t)return null;const{metadata:a,match:r,entitiesMap:o,entity:i,variant:c}=t;return l().createElement("div",{className:n.matchRulesWrapper},l().createElement(bt.Z,{variant:c,metadata:a,entitiesMap:o,match:r,entity:i}))},kr=e=>{let{value:t}=e;const{value:n,ov:a}=t,r=gr();return l().createElement("div",{className:lt()(r.blobWrapper,{[r.ovFalse]:!1===a}),onScroll:N.UW},n)},Mr=e=>{let{value:t}=e;const{value:n}=t,a=gr(),r=(0,d.efz)({value:n});return r&&l().createElement("div",{className:a.imageWrapper},l().createElement("img",{src:r}))};var Pr=n(96379);const jr=e=>{let{value:t}=e;const n=gr(),a=(0,u.useSelector)(m.ZP.selectors.getMetadata);return t&&l().createElement("div",{className:lt()(n.defaultWrapper,n.referenceWrapper,{[n.ovFalse]:!1===t.ov})},l().createElement(Pr.Z,{className:n.entityAvatar,entityType:(0,d.nt9)(a,(0,d.CZ8)(t).type)}),l().createElement(ht.Z,{value:(0,d.CZ8)(t).objectURI,className:n.link},(0,d.idV)(t.label)))};var Tr=n(3073);const Ir=l().createContext(null);Ir.displayName="EntityRowCollapseContext";var Nr=n(78223),Br=n(19926);const Dr=(0,et.makeStyles)({chipContainer:{position:"absolute",height:"16px",top:"6px",right:"6px",zIndex:2},chipLabel:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px"}}),Ar=(0,Nr.Z)(Br.Z),zr=e=>{let{needShowChip:t,crosswalks:n,dataTenant:a}=e;const o=Dr(),i=(0,r.useContext)(Tr.x),c=(0,r.useContext)(Ir)||i,s=(0,u.useSelector)(m.ZP.selectors.getMetadata)||{},f=(0,u.useSelector)(m.ZP.selectors.getDataTenants)||[];if(!t)return null;const h=l().createElement(l().Fragment,null,n.slice(c.maxRowValuesCount).map(((e,t)=>l().createElement("div",{key:t},"-",(0,d.tH7)(s,e.type)))),a?l().createElement("div",null,"-",(0,p.pipe)((0,p.find)((0,p.propEq)("id",a)),(0,p.prop)("label"))(f)):null);return l().createElement(Ar,{tooltipTitle:h,label:"+ "+(n.length+(a?1:0)-c.maxRowValuesCount),variant:"outlined",classes:{root:o.chipContainer,label:o.chipLabel}})},Zr=e=>{let{value:{crosswalks:t,dataTenant:n}}=e;const a=gr(),[o,i]=(0,r.useState)(!0),c=(0,r.useContext)(Tr.x),s=(0,r.useContext)(Ir)||c,u=(0,r.useCallback)((()=>{i((e=>!e))}),[]),d=(0,r.useMemo)((()=>(0,p.when)((0,p.always)(o),(0,p.slice)(0,s.maxRowValuesCount))(t)),[o,s.maxRowValuesCount,t]),m=!o||d.length<s.maxRowValuesCount,f=(0,r.useMemo)((()=>({crosswalks:d,dataTenant:m?n:void 0})),[n,d,m]),h=t.length+(n?1:0)>s.maxRowValuesCount,g=o&&h;return l().createElement(l().Fragment,null,l().createElement(Ca,{value:f},h&&l().createElement(Kn.Z,{className:a.expandButton,expanded:!o,onClick:u})),l().createElement(zr,{needShowChip:g,crosswalks:t,dataTenant:n}))},_r=e=>{let{value:t}=e;const n=gr();return l().createElement("div",{className:n.defaultWrapper},l().createElement(Ra,{value:t.matchRuleSummaries}))};function Fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hr=(0,p.split)("."),Lr=(e,t,n,a,r)=>n.map((n=>{const l=n.object,o=n.matchRules||[],i=n.matchScore||0,c=(0,d.w80)(e,l.type,o),s={entity:l,metadata:e,match:n,entitiesMap:r,matchScore:i},u=t.filter((e=>{let{modes:t}=e;return!t||t.includes(x.TABLE)}));return(0,p.pipe)((0,p.reduce)(((e,t)=>(0,p.assoc)(t.id,((e,t,n)=>{let{entity:a,metadata:r,match:l,entitiesMap:o,matchScore:i}=t;switch(e.id){case"profile":return a;case"entityId":return{value:(0,d.BTI)(a)};case"matchRules":return{metadata:r,match:l,entitiesMap:o,entity:a,variant:"all"};case"score":return{value:i};case"sources":{const e=(0,p.propOr)([],"crosswalks",a);return(0,d.biM)(a)?{crosswalks:e,dataTenant:a.dataTenant}:{crosswalks:e}}case"relevanceScore":return{matchRuleSummaries:l.matchRuleSummaries};default:{const[t,...r]=Hr(e.id);return(0,p.pipe)((0,p.prop)(t),(0,p.ifElse)((0,p.always)(n),(0,d.pfb)(r),(0,d.BgZ)(r)))(a)}}})(t,s,a),e)),{}),(0,p.assoc)("matchAttributes",c),(0,p.assoc)("rawValue",n))(u)})),Vr=e=>{if((0,d.vZp)(e)){const[,...t]=Hr(e);return t.length>1?t.slice(0,-1):null}return null},Wr=e=>{switch(e.id){case"profile":return Cr;case"matchRules":return Rr;case"sources":return Zr;case"relevanceScore":return _r;default:return(e=>{switch(e){case d.oS0.TYPE_BLOB:return kr;case d.oS0.TYPE_IMAGE:return Mr;case d.oS0.TYPE_REFERENCE:return jr;default:return vr}})(e.dataTypeDefinition.type)}},Ur=(0,Nr.Z)(Br.Z),Gr=e=>{let{columnData:t,rowValue:n,cellIndex:a,rowIndex:o}=e;const i=Dr(),c=(0,r.useContext)(Tr.x),s=(0,r.useContext)(Ir)||c,u=null==s?void 0:s.maxRowValuesCount,p=t.id.startsWith("attributes."),m=t.id,f=(p?n[m]:[]).reduce(((e,t,n)=>(n>=u?e.push(t):Array.isArray(t)&&t.length>u&&e.push(t.slice(u)),e)),[]).flat();if(!(p&&0===a&&f.length>0&&(null==s?void 0:s.getIsRowCollapsed(o))))return null;const h=f.map(((e,n)=>l().createElement("div",{key:n},(0,d.YkM)(t.dataTypeDefinition)?(0,d.idV)(e.label):(0,d.VGB)(e).map(((e,n)=>l().createElement(yr.Z,{key:n,value:(0,d.kDl)(e),dataTypeDefinition:t.dataTypeDefinition,rich:!1}))))));return l().createElement(Ur,{tooltipTitle:h,label:`+ ${f.length}`,variant:"outlined",classes:{root:i.chipContainer,label:i.chipLabel}})};function qr(){return qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},qr.apply(this,arguments)}const $r=(0,wr.Z)(((e,t)=>{let{selected:n}=e,{columnData:a,rowValue:r,cell:l}=t;return{isRowSelected:!!n&&n.includes(r.rawValue),isCellHighlighted:pe(r.matchAttributes,a)&&!l.values.every(d.O27)}}))((e=>{let{rowValue:t,cell:n,CellValueRenderer:a,isRowSelected:r,isCellHighlighted:o,columnIndex:i,cellWrapperClassName:c,someRowIsDragging:s}=e,u=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["rowValue","cell","CellValueRenderer","isRowSelected","isCellHighlighted","columnIndex","cellWrapperClassName","someRowIsDragging"]);const p=gr(),d=0===i,m=!s||d,{cellIndex:f,columnData:h,rowIndex:g}=u;return l().createElement("div",{className:lt()({[p.rowCellSelected]:r,[p.rowCellHighlighted]:o,[p.rowCellFirstColumn]:d},p.rowCell,c)},m&&l().createElement(l().Fragment,null,n.values.map(((e,n)=>l().createElement(a,qr({key:n,value:e,rowValue:t,isRowSelected:r},u)))),l().createElement(Gr,{cellIndex:f,rowIndex:g,rowValue:t,columnData:h})))}));var Xr=n(96253);const Yr=(0,et.makeStyles)((e=>({tableContainer:{flex:1,display:"flex",color:"rgba(0,0,0,0.54)",overflow:"hidden",background:e.palette.background.paper},rowActionButtonsWrapper:{height:"100%",display:"flex",alignItems:"center",marginRight:"1px"},rowActionButtons:{backgroundColor:"rgba(238, 238, 238, 1)","&$checked":{backgroundColor:(0,ur.$n)(e.palette.primary.main,.82)}},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",backgroundColor:"rgba(238, 238, 238, 1)",borderLeft:"1px solid rgba(0,0,0,0.12)","&$checked":{backgroundColor:(0,ur.$n)(e.palette.primary.main,.82)}},checked:{},actionButton:{marginLeft:"12px","&:last-child":{marginRight:"3px"}},hoveredRowRightContentContainer:{alignItems:"center !important"},dragColumnHead:{"& #headCell":{border:"1px solid",borderColor:e.palette.primary.main},"& #entityCell":{borderLeft:"1px solid",borderRight:"1px solid",borderLeftColor:e.palette.primary.main,borderRightColor:e.palette.primary.main}},dragColumnBody:{borderLeft:"1px solid",borderRight:"1px solid",borderLeftColor:e.palette.primary.main,borderRightColor:e.palette.primary.main},sourcesCell:{display:"flex",flexWrap:"wrap",padding:"15px",columnGap:"5px",rowGap:"8px",alignItems:"center"}})));function Kr(){return Kr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Kr.apply(this,arguments)}const Qr=e=>{let{hoverRowIndex:t,hoveredRowRightContent:n,basicTableRef:a,changeRowCellHeight:r}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["hoverRowIndex","hoveredRowRightContent","basicTableRef","changeRowCellHeight"]);const i=Yr();switch(o.columnData.id){case"profile":return l().createElement($r,Kr({},o,{hoverRowIndex:t,actionsContent:n,tableRef:a}));case"matchRules":return l().createElement(Xr.Z,Kr({onChangeHeight:r},o),l().createElement($r,o));case"sources":return l().createElement(Xr.Z,Kr({onChangeHeight:r},o),l().createElement($r,Kr({cellWrapperClassName:i.sourcesCell},o)));default:return l().createElement($r,o)}};function Jr(){return Jr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Jr.apply(this,arguments)}const el=e=>e.profile.uri,tl=e=>{let{columnData:{id:t},cellIndex:n,rowValue:a}=e;return`${t}[${el(a)}][${n}]`},nl=e=>{let{entity:t,matches:n,metadata:a,columnsData:o,onReorderingColumn:i,config:c,filters:s,onFilter:u,sorting:m,onSort:f,selected:h,onToggleSelect:g,onResetSelect:b,onSelectAll:y,entitiesMap:v,basicTableRef:E,isComparisonViewShown:w,showNonOv:O}=e;const C=Yr(),[S,R]=(0,r.useState)(n);(0,r.useEffect)((()=>{R(n)}),[n]);const k=(0,r.useCallback)(((e,t)=>{R((0,p.move)(e,t)),W(t)}),[]),M=(0,r.useMemo)((()=>Lr(a,o,S,O,v)),[a,o,S,O,v]),P=!!f,j=(0,r.useMemo)((()=>((e,t)=>(0,p.pipe)((0,p.filter)((e=>{let{modes:t}=e;return!t||t.includes(x.TABLE)})),(0,p.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Fr(e,t,n[t])}))}return e}({sortable:e},t,{resizable:!0,nestedPath:Vr(t.id),headCellRenderer:"profile"===t.id?Sr:br,rowCellValueRenderer:Wr(t),draggable:(0,p.propOr)(!0,"draggable")(t)}))))(t))(P,o)),[o,P]),T=(0,r.useMemo)((()=>t?Lr(a,o,[{object:t}],O):[]),[t,a,o,O]),I=(0,r.useCallback)((e=>{let{what:t,where:n}=e;const a=j[t.columnIndex].id,r=j[n.columnIndex].id;i(a,r)}),[j]),N=(0,r.useMemo)((()=>({isAllSelected:h.length>0&&h.length===n.length,entityToMatch:t,selected:h,onToggleSelect:g,onResetSelect:b,onSelectAll:y,isComparisonViewShown:w})),[t,h,g,b,y,n,w]),{getDynamicRowCellHeight:B,changeRowCellHeight:D,clearHeightsCache:A}=(0,ar.Z)(tl),[z,Z]=(0,r.useState)(!1),_=(0,r.useCallback)((()=>Z(!0)),[]),F=(0,r.useCallback)((()=>Z(!1)),[]),[H,L]=(0,r.useState)(!1),[V,W]=(0,r.useState)(null),U=(0,r.useCallback)((e=>{W((t=>z||H?t:e))}),[z,H]),{showDialog:G,openAddRelationDialog:q,AddRelationDialogRenderer:$}=rn(c),X=(0,r.useMemo)((()=>{if(null===V)return null;const e=S[V];if(!e)return null;const n=(0,d.hXd)(a,c,e.object,t,e.matchRules),r=h.includes(e);return l().createElement("div",{className:lt()(C.rowActionButtonsWrapper)},l().createElement("div",{className:lt()(C.rowActionButtons,{[C.checked]:r})},l().createElement(na,{value:{mainEntity:t,entity:e.object,matchRules:e.matchRules,permission:n},openAddRelationDialog:q,onActionsMenuClose:F,onActionsMenuOpen:_,classes:{actionButton:C.actionButton,moreOptions:C.actionButton}})),t&&l().createElement(gt.Z,{className:lt()(C.commentsContainer,{[C.checked]:r}),uri:(0,d.E_P)(t.uri,e.object.uri),objectType:d.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,d.wp9)(d.q7e.POTENTIAL_MATCH,{entityUri:t.uri,matchEntityUri:e.object.uri}),onChangePopupVisibility:L,allowOnlyOneComment:!0,showAlways:!0}))}),[V,S,h,C,t,c,a,_,F,q]),Y=(0,r.useCallback)((e=>l().createElement(Qr,Jr({hoverRowIndex:V,hoveredRowRightContent:X,basicTableRef:E,changeRowCellHeight:D},e))),[V,X,E,D]),K=(0,r.useCallback)((0,p.either)(B,rr.Z),[B,rr.Z]),Q=(0,r.useMemo)((()=>({hoveredRowRightContentContainer:C.hoveredRowRightContentContainer,dragColumnHead:C.dragColumnHead,dragColumnBody:C.dragColumnBody})),[C]),{getDynamicRowCellHeight:J,changeRowCellHeight:ee,clearHeightsCache:te}=(0,ar.Z)(tl),ne=(0,r.useCallback)((e=>l().createElement(Qr,Jr({changeRowCellHeight:ee},e))),[ee]),ae=(0,r.useCallback)((0,p.either)(J,rr.Z),[J,rr.Z]),{getRowHeight:re,getHeightForSubRow:le,tableRowsData:oe,collapseContextValue:ie}=(0,lr.Z)({rowsData:T,columnsData:j,maxRowValuesCount:3,getRowCellHeight:ae,renderRowCell:ne,getIdFromRowValue:el}),ce=re(null==t?void 0:t.uri),se=(0,r.useMemo)((()=>{const e=((e,t,n,a,r,o)=>i=>c=>{const s=gr();return l().createElement(Er.B.Provider,{value:"tableHeader"},l().createElement("div",{className:s.headCellWithEntity},l().createElement("div",{id:"headCell"},l().createElement(i,c)),l().createElement(e,{className:lt()(s.entityRowCell,s.entityRowCellSelected),columnId:c.headCellData.id,rowIndex:0,getHeightForSubRow:n,tableRowsData:a,getRowHeight:r,columnsData:o,collapseContextValue:t,id:"entityCell"})))})(or.r,ie,le,oe,re,j);return j.map((0,p.evolve)({headCellRenderer:e}))}),[ie,le,oe,re,j]);return(0,r.useLayoutEffect)((()=>{A(),te()}),[te,A,null==t?void 0:t.uri]),l().createElement("div",{"data-reltio-id":"reltio-matches-table-container",className:C.tableContainer},l().createElement(ir.Z,{fixFirstColumn:!0,columnsData:se,rowsData:M,context:N,sorting:m,onSort:f,filters:s,onFilter:u,defaultColumnWidth:250,defaultColumnMinWidth:100,headRowHeight:56+ce,renderRowCell:Y,getRowCellHeight:K,hoverStateEnabled:!0,hoveredRowRightContent:X,hoverRowIndex:V,onRowHover:U,classes:Q,getIdFromRowValue:el,maxRowValuesCount:3,dndRowReorderingEnabled:!0,dndColumnReorderingEnabled:!0,dndColumnReorderingHandler:I,dndRowReorderingHandler:k,ref:E,hoveredContentPosition:0}),G&&l().createElement($,null))},al=(0,et.makeStyles)({comparisonView:{width:"100%",overflow:"auto"}});function rl(){return rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},rl.apply(this,arguments)}const ll=e=>{let{config:t,isLoaded:n,savedState:a,onUpdateSavedState:o}=e;const i=(0,u.useSelector)(m.ZP.selectors.getMetadata),c=(0,u.useSelector)(m.ZP.selectors.getEntity),s=(0,u.useDispatch)(),{selectedItems:f,entitiesMap:h,comparisonViewMode:g}=ne(),{toggleSelect:b,setSelectedItems:y,setComparisonViewMode:v,actualizeSelectedItemsColors:E}=ae(),{isGlobalSpinnerActive:w}=Be(),{uri:O}=c||{};((e,t)=>{const{setSelectedItems:n,setGlobalSpinner:a}=ae(),l=(0,r.useCallback)((()=>{a(!0)}),[a]),o=(0,r.useCallback)((()=>{a(!1)}),[a]),i=(0,p.prop)("uri",t),c=(0,p.prop)("dataTenant",t),s=(0,r.useMemo)((()=>({enabled:!!i,entity:t,filter:"",page:0,sorting:{field:"score",order:d.KM9.desc},rowsPerPage:3,options:ln,onStartLoading:l,onFinishLoading:o})),[c,i]),{matches:u}=(0,Vt.s)(s);(0,r.useEffect)((()=>{n(u)}),[u,n])})(0,c),(0,r.useEffect)((()=>{E()}),[f]);const{addReloadHandler:S,removeReloadHandler:R}=k();(0,r.useEffect)((()=>{const e=()=>{s(m.N5.entity.actions.loadEntity({uri:(0,d.wwR)(c)}))};return S(e),()=>R(e)}),[c,s,S,R]);const M=(0,r.useMemo)((()=>(0,d.NVY)(O,Object.keys(h))),[O,h]),P=(0,Ft.C)({objectIds:M}),j=al(),[T,I,N]=(e=>{let{defaultColumnsData:t,additionalColumnsData:n,metadata:a,entityTypeUri:l}=e;return(0,r.useMemo)((()=>{const e=ue(a,l),r=t.concat(n||[]).concat(e),o=(0,d.qhs)(a,l),i=((e,t)=>{const[n,a]=(0,p.pipe)((0,p.reject)(de),(0,p.partition)(pe(e)))(t);return n.length?[{id:"match",label:le().text("Match attributes"),columns:t.filter(ge(n))},{id:"all",label:le().text("All attributes"),columns:t.filter(ge(a))}]:t})(o,r);return[r,i,(0,p.pipe)(be,(0,p.concat)(t),we)(o,e)]}),[t,n,a,l])})({defaultColumnsData:ya,metadata:i,entityTypeUri:c.type}),[B,D]=(0,r.useState)(N),[A,z]=(0,r.useState)(!1),Z=(0,r.useMemo)((()=>B.map((e=>T.find((0,p.propEq)("id",e)))).filter(p.identity)),[B,T]),_=(0,r.useCallback)(((e,t)=>{const n=B.indexOf(e),a=B.indexOf(t);D((0,p.move)(n,a))}),[B]),F={entity:c,metadata:i,selectedColumns:f||[],setSelectedColumns:y,config:t,selectedRows:B,setSelectedRows:D,entitiesMap:h,rowsData:I,showNonOv:A},H={entity:c,metadata:i,entitiesMap:h,config:t,matches:f,columnsData:Z,onReorderingColumn:_,onSelectAll:()=>{},onToggleSelect:b,onResetSelect:()=>{},selected:[],isComparisonViewShown:!1,showNonOv:A};return(0,r.useEffect)((()=>{n&&(null!=a&&a.visibleColumns&&D(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,p.pipe)((0,p.filter)((0,p.propEq)("hideable",!1)),(0,p.map)((0,p.prop)("id"))),n=(0,p.pipe)(p.concat,p.uniq),a=t(ya);return n(a,e)}(a.visibleColumns)),null!=a&&a.comparisonViewMode&&v(a.comparisonViewMode),(0,p.has)("showNonOv",a)&&z(a.showNonOv))}),[n,a]),(0,r.useEffect)((()=>{n&&o({comparisonViewMode:g,visibleColumns:B,showNonOv:A})}),[B,g,A]),l().createElement(l().Fragment,null,l().createElement(In,{config:t,columnsData:I,selectedColumns:B,onChangeColumns:D,showNonOv:A,onChangeShowNonOv:z}),l().createElement(Ht.e,{collaboration:P},g===x.COLUMNS?l().createElement(yn.l,null,l().createElement(Ba.Provider,{value:b},n&&l().createElement(nr,rl({},F,{classes:{root:j.comparisonView}})))):n&&l().createElement(nl,H)),w&&l().createElement(C.Z,null))};var ol=n(22118);function il(){return il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},il.apply(this,arguments)}const cl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",il({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.25 3H3.75c-.825 0-1.5.675-1.5 1.5v9c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-9c0-.825-.675-1.5-1.5-1.5zm-9 10.5h-1.5v-6h1.5v6zM3.75 6h1.5V4.5h-1.5V6zm6 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6zm7.5 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6z",fill:"#000",fillOpacity:".541"}))},sl=(0,et.makeStyles)({flexBox:{display:"flex",alignItems:"center"},icon:{display:"flex",alignItems:"center",margin:"0 4px"}}),ul=()=>{const{selectedItems:e,comparisonViewMode:t,limitSelection:n}=ne(),{setComparisonViewMode:a,deleteExtraMatches:o}=ae(),i=sl(),c=(0,r.useCallback)((()=>{a(x.TABLE)}),[a]),s=t===x.COLUMNS&&e.length>n,u=le().text("Switch to table view"),p=l().createElement("div",{className:i.flexBox},le().text("Please switch to"),l().createElement("div",{className:i.icon},l().createElement(cl,null)),le().text("Table View to compare more than ${max} profiles",{max:4}));return l().createElement(ol.Z,{open:s,title:u,content:p,onSave:c,onDiscard:o,saveCaption:le().text("Proceed"),discardCaption:le().text("Cancel")})},pl=(0,et.makeStyles)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},potentialMatchesWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},potentialMatchesContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var dl=n(83104);function ml(){return ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ml.apply(this,arguments)}const fl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",ml({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{d:"M20 4v14h2V4c0-1.1-.9-2-2-2H6v2h14zM2 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12z",fill:"currentColor"}))};function hl(){return hl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},hl.apply(this,arguments)}const gl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",hl({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{d:"M10 12a4 4 0 100-8 4 4 0 000 8zM10.35 14.01C7.62 13.91 2 15.27 2 18v2h9.54c-2.47-2.76-1.23-5.89-1.19-5.99zM19.43 18.02c.36-.59.57-1.28.57-2.02 0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4c.74 0 1.43-.22 2.02-.57L20.59 22 22 20.59l-2.57-2.57zM16 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor"}))};function bl(){return bl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bl.apply(this,arguments)}const yl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["styles"]);return l().createElement("svg",bl({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 20h15.002L21 23l1.27-1.27-20-20.01L1 2.99l6.172 6.175a4.007 4.007 0 002.66 2.662l2.23 2.23A10.754 10.754 0 0011 14c-2.67 0-8 1.34-8 4v2zm8-16a3.987 3.987 0 00-2.795 1.137l5.656 5.659A3.999 3.999 0 0011 4z",fill:"#000",fillOpacity:".54"}))};var vl=n(37346),El=n(31780),xl=n(14787);const wl=(0,et.makeStyles)({input:{margin:0,borderRadius:"4px",width:"100%",paddingTop:0,paddingBottom:0}});function Ol(){return Ol=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ol.apply(this,arguments)}const Cl=e=>{let{rowData:t,rowContext:n}=e;const a=wl(),{values:o=[],attribute:{attrType:i,fieldName:c=null}={},filter:s,id:u}=t||{},{changeFilter:m}=n,{entityType:f}=n,h=(0,r.useCallback)((e=>{m({fieldName:c,filter:s,values:e},u)}),[m,u,c,s]),g=(0,r.useMemo)((()=>({InputProps:{classes:{root:a.input}}})),[a]),b={values:o[0]||[],onChange:(0,p.pipe)(d.FTe,h),TextFieldProps:g,fullWidth:!0};return(0,d.pzC)(i)?l().createElement(vl.Z,Ol({},b,{name:i.name,entityType:f})):(0,d.OFd)(i)?l().createElement(El.Z,b):l().createElement(xl.Z,{rowContext:n,rowData:t})};var Sl=n(30721),Rl=n(51548),kl=n(7342);function Ml(){return Ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ml.apply(this,arguments)}const Pl=(0,et.makeStyles)({divider:{marginBottom:"14px",marginRight:"16px",borderColor:"rgba(0, 0, 0, 0.121569)"},optionLabel:{fontSize:"13px",paddingLeft:"10px"}}),jl={FilterSelector:e=>{const{rowData:t}=e,{attribute:{attrType:n}={}}=t||{},a=(0,d.pzC)(n)?[d.j5E.EQUALS].map((e=>({value:e,label:(0,kl.Z)((0,d.XS2)(e))}))):null;return l().createElement(Rl.Z,Ml({},e,{options:a}))},ValuesEditor:Cl},Tl=e=>{let{filters:t,onChange:n,attributeTypes:a,options:o}=e;const i=Pl(),[c,s]=(0,r.useState)(o.showTransitiveMatches);return l().createElement(dl.Z,{dataReltioId:"potential-matches-filter-button",filters:t,onChange:e=>n(e,{showTransitiveMatches:c}),attributeTypes:a,components:jl,onTogglePopup:e=>{e&&s(o.showTransitiveMatches)},isFiltersApplied:!!(0,d.Uqd)()(t)||o.showTransitiveMatches},l().createElement(Sl.Z,{classes:{label:i.optionLabel},control:l().createElement(Ye.Z,{checked:c,onChange:e=>s(e.target.checked),color:"primary"}),label:le().text("Show transitive matches")}),l().createElement(mt.Z,{light:!0,className:i.divider}))};function Il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Nl(e,t,n[t])}))}return e}function Nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bl={ValuesEditor:Cl},Dl=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(ln),[o,i]=(0,r.useState)([]),[c,s]=(0,r.useState)([]),[p,f]=(0,r.useState)({field:Ee[0].id,order:d.KM9.desc}),[h,g]=(0,r.useState)({field:we(xe)[0],order:d.KM9.asc}),[b,y]=(0,r.useState)({field:we(xe)[0],order:d.KM9.asc}),[v,x]=(0,r.useState)(null),w=(0,u.useSelector)(m.ZP.selectors.getMetadata),O=(0,u.useSelector)(m.ZP.selectors.getEntity),C=(0,r.useCallback)((e=>{x((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{x(null)}),[]),R=(0,d.nt9)(w,null==O?void 0:O.type),k=(0,r.useMemo)((()=>(e=>((null==e?void 0:e.attributes)||[]).concat((null==e?void 0:e.analyticsAttributes)||[]).filter(d.Uty))(R)),[R]),M=(0,r.useMemo)((()=>[Il({},d.S91.matchRules,{check:d.Ir}),Il({},d.S91.MLRecommendedMatch,{check:d.XQO})].reduce(((e,t)=>{let{check:n}=t,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(t,["check"]);return n(R)&&e.push(a),e}),[])),[R]),P=(0,r.useMemo)((()=>[...M,d.C68.relevanceScore,d.C68.matchAction,...k]),[k,M]),j=(0,r.useMemo)((()=>[d.xPW.id,d.G39.sourceSystems,...k]),[k]),T=(e,n)=>{a(n),t(e)};return{active:v,tabs:(0,r.useMemo)((()=>[{buttonProps:{id:E.PotentialMatches,icon:fl,tooltipTitle:le().text("Potential Matches")},headerProps:{mainTitle:le().text("Potential Matches"),rightContent:l().createElement(Tl,{filters:e,onChange:T,attributeTypes:P,options:n})},filters:e,options:n,sorting:p,onSorting:f},{buttonProps:{id:E.FindMatches,icon:gl,tooltipTitle:le().text("Find Matches")},headerProps:{mainTitle:le().text("Find Matches"),rightContent:l().createElement(dl.Z,{filters:o,onChange:i,attributeTypes:j,components:Bl})},filters:o,sorting:h,onSorting:g},{buttonProps:{id:E.NotAMatch,icon:yl,tooltipTitle:le().text("Not a Match")},headerProps:{mainTitle:le().text("Not a Match"),rightContent:l().createElement(dl.Z,{filters:c,onChange:s,attributeTypes:k})},filters:c,sorting:b,onSorting:y}]),[e,n,o,c,P,j,p,h,b,k]),toggleActive:C,onClose:S}},Al=()=>{const{isGlobalSpinnerActive:e}=Be();return e?l().createElement(C.Z,null):null};function zl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Zl(e,t,n[t])}))}return e}function Zl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _l=e=>{let{config:t,getSavedState:n,saveState:a}=e;const o=pl(),i=(0,u.useSelector)(m.ZP.selectors.getEntity),{SnackbarRenderer:c,showSnackbarMessage:s}=(0,f.D)({autoHideDuration:3e4}),d=(0,r.useRef)(),{isLoaded:v,savedState:E,updateSavedState:x}=(0,h.w)({getSavedState:n,saveState:a,entityTypeUri:i.type}),{tabs:w}=Dl();(0,r.useEffect)((()=>{v&&(d.current=E||{})}),[v,E]);const O=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!d.current)return;const t=zl({},d.current,e);(0,p.equals)(t,d.current)||(x(t),d.current=t)}),[x]);return l().createElement(te,null,l().createElement(R,null,l().createElement(g.S.Provider,{value:s},l().createElement("div",{className:o.perspectiveView},l().createElement(Al,null),(null==i?void 0:i.uri)&&l().createElement(l().Fragment,null,l().createElement("div",{className:o.potentialMatchesContainer},l().createElement(b.n,{buttonsProps:(0,p.pluck)("buttonProps",w),perspectiveId:"potentialMatches"},l().createElement("div",{className:o.potentialMatchesWrapper},l().createElement(y.n,{entity:i}),l().createElement(ll,{config:t,isLoaded:v,savedState:E,onUpdateSavedState:O})),l().createElement(bn,{tabs:w,config:t}))),l().createElement(c,null),l().createElement(ul,null))))))};var Fl=n(63532);const Hl=(0,i.Z)({productionPrefix:"potentialMatchesView",disableGlobal:!0,seed:"pm"}),Ll=e=>{let{config:t,store:n,onResize:i=p.identity,saveState:m,getSavedState:f}=e;const h=(0,r.useCallback)((0,d.aYu)(f),[f]);return l().createElement(u.Provider,{store:n},l().createElement(Fl.m.Provider,{value:t.id},l().createElement(c.ZP,{generateClassName:Hl},l().createElement(s._,{dateAdapter:a.Q},l().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>i(Math.floor(e),Math.floor(t))}),t&&l().createElement(_l,{config:t,saveState:m,getSavedState:h}),l().createElement(je.Z,null)))))}}}]);
|
|
2
2
|
//# sourceMappingURL=3358.js.map
|