@reltio/remotes 1.4.1176 → 1.4.1177
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/1136.js +1 -0
- package/{8096.js → 1274.js} +1 -1
- package/1406.js +1 -0
- package/1920.js +1 -1
- package/1957.js +1 -1
- package/2114.js +1 -0
- package/3126.js +1 -0
- package/3981.js +1 -0
- package/4843.js +1 -1
- package/5198.js +1 -1
- package/5709.js +1 -1
- package/5797.js +1 -0
- package/5884.js +1 -1
- package/621.js +1 -0
- package/6710.js +1 -1
- package/7147.js +1 -0
- package/7526.js +1 -0
- package/9503.js +1 -0
- package/9983.js +1 -0
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1526.js +0 -1
- package/4327.js +0 -1
- package/4418.js +0 -1
- package/4754.js +0 -1
- package/6186.js +0 -1
- package/6190.js +0 -1
- package/6250.js +0 -1
- package/6349.js +0 -1
- package/696.js +0 -1
- package/8308.js +0 -1
package/5884.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5884],{97991:(e,t,r)=>{r.d(t,{Z:()=>u});var n,a=r(94079),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(n||(n={}));const u=e=>{let{className:t,icon:r,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(r?n.ICON_MODE:n.TEXT_MODE)}),[r,l]);const b=()=>{m(n.ERROR_MODE)};switch(d){case n.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:r,onError:b},p));case n.TEXT_MODE:case n.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},74402:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r(17440),l=r(56306);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},s=()=>{const[e,t]=(0,n.useState)({}),r=(0,n.useRef)({}),s=(0,n.useCallback)((0,l.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({},r.current))})),[]),c=(0,n.useCallback)((()=>{r.current={}}),[]);return{getDynamicRowCellHeight:(0,n.useCallback)((0,a.pipe)(i,(0,a.prop)(a.__,e)),[e]),changeRowCellHeight:(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(((e,t)=>{r.current[e]=t}),s),[i,a.identity])),[]),clearHeightsCache:c}}},97946:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(44443),s=r(94079),c=r(20562);const u=e=>{let{onChangeHeight:t,children:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const o=(0,n.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=l,b=t({rowIndex:p,cellIndex:m,columnData:d}),g=()=>o.current&&b(o.current.clientHeight);return(0,c.D)(g,[u.rawValue]),a().createElement("div",null,a().createElement(i.Z,{handleHeight:!0,onResize:g}),a().createElement(s.RootRef,{rootRef:o},r))};u.propTypes={onChangeHeight:o().func,children:o().node};const p=u},85209:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079);const s=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(i.Dialog,{open:t},a().createElement(i.DialogContent,null,a().createElement(i.DialogContentText,null,o().text("Are you sure you want to delete this?"))),a().createElement(i.DialogActions,null,a().createElement(i.Button,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Button,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},94111:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(80030);const o=(0,r(79692).Z)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.ZP,i({},e,{classes:t,arrow:!0}))}},96955:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(31396),u=r(60364);const p=(0,r(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var d=r(56306);const m=e=>"horizontal"===e,b=e=>{let{className:t,children:r,orientation:l,defaultSize:i,size:s,minSize:b,maxSize:g,allowResize:f,onChange:y}=e;const v=p(),h=(0,u.Z)(),[E,w]=(0,n.useState)(),[x,O]=(0,n.useState)(!0),k=(0,n.useCallback)((()=>O(!0)),[]),C=(0,n.useCallback)((()=>O(!1)),[]),T=()=>m(l)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,S=(0,n.useCallback)((0,d.DsO)((e=>{const t=T();y({percentageSize:e/t*100+"%",isMaxSize:g>0?e===g:e===t+g,isMinSize:e===b})}),250),[y,l,g,E]),I=(0,n.useMemo)((()=>({transition:h.transitions.create(m(l)?"height":"width",{easing:h.transitions.easing.sharp,duration:h.transitions.duration.leavingScreen})})),[l,h]);return"number"==typeof s&&s<0&&(s=(T()||0)+s),a().createElement("div",{ref:w,className:o()(v.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:f,onChange:S,defaultSize:i,minSize:b,maxSize:g,onDragStarted:C,onDragFinished:k,pane1Style:x?I:void 0},r))},g=s().oneOfType([s().number,s().string]);b.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:g,size:g,minSize:g,maxSize:g,allowResize:s().bool,onChange:s().func};const f=b},94175:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(59431),a=r(56306),l=r(24328),o=r.n(l),i=r(52730),s=r(97991);const c=e=>{let{sourceType:t,className:r,classes:l}=e;const c=(0,i.useSelector)(n.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,a.PWK)(c,t),d=(0,a.tH7)(c,u)[0];return o().createElement(s.Z,{className:r,avatarText:d,icon:p?(0,a.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null,variant:"square",rootClasses:l})}},4073:(e,t,r)=>{r.d(t,{Z:()=>ne});var n=r(24328),a=r.n(n),l=r(56306),o=r(48554),i=r(12437),s=r(22983),c=r(27604),u=r(43054),p=r(71153),d=r.n(p),m=r(87918),b=r.n(m),g=r(72768),f=r(55847),y=r(94079),v=r(17440),h=r(25310),E=r(40879),w=r(79692);const x=(0,w.Z)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],C=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c}=e;const u=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),p=(0,l.PFL)(t),m=(0,E.AG)(r,p),[b,g]=(0,n.useState)(m),f={className:u.textField,InputProps:{disableUnderline:!0,classes:{root:u.input,multiline:u.inputMultiline}}},w=()=>{const e=(0,E.Ho)(t,b);if(!(0,v.isNil)(b)&&!(0,v.equals)(b,m)){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===b&&(0,l.FVt)(p.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(y.Popover,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(u.paper,{[u.booleanEditor]:(0,l.T6Y)(p.type),[u.timestampEditor]:(0,l.j5n)(p.type)}),root:u.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(p.type)?"Escape"===e.key&&s():w()},onBackdropClick:w},a().createElement(h.Z,{autoFocus:!0,dataTypeDefinition:p,fieldName:(0,l.Tde)(t.uri),onChange:g,TextFieldProps:f,value:b,fullWidth:!0}))};var T=r(8818),S=r(57507),I=r(35315),j=r(83348),A=r(77585);const Z=(0,w.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),N=(0,j.Z)(y.MenuItem),P=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(y.Typography,{classes:{root:t.menuText}},n))},D=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=Z(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(A.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(N,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(P,{icon:p,text:i,styles:l}))}));D.displayName="CrosswalkMenuItem";const R=D;var V=r(26905),M=r(63149);function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L=(0,w.Z)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){z(e,t,r[t])}))}return e}({minHeight:"28px",wordBreak:"break-word"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",opacity:r?1:.38,transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",padding:"6px 0",lineHeight:"14px",width:"calc(100% - 71px)"},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),W=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:y,onIgnore:v,onEdit:h,onPin:E,onDelete:w}=e;const{isReadingMode:x,isEditingMode:O,isHovered:k,onMouseEnter:j,onMouseLeave:A,setReadingMode:Z,setEditingMode:N}=(0,V.p)(),P=(0,n.useRef)(),D=(0,l.nIW)(i.uri),z=(0,l.x_)(p),W=!o.system&&!z,U=W&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),B=W&&!y&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),H=!F&&(!x&&U||i.pin),Y=!F&&(!x&&U||i.ignored),_=(0,M.nX)(p),{isHighlighted:G,isDimmed:q,highlightCrosswalk:X,removeHighlight:$}=(0,M.pu)(p),Q=L({variant:z?"outlined":"filled",opaque:!q,fullyColored:G,color:_}),J=[{crosswalk:p,color:_},{disabled:!U,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:U?null:b().text("You don't have permissions to edit"),onClick:()=>N(),id:"edit"},{disabled:!B,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:B?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],K=()=>{$(),Z()};return a().createElement("div",{ref:P,className:d()(t,Q.root),onMouseEnter:()=>{X(),j()},onMouseLeave:()=>{$(),A()},"data-reltio-id":r},a().createElement("div",{className:Q.attributeValue},a().createElement(g.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:Q.actions},H&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!U}),Y&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!U}),k&&a().createElement(f.Z,{MenuItemRenderer:R,menuId:`simple-attribute-additional-actions-${D}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:K,menuItems:J})),O&&a().createElement(C,{attributeType:o,attributeValue:i,color:_,onClose:K,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P}))};var U=r(13896);const B=(0,w.Z)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function F(){return F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F.apply(this,arguments)}const H=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd"]);const u=B(),[{isDragItemOver:p},d]=(0,U.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let m=0;return a().createElement("div",{ref:d,className:u.simpleAttributesWrapper},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(W,F({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,dataReltioId:"value-index-"+m++},c))))})),p&&a().createElement("div",{className:u.dropIndicator},b().text("Drop here")))};var Y=r(58896);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}const G=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(y.Button,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(Y.Z,_({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var q=r(85592);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(q.Z,X({key:e.uri,attributeValue:e},n)))))};var Q=r(22246);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))},ee=(0,w.Z)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}function re(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const ne=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=re(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ee(),[m,b]=(0,n.useState)(c),g=(0,v.propOr)(r.length,"totalValues",s),f=c<g,y=f&&m<g,h=f&&m>=g,E=r.slice(0,m),w=g-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement(G,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=re(p,["crosswalksMap"]);return a().createElement($,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(K,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(H,te({attributeValues:e,attributeType:t},p))}})(E),y&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<g&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},8148:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(56306),o=r(26905),i=r(51229),s=r(63149),c=r(77585),u=r(94111),p=r(71153),d=r.n(p),m=r(32625);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,s.pu)(t),p=(0,m.y)({isOpaque:!l,color:n});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{className:d()(p.crosswalkIcon,r),onMouseEnter:()=>o(),onMouseLeave:()=>i()}))};var g=r(17440),f=r(19592),y=r(4073),v=r(95629),h=r(95974),E=r(79692);const w=(0,E.Z)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(y.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,g.path)(["paging",e.uri],r)},n))))))};var k=r(35315),C=r(57507),T=r(8818),S=r(22983),I=r(87918),j=r.n(I);const A=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var Z=r(20562),N=r(66095);const P=(0,E.Z)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),D=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}=e;const w=P(),{isReadingMode:x,onMouseEnter:T,onMouseLeave:S}=(0,o.p)(),I=!p&&(0,l.Z5t)(l.fO_.EDITING,t),j=!d&&(0,l.Edd)(l.fO_.EDITING,t),D=(0,l.ZiX)(r.uri),R=!D&&(!x&&I||r.pin),V=!D&&(!x&&I||r.ignored),M=!x&&j,z=(0,N.Q)(r.uri),[L,W]=(0,n.useState)(z||D);(0,Z.D)((()=>{z&&W(z)}),[z]);const U=(0,g.pipe)((0,g.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),g.values,g.flatten,(0,g.uniqBy)((0,g.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:w.root,onMouseEnter:T,onMouseLeave:S},a().createElement(f.Z,{onClick:()=>W((e=>!e)),expanded:L}),a().createElement("span",null,c,U.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:w.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:w.actions},R&&a().createElement(k.Z,{disabled:!I,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),V&&a().createElement(C.Z,{disabled:!I,isIgnored:r.ignored,onClick:()=>y({attributeValue:r})}),M&&a().createElement(A,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),L&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!I,disableDelete:!j,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}))}},22246:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(56306),o=r(27952),i=r(8148);const s=(0,r(79692).Z)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},58896:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(56306),o=r(8148),i=r(10174);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},85592:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(52730),o=r(59431),i=r(56306),s=r(8148),c=r(17440),u=r(10174),p=r(95470);const d=(0,r(79692).Z)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const b=d(),g=(0,l.useSelector)(o.ZP.selectors.getMetadata),f=(0,l.useSelector)(o.ZP.selectors.getUIPath),y=a().createElement(u.x,null,a().createElement(p.Z,{href:(0,i.ChB)({uiPath:f,uri:(0,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:b.relationshipLabel},t.relationshipLabel))),v=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(g,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,m({attributeValue:t,attributeType:r,attributeTypesList:v,label:y},n))}},10174:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(94079),o=r(32625);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Typography,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},57507:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},35315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},77585:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(59431),s=r(56306),c=r(52730),u=r(72753),p=r(94175),d=r(71153),m=r.n(d),b=r(63149),g=r(8818),f=r(32625);const y=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:y}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:y}),h=(0,c.useSelector)(i.ZP.selectors.getMetadata),{label:E}=(0,s.PWK)(h,t.type);return a().createElement("div",{className:m()(v.sourceItem,n)},a().createElement(p.Z,{className:v.sourceIcon,sourceType:t.type}),a().createElement("div",{className:v.sourceInfo},a().createElement("div",null,a().createElement("span",{className:v.label},E),l&&a().createElement(g.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},32625:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(79692);const a=(0,n.Z)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r}=e;return{backgroundColor:t,height:"12px",width:"12px",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.Z)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},26905:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(56306),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},87760:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(56306),a=r(24328),l=r.n(a),o=r(81303),i=r(13074);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r}=e,a=p(e,["expanded","LabelRenderer"]);const{attributeType:o,values:c,valueContainerClassName:u}=a;switch(o.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r},a));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:u},l().createElement(i.Z,{attributeType:o,attributeValues:c,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},a))}}))},20982:(e,t,r)=>{r.d(t,{Z:()=>Te});var n=r(24328),a=r.n(n),l=r(52730),o=r(87918),i=r.n(o),s=r(59431),c=r(56306),u=r(74402),p=r(97946),d=r(60894),m=r(85709),b=r(92778),g=r(17440),f=r(92332),y=r(71153),v=r.n(y),h=r(79692);const E=(0,h.Z)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}}))),w=e=>{const t=E();return a().createElement("div",{className:v()(t.headCell,t.coloredCell)},a().createElement(f.default,e),e.children)};var x=r(22694),O=r(32528);const k=(0,h.Z)({root:{marginBottom:"-6px"}}),C=(0,O.Z)((0,g.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:u}=e;const p=k(),d=(0,l.useSelector)(s.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,g.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,g.propEq)("uri",e.uri))),f=(0,g.pipe)((0,g.propOr)([],"attributes"),(0,g.reject)((0,g.either)(c.YkG,c.Or$)),(0,g.filter)((0,g.either)(c.QZu,b)),(0,g.filter)((0,g.both)(c.Uty,(e=>(0,c.Vg3)({attributeType:e,mode:c.fO_.EDITING})))))(m);return a().createElement("div",{className:p.root},a().createElement(x.Z,{label:i().text("Attribute"),popupTitle:i().text("Add attributes"),data:f,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(c.QZu).forEach((e=>{u({attributeType:e,parentUri:r})}))}}))}));var T=r(51229);const S=(0,O.Z)((0,g.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(w,r):a().createElement(w,r,a().createElement(T.Z,null),a().createElement(C,null))})),I=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:r.cellValueWrapper},t)};var j=r(4073);const A=(0,h.Z)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}const N=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(j.Z,Z({attributeValues:t},r)))};var P=r(58896);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const R=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(P.Z,D({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var V=r(85592);function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const z=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=A(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(V.Z,M({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var L=r(22246);function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W.apply(this,arguments)}const U=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(L.Z,W({attributeValue:e},r))))))};function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const F=(0,O.Z)((0,g.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,parentUri:s,readOnly:u}=e;return class{static build(e,t){switch(e){case c.oS0.TYPE_NESTED:return a().createElement(R,t);case c.oS0.TYPE_REFERENCE:return a().createElement(z,t);case c.oS0.TYPE_IMAGE:return a().createElement(U,t);default:return a().createElement(N,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){B(e,t,r[t])}))}return e}({},t,{parentUri:s,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,disableEdit:u,disableDelete:u}))}));var H=r(95629),Y=r(87760);const _=e=>{let{value:{values:t,attributeType:r}}=e;const n=E();return a().createElement("div",{className:n.cellValueWrapper},a().createElement(H.Z,{className:n.attributeTitle,label:r.label}),a().createElement(Y.Z,{values:t,attributeType:r,valueContainerClassName:n.ovValue}))},G=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:v()(r.cellValueWrapper,r.count)},t)};var q=r(94079),X=r(87685),$=r(99144),Q=r(8818),J=r(94175);const K=e=>{let{sourcesUriOrder:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(q.ListItem,{key:e,className:r.popupItem},a().createElement(J.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ee=e=>{let{attributeUri:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),o=(0,c.zeJ)(n,t);return a().createElement(q.ListItem,{key:o.uri,className:r.popupItem},a().createElement(q.ListItemText,{primary:(0,c.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},te=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),()=>i().text("Source sequence")],[(0,g.prop)("primaryAttributeUri"),()=>i().text("Attribute winner")],[(0,g.prop)("comparisonAttributeUri"),()=>i().text("Comparison attribute")]]),re=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(K,{sourcesUriOrder:t})}],[(0,g.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}],[(0,g.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}]]),ne=e=>{let{info:t}=e;const r=E(),[l,o]=(0,n.useState)(null),s=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(Q.k,{icon:$.Z,tooltipTitle:i().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(q.Popover,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(q.IconButton,{className:r.closeButton,onClick:s},a().createElement(X.default,null)),a().createElement(q.Typography,{variant:"subtitle1",className:r.popupTitle},te(t))),a().createElement(q.List,{component:"div",className:r.popupItemsWrapper},re(t))))},ae=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=E(),i=r||n||l;return a().createElement("div",{className:v()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),i&&a().createElement(ne,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var le=r(63149),oe=r(40625);const ie=e=>{let{crosswalk:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:u}=(0,le.pu)(t);return a().createElement(oe.Z,{className:r.winnerSourceItem,color:(0,c.CJp)((0,c.uKF)(t)),opacity:o?.38:1,onMouseEnter:()=>i(),onMouseLeave:()=>u()},a().createElement(J.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},se=e=>{let{value:{crosswalks:t}}=e;const r=E();return a().createElement(q.List,{component:"div"},t.map((e=>a().createElement(q.ListItem,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ie,{crosswalk:e})))))},ce=[{id:"ovValues",get label(){return i().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return i().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return i().text("Rule type")},initialWidth:200},{id:"count",get label(){return i().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return i().text("Attribute values")},hideable:!1}],ue=e=>(0,c.OXP)(e)&&!(0,c.ZiX)(e.uri),pe=["ovValues","ruleType","values"],de=e=>{switch(e){case"ovValues":return _;case"values":return F;case"count":return G;case"ruleType":return ae;case"winnerSources":return se;default:return I}},me=(0,g.pipe)(c.cwx,(0,g.sortWith)([(0,g.descend)((0,g.propOr)(-1,"priority"))]),(0,g.map)((0,g.prop)("uri"))),be=(0,g.curry)(((e,t)=>(0,c.YkG)(e)&&t&&(0,g.pipe)(c.c31,(0,g.find)((r=>r.slice((0,c.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,g.pipe)((0,g.filter)(ue),(0,g.chain)((e=>(0,g.pipe)((0,g.pickBy)(((t,r)=>{const n=(0,c.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,c.IM5)(e.value,a);return n&&(!l||ue(l))})),g.values,g.flatten)(t))),(0,g.uniqBy)((0,g.prop)("uri")))(e)},fe=(0,g.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?S:w,rowCellValueRenderer:de(t)}})),ye=(e,t,r,n,a,l)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(ue)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case c.oS0.TYPE_REFERENCE:case c.oS0.TYPE_NESTED:case c.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+r[t.uri].length),0)}}(n.type,l,a);case"ruleType":return((e,t,r)=>{var n,a;const l=[...e.entityTypes,...e.relationTypes||[]].find((0,g.propEq)("uri",r)),o=null==l||null===(n=l.survivorshipGroups)||void 0===n?void 0:n.find((0,g.propEq)("default",!0)),i=null==o||null===(a=o.mapping)||void 0===a?void 0:a.find((0,g.propEq)("attribute",t.uri)),s=(0,c.o_J)(e,null==i?void 0:i.survivorshipStrategy)||(0,c.Xaq)(e),u=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(s)?(0,g.uniq)([...(null==i?void 0:i.sourcesUriOrder)||[],...(null==o?void 0:o.sourcesUriOrder)||[],...me(e)]):void 0,p=be(t),d=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.primaryAttributeUri):void 0,m=(0,c.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.comparisonAttributeUri):void 0;return{ruleType:s,sourcesUriOrder:u,primaryAttributeUri:d,comparisonAttributeUri:m}})(t,n,r);case"winnerSources":return{crosswalks:ge(l,a)};default:return null}};function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(this,arguments)}const he=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData"]);const i=E(),s=0===n;return a().createElement("div",{className:v()(i.rowCell,s&&i.coloredCell),"data-reltio-id":`column-name-${l.id}`},t.values.map(((e,t)=>a().createElement(r,ve({key:t,value:e},o)))))};var Ee=r(99136),we=r(85209),xe=r(31276);const Oe=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[s,c]=(0,n.useState)("without");return a().createElement(q.Dialog,{open:t,onEnter:()=>c("without")},a().createElement(q.DialogContent,null,a().createElement(q.DialogContentText,null,i().text("You are attempting to change a value that is presently ignored.")),a().createElement(q.FormControl,{component:"fieldset"},a().createElement(q.FormLabel,{component:"legend"},i().text("Please choose an option:")),a().createElement(q.RadioGroup,{value:s,onChange:(0,g.pipe)(xe.NA,c)},a().createElement(q.FormControlLabel,{value:"without",control:a().createElement(q.Radio,null),label:i().text("Save without Ignore")}),a().createElement(q.FormControlLabel,{value:"with",control:a().createElement(q.Radio,null),label:i().text("Save and apply Ignore to new value")})))),a().createElement(q.DialogActions,null,a().createElement(q.Button,{onClick:r,color:"primary"},i().text("Cancel")),a().createElement(q.Button,{onClick:()=>{"with"===s?o():l(),r()},color:"primary"},i().text("Ok"))))},ke=(0,h.Z)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ce.apply(this,arguments)}const Te=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:f=pe,onChangeVisibleColumns:y,readOnly:v,onDelete:h=xe.ZT,onPin:E=xe.ZT,onIgnore:w=xe.ZT,onEdit:x=xe.ZT,onAdd:O=xe.ZT,selectedAttributeTypes:k,onSelectAttributeTypes:C=xe.ZT}=e;const T=ke(),S=(0,n.useMemo)((()=>(0,g.pipe)((0,g.filter)((e=>{let{id:t}=e;return f.includes(t)})),fe)(ce)),[f]),{type:I,uri:j,attributes:A={}}=t||{},Z=(0,l.useSelector)(s.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,g.isNil)(k)){const e=(0,g.pipe)(g.keys,(0,g.without)(["paging"]),(0,g.map)((0,c.tCm)(I)),(0,g.map)((e=>(0,c.zeJ)(Z,e,I))),(0,g.filter)(c.Uty))(A);C(e)}}),[t,k]);const N=(0,n.useMemo)((()=>I?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((l=>{const o=(0,c.nIW)(l.uri),i=a[o],s=(0,c.YkG)(l)?n.relation:n.entity;return(0,g.pipe)((0,g.reduce)(((r,n)=>(0,g.assoc)(n,ye(n,e,t,l,s,i),r)),{}),(0,g.assoc)("rawValue",i))(r)}))}(Z,I,k,f,o,A):[]),[Z,I,k,f,A,o]),{getDynamicRowCellHeight:P,changeRowCellHeight:D}=(0,u.Z)(),R=(0,n.useCallback)((e=>a().createElement(p.Z,Ce({onChangeHeight:D},e),a().createElement(he,e))),[D]),V=(0,n.useCallback)((0,g.either)(P,(0,g.always)(68)),[P]),[M,z]=(0,n.useState)(null),[L,W]=(0,n.useState)(null),U=(0,n.useCallback)((e=>{e.attributeValue.ignored?W(e):x(e)}),[x,W]),B=(0,n.useMemo)((()=>({onDelete:z,onPin:E,onIgnore:w,onEdit:U,onAdd:O,parentUri:j,parentTypeUri:I,selectedAttributeTypes:k,onSelectAttributeTypes:C,readOnly:v})),[z,E,w,U,O,j,I,k,C,v]);return a().createElement("div",{className:T.tableContainer},a().createElement(b.Z,{classes:{root:T.tableHeader},title:i().text("Sources")},a().createElement(d.Z,{columnsData:ce,selectedColumns:f,onChangeColumns:y})),a().createElement("div",{className:T.tableContent},r&&a().createElement(Ee.Z,null),a().createElement(m.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:S,rowsData:N,renderRowCell:R,getRowCellHeight:V,context:B})),a().createElement(we.Z,{open:!!M,onClose:()=>z(null),onConfirm:()=>h(M)}),a().createElement(Oe,{open:!!L,onClose:()=>W(null),onConfirmEditWithIgnore:()=>x(L),onConfirmEditWithoutIgnore:()=>{w({attributeValue:L.attributeValue}),x(L)}}))}))},40625:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const s=(0,r(79692).Z)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},"filled"===n&&{backgroundColor:t},"outlined"===n&&{border:`${t} solid 2px`},{opacity:r,transition:"opacity 0.3s",boxSizing:"border-box"})}});function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="filled",children:i,className:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const d=s({color:r,opacity:n,variant:l});return a().createElement("div",c({ref:t,className:o()(d.item,u)},p),i)}))},61305:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(85209),i=r(22694),s=r(31517),c=r(8818),u=r(94175),p=r(81174),d=r(94079),m=r(22983),b=r(56306),g=r(17440),f=r(87918),y=r.n(f),v=r(59431),h=r(22385);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(79692);const O=(0,x.Z)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(d.Typography,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var C=r(71153),T=r.n(C),S=r(43305);const I=(0,x.Z)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(!1),u=e=>o(e.valueOf());return a().createElement(S.Z,{variant:"filled",value:t?new Date(t):null,disabled:l,onChange:(0,g.unless)((0,g.always)(s),u),onAccept:u,onOpen:()=>c(!0),onClose:()=>c(!1),InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:T()(i.timestampEditor,r.root)}}})};var A=r(95038),Z=r.n(A);const N=(0,x.Z)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),P=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:f,onDeleteAttribute:h}=e;const E=N(),w=!("uri"in t),x=(0,l.useSelector)(v.ZP.selectors.getMetadata),[O,C]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),I=(0,n.useMemo)((()=>[{label:b.G39.sourceSystems.label,uri:"type"},{label:b.G39.value.label,uri:"value"},{label:b.G39.sourceTable.label,uri:"sourceTable",canBeAdded:w,canBeDeleted:w},{label:b.G39.createDate.label,uri:"createDate"},{label:b.G39.updateDate.label,uri:"updateDate"},{label:b.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:b.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:b.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),A=(0,g.pipe)((0,g.filter)((0,g.propEq)("canBeAdded",!0)),(0,g.filter)((e=>!(0,g.has)(e.uri,t))),(0,g.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,A.length>0&&r&&a().createElement(i.Z,{label:y().text("Add attributes"),onApply:e=>{e.length>0&&C((t=>t.concat((0,g.map)((0,g.prop)("uri"),e))))},data:A}),I.map((e=>e.uri in t||O.includes(e.uri)?a().createElement("div",{key:e.uri,className:E.attributeWrapper},a().createElement(d.Typography,{variant:"body2",className:E.attributeTitle},`${e.label}:`),a().createElement("div",{className:E.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,b.tH7)(x,t);return w?a().createElement(s.Z,{label:"",placeholder:t,className:E.editor,value:{value:t,label:r},options:(0,b.cwx)(x).sort((0,g.ascend)((0,g.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return f(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(u.Z,{className:E.sourceIcon,sourceType:t}),a().createElement(d.Typography,{className:E.text,variant:"body2"},r))}case"sourceTable":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Typography,{className:E.text,variant:"body2"},t);case"value":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&Z().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Typography,{className:E.text,variant:"body2"},(0,b.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(c.k,{icon:m.Z,disabled:!r,onClick:()=>S(e.uri),size:"XS",tooltipTitle:y().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!T,onClose:()=>S(null),onConfirm:()=>{return e=T,C((t=>(0,g.without)([e],t))),void((0,g.isNil)(t[e])||h(e));var e}}))}},48017:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(56306),s=r(40625),c=r(63149),u=r(94175),p=r(94079),d=r(59431);const m=(0,r(79692).Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),b=e=>{let{crosswalk:t}=e;const r=m(),n=(0,c.nX)(t),l=(0,o.useSelector)(d.ZP.selectors.getMetadata),b=(0,i.tH7)(l,t.type);return a().createElement(s.Z,{color:n,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(p.Typography,{className:r.sourceLabel,variant:"body2"},b))},g=(0,n.memo)((()=>{var e;const t=m(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(b,{crosswalk:i.crosswalk})))}))},79769:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(61305),c=r(17440);const u=(0,r(79692).Z)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),p=e=>{let{className:t,onAdd:r,onClose:l}=e;const p=u(),[d,m]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(i.Typography,{variant:"body1",className:p.caption},o().text("Add crosswalk")),a().createElement(s.Z,{crosswalk:d,onDeleteAttribute:e=>{m((0,c.dissoc)(e))},onEditAttribute:(e,t)=>{m((0,c.assoc)(e,t))}}),a().createElement("div",{className:p.controlButtons},a().createElement(i.Button,{className:p.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Button,{color:"primary",onClick:()=>{r(d),l()},disabled:!d.type||!d.value},o().text("Add"))))}},52017:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(63149),o=r(77243),i=r(56306),s=r(52730),c=r(94079),u=r(72753),p=r(94175),d=r(22385),m=r(59431),b=r(79692);const g=(0,b.Z)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:{width:"100%",display:"flex",alignItems:"center",height:28,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),f=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=g({isOpaque:!n}),b=(0,s.useSelector)(m.ZP.selectors.getMetadata),f=(0,i.tH7)(b,t);return a().createElement("div",{className:o.root},a().createElement(d.Z,{size:"XXS",className:o.focusedIcon,icon:r&&u.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(p.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(c.Typography,{variant:"body2"},f)))}));var y=r(87918),v=r.n(y),h=r(22983),E=r(19592),w=r(88611),x=r(40625),O=r(85209),k=r(8818),C=r(51229),T=r(71543),S=r(13896),I=r(42484),j=r(61305);const A=(0,b.Z)({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5,marginRight:8},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),Z=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:g,disableDelete:f,onDelete:y,onEdit:Z}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:R}=(0,l.BF)(t),V=o?"#FFF":d?P:"#CACCD1",{isDimmed:M,highlightCrosswalk:z,removeHighlight:L}=(0,l.pu)(t),[W]=(0,l.RT)(),U=A({color:V,isOpaque:!M,isFocused:R}),[B,F]=(0,n.useState)(!1),[H,Y]=(0,n.useState)(!1),_=(0,s.useSelector)(m.ZP.selectors.getMetadata),G=(0,i.tH7)(_,t.type),q=(0,i.nIW)(t.uri),X=(0,i.x_)(t),[,$,Q]=(0,S.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!X}),J=!X&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{Q((0,I.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;b&&W&&(0,i.aFF)(W,t)&&W!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[W]),a().createElement("div",{className:U.root,ref:N},a().createElement(k.k,{size:"XXS",className:U.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:U.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:U.header,color:V,variant:X?"outlined":"filled",onMouseEnter:()=>z(),onMouseLeave:()=>L()},r&&a().createElement(T.Z,{className:U.dependentIcon}),a().createElement(E.Z,{onClick:()=>F((e=>!e)),expanded:B}),a().createElement(p.Z,{className:U.sourceIcon,sourceType:t.type}),a().createElement(w.C,{value:G},a().createElement(c.Typography,{variant:"body2",noWrap:!0},G)),a().createElement(C.Z,null),a().createElement(w.C,{value:t.value},a().createElement(c.Typography,{variant:"body2",className:U.labelValue,noWrap:!0},t.value))),B&&a().createElement("div",{className:U.attributesWrapper},J&&a().createElement("div",{className:U.deleteCrosswalkButton},a().createElement(k.k,{icon:h.Z,disabled:f,onClick:()=>Y(!0),size:"XS",tooltipTitle:f?v().text("You don't have permissions to delete"):v().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(O.Z,{open:H,onConfirm:()=>{R&&D(),y(q)},onClose:()=>Y(!1)})),a().createElement(j.Z,{crosswalk:t,canEditAttribute:!g,onEditAttribute:(e,t)=>{Z({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:q,attributeName:e})}}))))})),N=(0,b.Z)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(c.Link,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?v().text("View dependent crosswalks"):v().text("Hide dependent crosswalks")))},D=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:g}=e;const y=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>y.some((0,i.aFF)(e))))&&g()}),[y]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(f,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>g()}))}},39417:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(17440),l=r(56306),o=r(31276);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},85965:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(56306),l=r(17440),o=r(31276);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),g=(0,n.useRef)([]),f=(0,n.useRef)(null),y=(0,n.useCallback)((()=>{f.current=null}),[]),[v,h]=(0,n.useState)(c),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:E(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.HQx,E)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&f.current){const{ownerType:t}=f.current,r=Object.keys(e[t]),n=Object.keys(m[t]);h((0,l.difference)(r,n))}else h(c);y(),d(t),b(e),g.current=[]}),[t]);const w=(0,n.useCallback)((0,l.pipe)(u,y),[u,y]),{deleteAttribute:x,ignoreAttribute:O,pinAttribute:k,createAttribute:C,updateAttribute:T}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:w}),S=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;b((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c)}),[]),I=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),b((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):x(e)}),[x]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});C({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),f.current=n}}else T(e)}),[C,T,p]);return{modifiedEntity:p,crosswalksMap:m,onAddAttribute:S,onDeleteAttribute:I,onPinAttribute:k,onIgnoreAttribute:O,onEditAttribute:j,newlyCreatedAttributes:v}}},77243:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},90186:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(56306),a=r(17440),l=r(77243);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},63149:(e,t,r)=>{r.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var n=r(24328),a=r.n(n),l=r(56306),o=r(17440),i=r(31276);const s=(0,n.createContext)(null),c=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children"]);return a().createElement(s.Provider,{value:r},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(l.uKF,l.CJp)}=(0,n.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,n.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:r=i.ZT}=(0,n.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(l.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,n.useCallback)((()=>r(e,!0)),[e,r]),removeHighlight:(0,n.useCallback)((()=>r(e,!1)),[e,r])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:r=[]}=(0,n.useContext)(s)||{};return{isFocused:!!e&&r.some((0,o.eqBy)(l.uKF,e)),toggleCrosswalkFocus:(0,n.useCallback)((()=>t(e)),[e,t])}}},66095:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(56306);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5884],{97991:(e,t,r)=>{r.d(t,{Z:()=>u});var n,a=r(94079),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(n||(n={}));const u=e=>{let{className:t,icon:r,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(r?n.ICON_MODE:n.TEXT_MODE)}),[r,l]);const b=()=>{m(n.ERROR_MODE)};switch(d){case n.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:r,onError:b},p));case n.TEXT_MODE:case n.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},74402:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r(17440),l=r(56306);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},s=()=>{const[e,t]=(0,n.useState)({}),r=(0,n.useRef)({}),s=(0,n.useCallback)((0,l.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({},r.current))})),[]),c=(0,n.useCallback)((()=>{r.current={}}),[]);return{getDynamicRowCellHeight:(0,n.useCallback)((0,a.pipe)(i,(0,a.prop)(a.__,e)),[e]),changeRowCellHeight:(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(((e,t)=>{r.current[e]=t}),s),[i,a.identity])),[]),clearHeightsCache:c}}},97946:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(44443),s=r(94079),c=r(20562);const u=e=>{let{onChangeHeight:t,children:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const o=(0,n.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=l,b=t({rowIndex:p,cellIndex:m,columnData:d}),g=()=>o.current&&b(o.current.clientHeight);return(0,c.D)(g,[u.rawValue]),a().createElement("div",null,a().createElement(i.Z,{handleHeight:!0,onResize:g}),a().createElement(s.RootRef,{rootRef:o},r))};u.propTypes={onChangeHeight:o().func,children:o().node};const p=u},85209:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079);const s=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(i.Dialog,{open:t},a().createElement(i.DialogContent,null,a().createElement(i.DialogContentText,null,o().text("Are you sure you want to delete this?"))),a().createElement(i.DialogActions,null,a().createElement(i.Button,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Button,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},94111:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(80030);const o=(0,r(79692).Z)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.ZP,i({},e,{classes:t,arrow:!0}))}},96955:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(31396),u=r(60364);const p=(0,r(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var d=r(56306);const m=e=>"horizontal"===e,b=e=>{let{className:t,children:r,orientation:l,defaultSize:i,size:s,minSize:b,maxSize:g,allowResize:f,onChange:y}=e;const v=p(),h=(0,u.Z)(),[E,w]=(0,n.useState)(),[x,O]=(0,n.useState)(!0),k=(0,n.useCallback)((()=>O(!0)),[]),C=(0,n.useCallback)((()=>O(!1)),[]),T=()=>m(l)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,S=(0,n.useCallback)((0,d.DsO)((e=>{const t=T();y({percentageSize:e/t*100+"%",isMaxSize:g>0?e===g:e===t+g,isMinSize:e===b})}),250),[y,l,g,E]),I=(0,n.useMemo)((()=>({transition:h.transitions.create(m(l)?"height":"width",{easing:h.transitions.easing.sharp,duration:h.transitions.duration.leavingScreen})})),[l,h]);return"number"==typeof s&&s<0&&(s=(T()||0)+s),a().createElement("div",{ref:w,className:o()(v.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:f,onChange:S,defaultSize:i,minSize:b,maxSize:g,onDragStarted:C,onDragFinished:k,pane1Style:x?I:void 0},r))},g=s().oneOfType([s().number,s().string]);b.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:g,size:g,minSize:g,maxSize:g,allowResize:s().bool,onChange:s().func};const f=b},94175:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(59431),a=r(56306),l=r(24328),o=r.n(l),i=r(52730),s=r(97991);const c=e=>{let{sourceType:t,className:r,classes:l}=e;const c=(0,i.useSelector)(n.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,a.PWK)(c,t),d=(0,a.tH7)(c,u)[0];return o().createElement(s.Z,{className:r,avatarText:d,icon:p?(0,a.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null,variant:"square",rootClasses:l})}},4073:(e,t,r)=>{r.d(t,{Z:()=>ne});var n=r(24328),a=r.n(n),l=r(56306),o=r(48554),i=r(12437),s=r(22983),c=r(27604),u=r(43054),p=r(71153),d=r.n(p),m=r(87918),b=r.n(m),g=r(72768),f=r(55847),y=r(94079),v=r(17440),h=r(28117),E=r(40879),w=r(79692);const x=(0,w.Z)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],C=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c}=e;const u=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),p=(0,l.PFL)(t),m=(0,E.AG)(r,p),[b,g]=(0,n.useState)(m),f={className:u.textField,InputProps:{disableUnderline:!0,classes:{root:u.input,multiline:u.inputMultiline}}},w=()=>{const e=(0,E.Ho)(t,b);if(!(0,v.isNil)(b)&&!(0,v.equals)(b,m)){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===b&&(0,l.FVt)(p.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(y.Popover,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(u.paper,{[u.booleanEditor]:(0,l.T6Y)(p.type),[u.timestampEditor]:(0,l.j5n)(p.type)}),root:u.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(p.type)?"Escape"===e.key&&s():w()},onBackdropClick:w},a().createElement(h.Z,{autoFocus:!0,dataTypeDefinition:p,fieldName:(0,l.Tde)(t.uri),onChange:g,TextFieldProps:f,value:b,fullWidth:!0}))};var T=r(8818),S=r(57507),I=r(35315),j=r(83348),A=r(77585);const Z=(0,w.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),N=(0,j.Z)(y.MenuItem),P=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(y.Typography,{classes:{root:t.menuText}},n))},D=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=Z(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(A.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(N,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(P,{icon:p,text:i,styles:l}))}));D.displayName="CrosswalkMenuItem";const R=D;var V=r(26905),M=r(63149);function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L=(0,w.Z)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){z(e,t,r[t])}))}return e}({minHeight:"28px",wordBreak:"break-word"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",opacity:r?1:.38,transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",padding:"6px 0",lineHeight:"14px",width:"calc(100% - 71px)"},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),W=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:y,onIgnore:v,onEdit:h,onPin:E,onDelete:w}=e;const{isReadingMode:x,isEditingMode:O,isHovered:k,onMouseEnter:j,onMouseLeave:A,setReadingMode:Z,setEditingMode:N}=(0,V.p)(),P=(0,n.useRef)(),D=(0,l.nIW)(i.uri),z=(0,l.x_)(p),W=!o.system&&!z,U=W&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),B=W&&!y&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),H=!F&&(!x&&U||i.pin),Y=!F&&(!x&&U||i.ignored),_=(0,M.nX)(p),{isHighlighted:G,isDimmed:q,highlightCrosswalk:X,removeHighlight:$}=(0,M.pu)(p),Q=L({variant:z?"outlined":"filled",opaque:!q,fullyColored:G,color:_}),J=[{crosswalk:p,color:_},{disabled:!U,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:U?null:b().text("You don't have permissions to edit"),onClick:()=>N(),id:"edit"},{disabled:!B,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:B?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],K=()=>{$(),Z()};return a().createElement("div",{ref:P,className:d()(t,Q.root),onMouseEnter:()=>{X(),j()},onMouseLeave:()=>{$(),A()},"data-reltio-id":r},a().createElement("div",{className:Q.attributeValue},a().createElement(g.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:Q.actions},H&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!U}),Y&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!U}),k&&a().createElement(f.Z,{MenuItemRenderer:R,menuId:`simple-attribute-additional-actions-${D}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:K,menuItems:J})),O&&a().createElement(C,{attributeType:o,attributeValue:i,color:_,onClose:K,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P}))};var U=r(13896);const B=(0,w.Z)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function F(){return F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F.apply(this,arguments)}const H=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd"]);const u=B(),[{isDragItemOver:p},d]=(0,U.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let m=0;return a().createElement("div",{ref:d,className:u.simpleAttributesWrapper},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(W,F({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,dataReltioId:"value-index-"+m++},c))))})),p&&a().createElement("div",{className:u.dropIndicator},b().text("Drop here")))};var Y=r(58896);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}const G=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(y.Button,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(Y.Z,_({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var q=r(85592);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(q.Z,X({key:e.uri,attributeValue:e},n)))))};var Q=r(22246);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))},ee=(0,w.Z)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}function re(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const ne=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=re(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ee(),[m,b]=(0,n.useState)(c),g=(0,v.propOr)(r.length,"totalValues",s),f=c<g,y=f&&m<g,h=f&&m>=g,E=r.slice(0,m),w=g-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement(G,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=re(p,["crosswalksMap"]);return a().createElement($,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(K,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(H,te({attributeValues:e,attributeType:t},p))}})(E),y&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<g&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},8148:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(56306),o=r(26905),i=r(51229),s=r(63149),c=r(77585),u=r(94111),p=r(71153),d=r.n(p),m=r(32625);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,s.pu)(t),p=(0,m.y)({isOpaque:!l,color:n});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{className:d()(p.crosswalkIcon,r),onMouseEnter:()=>o(),onMouseLeave:()=>i()}))};var g=r(17440),f=r(19592),y=r(4073),v=r(95629),h=r(95974),E=r(79692);const w=(0,E.Z)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(y.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,g.path)(["paging",e.uri],r)},n))))))};var k=r(35315),C=r(57507),T=r(8818),S=r(22983),I=r(87918),j=r.n(I);const A=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var Z=r(20562),N=r(66095);const P=(0,E.Z)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),D=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}=e;const w=P(),{isReadingMode:x,onMouseEnter:T,onMouseLeave:S}=(0,o.p)(),I=!p&&(0,l.Z5t)(l.fO_.EDITING,t),j=!d&&(0,l.Edd)(l.fO_.EDITING,t),D=(0,l.ZiX)(r.uri),R=!D&&(!x&&I||r.pin),V=!D&&(!x&&I||r.ignored),M=!x&&j,z=(0,N.Q)(r.uri),[L,W]=(0,n.useState)(z||D);(0,Z.D)((()=>{z&&W(z)}),[z]);const U=(0,g.pipe)((0,g.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),g.values,g.flatten,(0,g.uniqBy)((0,g.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:w.root,onMouseEnter:T,onMouseLeave:S},a().createElement(f.Z,{onClick:()=>W((e=>!e)),expanded:L}),a().createElement("span",null,c,U.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:w.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:w.actions},R&&a().createElement(k.Z,{disabled:!I,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),V&&a().createElement(C.Z,{disabled:!I,isIgnored:r.ignored,onClick:()=>y({attributeValue:r})}),M&&a().createElement(A,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),L&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!I,disableDelete:!j,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}))}},22246:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(56306),o=r(27952),i=r(8148);const s=(0,r(79692).Z)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},58896:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(56306),o=r(8148),i=r(10174);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},85592:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(52730),o=r(59431),i=r(56306),s=r(8148),c=r(17440),u=r(10174),p=r(95470);const d=(0,r(79692).Z)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const b=d(),g=(0,l.useSelector)(o.ZP.selectors.getMetadata),f=(0,l.useSelector)(o.ZP.selectors.getUIPath),y=a().createElement(u.x,null,a().createElement(p.Z,{href:(0,i.ChB)({uiPath:f,uri:(0,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:b.relationshipLabel},t.relationshipLabel))),v=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(g,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,m({attributeValue:t,attributeType:r,attributeTypesList:v,label:y},n))}},10174:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(94079),o=r(32625);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Typography,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},57507:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},35315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},77585:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(59431),s=r(56306),c=r(52730),u=r(72753),p=r(94175),d=r(71153),m=r.n(d),b=r(63149),g=r(8818),f=r(32625);const y=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:y}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:y}),h=(0,c.useSelector)(i.ZP.selectors.getMetadata),{label:E}=(0,s.PWK)(h,t.type);return a().createElement("div",{className:m()(v.sourceItem,n)},a().createElement(p.Z,{className:v.sourceIcon,sourceType:t.type}),a().createElement("div",{className:v.sourceInfo},a().createElement("div",null,a().createElement("span",{className:v.label},E),l&&a().createElement(g.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},32625:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(79692);const a=(0,n.Z)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r}=e;return{backgroundColor:t,height:"12px",width:"12px",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.Z)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},26905:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(56306),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},87760:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(56306),a=r(24328),l=r.n(a),o=r(81303),i=r(13074);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r}=e,a=p(e,["expanded","LabelRenderer"]);const{attributeType:o,values:c,valueContainerClassName:u}=a;switch(o.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r},a));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:u},l().createElement(i.Z,{attributeType:o,attributeValues:c,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},a))}}))},20982:(e,t,r)=>{r.d(t,{Z:()=>Te});var n=r(24328),a=r.n(n),l=r(52730),o=r(87918),i=r.n(o),s=r(59431),c=r(56306),u=r(74402),p=r(97946),d=r(60894),m=r(85709),b=r(92778),g=r(17440),f=r(92332),y=r(71153),v=r.n(y),h=r(79692);const E=(0,h.Z)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}}))),w=e=>{const t=E();return a().createElement("div",{className:v()(t.headCell,t.coloredCell)},a().createElement(f.default,e),e.children)};var x=r(22694),O=r(32528);const k=(0,h.Z)({root:{marginBottom:"-6px"}}),C=(0,O.Z)((0,g.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:u}=e;const p=k(),d=(0,l.useSelector)(s.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,g.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,g.propEq)("uri",e.uri))),f=(0,g.pipe)((0,g.propOr)([],"attributes"),(0,g.reject)((0,g.either)(c.YkG,c.Or$)),(0,g.filter)((0,g.either)(c.QZu,b)),(0,g.filter)((0,g.both)(c.Uty,(e=>(0,c.Vg3)({attributeType:e,mode:c.fO_.EDITING})))))(m);return a().createElement("div",{className:p.root},a().createElement(x.Z,{label:i().text("Attribute"),popupTitle:i().text("Add attributes"),data:f,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(c.QZu).forEach((e=>{u({attributeType:e,parentUri:r})}))}}))}));var T=r(51229);const S=(0,O.Z)((0,g.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(w,r):a().createElement(w,r,a().createElement(T.Z,null),a().createElement(C,null))})),I=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:r.cellValueWrapper},t)};var j=r(4073);const A=(0,h.Z)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}const N=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(j.Z,Z({attributeValues:t},r)))};var P=r(58896);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const R=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(P.Z,D({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var V=r(85592);function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const z=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=A(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(V.Z,M({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var L=r(22246);function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W.apply(this,arguments)}const U=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(L.Z,W({attributeValue:e},r))))))};function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const F=(0,O.Z)((0,g.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,parentUri:s,readOnly:u}=e;return class{static build(e,t){switch(e){case c.oS0.TYPE_NESTED:return a().createElement(R,t);case c.oS0.TYPE_REFERENCE:return a().createElement(z,t);case c.oS0.TYPE_IMAGE:return a().createElement(U,t);default:return a().createElement(N,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){B(e,t,r[t])}))}return e}({},t,{parentUri:s,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,disableEdit:u,disableDelete:u}))}));var H=r(95629),Y=r(87760);const _=e=>{let{value:{values:t,attributeType:r}}=e;const n=E();return a().createElement("div",{className:n.cellValueWrapper},a().createElement(H.Z,{className:n.attributeTitle,label:r.label}),a().createElement(Y.Z,{values:t,attributeType:r,valueContainerClassName:n.ovValue}))},G=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:v()(r.cellValueWrapper,r.count)},t)};var q=r(94079),X=r(87685),$=r(99144),Q=r(8818),J=r(94175);const K=e=>{let{sourcesUriOrder:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(q.ListItem,{key:e,className:r.popupItem},a().createElement(J.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ee=e=>{let{attributeUri:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),o=(0,c.zeJ)(n,t);return a().createElement(q.ListItem,{key:o.uri,className:r.popupItem},a().createElement(q.ListItemText,{primary:(0,c.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},te=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),()=>i().text("Source sequence")],[(0,g.prop)("primaryAttributeUri"),()=>i().text("Attribute winner")],[(0,g.prop)("comparisonAttributeUri"),()=>i().text("Comparison attribute")]]),re=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(K,{sourcesUriOrder:t})}],[(0,g.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}],[(0,g.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}]]),ne=e=>{let{info:t}=e;const r=E(),[l,o]=(0,n.useState)(null),s=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(Q.k,{icon:$.Z,tooltipTitle:i().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(q.Popover,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(q.IconButton,{className:r.closeButton,onClick:s},a().createElement(X.default,null)),a().createElement(q.Typography,{variant:"subtitle1",className:r.popupTitle},te(t))),a().createElement(q.List,{component:"div",className:r.popupItemsWrapper},re(t))))},ae=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=E(),i=r||n||l;return a().createElement("div",{className:v()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),i&&a().createElement(ne,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var le=r(63149),oe=r(40625);const ie=e=>{let{crosswalk:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:u}=(0,le.pu)(t);return a().createElement(oe.Z,{className:r.winnerSourceItem,color:(0,c.CJp)((0,c.uKF)(t)),opacity:o?.38:1,onMouseEnter:()=>i(),onMouseLeave:()=>u()},a().createElement(J.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},se=e=>{let{value:{crosswalks:t}}=e;const r=E();return a().createElement(q.List,{component:"div"},t.map((e=>a().createElement(q.ListItem,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ie,{crosswalk:e})))))},ce=[{id:"ovValues",get label(){return i().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return i().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return i().text("Rule type")},initialWidth:200},{id:"count",get label(){return i().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return i().text("Attribute values")},hideable:!1}],ue=e=>(0,c.OXP)(e)&&!(0,c.ZiX)(e.uri),pe=["ovValues","ruleType","values"],de=e=>{switch(e){case"ovValues":return _;case"values":return F;case"count":return G;case"ruleType":return ae;case"winnerSources":return se;default:return I}},me=(0,g.pipe)(c.cwx,(0,g.sortWith)([(0,g.descend)((0,g.propOr)(-1,"priority"))]),(0,g.map)((0,g.prop)("uri"))),be=(0,g.curry)(((e,t)=>(0,c.YkG)(e)&&t&&(0,g.pipe)(c.c31,(0,g.find)((r=>r.slice((0,c.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,g.pipe)((0,g.filter)(ue),(0,g.chain)((e=>(0,g.pipe)((0,g.pickBy)(((t,r)=>{const n=(0,c.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,c.IM5)(e.value,a);return n&&(!l||ue(l))})),g.values,g.flatten)(t))),(0,g.uniqBy)((0,g.prop)("uri")))(e)},fe=(0,g.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?S:w,rowCellValueRenderer:de(t)}})),ye=(e,t,r,n,a,l)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(ue)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case c.oS0.TYPE_REFERENCE:case c.oS0.TYPE_NESTED:case c.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+r[t.uri].length),0)}}(n.type,l,a);case"ruleType":return((e,t,r)=>{var n,a;const l=[...e.entityTypes,...e.relationTypes||[]].find((0,g.propEq)("uri",r)),o=null==l||null===(n=l.survivorshipGroups)||void 0===n?void 0:n.find((0,g.propEq)("default",!0)),i=null==o||null===(a=o.mapping)||void 0===a?void 0:a.find((0,g.propEq)("attribute",t.uri)),s=(0,c.o_J)(e,null==i?void 0:i.survivorshipStrategy)||(0,c.Xaq)(e),u=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(s)?(0,g.uniq)([...(null==i?void 0:i.sourcesUriOrder)||[],...(null==o?void 0:o.sourcesUriOrder)||[],...me(e)]):void 0,p=be(t),d=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.primaryAttributeUri):void 0,m=(0,c.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.comparisonAttributeUri):void 0;return{ruleType:s,sourcesUriOrder:u,primaryAttributeUri:d,comparisonAttributeUri:m}})(t,n,r);case"winnerSources":return{crosswalks:ge(l,a)};default:return null}};function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(this,arguments)}const he=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData"]);const i=E(),s=0===n;return a().createElement("div",{className:v()(i.rowCell,s&&i.coloredCell),"data-reltio-id":`column-name-${l.id}`},t.values.map(((e,t)=>a().createElement(r,ve({key:t,value:e},o)))))};var Ee=r(99136),we=r(85209),xe=r(31276);const Oe=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[s,c]=(0,n.useState)("without");return a().createElement(q.Dialog,{open:t,onEnter:()=>c("without")},a().createElement(q.DialogContent,null,a().createElement(q.DialogContentText,null,i().text("You are attempting to change a value that is presently ignored.")),a().createElement(q.FormControl,{component:"fieldset"},a().createElement(q.FormLabel,{component:"legend"},i().text("Please choose an option:")),a().createElement(q.RadioGroup,{value:s,onChange:(0,g.pipe)(xe.NA,c)},a().createElement(q.FormControlLabel,{value:"without",control:a().createElement(q.Radio,null),label:i().text("Save without Ignore")}),a().createElement(q.FormControlLabel,{value:"with",control:a().createElement(q.Radio,null),label:i().text("Save and apply Ignore to new value")})))),a().createElement(q.DialogActions,null,a().createElement(q.Button,{onClick:r,color:"primary"},i().text("Cancel")),a().createElement(q.Button,{onClick:()=>{"with"===s?o():l(),r()},color:"primary"},i().text("Ok"))))},ke=(0,h.Z)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ce.apply(this,arguments)}const Te=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:f=pe,onChangeVisibleColumns:y,readOnly:v,onDelete:h=xe.ZT,onPin:E=xe.ZT,onIgnore:w=xe.ZT,onEdit:x=xe.ZT,onAdd:O=xe.ZT,selectedAttributeTypes:k,onSelectAttributeTypes:C=xe.ZT}=e;const T=ke(),S=(0,n.useMemo)((()=>(0,g.pipe)((0,g.filter)((e=>{let{id:t}=e;return f.includes(t)})),fe)(ce)),[f]),{type:I,uri:j,attributes:A={}}=t||{},Z=(0,l.useSelector)(s.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,g.isNil)(k)){const e=(0,g.pipe)(g.keys,(0,g.without)(["paging"]),(0,g.map)((0,c.tCm)(I)),(0,g.map)((e=>(0,c.zeJ)(Z,e,I))),(0,g.filter)(c.Uty))(A);C(e)}}),[t,k]);const N=(0,n.useMemo)((()=>I?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((l=>{const o=(0,c.nIW)(l.uri),i=a[o],s=(0,c.YkG)(l)?n.relation:n.entity;return(0,g.pipe)((0,g.reduce)(((r,n)=>(0,g.assoc)(n,ye(n,e,t,l,s,i),r)),{}),(0,g.assoc)("rawValue",i))(r)}))}(Z,I,k,f,o,A):[]),[Z,I,k,f,A,o]),{getDynamicRowCellHeight:P,changeRowCellHeight:D}=(0,u.Z)(),R=(0,n.useCallback)((e=>a().createElement(p.Z,Ce({onChangeHeight:D},e),a().createElement(he,e))),[D]),V=(0,n.useCallback)((0,g.either)(P,(0,g.always)(68)),[P]),[M,z]=(0,n.useState)(null),[L,W]=(0,n.useState)(null),U=(0,n.useCallback)((e=>{e.attributeValue.ignored?W(e):x(e)}),[x,W]),B=(0,n.useMemo)((()=>({onDelete:z,onPin:E,onIgnore:w,onEdit:U,onAdd:O,parentUri:j,parentTypeUri:I,selectedAttributeTypes:k,onSelectAttributeTypes:C,readOnly:v})),[z,E,w,U,O,j,I,k,C,v]);return a().createElement("div",{className:T.tableContainer},a().createElement(b.Z,{classes:{root:T.tableHeader},title:i().text("Sources")},a().createElement(d.Z,{columnsData:ce,selectedColumns:f,onChangeColumns:y})),a().createElement("div",{className:T.tableContent},r&&a().createElement(Ee.Z,null),a().createElement(m.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:S,rowsData:N,renderRowCell:R,getRowCellHeight:V,context:B})),a().createElement(we.Z,{open:!!M,onClose:()=>z(null),onConfirm:()=>h(M)}),a().createElement(Oe,{open:!!L,onClose:()=>W(null),onConfirmEditWithIgnore:()=>x(L),onConfirmEditWithoutIgnore:()=>{w({attributeValue:L.attributeValue}),x(L)}}))}))},40625:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const s=(0,r(79692).Z)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},"filled"===n&&{backgroundColor:t},"outlined"===n&&{border:`${t} solid 2px`},{opacity:r,transition:"opacity 0.3s",boxSizing:"border-box"})}});function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="filled",children:i,className:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const d=s({color:r,opacity:n,variant:l});return a().createElement("div",c({ref:t,className:o()(d.item,u)},p),i)}))},61305:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(85209),i=r(22694),s=r(31517),c=r(8818),u=r(94175),p=r(81174),d=r(94079),m=r(22983),b=r(56306),g=r(17440),f=r(87918),y=r.n(f),v=r(59431),h=r(22385);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(79692);const O=(0,x.Z)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(d.Typography,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var C=r(71153),T=r.n(C),S=r(43305);const I=(0,x.Z)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(!1),u=e=>o(e.valueOf());return a().createElement(S.Z,{variant:"filled",value:t?new Date(t):null,disabled:l,onChange:(0,g.unless)((0,g.always)(s),u),onAccept:u,onOpen:()=>c(!0),onClose:()=>c(!1),InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:T()(i.timestampEditor,r.root)}}})};var A=r(95038),Z=r.n(A);const N=(0,x.Z)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),P=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:f,onDeleteAttribute:h}=e;const E=N(),w=!("uri"in t),x=(0,l.useSelector)(v.ZP.selectors.getMetadata),[O,C]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),I=(0,n.useMemo)((()=>[{label:b.G39.sourceSystems.label,uri:"type"},{label:b.G39.value.label,uri:"value"},{label:b.G39.sourceTable.label,uri:"sourceTable",canBeAdded:w,canBeDeleted:w},{label:b.G39.createDate.label,uri:"createDate"},{label:b.G39.updateDate.label,uri:"updateDate"},{label:b.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:b.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:b.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),A=(0,g.pipe)((0,g.filter)((0,g.propEq)("canBeAdded",!0)),(0,g.filter)((e=>!(0,g.has)(e.uri,t))),(0,g.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,A.length>0&&r&&a().createElement(i.Z,{label:y().text("Add attributes"),onApply:e=>{e.length>0&&C((t=>t.concat((0,g.map)((0,g.prop)("uri"),e))))},data:A}),I.map((e=>e.uri in t||O.includes(e.uri)?a().createElement("div",{key:e.uri,className:E.attributeWrapper},a().createElement(d.Typography,{variant:"body2",className:E.attributeTitle},`${e.label}:`),a().createElement("div",{className:E.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,b.tH7)(x,t);return w?a().createElement(s.Z,{label:"",placeholder:t,className:E.editor,value:{value:t,label:r},options:(0,b.cwx)(x).sort((0,g.ascend)((0,g.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return f(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(u.Z,{className:E.sourceIcon,sourceType:t}),a().createElement(d.Typography,{className:E.text,variant:"body2"},r))}case"sourceTable":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Typography,{className:E.text,variant:"body2"},t);case"value":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&Z().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Typography,{className:E.text,variant:"body2"},(0,b.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(c.k,{icon:m.Z,disabled:!r,onClick:()=>S(e.uri),size:"XS",tooltipTitle:y().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!T,onClose:()=>S(null),onConfirm:()=>{return e=T,C((t=>(0,g.without)([e],t))),void((0,g.isNil)(t[e])||h(e));var e}}))}},48017:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(56306),s=r(40625),c=r(63149),u=r(94175),p=r(94079),d=r(59431);const m=(0,r(79692).Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),b=e=>{let{crosswalk:t}=e;const r=m(),n=(0,c.nX)(t),l=(0,o.useSelector)(d.ZP.selectors.getMetadata),b=(0,i.tH7)(l,t.type);return a().createElement(s.Z,{color:n,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(p.Typography,{className:r.sourceLabel,variant:"body2"},b))},g=(0,n.memo)((()=>{var e;const t=m(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(b,{crosswalk:i.crosswalk})))}))},79769:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(61305),c=r(17440);const u=(0,r(79692).Z)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),p=e=>{let{className:t,onAdd:r,onClose:l}=e;const p=u(),[d,m]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(i.Typography,{variant:"body1",className:p.caption},o().text("Add crosswalk")),a().createElement(s.Z,{crosswalk:d,onDeleteAttribute:e=>{m((0,c.dissoc)(e))},onEditAttribute:(e,t)=>{m((0,c.assoc)(e,t))}}),a().createElement("div",{className:p.controlButtons},a().createElement(i.Button,{className:p.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Button,{color:"primary",onClick:()=>{r(d),l()},disabled:!d.type||!d.value},o().text("Add"))))}},52017:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(63149),o=r(77243),i=r(56306),s=r(52730),c=r(94079),u=r(72753),p=r(94175),d=r(22385),m=r(59431),b=r(79692);const g=(0,b.Z)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:{width:"100%",display:"flex",alignItems:"center",height:28,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),f=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=g({isOpaque:!n}),b=(0,s.useSelector)(m.ZP.selectors.getMetadata),f=(0,i.tH7)(b,t);return a().createElement("div",{className:o.root},a().createElement(d.Z,{size:"XXS",className:o.focusedIcon,icon:r&&u.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(p.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(c.Typography,{variant:"body2"},f)))}));var y=r(87918),v=r.n(y),h=r(22983),E=r(19592),w=r(88611),x=r(40625),O=r(85209),k=r(8818),C=r(51229),T=r(71543),S=r(13896),I=r(42484),j=r(61305);const A=(0,b.Z)({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5,marginRight:8},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),Z=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:g,disableDelete:f,onDelete:y,onEdit:Z}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:R}=(0,l.BF)(t),V=o?"#FFF":d?P:"#CACCD1",{isDimmed:M,highlightCrosswalk:z,removeHighlight:L}=(0,l.pu)(t),[W]=(0,l.RT)(),U=A({color:V,isOpaque:!M,isFocused:R}),[B,F]=(0,n.useState)(!1),[H,Y]=(0,n.useState)(!1),_=(0,s.useSelector)(m.ZP.selectors.getMetadata),G=(0,i.tH7)(_,t.type),q=(0,i.nIW)(t.uri),X=(0,i.x_)(t),[,$,Q]=(0,S.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!X}),J=!X&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{Q((0,I.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;b&&W&&(0,i.aFF)(W,t)&&W!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[W]),a().createElement("div",{className:U.root,ref:N},a().createElement(k.k,{size:"XXS",className:U.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:U.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:U.header,color:V,variant:X?"outlined":"filled",onMouseEnter:()=>z(),onMouseLeave:()=>L()},r&&a().createElement(T.Z,{className:U.dependentIcon}),a().createElement(E.Z,{onClick:()=>F((e=>!e)),expanded:B}),a().createElement(p.Z,{className:U.sourceIcon,sourceType:t.type}),a().createElement(w.C,{value:G},a().createElement(c.Typography,{variant:"body2",noWrap:!0},G)),a().createElement(C.Z,null),a().createElement(w.C,{value:t.value},a().createElement(c.Typography,{variant:"body2",className:U.labelValue,noWrap:!0},t.value))),B&&a().createElement("div",{className:U.attributesWrapper},J&&a().createElement("div",{className:U.deleteCrosswalkButton},a().createElement(k.k,{icon:h.Z,disabled:f,onClick:()=>Y(!0),size:"XS",tooltipTitle:f?v().text("You don't have permissions to delete"):v().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(O.Z,{open:H,onConfirm:()=>{R&&D(),y(q)},onClose:()=>Y(!1)})),a().createElement(j.Z,{crosswalk:t,canEditAttribute:!g,onEditAttribute:(e,t)=>{Z({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:q,attributeName:e})}}))))})),N=(0,b.Z)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(c.Link,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?v().text("View dependent crosswalks"):v().text("Hide dependent crosswalks")))},D=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:g}=e;const y=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>y.some((0,i.aFF)(e))))&&g()}),[y]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(f,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>g()}))}},39417:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(17440),l=r(56306),o=r(31276);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},85965:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(56306),l=r(17440),o=r(31276);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),g=(0,n.useRef)([]),f=(0,n.useRef)(null),y=(0,n.useCallback)((()=>{f.current=null}),[]),[v,h]=(0,n.useState)(c),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:E(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.HQx,E)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&f.current){const{ownerType:t}=f.current,r=Object.keys(e[t]),n=Object.keys(m[t]);h((0,l.difference)(r,n))}else h(c);y(),d(t),b(e),g.current=[]}),[t]);const w=(0,n.useCallback)((0,l.pipe)(u,y),[u,y]),{deleteAttribute:x,ignoreAttribute:O,pinAttribute:k,createAttribute:C,updateAttribute:T}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:w}),S=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;b((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c)}),[]),I=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),b((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):x(e)}),[x]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});C({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),f.current=n}}else T(e)}),[C,T,p]);return{modifiedEntity:p,crosswalksMap:m,onAddAttribute:S,onDeleteAttribute:I,onPinAttribute:k,onIgnoreAttribute:O,onEditAttribute:j,newlyCreatedAttributes:v}}},77243:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},90186:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(56306),a=r(17440),l=r(77243);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},63149:(e,t,r)=>{r.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var n=r(24328),a=r.n(n),l=r(56306),o=r(17440),i=r(31276);const s=(0,n.createContext)(null),c=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children"]);return a().createElement(s.Provider,{value:r},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(l.uKF,l.CJp)}=(0,n.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,n.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:r=i.ZT}=(0,n.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(l.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,n.useCallback)((()=>r(e,!0)),[e,r]),removeHighlight:(0,n.useCallback)((()=>r(e,!1)),[e,r])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:r=[]}=(0,n.useContext)(s)||{};return{isFocused:!!e&&r.some((0,o.eqBy)(l.uKF,e)),toggleCrosswalkFocus:(0,n.useCallback)((()=>t(e)),[e,t])}}},66095:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(56306);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
|
package/621.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[621],{10159:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),l=n.n(r),i=n(94079);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const o=e=>l().createElement("svg",a({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),l().createElement("mask",{id:"AttributesList_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},l().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),l().createElement("g",{mask:"url(#AttributesList_svg__a)"},l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#AttributesList_svg__b)"}),l().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#AttributesList_svg__c)"}),l().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"}),l().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"}),l().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"}),l().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"}),l().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"}),l().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"}),l().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"}),l().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"}),l().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"}),l().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"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),l().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"}),l().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"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2v40.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),l().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),l().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"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zm90 0a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),l().createElement("defs",null,l().createElement("linearGradient",{id:"AttributesList_svg__b",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),l().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),l().createElement("linearGradient",{id:"AttributesList_svg__c",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopOpacity:.01}),l().createElement("stop",{offset:1})))),s=(0,n(79692).Z)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box",padding:"40px"},logo:{width:"190px",height:"190px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:400,marginTop:"24px"},text:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"23px",textAlign:"center"},secondaryText:{color:e.palette.text.primary,fontSize:"14px",fontWeight:"normal",lineHeight:"16px",letterSpacing:"0.24px",textAlign:"center",paddingTop:"8px"}}))),c=e=>{let{IconRenderer:t=o,text:n,secondaryText:r}=e;const a=s();return l().createElement("div",{className:a.root},l().createElement(t,{className:a.logo}),l().createElement("div",{className:a.textBox},l().createElement(i.Typography,{className:a.text},n),r&&l().createElement(i.Typography,{className:a.secondaryText},r)))}},91515:(e,t,n)=>{n.d(t,{Z:()=>ee});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(94079),s=n(17440),c=n(51229),u=n(36444),d=n(22385),p=n(48465),m=n(85451),f=n(27815),E=n(71153),h=n.n(E),y=n(31517),v=n(67885);const g=[v.K.WITHIN,v.K.AGO,v.K.BETWEEN],b=e=>({[v.K.WITHIN]:a().text("Within the last"),[v.K.AGO]:a().text("More than"),[v.K.BETWEEN]:a().text("Date range")}[e]||"");var x=n(39621),T=n(20562),I=n(51843),N=n(79692);const w=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),O=[null,null],C=[null,"hours"],S=e=>{let{value:t,onChange:n,className:i}=e;const s=w(),c=e=>e===v.K.WITHIN||e===v.K.AGO,u=e=>e===v.K.BETWEEN,d=u(null==t?void 0:t.type)?t.period:O,p=c(null==t?void 0:t.type)?t.period:C,[m,f]=(0,r.useState)(d),[E,N]=(0,r.useState)(p),S=(null==t?void 0:t.type)||v.K.WITHIN,R=e=>c(e)?E:u(e)?m:void 0,D=e=>{n({type:S,period:e})};return(0,T.D)((()=>{t?c(t.type)?N(t.period):u(t.type)&&f(t.period):(f(O),N(C))}),[t]),l().createElement("div",{className:h()(s.root,i)},l().createElement(o.Typography,{className:s.title,variant:"subtitle1"},a().text("Date")),l().createElement("div",{className:s.intervalContainer},l().createElement(y.Z,{label:"",className:s.typeInput,value:{value:S,label:b(S)},options:g.map((e=>({value:e,label:b(e)}))),onChange:e=>{let{value:r}=e;(null==t?void 0:t.type)!==r&&n({period:R(r),type:r})}}),c(S)?l().createElement(x.Z,{interval:E,onChange:D}):l().createElement(I.Z,{values:m,onChange:D})))};var R=n(92575),D=n(96808),M=n(65942);const _=[M.M.UPDATE,M.M.MERGE,M.M.UNMERGE];function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){L(e,t,n[t])}))}return e}function L(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={input:e=>k({},e,{fontSize:"14px"}),menuPortal:e=>k({},e,{zIndex:1300})},P=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},valueContainer:{overflowY:"auto",height:44},option:{fontSize:"14px",height:"32px"}}),H=e=>{let{selectedHistoryActivityTypes:t,onChange:n,className:r}=e;const i=P(),c=e=>{return{value:e,label:(t=e,{[M.M.UPDATE]:a().text("Update"),[M.M.MERGE]:a().text("Merge"),[M.M.UNMERGE]:a().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),d=u(_);return l().createElement("div",{className:h()(i.root,r)},l().createElement(o.Typography,{className:i.title,variant:"subtitle1"},a().text("Activity")),l().createElement(R.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),options:d,TextFieldProps:{classes:{root:i.dropDownInput}},components:{DropdownIndicator:D.Z},styles:A,classes:i,menuPlacement:"bottom",menuPortalTarget:document.body}))};var G=n(85890);const j=(0,N.Z)({popup:{width:500,minHeight:500,overflowY:"hidden",display:"flex",flexDirection:"column"},filterContainer:{padding:20,height:410,display:"flex",flexDirection:"column"},filterContainerScrollable:{overflowY:"auto"},filterItem:{marginTop:15},filterControls:{display:"flex",padding:"10px 12px",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){U(e,t,n[t])}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B=e=>{let{className:t,filter:n,onApplyFilter:i,entityType:c}=e;const E=j(),h=(0,r.useRef)(),[y,v]=(0,r.useState)(!1),[g,b]=(0,r.useState)(n),{activities:x=[],attributes:T=[],dateRange:I=null,users:N=[]}=g||{},w=(0,G.FE)(n)?"inherit":"primary";(0,r.useEffect)((()=>{y&&b(n)}),[n,y]);const O=(0,s.curry)(((e,t)=>{b((n=>F({},n,{[e]:t})))})),C=(0,r.useCallback)((()=>{v((e=>!e))}),[]),R=(0,r.useCallback)((()=>{I&&(0,p.R)(I)?i(g):i((0,s.dissoc)("dateRange",g)),C()}),[g,I,i,C]),D=(0,r.useCallback)((()=>{b(F({},G.tO))}),[]);return l().createElement(l().Fragment,null,l().createElement(d.Z,{ref:h,color:w,icon:u.Z,size:"L",onClick:C,className:t}),l().createElement(o.Popover,{classes:{paper:E.popup},open:y,anchorEl:h.current,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l().createElement("div",{className:E.filterContainer},l().createElement(o.Typography,{variant:"h6"},a().text("Filter")),l().createElement("div",{className:E.filterContainerScrollable},l().createElement(S,{value:I,onChange:O("dateRange"),className:E.filterItem}),l().createElement(m.Z,{selectedUsers:N,onChange:O("users"),className:E.filterItem}),l().createElement(H,{selectedHistoryActivityTypes:x,onChange:O("activities"),className:E.filterItem}),l().createElement(f.Z,{selectedAttributes:T,entityType:c,onChange:O("attributes"),className:E.filterItem,title:a().text("Attribute updated")}))),l().createElement("div",{className:E.filterControls},l().createElement(o.Button,{onClick:D,className:E.clearButton},a().text("Clear all")),l().createElement(o.Button,{onClick:C},a().text("Cancel")),l().createElement(o.Button,{color:"primary",onClick:R},a().text("Apply")))))};var Z=n(52730),z=n(43054),$=n(59431),K=n(55847),W=n(98281),Y=n(31276);const V=(0,N.Z)({menuItem:{minHeight:"32px"},menuText:{fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"30px"},checkIcon:{position:"absolute",color:"rgba(0, 0, 0, 0.54)"}}),q=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=Y.ZT}=e;const i=V(),{text:a,selected:s,onClick:c}=n;return l().createElement(o.MenuItem,{classes:{root:i.menuItem},onClick:e=>{r(),c(e)},ref:t},s&&l().createElement(W.Z,{className:i.checkIcon}),l().createElement(o.Typography,{classes:{root:i.menuText}},a))}));q.displayName="MenuItemRenderer";const X=q,J=()=>{const e=(0,Z.useSelector)($.ZP.selectors.getHistoryMode),t=(0,Z.useDispatch)(),n=e=>{t($.N5.history.actions.setHistoryMode(e))},r=[{text:a().text("Compare to Current view"),selected:e===$.Z9.Current,onClick:()=>n($.Z9.Current)},{text:a().text("Compare to Previous view"),selected:e===$.Z9.Previous,onClick:()=>n($.Z9.Previous)}];return l().createElement(K.Z,{MenuItemRenderer:X,buttonComponent:d.Z,buttonProps:{icon:z.Z,size:"L"},menuId:"history-menu",menuItems:r})},Q=(0,N.Z)({root:{display:"flex",flex:1,alignItems:"center"},icon:{margin:4},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"3px 19px"},count:{fontSize:14},filterButton:{marginRight:"-4px"}}),ee=e=>{let{total:t,entityType:n,filter:r,onApplyFilter:i}=e;const u=Q();return l().createElement("div",{className:u.root},l().createElement(o.Typography,{variant:"h6"},a().text("History")),!(0,s.isNil)(t)&&l().createElement(l().Fragment,null,l().createElement(o.Divider,{orientation:"vertical",flexItem:!0,className:u.divider}),l().createElement(o.Typography,{variant:"body1",color:"textSecondary",className:u.count},1===t?a().text("${count} contributing profile",{count:t}):a().text("${count} contributing profiles",{count:t}))),l().createElement(c.Z,null),l().createElement(B,{className:u.filterButton,entityType:n,filter:r,onApplyFilter:i}),l().createElement(J,null))}},6674:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(10159);const s=()=>l().createElement(o.Z,{text:a().text("History in the making"),secondaryText:a().text("When you create an event or perform an activity, it will show up here.")})},54362:(e,t,n)=>{n.d(t,{Z:()=>G});var r=n(24328),l=n.n(r),i=n(52730),a=n(44443),o=n(87918),s=n.n(o),c=n(17440),u=n(71153),d=n.n(u),p=n(56306),m=n(59431),f=n(94079),E=n(34606),h=n(79692);const y=(0,h.Z)((()=>({historyRow:{position:"relative",padding:"8px 12px 16px",cursor:"pointer"},selected:{background:"rgba(0,0,0,0.05)","&:before":{content:'""',background:"rgba(0,0,0,0.05)",width:"100%",height:"100%",position:"absolute",left:"-100%",top:0}},rowHeader:{display:"flex",position:"relative"},badge:e=>{let{color:t}=e;return{position:"absolute",width:"2px",height:"100%",left:"-9px",pointerEvents:"none",background:t,"&:before":{height:"100%",width:"3px",content:'""',left:"-3px",background:t,position:"absolute",opacity:.06}}},title:{color:"rgba(0,0,0,0.87)",fontSize:"13px",letterSpacing:0,lineHeight:"16px",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&.bold":{fontWeight:500}},date:{marginLeft:"auto",color:"rgba(0,0,0,0.54)",fontSize:"11px",letterSpacing:0,lineHeight:"16px"},user:{color:"rgba(0,0,0,0.38)",fontSize:"12px",letterSpacing:0,lineHeight:"14px"}}))),v=e=>{let{change:t,isCurrent:n,isSelected:r,onClick:i}=e;const{uri:a,type:o,matchGroups:c,user:u,timestamp:m}=t,h=(0,p.GtP)(a),v=y({color:h});return l().createElement("div",{className:d()(v.historyRow,{[v.selected]:r}),onClick:i},l().createElement("div",{className:v.rowHeader},l().createElement("div",{className:v.badge}),l().createElement(f.Typography,{className:d()(v.title,{bold:n})},n?s().text("Current view"):(0,E.Xr)(o)),!n&&l().createElement(f.Typography,{className:v.date},s().date(m,"L LT"))),c&&l().createElement(f.Typography,{className:v.title},s().text("Match rule:")," ",c.join(", ")),l().createElement(f.Typography,{className:v.user},u))};var g=n(55912);const b=e=>e===g.b.FAKE_FILTERED_INCOMING||e===g.b.FAKE_FILTERED_OUTGOING,x=e=>{let{x:t,y:n,toX:r,toY:i,color:a,isDashed:o}=e;const s=((e,t,n,r)=>{const l=t>r,i=e<n,a=l?-6:6;return`M${e} ${t} L${i?n-12:n+12} ${t} ${i?`c 6 0 12 ${a} 12`:`c -6 0 -12 ${a} -12`} ${l?-12:12} L${n} ${r}`})(t,n,r,i);return l().createElement("path",{d:s,stroke:a,strokeWidth:2,fill:"none",strokeDasharray:o?"3,3":void 0})};function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}const I=(0,r.forwardRef)(((e,t)=>{let{x:n,y:r,color:i,isDashed:a,isCollapsed:o,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const d=s?6:3;return l().createElement("g",T({},u,{ref:t}),c&&l().createElement("rect",{id:"line",x:n-d-4,y:r-d-4,width:2*d+8,height:2,fill:i}),l().createElement("circle",{cx:n,cy:r,r:d,fill:a?"#fff":i,stroke:i,strokeDasharray:a?"1,1":void 0,strokeWidth:2}),s&&l().createElement("g",{id:"icon"},l().createElement("rect",{x:n-4,y:r-1,width:8,height:2,fill:"#fff"}),o&&l().createElement("rect",{x:n-1,y:r-4,width:2,height:8,fill:"#fff"})))}));const N=(0,n(83348).Z)(I),w=(0,r.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:n}=e;const{historyLanes:r,rows:i}=t,a=[16],{links:o,rowLines:s,circles:c}=i.reduce(((e,t,o)=>{let{uri:s,height:c,uris:u,type:d,fakeType:m,index:f,timestamp:E,label:h}=t;const y=16*r[s].index+24,v=a[o];a.push(v+c);const T=b(m),I=T?u[0]:s,w=!(null!=u&&u.some((e=>r[e])));e.circles.push(l().createElement(N,{tooltipTitle:h,tooltipPlacement:"top",onMouseOver:n?()=>n(s,E,f):void 0,key:`circle-${I}-${o}`,x:y,y:v,color:(0,p.GtP)(I),isDashed:T,isCollapsed:w,showCollapseIcon:!!u,showLine:m===g.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(l().createElement("rect",{key:`${I}-${f}`,x:y,y:v-8,width:"100%",height:16,fill:(0,p.GtP)(I),opacity:.06}));const O=d===g.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const n=r[t];if(!n)return;const a=i[o].height,s=16*n.index+24,c=O?v-a:v+a;y!==s&&e.links.push(l().createElement(x,{key:`link-${t}-${f}`,x:y,y:v,toX:s,toY:c,isDashed:b(m),color:(0,p.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(r).length+24,d=a[a.length-1]-16;return Object.entries(r).forEach((e=>{let[t,n]=e;const r=16*n.index+24;n.lifeTime.forEach(((e,s)=>{var u;let{start:d,end:m}=e;if((null===(u=i[null==m?void 0:m.index])||void 0===u?void 0:u.type)===g.b.ENTITIES_SPLITTED)return;const f=(null==d?void 0:d.type)===g.b.ENTITIES_SPLITTED?(null==d?void 0:d.index)-1:null==d?void 0:d.index,E=(null==m?void 0:m.type)===g.b.ENTITIES_MERGED_MANUALLY||(null==m?void 0:m.type)===g.b.ENTITIES_MERGED?(null==m?void 0:m.index)+1:null==m?void 0:m.index,h=a[f]||a[a.length-2],y=a[E]||16;if(h<=y)return;const v=(0,p.GtP)(t);!m&&n.index>0&&c.push(l().createElement(I,{key:`initCircle-${t}-${s}`,x:r,y,color:v,showLine:!0})),o.unshift(l().createElement("path",{key:`line-${t}-${s}`,d:`M${r} ${h} L${r} ${y}`,stroke:v,strokeWidth:2}))}))})),l().createElement("svg",{className:"chart",width:u,height:d},l().createElement("g",{id:"rowLines"},s),l().createElement("g",{id:"links"},o),l().createElement("g",{id:"circles"},c))}));var O=n(99136);const C=(0,h.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",overflowY:"hidden"},history:{minWidth:344},buttonContainer:{gridColumnStart:1,gridColumnEnd:3,padding:"8px 16px"},shadow:{boxShadow:"inset -8px 0px 5px -5px rgba(0,0,0,0.1)"}});function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=e=>{let{historyData:t,isLoading:n,canLoadMore:o,onLoadMore:u,entityUri:E,historyEvent:h,findPreviousChange:y}=e;const g=C(),b=(0,i.useDispatch)(),x=(0,i.useSelector)(m.ZP.selectors.getIsEditableMode),T=(0,i.useSelector)(m.ZP.selectors.getMetadata),[I,N]=(0,r.useState)({historyLanes:{},rows:[]}),[R,D]=(0,r.useState)(!1),[M,_]=(0,r.useState)(-1);(0,r.useEffect)((()=>{if((0,c.isNil)(h))return void _(0);const e=e=>(null==e?void 0:e.uri)===((null==h?void 0:h.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==h?void 0:h.aStamp),n=-1!==M?t.rows[M]:null,r=t.rows.findIndex((t=>e(t)));_(e(n)?M:r)}),[t.rows,h]);const k=(0,r.useRef)(null),L=(0,r.useCallback)((e=>{if(!(0,c.isNil)(e)){var n;const r=null===(n=t.rows)||void 0===n?void 0:n.map(((t,n)=>{var r;return S({},t,{height:null===(r=e.childNodes[n])||void 0===r?void 0:r.clientHeight})}));N({historyLanes:t.historyLanes,rows:r})}}),[t]),A=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=(null==k?void 0:k.current)||{};D(n<e-t)};return l().createElement("div",{className:g.historyTree},n&&l().createElement(O.Z,null),l().createElement("div",{className:d()(g.graph,{[g.shadow]:R}),onScroll:A,ref:k},l().createElement(w,{onHistoryCircleMouseOver:(e,t,n)=>{if((0,c.isNil)(I.rows[n].label)){const r={time:t,select:"crosswalks"};(0,p.HvW)(e,r).then((e=>{let{crosswalks:t}=e;const r=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,p.s5)(T,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");N((e=>S({},e,{rows:e.rows.map((e=>e.index===n?S({},e,{label:r}):e))})))}))}},graphData:I}),l().createElement(a.Z,{handleWidth:!0,onResize:A})),l().createElement("div",{ref:L,className:g.history},t.rows.map(((e,t)=>{const n=t===M,r=0===t;return l().createElement(v,{key:`row-${t}`,change:e,isCurrent:r,isSelected:n,onClick:()=>((e,t,n,r)=>{if(x){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;b(m.N5.mode.actions.modeUpdated(p.ARY.Viewing))}if(r&&!n||!r&&n)b(m.N5.history.actions.clearHistoryEvent()),_(0);else if(!r&&!n){const n=y(e-1,t.uri||E),r=y(e,t.uri||E),l=null==n?void 0:n.timestamp,i=null==r?void 0:r.timestamp,a=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;b(m.N5.history.actions.setHistoryEvent({aStamp:l,bStamp:i,overrideUri:a})),_(e)}})(t,e,n,r)})}))),o&&l().createElement("div",{className:g.buttonContainer},l().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},M=(0,h.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),_=(0,h.Z)({icon:e=>{let{color:t}=e;return{boxSizing:"border-box",borderWidth:2,borderStyle:"solid",borderColor:t,height:12,width:12,borderRadius:30,transition:"opacity 0.3s",margin:4}},active:e=>{let{color:t}=e;return{backgroundColor:t}},inactive:{backgroundColor:"white"},clickable:{cursor:"pointer"}}),k=e=>{let{value:t,isSelected:n=!0,onClick:r}=e;const i=(0,p.GtP)(t),a=_({color:i});return l().createElement("div",{className:d()(a.icon,{[a.inactive]:!n,[a.active]:n,[a.clickable]:!!r}),onClick:r})},L=e=>{let{values:t,selectedValues:n,entityUri:r,onSelectValues:i,className:a}=e;const o=M();return l().createElement("div",{className:d()(o.root,a)},l().createElement(k,{value:r}),(null==t?void 0:t.length)>0&&t.map((e=>l().createElement(k,{key:e,value:e,isSelected:null==n?void 0:n.includes(e),onClick:()=>(e=>{null!=n&&n.includes(e)?i((0,c.without)([e],n)):i([...n||[],e])})(e)}))))};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 P=(e,t)=>e.reduce(((e,n,r)=>{let{start:l,end:i}=n;if(l){const n=t-l.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(n)&&n>0)&&(e.startIndex=r,e.startDistance=n)}if(i){const n=t-i.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(n)&&n<0)&&(e.endIndex=r,e.endDistance=n)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),H=(0,h.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),G=(0,r.memo)((e=>{let{isLoading:t,historyWithTotal:n,contributorsUris:i,entityUri:a,canLoadMore:o,onLoadMore:s,historyEvent:u}=e;const d=H(),[p,m]=(0,r.useState)(null);(0,r.useEffect)((()=>{m(i)}),[i]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:n,selectedUris:l}=e;return(0,r.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},r=[{user:"",timestamp:0,uri:t}],i=(0,c.curry)(((e,n,r)=>{const l=r.uri||t;if(e)if(Array.isArray(e)){if(r.type!==g.b.ENTITY_LOST_MERGE)return null;if(e.includes(l))return r;if(n&&r.uris)return e.some((e=>r.uris.includes(e)))?r:null}else{var i;if(l===e||n&&null!==(i=r.uris)&&void 0!==i&&i.includes(e))return r}return null})),a=(e,t,r)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(i(t,r)))(n),o=t=>(e[t]||l&&!l.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const n=e[e.length-1];!n||n.start&&(n.start.type!==g.b.ENTITY_CREATED||t.type!==g.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):n.start=t},u=(e,t)=>{let n=!0;if(e.length){const r=e[e.length-1];n=!((!r.start||r.start.timestamp<t.timestamp)&&(!r.end||r.end.timestamp>t.timestamp))}n&&e.push({start:null,end:null})},d=(e,t)=>{if(e.length){const n=e[e.length-1];n.start||(n.start=t)}e.push({start:null,end:t})},p=[];return null==n||n.forEach(((n,l)=>{var i;switch(n.type){case g.b.ENTITIES_SPLITTED:if(!a(l,n.uri||t,!1))return;{const e=n.uri,t=n.uris?[n.uris,e]:[e],r=a(l,t,!0);if(r&&(!e||e===r.uri))return}break;case g.b.ENTITY_LOST_MERGE:case g.b.RELATIONSHIP_CREATED:case g.b.RELATIONSHIP_REMOVED:case g.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(i=n.uris)||void 0===i||i.forEach((e=>{o(e)||(c=!0)}));const m=o(n.uri||t);if(!m)return;const f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){A(e,t,n[t])}))}return e}({},n);((t,n)=>{var l,i;switch(n.type){case g.b.ENTITY_CREATED:s(t,n);break;case g.b.ENTITIES_MERGED_ON_THE_FLY:case g.b.ENTITY_CHANGED:u(t,n);break;case g.b.ENTITY_LOST_MERGE:case g.b.ENTITY_REMOVED:d(t,n);break;case g.b.ENTITIES_SPLITTED:u(t,n),null===(l=n.uris)||void 0===l||l.forEach((t=>{const l=e[t];if(!l)return;const i=l.lifeTime.length;i?s(l.lifeTime,n):d(l.lifeTime,n),r.push({uri:t,user:n.user,type:n.type,fakeType:i?g.b.FAKE_UPDATE:g.b.FAKE_NAVIGATE_PROFILE,timestamp:n.timestamp})}));break;case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:u(t,n),null===(i=n.uris)||void 0===i||i.forEach((t=>{const r=e[t];r&&d(r.lifeTime,n)}))}})(m.lifeTime,f),c&&p.push(f),r.push(f)})),p.forEach((t=>{t.uris.forEach((l=>{e[l]||n.forEach((n=>{let{uri:i,uris:a,timestamp:o,user:s,type:u}=n;i===l&&(null==a||a.forEach((n=>{const l=e[n];if(!l)return;let i=null;switch(u){case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:i=g.b.FAKE_FILTERED_INCOMING;break;case g.b.ENTITIES_SPLITTED:i=g.b.FAKE_FILTERED_OUTGOING;break;default:return}const a={fakeType:i,uri:t.uri,uris:[n],type:u,user:s,timestamp:o},d=P(l.lifeTime,t.timestamp);i===g.b.FAKE_FILTERED_INCOMING?(0,c.isNil)(d.endIndex)||(l.lifeTime[d.endIndex].end=a):(0,c.isNil)(d.startIndex)||(l.lifeTime[d.startIndex].start=a),r.splice(r.indexOf(t),0,a)})))}))}))})),r.forEach(((e,n)=>{e.index=n,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:r},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(i(t,!1)))(r)}}),[t,n,l])})({entityUri:a,historyChanges:null==n?void 0:n.changes,selectedUris:p});return l().createElement("div",{className:d.root},l().createElement(L,{values:i,selectedValues:p,onSelectValues:m,entityUri:a,className:d.borderBottom}),l().createElement(D,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:o,entityUri:a,historyEvent:u,findPreviousChange:E}))}))},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),l=n.n(r),i=n(52730),a=n(59431),o=n(94079),s=n(17440),c=n(87918),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,i.useSelector)(a.ZP.selectors.getHistoryEvent),n=(0,i.useDispatch)(),r=(0,s.pipe)(a.N5.history.actions.clearHistoryEvent,n);return t?l().createElement("div",{className:e.root},l().createElement(o.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",l().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),l().createElement(o.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},85890:(e,t,n)=>{n.d(t,{tO:()=>d,FE:()=>p,k6:()=>m});var r=n(24328),l=n(56306),i=n(17440),a=n(65942),o=n(48465),s=n(67218);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={activities:[a.M.MERGE,a.M.UNMERGE,a.M.UPDATE]},p=e=>(0,i.pipe)((0,i.evolve)({activities:(0,i.difference)(d.activities)}),(0,i.reject)((0,i.either)(i.isNil,i.isEmpty)),i.isEmpty)(e||{}),m=e=>{let{entity:t,enabled:n}=e;const[i,a]=(0,r.useState)(d),[u,p]=(0,r.useState)(0),m=(0,r.useMemo)((()=>(0,o.Z)(i)),[i]),[f,E]=(0,r.useState)(null),[h,y]=(0,r.useState)(null),[v,g]=(0,r.useState)(!1),b=(0,s._)(),x=null==t?void 0:t.uri,T={max:32,order:"desc"},I=(0,l.O27)(null==i?void 0:i.attributes)||void 0;(0,r.useEffect)((()=>{x&&n&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I},T))).then(y).catch((e=>{console.warn("Failed to load history data",e),y(null)})).finally((()=>{g(!1)})))}),[m,I,f]),(0,r.useEffect)((()=>{x&&n&&(g(!0),b((0,l.wdF)({entityUri:x})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{g(!1)})),p(0))}),[x,null==t?void 0:t.updatedTime,n]);const N=(0,r.useCallback)((e=>{x&&f&&n&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I,offset:e},T))).then((e=>{y((t=>c({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{g(!1)})))}),[f,m,n]),w=(0,r.useMemo)((()=>32*(u+1)<(null==h?void 0:h.total)),[h,u]),O=(0,r.useCallback)((e=>{p(0),a(e)}),[]),C=(0,r.useCallback)((()=>{O(c({},d))}),[]),S=(0,r.useCallback)((()=>{w&&(N(32*(u+1)),p(u+1))}),[N,u,w]);return{isLoading:v,canLoadMore:w,onLoadMore:S,onApplyFilter:O,onClearFilter:C,historicUris:f,historyWithTotal:h,historyFilter:i}}},71820:(e,t,n)=>{n.d(t,{C:()=>i});var r=n(24328),l=n(56306);const i=e=>{let{isHistoryTabActive:t,entity:n}=e;const[i,a]=(0,r.useState)(!1),o=null==n?void 0:n.uri;(0,r.useEffect)((()=>{t||a(!1)}),[o]),(0,r.useEffect)((()=>{t&&a(!0)}),[t]);const s=o&&!(0,l.ZiX)(o)&&!(0,l.biM)(n);return{isHistoryEnabled:i&&s,isProfilePersisted:s}}},57730:(e,t,n)=>{n.d(t,{a:()=>s});var r=n(24328),l=n(52730),i=n(59431),a=n(56306),o=n(67218);const s=e=>{let{entity:t,historyEvent:n}=e;const[s,c]=(0,r.useState)(!1),u=(0,l.useSelector)(i.ZP.selectors.getHistorySlice),d=(0,l.useDispatch)(),p=(0,o._)(),{aStamp:m,bStamp:f,overrideUri:E}=n||{},h=E||(null==t?void 0:t.uri);return(0,r.useEffect)((()=>{n&&h&&(c(!0),p(Promise.all([(0,a.lrH)(h,m),f&&1!==f?(0,a.lrH)(h,f):Promise.resolve(null)])).then((e=>{let[t,n]=e;d(i.N5.history.actions.setHistorySlice({aEntity:t,bEntity:n}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[m,f,h]),{isLoading:s,historySlice:u}}},55912:(e,t,n)=>{n.d(t,{b:()=>a});var r,l=n(31537);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}!function(e){e.FAKE_NAVIGATE_PROFILE="FAKE_NAVIGATE_PROFILE",e.FAKE_FILTERED_INCOMING="FAKE_FILTERED_INCOMING",e.FAKE_FILTERED_OUTGOING="FAKE_FILTERED_OUTGOING",e.FAKE_UPDATE="FAKE_UPDATE"}(r||(r={}));const a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},l.I,r)},65942:(e,t,n)=>{let r;n.d(t,{M:()=>r}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(r||(r={}))},48465:(e,t,n)=>{n.d(t,{Z:()=>f,R:()=>E});var r=n(95038),l=n.n(r),i=n(17440),a=n(56306),o=n(65942),s=n(31537),c=n(67885);const u=e=>(0,i.pipe)((0,i.map)(e),(0,i.join)(" or ")),d=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},p=(0,i.chain)((0,i.cond)([[(0,i.equals)(o.M.MERGE),()=>[s.I.ENTITIES_MERGED,s.I.ENTITIES_MERGED_MANUALLY,s.I.ENTITIES_MERGED_ON_THE_FLY]],[(0,i.equals)(o.M.UNMERGE),()=>[s.I.ENTITIES_SPLITTED]],[(0,i.equals)(o.M.UPDATE),()=>[s.I.ENTITY_CHANGED]]])),m=(0,i.pipe)((0,i.defaultTo)([]),p,(0,i.concat)([s.I.ENTITY_CREATED,s.I.ENTITY_REMOVED,s.I.ENTITY_LOST_MERGE]),u((e=>`equals(type, '${e}')`))),f=(0,i.pipe)((0,i.defaultTo)({}),(0,i.reject)(a.O27),(0,i.evolve)({users:u((e=>`equals(user, '${(0,a.HRH)(e)}')`)),attributes:u((e=>`changes(${(0,a.HRH)(e.value)})`)),dateRange:e=>{let{type:t,period:n}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${d(n)})`;case c.K.AGO:return`lte(timestamp, ${d(n)})`;case c.K.BETWEEN:{const[e,t]=n;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${l()(t).endOf("date").valueOf()})`}default:return""}}}),(0,i.over)((0,i.lensProp)("activities"),m),i.values,(0,i.reject)(a.O27),(0,i.append)("not equals(user, 'collaboration-service')"),(0,i.map)((e=>`(${e})`)),(0,i.join)(" and ")),E=e=>{if(e.type===c.K.AGO||e.type===c.K.WITHIN){const[t,n]=e.period;return"Number"===(0,i.type)(t)&&"String"===(0,i.type)(n)&&t>0}if(e.type===c.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}}}]);
|