@reltio/remotes 1.4.1132 → 1.4.1135

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/2725.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2725],{27815:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),o=n.n(r),a=n(87918),l=n.n(a),i=n(71153),s=n.n(i),c=n(17440),u=n(52730),p=n(87638),d=n(99493),m=n(94079),g=n(92575),f=n(37285),b=n(96808),h=n(7785),y=n(79692);function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x={input:e=>E({},e,{fontSize:"14px"}),menuPortal:e=>E({},e,{zIndex:1300})},O=(0,y.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const w=e=>{let{entityType:t,selectedAttributes:n,className:a,onChange:i,title:y,disableUnderline:E,menuPlacement:v="bottom"}=e;const w=(0,u.useSelector)(p.ZP.selectors.getMetadata),S=O(),C=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const o=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:o,level:t});const a=(0,d.EUG)(w,r);return e.concat(a?C(a,t+1,o):[])}),[])}),[w]),P=(0,r.useMemo)((()=>C((null==t?void 0:t.attributes)||[])),[t,C]);return o().createElement("div",{className:s()(S.root,a)},o().createElement(m.Typography,{className:S.title,variant:"subtitle1"},y||l().text("Attribute")),o().createElement(g.Z,{value:n,options:P,TextFieldProps:{InputProps:{disableUnderline:E},classes:{root:S.dropDownInput}},components:{DropdownIndicator:b.Z,MultiValue:e=>{let{data: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,["data"]);return o().createElement(f.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:a,innerProps:l}=e;return o().createElement("div",l,o().createElement(h.Z,{checked:n,level:r.level,data:r,label:a,labelInText:a,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),i),styles:x,classes:S,menuPlacement:v,menuPortalTarget:document.body}))}},58241:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(71153),l=n.n(a),i=n(8818),s=n(38016);const c=(0,n(79692).Z)({collapseButton:{cursor:"pointer"},expandLess:{transform:"rotate( -180deg )"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{let{isOpen:t=!1,tooltipTitle: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,["isOpen","tooltipTitle"]);const a=c(),p={icon:s.Z,className:a.collapseButton,iconClassName:l()({[a.expandLess]:t})},d={tooltipTitle:n};return o().createElement(i.k,u({},p,d,r))}},39621:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),a=n(17440),l=n(87918),i=n.n(l),s=n(6782),c=n(94079),u=n(31517),p=n(31276);const d=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),m=[i().text("minutes"),i().text("hours"),i().text("days"),i().text("weeks"),i().text("months"),i().text("years")],g=e=>{let{interval:[t,n],onChange:r,onFocus:l}=e;const i=d(),g=(0,a.pipe)(p.NA,parseInt,(e=>[e,n]),r),f=(0,a.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return o().createElement("div",{className:i.root},o().createElement(c.TextField,{type:"number",value:t||"",onChange:g,inputProps:{min:1,onFocus:l},InputProps:{classes:{root:i.input}},className:i.inputNumber}),o().createElement(u.Z,{label:"",placeholder:(0,s.Z)(n),className:i.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:m.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:f,TextFieldProps:{inputProps:{onFocus:l},InputProps:{classes:{root:i.input}}}}))}},92575:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(17440),s=n(70347);const c=(0,n(5407).Z)(s.ZP);var u=n(5190),p=n(18461),d=n(94079),m=n(71153),g=n.n(m),f=n(88611);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function h(e){const{innerProps:t,innerRef:n,children:r,isFocused:a,isSelected:l,selectProps:{classes:i},label:s}=e;return o().createElement(d.MenuItem,b({className:g()(i.option,{[i["option--selected"]]:l}),ref:n,selected:a,component:"div"},t),o().createElement(d.Checkbox,{color:"primary",checked:l}),o().createElement(f.C,{value:s},o().createElement("div",{className:i["option--item"]},r)))}h.propTypes={children:l().node,innerProps:l().shape({id:l().string.isRequired,key:l().string,onClick:l().func.isRequired,onMouseMove:l().func.isRequired,onMouseOver:l().func.isRequired,tabIndex:l().number.isRequired}).isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),isFocused:l().bool.isRequired,isSelected:l().bool.isRequired,label:l().string,selectProps:l().shape({classes:l().shape({option:l().string})})};const y={Option:h};var E=n(79692),v=n(31276);function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const S=(0,E.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let C=0;function P(e){const{label:t,creatable:n,getOptions:a,loadingIndicator:l,components:s,classes:d,styles:m,onChange:g,onInputChange:f,menuPlacement:b="auto"}=e,h=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","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),E=n?c:a?p.Z:u.Z,[w,P]=(0,r.useState)(""),N=S((0,i.omit)(["classes"],e)),T="custom-select-"+C++,I=O({},y,s),k=(0,v.ze)(N,d),R=O({indicatorSeparator:e=>O({},e,{margin:"10px 0"}),loadingIndicator:e=>O({},e,{display:l?e.display:"none"}),loadingMessage:e=>O({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},m),Z=t?{inputId:T,TextFieldProps:O({label:t,InputLabelProps:{htmlFor:T,shrink:!(!e.value||!e.value.length)||void 0,className:k.label}},e.TextFieldProps)}:{};return o().createElement(E,x({isMulti:!0,inputId:T,inputValue:w,onChange:function(e,t){g(e,t),"create-option"===t.action&&(P(""),f("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;f(e,{action:n}),"set-value"!==n&&P(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:k,components:I,styles:R,menuPlacement:b,loadOptions:a},Z,h))}P.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},P.propTypes={creatable:l().bool,cacheOptions:l().bool,defaultOptions:l().bool,value:l().arrayOf(l().shape({label:l().string.isRequired,value:l().any})),options:l().arrayOf(l().shape({label:l().string.isRequired,value:l().any})),onChange:l().func,onInputChange:l().func,placeholder:l().string,label:l().string,loadingIndicator:l().bool,components:l().shape({ClearIndicator:l().func,Control:l().func,DropdownIndicator:l().func,DownChevron:l().func,CrossIcon:l().func,Group:l().func,GroupHeading:l().func,IndicatorsContainer:l().func,IndicatorSeparator:l().func,Input:l().func,LoadingIndicator:l().func,Menu:l().func,MenuList:l().func,MenuPortal:l().func,LoadingMessage:l().func,NoOptionsMessage:l().func,MultiValue:l().func,MultiValueContainer:l().func,MultiValueLabel:l().func,MultiValueRemove:l().func,Option:l().func,Placeholder:l().func,SelectContainer:l().func,SingleValue:l().func,ValueContainer:l().func}),classes:l().shape({control:l().string,valueContainer:l().string,multiValue:l().string,noOptionsMessage:l().string,singleValue:l().string,placeholder:l().string,menu:l().string,clearIndicator:l().string,dropdownIndicator:l().string,option:l().string,"option--selected":l().string,label:l().string}),styles:l().shape({clearIndicator:l().func,container:l().func,control:l().func,dropdownIndicator:l().func,group:l().func,groupHeading:l().func,indicatorsContainer:l().func,indicatorSeparator:l().func,input:l().func,loadingIndicator:l().func,loadingMessage:l().func,menu:l().func,menuList:l().func,menuPortal:l().func,multiValue:l().func,multiValueLabel:l().func,multiValueRemove:l().func,noOptionsMessage:l().func,option:l().func,placeholder:l().func,singleValue:l().func,valueContainer:l().func}),TextFieldProps:l().object,getOptions:l().func,menuPlacement:l().string,menuPortalTarget:l().object,getOptionValue:l().func,isSearchable:l().bool};const N=P},85451:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),a=n(52730),l=n(87918),i=n.n(l),s=n(17440),c=n(71153),u=n.n(c),p=n(94079),d=n(92575),m=n(96808),g=n(99493),f=n(87638),b=n(79692);function h(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){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E={input:e=>h({},e,{fontSize:"14px"}),loadingMessage:e=>h({},e,{fontSize:"14px"}),menuPortal:e=>h({},e,{zIndex:1300})},v=(0,b.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),x=e=>{let{selectedUsers:t,onChange:n,className:l,disableUnderline:c}=e;const b=v(),h=e=>({value:e,label:e}),y=e=>e.map(h),x=(0,a.useSelector)(f.ZP.selectors.getTenant),O=(0,a.useSelector)(f.ZP.selectors.getServicesPath),w=(0,r.useRef)();return o().createElement("div",{className:u()(b.root,l)},o().createElement(p.Typography,{className:b.title,variant:"subtitle1"},i().text("User")),o().createElement(d.Z,{value:y(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(w.current||(w.current=(0,g.kz_)({tenant:x,servicesPath:O})),w.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>g.P6Y.strings.search(t,e))):t)(e),y))),TextFieldProps:{InputProps:{disableUnderline:c},className:b.dropDownInput},components:{DropdownIndicator:m.Z},styles:E,classes:b,menuPortalTarget:document.body}))}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>u,rx:()=>p,_V:()=>d,Xr:()=>m});var r=n(17440),o=n(87918),a=n.n(o),l=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},u=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(l.I))),p=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(s),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),d=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(d).join(", "):(0,r.is)(Object,e)?d("value"in e?e.value:Object.values(e)):e.toString(),m=e=>({[l.I.COMMENT_ADDED]:a().text("Comment added"),[l.I.COMMENT_DELETED]:a().text("Comment deleted"),[l.I.COMMENT_UPDATED]:a().text("Comment updated"),[l.I.ENTITIES_MERGED]:a().text("Profile merged"),[l.I.ENTITIES_MERGED_MANUALLY]:a().text("Profile merged manually"),[l.I.ENTITIES_MERGED_ON_THE_FLY]:a().text("Profile merged on the fly"),[l.I.ENTITIES_SPLITTED]:a().text("Profile un-merged"),[l.I.ENTITY_CHANGED]:a().text("Profile updated"),[l.I.ENTITY_CREATED]:a().text("Profile created"),[l.I.ENTITY_LOST_MERGE]:a().text("Profile lost merge"),[l.I.ENTITY_REMOVED]:a().text("Profile removed"),[l.I.GROUP_CHANGED]:a().text("Group updated"),[l.I.GROUP_CREATED]:a().text("Group created"),[l.I.GROUP_REMOVED]:a().text("Group removed"),[l.I.MODEL_UPDATED]:a().text("Model was updated"),[l.I.NOT_MATCHES_RESET]:a().text("Not matches reset"),[l.I.NOT_MATCHES_SET]:a().text("Not matches set"),[l.I.PERIODIC_TASK_SCHEDULED]:a().text("Periodic task was scheduled"),[l.I.POTENTIAL_MATCHES_FOUND]:a().text("Potential matches found"),[l.I.POTENTIAL_MATCHES_REMOVED]:a().text("Potential matches removed"),[l.I.RELATIONSHIP_CHANGED]:a().text("Relationship updated"),[l.I.RELATIONSHIP_CREATED]:a().text("Relationship created"),[l.I.RELATIONSHIP_REMOVED]:a().text("Relationship removed"),[l.I.USER_LOGIN]:a().text("Logged in"),[l.I.USER_LOGOUT]:a().text("Logged out"),[l.I.USER_PROFILE_VIEW]:a().text("Profile viewed"),[l.I.USER_SEARCH]:a().text("Searched"),[l.I.ANALYTICS_ATTRIBUTES_CHANGED]:a().text("Analytics attribute changed"),[l.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:a().text("SFDC connector synchronization issue")}[e]||"")},51843:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),a=n(95038),l=n.n(a),i=n(87918),s=n.n(i),c=n(17440),u=n(99493),p=n(94079),d=n(96808),m=n(37699);const g=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),f=l().localeData().longDateFormat("L"),b=e=>{let{values:t,onChange:n,onFocus:a}=e;const l=f,i=(0,r.useRef)(null),[b,h]=(0,r.useState)(!1),y=g(),E=(0,r.useCallback)((()=>{h((e=>!e)),a()}),[a]),v=()=>{h(!1)};return o().createElement("div",{className:y.root},o().createElement(p.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,l))).join(" — "),onClick:E,variant:"filled",ref:i,InputProps:{endAdornment:o().createElement(d.Z,{selectProps:{classes:y,menuIsOpen:b},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:y.inputRoot,input:y.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${l} — ${l}`)}),o().createElement(p.Menu,{variant:"menu",open:b,autoFocus:!1,classes:{paper:y.paper},anchorEl:i.current,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:b,style:{width:"100%"}}},o().createElement(m.Z,{values:t,onCancel:v,onApply:e=>{n(e),h(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},67885:(e,t,n)=>{let r,o;n.d(t,{K:()=>r,o:()=>o}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(o||(o={}))},16940:(e,t,n)=>{n.d(t,{_:()=>ca,t:()=>Sa});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(99493),f=n(87918),b=n.n(f),h=n(3096),y=n.n(h),E=n(87638),v=n(2804),x=n(7718),O=n(3515),w=n(17554),S=n(61756),C=n(57730),P=n(76536),N=n(26481),T=n(49759),I=n(94150),k=n(26005),R=n(99136),Z=n(21077),D=n(67268),j=n(71153),A=n.n(j),L=n(8962);const M=o().createContext(null);M.displayName="SingleAttributeContext";var U=n(60995),H=n(10237),V=n(58662),_=n(94079),F=n(93416),z=n(75512),B=n(30553),W=n(91181),G=n(32152),q=n(36444),Y=n(79692);const $=(0,Y.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"}}))),Q=e=>{let{className:t}=e;const n=$(),a=(0,r.useRef)(),[l,i]=(0,r.useState)(!1),{showInactive:s,toggleShowInactive:c}=(0,r.useContext)(M),u=()=>i((e=>!e));return o().createElement(o().Fragment,null,o().createElement(_.Button,{ref:a,classes:{root:A()(n.triggerButton,t)},onClick:u},o().createElement(q.Z,null)),o().createElement(_.Popover,{open:l,classes:{paper:n.popupContent},anchorEl:a.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(_.FormControlLabel,{classes:{root:n.checkboxControlRoot,label:n.checkboxControlLabel},control:o().createElement(_.Checkbox,{className:n.checkboxControlCheckbox,checked:s,onChange:e=>c(e.target.checked)}),label:b().text("Show inactive values")})))},X=(0,Y.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"}}))),K=e=>{let{caption:t,totalVisibleValues:n,showInactiveValuesMenu:a}=e;const l=X(),{searchQuery:i,setSearchQuery:s,setPage:c,totalNonVisibleValues:u,nonVisibleValues:p,attributeType:d}=(0,r.useContext)(M);return o().createElement(F.Z,{title:b().text(t),className:l.root},o().createElement(z.Z,{widthToHide:500},o().createElement(B.Z,{height:24,margin:16}),o().createElement(_.Typography,{className:l.totalCaption,variant:"caption"},b().number(n)," ",1===n?b().text("item"):b().text("items"))),o().createElement(W.Z,{nonOvTotal:u,className:l.ovIcon,nonOvValues:p,attributeType:d}),o().createElement(G.i,{query:i,onChange:e=>{s(e),c(0)}}),a&&o().createElement(Q,null))};var J=n(65549),ee=n(93140),te=n(76134),ne=n(96698);const re=(0,Y.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}))),oe=g.nIW,ae=(e,t)=>"object"==typeof e?Object.values(e).some((e=>e.some((e=>{let{value:n}=e;return ae(n,t)})))):g.P6Y.strings.search(String(e),t),le=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 ae(t,l)})))(t,n,r),c=(0,i.filter)(g.OXP,s);return{[(0,g.xy8)(r)]:{[oe(r)]:c.slice(a,a+o),paging:{[r]:{totalOvValues:c.length,totalValues:s.length}}}}};function ie(){return ie=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},ie.apply(this,arguments)}function se(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){ce(e,t,n[t])}))}return e}function ce(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=[],pe=e=>{let{values:t,attributeType:n,parentUri:l,showInactive:s}=e;const c=re(),{uri:u,required:d,cardinality:m,name:f}=n,h=(0,a.useDispatch)(),y=(0,r.useContext)(p.m),v=(0,a.useSelector)(E.ZP.selectors.getEntity),x=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,v.uri)||{})),O=(0,a.useSelector)((e=>E.ZP.selectors.getActiveErrorsForAttributesPager(e,l,n))),w=(0,a.useSelector)((e=>(0,g.tQX)(l,n,E.ZP.selectors.getProfileErrors(e)))),S=(0,a.useSelector)(E.ZP.selectors.getMode),C=(0,g.xy8)(n),P=(0,i.pipe)((0,i.pathOr)(ue,[C,f]),(0,i.map)((0,i.prop)("uri")))(v),N=(0,i.pathOr)(ue,[C,f],x),T=N.map((0,i.prop)("uri")),I=(0,g.ZiX)(v.uri),k=(0,r.useRef)((0,g.gjI)({parentUri:l,attributeType:n})),R=(0,g.O27)(N),Z=d&&R,D=Z?[k.current]:N.filter((0,i.pipe)((0,i.prop)("uri"),g.ZiX)),j=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.addAttributes,h)(e.map((e=>se({},e,{viewId:y}))))),[y,h]),L=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.modifyAttribute,h)(se({},e,{viewId:y}))),[y,h]),M=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.removeAttribute,h)(se({},e,{viewId:y}))),[y,h]),U=(0,r.useCallback)((0,i.pipe)(E.N5.errors.actions.errorDeactivated,h),[h]),H=(0,r.useCallback)((()=>{const e={parentUri:l,attributeType:n};return j(Z&&!(0,g.YkM)(n.type)?[e,e]:[e])}),[j,l,n,Z]),V=(0,g.Vg3)({attributeType:n,mode:S}),F={attributeType:n,errors:O,crosswalks:x.crosswalks,mode:S,onAddAttributes:j,onChangeAttribute:L,onDeactivateError:U,showNonOv:s};return o().createElement("div",null,o().createElement(ee.Z,{cardinality:m}),o().createElement(te.Z,{message:w}),V&&o().createElement(_.Button,{color:"primary",onClick:H,className:c.moreButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),D.map(((e,t)=>o().createElement(ne.Z,ie({key:e.uri},F,{attributeValue:e,lazy:Z&&!d,showEmptyEditors:I,ownError:(0,g.ADq)(e,t,u,O),onDeleteAttribute:M})))),D.length>0&&t.length>0&&o().createElement(_.Divider,{className:c.divider}),t.map((e=>{const t=N.find((0,i.propEq)("uri",e.uri)),n=t||e,r=P.includes(n.uri)&&!T.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()({[c.ovFalse]:!(0,g.OXP)(n)})},o().createElement(ne.Z,ie({},F,{attributeValue:n,ownError:(0,g.ADq)(n,null,u,O),onDeleteAttribute:M,state:l})))})))};var de=n(81303);const me=(0,Y.Z)((e=>({ovFalse:e.inactive}))),ge=e=>{let{values:t,attributeType:n,showInactive:r}=e;const a=me();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(de.Z,{attributeValue:e,attributeType:n,showNonOv:r})))))},fe=(0,Y.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}}))),be=e=>{let{config:t,className:n}=e;const{caption:l,max:i,showInactiveValuesMenu:s}=t,c=fe(),{values:u,totalVisibleValues:p,page:d,setPage:m,isLoading:g,hasPaging:f,attributeType:h,showInactive:y}=(0,r.useContext)(M),v=(0,a.useSelector)(E.ZP.selectors.getEntityUri),x=(0,a.useSelector)(E.ZP.selectors.getIsViewMode),O=(0,a.useSelector)(E.ZP.selectors.getIsEditableMode),w=(0,a.useSelector)(E.ZP.selectors.getPivotingAttributes),S=0!==u.length;return o().createElement(U.J.Provider,{value:w},o().createElement(H.Z,{className:A()(c.root,n)},o().createElement(K,{totalVisibleValues:p,caption:l,showInactiveValuesMenu:s}),o().createElement(_.Box,{className:c.content},(()=>{if(g)return o().createElement(R.Z,null);if(h){if(x&&S){const e={values:u,attributeType:h,showInactive:y};return o().createElement(ge,e)}if(O){const e={values:u,attributeType:h,parentUri:v,showInactive:y};return o().createElement(pe,e)}}return o().createElement(_.Typography,{className:c.noData},b().text("No data"))})()),f&&o().createElement(V.Z,{count:p,page:d,rowsPerPage:i,rowsPerPageOptions:[],onChangePage:m,classes:{root:c.pagination}})))};var he=n(67218),ye=n(20562);function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ve=(e,t,n)=>{const{attributeUri:o,max:l=15}=e,s=(0,a.useSelector)(E.ZP.selectors.getMetadata),[c,u]=(0,r.useState)([]),[p,d]=(0,r.useState)(null),[m,f]=(0,r.useState)(!1),b=(0,he._)(),h=(0,r.useRef)(null),y=(0,a.useDispatch)(),v=(0,a.useSelector)(E.ZP.selectors.getApiPath),x=(0,a.useSelector)(E.ZP.selectors.getTenant),O=n?E.ZP.selectors.getEntityWithDiff:E.ZP.selectors.getEntityWithoutDiff,w=(0,a.useSelector)(O),S=(0,a.useSelector)(E.ZP.selectors.getIsViewMode),C=(0,a.useSelector)(E.ZP.selectors.getIsHistoryModeEnabled),P=(0,a.useSelector)(E.ZP.selectors.getHistoryDiff),N=w.uri,T=oe(o),I=(0,g.xy8)(o);h.current=(0,g.JQy)(w,N,T);const k=(0,r.useMemo)((()=>(0,g.zeJ)(s,o)),[s,o]),{globalFilter:R}=(0,a.useSelector)(E.ZP.selectors.getGlobalSearchRequestOptions),{showInactive:Z}=t,D=(0,r.useCallback)((()=>{if(k&&(0,g.Uty)(k)&&!(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)(w)||C?le: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){Ee(e,t,n[t])}))}return e}({metadata:s,entity:w,apiPath:v,tenant:x,parentUri:N,defaultMaxValues:l,attributeTypeUri:o,offset:l*e,globalFilter:R,options:n?"":void 0},r))).then((e=>{const t=(0,i.path)([I],e),n=(0,i.pathOr)([],[T],t);C||y(E.N5.actions.processNextPageOfAttributeValues({parentUri:N,attributeTypeUri:o,attributeTypeName:T,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)}),[v,N,x,o,l,s,t,R,k,C,P]);(0,r.useEffect)((()=>{D()}),[D]),(0,ye.D)((()=>{S&&D()}),[S]);const j=(0,i.partition)(g.OXP),[,A]=j(h.current||[]),L=Z?[]:A,M=Z?"totalValues":"totalOvValues",U=(0,i.ifElse)((0,i.has)(M),(0,i.prop)(M),(0,i.always)(c.length))(p),H=l<U,V=null!=p&&p.totalValues?p.totalValues-U:L.length;return{values:c,isLoading:m,hasPaging:H,totalVisibleValues:U,attributeType:k,totalNonVisibleValues:V,nonVisibleValues:L}};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}var Oe=n(37152),we=n(31274),Se=n(79026),Ce=n(8818),Pe=n(90324),Ne=n(70595);const Te=o().createContext(null);Te.displayName="RelationsViewStateContext";const Ie=(0,Y.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"}}))),ke=e=>{let{className:t}=e;const n=Ie(),a=(0,r.useRef)(),{showInactive:l,toggleShowInactive:i,sortOrder:s,toggleSortOrder:c,sortOption:u,changeSortOption:p,sortOptions:d}=(0,r.useContext)(Te),[m,f]=(0,r.useState)(!1),h=()=>f((e=>!e)),y=!(0,g.O27)(d),E="asc"===s;return o().createElement(o().Fragment,null,o().createElement(_.Button,{ref:a,classes:{root:A()(n.button,t)},onClick:h},o().createElement(q.Z,null)),o().createElement(_.Popover,{open:m,classes:{paper:n.popupContent},anchorEl:a.current,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(_.FormControlLabel,{classes:{label:n.checkboxControlLabel},control:o().createElement(_.Checkbox,{className:n.checkboxControlCheckbox,checked:l||!1,onChange:i}),label:b().text("Show inactive Relationships")}),y&&o().createElement(o().Fragment,null,o().createElement(_.Divider,{className:n.divider}),o().createElement(_.Typography,{className:n.title,variant:"h6"},b().text("Sort by")),o().createElement("div",{className:n.sortControls},o().createElement(Se.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(Ce.k,{tooltipTitle:E?b().text("Ascending"):b().text("Descending"),icon:E?Pe.Z:Ne.Z,onClick:c,className:n.sortOrderButton,size:"L"})))))};ke.displayName="FilterButton";const Re=ke,Ze=(0,Y.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 De=n(61932),je=n(55847);const Ae=o().createContext(null);function Le(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){Me(e,t,n[t])}))}return e}function Me(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,He=(0,Y.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 Ve=n(81137);const _e=e=>{let{label:t}=e;const n=He();return o().createElement(_.Badge,{classes:{anchorOriginTopRightRectangle:n.badgePosition,badge:n.badge},badgeContent:t},o().createElement(De.Z,null))},Fe=()=>{const{tenants:e,selectedTenant:t,onConfirmImport:n,onCancelConfirmation:l,onImportClick:i}=(()=>{var e;const t=(0,a.useSelector)(E.ZP.selectors.getDataTenants),n=(0,a.useDispatch)(),{config:o,reloadRelations:l}=(0,r.useContext)(Ae),i=(0,a.useSelector)(E.ZP.selectors.getEntityUri),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(null),d=(0,a.useSelector)(E.ZP.selectors.getDtssPath),m=(0,a.useSelector)(E.ZP.selectors.getTenant),f=[Le({},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 Le({},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(E.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 v=(0,r.useCallback)((()=>p(null)),[]),x=(0,r.useCallback)((e=>p(e)),[]);return{tenants:s,selectedTenant:u,onConfirmImport:y,onCancelConfirmation:v,onImportClick:x}})(),s=He(),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(Ce.k,{size:"L",icon:De.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(je.Z,{menuId:"importDT-table-actions",buttonComponent:Ce.k,buttonProps:{tooltipTitle:b().text("Import connections"),size:"L",icon:()=>o().createElement(_e,{label:u})},menuItems:e.map((e=>({onClick:()=>{i(e)},text:e.label})))}),o().createElement(Ve.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})))},ze=e=>{let{title:t,total:n}=e;const a=Ze(),{searchQuery:l,changeSearchQuery:i}=(0,r.useContext)(Te);return o().createElement(F.Z,{title:t||"",className:a.header},n>0&&o().createElement(z.Z,{widthToHide:400},o().createElement(B.Z,{height:24,margin:16}),o().createElement(_.Typography,{className:a.totalCaption,variant:"caption"},n>1?b().text("${count} items",{count:n}):b().text("${count} item",{count:n}))),o().createElement(G.i,{query:l,onChange:i}),o().createElement(Fe,null),o().createElement(Re,null))};var Be=n(11013),We=n(27604),Ge=n(22983),qe=n(31254),Ye=n(31039);const $e=(0,Y.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 Qe(){return Qe=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},Qe.apply(this,arguments)}const Xe=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=$e(),u=(0,he._)(),p=(0,a.useSelector)(E.ZP.selectors.getTenant),d=(0,a.useSelector)(E.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]),v=o().createElement("div",{className:c.tooltipContent},o().createElement("div",{className:c.label},t),m&&o().createElement(_.CircularProgress,{size:16,classes:{colorPrimary:c.progress}}),b&&o().createElement("div",{className:c.secondaryLabel},b));return o().createElement(_.Tooltip,Qe({onOpen:y,title:v,disableFocusListener:!0,classes:{tooltip:c.tooltip}},s),l)},Ke=(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 Je=n(77277);const et=(0,Y.Z)((()=>({container:{display:"flex"}})));function tt(){return tt=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},tt.apply(this,arguments)}const nt=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=et();return o().createElement("div",{className:a.container},o().createElement(Je.Z,tt({onClick:t,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Accept")),o().createElement(Je.Z,tt({onClick:n,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Ignore")))},rt=(0,Y.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"}}))),ot=(0,r.memo)((e=>{let{connection:t,metadata:n,showControls:a,onRemoveRelation:l,onEditRelation:i,onAcceptRelation:s,onIgnoreRelation:c,renderRelationArrowButton:u}=e;const p=rt(),{entity:d,relation:m}=t,f=(0,g.$qe)(t),h=(0,g.xr3)(t),y=(0,g.iJH)(t),{entityType:E,entityLabel:v,preparedUri:x,relationLabel:O}=Ke(t,n),w=(0,g.Fn9)(m)&&(0,g.Fn9)(d),{canRemove:S,canUpdate:C}=(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}),P=(0,r.useCallback)((()=>l(t.relation.relationUri)),[l,t]),N=(0,r.useCallback)((()=>i(t)),[i,t]),T=(0,r.useCallback)((()=>{s(t)}),[s,t]),I=(0,r.useCallback)((()=>c(t)),[c,t]),k=(S||C)&&a&&!t.suggested?o().createElement(o().Fragment,null,C&&o().createElement(Ce.k,{icon:We.Z,size:"XS",onClick:N,tooltipTitle:b().text("Edit")}),S&&o().createElement(Ce.k,{icon:Ge.Z,size:"XS",onClick:P,tooltipTitle:b().text("Remove")})):void 0,R=t.suggested?o().createElement(nt,{acceptRelation:T,ignoreRelation:I,size:"small",disabled:y}):void 0,Z=y?b().text("ignored"):b().text("edited");return o().createElement("div",{className:A()(p.container,{[p.rowInactive]:!w},{[p.removed]:f||y})},o().createElement("div",{className:p.row},u&&u(),o().createElement(qe.Z,{className:p.entityAvatar,entityType:E}),o().createElement(Ye.Z,{value:x,className:p.entityLabelContainer},o().createElement(Xe,{label:v,entity:d},o().createElement("span",{className:p.entityLabel},v)),(h||y)&&o().createElement(_.Typography,{variant:"caption",className:p.editedLabel},"(",Z,")"),O&&o().createElement("span",{className:p.relationLabel},`, ${O}`)),o().createElement("div",{className:p.editButtonsContent},k),R))})),at=(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 lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var it=n(98989),st=n(83543);const ct=(0,Y.Z)({arrowIcon:{fontSize:"16px",marginRight:"6px"}}),ut=e=>{let{onClick:t,connection:n,config:r,showSecondLevel:a}=e;const l=ct(),{parentEntityUri:i}=n,{contentSecondLevel:s}=r,c={onClick:t,className:l.arrowIcon};return i||!s||(0,g.xvW)(n)?null:a?o().createElement(st.Z,c):o().createElement(it.Z,c)},pt=(0,Y.Z)({row:{display:"flex",alignItems:"center",width:"100%"},secondLevelContent:{paddingLeft:"24px"}}),dt=e=>{let{config:t,connection:n,children:l}=e;const i=pt(),{showInactive:s}=(0,r.useContext)(Te),{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=>E.ZP.selectors.getConnectionsWithDraftsByViewId(e,t.id,f.entityUri)))||[],{activityFilter:h}=(0,a.useSelector)(E.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){lt(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(E.N5.relations.actions.secondLevelRelationsLoaded({connections:n,parentEntityUri:f.entityUri,id:t.id})),d(r),u(!1)}))}),[t.id,m,l,f.entityUri,h,o]),v=(0,r.useCallback)((()=>{i||n.connections||y(),s((e=>!e))}),[y,n.connections,i]);return{connections:b,showSecondLevel:i,toggleShowSecondLevel:v,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(ut,{onClick:p,connection:n,config:t,showSecondLevel:u}))),u&&o().createElement(we.X.Provider,{value:b},o().createElement("div",{className:i.secondLevelContent},o().createElement(zt,{isLoading:m,config:t,loadRelations:d,connections:c,total:f,parentEntityUri:n.entity.entityUri}))))},mt=(0,Y.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"}}))),gt=e=>{let{className:t,connections:n=[],config:l,mode:s,noDataText:c,parentEntityUri:u}=e;const p=(0,a.useSelector)(E.ZP.selectors.getMetadata),d=(0,a.useSelector)((e=>E.ZP.selectors.getRelationToAddByViewId(e,l.id))),m=(0,a.useSelector)((e=>E.ZP.selectors.getRelationsToEditByViewId(e,l.id))),f=(0,a.useSelector)(E.ZP.selectors.getEntity),h=(0,a.useSelector)((e=>E.ZP.selectors.getCheckIfCanAddRelations(e,l.content))),y=(0,a.useDispatch)(),v=mt(),x=(0,r.useCallback)((()=>{const e=(0,g.vlo)({config:l,mode:s,metadata:p,parentEntityUri:u});(0,i.pipe)(E.N5.relations.actions.openRelationEditor(l.id),y)(e)}),[l,s,p,y,u]),O=(0,r.useCallback)((e=>{y(E.N5.relations.actions.closeRelationEditor(l.id,e)),y(E.N5.relations.actions.removeRelation(l.id,e));const t=n.find((t=>E.N5.relations.selectors.getRelationUriFromConnection(t)===e)),r=E.N5.relations.selectors.getEntityUriFromConnection(t);(0,g.ZiX)(r)&&y(E.N5.modifiedEntities.actions.entityDeleted(r))}),[l,n,y]),w=l.content,S=at(w.inRelations,w.outRelations),C=(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(E.N5.relations.actions.addRelation(l.id,t))}),[y,l,S]),P=(0,r.useCallback)((e=>{y(E.N5.relations.actions.ignoreRelation(l.id,{relationType:S.type,relationDirection:S.direction,entityUri:e.entity.entityUri,relationUri:e.relation.relationUri}))}),[y,l,S]),[N,T]=(0,i.partition)(g.xvW,n),I=f&&h,k=0===N.length&&0===T.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(dt,{config:l,connection:e,key:c},(t=>r?o().createElement(Be.Z,{connection:r,config:l,mode:s,metadata:p}):o().createElement(ot,{renderRelationArrowButton:t,connection:e,metadata:p,showControls:a,onRemoveRelation:O,onEditRelation:(0,i.pipe)(E.N5.relations.actions.openRelationEditor(l.id),y),onAcceptRelation:C,onIgnoreRelation:P})))},Z=I&&(!d||d&&d.parentEntityUri===u),D=d&&d.parentEntityUri===u;return o().createElement("div",{className:t},Z&&o().createElement(_.Button,{color:"primary",onClick:x,className:v.moreButton},o().createElement(J.Z,{classes:{root:v.icon}}),o().createElement("div",{className:v.buttonLabel},b().text("Add"))),D&&o().createElement(Be.Z,{connection:d,config:l,mode:s,metadata:p}),N.map(R),N.length>0&&T.length>0&&o().createElement(_.Divider,{className:v.divider}),T.map(R),k&&o().createElement(_.Typography,{className:v.noData},c))};var ft=n(19603),bt=n(94646),ht=n(78101),yt=n(80931);const Et=(0,Y.Z)((e=>({attributesList:{paddingLeft:"46px",paddingRight:"16px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0}})));function vt(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){xt(e,t,n[t])}))}return e}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ot=e=>{let{connection:t,className:n}=e;const l=Et(),{relation:s}=t,c=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant),u=(0,a.useSelector)(E.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)((()=>vt({attributes:vt({},E.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)(O.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(ht.A.Provider,{value:y},o().createElement(yt.Z,{className:A()(l.attributesList,n),entity:d,attrTypes:p})):o().createElement("div",{className:A()(l.attributesList,n)},b().text("No attributes"))};var wt=n(86602),St=n(82726);const Ct=e=>{let{show:t,onToggle:n,className:r}=e;return o().createElement(Ce.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?wt.Z:St.Z,onClick:n})},Pt=(0,Y.Z)((e=>({container:{display:"flex",flexDirection:"column",paddingBottom:"2px"},row:{display:"flex",alignItems:"flex-start",flexDirection:"row",minHeight:"16px",padding:"3px 16px 0 "},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px",wordBreak:"break-all"},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"},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"},suggestedLabelWrapper:{marginTop:"6px"},labelWrapper:{display:"flex"}}))),Nt=(0,r.memo)((e=>{let{connection:t,renderRelationArrowButton:n,acceptRelation:l,ignoreRelation:s}=e;const c=Pt(),u=t.suggested,{entity:p,relation:d}=t,[m,f]=(0,r.useState)(!1),b=(0,a.useSelector)(E.ZP.selectors.getMetadata),{entityType:h,entityLabel:y,preparedUri:v,relationLabel:x}=Ke(t,b),O=(0,g.Fn9)(d)&&(0,g.Fn9)(p),w=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant),S=p&&d&&(0,g.wp9)(g.q7e.RELATION,{entityUri:w,connection:t})||[];return o().createElement("div",{className:A()(c.container,{[c.rowInactive]:!O},{[c.suggestedWrapper]:u})},o().createElement("div",{className:A()(c.row,ft.U)},n&&n(),o().createElement("div",{className:A()(c.labelWrapper,{[c.suggestedLabelWrapper]:u})},o().createElement(qe.Z,{className:c.entityAvatar,entityType:h}),o().createElement(Ye.Z,{value:v,className:c.entityLabelContainer},o().createElement(Xe,{label:y,entity:p},o().createElement("span",{className:c.entityLabel},y)),x&&o().createElement("span",{className:c.relationLabel},`, ${x}`))),o().createElement("div",{className:c.additionalButtonsWrapper},!(0,i.isEmpty)(S)&&o().createElement(bt.Z,{className:c.commentsContainer,uri:(0,g.gjS)(d),relatedObjectUris:S,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),u&&o().createElement(nt,{size:"small",acceptRelation:l(t),ignoreRelation:s(t)}),!u&&o().createElement(Ct,{show:m,onToggle:()=>{f((e=>!e))},className:c.showDetails}))),m&&o().createElement(Ot,{connection:t}))}));var Tt=n(52691),It=n(16208);const kt=e=>e.filter((e=>5===e.value)).length,Rt=e=>e.filter((e=>1===e.value)).length,Zt=e=>0===e.length?"0%":kt(e)/e.length*100+"%",Dt=e=>0===e.length?"0%":Rt(e)/e.length*100+"%",jt=(0,Y.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)"}}))),At=e=>{let{ratings:t,className:n}=e;const r=jt();return o().createElement("div",{className:A()(r.wrapper,n)},o().createElement(_.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:Zt(t)}}),o().createElement("div",{className:r.dislikesScale,style:{width:Dt(t)}})),o().createElement("div",{className:r.counts},o().createElement("div",{className:A()(r.likesCount,r.count)},o().createElement(Tt.Z,{className:r.icon}),kt(t)),o().createElement("div",{className:r.count},o().createElement(It.Z,{className:r.icon}),Rt(t))))},Lt=(0,Y.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}}))),Mt=e=>{let{ratings:t,onAgree:n,onDisagree:r}=e;const l=Lt(),i=(0,a.useSelector)(E.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(_.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(je.Z,{buttonProps:{endIcon:o().createElement(st.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"}))},Ut=(0,Y.Z)((e=>({wrapper:{padding:"6px 16px 3px"},entityTypeIcon:{marginRight:"16px"},entityLabel:{color:e.palette.primary.main,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},entityLabelContainer:{textDecoration:"none",wordBreak:"break-all"},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 16px 3px",backgroundColor:e.suggested},commentsContainer:{marginTop:"21px","& + $ratings":{marginLeft:"16px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"}}))),Ht=e=>{let{connection:t,loadRelations:n,renderRelationArrowButton:l,acceptRelation:s,ignoreRelation:c}=e;const u=Ut(),p=t.suggested,[d,m]=(0,r.useState)(!1),{entity:f,relation:b}=t,h=(0,a.useSelector)(E.ZP.selectors.getMetadata),{entityLabel:y,entityType:v,preparedUri:x,relationLabel:O}=Ke(t,h),w=(null==b?void 0:b.ratings)||[],S=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant),C=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(_.Box,{display:"flex",minHeight:"62px",className:ft.U},o().createElement(_.Box,{display:"flex",alignItems:"flex-start"},o().createElement(_.Box,{display:"flex",alignItems:"center"},l&&l(),o().createElement(qe.Z,{entityType:v,className:u.entityTypeIcon})),o().createElement(_.Box,{display:"flex",flexDirection:"column"},o().createElement(Ye.Z,{value:x,className:u.entityLabelContainer},o().createElement(Xe,{label:y,entity:f},o().createElement("span",{className:u.entityLabel},y))),O&&o().createElement("span",{className:u.relationLabel},O),!p&&o().createElement(Mt,{ratings:w,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)(C)&&o().createElement(bt.Z,{className:u.commentsContainer,uri:(0,g.gjS)(b),relatedObjectUris:C,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),p&&o().createElement(nt,{acceptRelation:s(t),ignoreRelation:c(t)}),!p&&o().createElement(o().Fragment,null,o().createElement(At,{ratings:w,className:u.ratings}),o().createElement(Ct,{show:d,onToggle:()=>{m((e=>!e))},className:u.showDetailsButton})))),d&&o().createElement(Ot,{connection:t,className:u.relationAttributes}))},Vt=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=at(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(E.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(E.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)(O.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(dt,{config:i,connection:e,key:r},(t=>c?o().createElement(Ht,{loadRelations:l,connection:e,acceptRelation:d,ignoreRelation:p,renderRelationArrowButton:t}):o().createElement(Nt,{acceptRelation:d,ignoreRelation:p,connection:e,renderRelationArrowButton:t})))})))};Vt.displayName="RelationsList";const _t=Vt,Ft=(0,Y.Z)((e=>({list:{paddingTop:"8px",paddingBottom:"10px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),zt=e=>{let{isLoading:t,config:n,loadRelations:r,connections:l,total:i,parentEntityUri:s}=e;const c=Ft(),{selectors:u}=E.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(gt,{connections:l,className:c.list,key:null==p?void 0:p.uri,config:n,mode:d,noDataText:m,parentEntityUri:s}):i>0?o().createElement(_t,{config:n,loadRelations:r,connections:l,className:c.list,key:null==p?void 0:p.uri,mainEnityUri:p.uri}):o().createElement(_.Typography,{className:c.noData},m)},Bt=(0,Y.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}}),Wt=e=>{let{config:t,className:n}=e;const l=Bt(),{page:s,setPage:c,rowsPerPage:u,sortOrder:p,sortOption:d,showInactive:m,searchQuery:f,changeSearchQuery:b}=(0,r.useContext)(Te),{selectors:h}=E.ZP,y=(0,a.useSelector)((e=>h.getConnectionsWithDraftsByViewId(e,t.id))),v=(0,a.useSelector)(h.getEntity),x=(0,a.useSelector)((e=>h.getTotalByViewId(e,t.id))),O=(0,a.useSelector)(h.getMode),w=(0,r.useMemo)((()=>({order:p,field:d})),[p,d]);(0,r.useEffect)((()=>{b("")}),[null==v?void 0:v.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:C,reload:P}=(0,Oe.a)({sorting:w,filter:S,page:s,rowsPerPage:u,config:t,entity:v,relationActivityFilter:m?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY,mode:O}),N=(0,r.useMemo)((()=>(0,g.Px$)(y)),[y]),T=(0,r.useMemo)((()=>({reloadRelations:P,config:(0,i.pick)(["content","importFromDT","maxDtssImport"],t)})),[P,t]);return o().createElement(we.X.Provider,{value:N},o().createElement(H.Z,{className:n},o().createElement("div",{className:l.container},o().createElement(Ae.Provider,{value:T},o().createElement(ze,{title:t.caption,total:x})),o().createElement("div",{className:l.content},o().createElement(zt,{isLoading:C,config:t,loadRelations:P,connections:y,total:x}),x>u&&o().createElement(V.Z,{classes:{root:l.pagination},count:x,rowsPerPageOptions:[],rowsPerPage:u,page:s,onChangePage:c})))))};Wt.displayName="RelationsView";const Gt=o().createContext(null);Gt.displayName="SingleAttributeContext";var qt=n(86361),Yt=n(26180),$t=n(31276);function Qt(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){Xt(e,t,n[t])}))}return e}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Kt="CHANGE_SEARCH_QUERY",Jt=Qt({},Yt.ZP.actions,{changeSearchQuery:(0,$t.zD)(Kt)}),en=(e,t)=>t.type===Kt?Qt({},e,{searchQuery:t.payload,page:0}):Yt.ZP.reducer(e,t);var tn=n(92332),nn=n(67353);const rn={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},on=(0,Y.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":rn}}))),an=(0,nn.Z)((e=>{const t=on();return o().createElement("div",{className:t.headCell},o().createElement(tn.default,e))}));var ln=n(64091);function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cn=(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"))),un=(0,i.pipe)(g.DK$,cn),pn=(0,i.pipe)((0,i.split)("."),(0,i.slice)(2,1/0)),dn=e=>{if((0,g.vZp)(e)){const t=pn(e);return t.length>1?t.slice(0,-1):null}return null},mn=(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){sn(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:dn(e.id),headCellRenderer:an,rowCellValueRenderer:ln.Z})));var gn=n(99341);function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bn=n(52016),hn=n(1876),yn=n(60894);const En=(0,Y.Z)((()=>({header:{padding:"0 4px 0 16px"}}))),vn=e=>{let{title:t,searchQuery:n,onChangeSearchQuery:r,filtersEnabled:a,onToggleFilters:l,columnsData:i,selectedColumns:s,onChangeColumns:c}=e;const u=En();return o().createElement(F.Z,{title:t,className:u.header},o().createElement(G.i,{query:n,onChange:r}),o().createElement(hn.Z,{enabled:a,onClick:l}),o().createElement(B.Z,{height:24,margin:4}),o().createElement(yn.Z,{columnsData:i,selectedColumns:s,onChangeColumns:c}))};function xn(){return xn=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},xn.apply(this,arguments)}const On=(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=on();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,xn({key:t,value:e},l)))))}));var wn=n(85709);const Sn=e=>{let{onEdit:t,onRemove:n}=e;return o().createElement(o().Fragment,null,t&&o().createElement(Ce.k,{tooltipTitle:b().text("Edit"),icon:We.Z,size:"L",onClick:t}),n&&o().createElement(Ce.k,{tooltipTitle:b().text("Remove"),icon:Ge.Z,size:"L",onClick:n}))};function Cn(){return Cn=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},Cn.apply(this,arguments)}const Pn=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))(pn(e),t))(r,e),t)}),{}),(0,i.assoc)("value",e))(t))))(n,t)),[n,t]),h=(0,r.useMemo)((()=>mn(t)),[t]),y=on(),v=(0,a.useSelector)(E.ZP.selectors.getMode),x=(0,g.KIu)(v),O=(0,a.useSelector)(E.ZP.selectors.getMetadata),w=(0,a.useSelector)(E.ZP.selectors.getEntityUri),S=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,w)||{})),{attributeType:C}=(0,r.useContext)(Gt),P=(0,r.useCallback)((e=>o().createElement(On,Cn({},e,{isSorted:!!l&&l.field===e.columnData.id}))),[l]),[N,T]=(0,r.useState)(null),{canUpdate:I,canDelete:k}=(0,bn.l)(),R=(0,r.useMemo)((()=>"number"!=typeof N||!x||f.includes((0,i.pipe)((0,i.path)([N]),(0,i.prop)("uri"))(n))),[N,f,n,x]),Z="number"==typeof N&&(D=(0,i.path)([N],n),k(p)&&(0,g.xv5)({attributeType:C,mode:v,attributeValue:D,metadata:O,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,D)}));var D;const j="number"==typeof N&&(e=>I(p)&&(0,g.yv0)({attributeType:C,mode:v,attributeValue:e,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,e)}))((0,i.path)([N],n)),A=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);j&&d(e)}),[d,N,n,j]),L=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);if(!Z)return;const t={parentUri:w,attributeType:C,uri:e.uri,value:e};m(t),T(null)}),[N,n,m,Z,C,w]),M=R||!Z&&!j?void 0:o().createElement(Sn,{onEdit:j?A:void 0,onRemove:Z?L:void 0}),U=(0,r.useMemo)((()=>({deletedUris:f})),[f]);return o().createElement("div",{className:y.tableContainer},o().createElement(wn.Z,{columnsData:h,rowsData:b,sorting:l,onSort:s,filters:c,onFilter:u,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:P,onRowHover:T,hoverRowIndex:N,hoveredRowRightContent:M,context:U,classes:{hoveredRowRightContentWrapper:y["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:y["row-cell__buttons-container"]}}))},Nn=(0,Y.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 Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const In=e=>{let{onChangeAttribute:t,onCancel:n,onApply:l,onDeleteAttribute:s,hasChanges:c,attributeValue:u}=e;const d=Nn(),m=(0,a.useSelector)(E.ZP.selectors.getEntityUri),{attributeType:f}=(0,r.useContext)(Gt),h=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,m)||{})),y=(0,a.useSelector)(E.ZP.selectors.getMode),v=(0,a.useDispatch)(),x=(0,r.useContext)(p.m),O=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.addAttributes,v)(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){Tn(e,t,n[t])}))}return e}({},e,{viewId:x}))))),[x,v]),w=(0,g.ZiX)(m),S=(0,a.useSelector)((e=>E.ZP.selectors.getActiveErrorsForAttributesPager(e,m,f))),C=(0,r.useCallback)((0,i.pipe)(E.N5.errors.actions.errorDeactivated,v),[v]);return o().createElement(o().Fragment,null,o().createElement(ne.Z,{expanded:!0,attributeValue:u,showEmptyEditors:w,onDeleteAttribute:s,onDeactivateError:C,onChangeAttribute:t,onAddAttributes:O,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(_.Button,{onClick:()=>{n(u)}},b().text("Cancel")),o().createElement(_.Button,{color:"primary",disabled:!c,onClick:()=>{l(u)}},b().text("Apply"))))},kn=(0,Y.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 Rn(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){Zn(e,t,n[t])}))}return e}function Zn(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=[],jn=e=>{let{config:t,className:n}=e;const{caption:l,max:s}=t,c=kn(),{values:u,page:d,setPage:m,isLoading:f,searchQuery:h,setSearchQuery:y,visibleColumns:v,onFilter:x,onSort:O,onToggleFilters:w,onChangeColumns:S,filters:C,sorting:P,totalVisibleValues:N,hasPaging:T,attributeType:I,showTable:k}=(0,r.useContext)(Gt),Z=(0,r.useMemo)((()=>un(I)),[I]),{checkHasChanges:D,onChangeAttribute:j,onDeleteAttribute:L,onAdd:M,onCancel:U,onApply:z,onStartEditing:B,modifiedValues:W,editingValues:G,deletedUris:q}=(()=>{const[e,t]=(0,r.useState)(),[n,o]=(0,r.useState)([]),l=(0,a.useSelector)(E.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)(Gt),m=(0,a.useSelector)(E.ZP.selectors.getEntityUri),f=(0,a.useSelector)(E.ZP.selectors.getMetadata),b=(0,r.useCallback)((e=>{(0,i.pipe)(E.N5.actions.modifyAttribute,s)(Rn({},e,{viewId:c}))}),[c,s]),h=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.removeAttribute,s)(Rn({},e,{viewId:c}))),[c,s]),y=(0,r.useCallback)((()=>{const e=(0,g.gjI)({parentUri:m,attributeType:u});t(e.uri),b(Rn({},e,{value:(0,g.GPx)({attributeTypes:u.attributes,parentUri:e.uri,mode:l,metadata:f}),attributeType:u}))}),[m,u]),v=(0,r.useCallback)((e=>{o((t=>t.find((0,i.propEq)("uri",e.uri))?t:[...t,e]))}),[o]),x=(0,r.useCallback)((e=>{const r=n.find((0,i.propEq)("uri",e.uri));if(r){const t=Rn({},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]),O=(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]),w=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,m)||{})),S=(0,g.KIu)(l),C=(0,g.xy8)(u),P=(0,i.pathOr)(Dn,[C,null==u?void 0:u.name],w),N=(0,r.useMemo)((()=>[...P.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=>P.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}))),[P,n,e,d]),T=(0,r.useMemo)((()=>S?(0,i.pipe)((0,i.map)((0,i.prop)("uri")),(0,i.filter)((e=>!P.find((0,i.propEq)("uri",e)))))(d):[]),[P,d]),I=P.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:x,onApply:O,onStartEditing:v,modifiedValues:N,editingValues:I,deletedUris:T}})(),Y=(0,a.useSelector)(E.ZP.selectors.getMode),$=(0,g.KIu)(Y),Q=$?W:u,{canCreate:X}=(0,bn.l)(),K=X(t)&&I&&(0,g.Vg3)({attributeType:I,mode:Y})&&!G.length,ee=(0,r.useMemo)((()=>v.map((e=>Z.find((0,i.propEq)("id",e))))),[v,Z]);return o().createElement(H.Z,{className:A()(c.root,n)},k?o().createElement(o().Fragment,null,o().createElement(vn,{title:l,total:N,columnsData:Z,selectedColumns:v,onChangeColumns:S,searchQuery:h,onChangeSearchQuery:y,filtersEnabled:!!C,onToggleFilters:w}),o().createElement("div",{style:{position:"relative"}},$&&o().createElement("div",{className:c.editor},K&&o().createElement(_.Button,{color:"primary",onClick:M,className:c.addButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),G.map((e=>o().createElement(In,{key:e.uri,attributeValue:e,onChangeAttribute:j,onDeleteAttribute:L,onCancel:U,onApply:z,hasChanges:D(e)})))),o().createElement(Pn,{columnsData:ee,config:t,values:Q,filters:C,onFilter:x,sorting:P,onSort:O,onEdit:B,onDeleteAttribute:L,deletedUris:q}),T&&o().createElement(V.Z,{count:N,rowsPerPageOptions:[],rowsPerPage:s,page:d,onChangePage:m}),f&&o().createElement(R.Z,null))):o().createElement(o().Fragment,null,o().createElement(F.Z,{title:l,className:c.header}),o().createElement(_.Typography,{className:c.noData},b().text("No data"))))};var An=n(58600);let Ln=0;const Mn=()=>Ln++,Un=e=>{const t={children:[],nodeId:Mn()};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:Mn(),expanded:!0,rootIndex:i?n+1:void 0};i&&(s.root=i),o.children.push(s),o=s}}return t.children},Hn=(0,Y.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 Vn=n(1242);const _n=o().createContext(null);var Fn=n(55400);const zn=e=>{e.target.src=Vn},Bn=e=>{let{node:t}=e;const n=Hn(),l=(0,a.useDispatch)(),i=t.entity.uri,s=(0,a.useSelector)(E.ZP.selectors.getAbsoluteImagePath),c=(0,a.useSelector)(E.ZP.selectors.getMetadata),u=(0,r.useContext)(_n),p=(0,a.useSelector)(E.ZP.selectors.getUIPath),{uri:d}=(0,a.useSelector)(E.ZP.selectors.getEntity),m=(0,g.ChB)({uiPath:p,uri:i}),f=i===d,b=(0,r.useCallback)((()=>{l(E.ui.actions.openEntity({uri:i,viewId:u.id}))}),[l,u,i]),{entity:{label:h},nodeId:y}=t,v=(0,g.nt9)(c,t.entity.type)||{},x=(0,g.VD3)(c,v,"typeGraphIcon"),O=x&&(0,g.vPL)(s,x);return o().createElement("div",{className:n.wrapper,"data-node-id":y},o().createElement("div",{className:n.container},o().createElement(_.Avatar,{className:A()(n.avatar),src:O||Vn,onError:zn}),o().createElement("span",{className:A()(n.link,{[n.selected]:f})},o().createElement(Fn.Z,{to:m,onClick:b},h))))},Wn=((0,r.memo)(Bn),e=>{let{node:t}=e;return t.nodeId}),Gn=(0,Y.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 $n(){return $n=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},$n.apply(this,arguments)}const Qn={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=Gn();return o().createElement("div",$n({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=Gn(),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 Xn(){return Xn=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},Xn.apply(this,arguments)}const Kn=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",Xn({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"})))},Jn=e=>{let{title:t,onGraphOpen:n}=e;const r=Hn();return o().createElement(F.Z,{title:t,className:r.header},o().createElement("div",{className:r.buttonsContainer},o().createElement(Ce.k,{className:r.button,tooltipTitle:b().text("Show Graph"),icon:Kn,onClick:n,size:"L"})))};var er=n(33165),tr=n(59601);const nr=(0,Y.Z)((()=>({root:{position:"relative"},bodyWrapper:{paddingTop:"21px"}})));function rr(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){or(e,t,n[t])}))}return e}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ar=n(14940);const lr=(0,Y.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)"}}),ir=e=>{const t=t=>{const n=lr();return o().createElement("div",{className:n.resizableHandleContainer},o().createElement("div",{className:n.resizableHandleVisibilityArea},o().createElement("div",{className:A()("viewDraggableHandle",n.resizableHandle)},o().createElement(ar.Z,{className:n.dragIcon}))),o().createElement(e,t))};return t.displayName="WithResizableHandle",t},sr=(0,Y.Z)({stubView:{padding:"20px"},fullHeight:{height:"100%"},component:{boxSizing:"border-box",overflow:"auto",boxShadow:"none",borderRadius:"unset"}});var cr=n(29103),ur=n(83911),pr=n(79485),dr=n(22385);const mr=(0,i.pipe)((0,i.path)(["point","lat"]),(0,i.both)((0,i.gt)(90),(0,i.lt)(-90))),gr=(0,Y.Z)((()=>({root:{height:"100%",display:"flex",flexDirection:"column"},fullHeight:{height:"100%"},fullscreenBtn:{position:"absolute",right:"5px",top:"5px",zIndex:100}})));var fr=n(13074),br=n(24338);const hr=(0,Y.Z)((e=>({caption:{color:e.palette.text.secondary,fontSize:"13px"}}))),yr=hr,Er=e=>{let{totalImages:t}=e;const n=yr(),r=t>1?b().text("photos"):b().text("photo");return o().createElement(_.Typography,{variant:"caption",className:n.caption},`${t} ${r}`)};function vr(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){xr(e,t,n[t])}))}return e}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Or=e=>{let{config:t,attributeType:n,paging:r,requestNextPageOfAttributeValues:l}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(E.ZP.selectors.getEntity),u=(0,a.useSelector)((e=>E.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(br.Z,{attributeValues:p,attributeType:n,onDeleteAttribute:e=>(0,i.pipe)(E.N5.actions.removeAttribute,s)(vr({},e,{viewId:d})),parentUri:u.uri,onChangeAttribute:e=>(0,i.pipe)(E.N5.actions.modifyAttribute,s)(vr({},e,{viewId:d})),imageSize:Cr,paging:r,requestNextPageOfAttributeValues:l}),o().createElement(Er,{totalImages:p.length}))},wr=(0,Y.Z)((e=>({container:{padding:"8px 16px"},noData:{fontSize:"13px",color:e.palette.text.secondary}}))),Sr=wr,Cr={imageMargin:4,imageWidth:162,imageHeight:162};var Pr=n(28741);const Nr=(0,Y.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 Tr=n(49734),Ir=n(98808),kr=n(93428),Rr=n(30885);function Zr(){return Zr=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},Zr.apply(this,arguments)}const Dr=e=>{let{config:t,match:n,onStartRequest:l,onFinishRequest:i}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(E.ZP.selectors.getMetadata),u=(0,a.useSelector)(E.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:Ir.N.iconButton,onStartRequest:l},h=(0,r.useContext)(p.m),y=(0,r.useCallback)((()=>{i(),s(E.N5.entity.actions.loadEntity({viewId:h,uri:u.uri}))}),[s,u.uri,i,h]);return o().createElement(o().Fragment,null,d&&o().createElement(kr.H,Zr({},b,{onFinishRequest:y})),m&&o().createElement(Rr.i,Zr({},b,{onFinishRequest:i})))},jr=e=>{let{config:t,entitiesMap:n,match:r,onFinishRequest:l,onStartRequest:i}=e;const s=(0,a.useSelector)(E.ZP.selectors.getMetadata),c=(0,a.useSelector)(E.ZP.selectors.getEntity);return o().createElement(Tr.M,{match:r,entity:c,entitiesMap:n,metadata:s,className:ft.U},o().createElement(bt.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(Dr,{match:r,config:t,onStartRequest:i,onFinishRequest:l}))},Ar={showTransitiveMatches:!0,showInactiveEntities:!1},Lr={order:"asc",field:"score"};var Mr;!function(e){e[e.Loading=0]="Loading",e[e.NoData=1]="NoData",e[e.Loaded=2]="Loaded"}(Mr||(Mr={}));const Ur=ir((e=>{let{className:t}=e;const n=sr();return o().createElement(H.Z,{className:A()(n.stubView,"viewDraggableHandle",t)},"NOT IMPLEMENTED")})),Hr=ir((e=>{let{className:t,config:n}=e;return o().createElement(L.Z,{className:t,caption:n.caption,excludeUris:n.excludeUris,includeUris:n.includeUris,attributesCount:n.attributesCount,pinnedAttributes:n.pinnedAttributes})})),Vr=ir((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=ve(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){xe(e,t,n[t])}))}return e}({setSearchQuery:n,searchQuery:t,setPage:a,page:o,toggleShowInactive:u,showInactive:l},c)})(n);return o().createElement(M.Provider,{value:a},o().createElement(be,{config:n,className:t}))})),_r=ir((e=>{let{config:t,className:n}=e;const l=(e=>{var t;const{attributeUri:n}=e,o=(0,a.useSelector)(E.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,g.zeJ)(o,n)),[o,n]),s=(0,r.useMemo)((()=>un(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)(en,c),{searchQuery:d,filters:m,sorting:f,page:b}=u,h=(0,a.useSelector)(E.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,gn.su)(o,r)})))).orSome([]))(s,m);return e.length?e:null}),[m,s]),v=(0,r.useMemo)((()=>(0,i.reject)(i.isNil,{filters:y,page:b,sorting:f,searchQuery:d})),[y,b,f,d]),{changeSearchQuery:x,changePage:O,toggleSort:w,changeFilter:S,toggleFilters:C,changeColumns:P}=(0,qt.o)({actions:Jt,dispatch:p}),N=ve(e,v,!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){fn(e,t,n[t])}))}return e}({},u,{setSearchQuery:x,setPage:O,onSort:w,onFilter:S,onToggleFilters:C,onChangeColumns:P,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(Gt.Provider,{value:l},t&&o().createElement(jn,{config:t,className:n}))})),Fr=ir((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(Te.Provider,{value:a},o().createElement(Wt,{config:t,className:n}))})),zr=ir((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,er.E)(t),y=nr(),E=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 v=(0,i.reject)(i.isNil,{width:u,height:c}),x=o().createElement("div",{ref:a,style:rr({},v,f),className:A()(y.root,n)});return o().createElement("div",{className:y.bodyWrapper},E?o().createElement(_.Tooltip,{title:E},x):x,o().createElement(tr.Z,{placement:"bottom",anchorEl:l,open:!!h,onClose:b},h))})),Br=ir((e=>{let{config:t,className:n}=e;const l=(0,a.useSelector)(E.ZP.selectors.getEntityUri),{treeData:i,setTreeData:s}=((e,t)=>{const n=(0,he._)(),[o,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>((0,g.ZiX)(e)||n((0,g.RFJ)({uri:e,graphUri:t})).then(Un).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(E.ui.actions.openGraph({viewId:p,graphType:d.type}))}),[u,p,d]),f=(0,r.useCallback)((e=>({title:o().createElement(Bn,{node:e.node})})),[]);return o().createElement(H.Z,{className:n},o().createElement(Jn,{onGraphOpen:m,title:t.caption}),o().createElement(_n.Provider,{value:t},o().createElement("div",{className:c.treeContainer},o().createElement("div",{className:c.tree},o().createElement(An.ZP,{isVirtualized:!1,treeData:i,canDrag:!1,theme:Qn,generateNodeProps:f,onChange:s,getNodeKey:Wn})))))})),Wr=ir((e=>{let{config:t,className:n}=e;const l=Nr(),s=(0,a.useSelector)(E.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:v,total:x}=(0,Pr.s)({enabled:!!c,entity:s,options:Ar,filter:"",page:0,sorting:Lr,rowsPerPage:3,onStartLoading:m,onFinishLoading:f}),w=(0,r.useCallback)((()=>{v()}),[v]),S=(0,a.useDispatch)(),C=(0,r.useContext)(p.m),P=(0,r.useCallback)((()=>{S(E.ui.actions.openPerspective({perspectiveId:"potentialMatches",viewId:C}))}),[S,C]),N=(0,r.useMemo)((()=>(0,g.NVY)(c,(0,i.map)(g.ev7,h))),[c,h]),{getCommentsCount:T}=(0,r.useContext)(O.h);(0,r.useEffect)((()=>{T(N)}),[T,N]);const I=x>3&&!(0,i.isEmpty)(h),k=u?Mr.Loading:(0,i.isEmpty)(h)?Mr.NoData:Mr.Loaded;return o().createElement(we.X.Provider,{value:y},o().createElement(H.Z,{className:A()(l.root,n)},o().createElement(F.Z,{title:t.caption}),o().createElement("div",{className:l.matchesContainer},k===Mr.Loading&&o().createElement(R.Z,null),k===Mr.NoData&&o().createElement(_.Typography,{className:l.noData},b().text("No matches found")),k===Mr.Loaded&&h.map((e=>o().createElement(jr,{config:t,entitiesMap:y,match:e,onFinishRequest:w,onStartRequest:m,key:e.object.uri})))),I&&o().createElement(o().Fragment,null,o().createElement("div",{className:l.footer},o().createElement(_.Link,{component:"button",variant:"caption",onClick:P,underline:"none"},b().text("See all"))))))})),Gr=(0,r.lazy)((()=>n.e(6596).then(n.bind(n,46596)).then((e=>({default:ir(e.HierarchyTreeView)}))))),qr=(0,r.lazy)((()=>n.e(4361).then(n.bind(n,14361)).then((e=>({default:ir(e.RelationshipsTableView)}))))),Yr=ir((e=>{let{config:t,isFullscreen:n,onToggleFullscreen:l,className:i}=e;const s=gr(),c=(0,a.useSelector)(E.ZP.selectors.getMetadata),u=(0,a.useSelector)(E.ZP.selectors.getEntity),p=(0,a.useSelector)(E.ZP.selectors.getGoogleMapKey),{markers:d,loading:m}=((e,t,n)=>{const[o,a]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0),s=(0,he._)();return(0,r.useEffect)((()=>{i(!0),s((0,g.DBr)(t,[e],n)).then((e=>{a(e.filter(mr))})).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(H.Z,{className:A()(s.root,i)},m&&o().createElement(R.Z,null),o().createElement(dr.Z,{size:"S",icon:n?ur.Z:cr.Z,onClick:()=>l(t.id),className:s.fullscreenBtn}),o().createElement(pr.Z,{loadingElement:f,defaultZoom:1,defaultCenter:b,markers:d,mapContainerClassName:s.fullHeight,mapKey:p}))})),$r=ir((e=>{let{config:t,className:n}=e;const{attributeUri:l}=t,s=Sr(),c=(0,a.useDispatch)(),u=(0,a.useSelector)(E.ZP.selectors.getMode),p=(0,a.useSelector)(E.ZP.selectors.getEntityWithDiff),d=(0,a.useSelector)(E.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,v=t["text-empty"]||b().text("No data found"),x=(0,r.useCallback)((e=>c(E.N5.actions.requestNextPageOfAttributeValues(e))),[c]);return o().createElement(H.Z,{className:n},o().createElement(F.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:x};return o().createElement(Or,e)}if(y>0){const e={attributeValues:f,attributeType:m,imageSize:Cr,paging:h,parentUri:p.uri,requestNextPageOfAttributeValues:x};return o().createElement(o().Fragment,null,o().createElement(fr.Z,e),o().createElement(Er,{totalImages:y}))}}return o().createElement(_.Typography,{className:s.noData},v)})()))}));class Qr{}Qr.ViewTypes=g.ZIY,Qr.getComponentBy=(e,t)=>{let{store:n,config:r,className:a,isFullscreen:l,onToggleFullscreen:i}=t;switch(r[e]){case Qr.ViewTypes.HierarchyTree:return o().createElement(Gr,{config:r,store:n,className:a});case Qr.ViewTypes.HierarchyPaths:return o().createElement(Br,{config:r,className:a});case Qr.ViewTypes.RelationsTable:return o().createElement(qr,{config:r,store:n,className:a});case Qr.ViewTypes.Relations:return o().createElement(Fr,{config:r,className:a});case Qr.ViewTypes.Attributes:return o().createElement(Hr,{className:a,config:r});case Qr.ViewTypes.SingleAttributeView:return o().createElement(Vr,{config:r,className:a});case Qr.ViewTypes.TableAttributeView:return o().createElement(_r,{config:r,className:a});case Qr.ViewTypes.MapView:return o().createElement(Yr,{config:r,isFullscreen:l,onToggleFullscreen:i,className:a});case Qr.ViewTypes.CustomView:return o().createElement(zr,{config:r,className:a});case Qr.ViewTypes.ImageAttributeView:return o().createElement($r,{config:r,className:a});case Qr.ViewTypes.PotentialMatchesView:return o().createElement(Wr,{config:r,className:a})}},Qr.getComponent=e=>Qr.getComponentBy("class",e)||Qr.getComponentBy("react-class",e)||o().createElement(Ur,{className:e.className});const Xr=Qr,Kr=()=>null,Jr=(0,r.memo)((e=>{let{config:t,store:n,isFullscreen:a,isAutosize:l,onToggleFullscreen:i}=e;const s=sr();return o().createElement(r.Suspense,{fallback:o().createElement(Kr,null)},Xr.getComponent({config:t,store:n,className:A()(s.component,{[s.fullHeight]:!l}),isFullscreen:a,onToggleFullscreen:i}))}));Jr.displayName="ViewComponent";const eo=(0,Y.Z)((e=>({item:e.basicView,fixedSizeContainer:{height:"100%"}})));function to(){return to=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},to.apply(this,arguments)}const no=["onConfigChanged","onRemove"],ro=e=>{let{layoutItemConfig:t,views:n,className:l,children:s,style:c,isFullscreen:u,onToggleFullscreen:p,AutosizeComponent:d}=e,m=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 g=n.find((e=>{let{id:n}=e;return t.i===n})),f=eo(),{store:b}=(0,r.useContext)(a.ReactReduxContext);if(!g)return null;const h=g.class===Xr.ViewTypes.CustomView;return o().createElement("div",to({},(0,i.omit)(no,m),{style:c,className:A()(l,{[f.item]:!h})}),o().createElement("div",{className:A()({[f.fixedSizeContainer]:!d})},d,o().createElement(Jr,{store:b,config:g,isFullscreen:u,onToggleFullscreen:p,isAutosize:Boolean(d)})),s)},oo=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a}=e;return o().createElement(D.Z,{LayoutItem:ro,views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"})};var ao=n(57304),lo=n(3409),io=n(93873),so=n(22860),co=n(72753),uo=n(43576);function po(){return po=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},po.apply(this,arguments)}const mo=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",po({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"}))))},go=(0,Y.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"}}),fo=e=>o().createElement(_.SvgIcon,e,o().createElement(mo,null)),bo=(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)})),ho=e=>{let{className:t}=e;const n=go(),l=(0,a.useDispatch)(),i=(0,a.useSelector)(E.ZP.selectors.getCanUserStartProcessFromQuery),s=(0,a.useSelector)(E.ZP.selectors.getEntityWithoutDiff),c=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,s.uri))),u=(0,a.useSelector)(E.ZP.selectors.getMetadata),p=(0,a.useSelector)(E.ZP.selectors.isWorkflowEnabled),d=(0,a.useSelector)(E.ZP.selectors.getMode),m=(0,a.useSelector)(E.ZP.selectors.getIsEditableMode),f=(0,a.useSelector)(E.ZP.selectors.getIsViewMode),h=(0,a.useSelector)(E.ZP.selectors.getIsHistoryModeEnabled),y=(0,a.useSelector)(E.ZP.selectors.getProfileOperation)===g.OXy.Saving,v=null==s?void 0:s.type,x=(0,r.useMemo)((()=>[{label:b().text("Editing"),value:g.fO_.EDITING,description:b().text("Edit profile directly"),icon:uo.Z,permission:"UPDATE"},{label:b().text("Suggesting"),value:g.fO_.SUGGESTING,description:b().text("Suggest changes and initiate a workflow review"),icon:fo,permission:"INITIATE_CHANGE_REQUEST"},{label:b().text("Viewing"),value:g.fO_.VIEWING,description:b().text("Suggest changes and initiate a workflow review"),icon:co.Z,permission:"READ"}]),[]),O=(0,r.useMemo)((()=>[{label:b().text("Delete"),value:"Delete",description:b().text("Permanently delete profile"),icon:Ge.Z,onClick:()=>{window.confirm(b().text("Are you sure you want to delete this?"))&&l(E.N5.entity.actions.entityRemoveRequested({entityUri:s.uri}))},permission:"DELETE"}]),[l,s.uri]),w=(0,r.useMemo)((()=>(0,g.nt9)(u,v)||{}),[u,v]),S=!h&&!(0,g.biM)(s)&&!(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))(w),C=(0,g.ZiX)(null==s?void 0:s.uri),P=(0,r.useMemo)((()=>bo(x,w,C,p,i)),[x,w,p,i,C]),N=(0,r.useMemo)((()=>bo(O,w,C,p,i)),[O,w,p,i,C]),T=(0,r.useCallback)((e=>{l(E.N5.mode.actions.modeUpdated(e))}),[l]),I=(0,r.useCallback)((()=>{l(E.N5.mode.actions.modeCancelEditing())}),[l]),k=(0,r.useCallback)((()=>{l(E.N5.actions.saveProfile())}),[l]);return o().createElement(ao.Z,{className:A()(t,ft.U),entity:m&&c?c:s},o().createElement(_.Box,{display:"flex",alignItems:"center"},o().createElement(_.Box,{mr:3},m&&o().createElement(_.Box,{className:n.editingButtons},o().createElement(_.Button,{variant:"outlined",onClick:I,"data-reltio-id":"reltio-profile-cancel-editing",disabled:y},b().text("Cancel")),o().createElement(_.Button,{variant:"contained",color:"primary","data-reltio-id":"reltio-profile-save-profile",onClick:k,disabled:y},(0,g.fnZ)(d)?b().text("Suggest"):b().text("Save"))),h&&f?o().createElement(lo.Z,null):f&&o().createElement(io.a,null)),S&&o().createElement(so.T,{optionsGroup:P,buttonsGroup:N,value:d,onChange:T,disabled:y})),o().createElement(_.Box,{className:n.comments},o().createElement(bt.Z,{uri:s.uri,relatedObjectUris:(0,g.wp9)(g.q7e.ENTITY,{entityUri:s.uri}),objectType:g.q7e.ENTITY})))};var yo=n(71820),Eo=n(85890),vo=n(26789),xo=n(54362),Oo=n(6674),wo=n(91515),So=n(52043),Co=n(17308),Po=n(39827),No=n(80147),To=n(76569);const Io=(0,Y.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0},badge:{fontSize:"12px",height:"18px",minWidth:"18px",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px"}}),ko=()=>{const{total:e}=(0,r.useContext)(I.O),t=Io();return o().createElement(_.Badge,{badgeContent:e,classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(To.Z,null))};var Ro=n(26313),Zo=n(9371),Do=n(4426);const jo=(0,Y.Z)({wrapper:{overflow:"auto",paddingRight:"12px"},showMoreLink:{display:"flex",margin:"16px"},showMoreIcon:{fontSize:"1rem"}}),Ao=()=>{const e=jo(),{getComments:t,comments:n,pageToken:l}=(0,r.useContext)(O.h),i=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant);(0,r.useEffect)((()=>{t(i)}),[t,i]);const s=(0,Ro.Q)(n);return o().createElement(we.X.Provider,{value:s},o().createElement(_.Box,{className:e.wrapper},n.map((e=>{const{objectId:t,relatedObjectUris:n,objectType:r,commentId:a}=e;return o().createElement(Zo.J,{key:a,uri:t,relatedObjectUris:n,objectType:r,comment:e})})),l&&o().createElement(_.Link,{component:"button",variant:"caption",className:e.showMoreLink,onClick:()=>{t(i,l)},underline:"none"},o().createElement(Do.Z,{className:e.showMoreIcon}),b().text("Show more"))))};var Lo=n(34120);const Mo=(0,Y.Z)({wrapper:{overflow:"auto",position:"relative",height:"100%"}}),Uo=()=>{const e=Mo(),{tasks:t,loading:n}=(0,r.useContext)(I.O);return o().createElement("div",{className:e.wrapper},n&&o().createElement(R.Z,null),t&&t.map((e=>o().createElement(Lo.s,{key:e.taskId,task:e}))))};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 Vo=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:"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)(O.h),t=Io();return o().createElement(_.Badge,{badgeContent:(0,g.mdt)(e),classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(Vo,null))};var Fo=n(10159);const zo=()=>o().createElement(Fo.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.")}),Bo=()=>o().createElement(Fo.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 Wo(){return Wo=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},Wo.apply(this,arguments)}let Go;!function(e){e[e.Workflow=0]="Workflow",e[e.Collaboration=1]="Collaboration",e[e.History=2]="History"}(Go||(Go={}));const qo=e=>{if(e)return 1===e?b().text("${total} item",{total:e}):b().text("${total} items",{total:e})},Yo=()=>{var e,t,n;const l=Io(),s=(0,a.useSelector)(E.ZP.selectors.isWorkflowSideViewEnabled),c=(0,a.useSelector)(E.ZP.selectors.isWorkflowEnabled),u=(0,a.useSelector)(E.ZP.selectors.isCollaborationSideViewEnabled),p=(0,a.useSelector)(E.ZP.selectors.isCollaborationEnabled),d=(0,a.useSelector)(E.ZP.selectors.getHistoryEvent),m=(0,a.useSelector)(E.ZP.selectors.getMetadata),f=(0,a.useSelector)(E.ZP.selectors.getEntity),h=(0,r.useContext)(I.O),y=(0,r.useContext)(O.h),[v,x]=(0,r.useState)(null),w=(0,r.useCallback)((e=>{x((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{x(null)}),[]),C=null!==v,P=v===Go.History,{isHistoryEnabled:N,isProfilePersisted:T}=(0,yo.C)({isHistoryTabActive:P,entity:f}),{historyFilter:k,onApplyFilter:R,onClearFilter:Z,isLoading:D,historicUris:j,historyWithTotal:A,canLoadMore:L,onLoadMore:M}=(0,Eo.k)({entity:f,enabled:N}),U=s&&c&&!(0,g.ZiX)(null==f?void 0:f.uri),H=u&&p,V=(0,g.mdt)(null==y?void 0:y.commentsMap),_=[{buttonProps:{id:Go.Workflow,icon:ko,tooltipTitle:b().text("Workflow")},content:null!=h&&h.total?o().createElement(Uo,null):o().createElement(zo,null),headerProps:{mainTitle:b().text("Workflow"),secondTitle:qo(null==h?void 0:h.total),rightContent:o().createElement(vo.G,null)},hidden:!U},{buttonProps:{id:Go.Collaboration,icon:_o,tooltipTitle:b().text("Collaboration")},content:V?o().createElement(Ao,null):o().createElement(Bo,null),headerProps:{mainTitle:b().text("Collaboration"),secondTitle:qo(V)},hidden:!H},{buttonProps:{id:Go.History,icon:No.Z,tooltipTitle:b().text("History")},content:T?o().createElement(xo.Z,{isLoading:D,historyWithTotal:A,contributorsUris:j,entityUri:null==f?void 0:f.uri,historyEvent:d,onLoadMore:M,canLoadMore:L}):o().createElement(Oo.Z,null),headerProps:{content:o().createElement(wo.Z,{total:T?((null==j?void 0:j.length)||0)+1:void 0,entityType:(0,g.nt9)(m,null==f?void 0:f.type),filter:k,onApplyFilter:R,onClearFilter:Z})}}],F=(0,i.reject)((0,i.propEq)("hidden",!0))(_);return(0,r.useEffect)((()=>{var e;null!==(e=_[v])&&void 0!==e&&e.hidden&&S()}),[v,_,S,F]),o().createElement("div",{className:l.wrapper},o().createElement(So.h,{open:C,width:480},!(null!==(e=_[v])&&void 0!==e&&e.hidden)&&o().createElement(o().Fragment,null,o().createElement(Co.P,Wo({},null===(t=_[v])||void 0===t?void 0:t.headerProps,{onClose:S})),null===(n=_[v])||void 0===n?void 0:n.content)),o().createElement(Po.G,{buttonsProps:(0,i.pipe)((0,i.reject)((0,i.propEq)("hidden",!0)),(0,i.pluck)("buttonProps"))(_),onButtonClick:w,activeIndexId:v}))};var $o=n(39781),Qo=n(16715);const Xo="48px",Ko="1px solid rgba(0, 0, 0, .125)",Jo=(0,Y.Z)((e=>({accordion:{borderTop:Ko,borderBottom:Ko,fontSize:"13px",boxShadow:"none","&:not(:first-child)":{borderTop:0},"&:before":{display:"none"},"&$accordionExpanded":{margin:"auto"}},accordionExpanded:{},accordionSummary:{display:"flex",alignItems:"center",height:Xo,minHeight:Xo,"&$accordionSummaryExpanded":{height:Xo,minHeight:Xo}},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"}}))),ea=Jo;var ta=n(38016);const na=(0,r.memo)((e=>{let{panels:t,expandedPanelId:n,onToggle:r,ErrorComponent:a}=e;const l=ea();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(_.Accordion,{key:t,square:!0,expanded:n===t,onChange:r(t),className:u,classes:{root:l.accordion,expanded:l.accordionExpanded}},o().createElement(_.AccordionSummary,{classes:{root:l.accordionSummary,expanded:l.accordionSummaryExpanded,content:l.accordionSummaryContent},expandIcon:o().createElement(ta.Z,null)},i,o().createElement(_.Typography,{className:l.accordionSummaryHeading},s)),o().createElement(_.AccordionDetails,{className:A()(l.accordionDetails,p)},o().createElement("ul",null,c.map(((e,t)=>o().createElement(a,{key:t,error:e}))))))}))):null}));na.displayName="ErrorsPanel";const ra=(0,i.omit)(["deactivated","path"]),oa=(0,r.memo)((e=>{let{error:t}=e;const n=ea(),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)(E.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)))}));oa.displayName="Error";const aa=()=>{const e=ea(),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(ra),t.map(ra))}(e,t.current)||(t.current=e),t.current})((0,a.useSelector)(E.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($o.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(Qo.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(na,{panels:u,expandedPanelId:s,onToggle:p,ErrorComponent:oa}):null},la=(0,Y.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"}}))),ia=(0,r.memo)((e=>{let{config:t,saveState:n,getSavedState:l}=e;const i=la({maxWidth:null==t?void 0:t.maxWidth}),s=(0,a.useDispatch)(),c=(0,r.useRef)(),u=(0,r.useCallback)((0,g.DsO)(n,5e3),[n]),{isLoaded:p,savedState:d}=(0,v.a)(l),[m,f]=(0,r.useState)([]),[h,D]=(0,r.useState)([]),j=(0,r.useMemo)((()=>y()(t)),[t]),A=(0,a.useSelector)(E.ZP.selectors.getEntity),L=(0,a.useSelector)(E.ZP.selectors.getIsHistoryModeEnabled),M=(0,r.useMemo)((()=>(0,g.dvH)(A)),[A]),U=(0,x.C)({objectIds:M}),H=(0,r.useContext)(O.h),V=(0,w.U)(),_=(0,S.v)(null==t?void 0:t.workflow),F=(0,a.useSelector)(E.ZP.selectors.getHistoryEvent);(0,C.a)({entity:A,historyEvent:F});const z=(0,P.u)();(0,r.useEffect)((()=>{if(p){const e=j!==d.configHash,{views:n,layout:r}=(0,g.Mfk)({views:e||!d.views?t.views:d.views,layout:e?t.layout:d.layout});D(n),f(r)}}),[p]),(0,r.useEffect)((()=>{s(E.N5.views.actions.profileViewsSet(h))}),[s,h]),(0,r.useEffect)((()=>{t.sidePanelViews&&s(E.N5.sidePanelViews.actions.sidePanelViewsLoaded(t.sidePanelViews))}),[t]),(0,r.useEffect)((()=>{c.current&&(c.current.scrollTop=0)}),[null==A?void 0:A.uri]),(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(E.ZP.selectors.getValidateReadMode),n=(0,a.useSelector)(E.ZP.selectors.getEntity)||{},{uri:o,updatedTime:l}=n,i=(0,g.biM)(n),s=(0,a.useSelector)(E.ZP.selectors.getMode),c=(0,a.useSelector)(E.ZP.selectors.getProfileViews),u=c&&c.length>0,p=(0,r.useCallback)((0,g.DsO)((t=>{t&&e(E.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 B=(0,r.useCallback)((e=>{u({layout:e,views:h,configHash:j}),f(e)}),[u,j,h]);return o().createElement(N.j.Provider,{value:!0},o().createElement(T.s.Provider,{value:V},o().createElement(O.h.Provider,{value:L?H:U},o().createElement(I.O.Provider,{value:_},o().createElement(k.m.Provider,{value:z},o().createElement("div",{className:i.perspectiveView},(!p||!(null!=A&&A.uri))&&o().createElement(R.Z,null),p&&null!=A&&A.uri?o().createElement("div",{className:i.profileContainer},o().createElement("div",{className:i.profileWrapper},o().createElement(ho,null),!L&&o().createElement(aa,null),o().createElement("div",{ref:c,className:i.scrollWrapper},o().createElement(oo,{layout:m,onLayoutChanged:B,views:h}))),o().createElement(Yo,null)):o().createElement("div",{className:i.emptyState},o().createElement(Z.ZP,{LogoRenderer:Z.B9.NO_DATA,text:b().text("No data to display."),variant:Z.tC.embedded}))))))))}));ia.displayName="ProfilePerspectiveView";const sa=(0,s.createGenerateClassName)({productionPrefix:"profilePerspective",disableGlobal:!0}),ca=e=>{let{config:t,store:n,onResize:f=i.identity,saveState:b,getSavedState:h,qxSandboxApi:y}=e;const E=(0,r.useCallback)((0,g.aYu)(h),[h]),v=(0,r.useMemo)((()=>(0,g.Vr9)(t)),[t]);return o().createElement(a.Provider,{store:n},o().createElement(p.m.Provider,{value:v.id},o().createElement(d.Y.Provider,{value:y},o().createElement(s.StylesProvider,{generateClassName:sa},o().createElement(u.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>f(Math.floor(e),Math.floor(t))}),v&&o().createElement(ia,{config:v,saveState:b,getSavedState:E}),o().createElement(m.Z,{showErrorFromStore:!0}))))))};var ua=n(82842),pa=n(51229),da=n(91131);const ma=(0,Y.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}}))),ga=e=>{let{total:t=0}=e;const n=ma(),l=(0,a.useDispatch)(),i=(0,r.useContext)(p.m),s=(0,r.useCallback)((()=>{l(E.ui.actions.openPerspective({perspectiveId:"profile",viewId:i}))}),[l,i]);return o().createElement(F.Z,{title:""},o().createElement("div",{className:n.titleContainer},o().createElement(_.Link,{component:"button",variant:"caption",className:n.link,onClick:s,underline:"none"},b().text("Profile")),o().createElement(da.Z,{className:n.icon}),b().text("Tags")),o().createElement(pa.Z,null),o().createElement(_.Typography,{className:n.totalCaption,variant:"caption"},o().createElement("span",{className:n.totalNumber},b().number(t,"0,0")),b().text("total profiles")))};var fa=n(20404);const ba=(0,Y.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"}}))),ha=e=>{let{label:t}=e;const n=ba();return o().createElement(_.Toolbar,{className:n.toolbar},o().createElement(fa.Z,{className:n.avatar}),o().createElement(_.Typography,{variant:"h6",className:n.label},t))};function ya(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){Ea(e,t,n[t])}))}return e}function Ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const va=(0,Y.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}}))),xa=[25,50,100],Oa=(0,r.memo)((e=>{let{tag:t,entityUri:n}=e;const l=va(),[s,c]=(0,r.useState)(xa[0]),[u,p]=(0,r.useState)(0),d=(0,a.useSelector)(E.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,he._)(),u=(0,he._)(),[p,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(0),[h,y]=(0,r.useState)([]),{requestEntities:v,requestTotal:x}=(e=>{let{entityUri:t,tag:n}=e;const o=(0,a.useSelector)(E.ZP.selectors.getGlobalSearchRequestOptions),l=(0,a.useSelector)(E.ZP.selectors.getTenant),s=(0,a.useSelector)(E.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=ya({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,ya({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}),O=(0,r.useCallback)((e=>{s(E.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))),f(0)}),[s]);return(0,r.useEffect)((()=>{c(x()).then(f).catch(O)}),[x,c,O]),(0,r.useEffect)((()=>{d(!0),u(v(l,o*l)).then(y).catch(O).finally((()=>d(!1)))}),[o,l,v,u,O]),{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 v=f>xa[0];return o().createElement("div",{className:l.perspectiveView},o().createElement(ha,{label:t}),o().createElement("div",{className:A()(l.tagsContainer,{[l.fullHeight]:v})},o().createElement(H.Z,{className:l.tagsView},o().createElement(ga,{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(ua.Z,{entities:h})),v&&o().createElement("div",{className:l.pagination},o().createElement(V.Z,{count:f,rowsPerPageOptions:xa,rowsPerPage:s,page:u,onChangePage:p,onChangeRowsPerPage:c}))))))}));Oa.displayName="TagPerspectiveView";const wa=(0,s.createGenerateClassName)({productionPrefix:"tagPerspective",disableGlobal:!0}),Sa=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:wa},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>u(Math.floor(e),Math.floor(t))}),t&&o().createElement(Oa,{tag:n,entityUri:r}),o().createElement(m.Z,{showErrorFromStore:!0}))))}},1242:(e,t,n)=>{e.exports=n.p+"5271a9e7b6651c852e93.png"}}]);
package/3029.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3029],{97991:(e,t,n)=>{n.d(t,{Z:()=>u});var r,a=n(94079),l=n(71153),i=n.n(l),o=n(24328),s=n.n(o);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(r||(r={}));const u=e=>{let{className:t,icon:n,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,o.useState)(null);(0,o.useEffect)((()=>{m(n?r.ICON_MODE:r.TEXT_MODE)}),[n,l]);const f=()=>{m(r.ERROR_MODE)};switch(d){case r.ICON_MODE:return s().createElement(a.Avatar,c({className:i()(t,null==u?void 0:u.iconRoot),src:n,onError:f},p));case r.TEXT_MODE:case r.ERROR_MODE:return s().createElement(a.Avatar,c({className:i()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},58662:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(13980),a=n.n(r),l=n(24328),i=n.n(l),o=n(71153),s=n.n(o),c=n(94079),u=n(87918),p=n.n(u),d=n(31276),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:a,onChangePage:o,rowsPerPage:u,onChangeRowsPerPage:g,basicTableRef:y,labelRowsPerPage:b}=e;const E=f(),v=(0,l.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],y)()}),[y]),T=(0,l.useCallback)((e=>{o(e),v()}),[o,v]),C=(0,l.useCallback)((e=>{o(0),g(e),v()}),[o,g,v]);return i().createElement(c.TablePagination,{classes:h({},t,{root:s()(E.pagination,t.root),select:s()(E.select,t.select),caption:E.caption,selectRoot:E.selectRoot,actions:E.actions}),component:"div",labelRowsPerPage:b||p().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return p().text("${fromRow}-${toRow} of ${countRows}",{fromRow:p().number(t,"0,0"),toRow:p().number(n,"0,0"),countRows:p().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:a,onChangePage:(0,m.pipe)((0,m.nthArg)(1),T),rowsPerPage:u,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};y.propTypes={classes:a().object,rowsPerPageOptions:a().arrayOf(a().number),count:a().number,page:a().number,onChangePage:a().func,rowsPerPage:a().number,onChangeRowsPerPage:a().func,basicTableRef:a().shape({current:a().object}),labelRowsPerPage:a().string};const b=i().memo(y)},58241:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),l=n(71153),i=n.n(l),o=n(8818),s=n(38016);const c=(0,n(79692).Z)({collapseButton:{cursor:"pointer"},expandLess:{transform:"rotate( -180deg )"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{let{isOpen:t=!1,tooltipTitle:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["isOpen","tooltipTitle"]);const l=c(),p={icon:s.Z,className:l.collapseButton,iconClassName:i()({[l.expandLess]:t})},d={tooltipTitle:n};return a().createElement(o.k,u({},p,d,r))}},68439:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(52730),i=n(71153),o=n.n(i),s=n(94079),c=n(99493),u=n(87638);const p=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:r="small"}=e;const i=p(),d=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(d,m)||{},h=(0,c.VD3)(d,f,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Typography,{style:{backgroundColor:h,color:c.P6Y.Colors.getColor(h)?"#FFFFFF":"#212121"},className:o()(i[`entityType-${r}`],n),component:"div"},(0,c.jFi)(d,t))}},81727:(e,t,n)=>{n.d(t,{E:()=>m,Z:()=>f});var r=n(24328),a=n.n(r),l=n(94079),i=n(8818),o=n(61932),s=n(27291),c=n(31276),u=n(71153),p=n.n(u);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px"},check:{color:"#8CC152"}});let m;!function(e){e[e.INIT=1]="INIT",e[e.PROGRESS=2]="PROGRESS",e[e.SUCCESS=3]="SUCCESS",e[e.DONE=4]="DONE"}(m||(m={}));const f=e=>{let{classes:t={},tooltip:n="",onClick:r=c.ZT,mode:u=m.INIT}=e;const f=d();return a().createElement("div",{className:p()(f.root,t.root)},(()=>{switch(u){case m.INIT:return a().createElement(i.k,{className:t.button,size:"M",tooltipTitle:n,icon:o.Z,onClick:r});case m.PROGRESS:return a().createElement(l.CircularProgress,{className:t.spinner,size:24});case m.SUCCESS:return a().createElement(s.Z,{className:p()(f.check,t.check)});default:return null}})())}},82842:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(52730),a=n(87638),l=n(24328),i=n.n(l),o=n(71153),s=n.n(o),c=n(17440),u=n(99493),p=n(68439),d=n(31039),m=n(53180),f=n(81727);const h=e=>e&&e.scrollIntoView({block:"end",behavior:"smooth"}),g=e=>{e&&clearTimeout(e)},y=(e,t)=>{if(e&&t){const n=e.offsetTop,r=e.offsetTop+e.clientHeight,{clientHeight:a,scrollTop:l}=t;return n>=0&&r>l&&r<l+a}};var b=n(20562),E=n(79692),v=n(41128);const T=(0,E.Z)((e=>({"@keyframes animate":{from:{background:"transparent"},"66%":{background:"#f2e68e"},"100%":{background:"transparent"}},highlighted:{animationName:"$animate",animationDuration:"3s",animationIterationCount:1},item:{display:"flex",minHeight:"40px",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",flexDirection:"row","&:after":{content:"",minHeight:"inherit",fontSize:0},"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},clickable:{cursor:"pointer"},selected:{background:(0,v.U1)(e.palette.primary.main,.12),"&:hover":{background:(0,v.U1)(e.palette.primary.main,.24)}},inactive:{background:e.inactiveBackground,"&:hover":{background:e.inactiveHoverBackground},"&$selected":{background:e.inactiveSelectedBackground,"&:hover":{background:e.inactiveSelectedHoverBackground}}},justImported:{backgroundColor:"#FFFBEB !important"},avatar:{marginLeft:"20px"},image:{height:"32px",width:"32px",marginTop:"8px",marginBottom:"7px"},info:{marginLeft:"20px",flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"center",fontSize:"13px",width:"100%",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word"},label:{fontSize:"13px",lineHeight:"15px",fontWeight:500,color:e.palette.primary.main,marginRight:"17px",textDecoration:"none"},secondaryLabel:{marginRight:"12px"},businessCard:{color:"rgba(0, 0, 0, 0.54)"},secondRow:{display:"flex",marginTop:"2px",alignItems:"center",color:"rgba(0, 0, 0, 0.54)",fontSize:"12px"}}))),C=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{entities:t,metadata:n,entityToHighlight:r,selectedEntityUri:a,onEntityClick:o,onEntityHover:E,entitiesImportStatus:v,entityButtonsRenderer:C}=e;const O=T(),S=(0,l.useRef)(null),A=(0,l.useRef)(null);return(0,b.D)((()=>{if(r){var e;const n=null===(e=S.current)||void 0===e?void 0:e.querySelectorAll(`[data-entity-uri='${r}']`);if(g(A.current),(null==n?void 0:n.length)>0){var t;const e=null===(t=S.current)||void 0===t?void 0:t.parentElement;y(n[0],e)||(h(n[0]),A.current=setTimeout((()=>{y(n[0],e)||h(n[0])}),1e3))}}return()=>{g(A.current)}}),[r]),i().createElement("div",{ref:S},(t||[]).map((e=>{const t=(0,u.idV)(e.label),l=e.secondaryLabel,h=(0,u.ptG)(n,e),g=(0,u.Fn9)(e),y=e.uri,b=(0,u.wwR)(e),T=(0,c.prop)(y,v);return i().createElement("div",{key:y,className:s()(O.item,{[O.clickable]:!!o,[O.selected]:y===a,[O.highlighted]:y===r,[O.inactive]:!g,[O.justImported]:T===f.E.SUCCESS}),onClick:o?()=>o(y):void 0,onMouseEnter:E?()=>E(y):void 0,onMouseLeave:E?()=>E(null):void 0,"data-entity-uri":y},i().createElement(m.Z,{entity:e,avatarClassName:O.avatar,imageClassName:O.image}),i().createElement("div",{className:O.info},i().createElement("div",null,i().createElement(d.Z,{value:b,className:O.label},t),l&&i().createElement("span",{className:O.secondaryLabel},l," "),h&&i().createElement("span",{className:O.businessCard},h)),i().createElement("div",{className:O.secondRow},i().createElement(p.Z,{entity:e}),i().createElement("div",null,(0,u.BTI)(e)))),C&&C(e))})))}))},20435:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),l=n(13980),i=n.n(l),o=n(52730),s=n(31276),c=n(89119),u=n(8818),p=n(87918),d=n.n(p),m=n(67679);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}const h=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",f({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),a().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",opacity:".54"},a().createElement("path",{d:"M19 11.24V10h-4v1.24a8.417 8.417 0 00-2 .768V10H9v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H5c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM7 16v-6H5v6h2zm0-8V6H5v2h2zm6 0V6H9v2h4zm6 0V6h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0017 13zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero"})))};var g=n(7043),y=n(87638);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const E=e=>{let{entityTypeUri:t,headColumns:n=[],onSelectColumns:l=s.ZT}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entityTypeUri","headColumns","onSelectColumns"]);const[p,f]=(0,r.useState)(null),[E,v]=(0,r.useState)(""),T=(0,o.useSelector)(y.ZP.selectors.getMetadata),C=()=>{f(null),v("")},O=(0,r.useCallback)(((e,r)=>{const a=(0,m.kF)(T,t),i=(0,m.m5)(a,e.id);let o;o=i.length?r?n.concat(i):n.filter((e=>!i.find((t=>t.id===e.id)))):r?n.concat(e):n.filter((t=>t.id!==e.id)),l(o)}),[T,t,n,l]);return a().createElement(a().Fragment,null,a().createElement(u.k,b({tooltipTitle:d().text("Show/hide columns"),size:"M",icon:h,onClick:e=>f(e.currentTarget),className:g.Z.headerIcon},i)),(()=>{const e=(0,m.kF)(T,t);return a().createElement(c.Z,{open:!!p,anchorEl:p,data:e,onListItemClick:O,selected:n,filterText:E,onClose:C,onSearch:v})})())};E.propTypes={entityTypeUri:i().string,headColumns:i().array,onSelectColumns:i().func};const v=E},17087:(e,t,n)=>{n.d(t,{Z:()=>Ae});var r=n(24328),a=n.n(r),l=n(52730),i=n(13980),o=n.n(i),s=n(17440),c=n(45053),u=n(85709),p=n(71153),d=n.n(p),m=n(94079),f=n(43054),h=n(22385),g=n(32528);const y=e=>{let{headCellData:t,headIndex:n,sortOrder:r,sortField:l,sortHandler:i,canCheck:o,onCheck:c,headerCheckboxState:u,openConfigColumnPopup:p}=e;return a().createElement("div",{className:d()("HeadCellRenderer-styles-headCellContentWrapper--204Aj",(0,s.path)(["wrapperClassName"],t))},t&&o&&a().createElement(m.Checkbox,{className:"HeadCellRenderer-styles-checkbox--3kWo3",checked:u||!1,indeterminate:null===u,onChange:()=>c()}),a().createElement("div",{className:"HeadCellRenderer-styles-labelWrapper--3v65T"},t&&(t.sortable?a().createElement(m.TableSortLabel,{active:Boolean(r&&l===t.id),direction:r,onClick:i,classes:{root:"HeadCellRenderer-styles-sortLabel--3pCJO"},component:"div"},t.label):t.label)),p&&a().createElement("div",{className:"HeadCellRenderer-styles-menuButtonWrapper--2WKUw"},a().createElement(h.Z,{icon:f.Z,onClick:p,size:"S","data-column-index":n})))};y.propTypes={headCellData:o().shape({id:o().string,label:o().oneOfType([o().string,o().node]),sortable:o().bool}),headIndex:o().number,sortOrder:o().string,sortField:o().string,sortHandler:o().func,canCheck:o().bool,onCheck:o().func,headerCheckboxState:o().oneOf([!0,!1,null]),openConfigColumnPopup:o().func};const b=(0,g.Z)((0,s.pick)(["openConfigColumnPopup"]))(y),E=(0,g.Z)((0,s.pick)(["openConfigColumnPopup","canCheck","onCheck","headerCheckboxState"]))(y);var v=n(99493),T=n(53180),C=n(31039);const O={popupBackdrop:"EntitiesTable-styles-popupBackdrop--1kv_-",popupContent:"EntitiesTable-styles-popupContent--2_Yic",complexPopupContent:"EntitiesTable-styles-complexPopupContent--3eaMg",highlighted:"EntitiesTable-styles-highlighted--2KGk8",highlightAnimate:"EntitiesTable-styles-highlightAnimate--31hFj",inactiveBackground:"EntitiesTable-styles-inactiveBackground--3GLxS",inactiveHoverBackground:"EntitiesTable-styles-inactiveHoverBackground--2IA7I",inactiveSelectedBackground:"EntitiesTable-styles-inactiveSelectedBackground--fXrDv",inactiveSelectedHoverBackground:"EntitiesTable-styles-inactiveSelectedHoverBackground--2xMPL",textOverflow:"EntitiesTable-styles-textOverflow--2r-Op",textOverflowInactive:"EntitiesTable-styles-textOverflowInactive--c704F",link:"EntitiesTable-styles-link--3M_i8",defaultWrapper:"EntitiesTable-styles-defaultWrapper--17m-1",table:"EntitiesTable-styles-table--2cYK8",imageWrapper:"EntitiesTable-styles-imageWrapper--1Mh4_",blobWrapper:"EntitiesTable-styles-blobWrapper--1lpTF",highlightAnimateForEllipsis:"EntitiesTable-styles-highlightAnimateForEllipsis--3K07i",referenceWrapper:"EntitiesTable-styles-referenceWrapper--2em-P",referenceContent:"EntitiesTable-styles-referenceContent--Y_vP-",referenceIcon:"EntitiesTable-styles-referenceIcon--3TGdy",nestedCellWrapper:"EntitiesTable-styles-nestedCellWrapper--24W5V",nestedAttributeWrapper:"EntitiesTable-styles-nestedAttributeWrapper--2fLKb",profileWrapper:"EntitiesTable-styles-profileWrapper--31FtH",entityAvatar:"EntitiesTable-styles-entityAvatar--1LVQ0",entityAvatarImage:"EntitiesTable-styles-entityAvatarImage--1ePjP",entityLabel:"EntitiesTable-styles-entityLabel--2Wawq",scores:"EntitiesTable-styles-scores--RoYyd",dragColumnHead:"EntitiesTable-styles-dragColumnHead--tOZC8",dragColumnBody:"EntitiesTable-styles-dragColumnBody--1F9zz",draggableHeadCell:"EntitiesTable-styles-draggableHeadCell--3LNDx",cellWrapper:"EntitiesTable-styles-cellWrapper--1-flA",entityButtons:"EntitiesTable-styles-entityButtons--uhQM9",selectedEntityButtons:"EntitiesTable-styles-selectedEntityButtons--1s9-b",justImportedEntityButtons:"EntitiesTable-styles-justImportedEntityButtons--3bEFw",highlightedEntityButtons:"EntitiesTable-styles-highlightedEntityButtons--3KFhD"},S=e=>{let{value:t={}}=e;const n=(0,v.idV)(t.label);return a().createElement("div",{className:d()(O.defaultWrapper,O.profileWrapper)},a().createElement(T.Z,{avatarClassName:O.entityAvatar,imageClassName:O.entityAvatarImage,entity:t}),a().createElement(C.Z,{value:(0,v.wwR)(t),className:O.entityLabel},n))};S.propTypes={value:o().object};const A=S;var N=n(72768);const R=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;return a().createElement("div",{className:O.defaultWrapper},n?a().createElement(N.Z,{value:t,dataTypeDefinition:n}):t)};R.propTypes={value:o().any,columnData:o().object};const w=R;var P=n(61934),x=n(97991),I=n(87638);const F=e=>{let{value:t}=e;const n=(0,l.useSelector)(I.ZP.selectors.getMetadata);return t&&a().createElement("div",{className:d()(O.defaultWrapper,O.referenceWrapper)},a().createElement(x.Z,{className:O.referenceIcon,icon:(0,P.H)(n,t.refEntity.type)}),a().createElement(C.Z,{value:t.refEntity.objectURI,className:O.referenceContent},(0,v.idV)(t.label)))};F.propTypes={value:o().object};const _=F,k=e=>{e.stopPropagation()},D=e=>{const{value:t}=e;return a().createElement("div",{className:O.blobWrapper,onScroll:k},t)};D.propTypes={value:o().any};const j=D,H=e=>{let{value:t}=e;const n=(0,v.efz)({value:t});return n&&a().createElement("div",{className:O.imageWrapper},a().createElement("img",{src:n}))};H.propTypes={value:o().object};const L=H,M=e=>{if("label"===e.id)return A;switch((0,s.path)(["attrType","type"],e)){case"Reference":return _;case"Blob":return j;case"Image":return L}return w};function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){z(e,t,n[t])}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const W=(0,s.split)("."),q=["entityId"],B=e=>!q.includes(e.id),Z=e=>{if((0,v.vZp)(e)){const[,...t]=W(e);return t.length>1?t.slice(0,-1):null}return null};var Y=n(81727),V=n(50646);const $=e=>{let{entity:t,isSelectedEntity:n,isHighlightedEntity:r,entityImportStatus:l,onEntityImportStatusChange:i}=e;return a().createElement("div",{className:d()(O.entityButtons,{[O.selectedEntityButtons]:n,[O.justImportedEntityButtons]:l===Y.E.SUCCESS,[O.highlightedEntityButtons]:r})},a().createElement(V.Z,{entity:t,entityImportStatus:l,onEntityImportStatusChange:i}))};$.propTypes={entity:o().object,isSelectedEntity:o().bool,isHighlightedEntity:o().bool,entityImportStatus:o().oneOf(Object.values(Y.E)),onEntityImportStatusChange:o().func};const X=(0,g.Z)(((e,t)=>{let{entitiesImportStatus:n,onEntityImportStatusChange:r,selectedEntityUri:a,highlightedEntityIndex:l}=e,{entity:i,rowIndex:o}=t;return{entityImportStatus:i&&n[i.uri],onEntityImportStatusChange:r,isSelectedEntity:a===i.uri,isHighlightedEntity:l===o}}))($);var J=n(14838),Q=n(79692),K=n(41128);function ee(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){te(e,t,n[t])}))}return e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ne={height:"100%",display:"flex",flexDirection:"column"},re=(0,Q.Z)((e=>({inactiveCell:ee({background:e.inactiveBackground},ne,{"&$selectedRowCell":{background:e.inactiveSelectedBackground}}),selectedRowCell:ee({background:(0,K.$n)(e.palette.primary.main,.88)},ne),clickable:ee({cursor:"pointer"},ne),justImported:ee({backgroundColor:"#FFFBEB !important"},ne)}))),ae={entity:o().object,isSelected:o().bool,onEntityClick:o().func,isJustImported:o().bool},le=(0,Q.Z)({checkboxWrapper:{display:"flex",alignItems:"center"},checkbox:{marginRight:"-8px",marginLeft:"11px"}});const ie={onCheck:o().func,isChecked:o().bool,hasCheckbox:o().bool},oe=(0,Q.Z)({collapser:{marginLeft:"-2px"}});var se=n(74566);const ce={hasCollapseButton:o().bool},ue=(0,s.pipe)((e=>{const t=t=>{const n=oe(),{hasCollapseButton:r}=t,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["hasCollapseButton"]),{rowValue:i,rowIndex:o}=l;return r?a().createElement("div",{className:"cellWithCollapser"},a().createElement(se.Z,{className:n.collapser,rowIndex:o,rowValue:i}),a().createElement(e,l)):a().createElement(e,l)};return t.propTypes=ce,t}),(e=>{const t=t=>{const n=le(),{onCheck:r,isChecked:l,hasCheckbox:i}=t,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["onCheck","isChecked","hasCheckbox"]),{rowValue:{rawValue:s}}=o;return i?a().createElement("div",{className:d()(n.checkboxWrapper,"cellWithCheckbox")},a().createElement(m.Checkbox,{className:n.checkbox,checked:l,onClick:e=>e.stopPropagation(),onChange:e=>r(s.uri,e.target.checked)}),a().createElement(e,o)):a().createElement(e,o)};return t.propTypes=ie,t}),(e=>{const t=t=>{const n=re(),{rowValue:{rawValue:r},isSelected:l,onEntityClick:i,isJustImported:o}=t,s=i?()=>i(r.uri):void 0,c=r&&!(0,v.Fn9)(r);return s||c||l||o?a().createElement("div",{className:d()({[n.inactiveCell]:c},{inactiveCell:c},{[n.selectedRowCell]:l},{selectedRowCell:l},{[n.clickable]:!!s},{[n.justImported]:o},{justImported:o}),onClick:s},a().createElement(e,t)):a().createElement(e,t)};return t.propTypes=ae,t}),(0,g.Z)(((e,t)=>{let{onEntityClick:n,selectedEntityUri:r,entitiesImportStatus:a,canCheck:l,onCheck:i,checkedEntitiesUris:o}=e,{rowValue:s,columnIndex:c}=t;const{rawValue:u}=s,p=0===c;return{onCheck:i,isChecked:o&&o.includes(u.uri),hasCheckbox:l&&p,hasCollapseButton:p,isSelected:r===u.uri,isJustImported:a[u.uri]===Y.E.SUCCESS,onEntityClick:n}})))(J.Z),pe=e=>{let{columnData:t,cell:n}=e;const r=n.values.length,a=28*Math.max(r,1)+20;if(!r)return a;switch((0,s.path)(["dataTypeDefinition","type"],t)){case"Reference":return 28*r+17;case"Blob":return 100*r;case"Image":return 76*r+17;default:return a}},de=(0,r.forwardRef)(((e,t)=>{let{headColumns:n,entities:i,entityToHighlight:o,selectedEntityUri:p,onReorderingColumn:d,dndColumnReorderingEnabled:m,columnsSize:f,onChangeColumnsSize:h,onScroll:g,onSort:y,sortField:T,sortOrder:C,onEntityHover:S,onEntityClick:A,entitiesImportStatus:N,onEntityImportStatusChange:R,logger:w,canCheck:P,checkedEntitiesUris:x,headerCheckboxState:F,onCheck:_,openConfigColumnPopup:k}=e;const D=(0,r.useMemo)((()=>({highlightRow:"highlightedSelector",dragColumnHead:O.dragColumnHead,dragColumnBody:O.dragColumnBody,draggableHeadCell:O.draggableHeadCell,cellWrapper:O.cellWrapper})),[]),j=(0,l.useSelector)(I.ZP.selectors.getMetadata),[H,L]=(0,r.useState)(null),z=(0,r.useCallback)((e=>{L(e),S&&S((0,s.path)([e,"uri"],i))}),[S,i]),q=(0,r.useRef)();(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{q.current&&q.current.resetScrollbarPosition({resetLeft:!1})}})));const Y=(0,r.useCallback)((e=>{C&&e===T?C===c.SORT_DIRECTION_ASC?y({field:e,order:c.SORT_DIRECTION_DESC}):y({field:e}):y({field:e,order:c.SORT_DIRECTION_ASC})}),[y,T,C]),V=(0,r.useCallback)((e=>{const t=(0,s.prop)(e,i);return t?a().createElement(X,{entity:t,rowIndex:e}):null}),[i]),$=(0,r.useCallback)((e=>a().createElement(ue,e)),[]),J=!!S,Q=!!y,K=(0,r.useMemo)((()=>function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.map(((e,n)=>{let{attrType:r}=e,a=G(e,["attrType"]);const l=0===n;return U({},a,{dataTypeDefinition:r&&(0,v.PFL)(r),resizable:!0,autoResize:!l,draggable:!l,sortable:t&&B(a),nestedPath:Z(a.id),headCellRenderer:l?E:b,rowCellValueRenderer:M(U({},a,{attrType:r}))})}))}(n,Q)),[n,Q]),ee=(0,r.useMemo)((()=>((e,t,n)=>n.map((e=>(0,s.pipe)((0,s.reduce)(((t,n)=>(0,s.assoc)(n.id,((e,t,n)=>{switch(t.id){case"label":return n;case"entityId":return(0,v.BTI)(n);default:{const[e,...r]=W(t.id);return(0,s.pipe)((0,s.prop)(e),(0,v.tT_)(r))(n)}}})(0,n,e),t)),{}),(0,s.assoc)("rawValue",e))(t))))(0,n,i)),[j,n,i]),te=o?i.findIndex((0,s.propEq)("uri",o)):-1,ne=(0,r.useMemo)((()=>({onEntityClick:A,selectedEntityUri:p,highlightedEntityIndex:te,entitiesImportStatus:N,onEntityImportStatusChange:R,canCheck:P,checkedEntitiesUris:x,headerCheckboxState:F,onCheck:_,openConfigColumnPopup:k})),[x,N,F,te,P,_,A,R,p,k]);return a().createElement(u.Z,{fixFirstColumn:!0,onScroll:g,rowsData:ee,columnsData:K,onSort:Y,highlightRow:-1!==te?te:null,ref:q,sortFieldClassName:O.sortableCell,containerClassName:O.table,classes:D,defaultColumnWidth:250,headRowHeight:50,defaultColumnMinWidth:100,defaultRowHeight:48,sorting:{field:T,order:C},dndColumnReorderingHandler:d,dndColumnReorderingEnabled:m,onChangeColumnsSize:h,columnsSize:f,resizeDebounceDelay:150,onRowHover:J?z:void 0,hoverStateEnabled:J,hoverRowIndex:H,renderRowOverlay:V,logger:w,context:ne,maxRowValuesCount:2,renderRowCell:$,getRowCellHeight:pe})}));de.propTypes={entities:o().array,entityToHighlight:o().string,selectedEntityUri:o().string,headColumns:o().array,columnsSize:o().array,onScroll:o().func,onSort:o().func,onReorderingColumn:o().func,onChangeColumnsSize:o().func,dndColumnReorderingEnabled:o().bool,onEntityClick:o().func,onEntityHover:o().func,sortField:o().string,sortOrder:o().oneOf([c.SORT_DIRECTION_ASC,c.SORT_DIRECTION_DESC]),entitiesImportStatus:o().object,onEntityImportStatusChange:o().func,logger:o().func,canCheck:o().bool,checkedEntitiesUris:o().arrayOf(o().string),headerCheckboxState:o().oneOf([!0,!1,null]),onCheck:o().func,openConfigColumnPopup:o().func},de.defaultProps={entities:[],headColumns:[]},de.displayName="EntitiesTable";const me=(0,r.memo)(de);var fe=n(89119),he=n(87918),ge=n.n(he);const ye="left",be="right",Ee="hide",ve={[ye]:ge().text("Insert 1 left"),[be]:ge().text("Insert 1 right"),[Ee]:ge().text("Hide column")},Te=e=>{let{open:t,anchorEl:n,onClick:r,onClose:l,actions:i}=e;return a().createElement(m.Popover,{open:t,anchorEl:n,onClose:l},a().createElement(m.List,{component:"div"},i.map(((e,t)=>((e,t,n)=>a().createElement(m.ListItem,{button:!0,component:"div",key:n,onClick:t},a().createElement(m.ListItemText,{primary:ve[e],primaryTypographyProps:{variant:"body2"}})))(e,(e=>()=>{r(e)})(e),t)))))};Te.propTypes={open:o().bool,anchorEl:o().any,onClick:o().func,onClose:o().func,actions:o().array};const Ce=Te;var Oe=n(55639);class Se extends a().PureComponent{constructor(){super(...arguments),this.state={addColumnPopupOpen:!1,configColumnPopupOpen:!1,configurableColumnIndex:!1,popupAnchor:null,filterText:""},this.addColumnHandler=e=>{const{newColumnPlaceIndex:t}=this.state,{onChangeColumnsList:n,headColumns:r}=this.props,a=r.slice();a.splice(t,0,e),n({columns:a}),this.closeAddColumnPopup()},this.openAddColumnPopup=e=>{let{newColumnPlaceIndex:t}=e;this.setState({newColumnPlaceIndex:t,configColumnPopupOpen:!1,addColumnPopupOpen:!0})},this.closeAddColumnPopup=()=>{this.setState({popupAnchor:null,addColumnPopupOpen:!1,filterText:""})},this.setFilterText=e=>{this.setState({filterText:e})},this.openConfigColumnPopup=e=>{this.setState({popupAnchor:e.currentTarget,configColumnPopupOpen:!0,configurableColumnIndex:parseInt(e.currentTarget.getAttribute("data-column-index"))})},this.closeConfigColumnPopup=()=>{this.setState({configColumnPopupOpen:!1})},this.configColumnHandler=e=>{const{configurableColumnIndex:t}=this.state;switch(e){case ye:this.openAddColumnPopup({newColumnPlaceIndex:t});break;case be:this.openAddColumnPopup({newColumnPlaceIndex:t+1});break;case Ee:this.hideCurrentConfigColumn()}},this.hideCurrentConfigColumn=()=>{const{configurableColumnIndex:e}=this.state,{onChangeColumnsList:t,headColumns:n}=this.props,r=n.slice();r.splice(e,1),t({columns:r}),this.closeConfigColumnPopup()},this.memoizedGetColumnSize=(0,s.memoizeWith)(Se.getMemoIdForColumnSize,Se.getColumnSizeFromHeadColumns)}static getColumnSizeFromHeadColumns(e){return e.map((e=>({id:e.id,size:e.size})))}static getMemoIdForColumnSize(e,t,n){return`${n}${t}${(0,s.toString)(e.map((e=>(0,s.pick)(["id","size"],e))))}`}render(){const{entities:e,entityToHighlight:t,selectedEntityUri:n,onScroll:r,headColumns:l,sortField:i,sortOrder:o,dndColumnReorderingEnabled:s,onEntityClick:c,onEntityHover:u,entitiesTableRef:p,additionalColumns:d,onChangeColumnsList:m,onReorderingColumn:f,onSort:h,onChangeColumnsSize:g,entityTypeUri:y,entitiesImportStatus:b={},onEntityImportStatusChange:E,logger:v,canCheck:T,checkedEntitiesUris:C,headerCheckboxState:O,onCheck:S}=this.props,{addColumnPopupOpen:A,configColumnPopupOpen:N,popupAnchor:R,filterText:w,configurableColumnIndex:P}=this.state,x=this.memoizedGetColumnSize(l,y,(0,Oe.Lt)());return a().createElement(a().Fragment,null,a().createElement(me,{entities:e,entityToHighlight:t,selectedEntityUri:n,onScroll:r,onSort:h,onEntityClick:c,onEntityHover:u,headColumns:l,sortField:i,sortOrder:o,onReorderingColumn:f,ref:p,onChangeColumnsList:m,dndColumnReorderingEnabled:s,onChangeColumnsSize:g,columnsSize:x,entitiesImportStatus:b,onEntityImportStatusChange:E,logger:v,canCheck:T,checkedEntitiesUris:C,headerCheckboxState:O,onCheck:S,openConfigColumnPopup:this.openConfigColumnPopup}),a().createElement(fe.Z,{open:A,anchorEl:R,data:d,onListItemClick:this.addColumnHandler,filterText:w,onClose:this.closeAddColumnPopup,onSearch:this.setFilterText,hideCheckBox:!0,titleText:he.text("Add column")}),a().createElement(Ce,{onClick:this.configColumnHandler,onClose:this.closeConfigColumnPopup,anchorEl:R,open:N,actions:P>0?[ye,be,Ee]:[be]}))}}Se.propTypes={entities:o().array,entityToHighlight:o().string,selectedEntityUri:o().string,entityTypeUri:o().string,headColumns:o().array,dndColumnReorderingEnabled:o().bool,onScroll:o().func,onSort:o().func,onReorderingColumn:o().func,onChangeColumnsSize:o().func,onChangeColumnsList:o().func,onEntityClick:o().func,onEntityHover:o().func,sortField:o().string,sortOrder:o().oneOf([c.SORT_DIRECTION_ASC,c.SORT_DIRECTION_DESC]),entitiesTableRef:o().shape({current:o().shape({resetScrollbarPosition:o().func})}),additionalColumns:o().arrayOf(o().shape({id:o().string,label:o().string})),entitiesImportStatus:o().object,onEntityImportStatusChange:o().func,logger:o().func,canCheck:o().bool,checkedEntitiesUris:o().arrayOf(o().string),headerCheckboxState:o().oneOf([!0,!1,null]),onCheck:o().func};const Ae=Se},50646:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),l=n(52730),i=n(13980),o=n.n(i),s=n(87638),c=n(99493),u=n(86564),p=n(81727),d=n(87918),m=n.n(d),f=n(17440);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}const g=e=>{let{entity:t,importStatus:n,onImportStatusChange:r,hideDelay:i=3e3}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","importStatus","onImportStatusChange","hideDelay"]);const d=(0,l.useSelector)(s.ZP.selectors.getDtssPath),f=(0,l.useSelector)(s.ZP.selectors.getTenant);return a().createElement(p.Z,h({},o,{mode:n,tooltip:m().text("Import this record"),onClick:e=>{e.stopPropagation(),r(p.E.PROGRESS),(0,c.WF)({dtssPath:d,customerTenant:f,entity:t}).then((e=>{let{success:n,uris:a}=e;if(!n)throw new Error("Failed to import entity");t.ctSubscribedUris=a,r(p.E.SUCCESS),setTimeout((()=>r(p.E.DONE)),i)})).catch((()=>{r(p.E.INIT),(0,u.eX)()}))}}))};g.propTypes={entity:c.pyR,importStatus:o().oneOf((0,f.values)(p.E)),onImportStatusChange:o().func,hideDelay:o().number};const y=g,b=(0,n(79692).Z)({importButtonPlaceholder:{display:"flex",alignItems:"center",padding:"0 10px",width:"24px",flexShrink:0,position:"relative"}}),E=e=>{let{entity:t,entityImportStatus:n,onEntityImportStatusChange:r}=e;const i=b(),o=(0,l.useSelector)(s.ZP.selectors.getMetadata),u=(0,l.useSelector)(s.ZP.selectors.getCanUserImportEntitiesFromDT),d=(0,c.biM)(t)&&u,m=(0,c.nt9)(o,t.type),f=(0,c.Nxd)(m)&&!(0,c.aBi)(t),h=n&&n!==p.E.DONE||f;return a().createElement(a().Fragment,null,d&&a().createElement("div",{className:i.importButtonPlaceholder},h&&a().createElement(y,{entity:t,importStatus:n,onImportStatusChange:e=>r(t.uri,e)})))}},31651:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(13980),i=n.n(l),o=n(71153),s=n.n(o),c=n(79692),u=n(99493);const p=(0,c.Z)((e=>({query:{color:e.palette.text.secondary,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},[u.Tl4.entityTypeLabel]:{color:"#03904A"},[u.Tl4.attributeLabel]:{color:"#059BEA"},[u.Tl4.specialAttributeLabel]:{color:"#EA05CF"},[u.Tl4.attributeFilter]:{color:"#7F00FF"},[u.Tl4.attributeValue]:{color:"#000000"}})));function d(){return d=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},d.apply(this,arguments)}const m=(0,r.forwardRef)(((e,t)=>{let{readableQuery:n=[],className:r}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["readableQuery","className"]);const i=p();return a().createElement("span",d({ref:t,className:s()(i.query,r)},l),n.map(((e,t)=>{let{type:n,text:r}=e;return a().createElement("span",{key:t,className:i[n]},r)})))}));m.displayName="ReadableSearchQuery",m.propTypes={readableQuery:i().array,className:i().string};const f=m},19492:(e,t,n)=>{n.d(t,{Z:()=>r});const r={CREATE_FACETS:"FACETS_CREATE_FACETS",DESTROY_FACETS:"FACETS_DESTROY_FACETS",CHANGE_VALUES:"FACETS_CHANGE_VALUES",CLEAR_ALL_VALUES:"FACETS_CLEAR_ALL_VALUES",UPDATE_DATA:"FACETS_UPDATE_DATA",UPDATE_FILTERED_DATA:"FACETS_UPDATE_FILTERED_DATA",DESTROY_FILTERED_DATA:"FACETS_DESTROY_FILTERED_DATA",FILTER_FACET_DATA:"FACETS_FILTER_FACET_DATA",HANDLE_CONFIGS_CHANGES:"FACETS_HANDLE_CONFIGS_CHANGES",REQUEST_GIVEN_FACETS_DATA:"FACETS_REQUEST_GIVEN_FACETS_DATA",SET_RECOMMENDED_FACETS_LIST:"FACETS_SET_RECOMMENDED_FACETS_LIST",CONVERT_FROM_ADVANCED_SEARCH:"FACETS_CONVERT_FROM_ADVANCED_SEARCH",SHOW_MORE_ENTITY_TYPES:"FACETS_SHOW_MORE_ENTITY_TYPES",HIGHLIGHT_ADDED_FACETS:"FACETS_HIGHLIGHT_ADDED_FACETS",CLEAR_HIGHLIGHT_ADDED_FACETS:"FACETS_CLEAR_HIGHLIGHT_ADDED_FACETS"}},87861:(e,t,n)=>{n.d(t,{Z:()=>r});const r={UPDATE_ENTITIES:"SEARCH_UPDATE_ENTITIES",UPDATE_URL:"SEARCH_UPDATE_URL",CLEAR_RESULTS:"SEARCH_CLEAR_RESULTS",REFRESH_DISPLAYED_ENTITIES:"SEARCH_REFRESH_DISPLAYED_ENTITIES",REFRESH:"SEARCH_REFRESH",CLEAR_ALL:"SEARCH_CLEAR_ALL",SHOW_MORE_RESULTS_FOR_ENTITY_TYPE:"SEARCH_SHOW_MORE_RESULTS_FOR_ENTITY_TYPE",UPDATE_TOTAL:"SEARCH_UPDATE_TOTAL",CHANGE_PAGE:"SEARCH_CHANGE_PAGE",RESET_PAGE:"SEARCH_RESET_PAGE",CHANGE_ROWS_PER_PAGE:"SEARCH_CHANGE_ROWS_PER_PAGE",CHANGE_SORT:"SEARCH_CHANGE_SORT",CHANGE_LOADING:"SEARCH_CHANGE_LOADING",MAP_CHANGE_VALUE:"SEARCH_MAP_CHANGE_VALUE",STATE_UPDATED:"SEARCH_STATE_UPDATED",EXPORT_RESULTS:"SEARCH_EXPORT_RESULTS",OPEN_DATA_LOADER:"SEARCH_OPEN_DATA_LOADER",CHANGE_CURRENT_TENANT:"SEARCH_CHANGE_CURRENT_TENANT"}},24097:(e,t,n)=>{n.d(t,{Jf:()=>i,Tu:()=>o,GB:()=>s,nq:()=>c,q7:()=>u,FR:()=>p,ll:()=>d,cp:()=>m,om:()=>f,cu:()=>h,Gn:()=>g,YL:()=>y,qx:()=>b,uJ:()=>E,ib:()=>v,KY:()=>T,PW:()=>C,rX:()=>O,m2:()=>S,GT:()=>A,mL:()=>N,wP:()=>R,XU:()=>w,v6:()=>P,dV:()=>x,Vh:()=>I,WN:()=>F,KJ:()=>_,pG:()=>k,DY:()=>D,hS:()=>j,Vp:()=>H,E_:()=>L,Tv:()=>M});var r=n(87918),a=n.n(r),l=n(17440);const i="explorer",o=[25,50,100],s=0,c=1e4,u=(()=>{const e=new Date;return e.setHours(0,0,0,0),e.setFullYear(e.getFullYear()-1)})(),p=(new Date).setHours(0,0,0,0),d={TABLE:"table",LIST:"list",MAP:"map"},m=d.TABLE,f={PROFILE:"profile",MAP:"map"},h=20,g=[{label:"And",value:"and"},{label:"Or",value:"or"},{label:"And not",value:"and not"},{label:"Or not",value:"or not"}],y=g[0],b=g[1],E={saved:"saved",recent:"recent"},v={public:"public",private:"private"},T={name:"name",updateDate:"updateDate"},C={[T.name]:"NAME",[T.updateDate]:"UPDATE_DATE"},O={ASC:"asc",DESC:"desc"},S=[{label:a().text("Only me"),value:v.private},{label:a().text("All users"),value:v.public}],A={info:"info",error:"error"},N={pmRulesScope:"ML_RULES_ONLY"},R=7,w=300,P={include:"include",exclude:"exclude"},x={UpdateProfiles:"UpdateProfiles",DeleteProfiles:"DeleteProfiles"},I={AddNew:"AddNew",Clear:"Clear",ReplaceAllWith:"ReplaceAllWith",FindAndReplace:"FindAndReplace",FindAndRemove:"FindAndRemove",RepointReference:"RepointReference"},F={[I.AddNew]:a().text("Add new"),[I.Clear]:a().text("Clear attribute"),[I.ReplaceAllWith]:a().text("Replace all with"),[I.FindAndReplace]:a().text("Find and replace"),[I.FindAndRemove]:a().text("Find and remove"),[I.RepointReference]:a().text("Repoint reference")},_={[I.AddNew]:["attributeValue"],[I.Clear]:[],[I.ReplaceAllWith]:["attributeValue"],[I.FindAndReplace]:["attributeValue","attributeValueToFind"],[I.FindAndRemove]:["attributeValueToFind"],[I.RepointReference]:["attributeValue"]},k=(0,l.pipe)(l.values,(0,l.without)(I.RepointReference))(I),D=[I.AddNew,I.Clear,I.ReplaceAllWith],j=[I.AddNew,I.Clear,I.RepointReference],H={AddAttribute:"AddAttribute",UpdateAttribute:"UpdateAttribute",DeleteAttribute:"DeleteAttribute",RepointReferencedEntity:"RepointReferencedEntity",AddTags:"AddTags",ReplaceTag:"ReplaceTag",DeleteTags:"DeleteTags",ClearTags:"ClearTags"},L="referenced_entity_id",M=["uri","label","type","secondaryLabel","defaultProfilePic","defaultProfilePicValue","attributes.Address","attributes.GeoLocation","attributes.ImageGallery"]},78088:(e,t,n)=>{n.r(t),n.d(t,{PROP_NAME_OPERATOR:()=>p,PROP_NAME_VALUES:()=>d,PROP_NAME_FILTER:()=>m,getEmptyAttributeObject:()=>f,getAttributeObject:()=>h,getAttributeData:()=>g,defaultFindGroupPath:()=>y,createGetGroupLens:()=>b,createGetAttributesLens:()=>E,createGetAttributeIndex:()=>v,createGetAttributeLens:()=>T,createSetAttributeProp:()=>C,createGetAttributeProp:()=>O,addAttributeAfter:()=>S,changeAttributeData:()=>A,setAttributeOperator:()=>N,deleteAttribute:()=>R,duplicateAttribute:()=>w,setFilter:()=>P,setValues:()=>x});var r=n(17440),a=n(58697),l=n.n(a),i=n(99493),o=n(24097),s=n(19672);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p="operator",d="values",m="filter",f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l()();return{[p]:o.YL.value,id:e}},h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l()();const n=g(e);return{data:n,[p]:o.YL.value,[m]:(0,r.pathOr)("",["filterOptions",0],n),id:t}},g=e=>c({},e,{filterOptions:e.enforcedFilterOptions||(0,i.d3Y)(e.attrType,e.fieldName)}),y=(0,r.curry)(((e,t)=>{const n=t.findIndex((t=>t.id===e));return n>-1?[n]:null})),b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;return(n,r)=>{const a=(0,s.ET)(...e).get(n),l=t(r,a);return!!l&&(0,s.ET)(...e,...l)}},E=(e,t)=>(n,r)=>{const a=e(n,r);return a&&a.compose((0,s.Ic)(t))},v=e=>(t,n,r)=>{const a=e(t,n);return a?a.get(t).findIndex((e=>e.id===r)):-1},T=e=>(t,n,r)=>{const a=e(t,n),l=v(e)(t,n,r);return-1!==l?a.compose((0,s.ET)(l)):null},C=e=>(t,n,r,a,l)=>{const i=e(t,n,r);if(i){const e=c({},i.get(t));return e[a]=l,i.set(t,e)}return t},O=e=>(t,n,r,a)=>{const l=e(t,n,r);if(l)return l.get(t)[a]},S=e=>{let{state:t,groupId:n,attributeId:r,attribute:a,getAttributesLens:l,getAttributeIndex:i}=e;const s=l(t,n);if(s){let e=[...s.get(t)];const l=i(t,n,r),u=!e[l+1];return-1!==l&&u?e.splice(l+1,0,a):-1!==l?(e.splice(l+1,0,c({},a,{operator:e[l].operator})),e[l]=c({},e[l],{operator:o.YL.value})):e.push(a),s.set(t,e)}return t},A=e=>{let{state:t,groupId:n,attributeId:r,attributeData:a,setAttributeProp:l,getAttributeLens:i}=e,o=t;if(a)return((e,t,n,r,a)=>{const l=a(e,t,n);let i;return l&&(i=l.get(e).filter),r.filterOptions.length&&(!i||!r.filterOptions.includes(i))})(t,n,r,a,i)&&(o=l(t,n,r,m,a.filterOptions[0])),o=l(o,n,r,d,[]),l(o,n,r,"data",a);{const e=i(t,n,r);return e&&(o=e.set(o,f(r))),o}},N=e=>{let{state:t,groupId:n,attributeId:r,operator:a,setAttributeProp:l}=e;return l(t,n,r,p,a)},R=e=>{let{state:t,groupId:n,attributeId:a,getAttributesLens:l}=e;const i=l(t,n);if(i){const e=[...i.get(t)],n=e.findIndex((e=>e.id===a));if(n>-1){const a=(0,r.remove)(n,1,e),l=a[n-1],o=e[n];return l&&(a[n-1]=c({},l,{operator:o.operator})),i.set(t,a)}}return t},w=e=>{let{state:t,groupId:n,attributeId:r,id:a,getAttributesLens:l}=e;const i=l(t,n);if(i){const e=[...i.get(t)],n=e.findIndex((e=>e.id===r));if(n>-1)return e.push(c({},e[n],{id:a})),i.set(t,e)}return t},P=e=>{let{state:t,groupId:n,attributeId:r,filter:a,getAttributeProp:l,setAttributeProp:o}=e;const s=l(t,n,r,m),c=(0,i._26)(s,a)?t:o(t,n,r,d,[]);return o(c,n,r,m,a)},x=e=>{let{state:t,groupId:n,attributeId:r,values:a,setAttributeProp:l}=e;return l(t,n,r,d,a)}},81802:(e,t,n)=>{n.r(t),n.d(t,{toggleQueryBuilderAttributeSelect:()=>i});var r=n(90371),a=n(17440),l=n(78088);function*i(e){let{groups:t,findGroupPath:n=l.defaultFindGroupPath,attributesPropName:i,groupId:o,attributeId:s,selectInfo:c,actions:u}=e;const{checked:p,attribute:d,index:m,selectedAttributes:f}=c,{addAttributeAfter:h,changeAttribute:g,clearAttribute:y,deleteAttribute:b}=u,E=(0,a.pipe)(n(o),(0,a.path)(a.__,t),(0,a.propOr)([],i))(t),v=e=>(0,a.path)([e,"id"],E),T=E.findIndex((0,a.propEq)("id",s));if(s&&0===m)if(p)yield(0,r.gz)(g(o,s,d));else{let e=f[m+1];e?(yield(0,r.gz)(g(o,s,e)),yield(0,r.gz)(b(o,v(T+1)))):yield(0,r.gz)(y(o,s))}else{const e=f.length-m,t=s?T+m:E.length-e;p?yield(0,r.gz)(h(o,v(t-1),d)):yield(0,r.gz)(b(o,v(t)))}}},61934:(e,t,n)=>{n.d(t,{H:()=>l});var r=n(99493),a=n(28527);const l=(e,t)=>{return n=(0,r.XH8)(e,{type:t}),(0,r.vPL)((0,a.al)()||(0,a.cN)(),n);var n}},578:(e,t,n)=>{n.d(t,{o:()=>A,nT:()=>N,Yg:()=>R,zH:()=>w});var r=n(87918),a=n.n(r),l=n(99493),i=n(26507),o=n(17440);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,o.pipe)(o.values,(0,o.map)((e=>({title:e.label,fieldName:e.name,type:e.type,faceted:e.faceted,hideForDataTenant:e.hideForDataTenant})))),p={id:"entity",title:a().text("Entity"),attributes:u(l.xPW)},d={id:"workflow",title:a().text("Workflow"),attributes:u(l.iP_)},m={id:"collaborationItems",title:a().text("Collaboration Items"),attributes:u(l.eWf)},f={id:"RDMItems",title:a().text("Reference Data Management"),attributes:u(l.lwr)},h={id:"auditItems",title:a().text("Audit Items"),attributes:u(l.PEf)},g={id:"potentialMatches",title:a().text("Potential Matches"),attributes:u(l.C68)},y={id:"crosswalksItems",title:a().text("Crosswalks Items"),attributes:u((0,o.omit)(["sourceTable"],l.G39))},b=()=>p,E=()=>d,v=()=>m,T=()=>f,C=()=>h,O=e=>e?(0,o.evolve)({attributes:(0,o.concat)(o.__,e.map((e=>s({},g.attributes.find((0,o.propEq)("fieldName",l.C68.matches.name)),{dataTenant:e,fieldNameForRequest:"dtPotentialMatches.matches",dataTenantFieldName:"dtPotentialMatches.dataTenant"}))))},g):g,S=()=>y,A=e=>{let{title:t,fieldName:n,dataTenant:r,fieldNameForRequest:a,dataTenantFieldName:l}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["title","fieldName","dataTenant","fieldNameForRequest","dataTenantFieldName"]);return s({title:t,fieldName:n,attrType:o},o.faceted?{pageSize:(0,i.OY)(o),orderType:(0,i.nd)(o)}:{},r?(0,i.sW)({dataTenant:r,fieldNameForRequest:a,dataTenantFieldName:l,originalTitle:t}):{})},N=(e,t,n)=>n&&n.length?{id:e,title:t,attributes:n}:null,R=function(){let{attributesFilter:e=o.T,dataTenants:t,canUserReadWorkflowDataTask:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=t=>{let{id:n,title:r,attributes:a}=t;return N(n,r,a.map(A).filter(e))},a=[b(),...n?[E()]:[],v(),T(),C(),O(t),S()];return a.map(r).filter(o.identity)},w=(e,t,n)=>{const r=R({dataTenants:t,canUserReadWorkflowDataTask:n}).find((t=>t.attributes.find((t=>t.fieldName===e))));return r&&r.attributes.find((t=>t.fieldName===e))}},26507:(e,t,n)=>{n.d(t,{TG:()=>P,Km:()=>w,Y2:()=>N,NG:()=>A,sW:()=>y,YU:()=>g,LG:()=>x,Q9:()=>E,vf:()=>R,jj:()=>S,nd:()=>T,OY:()=>v});var r=n(17440),a=n(36631),l=n(87918),i=n.n(l),o=n(24328),s=n.n(o);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var u=n(68973),p=n(24097),d=n(99493),m=n(578);function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=(e,t)=>f({title:e.label,fieldName:e.name,type:(0,d.CY1)(e),attrType:{type:e.type,singleValue:e.singleValue,hideForDataTenant:e.hideForDataTenant,faceted:!0}},t),y=e=>{let{dataTenant:t,fieldNameForRequest:n,dataTenantFieldName:r,originalTitle:a}=e;return{fieldName:(0,d.CSV)(n,t.id),fieldNameForRequest:n,dataTenant:t.id,dataTenantFieldName:r,title:`${t.label} ${a}`}},b=[{attribute:g(d.lD1.matchRules,{pageSize:p.cu,orderType:"reversedCount"}),check:d.Ir},{attribute:g(d.lD1.MLRecommendedMatch,{fieldNameForRequest:"matchRules",pageSize:p.cu,orderType:"reversedCount",LogoIcon:e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return s().createElement("svg",c({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),s().createElement("defs",null,s().createElement("linearGradient",{x1:"94.582%",y1:"6.451%",x2:"23.195%",y2:"83.323%",id:"svg1842926308b"},s().createElement("stop",{stopColor:"#CDE1FF",offset:"0%"}),s().createElement("stop",{stopColor:"#AFFBF4",offset:"100%"})),s().createElement("linearGradient",{x1:"94.582%",y1:"6.594%",x2:"23.195%",y2:"83.214%",id:"svg1842926308d"},s().createElement("stop",{stopColor:"#FFF",offset:"0%"}),s().createElement("stop",{stopColor:"#FDFFFF",offset:"100%"})),s().createElement("linearGradient",{x1:"93.837%",y1:"55.274%",x2:"29.292%",y2:"-20.431%",id:"svg1842926308g"},s().createElement("stop",{stopColor:"#FFFCC7",stopOpacity:"0",offset:"0%"}),s().createElement("stop",{stopColor:"#FFF470",offset:"100%"})),s().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"98.152%",id:"svg1842926308i"},s().createElement("stop",{stopColor:"#83D6FF",offset:"0%"}),s().createElement("stop",{stopColor:"#72B9EF",offset:"100%"})),s().createElement("path",{d:"M.228 8.25l4.055-7.007C4.579.727 5.709.074 6.425.009L14.48.001c.633-.03 1.853.635 2.236 1.3l3.934 6.812c.398.69.345 2.074-.017 2.765l-3.868 6.685c-.472.64-1.77 1.39-2.446 1.416l-7.767.008c-.689-.033-1.992-.72-2.345-1.332L.232 10.769c-.338-.585-.278-1.938-.004-2.519z",id:"svg1842926308a"}),s().createElement("path",{d:"M1.389 8.38l3.589-6.202c.262-.457 1.263-1.033 1.898-1.09h7.143c.56-.026 1.643.565 1.984 1.153l3.494 6.037c.353.611.308 1.837-.012 2.449l-3.424 5.916c-.418.567-1.569 1.23-2.168 1.252H7.006c-.61-.03-1.766-.64-2.08-1.182L1.395 10.61c-.3-.518-.249-1.717-.006-2.23z",id:"svg1842926308c"}),s().createElement("path",{d:"M.124 0l-.161-.002c3.374 0 6.11 2.727 6.11 6.092 0 3.279-2.974 4.316-2.974 7.123a.84.84 0 01-.84.838H.123V8.623a1.75 1.75 0 000-3.437V0z",id:"svg1842926308e"}),s().createElement("path",{d:"M5.92 0l-.012 5.154-.132.006A1.75 1.75 0 005.9 8.654l-.012 5.409H3.486c-.237-.07-.4-.155-.489-.254-.089-.098-.17-.284-.242-.557l-.291-1.341a2.084 2.084 0 00-.12-.344 1.507 1.507 0 00-.187-.267L.25 8.796a1.032 1.032 0 01-.201-.293 1.277 1.277 0 01-.048-.38V3.917a.522.522 0 01.027-.22.562.562 0 01.147-.172L3.546.111a.456.456 0 01.11-.088A.345.345 0 013.784 0h2.136z",id:"svg1842926308h"})),s().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},s().createElement("g",null,s().createElement("g",{transform:"translate(1.5 .75)"},s().createElement("use",{fill:"url(#svg1842926308b)",xlinkHref:"#svg1842926308a"}),s().createElement("use",{fill:"url(#svg1842926308d)",opacity:".5",xlinkHref:"#svg1842926308c"})),s().createElement("g",{transform:"translate(8.707 3.846)"},s().createElement("rect",{fill:"#363636",x:"1.932",y:"16.593",width:"2.644",height:"2.895",rx:"1.322"}),s().createElement("path",{d:"M6.018 14.845v2.367c0 .9-.743 1.629-1.66 1.629H2.27c-.917 0-1.66-.73-1.66-1.63v-2.366l.004-.095h5.401c.002.031.003.063.003.095z",fill:"#717171"}),s().createElement("path",{d:"M5.168 17.15c0 .9-.618 1.63-1.38 1.63H2.049c-.762 0-1.38-.73-1.38-1.63v-2.37h4.5v2.37z",fill:"#828282"}),s().createElement("path",{d:"M5.939 17.28a.5.5 0 010 1H.569a.5.5 0 110-1h5.37zm0-1.376a.5.5 0 010 1H.569a.5.5 0 110-1h5.37zm0-1.375a.5.5 0 010 1H.569a.5.5 0 110-1h5.37z",fill:"#B1B1B1"}),s().createElement("path",{d:"M3.125 17.28v1h-2v-1h2zm0-1.376v1h-2v-1h2zm0-1.375v1h-2v-1h2z",fill:"#C5C5C5"}),s().createElement("g",{transform:"translate(3.375)"},s().createElement("mask",{id:"svg1842926308f",fill:"#fff"},s().createElement("use",{xlinkHref:"#svg1842926308e"})),s().createElement("use",{fill:"#FFD44B",xlinkHref:"#svg1842926308e"}),s().createElement("path",{d:"M-6.125 6.091A6.076 6.076 0 01-.025 0c3.367 0 6.098 2.727 6.098 6.091 0 3.279-2.969 4.316-2.969 7.123a.838.838 0 01-.839.837H-2.51a.838.838 0 01-.839-.837c0-2.562-2.775-3.73-2.775-7.123z",fill:"#FFD347",mask:"url(#svg1842926308f)"}),s().createElement("path",{d:"M-6.125 6.091A6.076 6.076 0 01-.025 0c3.367 0 6.098 2.727 6.098 6.091 0 3.279-2.969 4.316-2.969 7.123a.838.838 0 01-.839.837H-2.51a.838.838 0 01-.839-.837c0-2.562-2.775-3.73-2.775-7.123z",fill:"#FFDE72",mask:"url(#svg1842926308f)"}),s().createElement("path",{d:"M1.496 6.08c.02-.896.936-1.336 1.732-.85.906.553.507 2.04-.592 2.069H2.199l-.576 7.012-.75-.032.552-6.406.023-.574H.124v-.75h1.354l.017-.448v-.02zm1.342-.21c-.318-.193-.58-.072-.592.221l-.001.036-.016.422h.373c.357 0 .5-.493.252-.668l-.016-.01z",fill:"#F3BE13",mask:"url(#svg1842926308f)"}),s().createElement("ellipse",{fill:"url(#svg1842926308g)",mask:"url(#svg1842926308f)",cx:"-.236",cy:"6.031",rx:"4.567",ry:"4.583"})))),s().createElement("g",null,s().createElement("g",{transform:"translate(5.706 3.846)"},s().createElement("mask",{id:"svg1842926308j",fill:"#fff"},s().createElement("use",{xlinkHref:"#svg1842926308h"})),s().createElement("use",{fill:"url(#svg1842926308i)",xlinkHref:"#svg1842926308h"}),s().createElement("path",{fill:"#D6FCFA",fillRule:"nonzero",opacity:".5",mask:"url(#svg1842926308j)",d:"M4.78 1.404v.75h-.444L1.56 4.93H-.706v-.75H1.25l2.775-2.776zM3.21 5.097l1.725 1.725H6.25v.75H4.625L2.68 5.628zM6.664 3.53v.75H4.958l-.492.53-.55-.51.714-.77zM1.781 6.53l2.565 2.564h.462v.75h-.773L1.47 7.28H-.08v-.75zM2.67 10.53h1.118L5.05 11.79h2.094v.75H4.74L3.477 11.28z"}))),s().createElement("circle",{fill:"#008FD8",cx:"11.75",cy:"10.75",r:"1.125"})))}}),check:d.XQO}],E=(0,r.curry)(((e,t)=>{const n=b.reduce(((e,n)=>{let{attribute:r,check:a}=n;return a(t)&&e.push(f({},r,{entityTypeUri:t.uri})),e}),[]),a=(e||[]).flatMap((e=>n.filter((0,r.propEq)("fieldName",d.lD1.matchRules.name)).map((t=>f({},t,y({dataTenant:e,fieldNameForRequest:"dtPotentialMatches.matchRules",dataTenantFieldName:"dtPotentialMatches.dataTenant",originalTitle:t.title}))))));return n.concat(a)})),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(e.type){case"Int":case"Float":case"Double":case"Long":case"Number":case"Date":case"ActivenessDate":case"Timestamp":return 1;default:return p.cu}},T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(e.type){case"Int":case"Float":case"Double":case"Long":case"Number":case"Date":case"ActivenessDate":case"Timestamp":return"reversedTerm";default:return"reversedCount"}},C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(e.type){case"Int":case"Float":case"Double":case"Long":case"Number":case"Date":case"ActivenessDate":case"Timestamp":return!0;default:return!1}},O=(0,r.curry)(((e,t)=>(0,d.YkM)(t)?(0,d.EUG)(e,t).some(O(e)):!!t.faceted)),S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(e.children?e.children.concat(e.children.map(S)).flat(1/0):[]).filter((0,r.complement)(r.isEmpty))},A=function(e,t,n,r,a){let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];const i=f({},a(e,t,n,r,l),{uri:t.uri}),o=t.children?t.children.map((r=>A(e,r,n,"",a,l.concat({name:t.name,label:t.label})))):[];return o.length&&(i.children=o),i},N=(e,t,n,a,l)=>{const i=(0,d.jFi)(e,{type:n}),o=t.label||t.name;return{title:o,pathToTitle:Array.isArray(l)?[i,...(0,r.chain)((0,r.prop)("label"),l),o]:[i,o],fieldName:a||(0,u.$9)(t.uri,l),entityTypeUri:n,attrType:t,pageSize:v(t),orderType:T(t),isComplex:(0,d.YkM)(t),disableIncludeFilter:C(t)}},R=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,d.k66)(e,t,(0,r.either)((0,r.always)(!n),O(e)))},w=(0,a.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=arguments.length>6?arguments[6]:void 0;const s=e=>t.includes(e),c=()=>i,u=()=>(0,r.propEq)("length",1,t),{entityTypes:p}=e;return p.filter(d.oDv).filter((0,r.anyPass)([(0,r.always)(!t.length),(0,r.allPass)([c,u,(0,r.propEq)("uri",t[0])]),(0,r.allPass)([(0,r.complement)(c),(0,r.pipe)((0,r.prop)("uri"),s)])])).map((t=>{const r=(0,d.jFi)(e,{type:t.uri}),i=E(o,t).concat(R(e,t,l).map((n=>A(e,n,t.uri,"",a))));return i.length?n(t.uri,r,i):null})).filter(r.identity)})),P=(0,a.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.T,a=arguments.length>3?arguments[3]:void 0;if(0===t.length)return w(e,void 0,m.nT,N,!1,!0,a);const l=[],o=t.length>1?(0,d.Ug0)(e,t):t[0];if(o){const r=(0,d.nt9)(e,o),s=t.length>1?i().text("Attributes"):(0,d.jFi)(e,{type:r.uri}),c=E(a,r).filter(n).concat(R(e,r,!1).map((t=>A(e,t,r.uri,"",N))));c.length&&l.push((0,m.nT)(r.uri,s,c))}return l})),x=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))}},25952:(e,t,n)=>{n.d(t,{$t:()=>d,Xk:()=>h,u7:()=>g,tI:()=>E,zy:()=>v,Uv:()=>C,eC:()=>S,DV:()=>A,OP:()=>N,_H:()=>R,bB:()=>w,S9:()=>P,tm:()=>x,DT:()=>I});var r=n(17440),a=n(87918),l=n.n(a),i=n(24097),o=n(99493),s=n(26507),c=n(55639);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>(0,s.YU)(o.lD1.type,{hiddenTitle:l().text("Entity types"),disableIncludeFilter:!0,pageSize:101,showIcon:!0,barColor:"#61D55D",transparentBackground:!0,showDeleteButton:!1}),m=(0,s.YU)(o.lD1.matches,{pageSize:1,orderType:"reversedTerm",disableIncludeFilter:!0}),f=[(0,s.YU)(o.lD1.createdBy,{pageSize:i.cu}),(0,s.YU)(o.lD1.updatedBy,{pageSize:i.cu}),(0,s.YU)(o.lD1.createdTime,{disableIncludeFilter:!0,pageSize:1,orderType:"reversedTerm"}),(0,s.YU)(o.lD1.updatedTime,{disableIncludeFilter:!0,pageSize:1,orderType:"reversedTerm"}),(0,s.YU)(o.lD1.sourceSystems,{title:l().text("Sources"),pageSize:i.cu,orderType:"reversedCount"}),(0,s.YU)(o.lD1.tags,{pageSize:i.cu,orderType:"reversedCount"}),(0,s.YU)(o.lD1.roles,{pageSize:i.cu,orderType:"reversedCount"}),m,(0,s.YU)(o.lD1.matchScore,{pageSize:1,orderType:"reversedTerm",disableIncludeFilter:!0}),(0,s.YU)(o.lD1.startDate,{pageSize:1,orderType:"reversedTerm",disableIncludeFilter:!0}),(0,s.YU)(o.lD1.endDate,{pageSize:1,orderType:"reversedTerm",disableIncludeFilter:!0})],h=e=>{const t=(e||[]).map((e=>u({},m,(0,s.sW)({dataTenant:e,fieldNameForRequest:"dtPotentialMatches.matches",dataTenantFieldName:"dtPotentialMatches.dataTenant",originalTitle:m.title}))));return f.concat(t)},g=(e,t,n,r,a)=>u({},(0,s.Y2)(e,t,n,r,a),{uri:t.uri,type:(0,o.CY1)(t)}),y=(0,r.memoizeWith)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return(0,c.Lt)(t.toString()+(n||[]).map((0,r.prop)("id")).toString())}),(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return(0,s.Km)(e,t,b,g,!0,!0,n)})),b=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return n&&n.length?{id:e,title:t,needGroupIcon:r,facets:n}:null},E=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3?arguments[3]:void 0;const i=1===t.length,o=h(a),s=b("special",l().text("Basic"),o,!1),c=y(e,t,a),u=(0,r.chain)((0,r.prop)("facets"),c),p=(0,r.pipe)((0,r.map)(v([...o,...u])),(0,r.reject)(r.isNil))(n);return[b("recommended",l().text("Recommended"),p,!1)].concat(i?c:s).concat(i?s:c).filter(r.identity)},v=(0,r.curry)(((e,t)=>{const n=e.find((0,r.propEq)("fieldName",t));if(n)return n;{const n=(0,r.chain)((0,r.propOr)([],"children"),e);return n.length?v(n,t):void 0}})),T=e=>u({},e,{facets:e.facets.reduce(((e,t)=>(e.push(t),t.children&&e.push(...(0,s.jj)(t)),e)),[])}),C=(e,t,n)=>E(e,t,[],n).map(T),O=e=>e.children?[e].concat(e.children.flatMap(O)):[e],S=(e,t,n,r)=>E(e,t,n,r).flatMap((e=>e.facets)).flatMap(O),A=function(e){let{values:t=[],showAllItems:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.reject)(r.isNil,{fieldName:e,data:[],values:t&&t.map((0,r.when)((0,r.is)(Boolean),r.toString)),showAllItems:n})},N=e=>e.type===o.$26.COMPLEX_FACET,R=e=>e.attrType&&(0,o.CwH)(e.attrType),w=e=>"matches"===e.fieldName||"potentialMatches.matchScore"===e.fieldName||e.fieldName.startsWith((0,o.CSV)("dtPotentialMatches.matches","")),P=e=>(0,r.intersection)(["matchRules","dtPotentialMatches.matchRules"],[e.fieldNameForRequest,e.fieldName]).length>0,x=e=>"MLRecommendedMatch"===e.fieldName,I=e=>!!e.dataTenant},78844:(e,t,n)=>{n.d(t,{h:()=>f});var r=n(17440),a=n(58697),l=n.n(a),i=n(36631),o=n(578),s=n(99493),c=n(24097);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,r.filter)((0,r.pipe)((0,r.prop)("values"),r.isEmpty,r.not)),d=(0,i.Z)((e=>(0,o.Yg)({dataTenants:e}))),m=(e,t,n)=>(0,s.jFi)(e,{type:n.entityTypeUri})||(d(t).find((e=>e.attributes.find((e=>e.fieldName===n.fieldName))))||{}).title,f=(e,t,n)=>{const a=p(n),[[i={}],o]=(0,r.partition)(s.M5u,a);return o.reduce(((n,a)=>{const i=(0,s.d3Y)(a.attrType,a.fieldName),o=(0,s.P$2)(a),c=(0,r.pick)(["title","pathToTitle","fieldName","fieldNameForRequest","dataTenant","dataTenantFieldName","attrType","groupName","entityTypeUri","pageSize","orderType","isComplex","disableIncludeFilter","uri"])(a),p=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){u(e,t,n[t])}))}return e}({},c,{groupName:m(e,t,c),filterOptions:i}),d=(0,s.WxZ)(a);return n[0].push({data:p,operator:"and",filter:o,id:l()(),values:d}),n}),[[]]).filter((e=>e.length||(0,r.path)(["values","length"],i))).map((e=>({attributes:e,operator:c.qx.value,id:l()(),entityTypes:i.values||[]})))}},91785:(e,t,n)=>{n.d(t,{sc:()=>i,eQ:()=>s,ZK:()=>c});var r=n(17440),a=n(99493);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=(0,r.pipe)((0,r.propOr)([],"entityTypes"),(0,r.any)((0,r.complement)(a.oDv))),o=(0,r.pipe)((0,r.propOr)([],"entityTypes"),(0,r.filter)(a.oDv),(0,r.map)((0,r.prop)("uri"))),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return 0===t.length&&i(e)?o(e):t},c=(e,t)=>t&&Array.isArray(t.availableEntityTypes)?e.map((e=>t.availableEntityTypes.includes(e.value)?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){l(e,t,n[t])}))}return e}({},e,{number:void 0}))):e},7066:(e,t,n)=>{n.d(t,{HC:()=>E,Kn:()=>v,wW:()=>w,dG:()=>k,q7:()=>D,iL:()=>j,AX:()=>H,t8:()=>L,i7:()=>M,Kl:()=>U,EG:()=>z,XK:()=>G,$L:()=>q,MI:()=>B,Kk:()=>Z,U4:()=>V});var r=n(17440),a=n(52180),l=n(99493),i=n(61934),o=n(55639),s=n(25952),c=n(95038),u=n.n(c),p=n(24097),d=n(14476),m=n(91785),f=n(19492),h=n(87861);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=(e,t)=>t.find((t=>[t.fieldName,`${t.fieldName}.ov`].includes(e)))||(console.warn(`Can't find facet config for ${e} fieldName`),null),E=(e,t,n,r,a)=>Object.keys(t).reduce(((l,i)=>{const o=b(i,n);if(o){const n=o.fieldName;l[n]=_(e,n,t[i],o,r,a)}return l}),{}),v=(e,t)=>Object.keys(e).reduce(((n,r)=>{const a=b(r,t);return a&&(n[a.fieldName]=F(e[r],a.attrType&&a.attrType.type)),n}),{}),T=(e,t)=>t.number-e.number,C=e=>{let{number:t}=e;return t>0},O=e=>(0,r.either)(C,(e=>{let{values:t=[]}=e;return e=>{let{value:n}=e;return t.includes(n)}})(e)),S=e=>Object.keys(e).map((t=>({value:t,number:e[t],label:t}))).sort(T),A=(e,t)=>Object.keys(e).map((n=>({value:"Long"===t?new a.Decimal(n):+n,number:e[n],label:n}))),N=(e,t)=>S(e).map((e=>g({},e,{label:(0,l.sG0)(e.value,(0,r.path)([e.value,"displayName"],t))}))),R=(e,t)=>t.map((t=>({value:t,label:t,number:e[t]||0}))).sort(T),w=(e,t,n)=>{const{entityTypes:a}=e;return a.filter(n?e=>{let{uri:t}=e;return n.includes(t)}:r.identity).sort(n?(0,l.A9Y)(n,"uri"):e=>0).map((n=>{const r=(0,l.nIW)(n.uri);return(0,l.oDv)(n)?{value:n.uri,number:t[r]||0,label:(0,l.jFi)(e,{type:n.uri})||r,icon:(0,i.H)(e,n.uri)}:null})).filter(r.identity)},P=(e,t,n)=>{const{roles:r}=e;return r.map((e=>{const n=(0,l.nIW)(e.uri);return{value:e.uri,label:e.label,number:t[n]||0}})).filter(O(n)).sort(T)},x=(e,t,n)=>{const{sources:r}=e;return r.map((e=>{const n=(0,l.nIW)(e.uri);return{value:n,number:t[n]||0,label:e.label||n}})).filter(O(n)).sort(T)},I=(e,t,n)=>{const a=(0,l.nt9)(e,n.entityTypeUri),i=a&&a.matchGroups||[];return(0,r.uniqBy)((0,r.prop)("value"),[...i.map((e=>{let{uri:n,label:r}=e;return{isRaw:!1,value:n,number:t[n]||0,label:r||n}})),...Object.entries(t).map((e=>{let[t,n]=e;const a=(0,r.find)((0,r.propEq)("uri",t))(i),l=!a;return{value:t,number:n,label:l?t:a.label,isRaw:l}}))]).filter(O(n)).sort(T)},F=(e,t)=>{const{min:n,max:r,count:l}=e;return{min:"Long"===t?new a.Decimal(n):+n,max:"Long"===t?new a.Decimal(r):+r,count:l}},_=function(e,t,n,a){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};switch(t){case"type":{const{allowedEntityTypes:t}=o;return w(e,n,t)}case"roles":return P(e,n,a);case"sourceSystems":return x(e,n,a)}if((0,s.S9)(a))return I(e,n,a);if((0,s._H)(a))return N(n,i[(0,l.To9)(a.attrType)]);if((0,l.eEv)(a.attrType))return R(n,(0,r.path)(["attrType","values"],a));switch(a.type){case l.$26.NUMERIC_RANGE_FACET:case l.$26.DATE_RANGE_FACET:return A(n,a.attrType&&a.attrType.type);default:return S(n)}},k=e=>{switch(e){case l.$26.DATE_RANGE_FACET:return[p.q7,p.FR];case l.$26.NUMERIC_RANGE_FACET:default:return[p.GB,p.nq]}},D=((0,r.curry)(((e,t)=>(Object.values(t).map((t=>t.filter((e=>isNaN(e.value))).forEach((t=>t.value=e)))),t))),(e,t)=>isNaN(t)?e:t),j=(e,t)=>t.find((t=>t.fieldName===e||t.fieldNameForRequest===e)),H=(e,t)=>Object.keys(e).filter((e=>t.includes(e))).reduce(((t,n)=>(t[n]=e[n],t)),{}),L=(e,t)=>{const n=t.reduce(((e,t)=>(e[t.fieldName]=t,e)),{});return Object.keys(e).reduce(((t,r)=>{const a=n[r];return t[r]=g({},e[r],a),t}),{})},M=e=>Object.keys(e).reduce(((t,n)=>(t[n]=g({},e[n],{filter:W(e[n].type)}),t)),{}),U=e=>(0,r.map)((0,r.ifElse)(l.M5u,(t=>g({},t,{values:(0,m.eQ)(e,t.values)})),r.identity)),z=e=>(0,r.map)((0,r.when)(l.M5u,(t=>g({},t,{values:e&&e.length>0?t.values.filter((t=>e.includes(t))).sort((0,l.A9Y)(e)):t.values})))),G=(0,r.path)(["facets","facetsData","type"]),W=e=>({entityTypeFacet:"equals",facetWithDropdownCheckboxes:"equals",numericRangeFacet:"range",dateRangeFacet:"range"}[e]),q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="type"===(0,r.path)(["payload","facetFieldName"],e);return e.type===f.Z.CHANGE_VALUES&&t||e.type===f.Z.CLEAR_ALL_VALUES||e.type===h.Z.CLEAR_ALL},B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.map((r=>{let a;switch(n){case l.$26.NUMERIC_RANGE_FACET:return`${(0,o.k7)(+r[0],1e4)} — ${(0,o.k7)(+r[1],1e4)}`;case l.$26.DATE_RANGE_FACET:return a=(0,d.C)().getRange(t,e),`${(0,o.XY)(u()(a[0]))} — ${(0,o.XY)(u()(a[1]))}`;case l.$26.ENTITY_TYPE_FACET:case l.$26.WITH_DROPDOWN_CHECKBOXES_FACET:default:return l.wSh.fromNull(e.find((e=>e.value===r))).orSome({label:r||""}).label}}))},Z=(0,r.pipe)((0,r.propOr)([],"values"),r.length,(0,r.gt)(r.__,p.wP)),Y=(0,r.pipe)((0,r.pipe)((0,r.filter)(s._H),(0,r.map)((e=>({type:(0,l.To9)((0,r.path)(["attrType"],e)),codeValues:(0,r.flatten)((0,r.propOr)([],"values",e))}))),(0,r.filter)((e=>{let{codeValues:t}=e;return t.length>0}))),l.qWg),V=(e,t)=>(0,r.pipe)(Y,(0,l.DVz)(t))(e)},36657:(e,t,n)=>{n.d(t,{Z:()=>D});var r=n(25952),a=n(17440);const l=e=>t=>{const n=t.entityType||t.entityTypeUri||"special",r=e.find((0,a.propEq)("id",n));return(0,a.propOr)([],"facets",r).find((0,a.propEq)("fieldName",t.fieldName))};var i=n(99493);const o=e=>t=>e.find((e=>e.fieldName===t.fieldName));function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,a.pipe)((e=>e.reduce(((e,t)=>(e[t.fieldName]=s({},t,{values:[...(0,a.propOr)([],"values",t),...(0,a.pathOr)([],[t.fieldName,"values"],e)]}),e)),{})),a.values),p=e=>(t,n)=>{if(n.entityType){const r=(0,i.h2W)(n.fieldName,n.entityType),a=(0,i.zeJ)(e,r);a&&(0===t.entityTypes.length&&t.entityTypes.push(n.entityType),t.entityTypes.includes(n.entityType)&&t.searchParams.push({fieldName:n.fieldName,filter:n.filter||"equals",uri:a.uri,values:n.values||[]}))}return t},d=e=>(t,n)=>{const r=e.find((e=>e.fieldName===n.fieldName));if(r){const e=(0,i.g5f)(r)?(0,i.fed)(n.values):n.values,l=(0,i.M5u)(r)&&n.showAllEntityTypes?n.showAllEntityTypes:null;return s({},t,{[n.fieldName]:(0,a.reject)(a.isNil,{fieldName:n.fieldName,values:e,showAllItems:l})})}return t};var m=n(58697),f=n.n(m),h=n(26507),g=n(578);function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=(0,a.curry)(((e,t,n,r)=>{const{uri:l}=r;return l&&!l.startsWith("special/")?((e,t)=>{let{uri:n,entityTypeUri:r,fieldName:l}=t;const o=(0,i.zeJ)(e,n);if(o){const t=((0,i.X3M)(e,(0,i.h2W)(l,r),r)||[]).map((0,a.pick)(["label","name"])).slice(0,-1);return y({uri:n,groupName:(0,i.jFi)(e,{type:r}),filterOptions:(0,i.d3Y)(o,l)},(0,h.Y2)(e,o,r,l,t))}return null})(e,r):((e,t,n,r)=>{let{fieldName:l}=r;const o=(0,g.Yg)({dataTenants:t,canUserReadWorkflowDataTask:n}).find((e=>e.attributes.find((e=>e.fieldName===l)))),s=o&&o.attributes.find((e=>e.fieldName===l));return s?y({groupName:o.title,filterOptions:(0,i.d3Y)(s.attrType,l)},(0,a.pick)(["title","fieldName","attrType","pageSize","orderType","dataTenant","fieldNameForRequest","dataTenantFieldName"],s)):null})(0,t,n,r)||((e,t,n)=>{let{fieldName:r,entityTypeUri:l}=n;const o=(0,a.pipe)((0,i.nt9)(e),(0,h.Q9)(t),(0,a.find)((0,a.propEq)("fieldName",r)))(l);return o?y({groupName:(0,i.jFi)(e,{type:l}),filterOptions:(0,i.d3Y)(o.attrType,r)},o):null})(e,t,r)}));var v=n(24097);const T=(0,a.curry)(((e,t,n,r,l)=>(0,a.pipe)((0,i.w3l)(e,r),(0,a.evolve)({data:E(e,t,n)}))(l)));var C=n(67679);const O="Preview",S={NoPreview:v.ll.LIST,[O]:v.cp,MapPreview:v.cp,TableView:v.ll.TABLE},A={[O]:v.om.PROFILE},N=e=>e.find((e=>e.selected))||{},R=(e,t,n)=>{const r=(0,C.wM)(e,t),l=n.reduce(((t,n)=>(t[n.entityTypeUri]=n.selectedAttributes.map((t=>{const n=(0,i.zeJ)(e,t);return{id:(0,i.Tde)(n.uri),label:n.label,attrType:n}})).filter((e=>!(0,i.YkM)(e.attrType))),t)),{});return(0,a.mergeDeepWith)(a.concat,r,l)};var w=n(78844),P=n(7066);const x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.options||[],n=t.find((0,a.propEq)("fieldName","searchByOv"));if(n){const e=(0,a.path)(["values",0],n);if("boolean"==typeof e)return{searchByOv:e,ovOnly:e}}return null};function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){F(e,t,n[t])}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=(e,t,n,s)=>{let{keyword:c=null,facets:u={},advanced:p=[],map:d,view:m,searchOptions:f,currentSavedSearchUri:h,currentTenant:g}=t;const y={map:d,keyword:c,searchOptions:f};if(p.some((e=>{let{attributes:t,entityTypes:n=[]}=e;return t.length||n.length}))?y.advanced=(0,i.Y5F)(E,e,p,n,s):y.facets=((e,t,n)=>{const s=(0,r.$t)(e);if(!t||0===t.length)return{facetsData:{},facetsConfigs:[s]};const c=t.type?t.type.values.filter((0,i.kuw)(e)):[],u=(0,r.Uv)(e,c,n),p=(0,a.pipe)((0,a.dissoc)("type"),a.values,(0,a.reduce)((e=>{const t=l(e);return(e,n)=>{const r=t(n);return r&&!e.find((0,a.propEq)("fieldName",n.fieldName))?[...e,r]:e}})(u),[s]))(t);return{facetsConfigs:p,facetsData:(0,a.pipe)((0,a.evolve)({type:(0,a.assoc)("values",c)}),(0,a.filter)(o(p)),(0,a.map)((0,a.omit)(["entityTypeUri"])))(t)}})(e,u,n),m){const t=m.tabs||{};Object.keys(t).forEach((n=>{t[n]=(t[n]||[]).map((t=>I({},t,{attrType:t.attrType?(0,i.zeJ)(e,t.attrType.uri)||t.attrType:void 0})))})),y.view={searchResultsMode:m.searchResultsMode||v.cp,entityTypeTab:m.entityTypeTab,sortField:m.sortField,sortOrder:m.sortOrder,searchResultsColumns:t,previewPanelMode:m.previewPanelMode||null}}return h&&(y.currentSavedSearchUri=h),g&&(y.currentTenant=g),y},k=(e,t,n,o,s)=>{const{facets:c={},advanced:m,view:h,curSavedSearchUri:g,useSeparateGroups:y}=t,b={keyword:(0,i.ERZ)(t),searchOptions:x(m)},E=((e,t,n)=>{const o=(0,r.$t)(e);if(!n||(0,a.isEmpty)(n))return{facetsData:{},facetsConfigs:[o]};const[s,c]=(0,a.partition)((e=>"tenants"===e.fieldName),n),m=(0,a.path)([0,"currentTenant"],s),[f,h]=(0,a.partition)((e=>"type"===e.fieldName),c),g=(0,a.chain)((0,a.propOr)([],"values"),f),y=(0,a.compose)(l,r.Uv)(e,g,t),b=(0,i.Jso)(h),E=(0,a.either)((0,a.pipe)((0,a.prop)("filter"),a.isNil),(0,a.propEq)("filter","equals")),v=b.some((e=>!y(e)||!E(e)));if(v)return{currentTenant:m,advanced:b.reduce(p(e),{entityTypes:g,searchParams:[]}),facetsConfigs:[],facetsData:{}};{const e=u(b),t=[o,...e.map(y)];return{currentTenant:m,facetsConfigs:t,facetsData:[...f,...e].reduce(d(t),{})}}})(e,o,c),{currentTenant:C,advanced:O}=E,F=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(E,["currentTenant","advanced"]),_=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{searchParams:o=[],fastSearchParams:s=[],entityTypes:c=[]}=r,u=[...o,...s].map(T(e,t,n,(0,i.Ug0)(e,c))).filter((e=>e&&e.data)),p=(0,a.curry)(((e,t)=>({id:f()(),operator:e,attributes:t,entityTypes:c}))),d=l?u.map((0,a.pipe)(i.FTe,p(v.YL.value))):(0,i.FTe)(p(v.qx.value,u));return(0,a.pipe)((0,i.CMB)(e),i.yRD,(0,a.reject)(i.qIF))(d)}(e,o,s,m||O,y);if(_.some((e=>{let{attributes:t}=e;return t.length}))){const{facetsData:t,facetsConfigs:n}=F,l=n.reduce(((e,n)=>I({},e,{[n.fieldName]:(0,r.DV)(n.fieldName,t[n.fieldName])})),{}),i=(0,w.h)(e,o,Object.values((0,P.t8)(l,n)));b.advanced=i.length>0?(k=_,D=i,(0,a.prop)("attributes",D.find((e=>e.attributes))).map((e=>k[0].attributes.push(e))),k):_}else b.facets=F;var k,D;return h&&(b.view=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{mode:r,tabs:l=[]}=t,{allowedEntityTypes:i}=n;return{searchResultsMode:S[r]||v.cp,previewPanelMode:A[r]||null,entityTypeTab:(0,a.propOr)(null,"entityTypeUri",N(l)),sortField:"label",sortOrder:"asc",searchResultsColumns:R(e,i,l)}}(e,h,n)),g&&(b.currentSavedSearchUri=g),C&&(b.currentTenant=C),b},D=(e,t,n,r,a)=>{try{const{version:l}=t;return"2.0"===l?_(e,t,r,a):k(e,t,n,r,a)}catch(e){return console.warn("Can't parse search state",e),{errors:Array.isArray(e)?e:[e]}}}},14476:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(17440),a=n(52180),l=n(99493),i=n(55639);const o=e=>{const t=(0,i.Oz)(e),n=(e,n)=>t.toFixed(t.div(t.minus(e,n.offset),n.ratio),0);return{NumMath:t,getRange:(e,n)=>{const a=(0,r.pathOr)((0,r.pathOr)(null,["value",0],(0,r.head)(n)),[0,0],e),l=(0,r.pathOr)((0,r.pathOr)(null,["value",1],(0,r.last)(n)),[0,1],e);return null===a||null===l?[]:t.lessThanOrEqualTo(a,l)?[a,l]:[l,a]},formatNumberForRangeFacet:e=>t.greaterThan(e,1e4)?(0,i.k7)(e,1e4):e.toString(),getBarDomain:e=>e.length>0?[(0,r.head)(e).value[0],(0,r.last)(e).value[1]]:[],calcScale:(t,n)=>{if("Long"===e){const e=n.minus(t),r=e.div(2).gt(Number.MAX_SAFE_INTEGER)?new a.Decimal(Number.MAX_SAFE_INTEGER).mul(2).div(e):1,l=t.mul(r),i=n.mul(r);return{ratio:r,offset:l.lt(Number.MIN_SAFE_INTEGER)?new a.Decimal(Number.MIN_SAFE_INTEGER).minus(l):i.gt(Number.MAX_SAFE_INTEGER)?new a.Decimal(Number.MAX_SAFE_INTEGER).minus(i):0}}return{ratio:1,offset:0}},revertScale:n,applyScale:(e,n)=>Number(t.plus(t.mul(e,n.ratio),n.offset)),bigNumbersTickFormatterX:(e,t)=>r=>e(n(r,t)),adjustRange:(e,n,a)=>{const l=e[0],i=e[1];return[(0,r.isNil)(n)?l:t.max(l,n),(0,r.isNil)(a)?i:t.min(i,a)]},equals:function(){return t.equals(...arguments)},addRanges:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0;if(0===e.length)return[];const i=e[0].value,o=e[e.length-1].value,s=t.greaterThan(i,n)?(0,r.unfold)((e=>!!t.lessThan(e,i)&&[{value:e,number:0},t.plus(e,l)]),n):[],c=t.lessThan(o,t.minus(a,l))?(0,r.unfold)((e=>!!t.lessThanOrEqualTo(e,a)&&[{value:e,number:0},t.plus(e,l)]),t.plus(o,l)):[];return[...s,...e,...c]},getInterval:function(n,r){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;return n===r?1:(0,l.Wos)(e)?(r-n)/a:t.ceil(t.div(t.minus(r,n),a))}}}},68973:(e,t,n)=>{n.d(t,{aG:()=>E,kH:()=>y,aw:()=>N,ti:()=>x,_9:()=>w,dW:()=>R,_k:()=>F,XP:()=>h,Jk:()=>V,_e:()=>g,rN:()=>I,P9:()=>D,eQ:()=>j,s4:()=>_,Bo:()=>T,Es:()=>k,kx:()=>O,cI:()=>C,hW:()=>A,qD:()=>d,$9:()=>S});var r=n(17440),a=n(99493),l=n(55639),i=n(34126);const o=(0,r.pipe)((e=>i.stringify(e,{strict:!1})),(e=>e?`?${e}`:""));var s=n(24097);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const d=e=>e.values&&e.values.length||e.rawFilter,m=e=>e.dataTenant?[{filter:"equals",fieldName:e.dataTenantFieldName,values:[e.dataTenant]}]:[],f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[(0,r.prop)("fieldNameForRequest"),t=>{let{fieldNameForRequest:n}=t,l=p(t,["fieldNameForRequest"]);const i=(0,r.cond)([...e,...a.LMI])(c({},l,{fieldName:n}));return(0,r.pipe)((0,a.Uqd)(),a.$bd)([{rawFilter:i},...m(l)])}]},h=(0,a.Uqd)([f()]),g=(0,r.pipe)((0,r.filter)(d),a.h27),y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{sortOrder:n,sortField:l,select:i,forceOvOnly:c,searchOptions:u,activityFilter:p,globalFilter:d}=t,m=(0,r.pipe)(h,(0,a.vyX)(d))(e),f=t.page||0,g=t.rowsPerPage||s.Tu[0],y={filter:m||void 0,select:v(e,p,i),max:g,offset:f*g,sort:l||void 0,order:n||void 0,scoreEnabled:!1,options:(c?b(u,"ovOnly"):u)||void 0,activeness:p||void 0};return`entities${o(y)}`},b=(e,t)=>{const n=(e=e||"").split(",").filter(r.identity);return n.includes(t)?e:n.concat(t).join(",")},E=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{select:r,searchOptions:a,activityFilter:l}=n,i={select:v(t,l,r),uris:e,options:b(a,"ovOnly")};return{url:"entities/_byUris",options:{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}}},v=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const l=s.Tv.concat(n);return t&&t!==a.YJ7.ACTIVE_ONLY&&l.push("startDate","endDate"),(0,r.uniq)(l).join(",")},T=(0,r.propOr)([],"businessCardAttributeURIs"),C=(0,r.compose)(r.flatten,(0,r.map)((e=>[e.latitude,e.longitude])),(0,r.propOr)([],"geoLocationAttributes")),O=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const l=a.wSh.fromNull(t.find((e=>"type"===e.fieldName&&e.values.length))).map((0,r.prop)("values")).orSome((0,r.pluck)("uri",e.entityTypes)),i=l.map((t=>{const r=(0,a.nt9)(e,t);return n.reduce(((e,t)=>e.concat(t(r))),[]).map(S)}));return(0,r.uniq)((0,r.flatten)(i).map(A))},S=a.Tde,A=(0,r.pipe)((0,r.split)("."),(0,r.slice)(0,2),(0,r.join)(".")),N=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{searchOptions:s,activityFilter:u,globalFilter:p}=l,d=1===e.length?m(e[0]):[],f=(0,r.pipe)((0,r.filter)((e=>e.forceInclude||!n.includes(e.fieldName))),(0,r.concat)(r.__,d),h,(0,a.vyX)(p))(t),g=e.map((e=>{const t={fieldName:e.fieldNameForRequest||e.fieldName,pageSize:e.pageSize,pageNo:1,orderType:e.orderType};return e.disableIncludeFilter||(t.includeFilter=e.includeFilter||e.values),t})),y=c({filter:f||void 0,options:s||void 0,activeness:u||void 0},i);return{url:`entities/_facets${o(y)}`,options:{method:"POST",body:JSON.stringify(g),headers:{"Content-Type":"application/json"}}}},R=function(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=(0,l.zj)(),c=(0,l.dy)(),u=P(e,t,n,r,a,i);return`api/${s}/${c}/entities/potentialMatches${o(u)}`},w=function(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=(0,l.zj)(),c=(0,l.dy)(),u=P(e,t,n,r,a,i);return`api/${s}/${c}/entities/matchScores${o(u)}`},P=(e,t,n,r,a,l)=>{const{searchOptions:i,activityFilter:o,globalFilter:s,dataTenant:c}=l;return{filter:F(r,a,s)||void 0,options:i||void 0,from:e,to:t,bars:n,activeness:o||void 0,dataTenant:c}},x=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{searchOptions:a,activityFilter:l,globalFilter:i}=r,s=p(r,["searchOptions","activityFilter","globalFilter"]),u=F(t.concat(m(e)),n,i),d={filter:u||void 0,options:a||void 0,activeness:l||void 0},f=[c({fieldName:e.fieldNameForRequest||e.fieldName,facetType:"histogram"},s)];return{url:`entities/_facets${o(d)}`,options:{method:"POST",body:JSON.stringify(f),headers:{"Content-Type":"application/json"}}}},I=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{searchOptions:a,activityFilter:l,globalFilter:i}=r,s=F(t.concat(m(e)),n,i),c={filter:s||void 0,options:a||void 0,activeness:l||void 0},u=[{fieldName:e.fieldNameForRequest||e.fieldName,facetType:"stats"}];return{url:`entities/_facets${o(c)}`,options:{method:"POST",body:JSON.stringify(u),headers:{"Content-Type":"application/json"}}}},F=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return(0,r.pipe)((0,r.filter)((e=>e.forceInclude||!t.includes(e.fieldName))),h,(0,a.vyX)(n))(e)},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{searchOptions:r,activityFilter:a,globalFilter:l}=n,i=F(e,t,l),s={filter:i||void 0,options:r||void 0,activeness:a||void 0};return o(s).slice(1)};function k(e){let{searchRequest:t,url:n,options:r,dataTenant:i,customerTenant:o,dtssPath:s}=e;return i?(0,a.yaA)({requestProvider:t,url:n,options:r,dataTenant:i,customerTenant:o,dtssPath:s}):t(`api/${(0,l.zj)()}/${o}/${n}`,r)}const D=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const r=_(e,t,n);return"entities/_total"+(r?`?${r}`:"")},j=e=>`api/${(0,l.zj)()}/${(0,l.dy)()}/entities/_total?${e}`,H=(0,r.path)(["data","attrType","type"]),L=(e,t)=>{let{orGroupIndex:n=0}=e;const{filters:l}=e,{values:i,filter:o,operator:s}=t;(0,a.jgw)(s)&&(n=(0,r.inc)(n));const c=(0,r.pathOr)({},["filters",n],e),u={filter:o,fieldName:(0,r.path)(["data","fieldName"],t),fieldNameForRequest:(0,r.path)(["data","fieldNameForRequest"],t),dataTenant:(0,r.path)(["data","dataTenant"],t),dataTenantFieldName:(0,r.path)(["data","dataTenantFieldName"],t),values:B(i),type:H(t),operator:s},p=(0,a.i29)(u);return c[p]=(0,r.concat)((0,r.propOr)([],p,c),[u]),{orGroupIndex:n,filters:(0,r.assoc)(n,c,l)}},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>e||(0,a.RsS)(t.children)||M(t.children)),!1)},U=e=>(t,n)=>{const l=(0,r.values)(n).map((t=>{const n=(0,r.path)([0,"operator"],t),l=(0,r.pipe)(a.M7o,a.h27)(t);return!e&&M(l)?{filter:t,operator:(0,r.cond)([[a.mfm,(0,r.always)("and")],[a.jgw,r.identity],[r.T,(0,r.always)(null)]])(n)}:{filter:t,operator:n}}));return(0,r.append)(l,t)},z=(e,t)=>({operand:e,operator:t}),G=(0,r.both)((0,r.propSatisfies)((0,r.lt)(1),"length"),(0,r.propSatisfies)(Array.isArray,0)),W=[[(0,r.propEq)("fieldName","rdmLookups.resolved"),e=>{let{fieldName:t,values:n}=e;return(0,a.sPt)({filter:a.j5E.EQUALS,fieldName:t,values:[!n[0]]})}],[(0,r.allPass)([(0,r.propEq)("filter",a.j5E.EQUALS),(0,r.propSatisfies)(G,"values"),(0,r.complement)((0,r.propEq)("fieldName","type")),(0,r.propSatisfies)((0,r.complement)(a.Lt4),"type")]),e=>{let{fieldName:t,values:n}=e;return(0,r.pipe)((0,r.map)((e=>e.length>1?(0,a.sH1)({fieldName:t,values:e,filter:"listEquals"}):(0,a.sPt)({fieldName:t,values:e,filter:"equals"}))),(0,a.v0l)(" and "))(n)}]],q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{const r=[...W,...e];return n.map((e=>z((0,a.Uqd)([f(r),...r],t)(e.filter),e.operator)))}},B=(0,r.pipe)((0,r.defaultTo)([]),(0,r.map)((0,r.when)((0,r.has)("value"),(0,r.prop)("value")))),Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[{filter:"equals",fieldName:"type",values:t}],r=(0,a.Uqd)()(n);return r+(r&&e?` and ${(0,a.$bd)(e)}`:e)},Y=e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])),V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const l=e.map((0,r.evolve)({attributes:a.rxg})).filter(a.gk1).map((e=>{const l=(0,r.pipe)((0,r.prop)("attributes"),(0,r.filter)(a.Bgb),(0,r.reduce)(L,{filters:[]}),(0,r.prop)("filters"),Y,(0,r.reduce)(U(n),[]),(0,r.map)(q(t,n)),r.flatten,(0,r.filter)((e=>e.operand)),(0,r.map)((0,r.evolve)({operand:e=>(0,a.$bd)(e,!1)})),a.bji,a.fgW)(e);return z(Z(l,e.entityTypes),e.operator)})).filter((e=>e.operand));return(0,r.pipe)((0,r.ifElse)((0,r.pipe)(r.length,(0,r.lt)(1)),(0,r.map)((e=>z((0,a.$bd)(e.operand),e.operator))),r.identity),a.fgW)(l)}},67679:(e,t,n)=>{n.d(t,{gj:()=>d,kF:()=>f,oq:()=>h,oX:()=>g,m5:()=>b,wM:()=>O,nx:()=>A,vw:()=>N,tU:()=>R});var r=n(17440),a=n(87918),l=n.n(a),i=n(99493),o=n(24097),s=n(55639),c=n(68973),u=n(7066);function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>e===o.ll.TABLE,m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=i.wSh.fromNull((0,i.nt9)(e,t)).orSome({});return g(n).concat(y((r.attributes||[]).concat(r.analyticsAttributes||[])))})),f=(0,r.memoizeWith)(((e,t)=>(0,s.Lt)(t)),m(r.__,r.__,["label"])),h=(e,t,n)=>n&&T(f(e,t),(e=>!n.some((t=>e.id===t.id)))),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[{id:"label",label:l().text("Profile")},{id:"entityId",label:l().text("Entity ID")}].filter((t=>!e.includes(t.id)))},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter(i.Uty).map((e=>{const t={id:(0,c.$9)(e.uri),label:e.label||(0,i.nIW)(e.uri),attrType:e},n=e.attributes||e.analyticsAttributes;return"Nested"===e.type&&n&&(t.children=y(n)),t}))},b=(e,t)=>{const n=E(e,t);return v(n)},E=(e,t)=>{let n=null;const r=e=>{e.some((e=>e.id===t?(n=e,!0):e.children?r(e.children,t):void 0))};return r(e),n},v=e=>(0,r.flatten)((e.children||[]).map((e=>e.children?v(e):[e]))),T=(e,t)=>e.filter(t).map((e=>e.children?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){p(e,t,n[t])}))}return e}({},e,{children:T(e.children,t)}):e)),C=(e,t,n)=>{const a=m(e,t);return(0,r.uniq)((0,r.pipe)((0,r.concat)(["label"]),(0,r.map)((e=>E(a,e))),(0,r.reject)(r.isNil),(0,r.filter)((0,r.pipe)((0,r.prop)("attrType"),(0,r.complement)(i.QZu))))(n))},O=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,u.wW)(e,{},t),l=(0,r.prop)("*",n);return a.reduce(((t,a)=>{const i=n[a.value]||l;return t[a.value]=(0,r.isNil)(i)?g():C(e,a.value,i),t}),{})},S=e=>(t,n)=>e.indexOf(t.value)-e.indexOf(n.value),A=function(e){let{entityTypes:t}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const l=(0,r.pluck)("uri",t),i=S(l),o=S(a),s=n.filter((e=>{let{value:t}=e;return 0===a.length||a.includes(t)}));return(0,r.sort)(0===a.length?i:o,s)},N=e=>{const t=g();return(0,r.uniq)(e.filter((e=>!t.find((t=>t.id===e.id)))).map((0,r.pipe)((0,r.prop)("id"),c.hW)))},R=(e,t)=>{const n=N(e),a=N(t);return!(0,r.equals)((0,r.intersection)(n,a),n)}},28527:(e,t,n)=>{n.d(t,{v6:()=>a,cN:()=>i,al:()=>o,E7:()=>s});let r={};const a=e=>r=e,l=e=>r[e],i=()=>l("apiPath"),o=()=>l("imagePath"),s=()=>l("maxRecommended")||5},86564:(e,t,n)=>{n.d(t,{rp:()=>o,tj:()=>s,mH:()=>c,eX:()=>u,T4:()=>p});var r=n(585),a=n(99493),l=n(87918),i=n.n(l);const o=e=>{console.error(e),r.Z.addError({title:i().text("Server Error"),message:i().text("Something went wrong...")})},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];console.error(e),r.Z.addError({title:i().text("Error"),message:i().text("Can't apply search state")})},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];console.error(e),r.Z.addError({title:i().text("Error"),message:i().text("Saved Search can't be applied")})},u=e=>{console.error(e),r.Z.addError({title:i().text("Import Error"),message:i().text("Record can't be imported")})},p=e=>{console.error(e),r.Z.addError({title:i().text("Error"),message:(0,a.xU7)(e,i().text("Can't load entity"))})}},55639:(e,t,n)=>{n.d(t,{Lt:()=>$,XY:()=>X,k7:()=>V,zj:()=>Y,Oz:()=>J,dy:()=>Z,l0:()=>K,ZT:()=>Q,Uw:()=>B,sR:()=>W});var r={};n.r(r),n.d(r,{ceil:()=>T,clamp:()=>A,div:()=>f,equals:()=>S,floor:()=>v,greaterThan:()=>g,greaterThanOrEqualTo:()=>y,lessThan:()=>b,lessThanOrEqualTo:()=>E,max:()=>O,min:()=>C,minus:()=>m,mul:()=>h,plus:()=>d,toFixed:()=>N});var a={};n.r(a),n.d(a,{ceil:()=>j,clamp:()=>U,div:()=>P,equals:()=>M,floor:()=>D,greaterThan:()=>I,greaterThanOrEqualTo:()=>F,lessThan:()=>_,lessThanOrEqualTo:()=>k,max:()=>L,min:()=>H,minus:()=>w,mul:()=>x,plus:()=>R,toFixed:()=>z}),n(34126);var l=n(17440),i=n(28140),o=n(87918),s=n.n(o),c=n(95038),u=n.n(c),p=n(52180);const d=(e,t)=>new p.Decimal(e).add(t),m=(e,t)=>new p.Decimal(e).sub(t),f=(e,t)=>new p.Decimal(e).div(t),h=(e,t)=>new p.Decimal(e).mul(t),g=(e,t)=>(0,p.Decimal)(e).greaterThan(t),y=(e,t)=>new p.Decimal(e).greaterThanOrEqualTo(t),b=(e,t)=>new p.Decimal(e).lessThan(t),E=(e,t)=>new p.Decimal(e).lessThanOrEqualTo(t),v=e=>new p.Decimal(e).floor(),T=e=>new p.Decimal(e).ceil(),C=(e,t)=>p.Decimal.min(e,t),O=(e,t)=>p.Decimal.max(e,t),S=(e,t)=>new p.Decimal(e).equals(t),A=(e,t,n)=>{if(new p.Decimal(e).gt(t))throw new Error("min must not be greater than max in clamp(min, max, value)");const r=new p.Decimal(n);return r.lt(e)?e:r.gt(t)?t:n},N=(e,t)=>new p.Decimal(e).toFixed(t),R=(e,t)=>Number(e)+Number(t),w=(e,t)=>e-t,P=(e,t)=>e/t,x=(e,t)=>e*t,I=(e,t)=>Number(e)>Number(t),F=(e,t)=>Number(e)>=Number(t),_=(e,t)=>Number(e)<Number(t),k=(e,t)=>Number(e)<=Number(t),D=e=>Math.floor(e),j=e=>Math.ceil(e),H=(e,t)=>Math.min(e,t),L=(e,t)=>Math.max(e,t),M=(e,t)=>e===t,U=(e,t,n)=>(0,l.clamp)(Number(e),Number(t),Number(n)),z=(e,t)=>Number(e).toFixed(t);let G;const W=e=>{G=e};let q;const B=e=>{q=e},Z=()=>G,Y=()=>q||"",V=((0,l.compose)(JSON.parse,JSON.stringify),(e,t)=>{if(!(0,i.hj)(e))return"";const n=J(p.Decimal.isDecimal(e)&&"Long");return n.lessThanOrEqualTo(e,Number.MAX_SAFE_INTEGER)&&n.greaterThanOrEqualTo(e,Number.MIN_SAFE_INTEGER)?n.greaterThan(e,t||1e3)?s().number(e,"0,0.0a").toUpperCase():s().number(e,"0,0[.]0"):n.greaterThan(e,t||1e3)?s().number(n.div(e,1e12),"0,0.0")+"T":e.toString()}),$=e=>`${Z()}_${Y()}_${e}`,X=e=>e.format(u().localeData().longDateFormat("L")),J=e=>"Long"===e?r:a,Q=()=>{},K=(0,l.memoizeWith)(l.identity,(e=>[e]))},19672:(e,t,n)=>{n.d(t,{Ic:()=>a,ET:()=>i});const r=(e,t)=>({get:e,set:t,compose:n=>r((t=>n.get(e(t))),((r,a)=>t(r,n.set(e(r),a))))}),a=e=>r((t=>t[e]),((t,n)=>Object.assign({},t,{[e]:n}))),l=e=>{return"string"==typeof e?a(e):(t=e,r((e=>e[t]),((e,n)=>((e=[...e])[t]=n,e))));var t},i=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.length?l(e).compose(i(...n)):l(e)}},28140:(e,t,n)=>{n.d(t,{Kn:()=>r,hj:()=>a});const r=e=>"object"==typeof e&&null!==e,a=e=>!isNaN(parseFloat(e))&&isFinite(e)},7043:(e,t,n)=>{n.d(t,{Z:()=>r});const r={container:"Headers-styles-container--xVHUC",title:"Headers-styles-title--2f-Hk",actionsBar:"Headers-styles-actionsBar--3znSF",splitter:"Headers-styles-splitter--2cuCI",headerIcon:"Headers-styles-headerIcon--24r6n",previewSwitcher:"Headers-styles-previewSwitcher--IJ7aJ",tabsContainer:"Headers-styles-tabsContainer--33mAP",number:"Headers-styles-number--1bDWm"}}}]);