@reltio/remotes 1.4.1153 → 1.4.1156

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/4327.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4327],{44327:(e,t,n)=>{n.d(t,{_:()=>wa,t:()=>Ma});var r=n(24328),o=n.n(r),a=n(52730),l=n(8598),i=n(17440),s=n(36138),c=n(44443),u=n(22664),p=n(39450),d=n(60115),m=n(585),g=n(58991),f=n(87918),b=n.n(f),h=n(3096),y=n.n(h),v=n(59431),x=n(60641),E=n(7718),w=n(3515),C=n(17554),S=n(61756),P=n(57730),O=n(76536),N=n(26481),k=n(49759),Z=n(94150),T=n(26005),R=n(99136),D=n(30268),j=n(21077),I=n(67268),L=n(71153),A=n.n(L),M=n(8962);const z=o().createContext(null);z.displayName="SingleAttributeContext";var U=n(60995),V=n(10237),F=n(58662),H=n(94079),B=n(93416),W=n(75512),q=n(30553),G=n(91181),$=n(32152),X=n(36444),_=n(79692);const Q=(0,_.Z)((()=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"36px"},popupContent:{paddingTop:"19px",paddingBottom:"23px",paddingLeft:"23px",paddingRight:"23px",maxWidth:"180px",width:"40%"},checkboxControlRoot:{marginTop:"6px",marginLeft:"-12px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),Y=e=>{let{className:t}=e;const n=Q(),a=(0,r.useRef)(),[l,i]=(0,r.useState)(!1),{showInactive:s,toggleShowInactive:c}=(0,r.useContext)(z),u=()=>i((e=>!e));return o().createElement(o().Fragment,null,o().createElement(H.Button,{ref:a,classes:{root:A()(n.triggerButton,t)},onClick:u},o().createElement(X.Z,null)),o().createElement(H.Popover,{open:l,classes:{paper:n.popupContent},anchorEl:a.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(H.FormControlLabel,{classes:{root:n.checkboxControlRoot,label:n.checkboxControlLabel},control:o().createElement(H.Checkbox,{className:n.checkboxControlCheckbox,checked:s,onChange:e=>c(e.target.checked)}),label:b().text("Show inactive values")})))},K=(0,_.Z)((()=>({root:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},ovIcon:{marginTop:"2px",marginLeft:"5px"}}))),J=e=>{let{caption:t,totalVisibleValues:n,showInactiveValuesMenu:a}=e;const l=K(),{searchQuery:i,setSearchQuery:s,setPage:c,totalNonVisibleValues:u,nonVisibleValues:p,attributeType:d}=(0,r.useContext)(z);return o().createElement(B.Z,{title:b().text(t),className:l.root},o().createElement(W.Z,{widthToHide:500},o().createElement(q.Z,{height:24,margin:16}),o().createElement(H.Typography,{className:l.totalCaption,variant:"caption"},b().number(n)," ",1===n?b().text("item"):b().text("items"))),o().createElement(G.Z,{nonOvTotal:u,className:l.ovIcon,nonOvValues:p,attributeType:d}),o().createElement($.i,{query:i,onChange:e=>{s(e),c(0)}}),a&&o().createElement(Y,null))};var ee=n(65549),te=n(93140),ne=n(76134),re=n(96698);const oe=(0,_.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 -16px 8px",backgroundColor:"rgba(0,0,0,0.12)"},ovFalse:e.inactive,noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px 8px 0"}}))),ae=g.nIW,le=(e,t)=>"object"==typeof e?Object.values(e).some((e=>e.some((e=>{let{value:n}=e;return le(n,t)})))):g.P6Y.strings.search(String(e),t),ie=async e=>{let{metadata:t,entity:n,attributeTypeUri:r,defaultMaxValues:o=1/0,offset:a=0,searchQuery:l=""}=e;const s=(0,i.pipe)(g.XtP,(0,i.filter)((e=>{let{value:t}=e;return le(t,l)})))(t,n,r),c=(0,i.filter)(g.OXP,s);return{[(0,g.xy8)(r)]:{[ae(r)]:c.slice(a,a+o),paging:{[r]:{totalOvValues:c.length,totalValues:s.length}}}}};function se(){return se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},se.apply(this,arguments)}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ue(e,t,n[t])}))}return e}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pe=[],de=e=>{let{values:t,attributeType:n,parentUri:l,showInactive:s,noDataText:c}=e;const u=oe(),{uri:d,required:m,cardinality:f,name:h}=n,y=(0,a.useDispatch)(),x=(0,r.useContext)(p.m),E=(0,a.useSelector)(v.ZP.selectors.getEntity),w=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,E.uri)||{})),C=(0,a.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,l,n))),S=(0,a.useSelector)((e=>(0,g.tQX)(l,n,v.ZP.selectors.getProfileErrors(e)))),P=(0,a.useSelector)(v.ZP.selectors.getMode),O=(0,g.xy8)(n),N=(0,i.pipe)((0,i.pathOr)(pe,[O,h]),(0,i.map)((0,i.prop)("uri")))(E),k=(0,i.pathOr)(pe,[O,h],w),Z=k.map((0,i.prop)("uri")),T=(0,g.ZiX)(E.uri),R=(0,r.useRef)((0,g.gjI)({parentUri:l,attributeType:n})),D=(0,g.O27)(k),j=m&&D,I=j?[R.current]:k.filter((0,i.pipe)((0,i.prop)("uri"),g.ZiX)),L=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,y)(e.map((e=>ce({},e,{viewId:x}))))),[x,y]),M=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.modifyAttribute,y)(ce({},e,{viewId:x}))),[x,y]),z=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,y)(ce({},e,{viewId:x}))),[x,y]),U=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,y),[y]),V=(0,r.useCallback)((()=>{const e={parentUri:l,attributeType:n};return L(j&&!(0,g.YkM)(n.type)?[e,e]:[e])}),[L,l,n,j]),F=(0,g.Vg3)({attributeType:n,mode:P}),B={attributeType:n,errors:C,crosswalks:w.crosswalks,mode:P,onAddAttributes:L,onChangeAttribute:M,onDeactivateError:U,showNonOv:s},W=0===I.length&&0===t.length;return o().createElement("div",null,o().createElement(te.Z,{cardinality:f}),o().createElement(ne.Z,{message:S}),F&&o().createElement(H.Button,{color:"primary",onClick:V,className:u.moreButton},o().createElement(ee.Z,{classes:{root:u.icon}}),o().createElement("div",{className:u.buttonLabel},b().text("Add"))),I.map(((e,t)=>o().createElement(re.Z,se({key:e.uri},B,{attributeValue:e,lazy:j&&!m,showEmptyEditors:T,ownError:(0,g.ADq)(e,t,d,C),onDeleteAttribute:z})))),I.length>0&&t.length>0&&o().createElement(H.Divider,{className:u.divider}),t.map((e=>{const t=k.find((0,i.propEq)("uri",e.uri)),n=t||e,r=N.includes(n.uri)&&!Z.includes(n.uri),a=!r&&t&&!((e,t)=>{const n=(0,i.is)(Object,e.value)||(0,i.is)(Object,t.value)?(0,i.over)((0,i.lensPath)(["value"]),(0,g.vKJ)({valueTransformer:(0,i.unless)(g.OXP,(0,i.omit)(["value"])),deleteEmptyComplex:!0})):i.identity;return(0,i.equals)(n(e),n(t))})(t,e),l=(0,i.cond)([[(0,i.always)(r),(0,i.always)("deleted")],[(0,i.always)(a),(0,i.always)("edited")]])();return o().createElement("div",{key:n.uri,className:A()({[u.ovFalse]:!(0,g.OXP)(n)})},o().createElement(re.Z,se({},B,{attributeValue:n,ownError:(0,g.ADq)(n,null,d,C),onDeleteAttribute:z,state:l})))})),W&&o().createElement(H.Typography,{className:u.noData},c))};var me=n(81303);const ge=(0,_.Z)((e=>({ovFalse:e.inactive}))),fe=e=>{let{values:t,attributeType:n,showInactive:r}=e;const a=ge();return o().createElement(o().Fragment,null,t.map((e=>o().createElement("div",{key:e.uri,className:A()({[a.ovFalse]:!(0,g.OXP)(e)})},o().createElement(me.Z,{attributeValue:e,attributeType:n,showNonOv:r})))))},be=(0,_.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"},pagination:{flexGrow:0,flexShrink:0}}))),he=e=>{let{config:t,className:n}=e;const{caption:l,max:i,showInactiveValuesMenu:s}=t,c=be(),{values:u,totalVisibleValues:p,page:d,setPage:m,isLoading:g,hasPaging:f,attributeType:h,showInactive:y}=(0,r.useContext)(z),x=(0,a.useSelector)(v.ZP.selectors.getEntityUri),E=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),w=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),C=(0,a.useSelector)(v.ZP.selectors.getPivotingAttributes),S=0!==u.length,P=t["text-empty"]||b().text("No data found");return o().createElement(U.J.Provider,{value:C},o().createElement(V.Z,{className:A()(c.root,n)},o().createElement(J,{totalVisibleValues:p,caption:l,showInactiveValuesMenu:s}),o().createElement(H.Box,{className:c.content},(()=>{if(g)return o().createElement(R.Z,null);if(h){if(E&&S){const e={values:u,attributeType:h,showInactive:y};return o().createElement(fe,e)}if(w){const e={values:u,attributeType:h,parentUri:x,showInactive:y,noDataText:P};return o().createElement(de,e)}}return o().createElement(H.Typography,{className:c.noData},P)})()),f&&o().createElement(F.Z,{count:p,page:d,rowsPerPage:i,rowsPerPageOptions:[],onChangePage:m,classes:{root:c.pagination}})))};var ye=n(67218),ve=n(20562);function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ee=(e,t,n)=>{const{attributeUri:o,max:l=15}=e,s=(0,a.useSelector)(v.ZP.selectors.getMetadata),[c,u]=(0,r.useState)([]),[p,d]=(0,r.useState)(null),[m,f]=(0,r.useState)(!1),b=(0,ye._)(),h=(0,r.useRef)(null),y=(0,a.useDispatch)(),x=(0,a.useSelector)(v.ZP.selectors.getApiPath),E=(0,a.useSelector)(v.ZP.selectors.getTenant),w=n?v.ZP.selectors.getEntityWithDiff:v.ZP.selectors.getEntityWithoutDiff,C=(0,a.useSelector)(w),S=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),P=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),O=(0,a.useSelector)(v.ZP.selectors.getHistoryDiff),N=C.uri,k=ae(o),Z=(0,g.xy8)(o);h.current=(0,g.JQy)(C,N,k);const T=(0,r.useMemo)((()=>(0,g.zeJ)(s,o)),[s,o]),{globalFilter:R}=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),{showInactive:D}=t,j=(0,r.useCallback)((()=>{if(T&&(0,g.Uty)(T)&&!(0,g.ZiX)(N)&&(0,g.YOQ)(o)){f(!0);const{page:e,showInactive:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["page","showInactive"]),a=(0,g.biM)(C)||P?ie:g.KbL;b(a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xe(e,t,n[t])}))}return e}({metadata:s,entity:C,apiPath:x,tenant:E,parentUri:N,defaultMaxValues:l,attributeTypeUri:o,offset:l*e,globalFilter:R,options:n?"":void 0},r))).then((e=>{const t=(0,i.path)([Z],e),n=(0,i.pathOr)([],[k],t);P||y(v.N5.actions.processNextPageOfAttributeValues({parentUri:N,attributeTypeUri:o,attributeTypeName:k,values:n})),u(n.map((e=>{var t;return(null===(t=h.current)||void 0===t?void 0:t.find((0,i.propEq)("uri",e.uri)))||e}))),d((0,i.path)(["paging",o],t))})).finally((()=>{f(!1)}))}else u([]),d(null)}),[x,N,E,o,l,s,t,R,T,P,O]);(0,r.useEffect)((()=>{j()}),[j]),(0,ve.D)((()=>{S&&j()}),[S]);const I=(0,i.partition)(g.OXP),[,L]=I(h.current||[]),A=D?[]:L,M=D?"totalValues":"totalOvValues",z=(0,i.ifElse)((0,i.has)(M),(0,i.prop)(M),(0,i.always)(c.length))(p),U=l<z,V=null!=p&&p.totalValues?p.totalValues-z:A.length;return{values:c,isLoading:m,hasPaging:U,totalVisibleValues:z,attributeType:T,totalNonVisibleValues:V,nonVisibleValues:A}};function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ce=n(37152),Se=n(31274),Pe=n(79026),Oe=n(8818),Ne=n(90324),ke=n(70595);const Ze=o().createContext(null);Ze.displayName="RelationsViewStateContext";const Te=(0,_.Z)((e=>({button:{color:e.palette.text.secondary,width:"36px",minWidth:"36px"},popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"},divider:{backgroundColor:"rgba(0,0,0,0.1)",margin:"19px -23px"},title:{marginBottom:"30px"},sortControls:{display:"flex",alignItems:"center"},sortSelectorRoot:{flex:1,padding:"13px 16px",fontSize:"0.85rem"},sortSelectorMenuItem:{fontSize:"0.85rem"},sortOrderButton:{flexShrink:0,margin:"0 8px 0 7px"}}))),Re=e=>{let{className:t}=e;const n=Te(),a=(0,r.useRef)(),{showInactive:l,toggleShowInactive:i,sortOrder:s,toggleSortOrder:c,sortOption:u,changeSortOption:p,sortOptions:d}=(0,r.useContext)(Ze),[m,f]=(0,r.useState)(!1),h=()=>f((e=>!e)),y=!(0,g.O27)(d),v="asc"===s;return o().createElement(o().Fragment,null,o().createElement(H.Button,{ref:a,classes:{root:A()(n.button,t)},onClick:h},o().createElement(X.Z,null)),o().createElement(H.Popover,{open:m,classes:{paper:n.popupContent},anchorEl:a.current,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(H.FormControlLabel,{classes:{label:n.checkboxControlLabel},control:o().createElement(H.Checkbox,{className:n.checkboxControlCheckbox,checked:l||!1,onChange:i}),label:b().text("Show inactive Relationships")}),y&&o().createElement(o().Fragment,null,o().createElement(H.Divider,{className:n.divider}),o().createElement(H.Typography,{className:n.title,variant:"h6"},b().text("Sort by")),o().createElement("div",{className:n.sortControls},o().createElement(Pe.Z,{entries:d,TextFieldProps:{variant:"filled"},classes:{root:n.sortSelectorRoot,menuItem:n.sortSelectorMenuItem},fullWidth:!0,disableUnderline:!0,value:u,onChange:p,MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}}),o().createElement(Oe.k,{tooltipTitle:v?b().text("Ascending"):b().text("Descending"),icon:v?Ne.Z:ke.Z,onClick:c,className:n.sortOrderButton,size:"L"})))))};Re.displayName="FilterButton";const De=Re,je=(0,_.Z)({header:{padding:"0 6px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"}});var Ie=n(61932),Le=n(55847);const Ae=o().createContext(null);function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ze(e,t,n[t])}))}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ue=Math.pow(2,31)-1,Ve=(0,_.Z)((()=>({tenant:{backgroundColor:"#0000EE",cursor:"pointer",position:"absolute",top:"8px",left:"22px",width:"10px",height:"10px",color:"white",fontSize:"10px",fontWeight:"bold",userSelect:"text",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},button:{position:"relative"},badge:{fontSize:"10px",height:"14px",minWidth:"14px",width:"14px",fontWeight:"bold",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px",top:"4px"}})));var Fe=n(81137);const He=e=>{let{label:t}=e;const n=Ve();return o().createElement(H.Badge,{classes:{anchorOriginTopRightRectangle:n.badgePosition,badge:n.badge},badgeContent:t},o().createElement(Ie.Z,null))},Be=()=>{const{tenants:e,selectedTenant:t,onConfirmImport:n,onCancelConfirmation:l,onImportClick:i}=(()=>{var e;const t=(0,a.useSelector)(v.ZP.selectors.getDataTenants),n=(0,a.useDispatch)(),{config:o,reloadRelations:l}=(0,r.useContext)(Ae),i=(0,a.useSelector)(v.ZP.selectors.getEntityUri),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(null),d=(0,a.useSelector)(v.ZP.selectors.getDtssPath),m=(0,a.useSelector)(v.ZP.selectors.getTenant),f=[Me({},o.content,{offset:0,max:null!==(e=o.maxDtssImport)&&void 0!==e?e:Ue})],h=(0,r.useCallback)((()=>{c([]),o.importFromDT&&!(0,g.ZiX)(i)&&Promise.all((t||[]).map((e=>(0,g.QXb)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:e.id}).then((t=>{let{hasNonImportedConnections:n}=t;return Me({},e,{hasNonImportedConnections:n})}))))).then((e=>e.filter((e=>e.hasNonImportedConnections)))).then(c)}),[i,d,m,o,t]),y=(0,r.useCallback)((()=>{(0,g.MOC)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:u.id}).then((()=>{l(),h()})).catch((e=>n(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))))),p(null)}),[i,d,m,o,h,l,u,p]);(0,r.useEffect)((()=>{h()}),[h]);const x=(0,r.useCallback)((()=>p(null)),[]),E=(0,r.useCallback)((e=>p(e)),[]);return{tenants:s,selectedTenant:u,onConfirmImport:y,onCancelConfirmation:x,onImportClick:E}})(),s=Ve(),c=1===e.length,u=c?0===e[0].label.indexOf("DT:")?e[0].label[3]:e[0].label[0]:e.length;return o().createElement(o().Fragment,null,!!e.length&&o().createElement(o().Fragment,null,c?o().createElement("div",{className:s.button},o().createElement(Oe.k,{size:"L",icon:Ie.Z,tooltipTitle:b().text("Import connections from ${label}",{label:e[0].label}),onClick:()=>i(e[0])}),o().createElement("div",{className:A()(s.tenant)},u)):o().createElement(Le.Z,{menuId:"importDT-table-actions",buttonComponent:Oe.k,buttonProps:{tooltipTitle:b().text("Import connections"),size:"L",icon:()=>o().createElement(He,{label:u})},menuItems:e.map((e=>({onClick:()=>{i(e)},text:e.label})))}),o().createElement(Fe.Z,{open:!!t,title:b().text("Confirmation"),content:b().text("Import connections from ${label}?",{label:null==t?void 0:t.label}),discardCaption:b().text("Cancel"),saveCaption:b().text("Import"),onDiscard:l,onSave:n})))},We=e=>{let{title:t,total:n}=e;const a=je(),{searchQuery:l,changeSearchQuery:i}=(0,r.useContext)(Ze);return o().createElement(B.Z,{title:t||"",className:a.header},n>0&&o().createElement(W.Z,{widthToHide:400},o().createElement(q.Z,{height:24,margin:16}),o().createElement(H.Typography,{className:a.totalCaption,variant:"caption"},n>1?b().text("${count} items",{count:n}):b().text("${count} item",{count:n}))),o().createElement($.i,{query:l,onChange:i}),o().createElement(Be,null),o().createElement(De,null))};var qe=n(11013),Ge=n(27604),$e=n(22983),Xe=n(31254),_e=n(31039);const Qe=(0,_.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px"},label:{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},secondaryLabel:{color:"rgba(255, 255, 255, 0.7)",fontSize:"10px",marginTop:"4px",fontWeight:500,lineHeight:"11px"},progress:{marginTop:"4px",color:"#FFFFFF"}})));function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}const Ke=e=>{let{label:t,entity:n,children:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","entity","children"]);const c=Qe(),u=(0,ye._)(),p=(0,a.useSelector)(v.ZP.selectors.getTenant),d=(0,a.useSelector)(v.ZP.selectors.getDtssPath),[m,f]=(0,r.useState)(!1),[b,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(null)}),[n]);const y=(0,r.useCallback)((()=>{if(null!=n&&n.entityUri&&(0,i.isNil)(b)){const e=(0,i.ifElse)(g.biM,(e=>(0,g.vTU)({entityUri:e.entityUri,dataTenant:e.dataTenant,customerTenant:p,dtssPath:d})),(e=>(0,g.XkT)(e.entityUri)));f(!0),u(e(n)).then((e=>{let{secondaryLabel:t}=e;h(t)})).finally((()=>{f(!1)}))}}),[d,n,p,u,b]),x=o().createElement("div",{className:c.tooltipContent},o().createElement("div",{className:c.label},t),m&&o().createElement(H.CircularProgress,{size:16,classes:{colorPrimary:c.progress}}),b&&o().createElement("div",{className:c.secondaryLabel},b));return o().createElement(H.Tooltip,Ye({onOpen:y,title:x,disableFocusListener:!0,classes:{tooltip:c.tooltip}},s),l)},Je=(e,t)=>{const{entity:n,relation:r}=e;return{entityType:(0,g.nt9)(t,null==n?void 0:n.entityType),entityLabel:(0,g.idV)(null==n?void 0:n.entityLabel),preparedUri:(0,g.wwR)({uri:null==n?void 0:n.entityUri,dataTenant:null==n?void 0:n.dataTenant}),relationLabel:(null==r?void 0:r.relationLabel)||(0,g.Lmx)(t,null==r?void 0:r.relationType)}};var et=n(77277);const tt=(0,_.Z)((()=>({container:{display:"flex"}})));function nt(){return nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt.apply(this,arguments)}const rt=e=>{let{acceptRelation:t,ignoreRelation:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["acceptRelation","ignoreRelation"]);const a=tt();return o().createElement("div",{className:a.container},o().createElement(et.Z,nt({onClick:t,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Accept")),o().createElement(et.Z,nt({onClick:n,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Ignore")))},ot=(0,_.Z)((e=>({container:{display:"flex",flexDirection:"column",marginBottom:"2px"},row:{display:"flex",alignItems:"center",flexDirection:"row",minHeight:"24px",padding:"0 16px"},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},editButtonsContent:{marginLeft:"auto",flex:"0 0 40px"},editButtons:{padding:0},removed:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary,margin:"0 5px"}}))),at=(0,r.memo)((e=>{let{connection:t,metadata:n,showControls:a,onRemoveRelation:l,onEditRelation:i,onAcceptRelation:s,onIgnoreRelation:c,renderRelationArrowButton:u}=e;const p=ot(),{entity:d,relation:m}=t,f=(0,g.$qe)(t),h=(0,g.xr3)(t),y=(0,g.iJH)(t),{entityType:v,entityLabel:x,preparedUri:E,relationLabel:w}=Je(t,n),C=(0,g.Fn9)(m)&&(0,g.Fn9)(d),{canRemove:S,canUpdate:P}=(e=>{let{metadata:t,mode:n,connection:r,onRemoveRelation:o,onEditRelation:a}=e;if((n===g.ARY.Editing||n===g.ARY.Suggesting)&&r){const{relation:{relationType:e}}=r,l=(0,g.$qe)(r),i=(0,g.V3K)(t,e);return{canRemove:o&&!l&&(0,g.Edd)(n,i),canUpdate:a&&!l&&(0,g.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:g.ARY.Editing,onRemoveRelation:l,onEditRelation:i,metadata:n,connection:t}),O=(0,r.useCallback)((()=>l(t.relation.relationUri)),[l,t]),N=(0,r.useCallback)((()=>i(t)),[i,t]),k=(0,r.useCallback)((()=>{s(t)}),[s,t]),Z=(0,r.useCallback)((()=>c(t)),[c,t]),T=(S||P)&&a&&!t.suggested?o().createElement(o().Fragment,null,P&&o().createElement(Oe.k,{icon:Ge.Z,size:"XS",onClick:N,tooltipTitle:b().text("Edit")}),S&&o().createElement(Oe.k,{icon:$e.Z,size:"XS",onClick:O,tooltipTitle:b().text("Remove")})):void 0,R=t.suggested?o().createElement(rt,{acceptRelation:k,ignoreRelation:Z,size:"small",disabled:y}):void 0,D=y?b().text("ignored"):b().text("edited");return o().createElement("div",{className:A()(p.container,{[p.rowInactive]:!C},{[p.removed]:f||y})},o().createElement("div",{className:p.row},u&&u(),o().createElement(Xe.Z,{className:p.entityAvatar,entityType:v}),o().createElement(_e.Z,{value:E,className:p.entityLabelContainer},o().createElement(Ke,{label:x,entity:d},o().createElement("span",{className:p.entityLabel},x)),(h||y)&&o().createElement(H.Typography,{variant:"caption",className:p.editedLabel},"(",D,")"),w&&o().createElement("span",{className:p.relationLabel},`, ${w}`)),o().createElement("div",{className:p.editButtonsContent},T),R))}));at.displayName="EditableRelationItem";const lt=at,it=(e,t)=>{const n=(e,t)=>(t?(0,g.VGB)(t):[]).map((t=>({type:t,direction:e===g.Nsj.IN?g.Nsj.IN:g.Nsj.OUT})));return n(g.Nsj.IN,e).concat(n(g.Nsj.OUT,t))[0]};function st(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ct=n(98989),ut=n(83543);const pt=(0,_.Z)({arrowIcon:{fontSize:"16px",marginRight:"6px"}}),dt=e=>{let{onClick:t,connection:n,config:r,showSecondLevel:a}=e;const l=pt(),{parentEntityUri:i}=n,{contentSecondLevel:s}=r,c={onClick:t,className:l.arrowIcon};return i||!s||(0,g.xvW)(n)?null:a?o().createElement(ut.Z,c):o().createElement(ct.Z,c)},mt=(0,_.Z)({row:{display:"flex",alignItems:"center",width:"100%"},secondLevelContent:{paddingLeft:"24px"}}),gt=e=>{let{config:t,connection:n,children:l}=e;const i=mt(),{showInactive:s}=(0,r.useContext)(Ze),{connections:c,showSecondLevel:u,toggleShowSecondLevel:p,loadRelations:d,loading:m,total:f}=(e=>{let{config:t,connection:n,relationActivityFilter:o}=e;const l=(0,a.useDispatch)(),[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(0),{contentSecondLevel:m}=t,{entity:f}=n,b=(0,a.useSelector)((e=>v.ZP.selectors.getConnectionsWithDraftsByViewId(e,t.id,f.entityUri)))||[],{activityFilter:h}=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions)||{},y=(0,r.useCallback)((()=>{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){st(e,t,n[t])}))}return e}({},m,{returnObjects:!0,returnDates:!0,activeness:{relation:o||g.Ng6.ALL,entity:h}});u(!0),(0,g.N6e)(f.entityUri,[e]).then((e=>{const{connections:n,total:r}=e[0];n&&l(v.N5.relations.actions.secondLevelRelationsLoaded({connections:n,parentEntityUri:f.entityUri,id:t.id})),d(r),u(!1)}))}),[t.id,m,l,f.entityUri,h,o]),x=(0,r.useCallback)((()=>{i||n.connections||y(),s((e=>!e))}),[y,n.connections,i]);return{connections:b,showSecondLevel:i,toggleShowSecondLevel:x,loadRelations:y,loading:c,total:p}})({config:t,connection:n,relationActivityFilter:s?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY}),b=(0,r.useMemo)((()=>(0,g.Px$)(c)),[c]);return o().createElement(o().Fragment,null,l((()=>o().createElement(dt,{onClick:p,connection:n,config:t,showSecondLevel:u}))),u&&o().createElement(Se.X.Provider,{value:b},o().createElement("div",{className:i.secondLevelContent},o().createElement(Gt,{isLoading:m,config:t,loadRelations:d,connections:c,total:f,parentEntityUri:n.entity.entityUri}))))},ft=(0,_.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px",marginLeft:"16px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 0 8px",backgroundColor:"rgba(0,0,0,0.12)"},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),bt=e=>{let{className:t,connections:n=[],config:l,mode:s,noDataText:c,parentEntityUri:u}=e;const p=(0,a.useSelector)(v.ZP.selectors.getMetadata),d=(0,a.useSelector)((e=>v.ZP.selectors.getRelationToAddByViewId(e,l.id))),m=(0,a.useSelector)((e=>v.ZP.selectors.getRelationsToEditByViewId(e,l.id))),f=(0,a.useSelector)(v.ZP.selectors.getEntity),h=(0,a.useSelector)((e=>v.ZP.selectors.getCheckIfCanAddRelations(e,l.content))),y=(0,a.useDispatch)(),x=ft(),E=(0,r.useCallback)((()=>{const e=(0,g.vlo)({config:l,mode:s,metadata:p,parentEntityUri:u});(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y)(e)}),[l,s,p,y,u]),w=(0,r.useCallback)((e=>{y(v.N5.relations.actions.closeRelationEditor(l.id,e)),y(v.N5.relations.actions.removeRelation(l.id,e));const t=n.find((t=>v.N5.relations.selectors.getRelationUriFromConnection(t)===e)),r=v.N5.relations.selectors.getEntityUriFromConnection(t);(0,g.ZiX)(r)&&y(v.N5.modifiedEntities.actions.entityDeleted(r))}),[l,n,y]),C=l.content,S=it(C.inRelations,C.outRelations),P=(0,r.useCallback)((e=>{const t=(0,i.pipe)((0,i.omit)(["suggested"]),(0,i.evolve)({relation:{relationType:(0,i.always)(S.type),object:(0,i.evolve)({type:(0,i.always)(S.type),attributes:(0,i.always)(null)})}}))(e);y(v.N5.relations.actions.addRelation(l.id,t))}),[y,l,S]),O=(0,r.useCallback)((e=>{y(v.N5.relations.actions.ignoreRelation(l.id,{relationType:S.type,relationDirection:S.direction,entityUri:e.entity.entityUri,relationUri:e.relation.relationUri}))}),[y,l,S]),[N,k]=(0,i.partition)(g.xvW,n),Z=f&&h,T=0===N.length&&0===k.length,R=e=>{var t,n;const r=m.find((t=>{var n,r;return(null==t||null===(n=t.relation)||void 0===n?void 0:n.relationUri)===(null==e||null===(r=e.relation)||void 0===r?void 0:r.relationUri)})),a=!l.allowOnlyCreateNew||(0,g.xvW)(e),c=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(gt,{config:l,connection:e,key:c},(t=>r?o().createElement(qe.Z,{connection:r,config:l,mode:s,metadata:p}):o().createElement(lt,{renderRelationArrowButton:t,connection:e,metadata:p,showControls:a,onRemoveRelation:w,onEditRelation:(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y),onAcceptRelation:P,onIgnoreRelation:O})))},D=Z&&(!d||d&&d.parentEntityUri===u),j=d&&d.parentEntityUri===u;return o().createElement("div",{className:t},D&&o().createElement(H.Button,{color:"primary",onClick:E,className:x.moreButton},o().createElement(ee.Z,{classes:{root:x.icon}}),o().createElement("div",{className:x.buttonLabel},b().text("Add"))),j&&o().createElement(qe.Z,{connection:d,config:l,mode:s,metadata:p}),N.map(R),N.length>0&&k.length>0&&o().createElement(H.Divider,{className:x.divider}),k.map(R),T&&o().createElement(H.Typography,{className:x.noData},c))};var ht=n(19603),yt=n(94646),vt=n(78101),xt=n(80931);const Et=(0,_.Z)((e=>({attributesList:{paddingLeft:"46px",paddingRight:"16px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0}})));function wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ct(e,t,n[t])}))}return e}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const St=e=>{let{connection:t,className:n}=e;const l=Et(),{relation:s}=t,c=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),u=(0,a.useSelector)(v.ZP.selectors.getMetadata),p=(0,r.useMemo)((()=>(0,g.xF8)(u,null==s?void 0:s.relationType)),[null==s?void 0:s.relationType,u]),d=(0,r.useMemo)((()=>wt({attributes:wt({},v.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,g.p2l)((null==t?void 0:t.relation)||{}))),[t]),m=(0,r.useMemo)((()=>(0,g.fyF)(p,d)),[p,d]).filter((e=>{let{values:t}=e;return!(0,g.O27)(t)})).length>0,f=(0,r.useMemo)((()=>(0,g.R$r)(d.attributes)),[d]),{getCommentsCount:h}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{!(0,i.isEmpty)(f)&&h(f)}),[h,f]);const y=(0,r.useMemo)((()=>(0,g.wp9)(g.q7e.RELATION,{entityUri:c,connection:t})),[t,c]);return m?o().createElement(vt.A.Provider,{value:y},o().createElement(xt.Z,{className:A()(l.attributesList,n),entity:d,attrTypes:p})):o().createElement("div",{className:A()(l.attributesList,n)},b().text("No attributes"))};var Pt=n(86602),Ot=n(82726);const Nt=e=>{let{show:t,onToggle:n,className:r}=e;return o().createElement(Oe.k,{className:r,tooltipTitle:t?b().text("Hide attributes of the relationship"):b().text("Show attributes of the relationship"),tooltipPlacement:"bottom-end",size:"XXS",icon:t?Pt.Z:Ot.Z,onClick:n})},kt=(0,_.Z)((e=>({container:{display:"flex",flexDirection:"column",paddingBottom:"2px"},row:{display:"flex",alignItems:"center",flexDirection:"row",minHeight:"16px",padding:"3px 11px 3px 16px"},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",wordBreak:"break-all",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},showDetails:{marginLeft:"auto",paddingRight:"5px"},attributesList:{paddingLeft:"46px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0},suggestedWrapper:{backgroundColor:e.suggested},commentsContainer:{marginLeft:"auto",alignItems:"center","& + $showDetails":{marginLeft:"4px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"},labelWrapper:{display:"flex",alignItems:"center"}}))),Zt=(0,r.memo)((e=>{let{connection:t,renderRelationArrowButton:n,acceptRelation:l,ignoreRelation:s}=e;const c=kt(),u=t.suggested,{entity:p,relation:d}=t,[m,f]=(0,r.useState)(!1),b=(0,a.useSelector)(v.ZP.selectors.getMetadata),{entityType:h,entityLabel:y,preparedUri:x,relationLabel:E}=Je(t,b),w=(0,g.Fn9)(d)&&(0,g.Fn9)(p),C=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),S=p&&d&&(0,g.wp9)(g.q7e.RELATION,{entityUri:C,connection:t})||[];return o().createElement("div",{className:A()(c.container,{[c.rowInactive]:!w},{[c.suggestedWrapper]:u})},o().createElement("div",{className:A()(c.row,ht.U)},n&&n(),o().createElement("div",{className:c.labelWrapper},o().createElement(Xe.Z,{className:c.entityAvatar,entityType:h}),o().createElement(_e.Z,{value:x,className:c.entityLabelContainer},o().createElement(Ke,{label:y,entity:p},o().createElement("span",{className:c.entityLabel},y)),E&&o().createElement("span",{className:c.relationLabel},`, ${E}`))),o().createElement("div",{className:c.additionalButtonsWrapper},!(0,i.isEmpty)(S)&&o().createElement(yt.Z,{className:c.commentsContainer,uri:(0,g.gjS)(d),relatedObjectUris:S,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),u&&o().createElement(rt,{size:"small",acceptRelation:l(t),ignoreRelation:s(t)}),!u&&o().createElement(Nt,{show:m,onToggle:()=>{f((e=>!e))},className:c.showDetails}))),m&&o().createElement(St,{connection:t}))}));Zt.displayName="RelationItem";const Tt=Zt;var Rt=n(52691),Dt=n(16208);const jt=e=>e.filter((e=>5===e.value)).length,It=e=>e.filter((e=>1===e.value)).length,Lt=e=>0===e.length?"0%":jt(e)/e.length*100+"%",At=e=>0===e.length?"0%":It(e)/e.length*100+"%",Mt=(0,_.Z)((e=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-end"},averageRating:{marginBottom:"7px",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px",color:e.palette.text.primary},scale:{display:"flex",marginBottom:"6px",width:"128px",height:"4px"},likesScale:{height:"100%",backgroundColor:"#8CC152"},dislikesScale:{height:"100%",backgroundColor:"rgb(255, 112, 112)"},counts:{display:"flex"},likesCount:{marginRight:"32px"},count:{display:"flex",alignItems:"center",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},icon:{marginRight:"4px",width:"14px",height:"14px",color:"rgba(0,0,0,0.38)"}}))),zt=e=>{let{ratings:t,className:n}=e;const r=Mt();return o().createElement("div",{className:A()(r.wrapper,n)},o().createElement(H.Typography,{className:r.averageRating},(e=>(0,i.pipe)((0,i.pluck)("value"),i.mean,(0,i.defaultTo)(0))(e))(t).toFixed(1)),o().createElement("div",{className:r.scale},o().createElement("div",{className:r.likesScale,style:{width:Lt(t)}}),o().createElement("div",{className:r.dislikesScale,style:{width:At(t)}})),o().createElement("div",{className:r.counts},o().createElement("div",{className:A()(r.likesCount,r.count)},o().createElement(Rt.Z,{className:r.icon}),jt(t)),o().createElement("div",{className:r.count},o().createElement(Dt.Z,{className:r.icon}),It(t))))},Ut=(0,_.Z)((e=>({wrapper:{display:"flex"},button:{fontSize:"14px",textTransform:"none",color:e.palette.text.secondary},likeButton:{marginLeft:"-12px",marginRight:"8px"},isActive:{color:e.palette.text.primary}}))),Vt=e=>{let{ratings:t,onAgree:n,onDisagree:r}=e;const l=Ut(),i=(0,a.useSelector)(v.ZP.selectors.getUserName),s=t.find((e=>{let{user:t}=e;return t===i})),c=[{text:b().text("Has left the practice"),onClick:()=>r(b().text("Has left the practice"))},{text:b().text("Has moved away"),onClick:()=>r(b().text("Has moved away"))},{text:b().text("Has passed away"),onClick:()=>r(b().text("Has passed away"))},{text:b().text("Has retired"),onClick:()=>r(b().text("Has retired"))},{text:b().text("Other"),onClick:()=>r(b().text("Other"))}];return o().createElement("div",{className:l.wrapper},o().createElement(H.Button,{onClick:n,variant:"text",size:"small",className:A()(l.button,l.likeButton,{[l.isActive]:5===(null==s?void 0:s.value)})},"Agree"),o().createElement(Le.Z,{buttonProps:{endIcon:o().createElement(ut.Z,null),variant:"text",size:"small",className:A()(l.button,{[l.isActive]:1===(null==s?void 0:s.value)})},buttonContent:1===(null==s?void 0:s.value)?s.comment:"Disagree",menuItems:c,menuId:"disagree-dropdown-menu-button"}))},Ft=(0,_.Z)((e=>({wrapper:{padding:"6px 16px 6px"},entityTypeIcon:{marginRight:"16px"},entityLabel:{color:e.palette.primary.main,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},entityLabelContainer:{wordBreak:"break-all",textDecoration:"none"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},ratings:{marginLeft:"auto"},showDetailsButton:{marginLeft:"16px",marginTop:"18px"},relationAttributes:{paddingLeft:"60px"},suggestedWrapper:{padding:"6px 8px 6px 16px",backgroundColor:e.suggested},commentsContainer:{alignSelf:"center","& + $ratings":{marginLeft:"16px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"}}))),Ht=e=>{let{connection:t,loadRelations:n,renderRelationArrowButton:l,acceptRelation:s,ignoreRelation:c}=e;const u=Ft(),p=t.suggested,[d,m]=(0,r.useState)(!1),{entity:f,relation:b}=t,h=(0,a.useSelector)(v.ZP.selectors.getMetadata),{entityLabel:y,entityType:x,preparedUri:E,relationLabel:w}=Je(t,h),C=(null==b?void 0:b.ratings)||[],S=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),P=f&&b&&(0,g.wp9)(g.q7e.RELATION,{entityUri:S,connection:t})||[];return o().createElement("div",{className:A()(u.wrapper,{[u.suggestedWrapper]:p})},o().createElement(H.Box,{display:"flex",minHeight:"44px",className:ht.U},o().createElement(H.Box,{display:"flex",alignItems:"center"},o().createElement(H.Box,{display:"flex",alignItems:"center"},l&&l(),o().createElement(Xe.Z,{entityType:x,className:u.entityTypeIcon})),o().createElement(H.Box,{display:"flex",flexDirection:"column"},o().createElement(_e.Z,{value:E,className:u.entityLabelContainer},o().createElement(Ke,{label:y,entity:f},o().createElement("span",{className:u.entityLabel},y))),w&&o().createElement("span",{className:u.relationLabel},w),!p&&o().createElement(Vt,{ratings:C,onAgree:()=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:"",value:5}).then(n)},onDisagree:e=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:e,value:1}).then(n)}}))),o().createElement("div",{className:u.additionalButtonsWrapper},!(0,i.isEmpty)(P)&&o().createElement(yt.Z,{className:u.commentsContainer,uri:(0,g.gjS)(b),relatedObjectUris:P,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),p&&o().createElement(rt,{acceptRelation:s(t),ignoreRelation:c(t)}),!p&&o().createElement(o().Fragment,null,o().createElement(zt,{ratings:C,className:u.ratings}),o().createElement(Nt,{show:d,onToggle:()=>{m((e=>!e))},className:u.showDetailsButton})))),d&&o().createElement(St,{connection:t,className:u.relationAttributes}))},Bt=e=>{let{className:t,connections:n=[],loadRelations:l,config:i,mainEnityUri:s}=e;const{isComplex:c,content:u}=i,{ignoreRelation:p,acceptRelation:d}=((e,t,n)=>{const r=it(e.inRelations,e.outRelations),o=(0,a.useDispatch)();return{ignoreRelation:e=>()=>{const{entity:a}=e;(0,g.iiD)(n,{relatedEntityUri:a.entityUri,relationType:r.type,relationDirection:r.direction}).then(t).catch((e=>{o(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))},acceptRelation:e=>()=>{const{entity:a,relation:l}=e,{startDate:i,endDate:s}=l,c=r.direction===g.Nsj.IN,u=c?a.entityUri:n,p=c?n:a.entityUri;(0,g.DsR)({startEntityUri:u,endEntityUri:p,relationType:r.type,attributes:null,startDate:i,endDate:s}).then(t).catch((e=>{o(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))}}})(u,l,s),m=(0,r.useMemo)((()=>(0,g.w3p)(n)),[n]),{getCommentsCount:f}=(0,r.useContext)(w.h);return(0,r.useEffect)((()=>{f(m)}),[f,m]),o().createElement("div",{className:t},n.map((e=>{var t,n;const r=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(gt,{config:i,connection:e,key:r},(t=>c?o().createElement(Ht,{loadRelations:l,connection:e,acceptRelation:d,ignoreRelation:p,renderRelationArrowButton:t}):o().createElement(Tt,{acceptRelation:d,ignoreRelation:p,connection:e,renderRelationArrowButton:t})))})))};Bt.displayName="RelationsList";const Wt=Bt,qt=(0,_.Z)((e=>({list:{paddingTop:"8px",paddingBottom:"10px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),Gt=e=>{let{isLoading:t,config:n,loadRelations:r,connections:l,total:i,parentEntityUri:s}=e;const c=qt(),{selectors:u}=v.ZP,p=(0,a.useSelector)(u.getEntity),d=(0,a.useSelector)(u.getMode),m=n["text-empty"]||b().text("No data found");return t?o().createElement(R.Z,null):(0,g.KIu)(d)?o().createElement(bt,{connections:l,className:c.list,key:null==p?void 0:p.uri,config:n,mode:d,noDataText:m,parentEntityUri:s}):i>0?o().createElement(Wt,{config:n,loadRelations:r,connections:l,className:c.list,key:null==p?void 0:p.uri,mainEnityUri:p.uri}):o().createElement(H.Typography,{className:c.noData},m)},$t=(0,_.Z)({container:{flexGrow:1,display:"flex",flexDirection:"column",minHeight:0},content:{position:"relative",display:"flex",flexGrow:1,flexDirection:"column",minHeight:0},pagination:{height:"52px",flexGrow:0,flexShrink:0}}),Xt=e=>{let{config:t,className:n}=e;const l=$t(),{page:s,setPage:c,rowsPerPage:u,sortOrder:p,sortOption:d,showInactive:m,searchQuery:f,changeSearchQuery:b}=(0,r.useContext)(Ze),{selectors:h}=v.ZP,y=(0,a.useSelector)((e=>h.getConnectionsWithDraftsByViewId(e,t.id))),x=(0,a.useSelector)(h.getEntity),E=(0,a.useSelector)((e=>h.getTotalByViewId(e,t.id))),w=(0,a.useSelector)(h.getMode),C=(0,r.useMemo)((()=>({order:p,field:d})),[p,d]);(0,r.useEffect)((()=>{b("")}),[null==x?void 0:x.uri]);const S=(0,r.useMemo)((()=>(e=>{const t=g.wSh.fromFalsy(e).map(g.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome("");return(new g.MEy).addClause(t).build()})(f)),[f]),{isLoading:P,reload:O}=(0,Ce.a)({sorting:C,filter:S,page:s,rowsPerPage:u,config:t,entity:x,relationActivityFilter:m?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY,mode:w}),N=(0,r.useMemo)((()=>(0,g.Px$)(y)),[y]),k=(0,r.useMemo)((()=>({reloadRelations:O,config:(0,i.pick)(["content","importFromDT","maxDtssImport"],t)})),[O,t]);return o().createElement(Se.X.Provider,{value:N},o().createElement(V.Z,{className:n},o().createElement("div",{className:l.container},o().createElement(Ae.Provider,{value:k},o().createElement(We,{title:t.caption,total:E})),o().createElement("div",{className:l.content},o().createElement(Gt,{isLoading:P,config:t,loadRelations:O,connections:y,total:E}),E>u&&o().createElement(F.Z,{classes:{root:l.pagination},count:E,rowsPerPageOptions:[],rowsPerPage:u,page:s,onChangePage:c})))))};Xt.displayName="RelationsView";const _t=o().createContext(null);_t.displayName="SingleAttributeContext";var Qt=n(86361),Yt=n(26180),Kt=n(31276);function Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){en(e,t,n[t])}))}return e}function en(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tn="CHANGE_SEARCH_QUERY",nn=Jt({},Yt.ZP.actions,{changeSearchQuery:(0,Kt.zD)(tn)}),rn=(e,t)=>t.type===tn?Jt({},e,{searchQuery:t.payload,page:0}):Yt.ZP.reducer(e,t);var on=n(92332),an=n(67353);const ln={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},sn=(0,_.Z)((()=>({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}},headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},"row-cell--removed":{pointerEvents:"none","& > div":ln}}))),cn=(0,an.Z)((e=>{const t=sn();return o().createElement("div",{className:t.headCell},o().createElement(on.default,e))}));var un=n(64091);function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dn=(0,i.pipe)((0,i.map)((e=>({id:(0,g.Tde)(e.uri),label:e.label,dataTypeDefinition:(0,g.PFL)(e)}))),(0,i.uniqBy)((0,i.prop)("id"))),mn=(0,i.pipe)(g.DK$,dn),gn=(0,i.pipe)((0,i.split)("."),(0,i.slice)(2,1/0)),fn=e=>{if((0,g.vZp)(e)){const t=gn(e);return t.length>1?t.slice(0,-1):null}return null},bn=(0,i.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pn(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:fn(e.id),headCellRenderer:cn,rowCellValueRenderer:un.Z})));var hn=n(99341);function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vn=n(52016),xn=n(1876),En=n(60894);const wn=(0,_.Z)((()=>({header:{padding:"0 4px 0 16px"}}))),Cn=e=>{let{title:t,searchQuery:n,onChangeSearchQuery:r,filtersEnabled:a,onToggleFilters:l,columnsData:i,selectedColumns:s,onChangeColumns:c}=e;const u=wn();return o().createElement(B.Z,{title:t,className:u.header},o().createElement($.i,{query:n,onChange:r}),o().createElement(xn.Z,{enabled:a,onClick:l}),o().createElement(q.Z,{height:24,margin:4}),o().createElement(En.Z,{columnsData:i,selectedColumns:s,onChangeColumns:c}))};function Sn(){return Sn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}const Pn=(0,n(32528).Z)(((e,t)=>{let{deletedUris:n}=e,{rowValue:{value:r}}=t;return{isRemoved:Boolean(n.find((e=>r.uri===e)))}}))((e=>{let{cell:t,CellValueRenderer:n,isRemoved:r,isSorted:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["cell","CellValueRenderer","isRemoved","isSorted"]);const i=sn();return o().createElement("div",{className:A()({[i["row-cell--sorted"]]:a,[i["row-cell--removed"]]:r},i.rowCell)},t.values.map(((e,t)=>o().createElement(n,Sn({key:t,value:e},l)))))}));var On=n(85709);const Nn=e=>{let{onEdit:t,onRemove:n}=e;return o().createElement(o().Fragment,null,t&&o().createElement(Oe.k,{tooltipTitle:b().text("Edit"),icon:Ge.Z,size:"L",onClick:t}),n&&o().createElement(Oe.k,{tooltipTitle:b().text("Remove"),icon:$e.Z,size:"L",onClick:n}))};function kn(){return kn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kn.apply(this,arguments)}const Zn=e=>{let{columnsData:t,values:n,sorting:l,onSort:s,filters:c,onFilter:u,config:p,onEdit:d,onDeleteAttribute:m,deletedUris:f}=e;const b=(0,r.useMemo)((()=>((e,t)=>e.map((e=>(0,i.pipe)((0,i.reduce)(((t,n)=>{let{id:r}=n;return(0,i.assoc)(r,((e,t)=>((e,t)=>(0,i.pipe)((0,i.path)(["value"]),(0,g.tT_)(e))(t))(gn(e),t))(r,e),t)}),{}),(0,i.assoc)("value",e))(t))))(n,t)),[n,t]),h=(0,r.useMemo)((()=>bn(t)),[t]),y=sn(),x=(0,a.useSelector)(v.ZP.selectors.getMode),E=(0,g.KIu)(x),w=(0,a.useSelector)(v.ZP.selectors.getMetadata),C=(0,a.useSelector)(v.ZP.selectors.getEntityUri),S=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,C)||{})),{attributeType:P}=(0,r.useContext)(_t),O=(0,r.useCallback)((e=>o().createElement(Pn,kn({},e,{isSorted:!!l&&l.field===e.columnData.id}))),[l]),[N,k]=(0,r.useState)(null),{canUpdate:Z,canDelete:T}=(0,vn.l)(),R=(0,r.useMemo)((()=>"number"!=typeof N||!E||f.includes((0,i.pipe)((0,i.path)([N]),(0,i.prop)("uri"))(n))),[N,f,n,E]),D="number"==typeof N&&(j=(0,i.path)([N],n),T(p)&&(0,g.xv5)({attributeType:P,mode:x,attributeValue:j,metadata:w,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,j)}));var j;const I="number"==typeof N&&(e=>Z(p)&&(0,g.yv0)({attributeType:P,mode:x,attributeValue:e,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,e)}))((0,i.path)([N],n)),L=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);I&&d(e)}),[d,N,n,I]),A=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);if(!D)return;const t={parentUri:C,attributeType:P,uri:e.uri,value:e};m(t),k(null)}),[N,n,m,D,P,C]),M=R||!D&&!I?void 0:o().createElement(Nn,{onEdit:I?L:void 0,onRemove:D?A:void 0}),z=(0,r.useMemo)((()=>({deletedUris:f})),[f]);return o().createElement("div",{className:y.tableContainer},o().createElement(On.Z,{columnsData:h,rowsData:b,sorting:l,onSort:s,filters:c,onFilter:u,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:O,onRowHover:k,hoverRowIndex:N,hoveredRowRightContent:M,context:z,classes:{hoveredRowRightContentWrapper:y["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:y["row-cell__buttons-container"]}}))},Tn=(0,_.Z)((()=>({actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}})));function Rn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dn=e=>{let{onChangeAttribute:t,onCancel:n,onApply:l,onDeleteAttribute:s,hasChanges:c,attributeValue:u}=e;const d=Tn(),m=(0,a.useSelector)(v.ZP.selectors.getEntityUri),{attributeType:f}=(0,r.useContext)(_t),h=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,m)||{})),y=(0,a.useSelector)(v.ZP.selectors.getMode),x=(0,a.useDispatch)(),E=(0,r.useContext)(p.m),w=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,x)(e.map((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Rn(e,t,n[t])}))}return e}({},e,{viewId:E}))))),[E,x]),C=(0,g.ZiX)(m),S=(0,a.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,m,f))),P=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,x),[x]);return o().createElement(o().Fragment,null,o().createElement(re.Z,{expanded:!0,attributeValue:u,showEmptyEditors:C,onDeleteAttribute:s,onDeactivateError:P,onChangeAttribute:t,onAddAttributes:w,mode:y,crosswalks:h.crosswalks,errors:S,attributeType:f,ownError:(0,g.ADq)(u,null,f.uri,S)}),o().createElement("div",{className:d.actionButtons},o().createElement(H.Button,{onClick:()=>{n(u)}},b().text("Cancel")),o().createElement(H.Button,{color:"primary",disabled:!c,onClick:()=>{l(u)}},b().text("Apply"))))},jn=(0,_.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",flex:1,overflow:"auto"},noData:{fontSize:"13px",paddingLeft:"20px",color:"rgba(0,0,0,0.54)"},tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},header:{padding:"0 4px 0 16px"},addButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{padding:"4px 16px"}})));function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ln(e,t,n[t])}))}return e}function Ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const An=[],Mn=e=>{let{config:t,className:n}=e;const{caption:l,max:s}=t,c=jn(),{values:u,page:d,setPage:m,isLoading:f,searchQuery:h,setSearchQuery:y,visibleColumns:x,onFilter:E,onSort:w,onToggleFilters:C,onChangeColumns:S,filters:P,sorting:O,totalVisibleValues:N,hasPaging:k,attributeType:Z,showTable:T}=(0,r.useContext)(_t),D=(0,r.useMemo)((()=>mn(Z)),[Z]),{checkHasChanges:j,onChangeAttribute:I,onDeleteAttribute:L,onAdd:M,onCancel:z,onApply:U,onStartEditing:W,modifiedValues:q,editingValues:G,deletedUris:$}=(()=>{const[e,t]=(0,r.useState)(),[n,o]=(0,r.useState)([]),l=(0,a.useSelector)(v.ZP.selectors.getMode);(0,r.useEffect)((()=>{o([]),t(null)}),[l]);const s=(0,a.useDispatch)(),c=(0,r.useContext)(p.m),{attributeType:u,values:d}=(0,r.useContext)(_t),m=(0,a.useSelector)(v.ZP.selectors.getEntityUri),f=(0,a.useSelector)(v.ZP.selectors.getMetadata),b=(0,r.useCallback)((e=>{(0,i.pipe)(v.N5.actions.modifyAttribute,s)(In({},e,{viewId:c}))}),[c,s]),h=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(In({},e,{viewId:c}))),[c,s]),y=(0,r.useCallback)((()=>{const e=(0,g.gjI)({parentUri:m,attributeType:u});t(e.uri),b(In({},e,{value:(0,g.GPx)({attributeTypes:u.attributes,parentUri:e.uri,mode:l,metadata:f}),attributeType:u}))}),[m,u]),x=(0,r.useCallback)((e=>{o((t=>t.find((0,i.propEq)("uri",e.uri))?t:[...t,e]))}),[o]),E=(0,r.useCallback)((e=>{const r=n.find((0,i.propEq)("uri",e.uri));if(r){const t=In({},e,{value:r,attributeType:u,uri:e.uri});o((e=>(0,i.without)([r],e))),b(t)}else{const n={value:e,attributeType:u,uri:e.uri};t(null),h(n)}}),[h,b,o,n]),w=(0,r.useCallback)((e=>{t(null),o((t=>{const n=t.find((0,i.propEq)("uri",e.uri));return n?(0,i.without)([n],t):t}))}),[o,t]),C=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,m)||{})),S=(0,g.KIu)(l),P=(0,g.xy8)(u),O=(0,i.pathOr)(An,[P,null==u?void 0:u.name],C),N=(0,r.useMemo)((()=>[...O.filter((0,i.pipe)((0,i.prop)("uri"),(0,i.both)(g.ZiX,(0,i.pipe)((0,i.equals)(e),i.not)))),...(0,i.map)((e=>O.find((0,i.propEq)("uri",e.uri))||e))(d)].map((e=>{var t;return null!==(t=n.find((0,i.propEq)("uri",e.uri)))&&void 0!==t?t:e}))),[O,n,e,d]),k=(0,r.useMemo)((()=>S?(0,i.pipe)((0,i.map)((0,i.prop)("uri")),(0,i.filter)((e=>!O.find((0,i.propEq)("uri",e)))))(d):[]),[O,d]),Z=O.filter((t=>{let{uri:r}=t;return r===e||n.find((0,i.propEq)("uri",r))}));return{checkHasChanges:e=>n.find((0,i.propEq)("uri",e.uri))!==e,onChangeAttribute:b,onDeleteAttribute:h,onAdd:y,onCancel:E,onApply:w,onStartEditing:x,modifiedValues:N,editingValues:Z,deletedUris:k}})(),X=(0,a.useSelector)(v.ZP.selectors.getMode),_=(0,g.KIu)(X),Q=_?q:u,{canCreate:Y}=(0,vn.l)(),K=Y(t)&&Z&&(0,g.Vg3)({attributeType:Z,mode:X})&&!G.length,J=(0,r.useMemo)((()=>x.map((e=>D.find((0,i.propEq)("id",e))))),[x,D]);return o().createElement(V.Z,{className:A()(c.root,n)},T?o().createElement(o().Fragment,null,o().createElement(Cn,{title:l,total:N,columnsData:D,selectedColumns:x,onChangeColumns:S,searchQuery:h,onChangeSearchQuery:y,filtersEnabled:!!P,onToggleFilters:C}),o().createElement("div",{style:{position:"relative"}},_&&o().createElement("div",{className:c.editor},K&&o().createElement(H.Button,{color:"primary",onClick:M,className:c.addButton},o().createElement(ee.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),G.map((e=>o().createElement(Dn,{key:e.uri,attributeValue:e,onChangeAttribute:I,onDeleteAttribute:L,onCancel:z,onApply:U,hasChanges:j(e)})))),o().createElement(Zn,{columnsData:J,config:t,values:Q,filters:P,onFilter:E,sorting:O,onSort:w,onEdit:W,onDeleteAttribute:L,deletedUris:$}),k&&o().createElement(F.Z,{count:N,rowsPerPageOptions:[],rowsPerPage:s,page:d,onChangePage:m}),f&&o().createElement(R.Z,null))):o().createElement(o().Fragment,null,o().createElement(B.Z,{title:l,className:c.header}),o().createElement(H.Typography,{className:c.noData},b().text("No data"))))};var zn=n(58600);let Un=0;const Vn=()=>Un++,Fn=e=>{const t={children:[],nodeId:Vn()};if(e.parentPaths)for(let n=0;n<e.parentPaths.length;n++){const r=e.parentPaths[n];let o=t;for(let t=r.length-1;t>=0;t--){const a=r[t],l=e.entities[a.entityUri],i=t===r.length-1,s={entity:l,children:[],nodeId:Vn(),expanded:!0,rootIndex:i?n+1:void 0};i&&(s.root=i),o.children.push(s),o=s}}return t.children},Hn=(0,_.Z)((e=>({container:{fontSize:"13px",display:"flex",paddingTop:"6px",position:"relative"},title:{flexGrow:1,minHeight:"15px",color:e.palette.secondary.main,lineHeight:"15px"},link:{cursor:"pointer",color:e.palette.secondary.main,lineHeight:"15px"},selected:{fontWeight:"bold"},wrapper:{width:"100%"},avatar:{height:"16px",width:"16px",marginRight:"8px",marginLeft:"8px"},header:{padding:"0 4px 0 16px"},treeContainer:{flexGrow:1,display:"flex",flexDirection:"column",height:"100%",minHeight:"372px",maxHeight:"507px",overflow:"auto"},tree:{flexGrow:1,height:0},buttonsContainer:{flexShrink:0,marginLeft:"auto","& > * + *":{marginLeft:"-4px"}},button:{padding:"8px"}})));var Bn=n(1242);const Wn=o().createContext(null);var qn=n(55400);const Gn=e=>{e.target.src=Bn},$n=e=>{let{node:t}=e;const n=Hn(),l=(0,a.useDispatch)(),i=t.entity.uri,s=(0,a.useSelector)(v.ZP.selectors.getAbsoluteImagePath),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,r.useContext)(Wn),p=(0,a.useSelector)(v.ZP.selectors.getUIPath),{uri:d}=(0,a.useSelector)(v.ZP.selectors.getEntity),m=(0,g.ChB)({uiPath:p,uri:i}),f=i===d,b=(0,r.useCallback)((()=>{l(v.ui.actions.openEntity({uri:i,viewId:u.id}))}),[l,u,i]),{entity:{label:h},nodeId:y}=t,x=(0,g.nt9)(c,t.entity.type)||{},E=(0,g.VD3)(c,x,"typeGraphIcon"),w=E&&(0,g.vPL)(s,E);return o().createElement("div",{className:n.wrapper,"data-node-id":y},o().createElement("div",{className:n.container},o().createElement(H.Avatar,{className:A()(n.avatar),src:w||Bn,onError:Gn}),o().createElement("span",{className:A()(n.link,{[n.selected]:f})},o().createElement(qn.Z,{to:m,onClick:b},h))))},Xn=((0,r.memo)($n),e=>{let{node:t}=e;return t.nodeId}),_n=(0,_.Z)((()=>({lineBlock:{height:"100%",position:"relative",display:"inline-block"},lineChildren:{height:"100%",position:"absolute",display:"inline-block"},rootIndex:{display:"flex",alignItems:"center",color:"rgba(0,0,0,0.54)",height:"100%"},verticalLine:{width:"1px",left:"50%",top:0,height:"50%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},horizontalLineRight:{height:"1px",top:"14px",left:"50%",width:"24%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},node:{minWidth:"100%",position:"relative",textAlign:"left",padding:"0 24px 0 18px",boxSizing:"border-box",whiteSpace:"normal","&:hover":{backgroundColor:"rgba(0,0,0,0.06)"}},nodeContent:{position:"absolute",top:0,bottom:0,paddingLeft:"18px",boxSizing:"border-box"},row:{display:"flex"},rowContents:{position:"relative",borderLeft:"none",paddingLeft:"4px",flex:"1 1 auto",width:0,display:"flex",verticalAlign:"middle",boxSizing:"border-box"},buttonWrapper:{display:"flex",paddingTop:"13px",width:"12px",cursor:"pointer"},collapsedButton:{transform:"rotate(-90deg)"},expandedButton:{transform:"rotate(0deg)"},button:{transition:"transform .15s ease",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid rgba(0, 0, 0, 0.54)"},rowTitle:{flex:"1 1 auto",width:0,paddingRight:"11px"}})));function Qn(){return Qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qn.apply(this,arguments)}function Yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kn(){return Kn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kn.apply(this,arguments)}const Jn={nodeContentRenderer:e=>{const t=(0,i.omit)(["connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","draggedNode","isSearchMatch","isSearchFocus","buttons","didDrop","children","treeId","isOver","parentNode","rowDirection"],e),{scaffoldBlockPxWidth:n,toggleChildrenVisibility:r,node:a,title:l,path:s,treeIndex:c,style:u}=t,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","node","title","path","treeIndex","style"]),d=l,m=r&&!a.root&&a.children&&a.children.length>0,g=_n();return o().createElement("div",Kn({style:{height:"100%"}},p,{key:a.nodeId}),m&&a.expanded&&o().createElement("div",{style:{width:n-2},className:g.lineChildren}),o().createElement("div",{className:g.row,style:u},o().createElement("div",{className:g.rowContents},m&&o().createElement("div",{className:g.buttonWrapper,onClick:()=>{r({node:a,path:s,treeIndex:c})}},o().createElement("div",{"aria-label":a.expanded?"Collapse":"Expand",className:A()(g.button,a.expanded?g.expandedButton:g.collapsedButton)})),o().createElement("div",{className:g.rowTitle},"function"==typeof d?d({node:a,path:s,treeIndex:c}):d))))},treeNodeRenderer:e=>{const t=(0,i.omit)(["listIndex","swapFrom","swapLength","swapDepth","draggedNode","getPrevRow","connectDropTarget","isOver","canDrop","treeIndex","treeId","path","rowDirection"],e),{children:n,scaffoldBlockPxWidth:r,lowerSiblingCounts:a,node:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["children","scaffoldBlockPxWidth","lowerSiblingCounts","node"]),c=_n(),u=a.length,p=[];a.forEach(((e,t)=>{p.push(o().createElement("div",{key:`pre_${1+t}`,style:{width:r},className:c.lineBlock},l.root&&o().createElement("div",{className:c.rootIndex},l.rootIndex,"."),t===u-1&&0!==t&&o().createElement(o().Fragment,null,o().createElement("div",{className:c.verticalLine}),o().createElement("div",{className:c.horizontalLineRight}))))}));const d=l.root?r-4:0,m=r*u-d,g={left:m,width:`calc(100% - ${m}px`},f=`${m+250}px`,b=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Yn(e,t,n[t])}))}return e}({},s.style,{width:f});return o().createElement("div",Qn({},s,{className:c.node,style:b}),p,o().createElement("div",{className:c.nodeContent,style:g},n))},scaffoldBlockPxWidth:16,rowHeight:28,slideRegionSize:50};function er(){return er=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},er.apply(this,arguments)}const tr=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",er({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".54"},o().createElement("path",{d:"M14.5 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm4 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm-17 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM4 4a2 2 0 110-4 2 2 0 010 4zm1 16a2 2 0 110-4 2 2 0 010 4zm4.5-6a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-2a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm6 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",fill:"#000"})))},nr=e=>{let{title:t,onGraphOpen:n}=e;const r=Hn();return o().createElement(B.Z,{title:t,className:r.header},o().createElement("div",{className:r.buttonsContainer},o().createElement(Oe.k,{className:r.button,tooltipTitle:b().text("Show Graph"),icon:tr,onClick:n,size:"L"})))};var rr=n(33165),or=n(59601);const ar=(0,_.Z)((()=>({root:{position:"relative"},bodyWrapper:{paddingTop:"21px"}})));function lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ir(e,t,n[t])}))}return e}function ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sr=n(14940);const cr=(0,_.Z)({resizableHandleContainer:{position:"relative",width:"100%",height:"inherit"},resizableHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"24px",zIndex:11,"&:hover $resizableHandle":{visibility:"visible"},".react-grid-item.static &:hover $resizableHandle":{visibility:"hidden"}},resizableHandle:{position:"absolute",width:"100%",display:"flex",justifyContent:"center",top:"-3px",zIndex:11,cursor:"move",visibility:"hidden"},dragIcon:{transform:"translateX(-50%) rotate(90deg)",color:"rgba(0, 0, 0, 0.3)"}}),ur=e=>{const t=t=>{const n=cr();return o().createElement("div",{className:n.resizableHandleContainer},o().createElement("div",{className:n.resizableHandleVisibilityArea},o().createElement("div",{className:A()("viewDraggableHandle",n.resizableHandle)},o().createElement(sr.Z,{className:n.dragIcon}))),o().createElement(e,t))};return t.displayName="WithResizableHandle",t},pr=(0,_.Z)({stubView:{padding:"20px"},fullHeight:{height:"100%"},component:{boxSizing:"border-box",overflow:"auto",boxShadow:"none",borderRadius:"unset"}});var dr=n(29103),mr=n(83911),gr=n(79485),fr=n(22385);const br=(0,i.pipe)((0,i.path)(["point","lat"]),(0,i.both)((0,i.gt)(90),(0,i.lt)(-90))),hr=(0,_.Z)((()=>({root:{height:"100%",display:"flex",flexDirection:"column"},fullHeight:{height:"100%"},fullscreenBtn:{position:"absolute",right:"5px",top:"5px",zIndex:100}})));var yr=n(13074),vr=n(24338);const xr=(0,_.Z)((e=>({caption:{color:e.palette.text.secondary,fontSize:"13px"}}))),Er=xr,wr=e=>{let{totalImages:t}=e;const n=Er(),r=t>1?b().text("photos"):b().text("photo");return o().createElement(H.Typography,{variant:"caption",className:n.caption},`${t} ${r}`)};function Cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Sr(e,t,n[t])}))}return e}function Sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pr=e=>{let{config:t,attributeType:n,paging:r,requestNextPageOfAttributeValues:l}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getEntity),u=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,c.uri)||{})),p=(0,i.pathOr)([],["attributes",n.name],u),d=t.id;return o().createElement(o().Fragment,null,o().createElement(vr.Z,{attributeValues:p,attributeType:n,onDeleteAttribute:e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(Cr({},e,{viewId:d})),parentUri:u.uri,onChangeAttribute:e=>(0,i.pipe)(v.N5.actions.modifyAttribute,s)(Cr({},e,{viewId:d})),imageSize:kr,paging:r,requestNextPageOfAttributeValues:l}),o().createElement(wr,{totalImages:p.length}))},Or=(0,_.Z)((e=>({container:{padding:"8px 16px"},noData:{fontSize:"13px",color:e.palette.text.secondary}}))),Nr=Or,kr={imageMargin:4,imageWidth:162,imageHeight:162};var Zr=n(28741);const Tr=(0,_.Z)((e=>({root:{display:"flex",flexDirection:"column"},matchesContainer:{position:"relative"},footer:{display:"flex",alignItems:"end",flexGrow:1,justifyContent:"flex-start",borderTop:"1px solid rgba(0,0,0, 0.12)",padding:"8px 16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},noData:{paddingLeft:"16px",paddingBottom:"16px",fontSize:"13px",color:"rgba(0,0,0,0.54)"}})));var Rr=n(49734),Dr=n(98808),jr=n(93428),Ir=n(30885);function Lr(){return Lr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lr.apply(this,arguments)}const Ar=e=>{let{config:t,match:n,onStartRequest:l,onFinishRequest:i}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,a.useSelector)(v.ZP.selectors.getEntity),{canMerge:d,canMark:m}=(0,g.hXd)(c,t,n.object,u,n.matchRules),f=(0,r.useMemo)((()=>[n.object]),[n.object]),b={entity:u,entities:f,mode:Dr.N.iconButton,onStartRequest:l},h=(0,r.useContext)(p.m),y=(0,r.useCallback)((()=>{i(),s(v.N5.entity.actions.loadEntity({viewId:h,uri:u.uri}))}),[s,u.uri,i,h]);return o().createElement(o().Fragment,null,d&&o().createElement(jr.H,Lr({},b,{onFinishRequest:y})),m&&o().createElement(Ir.i,Lr({},b,{onFinishRequest:i})))},Mr=e=>{let{config:t,entitiesMap:n,match:r,onFinishRequest:l,onStartRequest:i}=e;const s=(0,a.useSelector)(v.ZP.selectors.getMetadata),c=(0,a.useSelector)(v.ZP.selectors.getEntity);return o().createElement(Rr.M,{match:r,entity:c,entitiesMap:n,metadata:s,className:ht.U},o().createElement(yt.Z,{uri:(0,g.E_P)(c.uri,r.object.uri),relatedObjectUris:(0,g.wp9)(g.q7e.POTENTIAL_MATCH,{entityUri:c.uri,matchEntityUri:r.object.uri}),objectType:g.q7e.POTENTIAL_MATCH}),o().createElement(Ar,{match:r,config:t,onStartRequest:i,onFinishRequest:l}))},zr={showTransitiveMatches:!0,showInactiveEntities:!1},Ur={order:"asc",field:"score"};var Vr;!function(e){e[e.Loading=0]="Loading",e[e.NoData=1]="NoData",e[e.Loaded=2]="Loaded"}(Vr||(Vr={}));const Fr=ur((e=>{let{className:t}=e;const n=pr();return o().createElement(V.Z,{className:A()(n.stubView,"viewDraggableHandle",t)},"NOT IMPLEMENTED")})),Hr=ur((e=>{let{className:t,config:n}=e;return o().createElement(M.Z,{className:t,caption:n.caption,excludeUris:n.excludeUris,includeUris:n.includeUris,attributesCount:n.attributesCount,pinnedAttributes:n.pinnedAttributes})})),Br=ur((e=>{let{className:t,config:n}=e;const a=(e=>{const[t,n]=(0,r.useState)(""),[o,a]=(0,r.useState)(0),[l,i]=(0,r.useState)(!1),s=(0,r.useMemo)((()=>({page:o,searchQuery:t,showInactive:l})),[o,t,l]),c=Ee(e,s,!0),u=(0,r.useCallback)((()=>{a(0),i((e=>!e))}),[]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){we(e,t,n[t])}))}return e}({setSearchQuery:n,searchQuery:t,setPage:a,page:o,toggleShowInactive:u,showInactive:l},c)})(n);return o().createElement(z.Provider,{value:a},o().createElement(he,{config:n,className:t}))})),Wr=ur((e=>{let{config:t,className:n}=e;const l=(e=>{var t;const{attributeUri:n}=e,o=(0,a.useSelector)(v.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,g.zeJ)(o,n)),[o,n]),s=(0,r.useMemo)((()=>mn(l)),[l]),c=(0,r.useMemo)((()=>({searchQuery:"",filters:null,sorting:void 0,visibleColumns:s.filter((0,i.pipe)((0,i.prop)("dataTypeDefinition"),g.YkM,i.not)).map((e=>{let{id:t}=e;return t})).slice(0,5),page:0})),[s]),[u,p]=(0,r.useReducer)(rn,c),{searchQuery:d,filters:m,sorting:f,page:b}=u,h=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),y=(0,r.useMemo)((()=>{const e=((e,t)=>g.wSh.fromNull(t).map((t=>Object.entries(t).map((t=>{let[n,r]=t;const o=e.find((0,i.propEq)("id",n));return(0,hn.su)(o,r)})))).orSome([]))(s,m);return e.length?e:null}),[m,s]),x=(0,r.useMemo)((()=>(0,i.reject)(i.isNil,{filters:y,page:b,sorting:f,searchQuery:d})),[y,b,f,d]),{changeSearchQuery:E,changePage:w,toggleSort:C,changeFilter:S,toggleFilters:P,changeColumns:O}=(0,Qt.o)({actions:nn,dispatch:p}),N=Ee(e,x,!1);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){yn(e,t,n[t])}))}return e}({},u,{setSearchQuery:E,setPage:w,onSort:C,onFilter:S,onToggleFilters:P,onChangeColumns:O,showTable:Boolean(((null==N||null===(t=N.values)||void 0===t?void 0:t.length)||y||d||h)&&l&&!l.hidden)},N)})(t);return o().createElement(_t.Provider,{value:l},t&&o().createElement(Mn,{config:t,className:n}))})),qr=ur((e=>{let{config:t,className:n}=e;const a=(e=>{var t;const n=(0,r.useMemo)((()=>Object.entries(e.sortOptions||{}).map((e=>{let[t,n]=e;return{value:t,label:n}}))),[e.sortOptions]),o=e.max||15,[a,l]=(0,r.useState)(0),[i,s]=(0,r.useState)(e.sortOrder||"asc"),[c,u]=(0,r.useState)(null===(t=n[0])||void 0===t?void 0:t.value),[p,d]=(0,r.useState)(""),[m,g]=(0,r.useState)(!1),f=(0,r.useCallback)((()=>{l(0),g((e=>!e))}),[]),b=(0,r.useCallback)((()=>{l(0),s((e=>"asc"===e?"desc":"asc"))}),[]),h=(0,r.useCallback)((e=>{l(0),u(e)}),[]);return{searchQuery:p,changeSearchQuery:(0,r.useCallback)((e=>{l(0),d(e)}),[]),sortOrder:i,toggleSortOrder:b,sortOption:c,changeSortOption:h,sortOptions:n,page:a,setPage:l,rowsPerPage:o,showInactive:m,toggleShowInactive:f}})(t);return o().createElement(Ze.Provider,{value:a},o().createElement(Xt,{config:t,className:n}))})),Gr=ur((e=>{let{config:t,className:n}=e;const a=(0,r.useRef)(),[l,s]=(0,r.useState)(null),{height:c,width:u,tooltip:p}=t,{html:d,visible:m,tooltip:g,customStyles:f,onClosePopup:b,message:h}=(0,rr.E)(t),y=ar(),v=g||p;if((0,r.useEffect)((()=>{a.current&&d&&(a.current.innerHTML="",d.childNodes.forEach((e=>{a.current.appendChild(e)})),s(a.current))}),[d]),!m)return null;const x=(0,i.reject)(i.isNil,{width:u,height:c}),E=o().createElement("div",{ref:a,style:lr({},x,f),className:A()(y.root,n)});return o().createElement("div",{className:y.bodyWrapper},v?o().createElement(H.Tooltip,{title:v},E):E,o().createElement(or.Z,{placement:"bottom",anchorEl:l,open:!!h,onClose:b},h))})),$r=ur((e=>{let{config:t,className:n}=e;const l=(0,a.useSelector)(v.ZP.selectors.getEntityUri),{treeData:i,setTreeData:s}=((e,t)=>{const n=(0,ye._)(),[o,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>((0,g.ZiX)(e)||n((0,g.RFJ)({uri:e,graphUri:t})).then(Fn).then(a).catch((e=>{console.warn(e)})),()=>{a([])})),[e,t,n]),{treeData:o,setTreeData:a}})(l,t.graph.type),c=Hn(),u=(0,a.useDispatch)(),{id:p,graph:d}=t,m=(0,r.useCallback)((()=>{u(v.ui.actions.openGraph({viewId:p,graphType:d.type}))}),[u,p,d]),f=(0,r.useCallback)((e=>({title:o().createElement($n,{node:e.node})})),[]);return o().createElement(V.Z,{className:n},o().createElement(nr,{onGraphOpen:m,title:t.caption}),o().createElement(Wn.Provider,{value:t},o().createElement("div",{className:c.treeContainer},o().createElement("div",{className:c.tree},o().createElement(zn.ZP,{isVirtualized:!1,treeData:i,canDrag:!1,theme:Jn,generateNodeProps:f,onChange:s,getNodeKey:Xn})))))})),Xr=ur((e=>{let{config:t,className:n}=e;const l=Tr(),s=(0,a.useSelector)(v.ZP.selectors.getEntity),c=(0,g.wwR)(s),[u,d]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>{d(!0)}),[]),f=(0,r.useCallback)((()=>{d(!1)}),[]),{matches:h,entitiesMap:y,loadMatches:x,total:E}=(0,Zr.s)({enabled:!!c,entity:s,options:zr,filter:"",page:0,sorting:Ur,rowsPerPage:3,onStartLoading:m,onFinishLoading:f}),C=(0,r.useCallback)((()=>{x()}),[x]),S=(0,a.useDispatch)(),P=(0,r.useContext)(p.m),O=(0,r.useCallback)((()=>{S(v.ui.actions.openPerspective({perspectiveId:"potentialMatches",viewId:P}))}),[S,P]),N=(0,r.useMemo)((()=>(0,g.NVY)(c,(0,i.map)(g.ev7,h))),[c,h]),{getCommentsCount:k}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{k(N)}),[k,N]);const Z=E>3&&!(0,i.isEmpty)(h),T=u?Vr.Loading:(0,i.isEmpty)(h)?Vr.NoData:Vr.Loaded;return o().createElement(Se.X.Provider,{value:y},o().createElement(V.Z,{className:A()(l.root,n)},o().createElement(B.Z,{title:t.caption}),o().createElement("div",{className:l.matchesContainer},T===Vr.Loading&&o().createElement(R.Z,null),T===Vr.NoData&&o().createElement(H.Typography,{className:l.noData},b().text("No matches found")),T===Vr.Loaded&&h.map((e=>o().createElement(Mr,{config:t,entitiesMap:y,match:e,onFinishRequest:C,onStartRequest:m,key:e.object.uri})))),Z&&o().createElement(o().Fragment,null,o().createElement("div",{className:l.footer},o().createElement(H.Link,{component:"button",variant:"caption",onClick:O,underline:"none"},b().text("See all"))))))})),_r=(0,r.lazy)((()=>n.e(6596).then(n.bind(n,46596)).then((e=>({default:ur(e.HierarchyTreeView)}))))),Qr=(0,r.lazy)((()=>n.e(4361).then(n.bind(n,14361)).then((e=>({default:ur(e.RelationshipsTableView)}))))),Yr=ur((e=>{let{config:t,isFullscreen:n,onToggleFullscreen:l,className:i}=e;const s=hr(),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,a.useSelector)(v.ZP.selectors.getEntity),p=(0,a.useSelector)(v.ZP.selectors.getGoogleMapKey),{markers:d,loading:m}=((e,t,n)=>{const[o,a]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0),s=(0,ye._)();return(0,r.useEffect)((()=>{i(!0),s((0,g.DBr)(t,[e],n)).then((e=>{a(e.filter(br))})).catch((()=>{a([])})).finally((()=>{i(!1)}))}),[e,t,n,s]),{markers:o,loading:l}})(u,c,p),f=(0,r.useMemo)((()=>o().createElement("div",{className:s.fullHeight},o().createElement(R.Z,null))),[s]),b=(0,r.useMemo)((()=>({lat:0,lng:0})),[]);return p&&o().createElement(V.Z,{className:A()(s.root,i)},m&&o().createElement(R.Z,null),o().createElement(fr.Z,{size:"S",icon:n?mr.Z:dr.Z,onClick:()=>l(t.id),className:s.fullscreenBtn}),o().createElement(gr.Z,{loadingElement:f,defaultZoom:1,defaultCenter:b,markers:d,mapContainerClassName:s.fullHeight,mapKey:p}))})),Kr=ur((e=>{let{config:t,className:n}=e;const{attributeUri:l}=t,s=Nr(),c=(0,a.useDispatch)(),u=(0,a.useSelector)(v.ZP.selectors.getMode),p=(0,a.useSelector)(v.ZP.selectors.getEntityWithDiff),d=(0,a.useSelector)(v.ZP.selectors.getMetadata),m=(0,g.zeJ)(d,l),f=(0,i.pathOr)([],["attributes",null==m?void 0:m.name],p),h=(0,i.path)(["attributes","paging",l],p),y=f.length,x=t["text-empty"]||b().text("No data found"),E=(0,r.useCallback)((e=>c(v.N5.actions.requestNextPageOfAttributeValues(e))),[c]);return o().createElement(V.Z,{className:n},o().createElement(B.Z,{title:t.caption}),o().createElement("div",{className:s.container},(()=>{if(m){if((0,g.KIu)(u)){const e={attributeType:m,config:t,paging:h,requestNextPageOfAttributeValues:E};return o().createElement(Pr,e)}if(y>0){const e={attributeValues:f,attributeType:m,imageSize:kr,paging:h,parentUri:p.uri,requestNextPageOfAttributeValues:E};return o().createElement(o().Fragment,null,o().createElement(yr.Z,e),o().createElement(wr,{totalImages:y}))}}return o().createElement(H.Typography,{className:s.noData},x)})()))}));class Jr{}Jr.ViewTypes=g.ZIY,Jr.getComponentBy=(e,t)=>{let{store:n,config:r,className:a,isFullscreen:l,onToggleFullscreen:i}=t;switch(r[e]){case Jr.ViewTypes.HierarchyTree:return o().createElement(_r,{config:r,store:n,className:a});case Jr.ViewTypes.HierarchyPaths:return o().createElement($r,{config:r,className:a});case Jr.ViewTypes.RelationsTable:return o().createElement(Qr,{config:r,store:n,className:a});case Jr.ViewTypes.Relations:return o().createElement(qr,{config:r,className:a});case Jr.ViewTypes.Attributes:return o().createElement(Hr,{className:a,config:r});case Jr.ViewTypes.SingleAttributeView:return o().createElement(Br,{config:r,className:a});case Jr.ViewTypes.TableAttributeView:return o().createElement(Wr,{config:r,className:a});case Jr.ViewTypes.MapView:return o().createElement(Yr,{config:r,isFullscreen:l,onToggleFullscreen:i,className:a});case Jr.ViewTypes.CustomView:return o().createElement(Gr,{config:r,className:a});case Jr.ViewTypes.ImageAttributeView:return o().createElement(Kr,{config:r,className:a});case Jr.ViewTypes.PotentialMatchesView:return o().createElement(Xr,{config:r,className:a})}},Jr.getComponent=e=>Jr.getComponentBy("class",e)||Jr.getComponentBy("react-class",e)||o().createElement(Fr,{className:e.className});const eo=Jr,to=()=>null,no=(0,r.memo)((e=>{let{config:t,store:n,isFullscreen:a,isAutosize:l,onToggleFullscreen:i}=e;const s=pr();return o().createElement(r.Suspense,{fallback:o().createElement(to,null)},eo.getComponent({config:t,store:n,className:A()(s.component,{[s.fullHeight]:!l}),isFullscreen:a,onToggleFullscreen:i}))}));no.displayName="ViewComponent";const ro=(0,_.Z)((e=>({item:e.basicView,fixedSizeContainer:{height:"100%"}})));function oo(){return oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oo.apply(this,arguments)}const ao=["onConfigChanged","onRemove"],lo=e=>{var t;let{layoutItemConfig:n,views:l,className:s,children:c,style:u,isFullscreen:p,onToggleFullscreen:d,AutosizeComponent:m}=e,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["layoutItemConfig","views","className","children","style","isFullscreen","onToggleFullscreen","AutosizeComponent"]);const b=l.find((e=>{let{id:t}=e;return n.i===t})),h=ro(),{store:y}=(0,r.useContext)(a.ReactReduxContext);if(!b)return null;const v=b.class===eo.ViewTypes.CustomView;return v&&(null==b||null===(t=b.action)||void 0===t?void 0:t.platform)===g.X1H.CLASSIC?null:o().createElement("div",oo({},(0,i.omit)(ao,f),{style:u,className:A()(s,{[h.item]:!v})}),o().createElement("div",{className:A()({[h.fixedSizeContainer]:!m})},m,o().createElement(no,{store:y,config:b,isFullscreen:p,onToggleFullscreen:d,isAutosize:Boolean(m)})),c)},io=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a}=e;return o().createElement(I.Z,{LayoutItem:lo,views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"})};var so=n(72753),co=n(43576),uo=n(57304),po=n(3409),mo=n(93873),go=n(22860);function fo(){return fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}const bo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",fo({width:"19",height:"17",viewBox:"0 0 19 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z",id:"svg1467685497a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",{transform:"translate(-4 -2.5)"},o().createElement("mask",{id:"svg1467685497b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg1467685497a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1467685497b)",d:"M0 0h24v24H0z"}))))};function ho(){return ho=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ho.apply(this,arguments)}const yo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ho({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().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:"svg2383396984a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg2383396984b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg2383396984a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2383396984b)",d:"M0 0h24v24H0z"})))},vo=(0,_.Z)({editingButtons:{display:"flex","& button + button":{width:"88px",marginLeft:"8px"}},searchResults:{width:"150px",height:"25px",backgroundColor:"#ccc"},comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}});function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Eo(e,t,n[t])}))}return e}function Eo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wo=e=>o().createElement(H.SvgIcon,e,o().createElement(bo,null)),Co=e=>o().createElement(H.SvgIcon,e,o().createElement(yo,null)),So=(e,t,n,r,o)=>e.filter((e=>{let{value:a,permission:l}=e;return!(n&&!(0,g.KIu)(a))&&!!(r&&o||!(0,g.fnZ)(a))&&(0,g.uGe)(l,t)})),Po=e=>{let{className:t,profileBandConfig:n}=e;const l=vo(),s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getCanUserStartProcessFromQuery),u=(0,a.useSelector)(v.ZP.selectors.getEntityWithoutDiff),p=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,u.uri))),d=(0,a.useSelector)(v.ZP.selectors.getMetadata),m=(0,a.useSelector)(v.ZP.selectors.isWorkflowEnabled),f=(0,a.useSelector)(v.ZP.selectors.getMode),h=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),y=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),x=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),E=(0,a.useSelector)(v.ZP.selectors.getProfileOperation),w=null==u?void 0:u.type,C=(0,r.useMemo)((()=>(0,g.nt9)(d,w)),[w,d]),S=E===g.OXy.Saving,P=E===g.OXy.Cloning||S,[O,N]=(0,r.useState)(!1),k=(0,r.useCallback)((()=>{N(!1)}),[]),Z=(e=>{let{cloneAction:t,onCloneDiscard:n}=e;const o=(0,a.useSelector)(v.ZP.selectors.getEntityWithoutDiff),l=(0,a.useSelector)(v.ZP.selectors.getMetadata),s=(0,a.useDispatch)(),c=null==o?void 0:o.type,u=l.relationTypes,p=(0,r.useCallback)((0,g.Ian)(l,c),[l,c]),d=(0,g.nt9)(l,c),m=(0,r.useMemo)((()=>(0,i.when)((0,i.complement)(i.isNil),(0,i.pipe)((0,i.find)((0,i.pipe)((0,i.propOr)([],"entityTypeUris"),(0,i.either)((0,i.includes)(c),(0,i.includes)("*")))),(0,i.when)((0,i.complement)(i.isNil),(0,i.omit)(["entityTypeUris"]))))(t)),[t,c]),f=(0,r.useCallback)((()=>{if(m){const e=(0,i.pipe)((0,i.prop)("relationshipTypesToCopy"),(0,i.cond)([[i.isNil,(0,i.pipe)((0,i.always)(d),(0,i.propOr)([],"attributes"),(0,i.filter)(g.YkG),(0,i.map)(g.ZaZ))],[(0,i.includes)("*"),(0,i.pipe)((0,i.always)(u||[]),(0,i.map)((0,i.prop)("uri")),(0,i.filter)(p))],[i.T,i.identity]]))(m);s(v.N5.entity.actions.entityCloneRequested({data:xo({},(0,i.pick)(["attributeReplacementMapping"],m),{relationshipTypesToCopy:e}),entityUri:o.uri}))}n()}),[m,n,d,u,o.uri,p]);return m?f:void 0})({cloneAction:null==n?void 0:n.cloneAction,onCloneDiscard:k}),T=(0,r.useMemo)((()=>[{label:b().text("Editing"),value:g.fO_.EDITING,description:b().text("Edit profile directly"),icon:co.Z,permission:"UPDATE"},{label:b().text("Suggesting"),value:g.fO_.SUGGESTING,description:b().text("Suggest changes and initiate a workflow review"),icon:wo,permission:"INITIATE_CHANGE_REQUEST"},{label:b().text("Viewing"),value:g.fO_.VIEWING,description:b().text("Suggest changes and initiate a workflow review"),icon:so.Z,permission:"READ"}]),[]),R=(0,r.useMemo)((()=>[...Z?[{label:b().text("Clone"),value:"Clone",description:b().text("Create a copy of the profile"),icon:Co,onClick:()=>N(!0),permission:"CREATE"}]:[],{label:b().text("Delete"),value:"Delete",description:b().text("Permanently delete profile"),icon:$e.Z,onClick:()=>{window.confirm(b().text("Are you sure you want to delete this?"))&&s(v.N5.entity.actions.entityRemoveRequested({entityUri:u.uri}))},permission:"DELETE"}]),[s,u.uri,Z]),D=!x&&!(0,g.biM)(u)&&!(e=>(0,g.uGe)(g.BDP.READ,e)&&!(0,g.uGe)(g.BDP.UPDATE,e)&&!(0,g.uGe)(g.BDP.DELETE,e)&&!(0,g.uGe)(g.BDP.INITIATE_CHANGE_REQUEST,e))(C),j=(0,g.ZiX)(null==u?void 0:u.uri),I=(0,r.useMemo)((()=>So(T,C,j,m,c)),[T,C,m,c,j]),L=(0,r.useMemo)((()=>So(R,C,j,m,c)),[R,C,m,c,j]),M=(0,r.useCallback)((e=>{s(v.N5.mode.actions.modeUpdated(e))}),[s]),z=(0,r.useCallback)((()=>{s(v.N5.mode.actions.modeCancelEditing())}),[s]),U=(0,r.useCallback)((()=>{s(v.N5.actions.saveProfile())}),[s]);return o().createElement(o().Fragment,null,o().createElement(uo.Z,{className:A()(t,ht.U),entity:h&&p?p:u},o().createElement(H.Box,{display:"flex",alignItems:"center"},o().createElement(H.Box,{mr:3},h&&o().createElement(H.Box,{className:l.editingButtons},o().createElement(H.Button,{variant:"outlined",onClick:z,"data-reltio-id":"reltio-profile-cancel-editing",disabled:P},b().text("Cancel")),o().createElement(H.Button,{variant:"contained",color:"primary","data-reltio-id":"reltio-profile-save-profile",onClick:U,disabled:P},(0,g.fnZ)(f)?b().text("Suggest"):b().text("Save"))),x&&y?o().createElement(po.Z,null):y&&o().createElement(mo.a,null)),D&&o().createElement(go.T,{optionsGroup:I,buttonsGroup:L,value:f,onChange:M,disabled:P})),o().createElement(H.Box,{className:l.comments},o().createElement(yt.Z,{uri:u.uri,relatedObjectUris:(0,g.wp9)(g.q7e.ENTITY,{entityUri:u.uri}),objectType:g.q7e.ENTITY}))),!!Z&&o().createElement(Fe.Z,{open:O,title:b().text("Do you want to create a clone of the profile?"),content:b().text("Cloning will create a copy of the current profile. You can modify the cloned profile in the next step. Are you sure you want to proceed?"),onSave:Z,onDiscard:k,saveCaption:b().text("Proceed"),discardCaption:b().text("Cancel")}))};var Oo=n(71820),No=n(85890),ko=n(26789),Zo=n(54362),To=n(6674),Ro=n(91515),Do=n(52043),jo=n(17308),Io=n(39827),Lo=n(80147),Ao=n(76569);const Mo=(0,_.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0},badge:{fontSize:"12px",height:"18px",minWidth:"18px",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px"}}),zo=()=>{const{total:e}=(0,r.useContext)(Z.O),t=Mo();return o().createElement(H.Badge,{badgeContent:e,classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(Ao.Z,null))};var Uo=n(26313),Vo=n(9371),Fo=n(4426);const Ho=(0,_.Z)({wrapper:{overflow:"auto",paddingRight:"12px"},showMoreLink:{display:"flex",margin:"16px"},showMoreIcon:{fontSize:"1rem"}}),Bo=()=>{const e=Ho(),{getComments:t,comments:n,pageToken:l}=(0,r.useContext)(w.h),i=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant);(0,r.useEffect)((()=>{t(i)}),[t,i]);const s=(0,Uo.Q)(n);return o().createElement(Se.X.Provider,{value:s},o().createElement(H.Box,{className:e.wrapper},n.map((e=>{const{objectId:t,relatedObjectUris:n,objectType:r,commentId:a}=e;return o().createElement(Vo.J,{key:a,uri:t,relatedObjectUris:n,objectType:r,comment:e})})),l&&o().createElement(H.Link,{component:"button",variant:"caption",className:e.showMoreLink,onClick:()=>{t(i,l)},underline:"none"},o().createElement(Fo.Z,{className:e.showMoreIcon}),b().text("Show more"))))};var Wo=n(34120);const qo=(0,_.Z)({wrapper:{overflow:"auto",position:"relative",height:"100%"}}),Go=()=>{const e=qo(),{tasks:t,loading:n}=(0,r.useContext)(Z.O);return o().createElement("div",{className:e.wrapper},n&&o().createElement(R.Z,null),t&&t.map((e=>o().createElement(Wo.s,{key:e.taskId,task:e}))))};function $o(){return $o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}const Xo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",$o({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"svg2697213709a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",null,o().createElement("g",{transform:"translate(-2 -2)"},o().createElement("mask",{id:"svg2697213709b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg2697213709a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2697213709b)",d:"M0 0h24v24H0z"})))))},_o=()=>{const{commentsMap:e}=(0,r.useContext)(w.h),t=Mo();return o().createElement(H.Badge,{badgeContent:(0,g.mdt)(e),classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(Xo,null))};var Qo=n(10159);const Yo=()=>o().createElement(Qo.Z,{text:b().text("Ready to go with the flow?"),secondaryText:b().text("Suggest a change or submit a match review, and we’ll kick off a workflow task to get things going.")}),Ko=()=>o().createElement(Qo.Z,{text:b().text("Care to join the conversation?"),secondaryText:b().text("Leave comments for team members anywhere in the Profile page, and we’ll record it here.")});function Jo(){return Jo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jo.apply(this,arguments)}let ea;!function(e){e[e.Workflow=0]="Workflow",e[e.Collaboration=1]="Collaboration",e[e.History=2]="History"}(ea||(ea={}));const ta=e=>{if(e)return 1===e?b().text("${total} item",{total:e}):b().text("${total} items",{total:e})},na=()=>{var e,t,n;const l=Mo(),s=(0,a.useSelector)(v.ZP.selectors.isWorkflowSideViewEnabled),c=(0,a.useSelector)(v.ZP.selectors.isWorkflowEnabled),u=(0,a.useSelector)(v.ZP.selectors.isCollaborationSideViewEnabled),p=(0,a.useSelector)(v.ZP.selectors.isCollaborationEnabled),d=(0,a.useSelector)(v.ZP.selectors.getHistoryEvent),m=(0,a.useSelector)(v.ZP.selectors.getMetadata),f=(0,a.useSelector)(v.ZP.selectors.getEntity),h=(0,r.useContext)(Z.O),y=(0,r.useContext)(w.h),[x,E]=(0,r.useState)(null),C=(0,r.useCallback)((e=>{E((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{E(null)}),[]),P=null!==x,O=x===ea.History,{isHistoryEnabled:N,isProfilePersisted:k}=(0,Oo.C)({isHistoryTabActive:O,entity:f}),{historyFilter:T,onApplyFilter:R,isLoading:D,historicUris:j,historyWithTotal:I,canLoadMore:L,onLoadMore:A}=(0,No.k6)({entity:f,enabled:N}),M=s&&c&&!(0,g.ZiX)(null==f?void 0:f.uri),z=u&&p,U=(0,g.mdt)(null==y?void 0:y.commentsMap),V=[{buttonProps:{id:ea.Workflow,icon:zo,tooltipTitle:b().text("Workflow")},content:null!=h&&h.total?o().createElement(Go,null):o().createElement(Yo,null),headerProps:{mainTitle:b().text("Workflow"),secondTitle:ta(null==h?void 0:h.total),rightContent:o().createElement(ko.G,null)},hidden:!M},{buttonProps:{id:ea.Collaboration,icon:_o,tooltipTitle:b().text("Collaboration")},content:U?o().createElement(Bo,null):o().createElement(Ko,null),headerProps:{mainTitle:b().text("Collaboration"),secondTitle:ta(U)},hidden:!z},{buttonProps:{id:ea.History,icon:Lo.Z,tooltipTitle:b().text("History")},content:k?o().createElement(Zo.Z,{isLoading:D,historyWithTotal:I,contributorsUris:j,entityUri:null==f?void 0:f.uri,historyEvent:d,onLoadMore:A,canLoadMore:L}):o().createElement(To.Z,null),headerProps:{content:o().createElement(Ro.Z,{total:k?((null==j?void 0:j.length)||0)+1:void 0,entityType:(0,g.nt9)(m,null==f?void 0:f.type),filter:T,onApplyFilter:R})}}],F=(0,i.reject)((0,i.propEq)("hidden",!0))(V);return(0,r.useEffect)((()=>{var e;null!==(e=V[x])&&void 0!==e&&e.hidden&&S()}),[x,V,S,F]),o().createElement("div",{className:l.wrapper},o().createElement(Do.h,{open:P,width:480},!(null!==(e=V[x])&&void 0!==e&&e.hidden)&&o().createElement(o().Fragment,null,o().createElement(jo.P,Jo({},null===(t=V[x])||void 0===t?void 0:t.headerProps,{onClose:S})),null===(n=V[x])||void 0===n?void 0:n.content)),o().createElement(Io.G,{buttonsProps:(0,i.pipe)((0,i.reject)((0,i.propEq)("hidden",!0)),(0,i.pluck)("buttonProps"))(V),onButtonClick:C,activeIndexId:x}))};var ra=n(39781),oa=n(16715);const aa="48px",la="1px solid rgba(0, 0, 0, .125)",ia=(0,_.Z)((e=>({accordion:{borderTop:la,borderBottom:la,fontSize:"13px",boxShadow:"none","&:not(:first-child)":{borderTop:0},"&:before":{display:"none"},"&$accordionExpanded":{margin:"auto"}},accordionExpanded:{},accordionSummary:{display:"flex",alignItems:"center",height:aa,minHeight:aa,"&$accordionSummaryExpanded":{height:aa,minHeight:aa}},accordionSummaryHeading:{flex:1,fontSize:e.typography.pxToRem(13),fontWeight:e.typography.fontWeightRegular},accordionSummaryExpanded:{},accordionSummaryContent:{display:"flex",alignItems:"center"},accordionDetails:{maxHeight:"21vh",overflow:"auto",paddingTop:0,paddingBottom:0,"& ul":{paddingLeft:"23px",marginTop:"3px"},"& li":{paddingLeft:"9px",paddingBottom:"8px"}},parents:{color:e.palette.text.primary},errorsAccordion:{backgroundColor:"#FFF4F6",borderColor:"#FFB8B3"},errorsAccordionDetails:{color:"#DD2C00"},warningsAccordion:{backgroundColor:"#FFF9ED",borderColor:"#FFDD91"},warningsAccordionDetails:{color:"#CC7500"},icon:{marginRight:"8px"},errorIcon:{fill:"#FF1744"},warningIcon:{fill:"#F9A825"}}))),sa=ia;var ca=n(38016);const ua=(0,r.memo)((e=>{let{panels:t,expandedPanelId:n,onToggle:r,ErrorComponent:a}=e;const l=sa();return t.length>0?o().createElement("div",null,t.map((e=>{let{id:t,icon:i,title:s,items:c,accordionClassName:u,accordionDetailsClassName:p}=e;return o().createElement(H.Accordion,{key:t,square:!0,expanded:n===t,onChange:r(t),className:u,classes:{root:l.accordion,expanded:l.accordionExpanded}},o().createElement(H.AccordionSummary,{classes:{root:l.accordionSummary,expanded:l.accordionSummaryExpanded,content:l.accordionSummaryContent},expandIcon:o().createElement(ca.Z,null)},i,o().createElement(H.Typography,{className:l.accordionSummaryHeading},s)),o().createElement(H.AccordionDetails,{className:A()(l.accordionDetails,p)},o().createElement("ul",null,c.map(((e,t)=>o().createElement(a,{key:t,error:e}))))))}))):null}));ua.displayName="ErrorsPanel";const pa=(0,i.omit)(["deactivated","path"]),da=(0,r.memo)((e=>{let{error:t}=e;const n=sa(),r=((e,t)=>{let{type:n,source:r,message:o,attributeTypeUri:a="",attributeType:l}=t;if(n===g.NIO.missed&&r===g.zHr.local){const t=l||(0,g.zeJ)(e,a);return t?b().text("${attribute} is required",{attribute:t.label}):o}return o})((0,a.useSelector)(v.ZP.selectors.getMetadata),t),l=(e=>{let{path:t,uri:n}=e;return null==t?void 0:t.slice(0,n?t.length-1:t.length).filter((e=>{let{type:t}=e;return[g.HAc.attributeValue,g.HAc.relationConnection].includes(t)})).map((e=>{let{label:t}=e;return t})).filter(i.identity).join(" / ")})(t);return o().createElement("li",null,o().createElement("span",null,r),l&&o().createElement(o().Fragment,null,o().createElement("br",null),o().createElement("span",{className:n.parents},l)))}));da.displayName="Error";const ma=()=>{const e=sa(),t=(e=>{const t=(0,r.useRef)(e);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,i.equals)(e.map(pa),t.map(pa))}(e,t.current)||(t.current=e),t.current})((0,a.useSelector)(v.ZP.selectors.getProfileErrors)),[n,l]=(0,r.useMemo)((()=>(0,i.partition)(g.IT0,t)),[t]),[s,c]=(0,r.useState)(null),u=(0,r.useMemo)((()=>[{id:"errors",title:b().text("${number} ${errors}",{number:n.length,errors:1===n.length?b().text("error"):b().text("errors")}),icon:o().createElement(ra.Z,{className:A()(e.icon,e.errorIcon)}),items:n,accordionClassName:e.errorsAccordion,accordionDetailsClassName:e.errorsAccordionDetails},{id:"warnings",title:b().text("${number} ${warnings}",{number:l.length,warnings:1===l.length?b().text("warning"):b().text("warnings")}),icon:o().createElement(oa.Z,{className:A()(e.icon,e.warningIcon)}),items:l,accordionClassName:e.warningsAccordion,accordionDetailsClassName:e.warningsAccordionDetails}].filter((e=>{let{items:t}=e;return t.length>0}))),[n,l,e]);(0,r.useEffect)((()=>{c("errors")}),[n]);const p=(0,r.useCallback)((e=>(t,n)=>{c(n?e:null)}),[]);return u.length>0?o().createElement(ua,{panels:u,expandedPanelId:s,onToggle:p,ErrorComponent:da}):null},ga=(0,_.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},scrollWrapper:{flexGrow:1,overflowY:"auto"},emptyState:{backgroundColor:"#FAFAFA",height:"100%"},profileWrapper:e=>{let{maxWidth:t}=e;return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,maxWidth:t?`${t}px`:"100%"}},profileContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var fa=n(87685);const ba=(0,_.Z)((()=>({closeIcon:{paddingRight:"12px",boxSizing:"content-box","& path":{fill:"#fff"}},snackbar:{"& > div":{flexWrap:"nowrap",alignItems:"baseline"}}}))),ha=e=>{let{notification:t}=e;const n=ba({}),l=(0,a.useDispatch)(),i=(0,a.useSelector)(v.ZP.selectors.getAutoCloseInterval),s=t.autoHideDuration||i&&1e3*i||5e3,[c,u]=(0,r.useState)(),[p,d]=(0,r.useState)(!0),m=(0,r.useCallback)(((e,n)=>{"clickaway"!==n&&(l(v.ui.actions.closeNotification(t.id)),d(!1))}),[t]),g=(0,r.useCallback)((()=>{c.cancelAction&&l(c.cancelAction),u(void 0)}),[c]),f=(0,r.useCallback)((()=>{l(c.applyAction),u(void 0),l(v.ui.actions.closeNotification(t.id))}),[c,t]),h=o().createElement(o().Fragment,null,t.actions.map((e=>o().createElement(H.Button,{key:e.label,color:"primary",size:"small",onClick:()=>{e.needConfirmation?u(e):l(e.applyAction),d(!1)}},e.label)))),y=o().createElement(o().Fragment,null,o().createElement(fr.Z,{className:n.closeIcon,size:"S",icon:fa.default,onClick:m}),t.text);return o().createElement(o().Fragment,null,o().createElement(H.Portal,{container:document.body},o().createElement(H.Snackbar,{autoHideDuration:s,open:p,classes:{root:n.snackbar},action:h,onClose:m,anchorOrigin:{vertical:"bottom",horizontal:"center"},message:y})),o().createElement(Fe.Z,{open:!!c,title:null==c?void 0:c.confirmationText,content:null==c?void 0:c.confirmationDescription,onSave:f,onDiscard:g,saveCaption:b().text("Proceed"),discardCaption:b().text("Cancel")}))},ya=()=>{const e=(0,a.useSelector)(v.ZP.selectors.getNotifications);return e?o().createElement(o().Fragment,null,e.slice(-1).map((e=>o().createElement(ha,{key:e.id,notification:e})))):null},va={},xa=(0,r.memo)((e=>{let{config:t,saveState:n,getSavedState:l}=e;const i=ga({maxWidth:null==t?void 0:t.maxWidth}),s=(0,a.useDispatch)(),c=(0,r.useCallback)((()=>l().then((e=>e.layout?{}:e))),[l]),u=(0,r.useRef)(),p=(0,r.useCallback)((0,g.DsO)(n,1e3),[n]),d=(0,a.useSelector)(v.ZP.selectors.getEntity),m=d?d.type:null,{isLoaded:f,savedState:h=va}=(0,x.w)({getSavedState:c,saveState:p,entityTypeUri:m}),[I,L]=(0,r.useState)([]),[A,M]=(0,r.useState)([]),z=(0,r.useMemo)((()=>y()(t)),[t]),U=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),V=(0,r.useMemo)((()=>(0,g.dvH)(d)),[d]),F=(0,E.C)({objectIds:V}),H=(0,r.useContext)(w.h),B=(0,C.U)(),W=(0,S.v)(null==t?void 0:t.workflow),q=(0,a.useSelector)(v.ZP.selectors.getHistoryEvent);(0,P.a)({entity:d,historyEvent:q});const G=(0,O.u)();(0,r.useEffect)((()=>{if(f){const e=z!==h.configHash,{views:n,layout:r}=(0,g.Mfk)({views:e||!h.views?t.views:h.views,layout:e?t.layout:h.layout});M(n),L(r)}}),[f,h,m]),(0,r.useEffect)((()=>{s(v.N5.views.actions.profileViewsSet(A))}),[s,A]),(0,r.useEffect)((()=>{t.sidePanelViews&&s(v.N5.sidePanelViews.actions.sidePanelViewsLoaded(t.sidePanelViews))}),[t]),(0,r.useEffect)((()=>{u.current&&(u.current.scrollTop=0)}),[null==d?void 0:d.uri]),(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(v.ZP.selectors.getValidateReadMode),n=(0,a.useSelector)(v.ZP.selectors.getEntity)||{},{uri:o,updatedTime:l}=n,i=(0,g.biM)(n),s=(0,a.useSelector)(v.ZP.selectors.getMode),c=(0,a.useSelector)(v.ZP.selectors.getProfileViews),u=c&&c.length>0,p=(0,r.useCallback)((0,g.DsO)((t=>{t&&e(v.N5.actions.validateProfile())}),500),[e]);(0,r.useEffect)((()=>{const e=t&&!i&&o&&!(0,g.ZiX)(o)&&s===g.ARY.Viewing&&u;p(e)}),[p,i,t,l,o,s,u])})();const $=(0,r.useCallback)((e=>{p({[m]:{layout:e,views:A,configHash:z}}),L(e)}),[p,z,A,m]),X=u.current,_=(0,r.useMemo)((()=>({element:X,priority:["top","bottom"]})),[X]);return o().createElement(N.j.Provider,{value:!0},o().createElement(k.s.Provider,{value:B},o().createElement(w.h.Provider,{value:U?H:F},o().createElement(Z.O.Provider,{value:W},o().createElement(T.m.Provider,{value:G},o().createElement("div",{className:i.perspectiveView},(!f||!(null!=d&&d.uri))&&o().createElement(R.Z,null),f&&null!=d&&d.uri?o().createElement("div",{className:i.profileContainer},o().createElement("div",{className:i.profileWrapper},o().createElement(Po,{profileBandConfig:t.profileBand}),!U&&o().createElement(ma,null),o().createElement("div",{ref:u,className:i.scrollWrapper},o().createElement(D.p.Provider,{value:_},o().createElement(io,{layout:I,onLayoutChanged:$,views:A})))),o().createElement(na,null)):o().createElement("div",{className:i.emptyState},o().createElement(j.ZP,{LogoRenderer:j.B9.NO_DATA,text:b().text("No data to display."),variant:j.tC.embedded})),o().createElement(ya,null)))))))}));xa.displayName="ProfilePerspectiveView";const Ea=(0,s.createGenerateClassName)({productionPrefix:"profilePerspective",disableGlobal:!0}),wa=e=>{let{config:t,store:n,onResize:f=i.identity,saveState:b,getSavedState:h,qxSandboxApi:y}=e;const v=(0,r.useCallback)((0,g.aYu)(h),[h]),x=(0,r.useMemo)((()=>t&&(0,g.Vr9)(t)),[t]);return o().createElement(a.Provider,{store:n},o().createElement(p.m.Provider,{value:null==x?void 0:x.id},o().createElement(d.Y.Provider,{value:y},o().createElement(s.StylesProvider,{generateClassName:Ea},o().createElement(u.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(o().Fragment,null,o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>f(Math.floor(e),Math.floor(t))}),x&&o().createElement(xa,{config:x,saveState:b,getSavedState:v}),o().createElement(m.Z,{showErrorFromStore:!0})))))))};var Ca=n(82842),Sa=n(51229),Pa=n(91131);const Oa=(0,_.Z)((e=>({titleContainer:{overflow:"hidden",fontSize:"16px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",alignItems:"center",display:"flex",minHeight:"48px",color:e.palette.text.secondary},link:{fontSize:"16px",fontWeight:"normal"},icon:{height:"18px",color:e.palette.text.secondary},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500}}))),Na=e=>{let{total:t=0}=e;const n=Oa(),l=(0,a.useDispatch)(),i=(0,r.useContext)(p.m),s=(0,r.useCallback)((()=>{l(v.ui.actions.openPerspective({perspectiveId:"profile",viewId:i}))}),[l,i]);return o().createElement(B.Z,{title:""},o().createElement("div",{className:n.titleContainer},o().createElement(H.Link,{component:"button",variant:"caption",className:n.link,onClick:s,underline:"none"},b().text("Profile")),o().createElement(Pa.Z,{className:n.icon}),b().text("Tags")),o().createElement(Sa.Z,null),o().createElement(H.Typography,{className:n.totalCaption,variant:"caption"},o().createElement("span",{className:n.totalNumber},b().number(t,"0,0")),b().text("total profiles")))};var ka=n(20404);const Za=(0,_.Z)((e=>({toolbar:{display:"flex",flexShrink:0,background:"white",borderBottom:"1px solid rgba(0,0,0,0.1)",boxSizing:"border-box",paddingLeft:"16px"},avatar:{color:"rgba(0, 0, 0, 0.38)",marginRight:"12px"},label:{fontSize:"20px",letterSpacing:"0.25px",lineHeight:"1.2",fontWeight:500,color:e.palette.text.primary,wordBreak:"break-word"}}))),Ta=e=>{let{label:t}=e;const n=Za();return o().createElement(H.Toolbar,{className:n.toolbar},o().createElement(ka.Z,{className:n.avatar}),o().createElement(H.Typography,{variant:"h6",className:n.label},t))};function Ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Da(e,t,n[t])}))}return e}function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ja=(0,_.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflow:"hidden",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},tagsContainer:{display:"flex"},fullHeight:{flexGrow:1,height:0},tagsView:{margin:"16px",width:"100%",paddingTop:"4px"},listContainer:{flex:1,display:"flex",overflow:"hidden",position:"relative",flexDirection:"column",minHeight:"4px"},entitiesList:{overflowY:"auto",flexGrow:1},pagination:{flexGrow:0}}))),Ia=[25,50,100],La=(0,r.memo)((e=>{let{tag:t,entityUri:n}=e;const l=ja(),[s,c]=(0,r.useState)(Ia[0]),[u,p]=(0,r.useState)(0),d=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions);(0,r.useEffect)((()=>{p(0)}),[t,n,d]);const{isLoading:m,total:f,entities:h}=(e=>{let{tag:t,entityUri:n,page:o=0,rowsPerPage:l=50}=e;const s=(0,a.useDispatch)(),c=(0,ye._)(),u=(0,ye._)(),[p,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(0),[h,y]=(0,r.useState)([]),{requestEntities:x,requestTotal:E}=(e=>{let{entityUri:t,tag:n}=e;const o=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),l=(0,a.useSelector)(v.ZP.selectors.getTenant),s=(0,a.useSelector)(v.ZP.selectors.getDtssPath),c=(0,r.useMemo)((()=>(0,g.Do$)(t)),[t]),u=(0,r.useMemo)((()=>[{filter:"equals",fieldName:"tags",values:[n]}]),[n]),p=!!c,d=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=Ra({select:"uri,label,type,secondaryLabel,defaultProfilePicValue,startDate,endDate"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return p?(0,g.uqV)({filters:e,options:t,customerTenant:l,dataTenant:c,dtssPath:s}).then((0,i.map)((0,i.assoc)("dataTenant",c))):(0,g.ZOr)(e,t)}),[p,c,l,s]);return{requestEntities:(0,r.useCallback)(((e,t)=>d(u,Ra({offset:t,max:e},o))),[u,o,d]),requestTotal:(0,r.useCallback)((()=>{const e=o;return(p?(0,g.J$m)({filters:u,options:e,customerTenant:l,dataTenant:c,dtssPath:s}):(0,g.j_Q)(u,e)).then((e=>e.total))}),[u,o,p,c,l,s])}})({entityUri:n,tag:t}),w=(0,r.useCallback)((e=>{s(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))),f(0)}),[s]);return(0,r.useEffect)((()=>{c(E()).then(f).catch(w)}),[E,c,w]),(0,r.useEffect)((()=>{d(!0),u(x(l,o*l)).then(y).catch(w).finally((()=>d(!1)))}),[o,l,x,u,w]),{isLoading:p,total:m,entities:h}})({tag:t,entityUri:n,page:u,rowsPerPage:s}),y=(0,r.useRef)(null);(0,r.useEffect)((()=>{y.current&&(y.current.scrollTop=0)}),[h]);const x=f>Ia[0];return o().createElement("div",{className:l.perspectiveView},o().createElement(Ta,{label:t}),o().createElement("div",{className:A()(l.tagsContainer,{[l.fullHeight]:x})},o().createElement(V.Z,{className:l.tagsView},o().createElement(Na,{total:f}),o().createElement("div",{className:l.listContainer},m&&o().createElement(R.Z,null),f>0&&o().createElement("div",{className:l.entitiesList,ref:y},o().createElement(Ca.Z,{entities:h})),x&&o().createElement("div",{className:l.pagination},o().createElement(F.Z,{count:f,rowsPerPageOptions:Ia,rowsPerPage:s,page:u,onChangePage:p,onChangeRowsPerPage:c}))))))}));La.displayName="TagPerspectiveView";const Aa=(0,s.createGenerateClassName)({productionPrefix:"tagPerspective",disableGlobal:!0}),Ma=e=>{let{config:t,tag:n,entityUri:r,store:l,onResize:u=i.identity}=e;return o().createElement(a.Provider,{store:l},o().createElement(p.m.Provider,{value:t.id},o().createElement(s.StylesProvider,{generateClassName:Aa},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>u(Math.floor(e),Math.floor(t))}),t&&o().createElement(La,{tag:n,entityUri:r}),o().createElement(m.Z,{showErrorFromStore:!0}))))}},1242:(e,t,n)=>{e.exports=n.p+"5271a9e7b6651c852e93.png"}}]);
package/4418.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4418,4689],{4190:(e,t,r)=>{r.d(t,{wE:()=>h,ni:()=>b,ZP:()=>x});var n=r(7560),o=r(54530),a=r(24328),i=(r(13980),r(6277)),l=r(35111),s=r(41262),c=r(15459),u=r(62339),p=r(27556),d=r(97580),m=r(39265),f=r(60364),g={left:"right",right:"left",top:"down",bottom:"up"};function h(e){return-1!==["left","right"].indexOf(e)}function b(e,t){return"rtl"===e.direction&&h(t)?g[t]:t}var v={enter:m.x9.enteringScreen,exit:m.x9.leavingScreen},y=a.forwardRef((function(e,t){var r=e.anchor,c=void 0===r?"left":r,m=e.BackdropProps,h=e.children,y=e.classes,x=e.className,w=e.elevation,C=void 0===w?16:w,E=e.ModalProps,Z=(E=void 0===E?{}:E).BackdropProps,O=(0,o.Z)(E,["BackdropProps"]),S=e.onClose,k=e.open,P=void 0!==k&&k,A=e.PaperProps,I=void 0===A?{}:A,R=e.SlideProps,T=e.TransitionComponent,D=void 0===T?u.Z:T,j=e.transitionDuration,N=void 0===j?v:j,M=e.variant,B=void 0===M?"temporary":M,L=(0,o.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),H=(0,f.Z)(),F=a.useRef(!1);a.useEffect((function(){F.current=!0}),[]);var V=b(H,c),W=a.createElement(p.Z,(0,n.Z)({elevation:"temporary"===B?C:0,square:!0},I,{className:(0,i.Z)(y.paper,y["paperAnchor".concat((0,d.Z)(V))],I.className,"temporary"!==B&&y["paperAnchorDocked".concat((0,d.Z)(V))])}),h);if("permanent"===B)return a.createElement("div",(0,n.Z)({className:(0,i.Z)(y.root,y.docked,x),ref:t},L),W);var z=a.createElement(D,(0,n.Z)({in:P,direction:g[V],timeout:N,appear:F.current},R),W);return"persistent"===B?a.createElement("div",(0,n.Z)({className:(0,i.Z)(y.root,y.docked,x),ref:t},L),z):a.createElement(l.Z,(0,n.Z)({BackdropProps:(0,n.Z)({},m,Z,{transitionDuration:N}),BackdropComponent:s.Z,className:(0,i.Z)(y.root,y.modal,x),open:P,onClose:S,ref:t},L,O),z)}));const x=(0,c.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(y)},62339:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(7560),o=r(54530),a=r(24328),i=(r(13980),r(75047)),l=r(90708),s=r(75614),c=r(85974),u=r(60364),p=r(39265),d=r(41070);function m(e,t){var r=function(e,t){var r,n=t.getBoundingClientRect();if(t.fakeTransform)r=t.fakeTransform;else{var o=window.getComputedStyle(t);r=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,i=0;if(r&&"none"!==r&&"string"==typeof r){var l=r.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),i=parseInt(l[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(a-n.left,"px)"):"right"===e?"translateX(-".concat(n.left+n.width-a,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(i-n.top,"px)"):"translateY(-".concat(n.top+n.height-i,"px)")}(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}var f={enter:p.x9.enteringScreen,exit:p.x9.leavingScreen};const g=a.forwardRef((function(e,t){var r=e.children,p=e.direction,g=void 0===p?"down":p,h=e.in,b=e.onEnter,v=e.onEntered,y=e.onEntering,x=e.onExit,w=e.onExited,C=e.onExiting,E=e.style,Z=e.timeout,O=void 0===Z?f:Z,S=e.TransitionComponent,k=void 0===S?s.ZP:S,P=(0,o.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),A=(0,u.Z)(),I=a.useRef(null),R=a.useCallback((function(e){I.current=i.findDOMNode(e)}),[]),T=(0,c.Z)(r.ref,R),D=(0,c.Z)(T,t),j=function(e){return function(t){e&&(void 0===t?e(I.current):e(I.current,t))}},N=j((function(e,t){m(g,e),(0,d.n)(e),b&&b(e,t)})),M=j((function(e,t){var r=(0,d.C)({timeout:O,style:E},{mode:"enter"});e.style.webkitTransition=A.transitions.create("-webkit-transform",(0,n.Z)({},r,{easing:A.transitions.easing.easeOut})),e.style.transition=A.transitions.create("transform",(0,n.Z)({},r,{easing:A.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",y&&y(e,t)})),B=j(v),L=j(C),H=j((function(e){var t=(0,d.C)({timeout:O,style:E},{mode:"exit"});e.style.webkitTransition=A.transitions.create("-webkit-transform",(0,n.Z)({},t,{easing:A.transitions.easing.sharp})),e.style.transition=A.transitions.create("transform",(0,n.Z)({},t,{easing:A.transitions.easing.sharp})),m(g,e),x&&x(e)})),F=j((function(e){e.style.webkitTransition="",e.style.transition="",w&&w(e)})),V=a.useCallback((function(){I.current&&m(g,I.current)}),[g]);return a.useEffect((function(){if(!h&&"down"!==g&&"right"!==g){var e=(0,l.Z)((function(){I.current&&m(g,I.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[g,h]),a.useEffect((function(){h||V()}),[h,V]),a.createElement(k,(0,n.Z)({nodeRef:I,onEnter:N,onEntered:B,onEntering:M,onExit:H,onExited:F,onExiting:L,appear:!0,in:h,timeout:O},P),(function(e,t){return a.cloneElement(r,(0,n.Z)({ref:D,style:(0,n.Z)({visibility:"exited"!==e||h?void 0:"hidden"},E,r.props.style)},t))}))}))},74443:(e,t,r)=>{var n=r(14859);t.Z=void 0;var o=n(r(24328)),a=(0,n(r(50175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddCircle");t.Z=a},99144:(e,t,r)=>{var n=r(14859);t.Z=void 0;var o=n(r(24328)),a=(0,n(r(50175)).default)(o.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=a},45767:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(24328),o=r.n(n),a=r(7560),i=r(72379);const l=(s=o().createElement("path",{d:"M7 10l5 5 5-5z"}),(c=o().memo(o().forwardRef((function(e,t){return o().createElement(i.Z,(0,a.Z)({ref:t},e),s)})))).muiName=i.Z.muiName,c);var s,c},7785:(e,t,r)=>{r.d(t,{Z:()=>S});var n=r(24328),o=r.n(n),a=r(71153),i=r.n(a),l=r(87918),s=r.n(l),c=r(38402),u=r(94079),p=r(88611),d=r(58991),m=r(83348),f=r(55299),g=r(31276),h=r(71543);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 v=e=>o().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M10 18h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1H8V8H6a1 1 0 01-1-1V3a1 1 0 011-1h6a1 1 0 011 1v4a1 1 0 01-1 1h-2v3h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v5z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));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 x=e=>o().createElement("svg",y({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("rect",{fill:"#000",x:9,y:9,width:6,height:6,rx:1,stroke:"none",strokeWidth:1,fillRule:"evenodd"})),w=(0,r(79692).Z)({container:{"& > $marginWrapper:first-child":{paddingLeft:"4px"}},listItem:{paddingLeft:"1px",paddingTop:"2px",paddingBottom:"2px",transition:"none","&:hover":{"& $itemAfter":{background:"linear-gradient(to right, rgba(235, 235, 235, 0.2), rgba(235, 235, 235, 1) 100%)"}},"&$listItemFocus":{"& $itemAfter":{background:"linear-gradient(to right, rgba(219, 219, 219, 0.2), rgba(219, 219, 219, 1) 100%)"}},"&:focus":{outline:"none"}},listItemFocus:{},icon:{opacity:.29,width:"16px",height:"16px",flexShrink:0,marginRight:"6px",marginLeft:"8px"},recommendedIcon:{width:"18px",height:"18px",marginRight:"5px",marginLeft:"7px",flexShrink:0},logoIcon:{width:"18px",height:"18px",flexShrink:0,marginRight:"4px"},itemAfter:{position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)"},itemText:{padding:"0",margin:0,"& span":{fontSize:"0.8125rem",letterSpacing:"normal",whiteSpace:"nowrap"}},checkbox:{opacity:.34,padding:0,marginLeft:"14px","&$checked":{opacity:1,background:"none"}},checked:{},marginWrapper:{display:"flex",alignItems:"center"},defaultCursor:{cursor:"default"},itemTooltip:{margin:"4px 0"},marginText:{marginLeft:"21px"},itemTextWrapper:{display:"flex",alignItems:"center"}}),C=e=>{let{attrType:t={}}=e;const r=w(),n=(e=>{switch(e.type){case d.oS0.TYPE_IMAGE:case d.oS0.TYPE_NESTED:return h.Z;case d.oS0.TYPE_REFERENCE:return v;default:return x}})(t);return o().createElement(n,{className:r.icon})};var E=r(31269);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 O=(0,m.Z)((e=>o().createElement("svg",Z({width:13,height:18,viewBox:"0 0 13 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("g",{transform:"translate(-3 -1)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("path",{fill:"#FF4081",d:"M5.833 10h3.75v6.667l-3.75 1.666z"}),o().createElement("path",{fill:"#CE0C4E",d:"M13.333 10v8.333l-3.75-1.666V10z"}),o().createElement("circle",{fill:"#FFC058",cx:9.583,cy:7.917,r:6.25}),o().createElement("circle",{fill:"#FFCD7B",cx:9.583,cy:7.917,r:5.417}),o().createElement("path",{fill:"#FFFBB5",d:"M8.333 11.667L5 8.462l.933-.898 2.4 2.308L13.4 5l.933.897z"}))))),S=(0,n.memo)((e=>{let{groupId:t,data:r,checked:n=!1,isFocused:a=!1,isRequired:l=!1,label:m,labelInText:h,level:b,onClick:v=g.ZT,hideCheckBox:y=!1,hideIcon:x=!1,notSelectable:Z=!1,disableHorizontalScrollbar:S=!1,style:k={},subItemMargin:P=20,LogoIcon:A,className:I}=e;const R=w(),{attrType:T}=r||{},D=!(y&&(0,d.QZu)(T)||Z),j=!!A;return o().createElement(p.C,{value:h||m,className:R.itemTooltip,placement:"bottom-end"},o().createElement(c.Z,{className:i()(R.container,R.listItem,{[R.defaultCursor]:!D},I),onClick:D?()=>v(r,!n,t):void 0,style:k,dense:!0,button:D,classes:{focusVisible:R.listItemFocus,selected:R.listItemFocus},selected:a,tabIndex:-1},!y&&o().createElement(u.Checkbox,{checked:n,disableRipple:!0,disabled:!D,className:i()(R.checkbox,{[R.checked]:n}),tabIndex:-1}),o().createElement(E.Z,{margin:P,level:b,className:R.marginWrapper},o().createElement(o().Fragment,null,!x&&(e=>"recommended"===t?o().createElement(O,{className:R.recommendedIcon,tooltipTitle:s().text("Recommended"),showForDisabled:!0}):o().createElement(C,{attrType:e}))(T),o().createElement("div",{className:i()(R.itemTextWrapper,{[R.marginText]:x})},j&&o().createElement(A,{className:R.logoIcon}),o().createElement(u.ListItemText,{primary:o().createElement(o().Fragment,null,m,l&&o().createElement(f.Z,null)),className:R.itemText})))),D&&S&&o().createElement("div",{className:R.itemAfter})))}))},95464:(e,t,r)=>{r.d(t,{Z:()=>L});var n=r(24328),o=r.n(n),a=r(52730),i=r(17440),l=r(59431),s=r(58991);function c(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){u(e,t,r[t])}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const p=(e,t,r,n)=>{const o=(0,s.jFi)(e,{type:r}),a=t.label||t.name;return{title:a,pathToTitle:Array.isArray(n)?[o,...n,a]:[o,a],fieldName:(0,s.Tde)(t.uri),entityTypeUri:r,attrType:t}},d=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=c({},n(e,t,r,o),{uri:t.uri}),i=t.children?t.children.map((a=>d(e,a,r,n,o.concat(t.label)))):[];return i.length&&(a.children=i),a},m=(e,t)=>{let r;const n=(e,t)=>{for(const o of t){if(e===o.fieldName)return void(r=o);"children"in o&&n(e,o.children)}};return n(e,t),r},f=(e,t)=>e?e.find((e=>e.value===t)):null;var g=r(87918),h=r.n(g),b=r(6782),v=r(31517),y=r(79692);const x=(0,y.Z)({dropDownSelector:{width:"100%"}}),w=(0,n.memo)((e=>{let{rowData:t,rowContext:r,textFieldInputRef:a}=e;const l=x(),{attribute:{attrType:c={},fieldName:u=null}={},filter:p,id:d}=t||{},{changeFilter:m}=r,g=c&&u&&(0,i.pipe)(s.d3Y,(0,i.map)((e=>({value:e,label:(0,b.Z)((0,s.XS2)(e))}))))(c,u),y=(0,n.useCallback)((e=>{const t={fieldName:u,filter:e.value,values:[]};m(t,d)}),[m,d,u]);return(0,n.useEffect)((()=>{(u&&!p||u&&!f(g,p))&&y(g[0])}),[u,p,y,g]),o().createElement(v.Z,{label:"",height:40,isDisabled:!g,placeholder:h().text("Equals"),value:f(g,p),options:g,onChange:y,className:l.dropDownSelector,textFieldInputRef:a})}));var C=r(87685),E=r(74443),Z=r(8818);function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O.apply(this,arguments)}const S=e=>o().createElement("svg",O({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",focusable:"false"},e),o().createElement("defs",null,o().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.444zM8 8v12h12V8H8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Duplicate_svg__a"})),o().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"Duplicate_svg__b",fill:"#fff"},o().createElement("use",{xlinkHref:"#Duplicate_svg__a"})),o().createElement("g",{mask:"url(#Duplicate_svg__b)",fill:"#000",fillOpacity:.54},o().createElement("path",{d:"M0 0h24v24H0z"})))),k=(0,y.Z)((()=>({actions:{width:"88px",height:"24px",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0,"& >span":{cursor:"pointer",display:"flex"},"& $actionIcon":{cursor:"pointer",color:"rgba(0, 0, 0, .54)"}},actionIcon:{}}))),P=(0,n.memo)((e=>{let{rowData:t,rowContext:r}=e;const a=k(),{id:i,attribute:l}=t||{},{addRowAfterIndex:s,removeRow:c,duplicateRow:u}=r,p=(0,n.useCallback)((()=>{s(i)}),[s,i]),d=(0,n.useCallback)((()=>{u(i)}),[u,i]),m=(0,n.useCallback)((()=>{c(i)}),[i,c]);return o().createElement("div",{className:a.actions},o().createElement(Z.k,{tooltipTitle:h().text("Add"),icon:E.Z,size:"M",onClick:p}),l&&o().createElement(Z.k,{tooltipTitle:h().text("Duplicate"),icon:S,size:"M",onClick:d}),o().createElement(Z.k,{tooltipTitle:h().text("Delete"),icon:C.default,size:"M",onClick:m}))}));var A=r(41315),I=r(99757);const R=(0,n.memo)((e=>{let{rowData:t,rowContext:r,attributeSelectorProps:a}=e;const{attribute:i,id:l,filter:c}=t||{},{changeFilter:u,addNewFilter:p,attributesGroup:d}=r,m=(0,n.useCallback)((e=>(0,s.e6O)({data:e})),[]),f=(0,n.useMemo)((()=>[{id:"",title:"",attributes:d}]),[d]),g=(0,n.useCallback)((e=>{if(t){const t={fieldName:e.attribute.fieldName,filter:c,values:[]};u(t,l)}else p({fieldName:e.attribute.fieldName,filter:null,values:[]})}),[p,u,l,t,c]);return o().createElement(I.Z,{itemsGroups:f,ungroup:!0,single:!0,value:i,getLabel:m,onSelect:g,onOpenPopup:a.onOpen})}));var T=r(24754);const D=(0,y.Z)((()=>({input:{margin:0,borderRadius:"4px",width:"100%",paddingTop:0,paddingBottom:0},root:{borderRadius:"4px 4px 0 0",padding:0,display:"flex",alignItems:"center",margin:0},valuesEditor:{width:"222px!important",minHeight:"40px",flexShrink:0}}))),j=(0,n.memo)((e=>{let{rowData:t,rowContext:r}=e;const a=D(),i=(null==t?void 0:t.attribute)&&(0,s.wNf)(t.filter),{changeFilter:l}=r,{values:c=[],attribute:{attrType:u={},fieldName:p=null}={},filter:d,id:m}=t||{},f=u&&(0,s.PFL)(u),g=f&&(0,s.l1V)(f,d),h=(0,n.useMemo)((()=>({filter:d,fieldName:p,values:c||[]})),[d,p,c]),b=(0,n.useMemo)((()=>({InputProps:{classes:{root:a.input}}})),[a]),v=(0,n.useMemo)((()=>({root:a.root})),[a]),y=(0,n.useCallback)((e=>{l({fieldName:p,filter:d,values:e},m)}),[l,m,p,d]);return o().createElement("div",{className:a.valuesEditor},(null==t?void 0:t.attribute)&&i&&o().createElement(T.Z,{filter:h,onChange:y,dataTypeDefinition:g,fullWidth:!0,TextFieldProps:b,color:"primary",classes:v,orientation:"horizontal"}))})),N=(0,y.Z)((()=>({attrSelector:{width:"222px",height:"40px",flexShrink:0},filterSelector:{width:"180px",flexShrink:0,marginTop:0,marginBottom:0},actionContainer:{alignItems:"center",marginRight:"15px"}}))),M={fieldName:null,filter:null,values:[]},B=()=>null,L=(0,n.memo)((e=>{let{attributeTypes:t,filters:r,onChange:c}=e;const u=(0,a.useSelector)(l.ZP.selectors.getMetadata),f=(0,s.nt9)(u,(e=>{const t=e.find((e=>!(0,s.kqr)(e)));return t?(0,s.u5q)(t.uri):null})(t)),{attrSelector:g,filterSelector:h,actionContainer:b}=N(),v=(0,n.useRef)(r);v.current=r;const y=(0,n.useRef)(null),x=(0,n.useRef)(null),C=(0,n.useRef)(null),E=(0,n.useMemo)((()=>({attributeSelectorContainer:g,filterSelectorContainer:h,actionsContainer:b})),[g,h,b]),Z=(0,n.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return(0,s.kkq)(e,r).map((e=>d(r,e,t.uri,p)))}(t,f,u)),[t,u,f]),O=(0,n.useMemo)((()=>r.length?((e,t)=>e.map(((e,r)=>({attribute:e.fieldName?m(e.fieldName,t):void 0,filter:e.filter,id:r,values:e.values}))))(r,Z):[]),[Z,r]);C.current=O.length,(0,n.useEffect)((()=>{y.current&&x.current!==C.current&&(y.current.querySelector("input").focus(),x.current=null)}),[O.length]);const S=(0,n.useCallback)((()=>{x.current=O.length}),[O.length]),k=(0,n.useMemo)((()=>({onOpen:S})),[S]),I=(0,n.useCallback)((e=>{const t=[...v.current];t.splice(e+1,0,M),c(t)}),[c]),T=(0,n.useCallback)((e=>{const t=[...v.current];t.splice(e,1),c(t)}),[c]),D=(0,n.useCallback)((e=>{const t=[...v.current];t.splice(e+1,0,{fieldName:v.current[e].fieldName,filter:v.current[e].filter,values:v.current[e].values}),c(t)}),[c]),L=(0,n.useCallback)(((e,t)=>{const r=(0,i.evolve)({[t]:(0,i.always)(e)},v.current);c(r)}),[c]),H=(0,n.useCallback)((e=>{c([...v.current,e])}),[c]);return o().createElement(A.Z,{rowClasses:E,rowsData:O,AttributeSelectorComponent:R,FilterSelectorComponent:w,ValuesEditorComponent:j,ActionsComponent:P,LogicOperatorComponent:B,filterSelectorRefIndex:x.current,filterSelectorRef:y,lastRowAttributeSelectorProps:k,attributesGroup:Z,changeFilter:L,addNewFilter:H,addRowAfterIndex:I,removeRow:T,duplicateRow:D})}))},63172:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),o=r.n(n),a=r(87918),i=r.n(a),l=r(94079),s=r(36444),c=r(58991),u=r(95464),p=r(79692);function d(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){m(e,t,r[t])}))}return e}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const f={alignSelf:"center"},g=(0,p.Z)((()=>({buttonsWrapper:{display:"flex"},applyButton:d({},f,{marginRight:"16px"}),cancelButton:d({},f,{marginLeft:"auto"}),clearButon:d({},f)}))),h=e=>{let{onClear:t,onCancel:r,onApply:n}=e;const a=g();return o().createElement("div",{className:a.buttonsWrapper},o().createElement(l.Button,{onClick:t,variant:"text",color:"default",className:a.clearButon},i().text("Clear all")),o().createElement(l.Button,{onClick:r,variant:"text",color:"default",className:a.cancelButton},i().text("Cancel")),o().createElement(l.Button,{onClick:n,variant:"text",color:"primary",className:a.applyButton},i().text("Apply")))};var b=r(41128);const v=(0,p.Z)((e=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"40px",marginLeft:"auto",marginRight:"12px"},filtersBuilderWrapper:{marginTop:"20px"},popupContent:{paddingLeft:"16px",paddingTop:"20px",paddingBottom:"6px",width:"770px"},divider:{marginBottom:"14px",marginLeft:"-16px",background:"rgba(0, 0, 0, 0.121569)"},changedFiltersIndicator:{backgroundColor:(0,b.U1)(e.palette.primary.main,.12)}}))),y=(0,n.memo)((e=>{let{filters:t,attributeTypes:r,onChange:a}=e;const p=v(),d=(0,n.useRef)(),[m,f]=(0,n.useState)(!1),[g,b]=(0,n.useState)([]),y=(0,c.Uqd)()(t)?"primary":"inherit",x=()=>f((e=>!e));(0,n.useEffect)((()=>{m&&b(t)}),[t,m]);const w=(0,n.useCallback)((()=>{a(g),x()}),[g,a]),C=(0,n.useCallback)((()=>{x()}),[]),E=(0,n.useCallback)((()=>{b([])}),[]);return o().createElement(o().Fragment,null,o().createElement(l.Button,{ref:d,color:y,classes:{root:p.triggerButton,textPrimary:p.changedFiltersIndicator},onClick:x},o().createElement(s.Z,{color:y})),o().createElement(l.Popover,{open:m,classes:{paper:p.popupContent},anchorEl:d.current,onClose:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}},o().createElement(o().Fragment,null,o().createElement(l.Typography,{variant:"h6"},i().text("Filter")),o().createElement("div",{className:p.filtersBuilderWrapper},o().createElement(u.Z,{attributeTypes:r,filters:g,onChange:b})),o().createElement(l.Divider,{className:p.divider}),o().createElement(h,{onApply:w,onCancel:C,onClear:E}))))}))},46177:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),o=r.n(n),a=r(13980),i=r.n(a),l=r(21697),s=r(14838),c=r(25461),u=r(17440),p=r(22273),d=r(73038);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 f=e=>{let{rowsData:t,columnsData:r,renderRowCell:a=s.Z,getRowCellHeight:f=c.Z,defaultRowHeight:g=48,maxRowValuesCount:h=1/0}=e;const{tableRowsData:b,collapseContextValue:v}=(0,p.Z)({rowsData:t,columnsData:r,renderRowCell:a,getRowCellHeight:f,maxRowValuesCount:h});return(0,n.useMemo)((()=>{const e=b.reduce(((e,t,r)=>{const{data:n}=t;return e[r]=(0,l.calculateRowHeight)(n,g),e}),{}),t=(t,r,n)=>{const o=[t,"subRowHeight",r,n,"height"];return(0,u.pathOr)(0,o,e)},n=t=>(0,u.pathOr)(0,[t,"height"],e),a=e=>{let{columnId:a,rowIndex:i}=e,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["columnId","rowIndex"]);return o().createElement(d.x.Provider,{value:v},o().createElement("div",m({},s,{style:{height:n(i)}}),b.length>0&&(0,l.getCellContentFromRowsData)({columnIndex:r.findIndex((0,u.propEq)("id",a)),headData:r,rowsData:b,rowIndex:i,getHeightForSubRow:t})))};return a.propTypes={columnId:i().string,rowIndex:i().number},{getRowHeight:n,CellRenderer:a}}),[b,g,v,r])}},14363:(e,t,r)=>{r.d(t,{n:()=>v});const n=(0,r(79692).Z)({item:{marginBottom:"16px"},dense:{marginBottom:0}});var o=r(20562),a=r(24328),i=r.n(a),l=r(52730),s=r(59431),c=r(58991),u=r(91262),p=r(71153),d=r.n(p),m=r(17440),f=r(7154),g=r(26579),h=r(81077);function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=e=>{let{connection:t,relatedEntity:r,inRelationTypes:p=[],outRelationTypes:v=[],showEmptyEditors:y,entityErrorMessage:x,onChangeAttribute:w,onRemoveAttribute:C,onAddAttributes:E,onChangeRelationType:Z,onChangeEntity:O}=e;const S=n(),{relation:k,entity:P}=t,{attributes:A,uri:I,type:R="",direction:T}=k||{},D=Boolean(R),j=(0,l.useSelector)(s.ZP.selectors.getMetadata),N=(0,a.useMemo)((()=>k&&function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){b(e,t,r[t])}))}return e}({attributes:A},(0,c.p2l)(k))),[k,A]),M=(0,a.useMemo)((()=>(0,c.xF8)(j,R)),[R,j]),B=(0,a.useMemo)((()=>D?(0,c.jWj)(T===c.Nsj.OUT,j,[(0,c.V3K)(j,R)]):(0,m.uniq)((0,c.jWj)(!0,j,v).concat((0,c.jWj)(!1,j,p)))),[D,R,j,p,v]),L=(0,l.useSelector)((e=>s.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),H=(0,a.useMemo)((()=>k&&{relationType:k.type,direction:k.direction}),[k]),F=(0,a.useMemo)((()=>P&&{entityUri:P.uri,entityType:P.type,entityLabel:(0,c.idV)(P.label)}),[P]),V=(0,a.useMemo)((()=>P&&P.uri?p.filter((0,c.eHk)(!1,P,r,j)):p),[P,p,r,j]),W=(0,a.useMemo)((()=>P&&P.uri?v.filter((0,c.eHk)(!0,P,r,j)):v),[P,v,r,j]);(0,a.useEffect)((()=>{const{type:e,direction:t}=(0,c.z7d)(p,v)||{};!R&&e&&Z&&Z({type:e.uri,direction:t})}),[R,p,v,Z]),(0,o.D)((()=>{const{type:e,direction:t}=(0,c.z7d)(V,W)||{};!R&&e&&Z({type:e.uri,direction:t})}),[R,P,V,W,O]);const z=(0,a.useCallback)((e=>{let{type:t,direction:r}=e;Z({type:t.uri,direction:r})}),[Z]);return i().createElement(i().Fragment,null,Z&&i().createElement(f.Z,{className:S.item,relation:H,metadata:j,inRelationTypes:p,outRelationTypes:v,onChange:z}),O&&i().createElement(g.Z,{errorMessage:x,className:S.item},i().createElement(h.Z,{key:R,className:d()({[S.dense]:x}),entity:F||{},entityTypesUris:B,max:20,globalSearchRequestOptions:L,mode:c.fO_.EDITING,onChange:O,onCreate:void 0,metadata:j,attributeTypesSelectionStrategy:void 0})),R&&i().createElement(u.Z,{attrTypes:M,entity:N,showEmptyEditors:y,mode:c.fO_.EDITING,parentUri:I,onAddAttributes:E,onChangeAttribute:w,onDeleteAttribute:C}))}},24737:(e,t,r)=>{r.d(t,{Z:()=>B});var n=r(24328),o=r.n(n),a=r(13980),i=r.n(a),l=r(71153),s=r.n(l),c=r(17440),u=r(94113),p=r(65549),d=r(79692);const m=(0,d.Z)((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),f=(0,d.Z)({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"21px"}});var g=r(36179);const h=e=>{const{selectProps:{onCreate:t,createLabel:r,inputValue:n,components:a},children:i}=e,l=m();return o().createElement(g.Z,e,i,r&&!(0,c.prop)("Group",a)&&o().createElement("span",{className:l.addLabel,onClick:()=>t(n)},o().createElement(p.Z,{className:l.addIcon}),r))};h.propTypes={children:i().element.isRequired,selectProps:i().object.isRequired};const b=h;var v=r(18461),y=r(5190),x=r(31276),w=r(58991),C=r(72436),E=r(94079);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)}function O(e){const{selectProps:{menuIsOpen:t},innerProps:r,children:n}=e,a=f();return!t&&o().createElement(E.Typography,Z({className:a.singleValue},r),n)}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){k(e,t,r[t])}))}return e}function k(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}O.propTypes={children:i().node,innerProps:i().object};const P=(0,d.Z)({control:{height:"auto"},dropdownIndicator:{transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",lineHeight:"16px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),A={menu:e=>S({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>S({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>S({},e,{padding:"0 0 8px 0"}),input:e=>S({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>S({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},I={menuList:e=>S({},e,{padding:0})},R={input:e=>S({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};function T(){return T=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},T.apply(this,arguments)}function D(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){j(e,t,r[t])}))}return e}function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const N=e=>{let{value:t,label:r,createLabel:a,getOptions:i,options:l,height:p=46,onChange:d=c.identity,onCreate:m,onClear:f=c.identity,components:g,textFieldInputRef:h,TextFieldProps:E,classes:Z}=e,S=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["value","label","createLabel","getOptions","options","height","onChange","onCreate","onClear","components","textFieldInputRef","TextFieldProps","classes"]);const k=P({height:p}),j=(0,C.a6)(),[N,M]=(0,n.useState)(!1),B=(0,n.useRef)(null),L=i?v.Z:y.Z,H=(0,c.prop)("ClearIndicator",g)?{}:{IndicatorSeparator:x.Vd,ClearIndicator:x.Vd},F=m?(e,t)=>{m(e,t),M(!1)}:void 0,V=(0,c.prop)("Group",g)?I:{},W=(0,c.isEmpty)(r)?R:{},z=D({},A,V,W),U=D({},k,Z);return o().createElement(L,T({placeholder:"",defaultOptions:!0},S,{value:(0,c.defaultTo)(null,t),loadOptions:i,options:l,cacheOptions:!0,onChange:d,onCreate:F,onClear:f,createLabel:a,classes:U,styles:z,components:D({DropdownIndicator:u.Z,LoadingIndicator:x.Vd,SingleValue:O,Menu:b},H,g),menuPlacement:"auto",TextFieldProps:D({},E,{label:r,variant:"filled",margin:"dense",classes:D({},(0,c.prop)("classes",E),{root:s()(k.formControl,(0,c.path)(["classes","root"],E))}),inputProps:D({},(0,c.prop)("inputProps",E)),InputProps:D({},(0,c.prop)("InputProps",E),{classes:D({},(0,c.path)(["InputProps","classes"],E),{root:s()(k.filledInputRoot,(0,c.path)(["InputProps","classes","root"],E)),underline:s()({[j.filledInputUnderline]:(0,w.O27)(t)},(0,c.path)(["InputProps","classes","underline"],E)),focused:s()("focused",(0,c.path)(["InputProps","classes","focused"],E))})}),InputLabelProps:D({},(0,c.prop)("InputLabelProps",E),{classes:D({},(0,c.path)(["InputLabelProps","classes"],E),{root:s()(k.inputLabel,(0,c.path)(["InputLabelProps","classes","root"],E)),shrink:s()("shrink",(0,c.path)(["InputLabelProps","classes","shrink"],E))}),shrink:!(0,w.O27)(t)||void 0}),ref:h||B}),inputRef:h||B,menuIsOpen:N,onMenuOpen:()=>M(!0),onMenuClose:()=>M(!1)}))},M={value:i().oneOfType([i().object,i().array]),label:i().string.isRequired,getOptions:i().func,options:i().array,onChange:i().func,onCreate:i().func,onClear:i().func,createLabel:i().string,components:i().object,textFieldInputRef:i().object,TextFieldProps:i().object,height:i().number,classes:i().object};N.propTypes=M;const B=N},6230:(e,t,r)=>{r.d(t,{J:()=>c});var n=r(24328),o=r.n(n),a=r(87918),i=r.n(a),l=r(15689);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=>o().createElement(l.Z,s({message:i().text("No data available")},e))},31039:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),a=r(52730),i=r(39450),l=r(59431),s=r(58991);const c=(0,n.forwardRef)(((e,t)=>{let{value:r,children:c,className:u}=e;const p=(0,a.useDispatch)(),d=(0,n.useContext)(i.m),m=(0,a.useSelector)(l.ZP.selectors.getUIPath),f=(0,n.useCallback)((()=>{p(l.ui.actions.openEntity({uri:r,viewId:d}))}),[d,r,p]);return o().createElement("a",{ref:t,href:(g=r,(0,s.ChB)({uiPath:m,uri:g})),onClick:e=>{f(),e.stopPropagation(),e.preventDefault()},className:u},c);var g}));c.displayName="EntityUriLink";const u=c},88548:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),o=r.n(n),a=r(13980),i=r.n(a),l=r(17440),s=r(94079),c=r(79692);function u(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}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,l.range)(2,10).reduce(((e,t)=>u({},e,{[`&:nth-child(${t})`]:{paddingLeft:`calc(1em * (${t} - 2))`,"&::before":{content:'"└"',display:"inline-block",fontSize:"1em",marginRight:"5px",color:"rgba(255, 255, 255, 0.28)"}}})),{}),m=(0,c.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px","& p":{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},"& ul":{listStyleType:"none",padding:0,margin:0,"& li":u({fontSize:"10px",lineHeight:"11px",fontWeight:500,color:"rgba(255, 255, 255, 0.7)",marginTop:"4px"},d,{"&:last-child":{color:"white"}}),"& li + li":{marginTop:"2px"}}}})));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 g=e=>{let{pathToTitle:t,children:r}=e,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["pathToTitle","children"]);const a=m(),i=t&&t.length?o().createElement("div",{className:a.tooltipContent},o().createElement("p",null,(0,l.last)(t)),t.length>2&&o().createElement("ul",null,t.map((e=>o().createElement("li",{key:e},e))))):"";return o().createElement(s.Tooltip,f({title:i,disableFocusListener:!0,classes:{tooltip:a.tooltip}},n),r)};g.propTypes={pathToTitle:i().arrayOf(i().string).isRequired,children:i().node};const h=g},37014:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),o=r.n(n),a=r(58991);const i=e=>{let{className:t}=e;return o().createElement("img",{className:t,alt:"loading",src:(0,a.Uw1)("R0lGODlhFQALAKIAAP///8Hf75vL5Van0wB4v////wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAFACwAAAIAFQAHAAADLFi6zPSQFEGpGhgXkrEUQShc1bB1wxcGYzGUZ6eKJGVy8lS1aJxJjaAiAkkAACH5BAkKAAUALAAAAwAUAAUAAAMiWLFbJRC6QakCODjBxIzDlW3dB4UBBmhPWQygwrCR9FZDAgAh+QQJCgAFACwIAAMADAAFAAADFBiqVfIvgBmaWHeC6rCklrdw0JMAACH5BAkKAAUALAAAAgAUAAcAAAMkSLpU/vCRQWmLLmg967hYAIxBV4GRSJoWlo1A6X1usXGMUkcJACH5BAkKAAUALAAAAgAOAAcAAAMdWLpF/qSMORudcYg97M2b0BHXAHIelV0pxizQkwAAOw==")})}},35071:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(13980),o=r.n(n),a=r(24328),i=r.n(a),l=r(73272),s=r(58241);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=e=>i().createElement("svg",c({viewBox:"0 0 20 20"},e),i().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 10L14 5.5V9h-3.5L5 3.5 3.5 5l6.04 6H14v3.5l4.5-4.5zM7.04 11.455L3.5 15 5 16.5l3.54-3.545-1.5-1.5z"}));var p=r(87918),d=r.n(p),m=r(71153),f=r.n(m);const g=(0,r(79692).Z)((e=>({expanded:{backgroundColor:"rgba(0, 0, 0, 0.03)"},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word"},icon:{width:"32px",height:"32px",fill:"#fff",backgroundColor:"rgba(177, 92, 189, 1)",borderRadius:"50%",margin:"5px 12px 0 8px"},infoBlock:{display:"flex",flexDirection:"row"},header:{display:"flex",flexDirection:"row",paddingBottom:"5px"},flex:{flex:1},caption:{fontSize:"16px",color:"rgba(0, 0, 0, 0.87)"},title:{display:"flex",flexDirection:"row",alignItems:"center",margin:"6px 0 8px 0"},flag:{height:"12px",width:"12px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},pmReviewCard:{borderTop:"3px solid #E83D40",flexDirection:"column",width:"100%"},date:{fontSize:"13px",color:"rgba(0, 0, 0, 0.87)"},mainInfo:{display:"flex",flexDirection:"column",flex:1}}))),h=e=>{let{date:t,type:r,createdBy:n,step:o,children:c,Actions:p}=e;const m=g(),[h,b]=(0,a.useState)(!1);return i().createElement("div",{className:m.pmReviewCard},i().createElement("div",{className:f()(m.header,{[m.expanded]:h})},i().createElement(u,{className:m.icon}),i().createElement("div",{className:m.mainInfo},i().createElement("div",{className:m.title},i().createElement("div",{className:f()(m.caption,m.flex)},d().text("Match review")),i().createElement(l.Z,{className:m.flag}),i().createElement("span",{className:m.date},d().date(t,"L")),i().createElement(s.Z,{isOpen:h,onClick:()=>{b(!h)}})),i().createElement("div",{className:m.infoBlock},i().createElement("div",{className:m.flex},i().createElement("div",{className:m.info},r),i().createElement("div",{className:m.info},d().text("Created by ${createdBy}",{createdBy:n})),i().createElement("div",{className:m.info},d().text("Step: ${step}",{step:o}))),p))),h?c:null)};h.propTypes={date:o().number,createdBy:o().string,type:o().string,step:o().string,children:o().oneOfType([o().node,o().arrayOf(o().node)]),Actions:o().node};const b=h},5190:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(5407),o=r(44711);const a=(0,n.Z)(o.ZP)},32371:(e,t,r)=>{r.d(t,{U:()=>c});var n=r(24328),o=r.n(n),a=r(87918),i=r.n(a),l=r(58991),s=r(42520);const c=(0,n.memo)((e=>{let{relationTypes:t,selectedRelationTypes:r,single:a,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d={},ListLabelProps:m={},disabled:f=!1}=e;const g=(0,n.useMemo)((()=>t.filter(l.Tt2)),[t]);return o().createElement(s.S,{items:g,selectedItemsUris:r,single:a,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d,ListLabelProps:m,disabled:f,label:i().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:i().text("Select relation types")})}));c.displayName="RelationTypesSelector"},55299:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),o=r.n(n);const a=(0,r(79692).Z)({mark:{color:"red"}}),i=()=>{const e=a();return o().createElement("span",{className:e.mark},"*")}},32431:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),a=r(99152),i=r(6487),l=r(88611);const s=(0,r(79692).Z)({tabsRoot:{width:"100%"},tabsScrollButton:{flex:"0 0 24px"},tabRoot:{fontSize:"0.875rem",padding:"7px 18px 5px","@media (min-width: 960px)":{minWidth:"inherit"}},labelWrapper:{whiteSpace:"nowrap",letterSpacing:"normal",display:"flex",flexDirection:"row",width:"100%"},label:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:500}});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=e=>{let{value:t,tabs:r=[],onChange:n,tabClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["value","tabs","onChange","tabClasses"]);const d=s(),m=(e,t)=>o().createElement("span",{className:d.labelWrapper},o().createElement(l.C,{value:e},o().createElement("span",{className:d.label},e)),t);return o().createElement(a.Z,c({value:t,onChange:(e,t)=>n(t),classes:{root:d.tabsRoot,scrollButtons:d.tabsScrollButton},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on"},p),r.map((e=>{let{label:t,value:r,additionalLabel:n,dataReltioId:a}=e;return o().createElement(i.Z,{classes:u||{root:d.tabRoot},key:r,value:r,label:m(t,n),"data-reltio-id":a})})))}},16025:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),a=r(94574),i=r(63015);function l(){return l=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},l.apply(this,arguments)}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}const u=e=>{let{classes:t}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["classes"]);const n=(0,i.y)({});return o().createElement(a.Z,l({classes:s({},t,{focused:n.white})},r))}},43775:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),o=r.n(n),a=r(13980),i=r.n(a),l=r(94079);const s=(0,r(79692).Z)({onlyValue:{color:"rgba(0,0,0,.6)",fontSize:"13px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}});var c=r(79026);const u=e=>{let{value:t,onChange:r,options:a,classes:i={},emptyLabel:u}=e;const p=s(),[d,...m]=a,f=0===m.length;(0,n.useEffect)((()=>{f&&t!==d.value&&r(d.value)}),[d.value]);const g=!!u;return o().createElement("div",{className:i.root},f?o().createElement(l.Typography,{className:i.onlyValue||p.onlyValue,variant:"h6"},d.label):o().createElement(c.Z,{displayEmpty:g,disableUnderline:!0,classes:{select:i.select||p.select},TextFieldProps:{classes:{root:i.textField||p.textField}},MenuProps:{classes:{list:i.selectMenu||p.selectMenu}},value:t||"",entries:g?[{value:"",label:u},...a]:a,onChange:e=>r(e||null)}))};u.propTypes={value:i().string,onChange:i().func,options:i().arrayOf(i().shape({value:i().string,label:i().string})),classes:i().shape({root:i().string,onlyValue:i().string,select:i().string,selectMenu:i().string,textField:i().string}),emptyLabel:i().string};const p=u},31517:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),o=r.n(n),a=r(24737),i=r(13980),l=r.n(i),s=r(94079);const c=(0,r(79692).Z)({value:{color:"rgba(0, 0, 0, 0.87)"},placeholder:{color:"rgba(0, 0, 0, 0.38)",fontSize:"14px !important"}}),u=e=>{let{selectProps:{menuIsOpen:t},data:{label:r}}=e;const n=c();return!t&&o().createElement(s.Typography,{variant:"body2",classes:{root:n.value}},r)};u.propTypes={selectProps:l().shape({menuIsOpen:l().bool}),data:l().shape({label:l().string})};const p=u;function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}const m=e=>{const t=c(),{innerProps:r={},children:n}=e;return o().createElement(s.Typography,d({className:t.placeholder},r),n)};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)}m.propTypes={children:l().node,innerProps:l().object,selectProps:l().object.isRequired};const g={SingleValue:p,Placeholder:m},h=(0,n.memo)((e=>{let t=f({},e);return o().createElement(a.Z,f({components:g},t))}))},71530:(e,t,r)=>{r.d(t,{Z:()=>E});var n=r(24328),o=r.n(n);const a=e=>{let{value:t}=e;return t||null},i=e=>{let{label:t}=e;return t||null},l=e=>{let{columnValue:t,rowData:r,setHoveredColumn:n,resetHoveredColumn:i}=e;const l=r.cellRenderer||a,s=n?()=>n(t):void 0;return o().createElement("td",{onMouseOver:s,onMouseLeave:i},o().createElement(l,{value:t[r.id]}))};var s=r(14940),c=r(13896),u=r(42484);let p;!function(e){e.Column="Column",e.Row="Row"}(p||(p={}));var d=r(79692);const m=(0,d.Z)((e=>({tableData:{position:"relative","&:hover":{"& $dragIndicator":{opacity:1}}},dragIndicator:{opacity:0,position:"absolute",top:0,left:"50%",cursor:"move",transition:"opacity 0.3s",transform:"translateX(-50%) rotate(90deg)",zIndex:5},dragIndicatorIcon:{width:"14.4px",height:"18px",color:e.palette.text.secondary}}))),f=e=>{let{columnValue:t,rowData:r,index:i,onMoveColumn:l,shouldRenderDragIndicator:d,setHoveredColumn:f,resetHoveredColumn:g}=e;const h=m(),b=o().useRef(null),v=o().useRef(null),y=r.cellRenderer||a,[{targetId:x},w]=(0,c.useDrop)({accept:p.Column,hover:(e,r)=>{var n;if(!b.current)return;const o=e.index,a=i;if(o===a)return;const s=null===(n=b.current)||void 0===n?void 0:n.getBoundingClientRect(),c=(s.right-s.left)/2,u=r.getClientOffset().x-s.left;o<a&&u<c||o>a&&u>c||(l(e.columnValue.id,t.id),e.index=a)},collect:e=>({targetId:e.getHandlerId()})}),[{opacity:C,sourceId:E},Z,O]=(0,c.useDrag)({item:{type:p.Column,index:i,getColumnWidth:()=>{var e;return null==b||null===(e=b.current)||void 0===e?void 0:e.offsetWidth},columnValue:t,rowData:r},isDragging:e=>e.getItem().index===i,collect:e=>({opacity:e.isDragging()?0:1,sourceId:e.getHandlerId()})});(0,n.useEffect)((()=>{O((0,u.r)(),{captureDraggingState:!0}),w(b),Z(v)}),[]);const S=f?()=>f(t):void 0;return o().createElement("td",{style:{opacity:C},ref:b,className:h.tableData,"data-source-id":E,"data-target-id":x,onMouseOver:S,onMouseLeave:g},d&&o().createElement("div",{ref:v,className:h.dragIndicator},o().createElement(s.Z,{className:h.dragIndicatorIcon})),o().createElement(y,{value:t[r.id]}))},g=(0,d.Z)((e=>({tableHead:{position:"relative","&:hover":{"& $dragIndicator":{opacity:1}}},dragIndicator:{height:"100%",opacity:0,position:"absolute",top:0,left:0,cursor:"move",transition:"opacity 0.3s"},dragIndicatorIcon:{top:"15px",width:"14.4px",height:"18px",color:e.palette.text.secondary,position:"relative"}}))),h=e=>{let{rowData:t,isDraggable:r,dragRef:n}=e;const a=g(),l=t.headCellRenderer||i;return o().createElement("th",{className:a.tableHead},r&&o().createElement("div",{ref:n,className:a.dragIndicator},o().createElement(s.Z,{className:a.dragIndicatorIcon})),o().createElement(l,t))},b=e=>{let{rowData:t,columnsData:r,index:n,onMoveColumn:a,setHoveredColumn:i,resetHoveredColumn:s}=e;const c=0===n;return o().createElement("tr",{className:t.rowClassName},o().createElement(h,{rowData:t,isDraggable:!1}),r.map(((e,r)=>{const n=e.isDraggable,u=c&&n;return a?o().createElement(f,{key:e.id||r,columnValue:e,rowData:t,index:r,onMoveColumn:a,shouldRenderDragIndicator:u,setHoveredColumn:i,resetHoveredColumn:s}):o().createElement(l,{key:e.id||r,rowData:t,columnValue:e,setHoveredColumn:i,resetHoveredColumn:s})})))},v=e=>{let{rowData:t,index:r,columnsData:a,onMoveRow:i,onMoveColumn:s,setHoveredColumn:u,resetHoveredColumn:d}=e;const m=o().useRef(null),g=o().useRef(null),[{targetId:b},v]=(0,c.useDrop)({accept:p.Row,hover:(e,n)=>{if(!m.current)return;const o=e.index,a=r;if(o===a)return;const l=m.current.getBoundingClientRect(),s=(l.bottom-l.top)/2,c=n.getClientOffset().y-l.top;o<a&&c<s||o>a&&c>s||(i(e.id,t.id),e.index=a)},collect:e=>({targetId:e.getHandlerId()})}),[{opacity:y,sourceId:x},w,C]=(0,c.useDrag)({item:{type:p.Row,index:r,id:t.id},collect:e=>({opacity:e.isDragging()?0:1,sourceId:e.getHandlerId()})});return(0,n.useEffect)((()=>{C(v(m)),w(g)}),[]),o().createElement("tr",{className:t.rowClassName,style:{opacity:y},ref:m,"data-target-id":b,"data-source-id":x},o().createElement(h,{rowData:t,isDraggable:!0,dragRef:g}),a.map(((e,r)=>s?o().createElement(f,{key:e.id||r,columnValue:e,rowData:t,index:r,onMoveColumn:s,shouldRenderDragIndicator:!1,setHoveredColumn:u,resetHoveredColumn:d}):o().createElement(l,{key:e.id||r,columnValue:e,rowData:t,setHoveredColumn:u,resetHoveredColumn:d}))))},y=e=>{let{columnWidth:t,columnHeight:r,item:n}=e;const{rowData:i,columnValue:l}=n,s=i.cellRenderer||a;return o().createElement("div",{style:{width:t,height:r,background:"rgba(245,245,245, .5)"}},o().createElement(s,{value:l[i.id]}))},x=(0,d.Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1300,pointerEvents:"none"}}),w=(e,t,r)=>{const n=(null==e?void 0:e.getBoundingClientRect())||{x:0,y:0},o=`translate(${(null==t?void 0:t.x)-(null==n?void 0:n.x)-r/2}px, ${(null==t?void 0:t.y)-(null==n?void 0:n.y)}px`;return{display:"flex",transform:o,WebkitTransform:o}},C=e=>{var t;let{columnHeight:r}=e;const a=x(),i=(0,n.useRef)(),{isDragging:l,clientOffset:s,item:u}=(0,c.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()})));if(!l||!u)return null;const d=null===(t=u.getColumnWidth)||void 0===t?void 0:t.call(u);return o().createElement("div",{className:a.dragLayer,ref:i},o().createElement("div",{style:w(i.current,s,d)},u.type===p.Column&&o().createElement(y,{columnWidth:d,columnHeight:r,item:u})))},E=(0,n.memo)((e=>{var t;let{className:r,rowsData:a,columnsData:i,theadRowsNumber:l=0,onMoveRow:s,onMoveColumn:c,setHoveredColumn:u,resetHoveredColumn:p}=e;const d=(0,n.useRef)(null),m=null==d||null===(t=d.current)||void 0===t?void 0:t.offsetHeight,f=!!s||!!c;return o().createElement(o().Fragment,null,f&&o().createElement(C,{columnHeight:m}),o().createElement("table",{ref:d,className:r},l>0&&o().createElement("thead",null,a.slice(0,l).map(((e,t)=>o().createElement(b,{key:e.id||t,rowData:e,columnsData:i,index:t,onMoveColumn:c,setHoveredColumn:u,resetHoveredColumn:p})))),o().createElement("tbody",null,a.slice(l).map(((e,t)=>s?o().createElement(v,{key:e.id||t,index:t+l,rowData:e,columnsData:i,onMoveRow:s,onMoveColumn:c,setHoveredColumn:u,resetHoveredColumn:p}):o().createElement(b,{key:e.id||t,index:t+l,rowData:e,columnsData:i,onMoveColumn:c,setHoveredColumn:u,resetHoveredColumn:p}))))))}))},77565:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),o=r.n(n),a=r(13980),i=r.n(a),l=r(94079),s=r(83543);const c=(0,r(79692).Z)((()=>({viewMoreLessLink:{display:"flex",alignItems:"center",cursor:"pointer"},arrow:{marginRight:"8px",marginLeft:"-2px",transform:"rotate(0deg)",transition:"transform 0.35s ease"},rotated:{transform:"rotate(-180deg)"}})));var u=r(71153),p=r.n(u),d=r(87918),m=r.n(d);const f=e=>{let{active:t,onClick:r,className:n}=e;const a=c();return o().createElement(l.Link,{className:p()(a.viewMoreLessLink,n),onClick:r,underline:"none"},o().createElement(s.Z,{className:p()(a.arrow,{[a.rotated]:t})}),t?m().text("View less"):m().text("View more"))};f.propTypes={active:i().bool,onClick:i().func,className:i().string};const g=f},63072:(e,t,r)=>{r.d(t,{b:()=>i});var n=r(24328),o=r(58991),a=r(56764);const i=e=>{let{filter:t,max:r,offset:i,entityUri:l}=e;return(0,n.useCallback)((async()=>{const e=(0,a.U)(t),n=await(0,o.k6v)({filter:e,max:r,offset:i,entityUri:l}),{total:s}=await(0,o.FEC)({filter:e,entityUri:l});return{data:n,total:s}}),[t,r,i,l])}},52049:(e,t,r)=>{r.d(t,{B:()=>o});var n=r(24328);const o=r.n(n)().createContext("");o.displayName="IdContext"},97094:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(24328);const o=r.n(n)().createContext((()=>{}));o.displayName="SnackbarContext"},39450:(e,t,r)=>{r.d(t,{m:()=>o});var n=r(24328);const o=r.n(n)().createContext(null);o.displayName="ViewIdContext"},78620:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(24328),o=r(58991),a=r(17440),i=r(52730),l=r(59431);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}const u=e=>{let{connection:t,onConnectionChange:r,relatedEntity:c}=e;const u=(0,i.useSelector)(l.ZP.selectors.getMetadata),p=(0,n.useCallback)((e=>r(s({},t,{relation:e}))),[t,r]),d=(0,n.useCallback)((0,a.pipe)((0,o.zE1)(t.relation),p),[t.relation,p]),m=(0,n.useCallback)((0,a.pipe)((0,o.lIv)(t.relation),p),[t.relation,p]),f=(0,n.useCallback)((0,a.pipe)((0,o.Ilm)(t.relation),p),[t.relation,p]),g=(0,n.useCallback)((e=>{let{type:n,direction:a}=e;const i={entity:t.entity&&(0,o.eHk)(a===o.Nsj.OUT,t.entity,c,u,(0,o.V3K)(u,n))?t.entity:null,relation:s({},t.relation,{attributes:{},type:n,direction:a})};r(i)}),[t,r,c,u]);return{onAddAttributes:d,onChangeAttribute:m,onRemoveAttribute:f,onChangeEntity:(0,n.useCallback)((e=>r(s({},t,{entity:e}))),[t,r]),onChangeRelationType:g}}},92898:(e,t,r)=>{r.d(t,{q:()=>o});var n=r(24328);const o=(e,t)=>{const r=(0,n.useRef)(!1);(0,n.useEffect)((()=>{t&&!r.current&&(r.current=!0,e())}),[e,t])}},2804:(e,t,r)=>{r.d(t,{a:()=>o});var n=r(24328);const o=e=>{const[t,r]=(0,n.useState)(!1),[o,a]=(0,n.useState)({});return(0,n.useEffect)((()=>{e().then((e=>{a(e||{})})).then((e=>r(!0))).catch((e=>r(!0)))}),[]),{isLoaded:t,savedState:o}}},24605:(e,t,r)=>{r.d(t,{D:()=>c});var n=r(24328),o=r.n(n),a=r(87918),i=r.n(a),l=r(94079),s=r(37265);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{anchorOrigin:t,showDismiss:r}=e,[a,c]=(0,n.useState)(!1),[u,p]=(0,n.useState)(""),d=(0,n.useCallback)((()=>{c(!1),p("")}),[]),m=(0,n.useCallback)((e=>{c(!0),p(e)}),[]),f=(0,n.useCallback)((()=>o().createElement(l.Portal,{container:document.body},o().createElement(s.Z,{open:a,anchorOrigin:t,autoHideDuration:5e3,onClose:d,message:u,action:r?o().createElement(l.Button,{color:"primary",onClick:d},i().text("Dismiss")):void 0}))),[a,d,u]);return{SnackbarRenderer:f,showSnackbarMessage:m}}},71543:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),o=r.n(n);function a(){return a=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},a.apply(this,arguments)}const i=e=>o().createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M14 11v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v1a1 1 0 01-1 1H6a1 1 0 01-1-1v-4a1 1 0 011-1h4a1 1 0 011 1v1h3z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}))},70524:(e,t,r)=>{r.r(t),r.d(t,{ALWAYS_VISIBLE_TYPE_URIS:()=>nn.S,ActionButton:()=>$r.K,ActionButtonMode:()=>$r.N,ActivityLog:()=>n.Z,ActivityLogFilter:()=>o.Z,ActivityTypes:()=>a.I,AddWorkflowButton:()=>Hr.G,ArrowExpandButton:()=>pr.Z,AsyncMountContext:()=>$n.g,AttributeGroupIcon:()=>Xr.Z,AttributeListItem:()=>c.Z,AttributeTitle:()=>er.Z,AttributesFiltersBuilder:()=>Kr.Z,AttributesFiltersButton:()=>Jr.Z,AttributesList:()=>d.Z,AttributesPager:()=>x.ZP,AttributesTable:()=>hr.Z,AttributesView:()=>u.Z,AutoSizeList:()=>T.Z,AvatarWithFallback:()=>D.Z,BarChart:()=>te.Z,BasicAttributeSelector:()=>Yr.Z,BasicTable:()=>j.Z,BasicTableContext:()=>M.X,BasicTablePagination:()=>V.Z,BasicView:()=>J.Z,BasicViewContent:()=>K.Z,BasicViewHeader:()=>ee.Z,BlockImageGalleryDialogContext:()=>Jn.P,BranchDecorator:()=>p.Z,COMMENTS_CONTAINER_VISIBILITY_AREA:()=>rn.U,CardinalityMessage:()=>w.Z,ChartsFactory:()=>ae.Z,ClickAwayProvider:()=>de,CollaborationContext:()=>Kn.h,CollaborationItem:()=>me.J,CollapseButton:()=>fe.Z,CollapseRowButton:()=>$.Z,ColorBar:()=>ge.Z,ColumnFilterType:()=>tn.Dq,ColumnsDataType:()=>tn.uz,ColumnsSettings:()=>L.Z,ColumnsSettingsPopup:()=>F.G,CommentsContainer:()=>he.Z,ConfigureColumnsPopup:()=>xe.Z,ConfirmDeleteDialog:()=>gr.Z,ConfirmationDialog:()=>fr.Z,ConnectionEditor:()=>en.n,ConnectionRelationTypeSelector:()=>we.Z,CrosswalkDragLayer:()=>yr.Z,CrosswalkEditor:()=>wr.Z,CrosswalkType:()=>Cr.Y,CrosswalksDisplayProvider:()=>ao.hR,CustomAction:()=>dn.W,DEFAULT_OVERLAY_OPTIONS:()=>on.r,DataTypeValue:()=>Ce.Z,DataTypeValueEditor:()=>De.Z,DateEditor:()=>Te.Z,DateRangeEditor:()=>Re.Z,DateRangeTypes:()=>ho.K,DefaultCellValueRenderer:()=>W.Z,DeltaTypes:()=>i.w,Drawer:()=>Ee.Z,DropDownEditor:()=>Se.Z,DropDownMenuButton:()=>Ze.Z,DropDownSelector:()=>Oe.Z,DropdownIndicator:()=>be.Z,DropdownIndicatorWithIconButton:()=>ve.Z,EMPTY_STATE_ICONS:()=>Le.B9,EMPTY_STATE_VARIANTS:()=>Le.tC,EditableAttribute:()=>E.Z,EditableImageAttributesLine:()=>k.Z,EmptyState:()=>Le.ZP,EmptyStub:()=>an.Vd,EntitiesMapContext:()=>oo.X,EntityAvatar:()=>He.Z,EntityContext:()=>uo.u,EntityCreator:()=>m.Z,EntityMarkerContext:()=>lo.P,EntitySelector:()=>f.Z,EntityTypeBadge:()=>Fe.Z,EntityTypeIcon:()=>Ve.Z,EntityTypesSelector:()=>We.Q,EntityUriLink:()=>Ue.Z,ErrorBoundary:()=>_e.Z,ErrorMessage:()=>Or.Z,ErrorPopup:()=>qe.Z,ErrorWrapper:()=>Ge.Z,ExpandableSearchInput:()=>ar.i,ExpandedAttributesProvider:()=>io.R,ExpandedValueTooltip:()=>$e.C,FacetViewHeader:()=>Qe.Z,FileTypeEditor:()=>Ne.Z,FilterButton:()=>H.Z,FilterValueEditor:()=>Pe.Z,FlipCard:()=>at,HideOnShrink:()=>it.Z,HierarchicalAttributeTooltip:()=>lt.Z,HighlightedValuesContext:()=>go.j,Highlighter:()=>st.Z,HistoryActivityType:()=>jr.M,HistoryChangeTypes:()=>Nr.b,HistoryDiffContext:()=>Qn.m,HistoryHeader:()=>Rr.Z,HistoryPanelEmptyState:()=>Dr.Z,HistoryView:()=>Ir.Z,IdContext:()=>no.B,ImageAttributesLine:()=>S.Z,ImageGalleryDialog:()=>ct.C,ImportButton:()=>ut.Z,ImportModes:()=>ut.E,InlineAttributesPager:()=>sr.Z,InlineImageAttribute:()=>ur.Z,InlineNestedAttribute:()=>lr.Z,InlineReferenceAttribute:()=>cr.Z,LightArrowTooltip:()=>dr.Z,LinearLoadIndicator:()=>pt.Z,Link:()=>dt.Z,LoadingSpinner:()=>mt.Z,MAP_DRAWING_MODES:()=>on.vl,MAP_MINIMUM_SCALE_RADIUS:()=>on.Pi,Marginator:()=>mr.Z,MatchRulesBlock:()=>ft.Z,MenuWithPopper:()=>ye.Z,MergeButton:()=>qr.H,ModeSwitcher:()=>vt.Z,ModeSwitcherSelect:()=>yt.T,MoreAttributesButton:()=>g.Z,MultiSelect:()=>Pt.Z,MultiValueChip:()=>Ae.Z,MultipleInput:()=>xt.Z,NestedAttribute:()=>P.Z,NestedAttributeEditor:()=>h.Z,NoData:()=>Me.J,NoResults:()=>Be.X,NotMatchButton:()=>Gr.i,NumberEditor:()=>Ie.Z,OvIcon:()=>Mr.Z,PieChart:()=>re.Z,PivotingAttributeContext:()=>to.J,Popper:()=>wt.Z,PopupBoundariesContext:()=>Yn.p,PopupWithArrow:()=>Ct.Z,PotentialMatchReviewCard:()=>Et.Z,ProfileBand:()=>Zt.Z,ProfileBandHistory:()=>Tr.Z,ProfileBandNavigation:()=>X.a,ProfileCard:()=>Ot.Z,ProfileMatchCard:()=>_r.M,ProfilePerspectiveViewContext:()=>ro.j,ProfilesList:()=>Qr.Z,QueryBuilderAttributeDataType:()=>tn.eB,QueryBuilderAttributeType:()=>tn.Xw,QueryBuilderRow:()=>St.Z,QueryBuilderRowsGroup:()=>kt.Z,ReactSelectOptionFilters:()=>At.Z,ReactSortableTree:()=>It.ZP,ReactSortableTreeHandlers:()=>Rt.ZP,ReactSortableTreeUtils:()=>Tt.ZP,ReadOnlyAttribute:()=>C.Z,ReadOnlyAttributeValuesBlock:()=>Z.Z,ReadOnlyAttributesList:()=>O.Z,ReadOnlyAttributesPager:()=>R.Z,ReferenceAttribute:()=>A.Z,ReferenceAttributeEditor:()=>b.Z,RelatedObjectUrisContext:()=>co.A,RelationEditor:()=>Br.Z,RelationTypeSelector:()=>v.Z,RelationTypesSelector:()=>ze.U,ReloadFacetProvider:()=>po.DX,ReltioGridLayout:()=>Dt.Z,ReltioMap:()=>Zr.Z,RequestStates:()=>ho.o,ResizablePanes:()=>jt.Z,RowCellAutoSizer:()=>G.Z,SandboxAPIContext:()=>Bn.Y,ScrollableTabs:()=>ir.Z,SearchFiltersContext:()=>mo.I,SearchInput:()=>Nt.Z,SelectionPopup:()=>Lt.Z,SelectionPopupPopper:()=>zt,SelectorWithOnlyOptionAutoSelect:()=>Ut.Z,SideButtonsPanel:()=>_t.G,SidePanel:()=>Gt.h,SidePanelContentHeader:()=>$t.P,SidePanelEmptyState:()=>qt.Z,SimpleAttribute:()=>I.Z,SimpleAttributeEditor:()=>y.Z,SimpleDropDownSelector:()=>Qt.Z,SimpleMatchRulesBlock:()=>gt.Z,SimpleMatchRulesBuilder:()=>ht.Z,SmallIconButton:()=>Xt.Z,SmallIconButtonWithTooltip:()=>Yt.k,SnackbarContext:()=>fo.S,SortingType:()=>tn.nI,SourceCrosswalksRow:()=>xr.Z,SourceIcon:()=>Jt.Z,Spacer:()=>Kt.Z,TableContext:()=>M.X,TableWithBars:()=>ne.Z,TextEditor:()=>ke.Z,TimestampEditor:()=>je.Z,TransitiveMatchBlock:()=>bt.Z,TreeChart:()=>oe.Z,UsersContext:()=>eo.s,VerticalDivider:()=>tr.Z,VerticalHeadingsTable:()=>rr.Z,ViewIdContext:()=>Xn.m,ViewMoreToggle:()=>nr.Z,VirtualGroupedList:()=>or.Z,WhiteSearchInput:()=>Mt.Z,WorkflowComments:()=>Fr.V,WorkflowTaskCard:()=>Lr.s,WorkflowTasksContext:()=>so.O,basicTableViewState:()=>q.ZP,buildColumnsFilter:()=>_.Tz,columnFilterToMdmFilter:()=>_.su,createStandardAction:()=>an.zD,defaultGetRowCellHeight:()=>z.Z,defaultRenderRowCell:()=>U.Z,getChecked:()=>an.IR,getValue:()=>an.NA,groupCrosswalksByTypesAndSources:()=>Er.o,isIE:()=>an.w1,mergeClasses:()=>an.ze,noop:()=>an.ZT,parseJSON:()=>an.Rx,stopPropagation:()=>an.UW,toggleSortOrder:()=>an.Dh,useAPI:()=>pn.E,useActions:()=>un.o,useActivitiesLoader:()=>l.d,useAsyncMount:()=>mn.S,useAttributeExpanded:()=>io.Q,useBasicTableCellRenderer:()=>Y.Z,useClickableStyle:()=>le.d,useCollaboration:()=>fn.C,useCommentsEntitiesMap:()=>gn.Q,useConfigPermissions:()=>Sn.l,useCrosswalkActions:()=>vr.P,useCrosswalkColor:()=>ao.nX,useCrosswalkFocus:()=>ao.BF,useCrosswalkHighlight:()=>ao.pu,useCustomScripts:()=>zn,useDidUpdateEffect:()=>hn.D,useDynamicRowCellHeight:()=>Q.Z,useEditableConnection:()=>Un.R,useHighlightedCrosswalks:()=>ao.RT,useHistory:()=>kr.k6,useHistoryDiff:()=>Pr.u,useHistoryEnabled:()=>Ar.C,useHistorySlice:()=>Sr.a,useKeyboardNavigation:()=>Bt.t,useMarkAsNotMatchRequest:()=>In.m,useMatchesLoader:()=>kn.s,useMergeAllRequest:()=>An._,useModifiedEntity:()=>br.Q,usePagingSimulator:()=>Pn.a,usePrevious:()=>bn.D,useProfileActivitiesLoader:()=>s.b,useReadableSearchState:()=>_n.v,useRelationTypeSelector:()=>vn.n,useRelationsLoader:()=>yn.a,useReloadAllFacets:()=>po.Hc,useReloadFacet:()=>po.T,useRunOnceAfterValueInitialization:()=>xn.q,useSafePromise:()=>wn._,useSavedState:()=>Cn.a,useSavedStateForEntityType:()=>qn.w,useSnackbar:()=>Gn.D,useUsers:()=>En.U,useWhyDidYouUpdate:()=>On,useWorkflowAssignee:()=>Vr.r,useWorkflowCheckPermission:()=>zr.Z,useWorkflowComments:()=>Wr.W,useWorkflowTasks:()=>Ur.v,withAsyncMount:()=>sn.Z,withContext:()=>cn.l,withFilterAtBottom:()=>B.Z,withPercents:()=>ie.Z,withTableContext:()=>N.Z,withTooltip:()=>ln.Z});var n=r(88234),o=r(93438),a=r(31537),i=r(99601),l=r(67486),s=r(63072),c=r(7785),u=r(8962),p=r(95974),d=r(91262),m=r(31588),f=r(81077),g=r(63459),h=r(62630),b=r(2163),v=r(27185),y=r(39462),x=r(57161),w=r(93140),C=r(81303),E=r(96698),Z=r(87760),O=r(80931),S=r(13074),k=r(24338),P=r(28751),A=r(72148),I=r(12068),R=r(24625),T=r(30739),D=r(97991),j=r(85709),N=r(32528),M=r(13688),B=r(67353),L=r(60894),H=r(1876),F=r(47458),V=r(58662),W=r(64091),z=r(25461),U=r(14838),_=r(99341),q=r(26180),G=r(97946),$=r(74566),Q=r(74402),Y=r(46177),X=r(93873),J=r(10237),K=r(4094),ee=r(92778),te=r(40801),re=r(79527),ne=r(83535),oe=r(3292),ae=r(66675),ie=r(84900),le=r(99256),se=r(24328),ce=r.n(se),ue=r(1292);function pe(){return pe=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},pe.apply(this,arguments)}const de=e=>ce().createElement(ue.Z,pe({mouseEvent:"onMouseDown"},e));var me=r(9371),fe=r(58241),ge=r(43290),he=r(94646),be=r(94113),ve=r(96808),ye=r(36179),xe=r(89119),we=r(7154),Ce=r(72768),Ee=r(27652),Ze=r(55847),Oe=r(24737),Se=r(79026),ke=r(81174),Pe=r(24754),Ae=r(82455),Ie=r(31890),Re=r(46923),Te=r(8459),De=r(25310),je=r(43305),Ne=r(27113),Me=r(6230),Be=r(94889),Le=r(21077),He=r(53180),Fe=r(68439),Ve=r(31254),We=r(59725),ze=r(32371),Ue=r(31039),_e=r(2256),qe=r(585),Ge=r(26579),$e=r(88611),Qe=r(93416),Ye=r(79692);const Xe=e=>`rotateY(${e?180:0}deg)`,Je=e=>`rotateX(${e?180:0}deg)`,Ke=e=>`rotateY(${e?0:-180}deg)`,et=e=>`rotateX(${e?0:-180}deg)`,tt=(0,Ye.Z)({back:e=>{let{isFlipped:t,direction:r}=e;return{WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden",height:"100%",left:"0",position:t?"relative":"absolute",top:"0",transform:"horizontal"===r?Ke(t):et(t),transformStyle:"preserve-3d",transition:"0.7s",width:"100%",display:"flex"}},container:e=>{let{cardZIndex:t}=e;return{perspective:"1000px",zIndex:t}},flipper:{height:"100%",position:"relative",width:"100%"},front:e=>{let{isFlipped:t,direction:r}=e;return{WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden",height:"100%",left:"0",position:t?"absolute":"relative",top:"0",transform:"horizontal"===r?Xe(t):Je(t),transformStyle:"preserve-3d",transition:"0.7s",width:"100%",zIndex:2,display:"flex"}}});var rt=r(71153),nt=r.n(rt);const ot=(0,se.forwardRef)(((e,t)=>{let{cardZIndex:r="auto",direction:n="vertical",isCardFlipped:o=!1,children:a,className:i}=e;const[l,s]=(0,se.useState)(o),c=tt({cardZIndex:r,direction:n,isFlipped:l});return(0,se.useEffect)((()=>{o!==l&&s(o)}),[o,l]),ce().createElement("div",{className:nt()(c.flipper,i),ref:t},ce().createElement("div",{"data-id":"front",className:c.front},a[0]),ce().createElement("div",{"data-id":"back",className:c.back},a[1]))})),at=ot;var it=r(75512),lt=r(88548),st=r(27239),ct=r(81853),ut=r(81727),pt=r(99136),dt=r(55400),mt=r(37014),ft=r(83037),gt=r(74615),ht=r(66792),bt=r(93301),vt=r(83401),yt=r(22860),xt=r(48809),wt=r(66130),Ct=r(59601),Et=r(35071),Zt=r(57304),Ot=r(93517),St=r(23598),kt=r(41315),Pt=r(92575),At=r(50905),It=r(58600),Rt=r(65758),Tt=r(21113),Dt=r(67268),jt=r(96955),Nt=r(94574),Mt=r(16025),Bt=r(54763),Lt=r(97820),Ht=r(25480),Ft=r(94079),Vt=r(27556);function Wt(){return Wt=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},Wt.apply(this,arguments)}const zt=e=>{let{open:t,anchorEl:r,className:n,onClose:o,containerWidth:a,containerHeight:i,paperProps:l,listContent:s,externalInputField:c,classes:u={}}=e;const p=(0,Ht.Z)({containerWidth:a,containerHeight:i});return ce().createElement("div",{className:u.root},c,ce().createElement(wt.Z,{open:t,onClose:o,anchorEl:r,placement:"bottom-start",transition:!0},(e=>{let{TransitionProps:t}=e;return ce().createElement(Ft.Grow,t,ce().createElement(Vt.Z,Wt({elevation:2},l),ce().createElement("div",{className:nt()(p.container,n),style:{width:a}},ce().createElement("div",{className:p.list},s))))})))};var Ut=r(43775),_t=r(39827),qt=r(10159),Gt=r(52043),$t=r(17308),Qt=r(31517),Yt=r(8818),Xt=r(22385),Jt=r(94175),Kt=r(51229),er=r(95629),tr=r(30553),rr=r(71530),nr=r(77565),or=r(44890),ar=r(32152),ir=r(32431),lr=r(58896),sr=r(4073),cr=r(85592),ur=r(22246),pr=r(19592),dr=r(94111),mr=r(31269),fr=r(81137),gr=r(85209),hr=r(20982),br=r(85965),vr=r(39417),yr=r(48017),xr=r(52017),wr=r(79769),Cr=r(77243),Er=r(90186),Zr=r(79485),Or=r(76134),Sr=r(57730),kr=r(85890),Pr=r(76536),Ar=r(71820),Ir=r(54362),Rr=r(91515),Tr=r(3409),Dr=r(6674),jr=r(65942),Nr=r(55912),Mr=r(91181),Br=r(11013),Lr=r(34120),Hr=r(26789),Fr=r(89140),Vr=r(5434),Wr=r(43477),zr=r(22994),Ur=r(61756),_r=r(49734),qr=r(93428),Gr=r(30885),$r=r(98808),Qr=r(82842),Yr=r(99757),Xr=r(79821),Jr=r(63172),Kr=r(95464),en=r(14363),tn=r(94656),rn=r(19603),nn=r(78836),on=r(97090),an=r(31276),ln=r(83348),sn=r(49965),cn=r(48852),un=r(86361),pn=r(33165),dn=r(77282),mn=r(96479),fn=r(7718),gn=r(26313),hn=r(20562),bn=r(30634),vn=r(89846),yn=r(37152),xn=r(92898),wn=r(67218),Cn=r(2804),En=r(17554);function Zn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const On=(e,t)=>{const r=(0,se.useRef)();(0,se.useEffect)((()=>{if(r.current){const n=Object.keys(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){Zn(e,t,r[t])}))}return e}({},r.current,t)),o={};n.forEach((e=>{r.current[e]!==t[e]&&(o[e]={from:r.current[e],to:t[e]})})),Object.keys(o).length&&console.log("[why-did-you-update]",e,o)}r.current=t}))};var Sn=r(52016),kn=r(28741),Pn=r(20449),An=r(84504),In=r(59119),Rn=r(52730),Tn=r(59431),Dn=r(58991),jn=r(58697),Nn=r.n(jn),Mn=r(17440),Bn=r(60115),Ln=r(26929),Hn=r(53607);function Fn(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){Vn(e,t,r[t])}))}return e}function Vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Wn=(e,t)=>(e||[]).some((e=>{const r=new RegExp(`^${e}$`);return e.replace(/\/*$/,"")===t||e&&r.test(t)})),zn=(e,t)=>{let{addInternalRequestInterceptor:r,addInternalResponseInterceptor:n,removeInternalRequestInterceptor:o,removeInternalResponseInterceptor:a}=t;const i=e.reduce(((e,t)=>t.platform!==Dn.X1H.CLASSIC?[...e,Fn({},t,{actionId:Nn()()})]:e),[]),l=(0,Rn.useDispatch)(),s=(0,Rn.useSelector)(Tn.ZP.selectors.getMetadata)||{},c=(0,Rn.useSelector)(Tn.ZP.selectors.getEntity)||{},u=(0,Rn.useSelector)(Tn.ZP.selectors.getUIPath),p=(0,Rn.useSelector)(Tn.ZP.selectors.getReltioPath),d=(0,Rn.useSelector)(Tn.ZP.selectors.getTenant),m=(0,Ln.j)(u,d),f=(0,Rn.useSelector)(Tn.ZP.selectors.getApiPath),g=(0,Rn.useSelector)(Tn.ZP.selectors.getWorkflowPath),h=(0,Rn.useSelector)(Tn.ZP.selectors.getUser),b=(0,Rn.useSelector)(Tn.ZP.selectors.getEntityUri),v=(0,Rn.useSelector)(Tn.ZP.selectors.getWorkflowEnvironmentUrl),y=(0,se.useContext)(Bn.Y),x=(0,zr.Z)(),{type:w,data:C}=(0,Rn.useSelector)(Tn.ZP.selectors.getSearchProviderData)||{},E=e=>l(Tn.ui.actions.openSearch(e)),Z=(0,se.useRef)({}),O=(0,se.useRef)({}),S=(0,se.useRef)({}),k=(e,t)=>{if(e)switch(e.action){case dn.W.REQUEST:var r,n;if("ui"!==(null===(r=e.params)||void 0===r||null===(n=r.headers)||void 0===n?void 0:n.origin))(0,Hn.U)(Fn({name:e.params.name,paramObject:e,permissions:i[0].permissions,worker:t,metadata:s,config:{action:i[0]},user:h,apiPath:f,tenant:d,workflowPath:g,entity:c,entityUri:b,environment:v,query:"search"===w?null==C?void 0:C.query:null,openSearch:E,workflowCheckPermission:x},y));else{const{headers:t,id:r,url:n,method:o,data:a}=e.params,i=n.replace(p,f);Z.current[t.requestId]&&(Z.current[t.requestId].next(i,Fn({},a,{id:r,task:e,headers:t,method:o})),Z.current=(0,Mn.omit)([t.requestId],Z.current))}break;case dn.W.RETURN_PROCESSED_API_RESPONSE:case dn.W.RETURN_PROCESSED_API_REQUEST:{const{id:t,data:r}=e.params;O.current[t]&&(O.current[t].next(r),O.current=(0,Mn.omit)([t],O.current));break}}};(0,se.useEffect)((()=>(S.current=i.reduce(((e,t)=>Fn({},e,{[t.actionId]:(0,Dn.QWZ)(m,t.files,k)})),S.current),()=>{Object.keys(S.current).forEach((e=>{S.current[e].terminate()}))})),[e]);const P=e=>{let{options:t={},url:r,next:n}=e;const o=r.startsWith("/")&&!r.startsWith(f)?`${p}/api/${d}${r}`:`${p}${r.replace(f,"")}`,a=(0,Mn.pipe)((0,Mn.map)((0,Mn.pick)(["actionId","processApiRequest"])),(0,Mn.find)((e=>{let{processApiRequest:t}=e;return Wn(t,o)})),(0,Mn.prop)("actionId"))(i);if(a){const e=Nn()();Z.current=Fn({},Z.current,{[e]:{options:t,next:n,id:e}}),S.current[a].postMessage({action:"apiRequest",id:e,url:o,method:t.method,headers:Fn({},t.headers,{origin:"ui",requestId:e,actionId:a}),data:t})}else n(r,t)},A=e=>{var t;let{url:r,response:n,next:o,options:a,abort:l}=e;if("ui"===(null==a||null===(t=a.headers)||void 0===t?void 0:t.origin))n.json().then((e=>{var t,r,n;O.current=Fn({},O.current,{[a.headers.requestId]:{next:o}}),S.current[null===(t=a.headers)||void 0===t?void 0:t.actionId].postMessage({action:"response",result:{data:e},id:null==a?void 0:a.id,name:null==a||null===(r=a.task)||void 0===r||null===(n=r.params)||void 0===n?void 0:n.name})})).catch((e=>{l(e)}));else{const e=`${p}${r.replace(f,"")}`,t=(0,Mn.pipe)((0,Mn.map)((0,Mn.pick)(["actionId","processApiResponse"])),(0,Mn.find)((t=>{let{processApiResponse:r}=t;return Wn(r,e)})),(0,Mn.prop)("actionId"))(i);if(t){const r=Nn()();n.json().then((n=>{O.current=Fn({},O.current,{[r]:{next:o}}),S.current[t].postMessage({action:"apiResponse",id:r,url:e,method:a.method,data:n})})).catch((e=>{l(e)}))}else o(n)}};(0,se.useEffect)((()=>{if(!(0,Dn.O27)(i))return r(P),n(A),()=>{o(P),a(A)}}),[e])};var Un=r(78620),_n=r(41188),qn=r(60641),Gn=r(24605),$n=r(7142),Qn=r(26005),Yn=r(30268),Xn=r(39450),Jn=r(69891),Kn=r(3515),eo=r(49759),to=r(60995),ro=r(26481),no=r(52049),oo=r(31274),ao=r(63149),io=r(66095),lo=r(91676),so=r(94150),co=r(78101),uo=r(3185),po=r(98884),mo=r(56259),fo=r(97094),go=r(43600),ho=r(67885)}}]);