@reltio/remotes 1.4.1621 → 1.4.1623
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1039.js +1 -1
- package/1146.js +1 -1
- package/1148.js +1 -1
- package/1334.js +1 -1
- package/1425.js +1 -1
- package/1572.js +1 -1
- package/1572.js.map +1 -1
- package/1664.js +1 -1
- package/1707.js +1 -1
- package/1790.js +1 -1
- package/1840.js +1 -1
- package/1925.js +1 -1
- package/1925.js.map +1 -1
- package/2049.js +1 -1
- package/2066.js +1 -1
- package/2066.js.map +1 -1
- package/2201.js +1 -1
- package/2400.js +1 -1
- package/2400.js.map +1 -1
- package/2404.js +1 -1
- package/2404.js.map +1 -1
- package/2463.js +1 -1
- package/2641.js +1 -1
- package/2641.js.map +1 -1
- package/3096.js +1 -1
- package/3348.js +1 -1
- package/3358.js +1 -1
- package/3358.js.map +1 -1
- package/3373.js +1 -1
- package/3381.js +1 -1
- package/3383.js +1 -1
- package/3463.js +1 -1
- package/3469.js +1 -1
- package/3538.js +1 -1
- package/3538.js.map +1 -1
- package/356.js +1 -1
- package/3875.js +1 -1
- package/3902.js +1 -1
- package/3902.js.map +1 -1
- package/3926.js +1 -1
- package/3926.js.map +1 -1
- package/415.js +1 -1
- package/4212.js +1 -1
- package/4390.js +1 -1
- package/4481.js +1 -1
- package/4703.js +1 -1
- package/4780.js +1 -1
- package/4806.js +1 -1
- package/4838.js +1 -1
- package/50.js +1 -1
- package/5034.js +1 -1
- package/5039.js +1 -1
- package/5053.js +1 -1
- package/5108.js +1 -1
- package/5163.js +1 -1
- package/5163.js.map +1 -1
- package/5617.js +1 -1
- package/6020.js +1 -1
- package/6173.js +1 -1
- package/6228.js +1 -1
- package/6280.js +1 -1
- package/6287.js +1 -1
- package/6531.js +1 -1
- package/6606.js +1 -1
- package/6606.js.map +1 -1
- package/6799.js +1 -1
- package/6844.js +1 -1
- package/6853.js +1 -1
- package/6860.js +1 -1
- package/6903.js +1 -1
- package/7340.js +1 -1
- package/735.js +1 -1
- package/7422.js +1 -1
- package/7626.js +1 -1
- package/764.js +1 -1
- package/7896.js +1 -1
- package/8168.js +1 -1
- package/820.js +1 -1
- package/8207.js +1 -1
- package/8322.js +1 -1
- package/8481.js +2 -0
- package/8481.js.map +1 -0
- package/8565.js +1 -1
- package/8741.js +1 -1
- package/9016.js +1 -1
- package/9028.js +1 -1
- package/9028.js.map +1 -1
- package/9283.js +1 -1
- package/9309.js +1 -1
- package/9328.js +1 -1
- package/9387.js +1 -1
- package/9719.js +1 -1
- package/9736.js +1 -1
- package/9861.js +1 -1
- package/987.js +1 -1
- package/99.js +1 -1
- package/9945.js +2 -0
- package/9945.js.map +1 -0
- package/9960.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/3727.js +0 -2
- package/3727.js.map +0 -1
- package/673.js +0 -2
- package/673.js.map +0 -1
package/2066.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a5eb2576-4e62-4629-88e3-97da4ecb3c2c",e._sentryDebugIdIdentifier="sentry-dbid-a5eb2576-4e62-4629-88e3-97da4ecb3c2c")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1622"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2066],{48030:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r(50914),l=r(17512);function o(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}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=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;const[t,r]=(0,n.useState)({}),i=(0,n.useRef)({}),c=(e,t)=>{i.current[e]=t},u=(0,n.useCallback)((0,l.DsO)((()=>{r((e=>{const t=o({},i.current);return(0,a.equals)(e,t)?e:t}))})),[]),p=(0,n.useCallback)((()=>{i.current={}}),[]),d=(0,n.useCallback)((0,a.pipe)(e,(0,a.prop)(a.__,t)),[t]),m=(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(c,u),[e,a.identity])),[]);return{getDynamicRowCellHeight:d,changeRowCellHeight:m,clearHeightsCache:p}}},96253:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(44443),o=r(55962);const i=e=>{let{onChangeHeight:t,children:r}=e,i=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 s=(0,n.useRef)(),{rowValue:c,rowIndex:u,columnData:p,cellIndex:d}=i,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:c}),b=()=>s.current&&m(s.current.clientHeight);return(0,o.D)(b,[c.rawValue]),(0,n.useEffect)((()=>()=>m(void 0)),[]),a().createElement("div",{ref:s},a().createElement(l.Z,{handleHeight:!0,onResize:b}),r)}},94059:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(69089),c=r(79811),u=r(290),p=r(75779);const d=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(s.Z,{open:t},a().createElement(u.Z,null,a().createElement(p.Z,null,o().text("Are you sure you want to delete this?"))),a().createElement(c.Z,null,a().createElement(i.Z,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Z,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},90143:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(23883);const o=(0,r(72342).makeStyles)((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.Z,i({},e,{classes:t,arrow:!0}))}},67275:(e,t,r)=>{r.d(t,{n:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(17512),s=r(79386),c=r(60883),u=r(72316),p=r(1824),d=r(62901),m=r(36852),b=r(75647);const y=(0,r(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,n.memo)((e=>{let{entity:t,className:r,historySlice:l}=e;const f=y(),g=(0,n.useMemo)((()=>(0,i.L5S)(t)),[t]),v=(0,m.C)({objectIds:g}),h=(0,i.wwR)(t);return a().createElement(p.e,{collaboration:v},a().createElement(s.Z,{className:o()(r,d.U),entity:(null==l?void 0:l.aEntity)||t},l?a().createElement(b.Z,null):a().createElement(a().Fragment,null,a().createElement(c.a,{className:f.profileBandNavigation}),a().createElement(u.Z,{className:f.comments,uri:h,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:h}),objectType:i.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},2002:(e,t,r)=>{r.d(t,{Z:()=>oe});var n=r(24328),a=r.n(n),l=r(17512),o=r(35039),i=r(31992),s=r(6163),c=r(29754),u=r(50985),p=r(71153),d=r.n(p),m=r(2507),b=r.n(m),y=r(67586),f=r(98538),g=r(47019),v=r(50914),h=r(51492),E=r(12980),w=r(72342);const x=(0,w.makeStyles)((()=>({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],T=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c,isTemporary:u}=e;const p=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),m=(0,l.PFL)(t),b=(0,E.AG)(r,m),[y,f]=(0,n.useState)(b),w=!(0,v.isNil)(t.defaultValue)&&u,T={className:p.textField,InputProps:{disableUnderline:!0,classes:{root:p.input,multiline:p.inputMultiline}},fullWidth:!0,autoFocus:!0},C=()=>{const e=!(0,v.isNil)(y)&&(0,E.Ho)(t,y);if(!(0,v.isNil)(y)&&!(0,v.equals)(y,b)||w){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===y&&(0,l.FVt)(m.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(g.ZP,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(p.paper,{[p.booleanEditor]:(0,l.T6Y)(m.type),[p.timestampEditor]:(0,l.j5n)(m.type)}),root:p.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(m.type)?"Escape"===e.key&&s():C()},onBackdropClick:C},a().createElement(h.Z,{dataTypeDefinition:m,fieldName:(0,l.Tde)(t.uri),onChange:f,TextFieldProps:T,value:y}))};var C=r(39475),S=r(20888),I=r(53203),Z=r(95341),A=r(79312),j=r(78223),N=r(10918);const P=(0,w.makeStyles)((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"}}))),D=(0,j.Z)(Z.Z),V=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(A.Z,{classes:{root:t.menuText}},n))},R=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=P(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(N.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(D,{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(V,{icon:p,text:i,styles:l}))}));R.displayName="CrosswalkMenuItem";const U=R;var M=r(2996),W=r(23759);function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const z=(0,w.makeStyles)((()=>({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){L(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"}}))),B=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:g,onIgnore:v,onEdit:h,onPin:E,onDelete:w,isEmpty:x}=e;const{isReadingMode:O,isEditingMode:k,isHovered:Z,onMouseEnter:A,onMouseLeave:j,setReadingMode:N,setEditingMode:P}=(0,M.p)(),D=(0,n.useRef)(),V=(0,l.nIW)(i.uri),R=(0,l.x_)(p),L=!o.system&&!R,B=L&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),H=L&&!g&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),Y=(0,l.mqZ)(l.BDP.UPDATE,o)&&!m&&L,_=!F&&(!O&&Y||i.pin),G=!F&&(!O&&Y||i.ignored);(0,n.useEffect)((()=>{F&&!x&&P()}),[x]);const q=(0,W.nX)(p),{isHighlighted:X,isDimmed:$,highlightCrosswalk:Q,removeHighlight:J}=(0,W.pu)(p),K=z({variant:R?"outlined":"filled",opaque:!$,fullyColored:X,color:$?"rgba(0, 0, 0, 0.12)":q}),ee=[{crosswalk:p,color:q},{disabled:!B,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:B?null:b().text("You don't have permissions to edit"),onClick:()=>P(),id:"edit"},{disabled:!H,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:H?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],te=()=>{J(),N()};return a().createElement("div",{ref:D,className:d()(t,K.root),onMouseEnter:()=>{Q(),A()},onMouseLeave:()=>{J(),j()},"data-reltio-id":r},a().createElement("div",{className:K.attributeValue},a().createElement(y.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:K.actions},_&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!Y}),G&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!Y}),Z&&!(0,l.vr_)(o)&&a().createElement(f.Z,{MenuItemRenderer:U,menuId:`simple-attribute-additional-actions-${V}`,buttonComponent:C.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:te,menuItems:ee})),k&&a().createElement(T,{attributeType:o,attributeValue:i,color:q,onClose:te,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:D,isTemporary:F}))};var H=r(13896);const F=(0,w.makeStyles)((()=>({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 Y(){return Y=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},Y.apply(this,arguments)}const _=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s,emptyTempAttributeUris:c}=e,u=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","emptyTempAttributeUris"]);const p=F(),[{isDragItemOver:d},m]=(0,H.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 y=0;return a().createElement("div",{ref:m,className:p.simpleAttributesWrapper,"data-reltio-id":"simple-attributes-wrapper"},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(B,Y({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,isEmpty:c.includes(e.uri),dataReltioId:"value-index-"+y++},u))))})),d&&a().createElement("div",{className:p.dropIndicator},b().text("Drop here")))};var G=r(73149),q=r(38677);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,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(q.Z,{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(G.Z,X({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var Q=r(49402);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)))))};var ee=r(51557);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)}const re=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(ee.Z,te({key:e.uri,attributeValue:e},n)))))},ne=(0,w.makeStyles)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function ae(){return ae=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},ae.apply(this,arguments)}function le(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 oe=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=le(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ne(),[m,b]=(0,n.useState)(c),y=(0,v.propOr)(r.length,"totalValues",s),f=c<y,g=f&&m<y,h=f&&m>=y,E=r.slice(0,m),w=y-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement($,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=le(p,["crosswalksMap"]);return a().createElement(K,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(re,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(_,ae({attributeValues:e,attributeType:t},p))}})(E),g&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<y&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},86966:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(17512),o=r(2996),i=r(79935),s=r(23759),c=r(10918),u=r(90143),p=r(71153),d=r.n(p),m=r(21934);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),o=(0,l.x_)(t),{isDimmed:i,highlightCrosswalk:p,removeHighlight:b}=(0,s.pu)(t),y=(0,m.y)({isOpaque:!i,color:i?"rgba(0, 0, 0, 0.12)":n,isDisabled:o});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{"data-reltio-id":"crosswalk-icon",className:d()(y.crosswalkIcon,r),onMouseEnter:()=>p(),onMouseLeave:()=>b()}))};var y=r(50914),f=r(85777),g=r(2002),v=r(14699),h=r(52239),E=r(72342);const w=(0,E.makeStyles)((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(g.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,y.path)(["paging",e.uri],r)},n))))))};var k=r(53203),T=r(20888),C=r(39475),S=r(6163),I=r(2507),Z=r.n(I);const A=e=>{let{onClick:t}=e;return a().createElement(C.k,{icon:S.Z,tooltipTitle:Z().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var j=r(55962),N=r(38361);const P=(0,E.makeStyles)((()=>({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:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}=e;const x=P(),{isReadingMode:C,onMouseEnter:S,onMouseLeave:I}=(0,o.p)(),Z=!p&&(0,l.Z5t)(l.fO_.EDITING,t),D=!d&&(0,l.Edd)(l.fO_.EDITING,t),V=(0,l.ZiX)(r.uri),R=!V&&(!C&&Z||r.pin),U=!V&&(!C&&Z||r.ignored),M=!C&&D,W=(0,N.Q)(r.uri),[L,z]=(0,n.useState)(W||V);(0,j.D)((()=>{W&&z(W)}),[W]);const B=(0,y.pipe)((0,y.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),y.values,y.flatten,(0,y.uniqBy)((0,y.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:x.root,onMouseEnter:S,onMouseLeave:I},a().createElement(f.Z,{onClick:()=>z((e=>!e)),expanded:L}),a().createElement("span",null,c,B.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:x.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:x.actions},R&&a().createElement(k.Z,{disabled:!Z,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),U&&a().createElement(T.Z,{disabled:!Z,isIgnored:r.ignored,onClick:()=>g({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:!Z,disableDelete:!D,onPin:m,onIgnore:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}))}},51557:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(17512),o=r(26729),i=r(86966);const s=(0,r(72342).makeStyles)((()=>({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))}},73149:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(17512),o=r(86966),i=r(35969);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))}},49402:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(52730),o=r(50673),i=r(17512),s=r(86966),c=r(50914),u=r(35969),p=r(30357),d=r(98074);const m=(0,r(72342).makeStyles)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function b(){return b=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},b.apply(this,arguments)}const y=e=>{let{attributeValue:t,attributeType:r}=e,y=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 f=m(),{generateEntityUrl:g}=(0,n.useContext)(d.v),v=(0,l.useSelector)(o.ZP.selectors.getMetadata),h=(0,l.useSelector)(o.ZP.selectors.getUIPath),E=a().createElement(u.x,null,a().createElement(p.Z,{href:g({uiPath:h,uri:(0,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:f.relationshipLabel},t.relationshipLabel))),w=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(v,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,b({attributeValue:t,attributeType:r,attributeTypesList:w,label:E},y))}},35969:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(79312),o=r(21934);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Z,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},20888:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);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(2507),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})}},53203:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);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(2507),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})}},10918:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(50673),s=r(17512),c=r(52730),u=r(26436),p=r(21210),d=r(71153),m=r.n(d),b=r(23759),y=r(39475),f=r(21934);const g=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:g}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:g}),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(y.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},21934:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(72342);const a=(0,n.makeStyles)({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,isDisabled:n}=e;return{backgroundColor:n?"#fff":t,border:n?`2px solid ${t}`:null,height:"12px",width:"12px",boxSizing:"border-box",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.makeStyles)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},2996:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(17512),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}}},45226:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(17512),a=r(24328),l=r.n(a),o=r(11013),i=r(61347);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,RightSlot:a}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=o;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},o));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},63309:(e,t,r)=>{r.d(t,{Z:()=>_e});var n=r(24328),a=r.n(n),l=r(52730),o=r(71153),i=r.n(o),s=r(2507),c=r.n(s),u=r(50673),p=r(17512),d=r(48030),m=r(87825),b=r(45108),y=r(17998),f=r(72342);const g=(0,f.makeStyles)((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:{position:"relative",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},dragIndicator:{display:"none",position:"absolute",top:"15px",left:0,cursor:"grab"},dragIndicatorIcon:{fill:e.palette.text.secondary,width:"14px",height:"14px"},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}})));function v(){return v=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},v.apply(this,arguments)}const h=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l,someRowIsDragging:o}=e,s=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","someRowIsDragging"]);const c=g(),u=0===n,p=!o||u;return a().createElement("div",{className:i()(c.rowCell,u&&c.coloredCell),"data-reltio-id":`column-name-${l.id}`},p&&a().createElement(a().Fragment,null,t.values.map(((e,t)=>a().createElement(r,v({key:t,value:e,someRowIsDragging:o},s))))))};var E=r(96253);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 x=e=>{let{changeRowCellHeight: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,["changeRowCellHeight"]);return r.isDragLayer?a().createElement(h,w({},r,{someRowIsDragging:!1})):a().createElement(E.Z,w({onChangeHeight:t},r),a().createElement(h,r))};var O=r(50914),k=r(92332);const T=e=>{const t=g();return a().createElement("div",{className:i()(t.headCell,t.coloredCell)},a().createElement(k.default,e),e.children)};var C=r(67283),S=r(30488);const I=(0,f.makeStyles)({root:{marginBottom:"-6px"}}),Z=(0,S.Z)((0,O.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:i}=e;const s=I(),d=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,O.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,O.propEq)("uri",e.uri))),y=(0,O.pipe)((0,O.propOr)([],"attributes"),(0,O.reject)((0,O.either)(p.YkG,p.Or$)),(0,O.filter)((0,O.either)(p.QZu,b)),(0,O.filter)((0,O.both)(p.Uty,(e=>(0,p.Vg3)({attributeType:e,mode:p.fO_.EDITING})))))(m);return a().createElement("div",{className:s.root},a().createElement(C.Z,{label:c().text("Attribute"),popupTitle:c().text("Add attributes"),data:y,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(p.QZu).forEach((e=>{i({attributeType:e,parentUri:r})}))}}))}));var A=r(79935);const j=(0,S.Z)((0,O.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(T,r):a().createElement(T,r,a().createElement(A.Z,null),a().createElement(Z,null))})),N=e=>{let{value:t}=e;const r=g();return a().createElement("div",{className:r.cellValueWrapper},t)};var P=r(2002);const D=(0,f.makeStyles)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function V(){return V=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},V.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=D();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(P.Z,V({attributeValues:t},r)))};var U=r(73149);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 W=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=D(),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(U.Z,M({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var L=r(49402);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 B=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=D(),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(L.Z,z({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var H=r(51557);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 Y=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=D();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(H.Z,F({attributeValue:e},r))))))};function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const G=(0,S.Z)((0,O.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly","emptyTempAttributeUris"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,parentUri:c,readOnly:u}=e;return class{static build(e,t){switch(e){case p.oS0.TYPE_NESTED:return a().createElement(W,t);case p.oS0.TYPE_REFERENCE:return a().createElement(B,t);case p.oS0.TYPE_IMAGE:return a().createElement(Y,t);default:return a().createElement(R,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){_(e,t,r[t])}))}return e}({},t,{parentUri:c,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,disableEdit:u,disableDelete:u}))}));var q=r(89323),X=r(45226),$=r(14699);const Q=e=>{let{value:{values:t,attributeType:r},someRowIsDragging:n,dragRef:l}=e;const o=g();return a().createElement("div",{className:o.cellValueWrapper},a().createElement("div",{ref:l,className:o.dragIndicator},a().createElement(q.Z,{className:o.dragIndicatorIcon})),a().createElement($.Z,{className:o.attributeTitle,label:r.label}),!n&&a().createElement(X.Z,{values:t,attributeType:r,valueContainerClassName:o.ovValue}))},J=e=>{let{value:t}=e;const r=g();return a().createElement("div",{className:i()(r.cellValueWrapper,r.count)},t)};var K=r(87037),ee=r(81774),te=r(35488),re=r(82056),ne=r(47019),ae=r(79312),le=r(92679),oe=r(69208),ie=r(39475),se=r(21210);const ce=e=>{let{sourcesUriOrder:t}=e;const r=g(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(te.ZP,{key:e,className:r.popupItem},a().createElement(se.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(re.Z,{primary:(0,p.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ue=e=>{let{attributeUri:t}=e;const r=g(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),o=(0,p.zeJ)(n,t);return a().createElement(te.ZP,{key:o.uri,className:r.popupItem},a().createElement(re.Z,{primary:(0,p.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},pe=(0,O.cond)([[(0,O.prop)("sourcesUriOrder"),()=>c().text("Source sequence")],[(0,O.prop)("primaryAttributeUri"),()=>c().text("Attribute winner")],[(0,O.prop)("comparisonAttributeUri"),()=>c().text("Comparison attribute")]]),de=(0,O.cond)([[(0,O.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(ce,{sourcesUriOrder:t})}],[(0,O.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ue,{attributeUri:t})}],[(0,O.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ue,{attributeUri:t})}]]),me=e=>{let{info:t}=e;const r=g(),[l,o]=(0,n.useState)(null),i=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(ie.k,{icon:oe.Z,tooltipTitle:c().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(ne.ZP,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(K.Z,{className:r.closeButton,onClick:i,size:"large"},a().createElement(le.default,null)),a().createElement(ae.Z,{variant:"subtitle1",className:r.popupTitle},pe(t))),a().createElement(ee.Z,{component:"div",className:r.popupItemsWrapper},de(t))))},be=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=g(),s=r||n||l;return a().createElement("div",{className:i()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),s&&a().createElement(me,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var ye=r(23759),fe=r(26752);const ge=e=>{let{crosswalk:t}=e;const r=g(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:s}=(0,ye.pu)(t);return a().createElement(fe.Z,{className:r.winnerSourceItem,color:o?"rgba(0, 0, 0, 0.12)":(0,p.CJp)((0,p.uKF)(t)),opacity:o?.38:1,onMouseEnter:()=>i(),onMouseLeave:()=>s()},a().createElement(se.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(re.Z,{primary:(0,p.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},ve=e=>{let{value:{crosswalks:t}}=e;const r=g();return a().createElement(ee.Z,{component:"div"},t.map((e=>a().createElement(te.ZP,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ge,{crosswalk:e})))))},he=[{id:"ovValues",get label(){return c().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return c().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return c().text("Rule type")},initialWidth:200},{id:"count",get label(){return c().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return c().text("Attribute values")},hideable:!1}],Ee=e=>(0,p.OXP)(e)&&!(0,p.ZiX)(e.uri),we=["ovValues","ruleType","values"],xe=e=>{switch(e){case"ovValues":return Q;case"values":return G;case"count":return J;case"ruleType":return be;case"winnerSources":return ve;default:return N}},Oe=(0,O.pipe)(p.cwx,(0,O.sortWith)([(0,O.descend)((0,O.propOr)(-1,"priority"))]),(0,O.map)((0,O.prop)("uri"))),ke=(0,O.curry)(((e,t)=>(0,p.YkG)(e)&&t&&(0,O.pipe)(p.c31,(0,O.find)((r=>r.slice((0,p.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),Te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,O.pipe)((0,O.filter)(Ee),(0,O.chain)((e=>(0,O.pipe)((0,O.pickBy)(((t,r)=>{const n=(0,p.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,p.IM5)(e.value,a);return n&&(!l||Ee(l))})),O.values,O.flatten)(t))),(0,O.uniqBy)((0,O.prop)("uri")))(e)},Ce=(0,O.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?j:T,rowCellValueRenderer:xe(t)}})),Se=(e,t,r,n,a,l,o)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(Ee)};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 p.oS0.TYPE_REFERENCE:case p.oS0.TYPE_NESTED:case p.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+(0,O.pathOr)(0,[t.uri,"length"],r)),0)}}(n.type,l,a);case"ruleType":return((e,t,r,n)=>{var a,l;const o=[...e.entityTypes,...e.relationTypes||[]].find((0,O.propEq)("uri",r)),i=null!==(a=null==o?void 0:o.survivorshipGroups)&&void 0!==a?a:[],s=n&&i.find((0,O.propEq)("uri",n))||i.find((0,O.propEq)("default",!0)),c=null==s||null===(l=s.mapping)||void 0===l?void 0:l.find((0,O.propEq)("attribute",t.uri)),u=(0,p.o_J)(e,null==c?void 0:c.survivorshipStrategy)||(0,p.Xaq)(e),d=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(u)?(0,O.uniq)([...(null==c?void 0:c.sourcesUriOrder)||[],...(null==s?void 0:s.sourcesUriOrder)||[],...Oe(e)]):void 0,m=ke(t),b=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.primaryAttributeUri):void 0,y=(0,p.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.comparisonAttributeUri):void 0;return{ruleType:u,sourcesUriOrder:d,primaryAttributeUri:b,comparisonAttributeUri:y}})(t,n,r,o);case"winnerSources":return{crosswalks:Te(l,a)};default:return null}};var Ie=r(87378),Ze=r(94059),Ae=r(38677),je=r(69089),Ne=r(79811),Pe=r(290),De=r(75779),Ve=r(63297),Re=r(96758),Ue=r(30721),Me=r(73074),We=r(50553),Le=r(79573);const ze=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[i,s]=(0,n.useState)("without");return a().createElement(je.Z,{open:t,TransitionProps:{onEnter:()=>s("without")}},a().createElement(Pe.Z,null,a().createElement(De.Z,null,c().text("You are attempting to change a value that is presently ignored.")),a().createElement(Me.Z,{variant:"standard",component:"fieldset"},a().createElement(We.Z,{component:"legend"},c().text("Please choose an option:")),a().createElement(Re.Z,{value:i,onChange:(0,O.pipe)(Le.NA,s)},a().createElement(Ue.Z,{value:"without",control:a().createElement(Ve.Z,null),label:c().text("Save without Ignore")}),a().createElement(Ue.Z,{value:"with",control:a().createElement(Ve.Z,null),label:c().text("Save and apply Ignore to new value")})))),a().createElement(Ne.Z,null,a().createElement(Ae.Z,{onClick:r,color:"primary"},c().text("Cancel")),a().createElement(Ae.Z,{onClick:()=>{"with"===i?o():l(),r()},color:"primary"},c().text("Ok"))))},Be=(0,f.makeStyles)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row"},tableTitle:{marginRight:"auto"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function He(){return He=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},He.apply(this,arguments)}const Fe=e=>e.ovValues.attributeType.uri,Ye=e=>{let{columnData:{id:t},cellIndex:r,rowValue:n}=e;return`${t}[${Fe(n)}][${r}]`},_e=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:s=we,onChangeVisibleColumns:f,readOnly:g,onDelete:v=Le.ZT,onPin:h=Le.ZT,onIgnore:E=Le.ZT,onEdit:w=Le.ZT,onAdd:k=Le.ZT,emptyTempAttributeUris:T,selectedAttributeTypes:C,onSelectAttributeTypes:S=Le.ZT,additionalHeaderItems:I,className:Z,activeSurvivorshipGroupUri:A}=e;const j=Be(),N=(0,n.useMemo)((()=>(0,O.pipe)((0,O.filter)((e=>{let{id:t}=e;return s.includes(t)})),Ce)(he)),[s]),{type:P,uri:D,attributes:V={}}=t||{},R=(0,l.useSelector)(u.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,O.isNil)(C)){const e=(0,O.pipe)(O.keys,(0,O.without)(["paging"]),(0,O.map)((0,p.tCm)(P)),(0,O.map)((e=>(0,p.zeJ)(R,e,P))),(0,O.filter)((0,O.both)(O.identity,p.Uty)))(V);S(e)}}),[t,C]);const U=(0,n.useMemo)((()=>P?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,l=arguments.length>6?arguments[6]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((o=>{const i=(0,p.nIW)(o.uri),s=a[i],c=(0,p.YkG)(o)?n.relation:n.entity;return(0,O.pipe)((0,O.reduce)(((r,n)=>(0,O.assoc)(n,Se(n,e,t,o,c,s,l),r)),{}),(0,O.assoc)("rawValue",s))(r)}))}(R,P,C,s,o,V,A):[]),[R,P,C,s,V,o,A]),{getDynamicRowCellHeight:M,changeRowCellHeight:W}=(0,d.Z)(Ye),L=(0,n.useCallback)((e=>a().createElement(x,He({changeRowCellHeight:W},e))),[W]),z=(0,n.useCallback)((0,O.either)(M,(0,O.always)(68)),[M]),[B,H]=(0,n.useState)(null),[F,Y]=(0,n.useState)(null),_=(0,n.useCallback)((e=>{e.attributeValue.ignored?Y(e):w(e)}),[w,Y]),G=(0,n.useCallback)(((e,t)=>{S((0,O.move)(e,t,C))}),[S,C]),q=(0,n.useCallback)(B?()=>v(B):Le.ZT,[B,v]),X=(0,n.useMemo)((()=>({onDelete:H,onPin:h,onIgnore:E,onEdit:_,onAdd:k,parentUri:D,parentTypeUri:P,selectedAttributeTypes:C,onSelectAttributeTypes:S,emptyTempAttributeUris:T,readOnly:g})),[H,h,E,_,k,D,P,C,S,T,g]);return a().createElement("div",{className:i()(j.tableContainer,Z)},a().createElement(y.Z,{classes:{root:j.tableHeader,title:j.tableTitle},title:c().text("Sources")},I,a().createElement(m.Z,{columnsData:he,selectedColumns:s,onChangeColumns:f})),a().createElement("div",{className:j.tableContent},r&&a().createElement(Ie.Z,null),a().createElement(b.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:N,dndRowReorderingEnabled:!1,dndRowReorderingHandler:G,getIdFromRowValue:Fe,rowsData:U,renderRowCell:L,getRowCellHeight:z,context:X})),a().createElement(Ze.Z,{open:!!B,onClose:()=>H(null),onConfirm:q}),a().createElement(ze,{open:!!F,onClose:()=>Y(null),onConfirmEditWithIgnore:()=>w(F),onConfirmEditWithoutIgnore:()=>{E({attributeValue:F.attributeValue}),w(F)}}))}))},26752:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(71153),s=r.n(i),c=r(42503),u=r(23883);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d=(0,r(72342).makeStyles)({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){p(e,t,r[t])}))}return e}({},"standart"===n&&{backgroundColor:t,paddingRight:"29px"},"disabled"===n&&{border:`${t} solid 2px`},{opacity:r,filter:r&&1!==r?"saturate(20%)":null,transition:"opacity 0.3s",boxSizing:"border-box"})},endDatedCrosswalkIcon:{margin:"0 4px",width:"20px",height:"20px",color:"#ff1744"}});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=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="standart",children:i,className:p}=e,b=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 y=d({color:r,opacity:n,variant:l});return a().createElement("div",m({ref:t,"data-reltio-id":"cw-colored-block",className:s()(y.item,p)},b),i,"disabled"===l&&a().createElement(u.Z,{title:o().text("End-dated crosswalk")},a().createElement(c.Z,{className:y.endDatedCrosswalkIcon})))}))},60925:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(94059),i=r(67283),s=r(90590),c=r(39475),u=r(21210),p=r(40154),d=r(79312),m=r(6163),b=r(17512),y=r(50914),f=r(2507),g=r.n(f),v=r(50673),h=r(40435);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(72342);const O=(0,x.makeStyles)((()=>({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.Z,{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 T=r(71153),C=r.n(T),S=r(91785);const I=(0,x.makeStyles)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),Z=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(t);(0,n.useEffect)((()=>{c(t)}),[t]);const u=(0,n.useCallback)((()=>{const e=null==s?void 0:s.valueOf();t!==e&&o(e)}),[o,s,t]);return a().createElement(S.Z,{slotProps:{textField:{variant:"filled",InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:C()(i.timestampEditor,r.root)},onBlur:u}}},value:s||null,disabled:l,onChange:c,onClose:u})};var A=r(95038),j=r.n(A);const N=(0,x.makeStyles)((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,T]=(0,n.useState)([]),[C,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,y.pipe)((0,y.filter)((0,y.propEq)("canBeAdded",!0)),(0,y.filter)((e=>!(0,y.has)(e.uri,t))),(0,y.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,A.length>0&&r&&a().createElement(i.Z,{label:g().text("Add attributes"),onApply:e=>{e.length>0&&T((t=>t.concat((0,y.map)((0,y.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.Z,{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,y.ascend)((0,y.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.Z,{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),size:"small",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Z,{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),size:"small",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(Z,{value:t&&j().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,null==t?void 0:t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Z,{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:g().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!C,onClose:()=>S(null),onConfirm:()=>{return e=C,T((t=>(0,y.without)([e],t))),void((0,y.isNil)(t[e])||h(e));var e}}))}},10938:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(17512),s=r(26752),c=r(23759),u=r(21210),p=r(79312),d=r(50673);const m=(0,r(72342).makeStyles)({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.Z,{className:r.sourceLabel,variant:"body2"},b))},y=(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})))}))},89468:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(79312),c=r(60925),u=r(50914);const p=(0,r(72342).makeStyles)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),d=e=>{let{className:t,onAdd:r,onClose:l}=e;const d=p(),[m,b]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(s.Z,{variant:"body1",className:d.caption},o().text("Add crosswalk")),a().createElement(c.Z,{crosswalk:m,onDeleteAttribute:e=>{b((0,u.dissoc)(e))},onEditAttribute:(e,t)=>{b((0,u.assoc)(e,t))}}),a().createElement("div",{className:d.controlButtons},a().createElement(i.Z,{className:d.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Z,{color:"primary",onClick:()=>{r(m),l()},disabled:!m.type||!m.value},o().text("Add"))))}},71285:(e,t,r)=>{r.d(t,{Z:()=>V});var n=r(24328),a=r.n(n),l=r(23759),o=r(34802),i=r(17512),s=r(52730),c=r(79312),u=r(26436),p=r(21210),d=r(40435),m=r(50673),b=r(72342);const y=(0,b.makeStyles)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:e=>{let{isOpaque:t}=e;return{width:"100%",display:"flex",alignItems:"center",height:28,filter:t?null:"saturate(0%)",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=y({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.Z,{variant:"body2"},f)))}));var g=r(2507),v=r.n(g),h=r(6163),E=r(85777),w=r(40007),x=r(26752),O=r(94059),k=r(39475),T=r(79935),C=r(19540),S=r(13896),I=r(42484),Z=r(60925);const A=(0,b.makeStyles)({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},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),j=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:y,disableDelete:f,onDelete:g,onEdit:j}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:V}=(0,l.BF)(t),{isDimmed:R,highlightCrosswalk:U,removeHighlight:M}=(0,l.pu)(t),W=o?"#FFF":d?R?"rgba(0, 0, 0, 0.12)":P:"#CACCD1",[L]=(0,l.RT)(),z=A({color:W,isOpaque:!R,isFocused:V}),[B,H]=(0,n.useState)(!1),[F,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&&L&&(0,i.aFF)(L,t)&&L!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[L]),a().createElement("div",{className:z.root,ref:N},a().createElement(k.k,{size:"XXS",className:z.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:z.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:z.header,color:W,variant:X?"disabled":"standart",onMouseEnter:()=>U(),onMouseLeave:()=>M()},r&&a().createElement(C.Z,{className:z.dependentIcon}),a().createElement(E.Z,{onClick:()=>H((e=>!e)),expanded:B}),a().createElement(p.Z,{className:z.sourceIcon,sourceType:t.type}),a().createElement(w.Z,{value:G},a().createElement(c.Z,{variant:"body2",noWrap:!0},G)),a().createElement(T.Z,null),a().createElement(w.Z,{value:t.value},a().createElement(c.Z,{variant:"body2",className:z.labelValue,noWrap:!0},t.value))),B&&a().createElement("div",{className:z.attributesWrapper},J&&a().createElement("div",{className:z.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:F,onConfirm:()=>{V&&D(),g(q)},onClose:()=>Y(!1)})),a().createElement(Z.Z,{crosswalk:t,canEditAttribute:!y,onEditAttribute:(e,t)=>{j({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{j({crosswalkId:q,attributeName:e})}}))))}));var N=r(55485);const P=(0,b.makeStyles)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),D=e=>{let{showMore:t,onClick:r}=e;const n=P();return a().createElement(N.Z,{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")))},V=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:y}=e;const g=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>g.some((0,i.aFF)(e))))&&y()}),[g]),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(j,{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(j,{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(j,{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(D,{showMore:!u,onClick:()=>y()}))}},73972:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(50914),l=r(17512),o=r(79573);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])}}},82658:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(17512),l=r(50914),o=r(79573);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)([]),[y,f]=(0,n.useState)(null),g=(0,n.useRef)([]),v=(0,n.useRef)(null),h=(0,n.useCallback)((()=>{v.current=null}),[]),[E,w]=(0,n.useState)(c),x=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:x(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.PUO,x)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&v.current){const{ownerType:t}=v.current,r=Object.keys(e[t]),n=Object.keys(y[t]);w((0,l.difference)(r,n)),b([])}else w(c);h(),d(t),f(e),g.current=[]}),[t]);const O=(0,n.useCallback)((0,l.pipe)(u,h),[u,h]),{deleteAttribute:k,ignoreAttribute:T,pinAttribute:C,createAttribute:S,updateAttribute:I}=(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:O}),Z=(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;f((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),m.includes(s.uri)||b((e=>[...e,s.uri]))}),[]),A=(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}))),f((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):k(e)}),[k]),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)});S({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),v.current=n}}else I(e)}),[S,I,p]);return{modifiedEntity:p,crosswalksMap:y,onAddAttribute:Z,onDeleteAttribute:A,onPinAttribute:C,onIgnoreAttribute:T,onEditAttribute:j,newlyCreatedAttributes:E,emptyTempAttributeUris:m}}},34802:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},10765:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(17512),a=r(50914),l=r(34802);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])})))}))},38361:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(17512);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
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72c25b66-bf23-45ea-9810-41324523eaae",e._sentryDebugIdIdentifier="sentry-dbid-72c25b66-bf23-45ea-9810-41324523eaae")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1624"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2066],{48030:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r(50914),l=r(98858);function o(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}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=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;const[t,r]=(0,n.useState)({}),i=(0,n.useRef)({}),c=(e,t)=>{i.current[e]=t},u=(0,n.useCallback)((0,l.DsO)((()=>{r((e=>{const t=o({},i.current);return(0,a.equals)(e,t)?e:t}))})),[]),p=(0,n.useCallback)((()=>{i.current={}}),[]),d=(0,n.useCallback)((0,a.pipe)(e,(0,a.prop)(a.__,t)),[t]),m=(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(c,u),[e,a.identity])),[]);return{getDynamicRowCellHeight:d,changeRowCellHeight:m,clearHeightsCache:p}}},96253:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(44443),o=r(55962);const i=e=>{let{onChangeHeight:t,children:r}=e,i=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 s=(0,n.useRef)(),{rowValue:c,rowIndex:u,columnData:p,cellIndex:d}=i,m=t({rowIndex:u,cellIndex:d,columnData:p,rowValue:c}),b=()=>s.current&&m(s.current.clientHeight);return(0,o.D)(b,[c.rawValue]),(0,n.useEffect)((()=>()=>m(void 0)),[]),a().createElement("div",{ref:s},a().createElement(l.Z,{handleHeight:!0,onResize:b}),r)}},94059:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(69089),c=r(79811),u=r(290),p=r(75779);const d=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(s.Z,{open:t},a().createElement(u.Z,null,a().createElement(p.Z,null,o().text("Are you sure you want to delete this?"))),a().createElement(c.Z,null,a().createElement(i.Z,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Z,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},90143:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(23883);const o=(0,r(72342).makeStyles)((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.Z,i({},e,{classes:t,arrow:!0}))}},67275:(e,t,r)=>{r.d(t,{n:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(98858),s=r(79386),c=r(60883),u=r(72316),p=r(1824),d=r(62901),m=r(36852),b=r(75647);const y=(0,r(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,n.memo)((e=>{let{entity:t,className:r,historySlice:l}=e;const f=y(),g=(0,n.useMemo)((()=>(0,i.L5S)(t)),[t]),v=(0,m.C)({objectIds:g}),h=(0,i.wwR)(t);return a().createElement(p.e,{collaboration:v},a().createElement(s.Z,{className:o()(r,d.U),entity:(null==l?void 0:l.aEntity)||t},l?a().createElement(b.Z,null):a().createElement(a().Fragment,null,a().createElement(c.a,{className:f.profileBandNavigation}),a().createElement(u.Z,{className:f.comments,uri:h,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:h}),objectType:i.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},2002:(e,t,r)=>{r.d(t,{Z:()=>oe});var n=r(24328),a=r.n(n),l=r(98858),o=r(35039),i=r(31992),s=r(6163),c=r(29754),u=r(50985),p=r(71153),d=r.n(p),m=r(2507),b=r.n(m),y=r(67586),f=r(98538),g=r(47019),v=r(50914),h=r(51492),E=r(12980),w=r(72342);const x=(0,w.makeStyles)((()=>({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],T=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c,isTemporary:u}=e;const p=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),m=(0,l.PFL)(t),b=(0,E.AG)(r,m),[y,f]=(0,n.useState)(b),w=!(0,v.isNil)(t.defaultValue)&&u,T={className:p.textField,InputProps:{disableUnderline:!0,classes:{root:p.input,multiline:p.inputMultiline}},fullWidth:!0,autoFocus:!0},C=()=>{const e=!(0,v.isNil)(y)&&(0,E.Ho)(t,y);if(!(0,v.isNil)(y)&&!(0,v.equals)(y,b)||w){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===y&&(0,l.FVt)(m.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(g.ZP,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(p.paper,{[p.booleanEditor]:(0,l.T6Y)(m.type),[p.timestampEditor]:(0,l.j5n)(m.type)}),root:p.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(m.type)?"Escape"===e.key&&s():C()},onBackdropClick:C},a().createElement(h.Z,{dataTypeDefinition:m,fieldName:(0,l.Tde)(t.uri),onChange:f,TextFieldProps:T,value:y}))};var C=r(39475),S=r(20888),I=r(53203),Z=r(95341),A=r(79312),j=r(78223),N=r(10918);const P=(0,w.makeStyles)((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"}}))),D=(0,j.Z)(Z.Z),V=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(A.Z,{classes:{root:t.menuText}},n))},R=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=P(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(N.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(D,{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(V,{icon:p,text:i,styles:l}))}));R.displayName="CrosswalkMenuItem";const U=R;var M=r(2996),W=r(23759);function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const z=(0,w.makeStyles)((()=>({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){L(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"}}))),B=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:g,onIgnore:v,onEdit:h,onPin:E,onDelete:w,isEmpty:x}=e;const{isReadingMode:O,isEditingMode:k,isHovered:Z,onMouseEnter:A,onMouseLeave:j,setReadingMode:N,setEditingMode:P}=(0,M.p)(),D=(0,n.useRef)(),V=(0,l.nIW)(i.uri),R=(0,l.x_)(p),L=!o.system&&!R,B=L&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),H=L&&!g&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),Y=(0,l.mqZ)(l.BDP.UPDATE,o)&&!m&&L,_=!F&&(!O&&Y||i.pin),G=!F&&(!O&&Y||i.ignored);(0,n.useEffect)((()=>{F&&!x&&P()}),[x]);const q=(0,W.nX)(p),{isHighlighted:X,isDimmed:$,highlightCrosswalk:Q,removeHighlight:J}=(0,W.pu)(p),K=z({variant:R?"outlined":"filled",opaque:!$,fullyColored:X,color:$?"rgba(0, 0, 0, 0.12)":q}),ee=[{crosswalk:p,color:q},{disabled:!B,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:B?null:b().text("You don't have permissions to edit"),onClick:()=>P(),id:"edit"},{disabled:!H,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:H?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],te=()=>{J(),N()};return a().createElement("div",{ref:D,className:d()(t,K.root),onMouseEnter:()=>{Q(),A()},onMouseLeave:()=>{J(),j()},"data-reltio-id":r},a().createElement("div",{className:K.attributeValue},a().createElement(y.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:K.actions},_&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!Y}),G&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!Y}),Z&&!(0,l.vr_)(o)&&a().createElement(f.Z,{MenuItemRenderer:U,menuId:`simple-attribute-additional-actions-${V}`,buttonComponent:C.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:te,menuItems:ee})),k&&a().createElement(T,{attributeType:o,attributeValue:i,color:q,onClose:te,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:D,isTemporary:F}))};var H=r(13896);const F=(0,w.makeStyles)((()=>({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 Y(){return Y=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},Y.apply(this,arguments)}const _=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s,emptyTempAttributeUris:c}=e,u=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","emptyTempAttributeUris"]);const p=F(),[{isDragItemOver:d},m]=(0,H.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 y=0;return a().createElement("div",{ref:m,className:p.simpleAttributesWrapper,"data-reltio-id":"simple-attributes-wrapper"},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(B,Y({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,isEmpty:c.includes(e.uri),dataReltioId:"value-index-"+y++},u))))})),d&&a().createElement("div",{className:p.dropIndicator},b().text("Drop here")))};var G=r(73149),q=r(38677);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,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(q.Z,{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(G.Z,X({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var Q=r(49402);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)))))};var ee=r(51557);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)}const re=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(ee.Z,te({key:e.uri,attributeValue:e},n)))))},ne=(0,w.makeStyles)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function ae(){return ae=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},ae.apply(this,arguments)}function le(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 oe=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=le(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ne(),[m,b]=(0,n.useState)(c),y=(0,v.propOr)(r.length,"totalValues",s),f=c<y,g=f&&m<y,h=f&&m>=y,E=r.slice(0,m),w=y-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement($,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=le(p,["crosswalksMap"]);return a().createElement(K,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(re,ae({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(_,ae({attributeValues:e,attributeType:t},p))}})(E),g&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<y&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},86966:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(98858),o=r(2996),i=r(79935),s=r(23759),c=r(10918),u=r(90143),p=r(71153),d=r.n(p),m=r(21934);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),o=(0,l.x_)(t),{isDimmed:i,highlightCrosswalk:p,removeHighlight:b}=(0,s.pu)(t),y=(0,m.y)({isOpaque:!i,color:i?"rgba(0, 0, 0, 0.12)":n,isDisabled:o});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{"data-reltio-id":"crosswalk-icon",className:d()(y.crosswalkIcon,r),onMouseEnter:()=>p(),onMouseLeave:()=>b()}))};var y=r(50914),f=r(85777),g=r(2002),v=r(14699),h=r(52239),E=r(72342);const w=(0,E.makeStyles)((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(g.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,y.path)(["paging",e.uri],r)},n))))))};var k=r(53203),T=r(20888),C=r(39475),S=r(6163),I=r(2507),Z=r.n(I);const A=e=>{let{onClick:t}=e;return a().createElement(C.k,{icon:S.Z,tooltipTitle:Z().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var j=r(55962),N=r(38361);const P=(0,E.makeStyles)((()=>({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:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}=e;const x=P(),{isReadingMode:C,onMouseEnter:S,onMouseLeave:I}=(0,o.p)(),Z=!p&&(0,l.Z5t)(l.fO_.EDITING,t),D=!d&&(0,l.Edd)(l.fO_.EDITING,t),V=(0,l.ZiX)(r.uri),R=!V&&(!C&&Z||r.pin),U=!V&&(!C&&Z||r.ignored),M=!C&&D,W=(0,N.Q)(r.uri),[L,z]=(0,n.useState)(W||V);(0,j.D)((()=>{W&&z(W)}),[W]);const B=(0,y.pipe)((0,y.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),y.values,y.flatten,(0,y.uniqBy)((0,y.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:x.root,onMouseEnter:S,onMouseLeave:I},a().createElement(f.Z,{onClick:()=>z((e=>!e)),expanded:L}),a().createElement("span",null,c,B.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:x.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:x.actions},R&&a().createElement(k.Z,{disabled:!Z,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),U&&a().createElement(T.Z,{disabled:!Z,isIgnored:r.ignored,onClick:()=>g({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:!Z,disableDelete:!D,onPin:m,onIgnore:g,onDelete:v,onEdit:h,onAdd:E,emptyTempAttributeUris:w}))}},51557:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(98858),o=r(26729),i=r(86966);const s=(0,r(72342).makeStyles)((()=>({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))}},73149:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(98858),o=r(86966),i=r(35969);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))}},49402:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(52730),o=r(29945),i=r(98858),s=r(86966),c=r(50914),u=r(35969),p=r(30357),d=r(98074);const m=(0,r(72342).makeStyles)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function b(){return b=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},b.apply(this,arguments)}const y=e=>{let{attributeValue:t,attributeType:r}=e,y=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 f=m(),{generateEntityUrl:g}=(0,n.useContext)(d.v),v=(0,l.useSelector)(o.ZP.selectors.getMetadata),h=(0,l.useSelector)(o.ZP.selectors.getUIPath),E=a().createElement(u.x,null,a().createElement(p.Z,{href:g({uiPath:h,uri:(0,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:f.relationshipLabel},t.relationshipLabel))),w=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(v,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,b({attributeValue:t,attributeType:r,attributeTypesList:w,label:E},y))}},35969:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(79312),o=r(21934);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Z,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},20888:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);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(2507),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})}},53203:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(39475);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(2507),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})}},10918:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(29945),s=r(98858),c=r(52730),u=r(26436),p=r(21210),d=r(71153),m=r.n(d),b=r(23759),y=r(39475),f=r(21934);const g=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:g}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:g}),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(y.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},21934:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(72342);const a=(0,n.makeStyles)({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,isDisabled:n}=e;return{backgroundColor:n?"#fff":t,border:n?`2px solid ${t}`:null,height:"12px",width:"12px",boxSizing:"border-box",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.makeStyles)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},2996:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(98858),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}}},45226:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(98858),a=r(24328),l=r.n(a),o=r(11013),i=r(61347);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,RightSlot:a}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=o;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},o));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},63309:(e,t,r)=>{r.d(t,{Z:()=>_e});var n=r(24328),a=r.n(n),l=r(52730),o=r(71153),i=r.n(o),s=r(2507),c=r.n(s),u=r(29945),p=r(98858),d=r(48030),m=r(87825),b=r(45108),y=r(17998),f=r(72342);const g=(0,f.makeStyles)((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:{position:"relative",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},dragIndicator:{display:"none",position:"absolute",top:"15px",left:0,cursor:"grab"},dragIndicatorIcon:{fill:e.palette.text.secondary,width:"14px",height:"14px"},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}})));function v(){return v=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},v.apply(this,arguments)}const h=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l,someRowIsDragging:o}=e,s=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","someRowIsDragging"]);const c=g(),u=0===n,p=!o||u;return a().createElement("div",{className:i()(c.rowCell,u&&c.coloredCell),"data-reltio-id":`column-name-${l.id}`},p&&a().createElement(a().Fragment,null,t.values.map(((e,t)=>a().createElement(r,v({key:t,value:e,someRowIsDragging:o},s))))))};var E=r(96253);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 x=e=>{let{changeRowCellHeight: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,["changeRowCellHeight"]);return r.isDragLayer?a().createElement(h,w({},r,{someRowIsDragging:!1})):a().createElement(E.Z,w({onChangeHeight:t},r),a().createElement(h,r))};var O=r(50914),k=r(92332);const T=e=>{const t=g();return a().createElement("div",{className:i()(t.headCell,t.coloredCell)},a().createElement(k.default,e),e.children)};var C=r(67283),S=r(30488);const I=(0,f.makeStyles)({root:{marginBottom:"-6px"}}),Z=(0,S.Z)((0,O.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:i}=e;const s=I(),d=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,O.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,O.propEq)("uri",e.uri))),y=(0,O.pipe)((0,O.propOr)([],"attributes"),(0,O.reject)((0,O.either)(p.YkG,p.Or$)),(0,O.filter)((0,O.either)(p.QZu,b)),(0,O.filter)((0,O.both)(p.Uty,(e=>(0,p.Vg3)({attributeType:e,mode:p.fO_.EDITING})))))(m);return a().createElement("div",{className:s.root},a().createElement(C.Z,{label:c().text("Attribute"),popupTitle:c().text("Add attributes"),data:y,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(p.QZu).forEach((e=>{i({attributeType:e,parentUri:r})}))}}))}));var A=r(79935);const j=(0,S.Z)((0,O.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(T,r):a().createElement(T,r,a().createElement(A.Z,null),a().createElement(Z,null))})),N=e=>{let{value:t}=e;const r=g();return a().createElement("div",{className:r.cellValueWrapper},t)};var P=r(2002);const D=(0,f.makeStyles)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function V(){return V=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},V.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=D();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(P.Z,V({attributeValues:t},r)))};var U=r(73149);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 W=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=D(),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(U.Z,M({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var L=r(49402);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 B=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=D(),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(L.Z,z({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var H=r(51557);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 Y=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=D();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(H.Z,F({attributeValue:e},r))))))};function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const G=(0,S.Z)((0,O.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly","emptyTempAttributeUris"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,parentUri:c,readOnly:u}=e;return class{static build(e,t){switch(e){case p.oS0.TYPE_NESTED:return a().createElement(W,t);case p.oS0.TYPE_REFERENCE:return a().createElement(B,t);case p.oS0.TYPE_IMAGE:return a().createElement(Y,t);default:return a().createElement(R,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){_(e,t,r[t])}))}return e}({},t,{parentUri:c,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,emptyTempAttributeUris:s,disableEdit:u,disableDelete:u}))}));var q=r(89323),X=r(45226),$=r(14699);const Q=e=>{let{value:{values:t,attributeType:r},someRowIsDragging:n,dragRef:l}=e;const o=g();return a().createElement("div",{className:o.cellValueWrapper},a().createElement("div",{ref:l,className:o.dragIndicator},a().createElement(q.Z,{className:o.dragIndicatorIcon})),a().createElement($.Z,{className:o.attributeTitle,label:r.label}),!n&&a().createElement(X.Z,{values:t,attributeType:r,valueContainerClassName:o.ovValue}))},J=e=>{let{value:t}=e;const r=g();return a().createElement("div",{className:i()(r.cellValueWrapper,r.count)},t)};var K=r(87037),ee=r(81774),te=r(35488),re=r(82056),ne=r(47019),ae=r(79312),le=r(92679),oe=r(69208),ie=r(39475),se=r(21210);const ce=e=>{let{sourcesUriOrder:t}=e;const r=g(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(te.ZP,{key:e,className:r.popupItem},a().createElement(se.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(re.Z,{primary:(0,p.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ue=e=>{let{attributeUri:t}=e;const r=g(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),o=(0,p.zeJ)(n,t);return a().createElement(te.ZP,{key:o.uri,className:r.popupItem},a().createElement(re.Z,{primary:(0,p.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},pe=(0,O.cond)([[(0,O.prop)("sourcesUriOrder"),()=>c().text("Source sequence")],[(0,O.prop)("primaryAttributeUri"),()=>c().text("Attribute winner")],[(0,O.prop)("comparisonAttributeUri"),()=>c().text("Comparison attribute")]]),de=(0,O.cond)([[(0,O.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(ce,{sourcesUriOrder:t})}],[(0,O.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ue,{attributeUri:t})}],[(0,O.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ue,{attributeUri:t})}]]),me=e=>{let{info:t}=e;const r=g(),[l,o]=(0,n.useState)(null),i=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(ie.k,{icon:oe.Z,tooltipTitle:c().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(ne.ZP,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(K.Z,{className:r.closeButton,onClick:i,size:"large"},a().createElement(le.default,null)),a().createElement(ae.Z,{variant:"subtitle1",className:r.popupTitle},pe(t))),a().createElement(ee.Z,{component:"div",className:r.popupItemsWrapper},de(t))))},be=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=g(),s=r||n||l;return a().createElement("div",{className:i()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),s&&a().createElement(me,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var ye=r(23759),fe=r(26752);const ge=e=>{let{crosswalk:t}=e;const r=g(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:s}=(0,ye.pu)(t);return a().createElement(fe.Z,{className:r.winnerSourceItem,color:o?"rgba(0, 0, 0, 0.12)":(0,p.CJp)((0,p.uKF)(t)),opacity:o?.38:1,onMouseEnter:()=>i(),onMouseLeave:()=>s()},a().createElement(se.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(re.Z,{primary:(0,p.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},ve=e=>{let{value:{crosswalks:t}}=e;const r=g();return a().createElement(ee.Z,{component:"div"},t.map((e=>a().createElement(te.ZP,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ge,{crosswalk:e})))))},he=[{id:"ovValues",get label(){return c().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return c().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return c().text("Rule type")},initialWidth:200},{id:"count",get label(){return c().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return c().text("Attribute values")},hideable:!1}],Ee=e=>(0,p.OXP)(e)&&!(0,p.ZiX)(e.uri),we=["ovValues","ruleType","values"],xe=e=>{switch(e){case"ovValues":return Q;case"values":return G;case"count":return J;case"ruleType":return be;case"winnerSources":return ve;default:return N}},Oe=(0,O.pipe)(p.cwx,(0,O.sortWith)([(0,O.descend)((0,O.propOr)(-1,"priority"))]),(0,O.map)((0,O.prop)("uri"))),ke=(0,O.curry)(((e,t)=>(0,p.YkG)(e)&&t&&(0,O.pipe)(p.c31,(0,O.find)((r=>r.slice((0,p.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),Te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,O.pipe)((0,O.filter)(Ee),(0,O.chain)((e=>(0,O.pipe)((0,O.pickBy)(((t,r)=>{const n=(0,p.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,p.IM5)(e.value,a);return n&&(!l||Ee(l))})),O.values,O.flatten)(t))),(0,O.uniqBy)((0,O.prop)("uri")))(e)},Ce=(0,O.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?j:T,rowCellValueRenderer:xe(t)}})),Se=(e,t,r,n,a,l,o)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(Ee)};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 p.oS0.TYPE_REFERENCE:case p.oS0.TYPE_NESTED:case p.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+(0,O.pathOr)(0,[t.uri,"length"],r)),0)}}(n.type,l,a);case"ruleType":return((e,t,r,n)=>{var a,l;const o=[...e.entityTypes,...e.relationTypes||[]].find((0,O.propEq)("uri",r)),i=null!==(a=null==o?void 0:o.survivorshipGroups)&&void 0!==a?a:[],s=n&&i.find((0,O.propEq)("uri",n))||i.find((0,O.propEq)("default",!0)),c=null==s||null===(l=s.mapping)||void 0===l?void 0:l.find((0,O.propEq)("attribute",t.uri)),u=(0,p.o_J)(e,null==c?void 0:c.survivorshipStrategy)||(0,p.Xaq)(e),d=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(u)?(0,O.uniq)([...(null==c?void 0:c.sourcesUriOrder)||[],...(null==s?void 0:s.sourcesUriOrder)||[],...Oe(e)]):void 0,m=ke(t),b=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.primaryAttributeUri):void 0,y=(0,p.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.comparisonAttributeUri):void 0;return{ruleType:u,sourcesUriOrder:d,primaryAttributeUri:b,comparisonAttributeUri:y}})(t,n,r,o);case"winnerSources":return{crosswalks:Te(l,a)};default:return null}};var Ie=r(87378),Ze=r(94059),Ae=r(38677),je=r(69089),Ne=r(79811),Pe=r(290),De=r(75779),Ve=r(63297),Re=r(96758),Ue=r(30721),Me=r(73074),We=r(50553),Le=r(79573);const ze=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[i,s]=(0,n.useState)("without");return a().createElement(je.Z,{open:t,TransitionProps:{onEnter:()=>s("without")}},a().createElement(Pe.Z,null,a().createElement(De.Z,null,c().text("You are attempting to change a value that is presently ignored.")),a().createElement(Me.Z,{variant:"standard",component:"fieldset"},a().createElement(We.Z,{component:"legend"},c().text("Please choose an option:")),a().createElement(Re.Z,{value:i,onChange:(0,O.pipe)(Le.NA,s)},a().createElement(Ue.Z,{value:"without",control:a().createElement(Ve.Z,null),label:c().text("Save without Ignore")}),a().createElement(Ue.Z,{value:"with",control:a().createElement(Ve.Z,null),label:c().text("Save and apply Ignore to new value")})))),a().createElement(Ne.Z,null,a().createElement(Ae.Z,{onClick:r,color:"primary"},c().text("Cancel")),a().createElement(Ae.Z,{onClick:()=>{"with"===i?o():l(),r()},color:"primary"},c().text("Ok"))))},Be=(0,f.makeStyles)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row"},tableTitle:{marginRight:"auto"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function He(){return He=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},He.apply(this,arguments)}const Fe=e=>e.ovValues.attributeType.uri,Ye=e=>{let{columnData:{id:t},cellIndex:r,rowValue:n}=e;return`${t}[${Fe(n)}][${r}]`},_e=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:s=we,onChangeVisibleColumns:f,readOnly:g,onDelete:v=Le.ZT,onPin:h=Le.ZT,onIgnore:E=Le.ZT,onEdit:w=Le.ZT,onAdd:k=Le.ZT,emptyTempAttributeUris:T,selectedAttributeTypes:C,onSelectAttributeTypes:S=Le.ZT,additionalHeaderItems:I,className:Z,activeSurvivorshipGroupUri:A}=e;const j=Be(),N=(0,n.useMemo)((()=>(0,O.pipe)((0,O.filter)((e=>{let{id:t}=e;return s.includes(t)})),Ce)(he)),[s]),{type:P,uri:D,attributes:V={}}=t||{},R=(0,l.useSelector)(u.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,O.isNil)(C)){const e=(0,O.pipe)(O.keys,(0,O.without)(["paging"]),(0,O.map)((0,p.tCm)(P)),(0,O.map)((e=>(0,p.zeJ)(R,e,P))),(0,O.filter)((0,O.both)(O.identity,p.Uty)))(V);S(e)}}),[t,C]);const U=(0,n.useMemo)((()=>P?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,l=arguments.length>6?arguments[6]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((o=>{const i=(0,p.nIW)(o.uri),s=a[i],c=(0,p.YkG)(o)?n.relation:n.entity;return(0,O.pipe)((0,O.reduce)(((r,n)=>(0,O.assoc)(n,Se(n,e,t,o,c,s,l),r)),{}),(0,O.assoc)("rawValue",s))(r)}))}(R,P,C,s,o,V,A):[]),[R,P,C,s,V,o,A]),{getDynamicRowCellHeight:M,changeRowCellHeight:W}=(0,d.Z)(Ye),L=(0,n.useCallback)((e=>a().createElement(x,He({changeRowCellHeight:W},e))),[W]),z=(0,n.useCallback)((0,O.either)(M,(0,O.always)(68)),[M]),[B,H]=(0,n.useState)(null),[F,Y]=(0,n.useState)(null),_=(0,n.useCallback)((e=>{e.attributeValue.ignored?Y(e):w(e)}),[w,Y]),G=(0,n.useCallback)(((e,t)=>{S((0,O.move)(e,t,C))}),[S,C]),q=(0,n.useCallback)(B?()=>v(B):Le.ZT,[B,v]),X=(0,n.useMemo)((()=>({onDelete:H,onPin:h,onIgnore:E,onEdit:_,onAdd:k,parentUri:D,parentTypeUri:P,selectedAttributeTypes:C,onSelectAttributeTypes:S,emptyTempAttributeUris:T,readOnly:g})),[H,h,E,_,k,D,P,C,S,T,g]);return a().createElement("div",{className:i()(j.tableContainer,Z)},a().createElement(y.Z,{classes:{root:j.tableHeader,title:j.tableTitle},title:c().text("Sources")},I,a().createElement(m.Z,{columnsData:he,selectedColumns:s,onChangeColumns:f})),a().createElement("div",{className:j.tableContent},r&&a().createElement(Ie.Z,null),a().createElement(b.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:N,dndRowReorderingEnabled:!1,dndRowReorderingHandler:G,getIdFromRowValue:Fe,rowsData:U,renderRowCell:L,getRowCellHeight:z,context:X})),a().createElement(Ze.Z,{open:!!B,onClose:()=>H(null),onConfirm:q}),a().createElement(ze,{open:!!F,onClose:()=>Y(null),onConfirmEditWithIgnore:()=>w(F),onConfirmEditWithoutIgnore:()=>{E({attributeValue:F.attributeValue}),w(F)}}))}))},26752:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(71153),s=r.n(i),c=r(42503),u=r(23883);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d=(0,r(72342).makeStyles)({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){p(e,t,r[t])}))}return e}({},"standart"===n&&{backgroundColor:t,paddingRight:"29px"},"disabled"===n&&{border:`${t} solid 2px`},{opacity:r,filter:r&&1!==r?"saturate(20%)":null,transition:"opacity 0.3s",boxSizing:"border-box"})},endDatedCrosswalkIcon:{margin:"0 4px",width:"20px",height:"20px",color:"#ff1744"}});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=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="standart",children:i,className:p}=e,b=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 y=d({color:r,opacity:n,variant:l});return a().createElement("div",m({ref:t,"data-reltio-id":"cw-colored-block",className:s()(y.item,p)},b),i,"disabled"===l&&a().createElement(u.Z,{title:o().text("End-dated crosswalk")},a().createElement(c.Z,{className:y.endDatedCrosswalkIcon})))}))},60925:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(94059),i=r(67283),s=r(90590),c=r(39475),u=r(21210),p=r(40154),d=r(79312),m=r(6163),b=r(98858),y=r(50914),f=r(2507),g=r.n(f),v=r(29945),h=r(40435);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(72342);const O=(0,x.makeStyles)((()=>({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.Z,{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 T=r(71153),C=r.n(T),S=r(91785);const I=(0,x.makeStyles)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),Z=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(t);(0,n.useEffect)((()=>{c(t)}),[t]);const u=(0,n.useCallback)((()=>{const e=null==s?void 0:s.valueOf();t!==e&&o(e)}),[o,s,t]);return a().createElement(S.Z,{slotProps:{textField:{variant:"filled",InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:C()(i.timestampEditor,r.root)},onBlur:u}}},value:s||null,disabled:l,onChange:c,onClose:u})};var A=r(95038),j=r.n(A);const N=(0,x.makeStyles)((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,T]=(0,n.useState)([]),[C,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,y.pipe)((0,y.filter)((0,y.propEq)("canBeAdded",!0)),(0,y.filter)((e=>!(0,y.has)(e.uri,t))),(0,y.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,A.length>0&&r&&a().createElement(i.Z,{label:g().text("Add attributes"),onApply:e=>{e.length>0&&T((t=>t.concat((0,y.map)((0,y.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.Z,{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,y.ascend)((0,y.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.Z,{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),size:"small",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Z,{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),size:"small",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(Z,{value:t&&j().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,null==t?void 0:t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Z,{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:g().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!C,onClose:()=>S(null),onConfirm:()=>{return e=C,T((t=>(0,y.without)([e],t))),void((0,y.isNil)(t[e])||h(e));var e}}))}},10938:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(98858),s=r(26752),c=r(23759),u=r(21210),p=r(79312),d=r(29945);const m=(0,r(72342).makeStyles)({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.Z,{className:r.sourceLabel,variant:"body2"},b))},y=(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})))}))},89468:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(2507),o=r.n(l),i=r(38677),s=r(79312),c=r(60925),u=r(50914);const p=(0,r(72342).makeStyles)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),d=e=>{let{className:t,onAdd:r,onClose:l}=e;const d=p(),[m,b]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(s.Z,{variant:"body1",className:d.caption},o().text("Add crosswalk")),a().createElement(c.Z,{crosswalk:m,onDeleteAttribute:e=>{b((0,u.dissoc)(e))},onEditAttribute:(e,t)=>{b((0,u.assoc)(e,t))}}),a().createElement("div",{className:d.controlButtons},a().createElement(i.Z,{className:d.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Z,{color:"primary",onClick:()=>{r(m),l()},disabled:!m.type||!m.value},o().text("Add"))))}},71285:(e,t,r)=>{r.d(t,{Z:()=>V});var n=r(24328),a=r.n(n),l=r(23759),o=r(34802),i=r(98858),s=r(52730),c=r(79312),u=r(26436),p=r(21210),d=r(40435),m=r(29945),b=r(72342);const y=(0,b.makeStyles)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:e=>{let{isOpaque:t}=e;return{width:"100%",display:"flex",alignItems:"center",height:28,filter:t?null:"saturate(0%)",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=y({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.Z,{variant:"body2"},f)))}));var g=r(2507),v=r.n(g),h=r(6163),E=r(85777),w=r(40007),x=r(26752),O=r(94059),k=r(39475),T=r(79935),C=r(19540),S=r(13896),I=r(42484),Z=r(60925);const A=(0,b.makeStyles)({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},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),j=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:y,disableDelete:f,onDelete:g,onEdit:j}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:V}=(0,l.BF)(t),{isDimmed:R,highlightCrosswalk:U,removeHighlight:M}=(0,l.pu)(t),W=o?"#FFF":d?R?"rgba(0, 0, 0, 0.12)":P:"#CACCD1",[L]=(0,l.RT)(),z=A({color:W,isOpaque:!R,isFocused:V}),[B,H]=(0,n.useState)(!1),[F,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&&L&&(0,i.aFF)(L,t)&&L!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[L]),a().createElement("div",{className:z.root,ref:N},a().createElement(k.k,{size:"XXS",className:z.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:z.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:z.header,color:W,variant:X?"disabled":"standart",onMouseEnter:()=>U(),onMouseLeave:()=>M()},r&&a().createElement(C.Z,{className:z.dependentIcon}),a().createElement(E.Z,{onClick:()=>H((e=>!e)),expanded:B}),a().createElement(p.Z,{className:z.sourceIcon,sourceType:t.type}),a().createElement(w.Z,{value:G},a().createElement(c.Z,{variant:"body2",noWrap:!0},G)),a().createElement(T.Z,null),a().createElement(w.Z,{value:t.value},a().createElement(c.Z,{variant:"body2",className:z.labelValue,noWrap:!0},t.value))),B&&a().createElement("div",{className:z.attributesWrapper},J&&a().createElement("div",{className:z.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:F,onConfirm:()=>{V&&D(),g(q)},onClose:()=>Y(!1)})),a().createElement(Z.Z,{crosswalk:t,canEditAttribute:!y,onEditAttribute:(e,t)=>{j({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{j({crosswalkId:q,attributeName:e})}}))))}));var N=r(55485);const P=(0,b.makeStyles)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),D=e=>{let{showMore:t,onClick:r}=e;const n=P();return a().createElement(N.Z,{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")))},V=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:y}=e;const g=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>g.some((0,i.aFF)(e))))&&y()}),[g]),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(j,{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(j,{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(j,{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(D,{showMore:!u,onClick:()=>y()}))}},73972:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(50914),l=r(98858),o=r(79573);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])}}},82658:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(98858),l=r(50914),o=r(79573);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)([]),[y,f]=(0,n.useState)(null),g=(0,n.useRef)([]),v=(0,n.useRef)(null),h=(0,n.useCallback)((()=>{v.current=null}),[]),[E,w]=(0,n.useState)(c),x=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:x(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.PUO,x)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&v.current){const{ownerType:t}=v.current,r=Object.keys(e[t]),n=Object.keys(y[t]);w((0,l.difference)(r,n)),b([])}else w(c);h(),d(t),f(e),g.current=[]}),[t]);const O=(0,n.useCallback)((0,l.pipe)(u,h),[u,h]),{deleteAttribute:k,ignoreAttribute:T,pinAttribute:C,createAttribute:S,updateAttribute:I}=(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:O}),Z=(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;f((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),m.includes(s.uri)||b((e=>[...e,s.uri]))}),[]),A=(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}))),f((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):k(e)}),[k]),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)});S({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),v.current=n}}else I(e)}),[S,I,p]);return{modifiedEntity:p,crosswalksMap:y,onAddAttribute:Z,onDeleteAttribute:A,onPinAttribute:C,onIgnoreAttribute:T,onEditAttribute:j,newlyCreatedAttributes:E,emptyTempAttributeUris:m}}},34802:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},10765:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(98858),a=r(50914),l=r(34802);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])})))}))},38361:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(98858);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)))}}]);
|
|
2
2
|
//# sourceMappingURL=2066.js.map
|