@reltio/remotes 1.4.1621 → 1.4.1623

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/1039.js +1 -1
  2. package/1146.js +1 -1
  3. package/1148.js +1 -1
  4. package/1334.js +1 -1
  5. package/1425.js +1 -1
  6. package/1572.js +1 -1
  7. package/1572.js.map +1 -1
  8. package/1664.js +1 -1
  9. package/1707.js +1 -1
  10. package/1790.js +1 -1
  11. package/1840.js +1 -1
  12. package/1925.js +1 -1
  13. package/1925.js.map +1 -1
  14. package/2049.js +1 -1
  15. package/2066.js +1 -1
  16. package/2066.js.map +1 -1
  17. package/2201.js +1 -1
  18. package/2400.js +1 -1
  19. package/2400.js.map +1 -1
  20. package/2404.js +1 -1
  21. package/2404.js.map +1 -1
  22. package/2463.js +1 -1
  23. package/2641.js +1 -1
  24. package/2641.js.map +1 -1
  25. package/3096.js +1 -1
  26. package/3348.js +1 -1
  27. package/3358.js +1 -1
  28. package/3358.js.map +1 -1
  29. package/3373.js +1 -1
  30. package/3381.js +1 -1
  31. package/3383.js +1 -1
  32. package/3463.js +1 -1
  33. package/3469.js +1 -1
  34. package/3538.js +1 -1
  35. package/3538.js.map +1 -1
  36. package/356.js +1 -1
  37. package/3875.js +1 -1
  38. package/3902.js +1 -1
  39. package/3902.js.map +1 -1
  40. package/3926.js +1 -1
  41. package/3926.js.map +1 -1
  42. package/415.js +1 -1
  43. package/4212.js +1 -1
  44. package/4390.js +1 -1
  45. package/4481.js +1 -1
  46. package/4703.js +1 -1
  47. package/4780.js +1 -1
  48. package/4806.js +1 -1
  49. package/4838.js +1 -1
  50. package/50.js +1 -1
  51. package/5034.js +1 -1
  52. package/5039.js +1 -1
  53. package/5053.js +1 -1
  54. package/5108.js +1 -1
  55. package/5163.js +1 -1
  56. package/5163.js.map +1 -1
  57. package/5617.js +1 -1
  58. package/6020.js +1 -1
  59. package/6173.js +1 -1
  60. package/6228.js +1 -1
  61. package/6280.js +1 -1
  62. package/6287.js +1 -1
  63. package/6531.js +1 -1
  64. package/6606.js +1 -1
  65. package/6606.js.map +1 -1
  66. package/6799.js +1 -1
  67. package/6844.js +1 -1
  68. package/6853.js +1 -1
  69. package/6860.js +1 -1
  70. package/6903.js +1 -1
  71. package/7340.js +1 -1
  72. package/735.js +1 -1
  73. package/7422.js +1 -1
  74. package/7626.js +1 -1
  75. package/764.js +1 -1
  76. package/7896.js +1 -1
  77. package/8168.js +1 -1
  78. package/820.js +1 -1
  79. package/8207.js +1 -1
  80. package/8322.js +1 -1
  81. package/8481.js +2 -0
  82. package/8481.js.map +1 -0
  83. package/8565.js +1 -1
  84. package/8741.js +1 -1
  85. package/9016.js +1 -1
  86. package/9028.js +1 -1
  87. package/9028.js.map +1 -1
  88. package/9283.js +1 -1
  89. package/9309.js +1 -1
  90. package/9328.js +1 -1
  91. package/9387.js +1 -1
  92. package/9719.js +1 -1
  93. package/9736.js +1 -1
  94. package/9861.js +1 -1
  95. package/987.js +1 -1
  96. package/99.js +1 -1
  97. package/9945.js +2 -0
  98. package/9945.js.map +1 -0
  99. package/9960.js +1 -1
  100. package/main.js +1 -1
  101. package/package.json +1 -1
  102. package/remoteEntry.js +1 -1
  103. package/remoteEntry.js.map +1 -1
  104. package/3727.js +0 -2
  105. package/3727.js.map +0 -1
  106. package/673.js +0 -2
  107. package/673.js.map +0 -1
package/1925.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1adb21f4-ab94-4704-ad01-48c7dcd4a8b5",e._sentryDebugIdIdentifier="sentry-dbid-1adb21f4-ab94-4704-ad01-48c7dcd4a8b5")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1622"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1925],{153:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(89323);const s=(0,n(72342).makeStyles)({dragHandleContainer:{position:"relative",width:"100%",height:"inherit"},dragHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"12px",zIndex:11,visibility:"hidden","&:hover $dragHandle":{visibility:"visible"},".react-draggable &":{visibility:"visible"}},dragHandle:{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)",fontSize:"20px"}}),c=e=>{const t=t=>{const n=s();return a().createElement("div",{className:n.dragHandleContainer},a().createElement("div",{className:n.dragHandleVisibilityArea},a().createElement("div",{className:i()("viewDraggableHandle",n.dragHandle)},a().createElement(l.Z,{className:n.dragIcon}))),a().createElement(e,t))};return t.displayName="WithDragHandle",t}},33903:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(2507),s=n.n(l),c=n(87037),p=n(92679),u=n(23883);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=e=>a().createElement("svg",d({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),g=(0,n(72342).makeStyles)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const r=g();return a().createElement(u.Z,{title:t?s().text("Clear all filters"):s().text("Filter")},a().createElement(c.Z,{onClick:n,classes:{root:r.button},size:"large"},t?a().createElement(a().Fragment,null,a().createElement(m,{className:r["filterIcon--enabled"]}),a().createElement(p.default,{color:"primary",className:r.closeIcon})):a().createElement(m,null)))};f.propTypes={enabled:i().bool,onClick:i().func};const h=f},7882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);class o extends a().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},46804:(e,t,n)=>{"use strict";n.d(t,{i:()=>h});var r=n(24328),a=n.n(r),o=n(2507),i=n.n(o),l=n(50914),s=n(92679),c=n(87037),p=n(24394),u=n(30680),d=n(31563),m=n(40435),g=n(79573);const f=(0,n(72342).makeStyles)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{maxWidth:"350px",flex:"1 0 200px",marginLeft:"20px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),h=e=>{let{query:t,onChange:n}=e;const[o,h]=(0,r.useState)(t),[y,b]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{h(t)}),[t]);const v=f();return y?a().createElement(p.Z,{className:v.input,value:o,autoFocus:!0,placeholder:i().text("Search"),disableUnderline:!0,onChange:(0,l.pipe)(g.NA,h),startAdornment:a().createElement(u.Z,{position:"start"},a().createElement(d.default,{className:v.startAdornment})),endAdornment:a().createElement(u.Z,{position:"end"},a().createElement(m.Z,{size:"S",icon:s.default,onClick:(0,l.pipe)(l.F,b,(0,l.always)(""),(0,l.tap)(n),h)})),onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),(0,l.pipe)((0,l.always)(o),l.trim,n))}):a().createElement(c.Z,{className:v.searchButton,onClick:(0,l.pipe)(l.T,b),size:"large"},a().createElement(d.default,null))}},58003:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(24328),a=n.n(r),o=n(44443);const i=()=>a().createElement("div",{style:{display:"none"}}),l=e=>{let{widthToHide:t,children:n}=e;return a().createElement(o.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?a().createElement(a().Fragment,null,n):a().createElement(i,null)}})}},97287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(95341),i=n(82056),l=n(79573);const s=(0,n(72342).makeStyles)((()=>({menuItem:{whiteSpace:"inherit",width:200,padding:"9px 12px 7px"},itemText:{margin:0},textPrimary:{fontSize:14,lineHeight:"16px",fontWeight:500},textSecondary:{fontSize:10,lineHeight:"12px"}}))),c=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=l.ZT}=e;const c=s(),{primary:p,secondary:u,onClick:d}=n;return a().createElement(o.Z,{className:c.menuItem,ref:t,onClick:()=>{r(),d()}},a().createElement(i.Z,{primary:p,secondary:u,className:c.itemText,classes:{primary:c.textPrimary,secondary:c.textSecondary}}))}));c.displayName="MultilineMenuItem";const p=c},20200:(e,t,n)=>{"use strict";n.d(t,{M:()=>m});var r=n(24328),a=n.n(r),o=n(17512),i=n(71153),l=n.n(i),s=n(56961),c=n(8419),p=n(23074),u=n(51277);const d=(0,n(72342).makeStyles)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1,paddingBottom:"8px",paddingTop:"8px"},rulesContainer:{paddingLeft:"52px",marginBottom:"8px",display:"flex",alignItems:"center"},dividerWrapper:{marginLeft:"12px",alignSelf:"stretch"},divider:{borderColor:"rgba(0,0,0,0.12)"},relevanceBadge:{marginLeft:"12px"}}),m=e=>{var t;let{children:n,entitiesMap:r,entity:i,match:m,metadata:g,className:f}=e;const h=d(),y=null===(t=m.matchRuleSummaries)||void 0===t?void 0:t.some(o.KB$);return a().createElement("div",{className:l()(h.root,f)},a().createElement("div",{className:h.profileCardWrapper},a().createElement(c.Z,{entity:m.object,classes:{container:h.profileCardContainer}}),n),a().createElement("div",{className:h.rulesContainer},m.matchRules&&a().createElement(p.Z,{match:m,metadata:g,entitiesMap:r,entity:i}),y&&a().createElement(a().Fragment,null,a().createElement("div",{className:h.dividerWrapper},a().createElement(s.Z,{orientation:"vertical",className:h.divider})),a().createElement(u.Z,{className:h.relevanceBadge,matchRuleSummaries:m.matchRuleSummaries}))))}},821:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),o=n(2507),i=n.n(o),l=n(13980),s=n.n(l),c=n(71153),p=n.n(c),u=n(50914),d=n(38677),m=n(56961),g=n(79312),f=n(17512),h=n(50673),y=n(85596),b=n(93555),v=n(72283),E=n(76141),w=n(50548),x=n(43460),k=n(40941);const O=(0,n(72342).makeStyles)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px",overflowX:"hidden"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},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 P(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){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T=e=>{let{connection:t,modifiedEntity:n,initialConnection:o,initialModifiedEntity:l,allModifiedEntities:s,dispatch:c,config:w,mode:x,metadata:S,globalSearchRequestOptions:T,error:C,highlightedError:I}=e;const{relationUri:R,relationType:N,direction:L}=t.relation,M=t.isNew,D=O(),{ref:j,errorClassName:A}=(0,k.B)({highlightedError:I,isSimple:!0}),{inRelations:V=[],outRelations:_=[]}=(0,r.useMemo)((()=>(0,f.ocC)({content:t.parentEntityUri?w.contentSecondLevel:w.content,direction:L,relationType:N,mode:x,metadata:S})),[w,L,N,x,S,t.parentEntityUri]),Z=(0,r.useMemo)((()=>(0,f.xF8)(S,N)),[N,S]),U=(0,r.useMemo)((()=>P({attributes:P({},h.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,f.p2l)(t.relation))),[t]),W=(0,r.useMemo)((()=>(0,f.SAs)(s,n)),[s,n]),z=(0,r.useRef)([]),F=(0,r.useCallback)(((e,t)=>{c(h.N5.relations.actions.setInitialInfo(w.id,R,e,t))}),[c]);(0,r.useEffect)((()=>{o||F(n,t)}),[]),(0,r.useEffect)((()=>{z.current=(0,u.pipe)((0,u.concat)(W.map((0,u.prop)("uri"))),u.uniq)(z.current)}),[W]);const B=(0,r.useRef)(W),H=(0,f.z7d)(V,_),$=(0,u.pick)(["entity","relation"],o||{}),G=(0,u.pick)(["entity","relation"],t),q=!(0,f.O27)((0,u.path)(["entity"],t))&&(!(0,u.equals)($,G)||!(0,u.equals)(l,n)||(Y=B.current,X=W,Y.length!==X.length||Y.some(((e,t)=>Y[t]!==X[t]))));var Y,X;const K=M?h.N5.relations.actions.addRelation:h.N5.relations.actions.editRelation,Q=(0,r.useCallback)((0,u.pipe)(h.N5.relations.actions.setRelationType(w.id,R),c),[w,R,c]),J=(0,r.useCallback)((()=>(0,u.pipe)(h.N5.relations.actions.closeRelationEditor,c)(w.id,R)),[w,R,c]),ee=(0,r.useCallback)((e=>{if(n){const t=(0,f.nt9)(S,n.type);return(0,f.wx9)(t,n,e)}return e}),[n,S]),te=(0,r.useCallback)((e=>c(h.N5.modifiedEntities.actions.entityCreated(e))),[c]),ne=(0,r.useCallback)((e=>c(h.N5.modifiedEntities.actions.entityDeleted(e))),[c]),re=(0,r.useCallback)((e=>{n&&ne(n.uri),c(h.N5.relations.actions.setRelationEntity(w.id,R,e)),C&&c(h.N5.errors.actions.errorDeactivated((0,f.iFp)(C)))}),[w.id,R,c,n,ne,C]),ae=(0,r.useCallback)((()=>{const e=(0,f.Bd_)(S,s,t);return c(h.N5.errors.actions.errorsSet(e)),0===e.length}),[t,S,s,c]),oe=(0,r.useCallback)((()=>c(h.N5.errors.actions.errorsSet([]))),[c]),ie=(0,r.useCallback)((0,u.pipe)((0,u.always)(t),(0,u.when)(ae,(0,u.pipe)(f.zhn,ee,(0,u.omit)(["initial"]),K(w.id),c,(0,u.always)((0,u.differenceWith)(u.equals,z.current,W.map((0,u.prop)("uri")))),(0,u.forEach)(ne),J))),[t,w,c,ee,ae,W]),le=(0,r.useCallback)((()=>{n!==l&&(l?(te(l),n&&n.uri!==l.uri&&ne(n.uri)):ne(n.uri));const e=B.current;(0,u.differenceWith)(u.equals,z.current,e.map((0,u.prop)("uri"))).forEach(ne),e.forEach(te),oe(),J()}),[J,te,ne,oe,n,l]),se=(0,r.useCallback)((e=>(0,u.pipe)(h.N5.actions.addAttributes,c)(e.map((e=>P({},e,{viewId:w.id}))))),[w.id,c]),ce=(0,r.useCallback)((e=>(0,u.pipe)(h.N5.actions.modifyAttribute,c)(P({},e,{viewId:w.id}))),[w.id,c]),pe=(0,r.useCallback)((e=>(0,u.pipe)(h.N5.actions.removeAttribute,c)(P({},e,{viewId:w.id}))),[w.id,c]),ue=(0,r.useCallback)(((e,t)=>{const n=(0,f.nt9)(S,e),r=(0,u.pipe)(f.wcJ,(0,f._kX)(x))(n),a=(0,f.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:S,mode:x});re(a),te(a)}),[te,re,x,S]),de=(0,f.e$p)(C),me=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=w;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[w,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:D.editor},a().createElement(g.Z,{className:D.title},M?i().text("Add new item"):i().text("Edit item")),null===H&&a().createElement(y.Z,{className:D.item,relation:t.relation,inRelationTypes:V,outRelationTypes:_,onChange:Q}),Boolean(N)&&a().createElement(a().Fragment,null,a().createElement("div",{ref:j,className:A},a().createElement(b.Z,{errorMessage:de},a().createElement(v.Z,{className:p()(D.item,{[D.dense]:de||t.entity&&(0,f.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:me()||[],max:w.max||20,globalSearchRequestOptions:T,mode:x,onChange:re,onCreate:(0,f.fnZ)(x)?void 0:ue,metadata:S,attributeTypesSelectionStrategy:f.wcJ}))),a().createElement(E.Z,{className:D.item,attrTypes:Z,entity:U,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:x,parentUri:R,onAddAttributes:se,onChangeAttribute:ce,onDeleteAttribute:pe}))),a().createElement("div",{className:D.actionButtons},a().createElement(d.Z,{onClick:le},i().text("Cancel")),a().createElement(d.Z,{color:"primary",disabled:!q,onClick:ie},i().text("Apply"))),a().createElement(m.Z,null))};T.propTypes={connection:f.Rjq,modifiedEntity:f.pyR,initialConnection:f.Rjq,initialModifiedEntity:f.pyR,allModifiedEntities:s().object,dispatch:s().func,config:f.PiC,mode:s().string,metadata:f.pGS,globalSearchRequestOptions:s().object,error:f.wfT,parentEntityUri:s().string,highlightedError:s().object};const C=(0,w.l)(x.NY,((e,t)=>{let{connection:n}=t;const{element:r={},type:a}=e||{},{relationUri:o,relationType:i}=n.relation;return{highlightedError:(0,x.Ie)(a)&&(0,f.Wah)(r,o,i)?e:null}}),T);const I=(0,n(52730).connect)(((e,t)=>{const n=(r=t,h.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(e=>h.N5.relations.selectors.getRelationUriFromConnection(e.connection))(t),o=(0,f.ZiX)(n);return{initialConnection:h.ZP.selectors.getInitialConnection(e,t.config.id,a),initialModifiedEntity:h.ZP.selectors.getInitialConnectionTempEntity(e,t.config.id,a),modifiedEntity:o?h.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:o?h.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:h.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,f.ATu)(t.connection,h.ZP.selectors.getProfileErrors(e))}}))(C)},14593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),o=n(66244),i=n.n(o),l=n(44443),s=n(50914),c=n(71153),p=n.n(c);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){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const g=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:i,minHeight:l,maxWidth:s,maxHeight:c,isStatic:p}=e;return{x:t,y:n,w:r,h:a,minW:i,minH:l,maxW:s,maxH:c,i:o,static:p}},f=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:i,minH:l,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:i,minHeight:l,maxWidth:o,maxHeight:s,id:c,isStatic:m(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},h=e=>(e||[]).map(f),y=(0,s.curry)(((e,t)=>(e||[]).find((0,s.propEq)("id",t)))),b=(0,s.curry)(((e,t,n)=>(0,s.mergeAll)([n,(0,s.pick)(e,t)]))),v=(0,s.curry)(((e,t,n)=>(n||[]).map((n=>(0,s.pipe)((0,s.prop)("id"),y(t),(0,s.defaultTo)({}),b(e,s.__,n))(n))))),E=(0,s.curry)(((e,t)=>t.map((n=>{const r=t.filter((e=>e.y===n.y)).map((t=>e[t.id]||!t.autosizing&&t.minHeight||0)),a=Math.max(...r);if(n.height!==a&&a){const e=n.autosizing?{minHeight:a,maxHeight:a}:{};return u({},n,e,{height:a})}return n})))),w=(0,s.curry)(((e,t)=>t.map((t=>{const n=e[t.id];return n&&t.autosizing?u({},t,{minHeight:n,maxHeight:n,height:n}):t}))));var x=n(79573),k=n(72342),O=n(17512);const P=(0,k.makeStyles)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.customView .react-resizable-handle":{width:"10px",height:"10px"},"&.cssTransforms":{transitionProperty:"transform"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"14px",height:"14px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,O.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}},isResizing:{zIndex:9,willChange:"width, height",pointerEvents:"none"}})));function S(){return S=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},S.apply(this,arguments)}const T={cols:4,rowHeight:30,margin:[15,15]},C=e=>{let{views:t,layout:n,layoutOptions:o=T,onLayoutChanged:c=x.ZT,draggableHandle:u,LayoutItem:d,onRemove:m,onDrop:b,droppingItem:k,isDroppable:O,isStatic:C,classes:I}=e;const R=(0,r.useRef)(),N=(0,r.useRef)({}),L=P(),[M,D]=(0,r.useState)(null),[j,A]=(0,r.useState)(null),[V,_]=(0,r.useState)(0),{cols:Z,rowHeight:U,margin:W}=o,z=(0,r.useMemo)((()=>(e=>(e||[]).map(g))(n)),[n]),F=(0,s.pipe)(h,v(["autosizing"],n),(0,s.ifElse)((0,s.always)(C),E(N.current),w(N.current)),c),B=(0,r.useCallback)((e=>A((t=>t?null:e))),[]),H=null!==j;return a().createElement(a().Fragment,null,a().createElement(l.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>_(e)}),!!V&&a().createElement(i(),{innerRef:R,layout:z,cols:Z,draggableHandle:u,autoSize:!0,rowHeight:U,width:V,margin:W,onLayoutChange:C?void 0:F,isResizable:!C&&!H,isDraggable:!C&&!H,className:p()(null==I?void 0:I.root,L.gridLayout,{[L.gridFullscreen]:H}),onDrop:(e,t,n)=>{b&&b(h(e),f(t),n)},droppingItem:k,isDroppable:!C&&O,onResizeStart:(e,t)=>D(t.i),onResizeStop:()=>D(null),"data-reltio-id":"reltio-grid-layout"},z.map((e=>{const r=j===e.i,i=M===e.i,s=(y(n,e.i)||{}).autosizing?{AutosizeComponent:(c=e.i,a().createElement(l.Z,{handleHeight:!0,onResize:(e,t)=>{if(t){const e=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(t,o);e!==N.current[c]&&(N.current[c]=e,F(z))}}}))}:{};var c;return a().createElement(d,S({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:B,onRemove:m,className:p()(null==I?void 0:I.item,{static:C,fullscreen:r,[L.isResizing]:i}),isFullscreen:r},s))}))))};C.displayName="ReltioGridLayout";const I=(0,r.memo)(C)},40702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var r=n(24328),a=n.n(r),o=n(50914),i=n(17871),l=n(79573),s=n(75047);const c=e=>{let{children:t,className:n,position:a,map:o}=e;const[i,l]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),l(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{i&&n&&i.classList.add(n)}),[n,i]),i?(0,s.createPortal)(t,i):null};var p=n(2507),u=n.n(p),d=n(38677),m=n(78223),g=n(67322),f=n(53857);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 y=e=>a().createElement("svg",h({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));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 v=e=>a().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var E=n(72342);const w=(0,E.makeStyles)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),x=(0,m.Z)(d.Z),k=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:i}=e;const l=w(),s=e=>()=>{o(e)};return a().createElement("div",{className:l.container},t||r?a().createElement(x,{tooltipTitle:u().text("Clear area"),className:l.button,onClick:r?i:s(null)},a().createElement(g.Z,{className:l.icon})):n.map((e=>{const t=(e=>{switch(e){case f.vl.CIRCLE:return y;case f.vl.POLYGON:return v;default:return null}})(e);return a().createElement(x,{tooltipTitle:u().text("Draw area"),key:e,className:l.button,onClick:s(e)},a().createElement(t,{className:l.icon}))})))};var O=n(30721),P=n(80852);const S=(0,E.makeStyles)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",boxSizing:"content-box",padding:"5px","& svg":{width:"16px",height:"16px"}}}),T=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=S();return a().createElement(O.Z,{classes:{root:r.container,label:r.label},control:a().createElement(P.Z,{checked:t,onChange:e=>{n(e.target.checked)},className:r.checkbox}),label:u().text("Search as I move the map")})},C=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),i=r.lat(),l=r.lng(),s=[],c=[];if(!(180===o&&-180===l||-180===o&&180===l)){const e=t.getCenter();s.push([a,e.lng()]),c.push([i,e.lng()])}return[[a,o],...s,[a,l],[i,l],...c,[i,o]]},I=e=>{switch(e){case f.vl.CIRCLE:return window.google.maps.drawing.OverlayType.CIRCLE;case f.vl.POLYGON:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},R=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var N=n(8419),L=n(7421),M=n(17512),D=n(3064);const j=(0,E.makeStyles)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}const V=(0,M.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),_=(0,M.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),Z=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=j(),c=(0,r.useRef)(),[p,u]=(0,r.useState)(!1),{activeEntityUri:d}=(0,r.useContext)(D.P),m=(0,o.pathEq)(["entity","uri"],d,t),g={lat:t.point.lat,lng:t.point.lng},f=(0,r.useCallback)((0,M.DsO)(u,50),[]),h=(0,r.useCallback)((()=>f(!0)),[f]),y=(0,r.useCallback)((()=>f(!1)),[f]),b=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(L.Z,{anchorEl:c.current,open:p,className:s.popper,modal:!1,placement:"top"},a().createElement(N.Z,{entity:t.entity,onMouseOver:h,onMouseOut:y})),a().createElement(i.Jx,A({icon:{url:p||m?V:_,scaledSize:new google.maps.Size(22,32)},position:g,onClick:b,visible:!1!==t.visible,onMouseOver:h,onMouseOut:y},l)),a().createElement(i.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))}));var U=n(62127);const W=(0,E.makeStyles)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});function z(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 B=["drawing"],H=e=>{let{markers:t=[],mapKey:n,defaultZoom:s,defaultCenter:p,loadingElement:u,isSearchOnMapMove:d,isSearchEnabled:m,activeOverlay:g,overlayOptions:h={},drawingModes:y=[],markerClusterer:b,markerClustererOptions:v,mapOptions:E={},mapContainerClassName:w,onMapBoundsChanged:x=l.ZT,onOverlayUpdated:O=l.ZT,onMarkerClicked:P=l.ZT}=e;const S=W(),{isLoaded:N,loadError:L}=(0,i.Ji)({googleMapsApiKey:n,libraries:B}),M=(0,r.useRef)(null),[D,j]=(0,r.useState)(null),[A,V]=(0,r.useState)(null),[_,F]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const i=Boolean(o&&window.google),l=(0,U.D)(t),s=(0,U.D)(n),c=(0,U.D)(i);(0,r.useEffect)((()=>{const e=l!==t,r=c!==i,p=i&&n&&(s!==n||r);i&&!a&&t.length&&(e||r)?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+f.Pi,e.lng()+f.Pi)),r.extend(new window.google.maps.LatLng(e.lat()-f.Pi,e.lng()-f.Pi))}t.fitBounds(r),n&&R(t,n,r)})(t,o,n):p&&R(o,n)}),[i,t,n])})({markers:t,activeOverlay:g,map:D,isSearchOnMapMove:d});const H=(0,r.useMemo)((()=>z({},f.r,h)),[h]),$=(0,r.useMemo)((()=>z({},f.Q3,E)),[E]),G=(0,r.useCallback)((e=>{x(e?C(D):null),F(null),clearTimeout(M.current)}),[D,x]),q=(0,r.useCallback)((()=>{clearTimeout(M.current)}),[]),Y=(0,r.useCallback)((()=>{d&&x(C(D))}),[d,D,x]),X=(0,r.useCallback)((()=>{d&&(clearTimeout(M.current),M.current=setTimeout(Y,1e3))}),[Y,d]),K=(0,r.useCallback)(((e,t)=>{var n;const r=A&&{type:f.vl.POLYGON,overlay:A},a=t||r;if((0,o.isEmpty)(a))return;const{overlay:i,type:l}=a,s={[f.vl.POLYGON]:()=>i.getPath().getArray().map((e=>[e.lat(),e.lng()])),[f.vl.CIRCLE]:()=>({radius:i.getRadius()/1e3,center:i.getCenter()})},c=null===(n=s[l])||void 0===n?void 0:n.call(s);c&&O({data:c,type:l})}),[O,A]),Q=(0,r.useCallback)((e=>t=>{K(null,{type:e,overlay:t}),t.setMap(null),F(null)}),[K]),J=(0,r.useCallback)((()=>{O(null)}),[O]),ee=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(Z,{key:t.id,marker:t,clusterer:e,onClick:P})));if(L)return null;if(!N)return u;const te=m&&Boolean(y.length),ne=D&&m&&Boolean(y.length),re=D&&m,ae=!I(_)&&g&&(0,o.propEq)("type",f.vl.POLYGON,g);return a().createElement(i.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:$,onLoad:j,zoom:s,center:p,onZoomChanged:q,onDragStart:q,onIdle:X,mapContainerClassName:w},ne&&a().createElement(c,{className:S.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:D},a().createElement(k,{hasActiveOverlay:!!g,drawingModes:y,drawingMode:_,onDrawingModeChanged:F,onClearOverlay:J})),re&&a().createElement(c,{className:S.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:D},a().createElement(T,{onChangeIsSearchOnMapMove:G,isSearchOnMapMove:d})),b?(oe=v,a().createElement(i.XL,{options:oe},ee)):ee(),ae&&a().createElement(i.mg,{onLoad:V,path:g.path,editable:!0,options:H,onMouseUp:K,onDragEnd:K}),te&&a().createElement(i.j_,{onPolygonComplete:Q(f.vl.POLYGON),onCircleComplete:Q(f.vl.CIRCLE),drawingMode:I(_),options:{drawingControl:!1,circleOptions:H,polygonOptions:H}}));var oe}},55310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o);const l=e=>{let{height:t,margin:n}=e;return i().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};l.propTypes={height:a().number,margin:a().number};const s=l},589:(e,t,n)=>{"use strict";n.d(t,{u:()=>u});var r=n(24328),a=n(52730),o=n(50914),i=n(17512),l=n(50673);const s={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:i.VGB,refRelation:i.VGB}),p=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,u=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(l.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(l.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(l.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(l.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=i.nwO.HistoryManager.createHistoryManager(i.nwO.AttributesDiff).computeEntityHistoryDiff(p(o===l.Z9.Current?c:r),p(n));e(l.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||s}},48211:(e,t,n)=>{"use strict";n.d(t,{s:()=>Je});var r=n(24328),a=n.n(r),o=n(17512),i=n(71153),l=n.n(i),s=n(80516),c=n(2507),p=n.n(c),u=n(23883),d=n(28831),m=n(94215),g=n(50914),f=n(52730),h=n(50673),y=n(19701),b=n(14834),v=n(35782),E=n(36571),w=n(35860),x=n(53880),k=n(72342);const O=(0,k.makeStyles)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}}),P=e=>{let{taskId:t,dueDate:n,isTaskOpen:i,className:s}=e;const c=O(),{updateDueDate:u,updateRequestIsInProgress:d,readOnly:m}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(b.O)||{},l=(0,f.useSelector)(h.ZP.selectors.getWorkflowPath),s=(0,f.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,f.useSelector)(h.ZP.selectors.getTenant),p=(0,y._)(),[u,d]=(0,r.useState)(!1),m=(0,E.Z)()("UPDATE_TASK")&&(0,w.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{l&&m&&n&&e&&t!==e&&(d(!0),p((0,o.KF3)({taskId:n,workflowPath:l,environment:s,tenant:c,dueDate:e})).then((()=>{null==i||i(n,{dueDate:e})})).catch(v.R).finally((()=>{d(!1)})))}),[l,n,s,c,i,p,t,m]),updateRequestIsInProgress:u,readOnly:!m}})({dueDate:n,taskId:t,isOpen:i});return a().createElement(x.Z,{disabled:d||m,value:n,label:p().text("Due date"),onChange:(0,g.pipe)((e=>e&&e.getTime()),u),slotProps:{textField:{className:l()(c.dueDate,s),size:"small",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}}}})};var S=n(84425);const T=e=>{let{taskId:t,priority:n,isTaskOpen:i,className:l}=e;const{priorities:s,updatePriority:c,updateRequestIsInProgress:u,readOnly:d}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(b.O)||{},l=(0,f.useSelector)(h.ZP.selectors.getWorkflowPath),s=(0,f.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,f.useSelector)(h.ZP.selectors.getTenant),u=(0,y._)(),[d,m]=(0,r.useState)(!1),g=(0,E.Z)()("UPDATE_TASK")&&(0,w.tg)(a),x=(0,r.useCallback)((e=>{const{value:r}=e;l&&g&&n&&t!==r&&(m(!0),u((0,o.ax9)({taskId:n,workflowPath:l,environment:s,tenant:c,priority:r})).then((()=>{null==i||i(n,{priority:r})})).catch(v.R).finally((()=>{m(!1)})))}),[l,n,s,c,i,u,t,g]);return{priorities:(0,r.useMemo)((()=>[{label:p().text("Low"),value:o.NVC.low},{label:p().text("Medium"),value:o.NVC.medium},{label:p().text("High"),value:o.NVC.high},{label:p().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:x,updateRequestIsInProgress:d,readOnly:!g}})({taskId:t,priority:n,isOpen:i}),m=u||d;return a().createElement(S.Z,{className:l,isDisabled:m,options:s,onChange:c,hideSelectedOptions:!1,label:p().text("Priority"),value:s.find((0,g.propEq)("value",n)),TextFieldProps:{disabled:m},height:40})};var C=n(58365),I=n(94009);const R=(0,k.makeStyles)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}});var N=n(56961);const L=e=>{let{className:t,children:n,plain:r,first:o,last:i,transparent:s,divider:c}=e;const p=R();return a().createElement("div",{className:l()(t,p.decorator)},a().createElement("div",{className:l()(p.lineBlock,{[p.withLinePadding]:o})},!s&&a().createElement(a().Fragment,null,a().createElement("div",{className:p.noLine}),a().createElement("div",{className:l()(p.line,{[p.plain]:r},{[p.last]:i})}))),a().createElement("div",{className:p.content},n,c&&a().createElement(N.Z,{className:p.rowDivider,light:!0,variant:"inset"})))};let M={};const D=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let j=0;function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}const V=e=>a().createElement("svg",A({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().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:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"})));var _=n(35536);const Z=(0,k.makeStyles)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}}))),U=e=>{let{task:t,children:n,actions:o,Icon:i}=e;const{taskId:c,dueDate:g,priority:f,assignee:h,createdBy:y,createTime:b,displayName:v,processDefinitionDisplayName:x,objectURIs:k,processInstanceComments:O,possibleActions:S,isOpen:R,preferredAction:N}=t,A=(0,w.Xs)(k),U=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return M[n]||(M[n]=D[j],j++,j>D.length-1&&(j=0)),M[n]})({processDefinitionDisplayName:x}),W=Z({color:U}),[z,F]=(0,r.useState)(!1),B=(0,E.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS"),{actions:H,actionRequestIsInProgress:$}=(0,_.t)({taskId:c,possibleActions:S,assignee:h,isOpen:R});return a().createElement("div",{className:W.card},a().createElement("div",{className:l()({[W.withBackground]:z})},a().createElement("div",{className:W.lineWrapper},a().createElement("div",{className:W.line}),i&&a().createElement(i,{className:W.icon}),a().createElement(L,{plain:!0,first:!0,transparent:!z},a().createElement("div",{className:W.mainInfo},a().createElement("div",{className:W.title},a().createElement("div",{className:l()(W.caption,W.flex)},p().text(x)),a().createElement(s.Z,{className:W.flag}),a().createElement(u.Z,{title:p().text("Due date")},a().createElement("span",{className:W.date},p().date(g,"L"))),a().createElement(d.Z,{isOpen:z,size:"L",onClick:()=>{F(!z)}})),a().createElement("div",{className:W.infoBlock,"data-reltio-id":"info-block"},a().createElement("div",{className:W.flex},A&&a().createElement("div",{className:W.info},p().text("DCR ID"),": ",a().createElement("span",{className:W.infoValue},A)),a().createElement("div",{className:W.info},p().text("Created by"),": ",a().createElement("span",{className:W.infoValue},y)," ",p().text("on")," ",a().createElement("span",{className:W.infoValue},p().date(b,"L"))),a().createElement("div",{className:W.info},p().text("Step"),": ",a().createElement("span",{className:W.infoValue},v)),B&&(null==O?void 0:O.length)>0&&a().createElement("div",{className:W.commentsInfo},a().createElement(V,{className:W.commentsIcon}),a().createElement("div",{className:W.infoValue},O.length))),o||a().createElement(I.Z,{actions:H,isInProgress:$}))))),z&&a().createElement(L,{plain:!0},a().createElement("div",{className:W.controlsBox},a().createElement("div",{className:W.controlsInRow},a().createElement(P,{taskId:c,dueDate:g,isTaskOpen:R}),a().createElement(T,{taskId:c,priority:f,className:W.priority,isTaskOpen:R})),a().createElement(m.Z,{taskId:c,assignee:h,isTaskOpen:R})))),z&&a().createElement(a().Fragment,null,n,B&&a().createElement("div",{className:W.comments},a().createElement(C.V,{workflowActions:H,actionRequestIsInProgress:$,preferredAction:N,taskId:c,processInstanceComments:O,isTaskOpen:R}))))};function W(){return W=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},W.apply(this,arguments)}const z=e=>a().createElement("svg",W({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));var F=n(26978);const B=(e,t)=>{switch(e){case o.VI$.CREATE_RELATIONSHIP:case o.VI$.INSERT_ATTRIBUTE:return o.ws7.ADDED;case o.VI$.UPDATE_TAGS:case o.VI$.UPDATE_ROLES:case o.VI$.UPDATE_ATTRIBUTE:return o.ws7.EDITED;case o.VI$.DELETE_ATTRIBUTE:case o.VI$.DELETE_RELATIONSHIP:return o.ws7.DELETED;case o.VI$.PIN_ATTRIBUTE:return null!=t&&t.pin?o.ws7.PIN_DELETED:o.ws7.PINNED;case o.VI$.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?o.ws7.IGNORE_DELETED:o.ws7.IGNORED}},H=e=>({[o.ws7.ADDED]:p().text("added"),[o.ws7.EDITED]:p().text("edited"),[o.ws7.DELETED]:p().text("deleted"),[o.ws7.PINNED]:p().text("pinned"),[o.ws7.PIN_DELETED]:p().text("pin deleted"),[o.ws7.IGNORED]:p().text("ignored"),[o.ws7.IGNORE_DELETED]:p().text("ignore deleted")}[e]||""),$=(e,t)=>(0,g.when)((0,g.allPass)([(0,g.pipe)((0,g.prop)("type"),(0,g.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,g.evolve)({type:(0,g.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));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){q(e,t,n[t])}))}return e}function q(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,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,g.pathOr)([],["value",t.name])(n),i=(0,g.pathOr)([],["value",t.name])(r),l=Math.max(o.length,i.length);return(0,g.times)((e=>[{value:{newValue:o[e],oldValue:i[e],type:a}}]),l)}const n=e[t.name];return n?[n]:[]},X=(0,g.curry)(((e,t,n)=>{const r=(0,F.U)(e,t.type,[],[]);return Q(e,r,n)})),K=(0,g.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),i=(0,o.xF8)(e,t.type);return(0,g.flatten)([G({level:1,label:(0,g.propOr)("","label",a),attributeType:a,attributeValue:G({},t,n)},((e,t)=>{if(t===o.VI$.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=B(t);return e?{operation:e}:{}}return{}})(n,r)),Q(e,i,n,2)])})),Q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,g.flatten)(t.map((t=>Y(n,t).map((n=>n.map((n=>J(e,t,n,r))))))).filter((0,g.complement)(g.isEmpty)))},J=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return ee(e,t,n,r);case o.oS0.TYPE_REFERENCE:return te(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,g.is)(Object,n)?n:{newValue:t,type:o.VI$.INSERT_ATTRIBUTE}})(t,n);return ne(t,e,r)}}},ee=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},te=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},ne=(e,t,n)=>{const{newValue:r,oldValue:a,type:i}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===o.VI$.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:B(i,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function re(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){ae(e,t,n[t])}))}return e}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oe=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],ie=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),i=a(t),l=a(n);return i&&l?[{type:o.VI$.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:i?[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:l?[{type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},le=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,i=a===o.VI$.UPDATE_ROLES?(0,o.xqc)(e):g.identity,l=(0,g.difference)(n,r),s=(0,g.difference)(r,n),c=[];return l.length&&c.push({type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:l.map(i).join(", ")}}),s.length&&c.push({type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:s.map(i).join(", ")}}),c},se=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,i=t===o.VI$.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,i].join("/")}return i})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var i;const n=r[e],o=r[e+1],l=(a[n]||[]).find((0,g.propEq)("id",o)),s=r.length===e+2?t:{},c=l||{id:o,value:s},p=(null===(i=t.refObjectURI)||void 0===i?void 0:i.indexOf(o))>=0&&t.refObjectURI;p&&(c.refObjectURI=p),(0,g.isNil)(l)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},ce=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:i,tags:l,defaultProfilePicValue:s}=t,c=re({},n);return s&&(c.defaultProfilePicValue=[s]),i&&(c[o.xPW.roles.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:i.map((0,o.xqc)(e)).join(", ")}}]),l&&(c[o.xPW.tags.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:l.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},pe=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case o.VI$.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case o.VI$.UPDATE_TAGS:r[o.xPW.tags.name]=le(e,n);break;case o.VI$.UPDATE_ROLES:r[o.xPW.roles.name]=le(e,n);break;case o.VI$.UPDATE_START_DATE:r[o.xPW.startDate.name]=ie(n);break;case o.VI$.UPDATE_END_DATE:r[o.xPW.endDate.name]=ie(n);break;case o.VI$.CREATE_RELATIONSHIP:case o.VI$.CREATE_ENTITY:return re({},r,ce(e,n.newValue));case o.VI$.INSERT_ATTRIBUTE:case o.VI$.UPDATE_ATTRIBUTE:case o.VI$.DELETE_ATTRIBUTE:case o.VI$.PIN_ATTRIBUTE:case o.VI$.IGNORE_ATTRIBUTE:se(r,n)}return r};var ue=n(55485);const de=(0,k.makeStyles)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),me=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const i=de();return a().createElement(ue.Z,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:i.linkLabel},n?p().text("View less suggestions"):p().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var ge=n(69621),fe=n(19926);const he=(0,k.makeStyles)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),ye=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:i}=e;const s=he(),c=n||r;return a().createElement("div",{className:l()(s.field,i)},a().createElement("span",{className:s.fieldName},t,":"),!(0,g.isNil)(c)&&a().createElement("span",{className:s.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(ge.Z,{className:s.arrow}),r)),o&&a().createElement(fe.Z,{variant:"outlined",label:H(o),className:l()(s.chip,o)}))},be=a().createContext(null);be.displayName="AttributesChangesContext";var ve=n(67586),Ee=n(18527);const we=(0,k.makeStyles)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),xe=e=>{let{label:t,level:n,attributeType:i,attributeValue:s,oldValue:c,newValue:p,operation:u}=e;const d=we({level:n}),m=(0,f.useSelector)(h.ZP.selectors.getEntityUri),y=(0,r.useContext)(be),b=(0,r.useCallback)((()=>{if((0,o.YkG)(i)){var e,t,n;const r=null!==(e=null===(t=s.value)||void 0===t?void 0:t.newValue)&&void 0!==e?e:null===(n=s.value)||void 0===n?void 0:n.oldValue;return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o[t.refObjectURI];return i?(a=n===i.startObjectUri?i.endObjectUri:i.startObjectUri,r=n===i.startObjectUri?i.endObjectLabel:i.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(i,r||s,m,y)}if("endObject"in i){const{endObjectUri:e,endObjectLabel:t}=s;return{objectUri:e,objectLabel:t}}}),[i,s,m,y]),v=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=b()||{};if(!(0,g.isNil)(e)&&!(0,g.isNil)(t)){var n;const r=!1===(null===(n=y[e])||void 0===n?void 0:n.isExist);return a().createElement(Ee.Z,{value:e,className:l()(d.linkContainer,{[d.disabledLink]:r})},a().createElement("span",{className:l()(d.linkLabel,{[d.label]:r})},(0,o.idV)(t)))}return null}),[b,y,d]),E=(0,r.useMemo)((()=>a().createElement("span",null,t,v())),[t,v]),w=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(ve.Z,{value:t,dataTypeDefinition:$(i,t)})}),[i]);return a().createElement(ye,{className:d.change,label:E,oldValue:c&&w(c),newValue:p&&w(p),operation:u})},ke=(0,k.makeStyles)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});function Oe(){return Oe=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},Oe.apply(this,arguments)}const Pe=e=>{let{changes:t}=e;const n=ke();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,g.has)("level",e)?a().createElement(xe,Oe({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},Se=(0,g.pipe)((0,g.filter)((0,g.has)("operation")),g.length);function Te(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 Ie=(0,g.filter)((0,g.pipe)((0,g.prop)("uri"),o.WgC)),Re=(0,g.filter)((0,g.pipe)((0,g.prop)("uri"),o.bC9)),Ne=(e,t)=>(0,g.filter)((0,g.allPass)([(0,g.pipe)((0,g.prop)("uri"),o.bC9),(0,g.pipe)((0,g.prop)("startObjectUri"),(0,g.equals)(t))]))(e),Le=(0,g.curry)(((e,t)=>({entity:t,relations:Ne(e,t.uri)}))),Me=(0,g.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Te({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),De=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,g.pipe)((0,g.pathOr)([],[a,"relations"]),(0,g.concat)(r),g.uniq)(e);return e[a]={entity:n,relations:o},e},je=e=>e.type===o.VI$.CREATE_ENTITY,Ae=(0,k.makeStyles)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),Ve=e=>{let{changes:t,dcrUri:n,objectsInfo:i,entityInfo:l,relationsInfo:s,max:c}=e;const u=Ae(),d=(0,f.useSelector)(h.ZP.selectors.getMetadata),[m,y]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,g.pipe)((0,g.pick)([t]),X(e,n)),i=(0,g.curry)(((e,t)=>(0,g.reduce)(((e,n)=>(0,g.concat)(e,n(t))),[],e))),l=(0,g.propOr)([],n.uri)(t).reduce(((t,r)=>pe(e,n,r,t)),{}),s=r.map((n=>((e,t,n)=>(0,g.propOr)([],n.uri)(t).reduce(((t,r)=>pe(e,n,r,t)),{}))(e,t,n)));return[i([(0,g.pipe)((0,g.omit)(oe),X(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],l),(0,g.flatten)(r.map(((n,r)=>{const a=(0,g.path)([n.uri,0,"type"],t);return K(e,n,s[r],a)})))]})(d,t,l,s)),[d,t,l,s]),b=(0,r.useMemo)((()=>{const e={label:p().text("Relationships")};return y.length>0?(0,g.flatten)([m,e,y]):m}),[m,y]),{isExpanded:v,onToggle:E,itemsToShow:w,collapsedSuggestionsCount:x}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),i=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),l=(0,r.useMemo)((()=>Se(e)),[e]),s=(0,r.useMemo)((()=>Se(i)),[i]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:i,collapsedSuggestionsCount:l-s}}(b,c),k=(0,g.ifElse)((0,g.any)(je),(0,g.always)(((e,t)=>`${e}/changes/${t}`)(n,l.uri)),(0,g.always)((0,o.wwR)(l)))((0,g.propOr)([],l.uri,t)),O=(0,g.ifElse)((0,g.any)(je),(0,g.always)("dcrReview"),(0,g.always)("profile"))((0,g.propOr)([],l.uri,t));return a().createElement(be.Provider,{value:i},a().createElement("div",{className:u.container},a().createElement(Ee.Z,{className:u.uri,value:k,screen:O},a().createElement("div",{className:u.label},(0,o.idV)(l.label))),a().createElement(Pe,{changes:w}),x>0&&a().createElement(me,{onClick:E,suggestionsCount:x,isExpanded:v,className:u.showMoreLink})))};function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=e=>{let{task:t}=e;const{objectURIs:n}=t,i=(0,w.rc)(n),{dcr:l,groupedObjects:s}=(e=>{const[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(null),l=(0,y._)(),s=(0,r.useCallback)((e=>(0,g.isEmpty)(e)?Promise.resolve([]):l((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,g.pipe)(g.keys,(0,g.filter)((t=>(0,g.prop)([t],e))),(0,g.map)((e=>Te({},t[e],{uri:e}))))(t))(t,r),o=(0,g.pipe)(Ie,(0,g.map)(Le(a)))(a),l=(0,g.pipe)(Re,(0,g.map)(Me(r)))(a),[c,p]=(0,g.partition)((0,g.has)("entity"),l),u=p.map((0,g.path)(["relations",0,"startObjectUri"]));s(u).then((e=>{const t=p.map(((t,n)=>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){_e(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,g.pipe)(g.flatten,(0,g.reduce)(De,{}),g.values,n)([o,c,t])})).catch(v.l),i(e)})).catch(v.l)}),[e,s]),{dcr:a,groupedObjects:t}})(i);return a().createElement(U,{task:t,Icon:z},l&&s.map(((e,t)=>a().createElement(L,{key:t,last:t===s.length-1,divider:!0},a().createElement(Ve,{entityInfo:e.entity,relationsInfo:e.relations,changes:l.changes,objectsInfo:l.objectsInfo,dcrUri:i})))))},Ue=(0,k.makeStyles)({pmCard:{marginLeft:"-15px"}});function We(){return We=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},We.apply(this,arguments)}const ze=e=>a().createElement("svg",We({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var Fe=n(23044),Be=n(20200);const He={showTransitiveMatches:!0,showInactiveEntities:!1},$e=e=>{let{task:t}=e;const n=Ue(),{objectURIs:r}=t,o=(0,f.useSelector)(h.ZP.selectors.getEntity),i=(0,f.useSelector)(h.ZP.selectors.getMetadata),{matches:l,entitiesMap:s}=(0,Fe.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:He}),c=null==l?void 0:l.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(U,{task:t,Icon:ze},c&&a().createElement(L,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(Be.M,{metadata:i,entity:o,match:c,entitiesMap:s}))))};function Ge(){return Ge=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},Ge.apply(this,arguments)}const qe=e=>a().createElement("svg",Ge({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}const Xe=e=>a().createElement("svg",Ye({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class Ke{}Ke.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(Ze,{task:t});case o.Yj_.potentialMatchReview:return a().createElement($e,{task:t});case o.Yj_.recommendForDelete:return a().createElement(U,{task:t,Icon:Xe});default:return a().createElement(U,{task:t,Icon:qe})}};const Qe=Ke,Je=e=>{let{task:t}=e;return Qe.build({task:t})}},37778:(e,t,n)=>{"use strict";n.d(t,{G:()=>S});var r=n(24328),a=n.n(r),o=n(2507),i=n.n(o),l=n(38677),s=n(93553),c=n(36571),p=n(53242),u=n(83820),d=n(10050),m=n(47019),g=n(79312),f=n(90590),h=n(50673),y=n(17512),b=n(52730),v=n(19701),E=n(14834),w=n(35782),x=n(72342);const k=(0,x.makeStyles)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),O=e=>{let{anchorEl:t,onClose:n}=e;const o=k(),[s,c]=(0,r.useState)(""),[x,O]=(0,r.useState)(null),[P,S]=(0,r.useState)(!1),{definitions:T}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,b.useSelector)(h.ZP.selectors.getWorkflowPath),a=(0,b.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,b.useSelector)(h.ZP.selectors.getTenant),i=(0,b.useSelector)(h.ZP.selectors.getEntity).type,l=(0,v._)();return(0,r.useEffect)((()=>{l((0,y.IU6)({workflowPath:n,environment:a,tenant:o})).then((e=>{let{data:n}=e;n&&t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,i))}))}),[i,n,a,o]),{definitions:e}})(),{processInstance:C,loading:I}=(()=>{const{loadTasks:e}=(0,r.useContext)(E.O),t=(0,b.useSelector)(h.ZP.selectors.getWorkflowPath),n=(0,b.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,b.useSelector)(h.ZP.selectors.getTenant),o=(0,b.useSelector)(h.ZP.selectors.getEntity).uri,[i,l]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,i)=>(l(!0),(0,y.$ju)({workflowPath:t,tenant:a,environment:n,processType:i,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,w.R)(e),e})).finally((()=>{l(!1)})))),[o,n,e,a,t]),loading:i}})(),R=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(m.ZP,{open:R,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(g.Z,{className:o.title},i().text("Add new workflow")),a().createElement(f.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:i().text("Select task type"),value:x,onChange:e=>{O(e)},label:"",options:T.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(p.Z,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:s,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(l.Z,{disabled:I,className:o.cancelButton,onClick:n},i().text("Cancel")),a().createElement(l.Z,{disabled:I,color:"primary",onClick:()=>{C(s,null==x?void 0:x.value).then((()=>{S(!0),c(""),O(null),n()})).catch((()=>{}))}},i().text("Start")))),a().createElement(u.Z,{container:document.body},a().createElement(d.Z,{open:P,autoHideDuration:5e3,onClose:()=>{S(!1)},message:i().text("A new workflow has started")})))},P=(0,x.makeStyles)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),S=()=>{const e=P(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),p=o("START_PROCESS_INSTANCE"),u=o("VIEW_PROCESS_DEFINITIONS");return p&&u?a().createElement(a().Fragment,null,a().createElement(l.Z,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(s.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},i().text("Add"))),a().createElement(O,{anchorEl:t,onClose:()=>n(null)})):null}},39636:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var r=n(24328),a=n.n(r),o=n(50914),i=n(38677),l=n(35536);const s=e=>{let{task:t}=e;const{taskId:n,possibleActions:r,assignee:s,isOpen:c,preferredAction:p}=t,{actions:u,actionRequestIsInProgress:d}=(0,l.t)({taskId:n,possibleActions:r,assignee:s,isOpen:c}),[m,g]=(0,o.partition)((0,o.propEq)("text",p.label),u);return a().createElement(a().Fragment,null,g.map((e=>a().createElement(i.Z,{variant:"outlined",onClick:e.onClick,key:e.text,disabled:d},e.text))),m.map((e=>a().createElement(i.Z,{variant:"contained",color:"primary",onClick:e.onClick,key:e.text,disabled:d},e.text))))}},27938:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(50914),i=n(50673),l=n(17512),s=n(19701),c=n(36571);const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},d=(0,s._)(),m=(0,a.useSelector)(i.ZP.selectors.getWorkflowPath),g=(0,a.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(i.ZP.selectors.isWorkflowEnabled),h=(0,a.useSelector)(i.ZP.selectors.getTenant),y=(0,a.useSelector)(i.ZP.selectors.getEntityUri),b=(0,a.useSelector)(i.ZP.selectors.getIsEditableMode),v=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),E=(0,c.Z)()("VIEW_TASKS"),w=!(!m||!g)&&f&&E,[x,k]=(0,r.useState)(null),[O,P]=(0,r.useState)(0),[S,T]=(0,r.useState)(!1),C=(0,r.useCallback)((()=>{T(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,l.uT0)({entityUri:(0,l.FP6)(y)?(0,l.$Rg)(y):y,workflowPath:m,environment:g,tenant:h,filter:{assignee:n,processType:e},includeClosed:!!p})));d(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);k(r),P(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{T(!1)}))}),[y,g,d,h,m,n,p,t,v]);return(0,r.useEffect)((()=>{y&&w&&!(0,l.ZiX)(y)?C():(k(null),P(0))}),[w,y,C,b]),{tasks:x,total:O,loading:S,updateTaskState:(0,r.useCallback)(((e,t)=>{k((0,o.map)((0,o.when)((0,o.propEq)("taskId",e),(0,o.mergeLeft)(t))))}),[]),loadTasks:C}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},53857:(e,t,n)=>{"use strict";n.d(t,{vl:()=>r,r:()=>a,Q3:()=>o,Pi:()=>i});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o={mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},i=.001},3064:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},42719:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="InterceptHandlersContext"},14235:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(24328);const a=n.n(r)().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}})},42821:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(17512);function a(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){o(e,t,n[t])}))}return e}function o(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=(e,t)=>e?(!(null==t?void 0:t.some((t=>{var n;const r=null===(n=e.match(/^(https?:\/\/[^:/?#]*).*$/))||void 0===n?void 0:n[1],a=new RegExp("^"+t+"$"),o=t.replace(/\/*$/,"");return o===e||r&&r===o||(null==o?void 0:o.startsWith("/"))&&(null==e?void 0:e.startsWith(o))||t&&a.test(e)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"},l=async(e,t)=>{const{accessToken:n}=await(0,r.hPi)({servicesPath:t});return n?a({},e,{Authorization:`Bearer ${n}`}):e},s=e=>{let{params:t,permissions:n,worker:o,metadata:s,config:c,apiPath:p,servicesPath:u,user:d,workflowPath:m,entity:g,tenant:f,entityUri:h,query:y,openSearch:b,environment:v,getCurrentPerspectiveId:E,showPerspective:w,workflowCheckPermission:x,setEntityUri:k}=e;const{name:O,url:P,data:S,method:T,validationUrl:C}=t,I=e=>{e.then((e=>e.json?e.json():e)).then((e=>{o.postMessage(a({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:t.headers,status:200}},t))})).catch((e=>{o.postMessage(a({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:t.headers,status:0}},t))}))};switch(O){case r.MVv.API:I((async()=>{const e=i(C,n);if(e)return Promise.reject(e);const a=await l(t.headers,u);return await(0,r.SL_)({url:P,method:T,data:S,headers:a,noRequestProcessor:!0})})());break;case r.MVv.WORKFLOW:I((async()=>{const e=i(C,n);if(e)return e;const a=P.includes("http:")||P.includes("https:");if(!m&&!a)return{errorMessage:"Workflow path is not defined"};const o=await l(t.headers,u);return await(0,r.oUH)({url:P,method:T,data:S,tenant:f,headers:o,workflowPath:m})})());break;case r.MVv.WORKFLOW_START_PROCESS_FROM_QUERY:I((()=>{if(!t.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!t.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!m)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const e=i("/processInstances/_generateFromQuery",n);return e?new Promise((t=>t(e))):(0,r.FuV)({workflowPath:m,processType:t.processDefinitionId,searchString:t.searchString,tenant:f,environment:v})})());break;case r.MVv.GET_CONFIGURATION:o.postMessage(a({action:"response",result:s},t));break;case r.MVv.GET_UI_CONFIGURATION:{const e=a({},c,{action:a({},c.action)});e.action.permissions&&delete e.action.permissions,o.postMessage(a({action:"response",result:e},t));break}case r.MVv.SET_ENTITY_URI:{const e=e=>o.postMessage(a({action:"response",result:e},t));k(t.entityUri,e);break}case r.MVv.SET_PERSPECTIVE:w(t.perspective),o.postMessage(a({action:"response",result:E()},t));break;case r.MVv.GET_PERSPECTIVE:E&&o.postMessage(a({action:"response",result:E()},t));break;case r.MVv.WORKFLOW_CHECK_PERMISSION:o.postMessage(a({action:"response",result:x(t.permission)},t));break;case r.MVv.GET_SEARCH_QUERY:o.postMessage(a({action:"response",result:y},t));break;case r.MVv.OPEN_SEARCH:b({viewId:c.id,searchState:t.searchState||{}});break;case r.MVv.GET_ENTITY_URI:o.postMessage(a({action:"response",result:h},t));break;case r.MVv.GET_ENTITY:o.postMessage(a({action:"response",result:g},t));break;case r.MVv.GET_API_PATH:o.postMessage(a({action:"response",result:p},t));break;case r.MVv.WORKFLOW_GET_WORKFLOW_PATH:o.postMessage(a({action:"response",result:m},t));break;case r.MVv.GET_TENANT:o.postMessage(a({action:"response",result:f},t));break;case r.MVv.GET_USER:o.postMessage(a({action:"response",result:d},t));break;case r.MVv.ALERT:o.postMessage(a({action:"response",result:window.alert(t.text)},t));break;case r.MVv.CONFIRM:o.postMessage(a({action:"response",result:window.confirm(t.text)},t));break;case r.MVv.PROMPT:o.postMessage(a({action:"response",result:window.prompt(t.text,t.defaultText||"")},t));break;case r.MVv.OPEN_WINDOW:window.open(t.url,"_blank");break;case r.MVv.RELOAD_PAGE:location.reload()}}},48221:(e,t,n)=>{"use strict";n.d(t,{Hk:()=>l,sz:()=>s,jm:()=>c,n:()=>p,Rw:()=>u,JN:()=>d,aZ:()=>g,R3:()=>f,Yo:()=>h});var r=n(17512),a=n(37164);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){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{const{files:t,platform:n}=e||{};return!(0,r.O27)(t)&&n!==r.X1H.CLASSIC},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some((t=>{const n=new RegExp(`^${t}$`);return t.replace(/\/*$/,"")===e||t&&n.test(e)}))},c=(e,t)=>`${e.replace(`${t}/`,"")}worker_api.js`,p=(e,t,n,r)=>e.startsWith(t)?`${n}${e.replace(t,"")}`:`${n}/api/${r}${e}`,u=(e,t,n)=>`${n}${e.replace(t,"")}`,d=(e,t,n,a)=>{const{url:i,name:l}=e.params;if(!i)return e;const s=l===r.MVv.API,c=i.startsWith("/")&&!i.startsWith(t)&&s?`${t}/api/${a}${i}`:i.replace(n,t);return o({},e,{params:o({},e.params,{url:c,validationUrl:i})})},m=(e,t,n)=>{let r=[];const a=e.getAttribute("ui-actions"),i=e.getAttribute("ui-tooltip"),l=e.getAttribute("id")||e.getAttribute("name");return a&&(a.split(",").forEach((n=>{const a=e=>{var r;const a=e.target,i=r=>{t.postMessage({action:"event",type:"uiAction",data:{type:n,id:l,event:o({},e,{files:r})}})};null!==(r=a.files)&&void 0!==r&&r.length?(e=>{const t=Array.from(e).map((e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=n=>{const r=n.target.result,{lastModified:a,name:o,size:i,type:l}=e;t({lastModified:a,name:o,size:i,type:l,content:r})},r.onerror=e=>{n(e)},r.readAsArrayBuffer(e)}))));return Promise.all(t)})(a.files).then(i):i()};e.addEventListener(n,a),r.push((()=>{e.removeEventListener(n,a)}))})),e.removeAttribute("ui-actions")),i&&n(i),e.childNodes.forEach((e=>{1===e.nodeType&&(r=r.concat(m(e,t,n)))})),r},g=e=>{let{worker:t,setTooltip:n,innerText:r,html:a,setListenersToReset:o,setHtml:i}=e;const l=document.createElement("div");l.innerHTML=a||r,o(m(l,t,n)),i(l)},f=e=>{let{apiPath:t,reltioPath:n,tenant:r,processApiRequest:o,workerRef:i,setRequestListeners:l}=e;return e=>{let{url:c,next:u,resolve:d,options:m={}}=e;const g=p(c,t,n,r);if(s(g,o)){const e=(0,a.x0)();l(m,u,e,d),i.current.postMessage({action:"apiRequest",id:e,url:g,method:m.method,headers:m.headers,data:m.body})}else u(c,m)}},h=e=>{let{reltioPath:t,apiPath:n,processApiResponse:r,workerRef:o,setResponseListeners:i}=e;return e=>{let{url:l,response:c,next:p,options:d,abort:m}=e;const g=u(l,n,t);if(s(g,r)){const e=(0,a.x0)();c.json().then((t=>{i(p,e),o.current.postMessage({action:"apiResponse",id:e,url:g,method:d.method,data:t})})).catch((e=>{m(e)}))}else p(c)}}},52241:(e,t,n)=>{"use strict";n.d(t,{E:()=>x});var r=n(24328),a=n(52730),o=n(50673),i=n(17512),l=n(50914),s=n(36571),c=n(24330),p=n.n(c);const u={attributes:{"*":["accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","checked","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","disabled","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","y","y1","y2","yChannelSelector","z","zoomAndPan","ui-actions","ui-tooltip"],img:["src","srcset","alt","title","loading"],link:["href","rel"],iframe:["src"],a:["href"]},tags:["animate","animateColor","animateMotion","animateTransform","mpath","set","circle","ellipse","line","polygon","polyline","rect","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","feDistantLight","fePointLight","feSpotLight","circle","ellipse","line","path","polygon","polyline","rect","defs","g","svg","symbol","use","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","textPath","text","tref","tspan","altGlyph","textPath","tref","tspan","clipPath","color-profile","cursor","filter","foreignObject","script","style","view","a","link","input","button","iframe","img"]};function d(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){m(e,t,n[t])}))}return e}function m(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=()=>{const{allowedAttributes:e,allowedTags:t}=p().defaults,{attributes:n,tags:r}=u,a={allowedTags:t.concat(r),allowedAttributes:d({},e,n),allowVulnerableTags:!0};return e=>p()(e,a)};var f=n(43751),h=n(14235),y=n(42719),b=n(42821),v=n(48221);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){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 x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{processApiRequest:t,processApiResponse:n,platform:c}=e.action||{},[p,u]=(0,r.useState)(),[d,m]=(0,r.useState)([]),[w,x]=(0,r.useState)([]),[k,O]=(0,r.useState)(!0),[P,S]=(0,r.useState)(),[T,C]=(0,r.useState)(null),[I,R]=(0,r.useState)({}),N=(0,r.useRef)(),L=(0,r.useRef)({}),M=(0,r.useRef)({}),D=(0,a.useDispatch)(),j=g(),A=(0,a.useSelector)(o.ZP.selectors.getUIPath),V=(0,a.useSelector)(o.ZP.selectors.getTenant),_=(0,v.jm)(A,V),Z=(0,r.useContext)(f.S),U=(0,r.useContext)(h.Y),W=(0,r.useContext)(y.p),z=(0,s.Z)(),F=(0,a.useSelector)(o.ZP.selectors.getMetadata)||{},B=(0,a.useSelector)(o.ZP.selectors.getEntity)||{},H=(0,a.useSelector)(o.ZP.selectors.getApiPath),$=(0,a.useSelector)(o.ZP.selectors.getServicesPath),G=(0,a.useSelector)(o.ZP.selectors.getReltioPath),q=(0,a.useSelector)(o.ZP.selectors.getWorkflowPath),Y=(0,a.useSelector)(o.ZP.selectors.getUser),X=(0,a.useSelector)(o.ZP.selectors.getEntityUri),K=(0,a.useSelector)(o.ZP.selectors.getIsEditableMode),Q=(0,a.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),{type:J,data:ee}=(0,a.useSelector)(o.ZP.selectors.getSearchProviderData)||{},te="search"===J?null==ee?void 0:ee.query:null,ne=e=>D(o.ui.actions.openSearch(e));let re="",ae="";const oe=t=>{let{task:n,worker:r}=t;if(n)switch(n.action){case i.W0P.SET_HTML:{const e=j(n.params.html);if(n.params.id){const t=document.getElementById(n.params.id);t&&(t.innerHTML=e)}else re!==e&&(re=e,(0,v.aZ)({worker:r,setTooltip:C,html:e,innerText:re,setListenersToReset:m,setHtml:u}));break}case i.W0P.SHOW_POPUP:{const e=j(n.params);ae=e,(0,v.aZ)({worker:r,setTooltip:C,html:e,innerText:ae,setListenersToReset:x,setHtml:S});break}case i.W0P.HIDE_POPUP:ae="",S(null);break;case i.W0P.SET_VISIBILITY:"visible"===n.params?(O(!0),(0,v.aZ)({worker:r,setTooltip:C,innerText:re,setListenersToReset:m,setHtml:u})):O(!1);break;case i.W0P.SET_TOOLTIP:C(n.params);break;case i.W0P.SET_HEIGHT:R((e=>E({},e,{height:n.params})));break;case i.W0P.SET_WIDTH:R((e=>E({},e,{width:n.params})));break;case i.W0P.SET_ENABLED:R((e=>n.params?(0,l.omit)(["pointer-events"],e):E({},e,{"pointer-events":"none"})));break;case i.W0P.LOG:console.log(n.params);break;case i.W0P.MESSAGE:Z(n.params);break;case i.W0P.REQUEST:{const t=(0,v.JN)(n,H,G,V);(0,b.U)(E({params:t.params,permissions:e.action.permissions,worker:r,metadata:F,config:e,user:Y,servicesPath:$,apiPath:G,tenant:V,workflowPath:q,entity:B,entityUri:X,environment:Q,query:te,openSearch:ne,workflowCheckPermission:z},U));break}case i.W0P.RETURN_PROCESSED_API_RESPONSE:{const{id:e,data:t}=n.params;M.current[e]&&(M.current[e].next(t),M.current=(0,l.omit)([e],M.current));break}case i.W0P.RETURN_PROCESSED_API_REQUEST:{const{id:e,data:t}=n.params;L.current[e]&&(L.current[e].resolve(t),L.current=(0,l.omit)([e],L.current));break}}},ie=(e,t,n,r)=>{L.current=E({},L.current,{[n]:{options:e,next:t,id:n,resolve:r}})},le=(e,t)=>{M.current=E({},M.current,{[t]:{next:e}})},se=(0,v.R3)({apiPath:H,reltioPath:G,tenant:V,processApiRequest:t,workerRef:N,setRequestListeners:ie}),ce=(0,v.Yo)({reltioPath:G,apiPath:H,processApiResponse:n,workerRef:N,setResponseListeners:le}),pe=(e,t)=>{var n;null===(n=N.current)||void 0===n||n.postMessage({action:"event",type:e,data:t})},ue=(0,r.useRef)(!1),de=W&&!(0,i.O27)(e.action)&&c!==i.X1H.CLASSIC&&(t||n);de&&(ue.current||N.current||(W.startInterceptorInit(),ue.current=!0)),(0,r.useEffect)((()=>{(0,v.Hk)(e.action)&&(N.current=(0,i.QWZ)(_,oe,e),ue.current&&(W.finishInterceptorInit(),ue.current=!1),pe("updateEntity",B))}),[B,e]),(0,r.useEffect)((()=>{pe("editMode",K)}),[K]),(0,r.useEffect)((()=>{pe("changeSearchQuery",te)}),[te]),(0,r.useEffect)((()=>{pe("changeVisibility",k)}),[k]),(0,r.useEffect)((()=>()=>{d.forEach((e=>e()))}),[d]),(0,r.useEffect)((()=>()=>{w.forEach((e=>e()))}),[w,d]);const me=(0,r.useCallback)((()=>{pe("execute",null)}),[e]);return(0,r.useEffect)((()=>{if(!(0,i.O27)(W)&&(t||n)){const{addInternalRequestInterceptor:e,addInternalResponseInterceptor:t,removeInternalRequestInterceptor:n,removeInternalResponseInterceptor:r}=W;return e(se),t(ce),N.current.onerror=()=>{n(se),r(ce)},()=>{n(se),r(ce)}}}),[e]),{html:p,visible:k,tooltip:T,customStyles:I,onClick:me,popup:P}}},86868:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var r=n(24328),a=n(50914),o=n(52730),i=n(50673),l=n(17512),s=n(19701);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){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 u=e=>{const t=(0,s._)(),n=(0,o.useSelector)(i.ZP.selectors.getEntityUriWithDataTenant),[p,u]=(0,r.useState)({}),d=(0,r.useCallback)((e=>{const n=[{filter:l.j5E.EQUALS,fieldName:"uri",values:e}],r={max:e.length,activeness:l.YJ7.ALL,select:"uri,label,type"};return t((0,l.ZOr)(n,r))}),[t]),m=e=>(0,l.HvW)(e,{options:"uri,label,type"}).then((t=>c({},t,{uri:e}))).catch((()=>({}))),g=(0,r.useCallback)(((e,n)=>t(Promise.all((e||[]).map(m))).then((e=>(0,a.pipe)((0,a.reject)(a.isEmpty),(0,a.concat)(n))(e)))),[t]);return(0,r.useEffect)((()=>{const t=(0,a.pipe)((0,a.reduce)(((e,t)=>{const{objectType:r,relatedObjectUris:a}=t;return"relation"!==r&&"potentialMatch"!==r||(a||[]).forEach((t=>{t!==n&&(0,l.WgC)(t)&&!p[t]&&e.push(t)})),e}),[]),a.uniq)(e||[]);t.length&&d(t).then((e=>{const n=(0,a.pipe)((0,a.map)((0,a.prop)("uri")),(0,a.difference)(t))(e);return g(n,e)})).then((e=>{u((t=>e.reduce(((e,t)=>(e[t.uri]=t,e)),c({},t))))})).catch((()=>{}))}),[d,g,e,n]),p}},47081:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(52730),a=n(50673),o=n(17512),i=n(24328);const l=[],s=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||l;return{canCreate:(0,i.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,i.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,i.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,i.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},61604:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});var r=n(2507),a=n.n(r),o=n(18408);const i=e=>{let{onLayoutReset:t,onResetUndo:n}=e;const{SnackbarRenderer:r,showSnackbarMessage:i}=(0,o.D)({onDismissClick:n,showDismiss:!0,autoHideDuration:5e3,dismissTitle:a().text("Undo")});return{SnackbarRenderer:r,resetLayout:()=>{t(),i(a().text("The default layout is now restored. It's still not too late to revert your changes. Click Undo to go back to your personalized settings."))}}}},80225:(e,t,n)=>{"use strict";n.d(t,{a:()=>m});var r=n(24328),a=n(52730),o=n(50914),i=n(50673),l=n(17512),s=n(19701),c=n(62127);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(l.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:g,entity:f,relationActivityFilter:h,mode:y,searchByOv:b=!1}=e;const[v,E]=(0,r.useState)(!1),w=(0,a.useDispatch)(),x=(0,a.useSelector)(i.ZP.selectors.getTenant),k=(0,a.useSelector)(i.ZP.selectors.getMetadata),O=(0,a.useSelector)(i.ZP.selectors.getDtssPath),{activityFilter:P,globalFilter:S}=(0,a.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),C=(0,s._)(),I=e=>{const t=(0,o.when)(l.Kn2,(0,o.prop)("uri")),n=(0,o.pipe)(t,(0,l.pQZ)(k));return(0,o.evolve)({entityTypes:(0,o.filter)((0,l.kuw)(k)),inRelations:(0,o.filter)(n),outRelations:(0,o.filter)(n),nextEntry:I})(e)},R=g.suggested,N=(0,r.useMemo)((()=>({searchByOv:b})),[b]),L=(0,r.useCallback)((()=>{if(null!=f&&f.uri){const e=p({},I(g.content),{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:h||l.Ng6.ALL,entity:P},max:m,offset:u*m,filter:(0,l.vyX)(S,n)||void 0,suggested:d(R)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(l.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(R)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),l.ZiX),()=>Promise.resolve([{total:0}])],[l.biM,e=>(0,l.n_1)({entityUri:e.uri,configs:r,customerTenant:x,dataTenant:e.dataTenant,dtssPath:O,options:N})],[o.T,e=>(0,l.N6e)(e.uri,r,N)]]);E(!0),C(a(f)).then((e=>{if(!Array.isArray(e))throw Error(JSON.stringify(e));const[{connections:t,total:n}]=e;w(i.N5.relations.actions.relationsLoaded({id:g.id,connections:t,total:n}))})).catch((e=>{console.warn("Failed to load relations data",e)})).finally((()=>{E(!1)}))}}),[P,k,g,w,O,null==f?void 0:f.uri,null==f?void 0:f.dataTenant,n,S,u,h,m,C,t,x,N,T]),M=(0,r.useRef)(!1);M.current=!1,(0,r.useEffect)((()=>{M.current=!0,L()}),[L]);const D=(0,c.D)(y);return(0,r.useEffect)((()=>{y!==l.ARY.Viewing||M.current||D===y||(M.current=!0,L())}),[L,y,D]),{isLoading:v,reload:L}}},76527:()=>{},96969:()=>{},32232:()=>{},24195:()=>{},73443:()=>{}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5afde725-7adc-4a85-8b1d-073a8eab79f1",e._sentryDebugIdIdentifier="sentry-dbid-5afde725-7adc-4a85-8b1d-073a8eab79f1")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1624"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1925],{153:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(89323);const s=(0,n(72342).makeStyles)({dragHandleContainer:{position:"relative",width:"100%",height:"inherit"},dragHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"12px",zIndex:11,visibility:"hidden","&:hover $dragHandle":{visibility:"visible"},".react-draggable &":{visibility:"visible"}},dragHandle:{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)",fontSize:"20px"}}),c=e=>{const t=t=>{const n=s();return a().createElement("div",{className:n.dragHandleContainer},a().createElement("div",{className:n.dragHandleVisibilityArea},a().createElement("div",{className:i()("viewDraggableHandle",n.dragHandle)},a().createElement(l.Z,{className:n.dragIcon}))),a().createElement(e,t))};return t.displayName="WithDragHandle",t}},33903:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(2507),s=n.n(l),c=n(87037),p=n(92679),u=n(23883);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=e=>a().createElement("svg",d({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),g=(0,n(72342).makeStyles)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const r=g();return a().createElement(u.Z,{title:t?s().text("Clear all filters"):s().text("Filter")},a().createElement(c.Z,{onClick:n,classes:{root:r.button},size:"large"},t?a().createElement(a().Fragment,null,a().createElement(m,{className:r["filterIcon--enabled"]}),a().createElement(p.default,{color:"primary",className:r.closeIcon})):a().createElement(m,null)))};f.propTypes={enabled:i().bool,onClick:i().func};const h=f},7882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);class o extends a().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},46804:(e,t,n)=>{"use strict";n.d(t,{i:()=>h});var r=n(24328),a=n.n(r),o=n(2507),i=n.n(o),l=n(50914),s=n(92679),c=n(87037),p=n(24394),u=n(30680),d=n(31563),m=n(40435),g=n(79573);const f=(0,n(72342).makeStyles)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{maxWidth:"350px",flex:"1 0 200px",marginLeft:"20px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),h=e=>{let{query:t,onChange:n}=e;const[o,h]=(0,r.useState)(t),[y,b]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{h(t)}),[t]);const v=f();return y?a().createElement(p.Z,{className:v.input,value:o,autoFocus:!0,placeholder:i().text("Search"),disableUnderline:!0,onChange:(0,l.pipe)(g.NA,h),startAdornment:a().createElement(u.Z,{position:"start"},a().createElement(d.default,{className:v.startAdornment})),endAdornment:a().createElement(u.Z,{position:"end"},a().createElement(m.Z,{size:"S",icon:s.default,onClick:(0,l.pipe)(l.F,b,(0,l.always)(""),(0,l.tap)(n),h)})),onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),(0,l.pipe)((0,l.always)(o),l.trim,n))}):a().createElement(c.Z,{className:v.searchButton,onClick:(0,l.pipe)(l.T,b),size:"large"},a().createElement(d.default,null))}},58003:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(24328),a=n.n(r),o=n(44443);const i=()=>a().createElement("div",{style:{display:"none"}}),l=e=>{let{widthToHide:t,children:n}=e;return a().createElement(o.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?a().createElement(a().Fragment,null,n):a().createElement(i,null)}})}},97287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(95341),i=n(82056),l=n(79573);const s=(0,n(72342).makeStyles)((()=>({menuItem:{whiteSpace:"inherit",width:200,padding:"9px 12px 7px"},itemText:{margin:0},textPrimary:{fontSize:14,lineHeight:"16px",fontWeight:500},textSecondary:{fontSize:10,lineHeight:"12px"}}))),c=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=l.ZT}=e;const c=s(),{primary:p,secondary:u,onClick:d}=n;return a().createElement(o.Z,{className:c.menuItem,ref:t,onClick:()=>{r(),d()}},a().createElement(i.Z,{primary:p,secondary:u,className:c.itemText,classes:{primary:c.textPrimary,secondary:c.textSecondary}}))}));c.displayName="MultilineMenuItem";const p=c},20200:(e,t,n)=>{"use strict";n.d(t,{M:()=>m});var r=n(24328),a=n.n(r),o=n(98858),i=n(71153),l=n.n(i),s=n(56961),c=n(8419),p=n(23074),u=n(51277);const d=(0,n(72342).makeStyles)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1,paddingBottom:"8px",paddingTop:"8px"},rulesContainer:{paddingLeft:"52px",marginBottom:"8px",display:"flex",alignItems:"center"},dividerWrapper:{marginLeft:"12px",alignSelf:"stretch"},divider:{borderColor:"rgba(0,0,0,0.12)"},relevanceBadge:{marginLeft:"12px"}}),m=e=>{var t;let{children:n,entitiesMap:r,entity:i,match:m,metadata:g,className:f}=e;const h=d(),y=null===(t=m.matchRuleSummaries)||void 0===t?void 0:t.some(o.KB$);return a().createElement("div",{className:l()(h.root,f)},a().createElement("div",{className:h.profileCardWrapper},a().createElement(c.Z,{entity:m.object,classes:{container:h.profileCardContainer}}),n),a().createElement("div",{className:h.rulesContainer},m.matchRules&&a().createElement(p.Z,{match:m,metadata:g,entitiesMap:r,entity:i}),y&&a().createElement(a().Fragment,null,a().createElement("div",{className:h.dividerWrapper},a().createElement(s.Z,{orientation:"vertical",className:h.divider})),a().createElement(u.Z,{className:h.relevanceBadge,matchRuleSummaries:m.matchRuleSummaries}))))}},821:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),o=n(2507),i=n.n(o),l=n(13980),s=n.n(l),c=n(71153),p=n.n(c),u=n(50914),d=n(38677),m=n(56961),g=n(79312),f=n(98858),h=n(29945),y=n(85596),b=n(93555),v=n(72283),E=n(76141),x=n(50548),w=n(43460),k=n(40941);const O=(0,n(72342).makeStyles)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px",overflowX:"hidden"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},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 P(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){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T=e=>{let{connection:t,modifiedEntity:n,initialConnection:o,initialModifiedEntity:l,allModifiedEntities:s,dispatch:c,config:x,mode:w,metadata:S,globalSearchRequestOptions:T,error:C,highlightedError:I}=e;const{relationUri:R,relationType:N,direction:L}=t.relation,M=t.isNew,D=O(),{ref:j,errorClassName:A}=(0,k.B)({highlightedError:I,isSimple:!0}),{inRelations:V=[],outRelations:_=[]}=(0,r.useMemo)((()=>(0,f.ocC)({content:t.parentEntityUri?x.contentSecondLevel:x.content,direction:L,relationType:N,mode:w,metadata:S})),[x,L,N,w,S,t.parentEntityUri]),Z=(0,r.useMemo)((()=>(0,f.xF8)(S,N)),[N,S]),U=(0,r.useMemo)((()=>P({attributes:P({},h.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,f.p2l)(t.relation))),[t]),W=(0,r.useMemo)((()=>(0,f.SAs)(s,n)),[s,n]),z=(0,r.useRef)([]),F=(0,r.useCallback)(((e,t)=>{c(h.N5.relations.actions.setInitialInfo(x.id,R,e,t))}),[c]);(0,r.useEffect)((()=>{o||F(n,t)}),[]),(0,r.useEffect)((()=>{z.current=(0,u.pipe)((0,u.concat)(W.map((0,u.prop)("uri"))),u.uniq)(z.current)}),[W]);const B=(0,r.useRef)(W),H=(0,f.z7d)(V,_),$=(0,u.pick)(["entity","relation"],o||{}),G=(0,u.pick)(["entity","relation"],t),q=!(0,f.O27)((0,u.path)(["entity"],t))&&(!(0,u.equals)($,G)||!(0,u.equals)(l,n)||(Y=B.current,X=W,Y.length!==X.length||Y.some(((e,t)=>Y[t]!==X[t]))));var Y,X;const K=M?h.N5.relations.actions.addRelation:h.N5.relations.actions.editRelation,Q=(0,r.useCallback)((0,u.pipe)(h.N5.relations.actions.setRelationType(x.id,R),c),[x,R,c]),J=(0,r.useCallback)((()=>(0,u.pipe)(h.N5.relations.actions.closeRelationEditor,c)(x.id,R)),[x,R,c]),ee=(0,r.useCallback)((e=>{if(n){const t=(0,f.nt9)(S,n.type);return(0,f.wx9)(t,n,e)}return e}),[n,S]),te=(0,r.useCallback)((e=>c(h.N5.modifiedEntities.actions.entityCreated(e))),[c]),ne=(0,r.useCallback)((e=>c(h.N5.modifiedEntities.actions.entityDeleted(e))),[c]),re=(0,r.useCallback)((e=>{n&&ne(n.uri),c(h.N5.relations.actions.setRelationEntity(x.id,R,e)),C&&c(h.N5.errors.actions.errorDeactivated((0,f.iFp)(C)))}),[x.id,R,c,n,ne,C]),ae=(0,r.useCallback)((()=>{const e=(0,f.Bd_)(S,s,t);return c(h.N5.errors.actions.errorsSet(e)),0===e.length}),[t,S,s,c]),oe=(0,r.useCallback)((()=>c(h.N5.errors.actions.errorsSet([]))),[c]),ie=(0,r.useCallback)((0,u.pipe)((0,u.always)(t),(0,u.when)(ae,(0,u.pipe)(f.zhn,ee,(0,u.omit)(["initial"]),K(x.id),c,(0,u.always)((0,u.differenceWith)(u.equals,z.current,W.map((0,u.prop)("uri")))),(0,u.forEach)(ne),J))),[t,x,c,ee,ae,W]),le=(0,r.useCallback)((()=>{n!==l&&(l?(te(l),n&&n.uri!==l.uri&&ne(n.uri)):ne(n.uri));const e=B.current;(0,u.differenceWith)(u.equals,z.current,e.map((0,u.prop)("uri"))).forEach(ne),e.forEach(te),oe(),J()}),[J,te,ne,oe,n,l]),se=(0,r.useCallback)((e=>(0,u.pipe)(h.N5.actions.addAttributes,c)(e.map((e=>P({},e,{viewId:x.id}))))),[x.id,c]),ce=(0,r.useCallback)((e=>(0,u.pipe)(h.N5.actions.modifyAttribute,c)(P({},e,{viewId:x.id}))),[x.id,c]),pe=(0,r.useCallback)((e=>(0,u.pipe)(h.N5.actions.removeAttribute,c)(P({},e,{viewId:x.id}))),[x.id,c]),ue=(0,r.useCallback)(((e,t)=>{const n=(0,f.nt9)(S,e),r=(0,u.pipe)(f.wcJ,(0,f._kX)(w))(n),a=(0,f.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:S,mode:w});re(a),te(a)}),[te,re,w,S]),de=(0,f.e$p)(C),me=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=x;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[x,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:D.editor},a().createElement(g.Z,{className:D.title},M?i().text("Add new item"):i().text("Edit item")),null===H&&a().createElement(y.Z,{className:D.item,relation:t.relation,inRelationTypes:V,outRelationTypes:_,onChange:Q}),Boolean(N)&&a().createElement(a().Fragment,null,a().createElement("div",{ref:j,className:A},a().createElement(b.Z,{errorMessage:de},a().createElement(v.Z,{className:p()(D.item,{[D.dense]:de||t.entity&&(0,f.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:me()||[],max:x.max||20,globalSearchRequestOptions:T,mode:w,onChange:re,onCreate:(0,f.fnZ)(w)?void 0:ue,metadata:S,attributeTypesSelectionStrategy:f.wcJ}))),a().createElement(E.Z,{className:D.item,attrTypes:Z,entity:U,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:w,parentUri:R,onAddAttributes:se,onChangeAttribute:ce,onDeleteAttribute:pe}))),a().createElement("div",{className:D.actionButtons},a().createElement(d.Z,{onClick:le},i().text("Cancel")),a().createElement(d.Z,{color:"primary",disabled:!q,onClick:ie},i().text("Apply"))),a().createElement(m.Z,null))};T.propTypes={connection:f.Rjq,modifiedEntity:f.pyR,initialConnection:f.Rjq,initialModifiedEntity:f.pyR,allModifiedEntities:s().object,dispatch:s().func,config:f.PiC,mode:s().string,metadata:f.pGS,globalSearchRequestOptions:s().object,error:f.wfT,parentEntityUri:s().string,highlightedError:s().object};const C=(0,x.l)(w.NY,((e,t)=>{let{connection:n}=t;const{element:r={},type:a}=e||{},{relationUri:o,relationType:i}=n.relation;return{highlightedError:(0,w.Ie)(a)&&(0,f.Wah)(r,o,i)?e:null}}),T);const I=(0,n(52730).connect)(((e,t)=>{const n=(r=t,h.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(e=>h.N5.relations.selectors.getRelationUriFromConnection(e.connection))(t),o=(0,f.ZiX)(n);return{initialConnection:h.ZP.selectors.getInitialConnection(e,t.config.id,a),initialModifiedEntity:h.ZP.selectors.getInitialConnectionTempEntity(e,t.config.id,a),modifiedEntity:o?h.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:o?h.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:h.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,f.ATu)(t.connection,h.ZP.selectors.getProfileErrors(e))}}))(C)},14593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),o=n(66244),i=n.n(o),l=n(44443),s=n(50914),c=n(71153),p=n.n(c);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){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const g=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:i,minHeight:l,maxWidth:s,maxHeight:c,isStatic:p}=e;return{x:t,y:n,w:r,h:a,minW:i,minH:l,maxW:s,maxH:c,i:o,static:p}},f=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:i,minH:l,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:i,minHeight:l,maxWidth:o,maxHeight:s,id:c,isStatic:m(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},h=e=>(e||[]).map(f),y=(0,s.curry)(((e,t)=>(e||[]).find((0,s.propEq)("id",t)))),b=(0,s.curry)(((e,t,n)=>(0,s.mergeAll)([n,(0,s.pick)(e,t)]))),v=(0,s.curry)(((e,t,n)=>(n||[]).map((n=>(0,s.pipe)((0,s.prop)("id"),y(t),(0,s.defaultTo)({}),b(e,s.__,n))(n))))),E=(0,s.curry)(((e,t)=>t.map((n=>{const r=t.filter((e=>e.y===n.y)).map((t=>e[t.id]||!t.autosizing&&t.minHeight||0)),a=Math.max(...r);if(n.height!==a&&a){const e=n.autosizing?{minHeight:a,maxHeight:a}:{};return u({},n,e,{height:a})}return n})))),x=(0,s.curry)(((e,t)=>t.map((t=>{const n=e[t.id];return n&&t.autosizing?u({},t,{minHeight:n,maxHeight:n,height:n}):t}))));var w=n(79573),k=n(72342),O=n(98858);const P=(0,k.makeStyles)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.customView .react-resizable-handle":{width:"10px",height:"10px"},"&.cssTransforms":{transitionProperty:"transform"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"14px",height:"14px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,O.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}},isResizing:{zIndex:9,willChange:"width, height",pointerEvents:"none"}})));function S(){return S=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},S.apply(this,arguments)}const T={cols:4,rowHeight:30,margin:[15,15]},C=e=>{let{views:t,layout:n,layoutOptions:o=T,onLayoutChanged:c=w.ZT,draggableHandle:u,LayoutItem:d,onRemove:m,onDrop:b,droppingItem:k,isDroppable:O,isStatic:C,classes:I}=e;const R=(0,r.useRef)(),N=(0,r.useRef)({}),L=P(),[M,D]=(0,r.useState)(null),[j,A]=(0,r.useState)(null),[V,_]=(0,r.useState)(0),{cols:Z,rowHeight:U,margin:W}=o,z=(0,r.useMemo)((()=>(e=>(e||[]).map(g))(n)),[n]),F=(0,s.pipe)(h,v(["autosizing"],n),(0,s.ifElse)((0,s.always)(C),E(N.current),x(N.current)),c),B=(0,r.useCallback)((e=>A((t=>t?null:e))),[]),H=null!==j;return a().createElement(a().Fragment,null,a().createElement(l.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>_(e)}),!!V&&a().createElement(i(),{innerRef:R,layout:z,cols:Z,draggableHandle:u,autoSize:!0,rowHeight:U,width:V,margin:W,onLayoutChange:C?void 0:F,isResizable:!C&&!H,isDraggable:!C&&!H,className:p()(null==I?void 0:I.root,L.gridLayout,{[L.gridFullscreen]:H}),onDrop:(e,t,n)=>{b&&b(h(e),f(t),n)},droppingItem:k,isDroppable:!C&&O,onResizeStart:(e,t)=>D(t.i),onResizeStop:()=>D(null),"data-reltio-id":"reltio-grid-layout"},z.map((e=>{const r=j===e.i,i=M===e.i,s=(y(n,e.i)||{}).autosizing?{AutosizeComponent:(c=e.i,a().createElement(l.Z,{handleHeight:!0,onResize:(e,t)=>{if(t){const e=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(t,o);e!==N.current[c]&&(N.current[c]=e,F(z))}}}))}:{};var c;return a().createElement(d,S({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:B,onRemove:m,className:p()(null==I?void 0:I.item,{static:C,fullscreen:r,[L.isResizing]:i}),isFullscreen:r},s))}))))};C.displayName="ReltioGridLayout";const I=(0,r.memo)(C)},40702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var r=n(24328),a=n.n(r),o=n(50914),i=n(17871),l=n(79573),s=n(75047);const c=e=>{let{children:t,className:n,position:a,map:o}=e;const[i,l]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),l(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{i&&n&&i.classList.add(n)}),[n,i]),i?(0,s.createPortal)(t,i):null};var p=n(2507),u=n.n(p),d=n(38677),m=n(78223),g=n(67322),f=n(53857);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 y=e=>a().createElement("svg",h({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));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 v=e=>a().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var E=n(72342);const x=(0,E.makeStyles)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),w=(0,m.Z)(d.Z),k=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:i}=e;const l=x(),s=e=>()=>{o(e)};return a().createElement("div",{className:l.container},t||r?a().createElement(w,{tooltipTitle:u().text("Clear area"),className:l.button,onClick:r?i:s(null)},a().createElement(g.Z,{className:l.icon})):n.map((e=>{const t=(e=>{switch(e){case f.vl.CIRCLE:return y;case f.vl.POLYGON:return v;default:return null}})(e);return a().createElement(w,{tooltipTitle:u().text("Draw area"),key:e,className:l.button,onClick:s(e)},a().createElement(t,{className:l.icon}))})))};var O=n(30721),P=n(80852);const S=(0,E.makeStyles)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",boxSizing:"content-box",padding:"5px","& svg":{width:"16px",height:"16px"}}}),T=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=S();return a().createElement(O.Z,{classes:{root:r.container,label:r.label},control:a().createElement(P.Z,{checked:t,onChange:e=>{n(e.target.checked)},className:r.checkbox}),label:u().text("Search as I move the map")})},C=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),i=r.lat(),l=r.lng(),s=[],c=[];if(!(180===o&&-180===l||-180===o&&180===l)){const e=t.getCenter();s.push([a,e.lng()]),c.push([i,e.lng()])}return[[a,o],...s,[a,l],[i,l],...c,[i,o]]},I=e=>{switch(e){case f.vl.CIRCLE:return window.google.maps.drawing.OverlayType.CIRCLE;case f.vl.POLYGON:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},R=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var N=n(8419),L=n(7421),M=n(98858),D=n(3064);const j=(0,E.makeStyles)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}const V=(0,M.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),_=(0,M.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),Z=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=j(),c=(0,r.useRef)(),[p,u]=(0,r.useState)(!1),{activeEntityUri:d}=(0,r.useContext)(D.P),m=(0,o.pathEq)(["entity","uri"],d,t),g={lat:t.point.lat,lng:t.point.lng},f=(0,r.useCallback)((0,M.DsO)(u,50),[]),h=(0,r.useCallback)((()=>f(!0)),[f]),y=(0,r.useCallback)((()=>f(!1)),[f]),b=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(L.Z,{anchorEl:c.current,open:p,className:s.popper,modal:!1,placement:"top"},a().createElement(N.Z,{entity:t.entity,onMouseOver:h,onMouseOut:y})),a().createElement(i.Jx,A({icon:{url:p||m?V:_,scaledSize:new google.maps.Size(22,32)},position:g,onClick:b,visible:!1!==t.visible,onMouseOver:h,onMouseOut:y},l)),a().createElement(i.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))}));var U=n(62127);const W=(0,E.makeStyles)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});function z(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 B=["drawing"],H=e=>{let{markers:t=[],mapKey:n,defaultZoom:s,defaultCenter:p,loadingElement:u,isSearchOnMapMove:d,isSearchEnabled:m,activeOverlay:g,overlayOptions:h={},drawingModes:y=[],markerClusterer:b,markerClustererOptions:v,mapOptions:E={},mapContainerClassName:x,onMapBoundsChanged:w=l.ZT,onOverlayUpdated:O=l.ZT,onMarkerClicked:P=l.ZT}=e;const S=W(),{isLoaded:N,loadError:L}=(0,i.Ji)({googleMapsApiKey:n,libraries:B}),M=(0,r.useRef)(null),[D,j]=(0,r.useState)(null),[A,V]=(0,r.useState)(null),[_,F]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const i=Boolean(o&&window.google),l=(0,U.D)(t),s=(0,U.D)(n),c=(0,U.D)(i);(0,r.useEffect)((()=>{const e=l!==t,r=c!==i,p=i&&n&&(s!==n||r);i&&!a&&t.length&&(e||r)?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+f.Pi,e.lng()+f.Pi)),r.extend(new window.google.maps.LatLng(e.lat()-f.Pi,e.lng()-f.Pi))}t.fitBounds(r),n&&R(t,n,r)})(t,o,n):p&&R(o,n)}),[i,t,n])})({markers:t,activeOverlay:g,map:D,isSearchOnMapMove:d});const H=(0,r.useMemo)((()=>z({},f.r,h)),[h]),$=(0,r.useMemo)((()=>z({},f.Q3,E)),[E]),G=(0,r.useCallback)((e=>{w(e?C(D):null),F(null),clearTimeout(M.current)}),[D,w]),q=(0,r.useCallback)((()=>{clearTimeout(M.current)}),[]),Y=(0,r.useCallback)((()=>{d&&w(C(D))}),[d,D,w]),X=(0,r.useCallback)((()=>{d&&(clearTimeout(M.current),M.current=setTimeout(Y,1e3))}),[Y,d]),K=(0,r.useCallback)(((e,t)=>{var n;const r=A&&{type:f.vl.POLYGON,overlay:A},a=t||r;if((0,o.isEmpty)(a))return;const{overlay:i,type:l}=a,s={[f.vl.POLYGON]:()=>i.getPath().getArray().map((e=>[e.lat(),e.lng()])),[f.vl.CIRCLE]:()=>({radius:i.getRadius()/1e3,center:i.getCenter()})},c=null===(n=s[l])||void 0===n?void 0:n.call(s);c&&O({data:c,type:l})}),[O,A]),Q=(0,r.useCallback)((e=>t=>{K(null,{type:e,overlay:t}),t.setMap(null),F(null)}),[K]),J=(0,r.useCallback)((()=>{O(null)}),[O]),ee=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(Z,{key:t.id,marker:t,clusterer:e,onClick:P})));if(L)return null;if(!N)return u;const te=m&&Boolean(y.length),ne=D&&m&&Boolean(y.length),re=D&&m,ae=!I(_)&&g&&(0,o.propEq)("type",f.vl.POLYGON,g);return a().createElement(i.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:$,onLoad:j,zoom:s,center:p,onZoomChanged:q,onDragStart:q,onIdle:X,mapContainerClassName:x},ne&&a().createElement(c,{className:S.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:D},a().createElement(k,{hasActiveOverlay:!!g,drawingModes:y,drawingMode:_,onDrawingModeChanged:F,onClearOverlay:J})),re&&a().createElement(c,{className:S.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:D},a().createElement(T,{onChangeIsSearchOnMapMove:G,isSearchOnMapMove:d})),b?(oe=v,a().createElement(i.XL,{options:oe},ee)):ee(),ae&&a().createElement(i.mg,{onLoad:V,path:g.path,editable:!0,options:H,onMouseUp:K,onDragEnd:K}),te&&a().createElement(i.j_,{onPolygonComplete:Q(f.vl.POLYGON),onCircleComplete:Q(f.vl.CIRCLE),drawingMode:I(_),options:{drawingControl:!1,circleOptions:H,polygonOptions:H}}));var oe}},55310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o);const l=e=>{let{height:t,margin:n}=e;return i().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};l.propTypes={height:a().number,margin:a().number};const s=l},589:(e,t,n)=>{"use strict";n.d(t,{u:()=>u});var r=n(24328),a=n(52730),o=n(50914),i=n(98858),l=n(29945);const s={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:i.VGB,refRelation:i.VGB}),p=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,u=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(l.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(l.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(l.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(l.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=i.nwO.HistoryManager.createHistoryManager().computeEntityHistoryDiff(p(o===i.Z9$.Current?c:r),p(n));e(l.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||s}},48211:(e,t,n)=>{"use strict";n.d(t,{s:()=>Je});var r=n(24328),a=n.n(r),o=n(98858),i=n(71153),l=n.n(i),s=n(80516),c=n(2507),p=n.n(c),u=n(23883),d=n(28831),m=n(94215),g=n(50914),f=n(52730),h=n(29945),y=n(19701),b=n(14834),v=n(35782),E=n(36571),x=n(35860),w=n(53880),k=n(72342);const O=(0,k.makeStyles)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}}),P=e=>{let{taskId:t,dueDate:n,isTaskOpen:i,className:s}=e;const c=O(),{updateDueDate:u,updateRequestIsInProgress:d,readOnly:m}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(b.O)||{},l=(0,f.useSelector)(h.ZP.selectors.getWorkflowPath),s=(0,f.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,f.useSelector)(h.ZP.selectors.getTenant),p=(0,y._)(),[u,d]=(0,r.useState)(!1),m=(0,E.Z)()("UPDATE_TASK")&&(0,x.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{l&&m&&n&&e&&t!==e&&(d(!0),p((0,o.KF3)({taskId:n,workflowPath:l,environment:s,tenant:c,dueDate:e})).then((()=>{null==i||i(n,{dueDate:e})})).catch(v.R).finally((()=>{d(!1)})))}),[l,n,s,c,i,p,t,m]),updateRequestIsInProgress:u,readOnly:!m}})({dueDate:n,taskId:t,isOpen:i});return a().createElement(w.Z,{disabled:d||m,value:n,label:p().text("Due date"),onChange:(0,g.pipe)((e=>e&&e.getTime()),u),slotProps:{textField:{className:l()(c.dueDate,s),size:"small",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}}}})};var S=n(84425);const T=e=>{let{taskId:t,priority:n,isTaskOpen:i,className:l}=e;const{priorities:s,updatePriority:c,updateRequestIsInProgress:u,readOnly:d}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(b.O)||{},l=(0,f.useSelector)(h.ZP.selectors.getWorkflowPath),s=(0,f.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,f.useSelector)(h.ZP.selectors.getTenant),u=(0,y._)(),[d,m]=(0,r.useState)(!1),g=(0,E.Z)()("UPDATE_TASK")&&(0,x.tg)(a),w=(0,r.useCallback)((e=>{const{value:r}=e;l&&g&&n&&t!==r&&(m(!0),u((0,o.ax9)({taskId:n,workflowPath:l,environment:s,tenant:c,priority:r})).then((()=>{null==i||i(n,{priority:r})})).catch(v.R).finally((()=>{m(!1)})))}),[l,n,s,c,i,u,t,g]);return{priorities:(0,r.useMemo)((()=>[{label:p().text("Low"),value:o.NVC.low},{label:p().text("Medium"),value:o.NVC.medium},{label:p().text("High"),value:o.NVC.high},{label:p().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:w,updateRequestIsInProgress:d,readOnly:!g}})({taskId:t,priority:n,isOpen:i}),m=u||d;return a().createElement(S.Z,{className:l,isDisabled:m,options:s,onChange:c,hideSelectedOptions:!1,label:p().text("Priority"),value:s.find((0,g.propEq)("value",n)),TextFieldProps:{disabled:m},height:40})};var C=n(58365),I=n(94009);const R=(0,k.makeStyles)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}});var N=n(56961);const L=e=>{let{className:t,children:n,plain:r,first:o,last:i,transparent:s,divider:c}=e;const p=R();return a().createElement("div",{className:l()(t,p.decorator)},a().createElement("div",{className:l()(p.lineBlock,{[p.withLinePadding]:o})},!s&&a().createElement(a().Fragment,null,a().createElement("div",{className:p.noLine}),a().createElement("div",{className:l()(p.line,{[p.plain]:r},{[p.last]:i})}))),a().createElement("div",{className:p.content},n,c&&a().createElement(N.Z,{className:p.rowDivider,light:!0,variant:"inset"})))};let M={};const D=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let j=0;function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(this,arguments)}const V=e=>a().createElement("svg",A({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().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:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"})));var _=n(35536);const Z=(0,k.makeStyles)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}}))),U=e=>{let{task:t,children:n,actions:o,Icon:i}=e;const{taskId:c,dueDate:g,priority:f,assignee:h,createdBy:y,createTime:b,displayName:v,processDefinitionDisplayName:w,objectURIs:k,processInstanceComments:O,possibleActions:S,isOpen:R,preferredAction:N}=t,A=(0,x.Xs)(k),U=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return M[n]||(M[n]=D[j],j++,j>D.length-1&&(j=0)),M[n]})({processDefinitionDisplayName:w}),W=Z({color:U}),[z,F]=(0,r.useState)(!1),B=(0,E.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS"),{actions:H,actionRequestIsInProgress:$}=(0,_.t)({taskId:c,possibleActions:S,assignee:h,isOpen:R});return a().createElement("div",{className:W.card},a().createElement("div",{className:l()({[W.withBackground]:z})},a().createElement("div",{className:W.lineWrapper},a().createElement("div",{className:W.line}),i&&a().createElement(i,{className:W.icon}),a().createElement(L,{plain:!0,first:!0,transparent:!z},a().createElement("div",{className:W.mainInfo},a().createElement("div",{className:W.title},a().createElement("div",{className:l()(W.caption,W.flex)},p().text(w)),a().createElement(s.Z,{className:W.flag}),a().createElement(u.Z,{title:p().text("Due date")},a().createElement("span",{className:W.date},p().date(g,"L"))),a().createElement(d.Z,{isOpen:z,size:"L",onClick:()=>{F(!z)}})),a().createElement("div",{className:W.infoBlock,"data-reltio-id":"info-block"},a().createElement("div",{className:W.flex},A&&a().createElement("div",{className:W.info},p().text("DCR ID"),": ",a().createElement("span",{className:W.infoValue},A)),a().createElement("div",{className:W.info},p().text("Created by"),": ",a().createElement("span",{className:W.infoValue},y)," ",p().text("on")," ",a().createElement("span",{className:W.infoValue},p().date(b,"L"))),a().createElement("div",{className:W.info},p().text("Step"),": ",a().createElement("span",{className:W.infoValue},v)),B&&(null==O?void 0:O.length)>0&&a().createElement("div",{className:W.commentsInfo},a().createElement(V,{className:W.commentsIcon}),a().createElement("div",{className:W.infoValue},O.length))),o||a().createElement(I.Z,{actions:H,isInProgress:$}))))),z&&a().createElement(L,{plain:!0},a().createElement("div",{className:W.controlsBox},a().createElement("div",{className:W.controlsInRow},a().createElement(P,{taskId:c,dueDate:g,isTaskOpen:R}),a().createElement(T,{taskId:c,priority:f,className:W.priority,isTaskOpen:R})),a().createElement(m.Z,{taskId:c,assignee:h,isTaskOpen:R})))),z&&a().createElement(a().Fragment,null,n,B&&a().createElement("div",{className:W.comments},a().createElement(C.V,{workflowActions:H,actionRequestIsInProgress:$,preferredAction:N,taskId:c,processInstanceComments:O,isTaskOpen:R}))))};function W(){return W=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},W.apply(this,arguments)}const z=e=>a().createElement("svg",W({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));var F=n(26978);const B=(e,t)=>{switch(e){case o.VI$.CREATE_RELATIONSHIP:case o.VI$.INSERT_ATTRIBUTE:return o.ws7.ADDED;case o.VI$.UPDATE_TAGS:case o.VI$.UPDATE_ROLES:case o.VI$.UPDATE_ATTRIBUTE:return o.ws7.EDITED;case o.VI$.DELETE_ATTRIBUTE:case o.VI$.DELETE_RELATIONSHIP:return o.ws7.DELETED;case o.VI$.PIN_ATTRIBUTE:return null!=t&&t.pin?o.ws7.PIN_DELETED:o.ws7.PINNED;case o.VI$.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?o.ws7.IGNORE_DELETED:o.ws7.IGNORED}},H=e=>({[o.ws7.ADDED]:p().text("added"),[o.ws7.EDITED]:p().text("edited"),[o.ws7.DELETED]:p().text("deleted"),[o.ws7.PINNED]:p().text("pinned"),[o.ws7.PIN_DELETED]:p().text("pin deleted"),[o.ws7.IGNORED]:p().text("ignored"),[o.ws7.IGNORE_DELETED]:p().text("ignore deleted")}[e]||""),$=(e,t)=>(0,g.when)((0,g.allPass)([(0,g.pipe)((0,g.prop)("type"),(0,g.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,g.evolve)({type:(0,g.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));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){q(e,t,n[t])}))}return e}function q(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,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,g.pathOr)([],["value",t.name])(n),i=(0,g.pathOr)([],["value",t.name])(r),l=Math.max(o.length,i.length);return(0,g.times)((e=>[{value:{newValue:o[e],oldValue:i[e],type:a}}]),l)}const n=e[t.name];return n?[n]:[]},X=(0,g.curry)(((e,t,n)=>{const r=(0,F.U)(e,t.type,[],[]);return Q(e,r,n)})),K=(0,g.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),i=(0,o.xF8)(e,t.type);return(0,g.flatten)([G({level:1,label:(0,g.propOr)("","label",a),attributeType:a,attributeValue:G({},t,n)},((e,t)=>{if(t===o.VI$.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=B(t);return e?{operation:e}:{}}return{}})(n,r)),Q(e,i,n,2)])})),Q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,g.flatten)(t.map((t=>Y(n,t).map((n=>n.map((n=>J(e,t,n,r))))))).filter((0,g.complement)(g.isEmpty)))},J=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return ee(e,t,n,r);case o.oS0.TYPE_REFERENCE:return te(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,g.is)(Object,n)?n:{newValue:t,type:o.VI$.INSERT_ATTRIBUTE}})(t,n);return ne(t,e,r)}}},ee=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},te=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},Q(e,a,n.value,r+1)]},ne=(e,t,n)=>{const{newValue:r,oldValue:a,type:i}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===o.VI$.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:B(i,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function re(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){ae(e,t,n[t])}))}return e}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oe=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],ie=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),i=a(t),l=a(n);return i&&l?[{type:o.VI$.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:i?[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:l?[{type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},le=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,i=a===o.VI$.UPDATE_ROLES?(0,o.xqc)(e):g.identity,l=(0,g.difference)(n,r),s=(0,g.difference)(r,n),c=[];return l.length&&c.push({type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:l.map(i).join(", ")}}),s.length&&c.push({type:o.VI$.DELETE_ATTRIBUTE,oldValue:{value:s.map(i).join(", ")}}),c},se=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,i=t===o.VI$.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,i].join("/")}return i})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var i;const n=r[e],o=r[e+1],l=(a[n]||[]).find((0,g.propEq)("id",o)),s=r.length===e+2?t:{},c=l||{id:o,value:s},p=(null===(i=t.refObjectURI)||void 0===i?void 0:i.indexOf(o))>=0&&t.refObjectURI;p&&(c.refObjectURI=p),(0,g.isNil)(l)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},ce=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:i,tags:l,defaultProfilePicValue:s}=t,c=re({},n);return s&&(c.defaultProfilePicValue=[s]),i&&(c[o.xPW.roles.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:i.map((0,o.xqc)(e)).join(", ")}}]),l&&(c[o.xPW.tags.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:l.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:o.VI$.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},pe=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case o.VI$.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case o.VI$.UPDATE_TAGS:r[o.xPW.tags.name]=le(e,n);break;case o.VI$.UPDATE_ROLES:r[o.xPW.roles.name]=le(e,n);break;case o.VI$.UPDATE_START_DATE:r[o.xPW.startDate.name]=ie(n);break;case o.VI$.UPDATE_END_DATE:r[o.xPW.endDate.name]=ie(n);break;case o.VI$.CREATE_RELATIONSHIP:case o.VI$.CREATE_ENTITY:return re({},r,ce(e,n.newValue));case o.VI$.INSERT_ATTRIBUTE:case o.VI$.UPDATE_ATTRIBUTE:case o.VI$.DELETE_ATTRIBUTE:case o.VI$.PIN_ATTRIBUTE:case o.VI$.IGNORE_ATTRIBUTE:se(r,n)}return r};var ue=n(55485);const de=(0,k.makeStyles)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),me=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const i=de();return a().createElement(ue.Z,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:i.linkLabel},n?p().text("View less suggestions"):p().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var ge=n(69621),fe=n(19926);const he=(0,k.makeStyles)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),ye=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:i}=e;const s=he(),c=n||r;return a().createElement("div",{className:l()(s.field,i)},a().createElement("span",{className:s.fieldName},t,":"),!(0,g.isNil)(c)&&a().createElement("span",{className:s.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(ge.Z,{className:s.arrow}),r)),o&&a().createElement(fe.Z,{variant:"outlined",label:H(o),className:l()(s.chip,o)}))},be=a().createContext(null);be.displayName="AttributesChangesContext";var ve=n(67586),Ee=n(18527);const xe=(0,k.makeStyles)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),we=e=>{let{label:t,level:n,attributeType:i,attributeValue:s,oldValue:c,newValue:p,operation:u}=e;const d=xe({level:n}),m=(0,f.useSelector)(h.ZP.selectors.getEntityUri),y=(0,r.useContext)(be),b=(0,r.useCallback)((()=>{if((0,o.YkG)(i)){var e,t,n;const r=null!==(e=null===(t=s.value)||void 0===t?void 0:t.newValue)&&void 0!==e?e:null===(n=s.value)||void 0===n?void 0:n.oldValue;return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o[t.refObjectURI];return i?(a=n===i.startObjectUri?i.endObjectUri:i.startObjectUri,r=n===i.startObjectUri?i.endObjectLabel:i.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(i,r||s,m,y)}if("endObject"in i){const{endObjectUri:e,endObjectLabel:t}=s;return{objectUri:e,objectLabel:t}}}),[i,s,m,y]),v=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=b()||{};if(!(0,g.isNil)(e)&&!(0,g.isNil)(t)){var n;const r=!1===(null===(n=y[e])||void 0===n?void 0:n.isExist);return a().createElement(Ee.Z,{value:e,className:l()(d.linkContainer,{[d.disabledLink]:r})},a().createElement("span",{className:l()(d.linkLabel,{[d.label]:r})},(0,o.idV)(t)))}return null}),[b,y,d]),E=(0,r.useMemo)((()=>a().createElement("span",null,t,v())),[t,v]),x=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(ve.Z,{value:t,dataTypeDefinition:$(i,t)})}),[i]);return a().createElement(ye,{className:d.change,label:E,oldValue:c&&x(c),newValue:p&&x(p),operation:u})},ke=(0,k.makeStyles)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});function Oe(){return Oe=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},Oe.apply(this,arguments)}const Pe=e=>{let{changes:t}=e;const n=ke();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,g.has)("level",e)?a().createElement(we,Oe({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},Se=(0,g.pipe)((0,g.filter)((0,g.has)("operation")),g.length);function Te(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 Ie=(0,g.filter)((0,g.pipe)((0,g.prop)("uri"),o.WgC)),Re=(0,g.filter)((0,g.pipe)((0,g.prop)("uri"),o.bC9)),Ne=(e,t)=>(0,g.filter)((0,g.allPass)([(0,g.pipe)((0,g.prop)("uri"),o.bC9),(0,g.pipe)((0,g.prop)("startObjectUri"),(0,g.equals)(t))]))(e),Le=(0,g.curry)(((e,t)=>({entity:t,relations:Ne(e,t.uri)}))),Me=(0,g.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Te({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),De=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,g.pipe)((0,g.pathOr)([],[a,"relations"]),(0,g.concat)(r),g.uniq)(e);return e[a]={entity:n,relations:o},e},je=e=>e.type===o.VI$.CREATE_ENTITY,Ae=(0,k.makeStyles)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),Ve=e=>{let{changes:t,dcrUri:n,objectsInfo:i,entityInfo:l,relationsInfo:s,max:c}=e;const u=Ae(),d=(0,f.useSelector)(h.ZP.selectors.getMetadata),[m,y]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,g.pipe)((0,g.pick)([t]),X(e,n)),i=(0,g.curry)(((e,t)=>(0,g.reduce)(((e,n)=>(0,g.concat)(e,n(t))),[],e))),l=(0,g.propOr)([],n.uri)(t).reduce(((t,r)=>pe(e,n,r,t)),{}),s=r.map((n=>((e,t,n)=>(0,g.propOr)([],n.uri)(t).reduce(((t,r)=>pe(e,n,r,t)),{}))(e,t,n)));return[i([(0,g.pipe)((0,g.omit)(oe),X(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],l),(0,g.flatten)(r.map(((n,r)=>{const a=(0,g.path)([n.uri,0,"type"],t);return K(e,n,s[r],a)})))]})(d,t,l,s)),[d,t,l,s]),b=(0,r.useMemo)((()=>{const e={label:p().text("Relationships")};return y.length>0?(0,g.flatten)([m,e,y]):m}),[m,y]),{isExpanded:v,onToggle:E,itemsToShow:x,collapsedSuggestionsCount:w}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),i=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),l=(0,r.useMemo)((()=>Se(e)),[e]),s=(0,r.useMemo)((()=>Se(i)),[i]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:i,collapsedSuggestionsCount:l-s}}(b,c),k=(0,g.ifElse)((0,g.any)(je),(0,g.always)(((e,t)=>`${e}/changes/${t}`)(n,l.uri)),(0,g.always)((0,o.wwR)(l)))((0,g.propOr)([],l.uri,t)),O=(0,g.ifElse)((0,g.any)(je),(0,g.always)("dcrReview"),(0,g.always)("profile"))((0,g.propOr)([],l.uri,t));return a().createElement(be.Provider,{value:i},a().createElement("div",{className:u.container},a().createElement(Ee.Z,{className:u.uri,value:k,screen:O},a().createElement("div",{className:u.label},(0,o.idV)(l.label))),a().createElement(Pe,{changes:x}),w>0&&a().createElement(me,{onClick:E,suggestionsCount:w,isExpanded:v,className:u.showMoreLink})))};function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=e=>{let{task:t}=e;const{objectURIs:n}=t,i=(0,x.rc)(n),{dcr:l,groupedObjects:s}=(e=>{const[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(null),l=(0,y._)(),s=(0,r.useCallback)((e=>(0,g.isEmpty)(e)?Promise.resolve([]):l((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,g.pipe)(g.keys,(0,g.filter)((t=>(0,g.prop)([t],e))),(0,g.map)((e=>Te({},t[e],{uri:e}))))(t))(t,r),o=(0,g.pipe)(Ie,(0,g.map)(Le(a)))(a),l=(0,g.pipe)(Re,(0,g.map)(Me(r)))(a),[c,p]=(0,g.partition)((0,g.has)("entity"),l),u=p.map((0,g.path)(["relations",0,"startObjectUri"]));s(u).then((e=>{const t=p.map(((t,n)=>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){_e(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,g.pipe)(g.flatten,(0,g.reduce)(De,{}),g.values,n)([o,c,t])})).catch(v.l),i(e)})).catch(v.l)}),[e,s]),{dcr:a,groupedObjects:t}})(i);return a().createElement(U,{task:t,Icon:z},l&&s.map(((e,t)=>a().createElement(L,{key:t,last:t===s.length-1,divider:!0},a().createElement(Ve,{entityInfo:e.entity,relationsInfo:e.relations,changes:l.changes,objectsInfo:l.objectsInfo,dcrUri:i})))))},Ue=(0,k.makeStyles)({pmCard:{marginLeft:"-15px"}});function We(){return We=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},We.apply(this,arguments)}const ze=e=>a().createElement("svg",We({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var Fe=n(23044),Be=n(20200);const He={showTransitiveMatches:!0,showInactiveEntities:!1},$e=e=>{let{task:t}=e;const n=Ue(),{objectURIs:r}=t,o=(0,f.useSelector)(h.ZP.selectors.getEntity),i=(0,f.useSelector)(h.ZP.selectors.getMetadata),{matches:l,entitiesMap:s}=(0,Fe.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:He}),c=null==l?void 0:l.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(U,{task:t,Icon:ze},c&&a().createElement(L,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(Be.M,{metadata:i,entity:o,match:c,entitiesMap:s}))))};function Ge(){return Ge=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},Ge.apply(this,arguments)}const qe=e=>a().createElement("svg",Ge({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}const Xe=e=>a().createElement("svg",Ye({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class Ke{}Ke.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(Ze,{task:t});case o.Yj_.potentialMatchReview:return a().createElement($e,{task:t});case o.Yj_.recommendForDelete:return a().createElement(U,{task:t,Icon:Xe});default:return a().createElement(U,{task:t,Icon:qe})}};const Qe=Ke,Je=e=>{let{task:t}=e;return Qe.build({task:t})}},37778:(e,t,n)=>{"use strict";n.d(t,{G:()=>S});var r=n(24328),a=n.n(r),o=n(2507),i=n.n(o),l=n(38677),s=n(93553),c=n(36571),p=n(53242),u=n(83820),d=n(10050),m=n(47019),g=n(79312),f=n(90590),h=n(29945),y=n(98858),b=n(52730),v=n(19701),E=n(14834),x=n(35782),w=n(72342);const k=(0,w.makeStyles)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),O=e=>{let{anchorEl:t,onClose:n}=e;const o=k(),[s,c]=(0,r.useState)(""),[w,O]=(0,r.useState)(null),[P,S]=(0,r.useState)(!1),{definitions:T}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,b.useSelector)(h.ZP.selectors.getWorkflowPath),a=(0,b.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,b.useSelector)(h.ZP.selectors.getTenant),i=(0,b.useSelector)(h.ZP.selectors.getEntity).type,l=(0,v._)();return(0,r.useEffect)((()=>{l((0,y.IU6)({workflowPath:n,environment:a,tenant:o})).then((e=>{let{data:n}=e;n&&t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,i))}))}),[i,n,a,o]),{definitions:e}})(),{processInstance:C,loading:I}=(()=>{const{loadTasks:e}=(0,r.useContext)(E.O),t=(0,b.useSelector)(h.ZP.selectors.getWorkflowPath),n=(0,b.useSelector)(h.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,b.useSelector)(h.ZP.selectors.getTenant),o=(0,b.useSelector)(h.ZP.selectors.getEntity).uri,[i,l]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,i)=>(l(!0),(0,y.$ju)({workflowPath:t,tenant:a,environment:n,processType:i,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,x.R)(e),e})).finally((()=>{l(!1)})))),[o,n,e,a,t]),loading:i}})(),R=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(m.ZP,{open:R,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(g.Z,{className:o.title},i().text("Add new workflow")),a().createElement(f.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:i().text("Select task type"),value:w,onChange:e=>{O(e)},label:"",options:T.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(p.Z,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:s,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(l.Z,{disabled:I,className:o.cancelButton,onClick:n},i().text("Cancel")),a().createElement(l.Z,{disabled:I,color:"primary",onClick:()=>{C(s,null==w?void 0:w.value).then((()=>{S(!0),c(""),O(null),n()})).catch((()=>{}))}},i().text("Start")))),a().createElement(u.Z,{container:document.body},a().createElement(d.Z,{open:P,autoHideDuration:5e3,onClose:()=>{S(!1)},message:i().text("A new workflow has started")})))},P=(0,w.makeStyles)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),S=()=>{const e=P(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),p=o("START_PROCESS_INSTANCE"),u=o("VIEW_PROCESS_DEFINITIONS");return p&&u?a().createElement(a().Fragment,null,a().createElement(l.Z,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(s.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},i().text("Add"))),a().createElement(O,{anchorEl:t,onClose:()=>n(null)})):null}},39636:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var r=n(24328),a=n.n(r),o=n(50914),i=n(38677),l=n(35536);const s=e=>{let{task:t}=e;const{taskId:n,possibleActions:r,assignee:s,isOpen:c,preferredAction:p}=t,{actions:u,actionRequestIsInProgress:d}=(0,l.t)({taskId:n,possibleActions:r,assignee:s,isOpen:c}),[m,g]=(0,o.partition)((0,o.propEq)("text",p.label),u);return a().createElement(a().Fragment,null,g.map((e=>a().createElement(i.Z,{variant:"outlined",onClick:e.onClick,key:e.text,disabled:d},e.text))),m.map((e=>a().createElement(i.Z,{variant:"contained",color:"primary",onClick:e.onClick,key:e.text,disabled:d},e.text))))}},27938:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(50914),i=n(29945),l=n(98858),s=n(19701),c=n(36571);const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},d=(0,s._)(),m=(0,a.useSelector)(i.ZP.selectors.getWorkflowPath),g=(0,a.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(i.ZP.selectors.isWorkflowEnabled),h=(0,a.useSelector)(i.ZP.selectors.getTenant),y=(0,a.useSelector)(i.ZP.selectors.getEntityUri),b=(0,a.useSelector)(i.ZP.selectors.getIsEditableMode),v=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),E=(0,c.Z)()("VIEW_TASKS"),x=!(!m||!g)&&f&&E,[w,k]=(0,r.useState)(null),[O,P]=(0,r.useState)(0),[S,T]=(0,r.useState)(!1),C=(0,r.useCallback)((()=>{T(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,l.uT0)({entityUri:(0,l.FP6)(y)?(0,l.$Rg)(y):y,workflowPath:m,environment:g,tenant:h,filter:{assignee:n,processType:e},includeClosed:!!p})));d(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);k(r),P(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{T(!1)}))}),[y,g,d,h,m,n,p,t,v]);return(0,r.useEffect)((()=>{y&&x&&!(0,l.ZiX)(y)?C():(k(null),P(0))}),[x,y,C,b]),{tasks:w,total:O,loading:S,updateTaskState:(0,r.useCallback)(((e,t)=>{k((0,o.map)((0,o.when)((0,o.propEq)("taskId",e),(0,o.mergeLeft)(t))))}),[]),loadTasks:C}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},53857:(e,t,n)=>{"use strict";n.d(t,{vl:()=>r,r:()=>a,Q3:()=>o,Pi:()=>i});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o={mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},i=.001},3064:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},42719:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="InterceptHandlersContext"},14235:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(24328);const a=n.n(r)().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}})},42821:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(98858);function a(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){o(e,t,n[t])}))}return e}function o(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=(e,t)=>e?(!(null==t?void 0:t.some((t=>{var n;const r=null===(n=e.match(/^(https?:\/\/[^:/?#]*).*$/))||void 0===n?void 0:n[1],a=new RegExp("^"+t+"$"),o=t.replace(/\/*$/,"");return o===e||r&&r===o||(null==o?void 0:o.startsWith("/"))&&(null==e?void 0:e.startsWith(o))||t&&a.test(e)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"},l=async(e,t)=>{const{accessToken:n}=await(0,r.hPi)({servicesPath:t});return n?a({},e,{Authorization:`Bearer ${n}`}):e},s=e=>{let{params:t,permissions:n,worker:o,metadata:s,config:c,apiPath:p,servicesPath:u,user:d,workflowPath:m,entity:g,tenant:f,entityUri:h,query:y,openSearch:b,environment:v,getCurrentPerspectiveId:E,showPerspective:x,workflowCheckPermission:w,setEntityUri:k}=e;const{name:O,url:P,data:S,method:T,validationUrl:C}=t,I=e=>{e.then((e=>e.json?e.json():e)).then((e=>{o.postMessage(a({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:t.headers,status:200}},t))})).catch((e=>{o.postMessage(a({action:"response",result:{data:JSON.parse(JSON.stringify(e)),headers:t.headers,status:0}},t))}))};switch(O){case r.MVv.API:I((async()=>{const e=i(C,n);if(e)return Promise.reject(e);const a=await l(t.headers,u);return await(0,r.SL_)({url:P,method:T,data:S,headers:a,noRequestProcessor:!0})})());break;case r.MVv.WORKFLOW:I((async()=>{const e=i(C,n);if(e)return e;const a=P.includes("http:")||P.includes("https:");if(!m&&!a)return{errorMessage:"Workflow path is not defined"};const o=await l(t.headers,u);return await(0,r.oUH)({url:P,method:T,data:S,tenant:f,headers:o,workflowPath:m})})());break;case r.MVv.WORKFLOW_START_PROCESS_FROM_QUERY:I((()=>{if(!t.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!t.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!m)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const e=i("/processInstances/_generateFromQuery",n);return e?new Promise((t=>t(e))):(0,r.FuV)({workflowPath:m,processType:t.processDefinitionId,searchString:t.searchString,tenant:f,environment:v})})());break;case r.MVv.GET_CONFIGURATION:o.postMessage(a({action:"response",result:s},t));break;case r.MVv.GET_UI_CONFIGURATION:{const e=a({},c,{action:a({},c.action)});e.action.permissions&&delete e.action.permissions,o.postMessage(a({action:"response",result:e},t));break}case r.MVv.SET_ENTITY_URI:{const e=e=>o.postMessage(a({action:"response",result:e},t));k(t.entityUri,e);break}case r.MVv.SET_PERSPECTIVE:x(t.perspective),o.postMessage(a({action:"response",result:E()},t));break;case r.MVv.GET_PERSPECTIVE:E&&o.postMessage(a({action:"response",result:E()},t));break;case r.MVv.WORKFLOW_CHECK_PERMISSION:o.postMessage(a({action:"response",result:w(t.permission)},t));break;case r.MVv.GET_SEARCH_QUERY:o.postMessage(a({action:"response",result:y},t));break;case r.MVv.OPEN_SEARCH:b({viewId:c.id,searchState:t.searchState||{}});break;case r.MVv.GET_ENTITY_URI:o.postMessage(a({action:"response",result:h},t));break;case r.MVv.GET_ENTITY:o.postMessage(a({action:"response",result:g},t));break;case r.MVv.GET_API_PATH:o.postMessage(a({action:"response",result:p},t));break;case r.MVv.WORKFLOW_GET_WORKFLOW_PATH:o.postMessage(a({action:"response",result:m},t));break;case r.MVv.GET_TENANT:o.postMessage(a({action:"response",result:f},t));break;case r.MVv.GET_USER:o.postMessage(a({action:"response",result:d},t));break;case r.MVv.ALERT:o.postMessage(a({action:"response",result:window.alert(t.text)},t));break;case r.MVv.CONFIRM:o.postMessage(a({action:"response",result:window.confirm(t.text)},t));break;case r.MVv.PROMPT:o.postMessage(a({action:"response",result:window.prompt(t.text,t.defaultText||"")},t));break;case r.MVv.OPEN_WINDOW:window.open(t.url,"_blank");break;case r.MVv.RELOAD_PAGE:location.reload()}}},48221:(e,t,n)=>{"use strict";n.d(t,{Hk:()=>l,sz:()=>s,jm:()=>c,n:()=>p,Rw:()=>u,JN:()=>d,aZ:()=>g,R3:()=>f,Yo:()=>h});var r=n(98858),a=n(37164);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){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{const{files:t,platform:n}=e||{};return!(0,r.O27)(t)&&n!==r.X1H.CLASSIC},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some((t=>{const n=new RegExp(`^${t}$`);return t.replace(/\/*$/,"")===e||t&&n.test(e)}))},c=(e,t)=>`${e.replace(`${t}/`,"")}worker_api.js`,p=(e,t,n,r)=>e.startsWith(t)?`${n}${e.replace(t,"")}`:`${n}/api/${r}${e}`,u=(e,t,n)=>`${n}${e.replace(t,"")}`,d=(e,t,n,a)=>{const{url:i,name:l}=e.params;if(!i)return e;const s=l===r.MVv.API,c=i.startsWith("/")&&!i.startsWith(t)&&s?`${t}/api/${a}${i}`:i.replace(n,t);return o({},e,{params:o({},e.params,{url:c,validationUrl:i})})},m=(e,t,n)=>{let r=[];const a=e.getAttribute("ui-actions"),i=e.getAttribute("ui-tooltip"),l=e.getAttribute("id")||e.getAttribute("name");return a&&(a.split(",").forEach((n=>{const a=e=>{var r;const a=e.target,i=r=>{t.postMessage({action:"event",type:"uiAction",data:{type:n,id:l,event:o({},e,{files:r})}})};null!==(r=a.files)&&void 0!==r&&r.length?(e=>{const t=Array.from(e).map((e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=n=>{const r=n.target.result,{lastModified:a,name:o,size:i,type:l}=e;t({lastModified:a,name:o,size:i,type:l,content:r})},r.onerror=e=>{n(e)},r.readAsArrayBuffer(e)}))));return Promise.all(t)})(a.files).then(i):i()};e.addEventListener(n,a),r.push((()=>{e.removeEventListener(n,a)}))})),e.removeAttribute("ui-actions")),i&&n(i),e.childNodes.forEach((e=>{1===e.nodeType&&(r=r.concat(m(e,t,n)))})),r},g=e=>{let{worker:t,setTooltip:n,innerText:r,html:a,setListenersToReset:o,setHtml:i}=e;const l=document.createElement("div");l.innerHTML=a||r,o(m(l,t,n)),i(l)},f=e=>{let{apiPath:t,reltioPath:n,tenant:r,processApiRequest:o,workerRef:i,setRequestListeners:l}=e;return e=>{let{url:c,next:u,resolve:d,options:m={}}=e;const g=p(c,t,n,r);if(s(g,o)){const e=(0,a.x0)();l(m,u,e,d),i.current.postMessage({action:"apiRequest",id:e,url:g,method:m.method,headers:m.headers,data:m.body})}else u(c,m)}},h=e=>{let{reltioPath:t,apiPath:n,processApiResponse:r,workerRef:o,setResponseListeners:i}=e;return e=>{let{url:l,response:c,next:p,options:d,abort:m}=e;const g=u(l,n,t);if(s(g,r)){const e=(0,a.x0)();c.json().then((t=>{i(p,e),o.current.postMessage({action:"apiResponse",id:e,url:g,method:d.method,data:t})})).catch((e=>{m(e)}))}else p(c)}}},52241:(e,t,n)=>{"use strict";n.d(t,{E:()=>w});var r=n(24328),a=n(52730),o=n(29945),i=n(98858),l=n(50914),s=n(36571),c=n(24330),p=n.n(c);const u={attributes:{"*":["accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","checked","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","disabled","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","y","y1","y2","yChannelSelector","z","zoomAndPan","ui-actions","ui-tooltip"],img:["src","srcset","alt","title","loading"],link:["href","rel"],iframe:["src"],a:["href"]},tags:["animate","animateColor","animateMotion","animateTransform","mpath","set","circle","ellipse","line","polygon","polyline","rect","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","feDistantLight","fePointLight","feSpotLight","circle","ellipse","line","path","polygon","polyline","rect","defs","g","svg","symbol","use","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","textPath","text","tref","tspan","altGlyph","textPath","tref","tspan","clipPath","color-profile","cursor","filter","foreignObject","script","style","view","a","link","input","button","iframe","img"]};function d(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){m(e,t,n[t])}))}return e}function m(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=()=>{const{allowedAttributes:e,allowedTags:t}=p().defaults,{attributes:n,tags:r}=u,a={allowedTags:t.concat(r),allowedAttributes:d({},e,n),allowVulnerableTags:!0};return e=>p()(e,a)};var f=n(43751),h=n(14235),y=n(42719),b=n(42821),v=n(48221);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){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{processApiRequest:t,processApiResponse:n,platform:c}=e.action||{},[p,u]=(0,r.useState)(),[d,m]=(0,r.useState)([]),[x,w]=(0,r.useState)([]),[k,O]=(0,r.useState)(!0),[P,S]=(0,r.useState)(),[T,C]=(0,r.useState)(null),[I,R]=(0,r.useState)({}),N=(0,r.useRef)(),L=(0,r.useRef)({}),M=(0,r.useRef)({}),D=(0,a.useDispatch)(),j=g(),A=(0,a.useSelector)(o.ZP.selectors.getUIPath),V=(0,a.useSelector)(o.ZP.selectors.getTenant),_=(0,v.jm)(A,V),Z=(0,r.useContext)(f.S),U=(0,r.useContext)(h.Y),W=(0,r.useContext)(y.p),z=(0,s.Z)(),F=(0,a.useSelector)(o.ZP.selectors.getMetadata)||{},B=(0,a.useSelector)(o.ZP.selectors.getEntity)||{},H=(0,a.useSelector)(o.ZP.selectors.getApiPath),$=(0,a.useSelector)(o.ZP.selectors.getServicesPath),G=(0,a.useSelector)(o.ZP.selectors.getReltioPath),q=(0,a.useSelector)(o.ZP.selectors.getWorkflowPath),Y=(0,a.useSelector)(o.ZP.selectors.getUser),X=(0,a.useSelector)(o.ZP.selectors.getEntityUri),K=(0,a.useSelector)(o.ZP.selectors.getIsEditableMode),Q=(0,a.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),{type:J,data:ee}=(0,a.useSelector)(o.ZP.selectors.getSearchProviderData)||{},te="search"===J?null==ee?void 0:ee.query:null,ne=e=>D(o.ui.actions.openSearch(e));let re="",ae="";const oe=t=>{let{task:n,worker:r}=t;if(n)switch(n.action){case i.W0P.SET_HTML:{const e=j(n.params.html);if(n.params.id){const t=document.getElementById(n.params.id);t&&(t.innerHTML=e)}else re!==e&&(re=e,(0,v.aZ)({worker:r,setTooltip:C,html:e,innerText:re,setListenersToReset:m,setHtml:u}));break}case i.W0P.SHOW_POPUP:{const e=j(n.params);ae=e,(0,v.aZ)({worker:r,setTooltip:C,html:e,innerText:ae,setListenersToReset:w,setHtml:S});break}case i.W0P.HIDE_POPUP:ae="",S(null);break;case i.W0P.SET_VISIBILITY:"visible"===n.params?(O(!0),(0,v.aZ)({worker:r,setTooltip:C,innerText:re,setListenersToReset:m,setHtml:u})):O(!1);break;case i.W0P.SET_TOOLTIP:C(n.params);break;case i.W0P.SET_HEIGHT:R((e=>E({},e,{height:n.params})));break;case i.W0P.SET_WIDTH:R((e=>E({},e,{width:n.params})));break;case i.W0P.SET_ENABLED:R((e=>n.params?(0,l.omit)(["pointer-events"],e):E({},e,{"pointer-events":"none"})));break;case i.W0P.LOG:console.log(n.params);break;case i.W0P.MESSAGE:Z(n.params);break;case i.W0P.REQUEST:{const t=(0,v.JN)(n,H,G,V);(0,b.U)(E({params:t.params,permissions:e.action.permissions,worker:r,metadata:F,config:e,user:Y,servicesPath:$,apiPath:G,tenant:V,workflowPath:q,entity:B,entityUri:X,environment:Q,query:te,openSearch:ne,workflowCheckPermission:z},U));break}case i.W0P.RETURN_PROCESSED_API_RESPONSE:{const{id:e,data:t}=n.params;M.current[e]&&(M.current[e].next(t),M.current=(0,l.omit)([e],M.current));break}case i.W0P.RETURN_PROCESSED_API_REQUEST:{const{id:e,data:t}=n.params;L.current[e]&&(L.current[e].resolve(t),L.current=(0,l.omit)([e],L.current));break}}},ie=(e,t,n,r)=>{L.current=E({},L.current,{[n]:{options:e,next:t,id:n,resolve:r}})},le=(e,t)=>{M.current=E({},M.current,{[t]:{next:e}})},se=(0,v.R3)({apiPath:H,reltioPath:G,tenant:V,processApiRequest:t,workerRef:N,setRequestListeners:ie}),ce=(0,v.Yo)({reltioPath:G,apiPath:H,processApiResponse:n,workerRef:N,setResponseListeners:le}),pe=(e,t)=>{var n;null===(n=N.current)||void 0===n||n.postMessage({action:"event",type:e,data:t})},ue=(0,r.useRef)(!1),de=W&&!(0,i.O27)(e.action)&&c!==i.X1H.CLASSIC&&(t||n);de&&(ue.current||N.current||(W.startInterceptorInit(),ue.current=!0)),(0,r.useEffect)((()=>{(0,v.Hk)(e.action)&&(N.current=(0,i.QWZ)(_,oe,e),ue.current&&(W.finishInterceptorInit(),ue.current=!1),pe("updateEntity",B))}),[B,e]),(0,r.useEffect)((()=>{pe("editMode",K)}),[K]),(0,r.useEffect)((()=>{pe("changeSearchQuery",te)}),[te]),(0,r.useEffect)((()=>{pe("changeVisibility",k)}),[k]),(0,r.useEffect)((()=>()=>{d.forEach((e=>e()))}),[d]),(0,r.useEffect)((()=>()=>{x.forEach((e=>e()))}),[x,d]);const me=(0,r.useCallback)((()=>{pe("execute",null)}),[e]);return(0,r.useEffect)((()=>{if(!(0,i.O27)(W)&&(t||n)){const{addInternalRequestInterceptor:e,addInternalResponseInterceptor:t,removeInternalRequestInterceptor:n,removeInternalResponseInterceptor:r}=W;return e(se),t(ce),N.current.onerror=()=>{n(se),r(ce)},()=>{n(se),r(ce)}}}),[e]),{html:p,visible:k,tooltip:T,customStyles:I,onClick:me,popup:P}}},86868:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var r=n(24328),a=n(50914),o=n(52730),i=n(29945),l=n(98858),s=n(19701);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){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 u=e=>{const t=(0,s._)(),n=(0,o.useSelector)(i.ZP.selectors.getEntityUriWithDataTenant),[p,u]=(0,r.useState)({}),d=(0,r.useCallback)((e=>{const n=[{filter:l.j5E.EQUALS,fieldName:"uri",values:e}],r={max:e.length,activeness:l.YJ7.ALL,select:"uri,label,type"};return t((0,l.ZOr)(n,r))}),[t]),m=e=>(0,l.HvW)(e,{options:"uri,label,type"}).then((t=>c({},t,{uri:e}))).catch((()=>({}))),g=(0,r.useCallback)(((e,n)=>t(Promise.all((e||[]).map(m))).then((e=>(0,a.pipe)((0,a.reject)(a.isEmpty),(0,a.concat)(n))(e)))),[t]);return(0,r.useEffect)((()=>{const t=(0,a.pipe)((0,a.reduce)(((e,t)=>{const{objectType:r,relatedObjectUris:a}=t;return"relation"!==r&&"potentialMatch"!==r||(a||[]).forEach((t=>{t!==n&&(0,l.WgC)(t)&&!p[t]&&e.push(t)})),e}),[]),a.uniq)(e||[]);t.length&&d(t).then((e=>{const n=(0,a.pipe)((0,a.map)((0,a.prop)("uri")),(0,a.difference)(t))(e);return g(n,e)})).then((e=>{u((t=>e.reduce(((e,t)=>(e[t.uri]=t,e)),c({},t))))})).catch((()=>{}))}),[d,g,e,n]),p}},47081:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(52730),a=n(29945),o=n(98858),i=n(24328);const l=[],s=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||l;return{canCreate:(0,i.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,i.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,i.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,i.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},61604:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});var r=n(2507),a=n.n(r),o=n(18408);const i=e=>{let{onLayoutReset:t,onResetUndo:n}=e;const{SnackbarRenderer:r,showSnackbarMessage:i}=(0,o.D)({onDismissClick:n,showDismiss:!0,autoHideDuration:5e3,dismissTitle:a().text("Undo")});return{SnackbarRenderer:r,resetLayout:()=>{t(),i(a().text("The default layout is now restored. It's still not too late to revert your changes. Click Undo to go back to your personalized settings."))}}}},80225:(e,t,n)=>{"use strict";n.d(t,{a:()=>m});var r=n(24328),a=n(52730),o=n(50914),i=n(29945),l=n(98858),s=n(19701),c=n(62127);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(l.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:g,entity:f,relationActivityFilter:h,mode:y,searchByOv:b=!1}=e;const[v,E]=(0,r.useState)(!1),x=(0,a.useDispatch)(),w=(0,a.useSelector)(i.ZP.selectors.getTenant),k=(0,a.useSelector)(i.ZP.selectors.getMetadata),O=(0,a.useSelector)(i.ZP.selectors.getDtssPath),{activityFilter:P,globalFilter:S}=(0,a.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,a.useSelector)(i.ZP.selectors.getProfileLastLoadedTime),C=(0,s._)(),I=e=>{const t=(0,o.when)(l.Kn2,(0,o.prop)("uri")),n=(0,o.pipe)(t,(0,l.pQZ)(k));return(0,o.evolve)({entityTypes:(0,o.filter)((0,l.kuw)(k)),inRelations:(0,o.filter)(n),outRelations:(0,o.filter)(n),nextEntry:I})(e)},R=g.suggested,N=(0,r.useMemo)((()=>({searchByOv:b})),[b]),L=(0,r.useCallback)((()=>{if(null!=f&&f.uri){const e=p({},I(g.content),{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:h||l.Ng6.ALL,entity:P},max:m,offset:u*m,filter:(0,l.vyX)(S,n)||void 0,suggested:d(R)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(l.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(R)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),l.ZiX),()=>Promise.resolve([{total:0}])],[l.biM,e=>(0,l.n_1)({entityUri:e.uri,configs:r,customerTenant:w,dataTenant:e.dataTenant,dtssPath:O,options:N})],[o.T,e=>(0,l.N6e)(e.uri,r,N)]]);E(!0),C(a(f)).then((e=>{if(!Array.isArray(e))throw Error(JSON.stringify(e));const[{connections:t,total:n}]=e;x(i.N5.relations.actions.relationsLoaded({id:g.id,connections:t,total:n}))})).catch((e=>{console.warn("Failed to load relations data",e)})).finally((()=>{E(!1)}))}}),[P,k,g,x,O,null==f?void 0:f.uri,null==f?void 0:f.dataTenant,n,S,u,h,m,C,t,w,N,T]),M=(0,r.useRef)(!1);M.current=!1,(0,r.useEffect)((()=>{M.current=!0,L()}),[L]);const D=(0,c.D)(y);return(0,r.useEffect)((()=>{y!==l.ARY.Viewing||M.current||D===y||(M.current=!0,L())}),[L,y,D]),{isLoading:v,reload:L}}},76527:()=>{},96969:()=>{},32232:()=>{},24195:()=>{},73443:()=>{}}]);
2
2
  //# sourceMappingURL=1925.js.map