@reltio/remotes 1.4.1721 → 1.4.1722
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1088.js +1 -1
- package/1148.js +1 -1
- package/1215.js +1 -1
- package/1334.js +1 -1
- package/1425.js +1 -1
- package/1550.js +1 -1
- package/1664.js +1 -1
- package/1707.js +1 -1
- package/1840.js +1 -1
- package/2066.js +1 -1
- package/2345.js +1 -1
- package/2400.js +1 -1
- package/2617.js +1 -1
- package/2825.js +3 -0
- package/2825.js.map +1 -0
- package/2857.js +1 -1
- package/3004.js +1 -1
- package/3042.js +1 -1
- package/3096.js +1 -1
- package/3104.js +2 -0
- package/3104.js.map +1 -0
- package/3144.js +1 -1
- package/3191.js +1 -1
- package/3348.js +1 -1
- package/3381.js +1 -1
- package/3383.js +1 -1
- package/3463.js +1 -1
- package/3469.js +1 -1
- package/3538.js +1 -1
- package/3639.js +1 -1
- package/393.js +1 -1
- package/393.js.map +1 -1
- package/4038.js +1 -1
- package/415.js +1 -1
- package/4212.js +1 -1
- package/{3209.css → 4265.css} +1 -1
- package/{3209.css.map → 4265.css.map} +1 -1
- package/4265.js +2 -0
- package/4265.js.map +1 -0
- package/{829.css → 4390.css} +1 -1
- package/4390.css.map +1 -0
- package/4390.js +2 -0
- package/4390.js.map +1 -0
- package/4444.js +1 -1
- package/4481.js +1 -1
- package/4780.js +2 -0
- package/4780.js.map +1 -0
- package/4787.js +1 -1
- package/4838.js +1 -1
- package/4969.js +1 -1
- package/50.js +1 -1
- package/5039.js +1 -1
- package/5177.js +1 -1
- package/5201.js +1 -1
- package/5292.js +1 -1
- package/5368.js +2 -0
- package/{4143.js.map → 5368.js.map} +1 -1
- package/5383.js +1 -1
- package/5738.js +1 -1
- package/5738.js.map +1 -1
- package/5769.js +1 -1
- package/6012.js +76 -0
- package/{2966.js.LICENSE.txt → 6012.js.LICENSE.txt} +0 -10
- package/6012.js.map +1 -0
- package/6287.js +1 -1
- package/6422.js +1 -1
- package/6506.js +1 -1
- package/6578.js +1 -1
- package/6578.js.map +1 -1
- package/658.js +1 -1
- package/6799.js +1 -1
- package/6807.js +2 -0
- package/6807.js.map +1 -0
- package/6844.js +1 -1
- package/6903.js +1 -1
- package/7074.js +1 -1
- package/7119.js +1 -1
- package/7237.js +1 -1
- package/7340.js +1 -1
- package/735.js +1 -1
- package/7401.js +2 -0
- package/7401.js.map +1 -0
- package/7407.js +1 -1
- package/7422.js +1 -1
- package/7468.js +1 -1
- package/7626.js +1 -1
- package/7719.js +1 -1
- package/7744.js +1 -1
- package/7744.js.map +1 -1
- package/7896.js +1 -1
- package/820.js +1 -1
- package/8207.js +1 -1
- package/8216.js +1 -1
- package/8741.js +1 -1
- package/8786.js +1 -1
- package/9016.js +1 -1
- package/9032.js +1 -1
- package/9050.js +1 -1
- package/913.js +56 -0
- package/913.js.LICENSE.txt +9 -0
- package/913.js.map +1 -0
- package/9283.js +1 -1
- package/9328.js +1 -1
- package/9387.js +1 -1
- package/9719.js +1 -1
- package/main.js +1 -1
- package/main.js.map +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/2383.js +0 -3
- package/2383.js.map +0 -1
- package/2966.js +0 -129
- package/2966.js.map +0 -1
- package/3209.js +0 -2
- package/3209.js.map +0 -1
- package/3785.js +0 -2
- package/3785.js.map +0 -1
- package/4143.js +0 -2
- package/829.css.map +0 -1
- package/829.js +0 -2
- package/829.js.map +0 -1
- package/9109.js +0 -2
- package/9109.js.map +0 -1
- /package/{2383.js.LICENSE.txt → 2825.js.LICENSE.txt} +0 -0
package/3209.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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]="afe47873-7592-4474-af7d-466c9c8305bc",e._sentryDebugIdIdentifier="sentry-dbid-afe47873-7592-4474-af7d-466c9c8305bc")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1722"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3209,9109,4860],{33117:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(2507),s=n.n(l),c=n(82056),d=n(80852),u=n(95341),p=n(40007),h=n(98952),m=n(78223),g=n(32701),f=n(79573),b=n(19540);function y(){return y=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},y.apply(this,arguments)}const v=e=>o().createElement("svg",y({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M10 18h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1H8V8H6a1 1 0 01-1-1V3a1 1 0 011-1h6a1 1 0 011 1v4a1 1 0 01-1 1h-2v3h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v5z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const E=e=>o().createElement("svg",x({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("rect",{fill:"#000",x:9,y:9,width:6,height:6,rx:1,stroke:"none",strokeWidth:1,fillRule:"evenodd"})),w=(0,n(72342).makeStyles)({container:{"& > $marginWrapper:first-child":{paddingLeft:"4px"}},listItem:{paddingLeft:"1px",paddingTop:"2px",paddingBottom:"2px",transition:"none","&:hover":{"& $itemAfter":{background:"linear-gradient(to right, rgba(235, 235, 235, 0.2), rgba(235, 235, 235, 1) 100%)"}},"&$listItemFocus":{"& $itemAfter":{background:"linear-gradient(to right, rgba(219, 219, 219, 0.2), rgba(219, 219, 219, 1) 100%)"}},"&:focus":{outline:"none"}},listItemFocus:{},icon:{opacity:.29,width:"16px",height:"16px",flexShrink:0,marginRight:"6px",marginLeft:"8px"},recommendedIcon:{width:"18px",height:"18px",marginRight:"5px",marginLeft:"7px",flexShrink:0},logoIcon:{width:"18px",height:"18px",flexShrink:0,marginRight:"4px"},itemAfter:{position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)"},itemText:{padding:"0",margin:0,"& span":{fontSize:"0.8125rem",letterSpacing:"normal",whiteSpace:"nowrap"}},checkbox:{opacity:.34,padding:0,marginLeft:"14px","&$checked":{opacity:1,background:"none"}},checked:{},marginWrapper:{display:"flex",alignItems:"center"},defaultCursor:{cursor:"default"},itemTooltip:{margin:"4px 0"},marginText:{marginLeft:"21px"},itemTextWrapper:{display:"flex",alignItems:"center"}}),C=e=>{let{attrType:t={}}=e;const n=w(),r=(e=>{switch(e.type){case h.oS0.TYPE_IMAGE:case h.oS0.TYPE_NESTED:return b.Z;case h.oS0.TYPE_REFERENCE:return v;default:return E}})(t);return o().createElement(r,{className:n.icon})};var R=n(33286);function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}const S=(0,m.Z)((e=>o().createElement("svg",T({width:13,height:18,viewBox:"0 0 13 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("g",{transform:"translate(-3 -1)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("path",{fill:"#FF4081",d:"M5.833 10h3.75v6.667l-3.75 1.666z"}),o().createElement("path",{fill:"#CE0C4E",d:"M13.333 10v8.333l-3.75-1.666V10z"}),o().createElement("circle",{fill:"#FFC058",cx:9.583,cy:7.917,r:6.25}),o().createElement("circle",{fill:"#FFCD7B",cx:9.583,cy:7.917,r:5.417}),o().createElement("path",{fill:"#FFFBB5",d:"M8.333 11.667L5 8.462l.933-.898 2.4 2.308L13.4 5l.933.897z"}))))),O=(0,r.memo)((e=>{let{groupId:t,data:n,checked:r=!1,isFocused:a=!1,isRequired:l=!1,label:m,labelInText:b,level:y,onClick:v=f.ZT,hideCheckBox:x=!1,hideIcon:E=!1,notSelectable:T=!1,disableHorizontalScrollbar:O=!1,style:L={},subItemMargin:P=20,LogoIcon:_,className:k,disableNonSelectable:N,disableGutters:I}=e;const j=w(),{attrType:A}=n||{},U=!(x&&(0,h.QZu)(A)||T),z=!!_;return o().createElement(p.Z,{value:b||m,className:j.itemTooltip,placement:"bottom-end"},o().createElement(u.Z,{className:i()(j.container,j.listItem,{[j.defaultCursor]:!U},k),onClick:U?()=>v(n,!r,t):void 0,style:L,dense:!0,disabled:N&&T,classes:{focusVisible:j.listItemFocus,selected:j.listItemFocus},selected:a,tabIndex:-1,disableGutters:I},!x&&o().createElement(d.Z,{checked:r,disableRipple:!0,disabled:!U,className:i()(j.checkbox,{[j.checked]:r}),tabIndex:-1}),o().createElement(R.Z,{margin:P,level:y,className:j.marginWrapper},o().createElement(o().Fragment,null,!E&&(e=>"recommended"===t?o().createElement(S,{className:j.recommendedIcon,tooltipTitle:s().text("Recommended"),showForDisabled:!0}):o().createElement(C,{attrType:e}))(A),o().createElement("div",{className:i()(j.itemTextWrapper,{[j.marginText]:E})},z&&o().createElement(_,{className:j.logoIcon}),o().createElement(c.Z,{primary:o().createElement(o().Fragment,null,m,l&&o().createElement(g.Z,null)),className:j.itemText})))),U&&O&&o().createElement("div",{className:j.itemAfter})))}))},44938:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),o=n.n(r),a=n(50166),i=n(88267),l=n(98952);const s=(0,n(72342).makeStyles)({item:{overflow:"hidden"}});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){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}const u=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:d,data:u,children:p,itemKey:h,showNotMeasuredItems:m,listRef:g}=e;const f=s(),b=(0,r.useRef)({}),[y,v]=(0,r.useState)({}),x=(0,r.useCallback)((0,l.DsO)((()=>{v(c({},b.current))})),[]),E=(0,r.useCallback)(((e,t)=>h?h(t,e):t),[h]),w=(0,r.useRef)(),C=g||w;C.current&&C.current.resetAfterIndex(0,!1);const R=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const a=E(t,n);return o().createElement("div",{style:r,className:f.item},o().createElement("div",{style:m?void 0:{visibility:a in y?void 0:"hidden"}},o().createElement(i.Z,{handleHeight:!0,onResize:(e,t)=>{b.current[a]!==t&&(((e,t)=>{b.current=c({},b.current,{[e]:t})})(a,t),x())}}),p({data:t,index:n})))}),[p,m,E,x,!m&&y]);return o().createElement(a.VariableSizeList,{ref:C,width:t,height:n,itemCount:u.length,itemData:u,itemSize:e=>y[(e=>E(u,e))(e)]||d,itemKey:h},R)}))},1469:(e,t,n)=>{n.d(t,{n:()=>b});const r=(0,n(72342).makeStyles)({item:{marginBottom:"16px"},dense:{marginBottom:0}});var o=n(55962),a=n(24328),i=n.n(a),l=n(98952),s=n(76141),c=n(71153),d=n.n(c),u=n(50914),p=n(85596),h=n(93555),m=n(72283),g=n(14596);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=e=>{let{connection:t,relatedEntity:n,inRelationTypes:c=[],outRelationTypes:b=[],showEmptyEditors:y,entityErrorMessage:v,onChangeAttribute:x,onRemoveAttribute:E,onAddAttributes:w,onChangeRelationType:C,onChangeEntity:R}=e;const T=r(),{relation:S,entity:O}=t,{attributes:L,uri:P,type:_="",direction:k}=S||{},N=Boolean(_),I=(0,g.AH)(),j=(0,g.mU)(["ovOnly"]),A=(0,a.useMemo)((()=>S&&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){f(e,t,n[t])}))}return e}({attributes:L},(0,l.p2l)(S))),[S,L]),U=(0,a.useMemo)((()=>(0,l.xF8)(I,_)),[_,I]),z=(0,a.useMemo)((()=>N?(0,l.jWj)(k===l.Nsj.OUT,I,[(0,l.V3K)(I,_)]):(0,u.uniq)((0,l.jWj)(!0,I,b).concat((0,l.jWj)(!1,I,c)))),[N,_,I,c,b]),D=(0,a.useMemo)((()=>S&&{relationType:S.type,direction:S.direction}),[S]),F=(0,a.useMemo)((()=>O&&{entityUri:O.uri,entityType:O.type,entityLabel:(0,l.idV)(O.label)}),[O]),Z=(0,a.useMemo)((()=>O&&O.uri?c.filter((0,l.eHk)(!1,O,n,I)):c),[O,c,n,I]),M=(0,a.useMemo)((()=>O&&O.uri?b.filter((0,l.eHk)(!0,O,n,I)):b),[O,b,n,I]);(0,a.useEffect)((()=>{const{type:e,direction:t}=(0,l.z7d)(c,b)||{};!_&&e&&C&&C({type:e.uri,direction:t})}),[_,c,b,C]),(0,o.D)((()=>{const{type:e,direction:t}=(0,l.z7d)(Z,M)||{};!_&&e&&C({type:e.uri,direction:t})}),[_,O,Z,M,R]);const B=(0,a.useCallback)((e=>{let{type:t,direction:n}=e;C({type:t.uri,direction:n})}),[C]);return i().createElement(i().Fragment,null,C&&i().createElement(p.Z,{className:T.item,relation:D,metadata:I,inRelationTypes:c,outRelationTypes:b,onChange:B}),R&&i().createElement(h.Z,{errorMessage:v,className:T.item},i().createElement(m.Z,{key:_,className:d()({[T.dense]:v}),entity:F||{},entityTypesUris:z,max:20,globalSearchRequestOptions:j,mode:l.ARY.Editing,onChange:R,onCreate:void 0,metadata:I,attributeTypesSelectionStrategy:void 0})),_&&i().createElement(s.Z,{attrTypes:U,entity:A,showEmptyEditors:y,mode:l.ARY.Editing,parentUri:P,onAddAttributes:w,onChangeAttribute:x,onDeleteAttribute:E}))}},84425:(e,t,n)=>{n.d(t,{Z:()=>z});var r=n(24328),o=n.n(r),a=n(13980),i=n.n(a),l=n(71153),s=n.n(l),c=n(50914),d=n(78501),u=n(93553),p=n(72342);const h=(0,p.makeStyles)((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),m=(0,p.makeStyles)({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"17px"}});var g=n(51556);const f=e=>{const{selectProps:{onCreate:t,createLabel:n,inputValue:r,components:a},children:i}=e,l=h();return o().createElement(g.Z,e,i,n&&!(0,c.prop)("Group",a)&&o().createElement("span",{className:l.addLabel,onClick:()=>t(r)},o().createElement(u.Z,{className:l.addIcon}),n))};f.propTypes={children:i().element.isRequired,selectProps:i().object.isRequired};const b=f;var y=n(12350),v=n(49861),x=n(79573),E=n(98952),w=n(90597),C=n(79312);function R(){return R=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},R.apply(this,arguments)}function T(e){const{selectProps:{menuIsOpen:t},innerProps:n,children:r}=e,a=m();return!t&&o().createElement(C.Z,R({className:a.singleValue},n),r)}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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}T.propTypes={children:i().node,innerProps:i().object};const L=(0,p.makeStyles)({control:{height:"auto"},dropdownIndicator:{boxSizing:"content-box",transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),P={menu:e=>S({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>S({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>S({},e,{padding:"0 0 8px 0"}),input:e=>S({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>S({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},_={menuList:e=>S({},e,{padding:0})},k={input:e=>S({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};function N(){return N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A=e=>{let{value:t,label:n,createLabel:a,getOptions:i,options:l,height:u=46,onChange:p=c.identity,onCreate:h,onClear:m=c.identity,components:g,textFieldInputRef:f,TextFieldProps:C,classes:R}=e,S=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","createLabel","getOptions","options","height","onChange","onCreate","onClear","components","textFieldInputRef","TextFieldProps","classes"]);const O=L({height:u}),j=(0,w.a6)(),[A,U]=(0,r.useState)(!1),z=(0,r.useRef)(null),D=i?y.Z:v.Z,F=(0,c.prop)("ClearIndicator",g)?{}:{IndicatorSeparator:x.Vd,ClearIndicator:x.Vd},Z=h?(e,t)=>{h(e,t),U(!1)}:void 0,M=(0,c.prop)("Group",g)?_:{},B=(0,c.isEmpty)(n)?k:{},G=I({},P,M,B),V=I({},O,R);return o().createElement(D,N({placeholder:"",defaultOptions:!0},S,{value:(0,c.defaultTo)(null,t),loadOptions:i,options:l,cacheOptions:!0,onChange:p,onCreate:Z,onClear:m,createLabel:a,classes:V,styles:G,components:I({DropdownIndicator:d.Z,LoadingIndicator:x.Vd,SingleValue:T,Menu:b},F,g),menuPlacement:"auto",TextFieldProps:I({},C,{label:n,variant:"filled",size:"small",classes:I({},(0,c.prop)("classes",C),{root:s()(O.formControl,(0,c.path)(["classes","root"],C))}),inputProps:I({},(0,c.prop)("inputProps",C)),InputProps:I({},(0,c.prop)("InputProps",C),{classes:I({},(0,c.path)(["InputProps","classes"],C),{root:s()(O.filledInputRoot,(0,c.path)(["InputProps","classes","root"],C)),underline:s()({[j.filledInputUnderline]:(0,E.O27)(t)},(0,c.path)(["InputProps","classes","underline"],C)),focused:s()("focused",(0,c.path)(["InputProps","classes","focused"],C))})}),InputLabelProps:I({},(0,c.prop)("InputLabelProps",C),{classes:I({},(0,c.path)(["InputLabelProps","classes"],C),{root:s()(O.inputLabel,(0,c.path)(["InputLabelProps","classes","root"],C)),shrink:s()("shrink",(0,c.path)(["InputLabelProps","classes","shrink"],C))}),shrink:!(0,E.O27)(t)||void 0}),ref:f||z}),inputRef:f||z,menuIsOpen:A,onMenuOpen:()=>U(!0),onMenuClose:()=>U(!1)}))},U={value:i().oneOfType([i().object,i().array]),label:i().string.isRequired,getOptions:i().func,options:i().array,onChange:i().func,onCreate:i().func,onClear:i().func,createLabel:i().string,components:i().object,textFieldInputRef:i().object,TextFieldProps:i().object,height:i().number,classes:i().object};A.propTypes=U;const z=A},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),o=n.n(r),a=n(2507),i=n.n(a),l=n(98952),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:a,placeholder:c,enableEmptyValueUnderline:d,onChange:u,classes:p={},ListLabelProps:h={},disabled:m=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.oDv)),[t]);return o().createElement(s.S,{items:g,selectedItemsUris:n,single:a,placeholder:c,enableEmptyValueUnderline:d,onChange:u,classes:p,ListLabelProps:h,disabled:m,label:i().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:i().text("Select entity types")})}));c.displayName="EntityTypesSelector"},18527:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),a=n(63532),i=n(98074),l=n(14596);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 c=(0,r.forwardRef)(((e,t)=>{let{value:n,children:c,screen:d,className:u,shouldOpenInNewTab:p=!1}=e,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","children","screen","className","shouldOpenInNewTab"]);const m=(0,r.useContext)(a.m),{generateEntityUrl:g}=(0,r.useContext)(i.v),f=(0,l.ax)("openEntity"),b=(0,l.Qh)(),y=(0,r.useCallback)((e=>{f({uri:n,viewId:m,screen:d}),e.stopPropagation(),e.preventDefault()}),[f,d,n,m]);return o().createElement("a",s({ref:t,href:(v=n,g({uiPath:b,uri:v,screen:d})),onClick:p?void 0:y,target:p?"_blank":"_self",className:u},h),c);var v}));c.displayName="EntityUriLink";const d=c},72108:(e,t,n)=>{n.d(t,{S:()=>k});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(50914),s=n(98952),c=n(53242),d=n(65643),u=n(23883),p=n(72342);const h=(0,p.makeStyles)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),m=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:o}=t;if(n.length>0){const[t]=Array.from(n),a=document.createRange();a.setStart(t,0);for(let n=0;n<e.length;n++){a.setEnd(t,a.endOffset+e[n].length);const{width:i}=a.getBoundingClientRect();if(r+i>o)return n;n!==e.length-1&&a.setEnd(t,a.endOffset+", ".length)}}return-1},g=e=>e.join(", "),f=e=>`calc(${(0,l.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const a=h(),i=(0,r.useRef)(),[l,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=m(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,i.current))}),[t]);const c=g(t),d=l>0,p=d?g(t.slice(0,-l)):c;return o().createElement(u.Z,{title:d?c:""},o().createElement("div",{className:a.listLabelContainer},o().createElement("div",{style:{width:f(n)},className:a.listLabel,ref:i},c),o().createElement("div",{className:a.visibleItemsLabel},p),d&&o().createElement("div",{className:a.hiddenCount},`+${l}`)))};var y=n(40435),v=n(22311),x=n(26638),E=n(33117),w=n(94792),C=n(63485);function R(){return R=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},R.apply(this,arguments)}const T=(0,l.always)(32),S=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:a,height:i}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return o().createElement(C.Z,R({getItemSize:T,renderItem:(e,a,i)=>{let{item:l}=a;const s=!!t.find((e=>l.uri===e)),c=i===r;return o().createElement(E.Z,{key:l.uri,onClick:n,checked:s,data:l,label:o().createElement(w.Z,{text:l.label,highlight:l.filterText}),labelInText:l.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:l.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0,width:a,height:i},l))}));S.displayName="SelectMetadataTypesList";const O=(0,p.makeStyles)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",cursor:"pointer",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&.Mui-disabled":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px",cursor:"pointer","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function L(){return L=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},L.apply(this,arguments)}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){_(e,t,n[t])}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:a,selectedItemsUris:u,onChange:p,ListLabelProps:h={},disabled:m,enableEmptyValueUnderline:g,single:f,label:E,dataReltioId:w,selectionPopupTitle:C}=e;const R=O(),[T,_]=(0,r.useState)(!1),k=(0,r.useCallback)((()=>_(!0)),[]),N=(0,r.useCallback)((()=>_(!1)),[]),[I,j]=(0,r.useState)(""),A=(0,r.useCallback)((()=>j("")),[]),U=(0,r.useCallback)((0,l.pipe)(A,N),[N,A]),z=a.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,I)})).map(((e,t)=>({item:{item:P({},e,{filterText:I})},index:t}))),D=(0,r.useMemo)((()=>u.map((e=>a.find((0,l.propEq)("uri",e)))).map((0,l.prop)("label"))),[u,a]),F=(0,r.useCallback)(((e,t)=>{f?(p(t?[e.uri]:[]),U()):p(t?u.concat(e.uri):u.filter((t=>t!==e.uri)))}),[u,p,f,U]),Z=(0,r.useCallback)((e=>{let{item:t}=e;const n=!u.includes(t.uri);F(t,n)}),[u,F]),{focusIndex:M,handleKeyDown:B}=(0,x.t)({items:z,open:T,onSelectFocusedItem:Z,selectedItems:u,onClose:U}),G=(0,r.useRef)(),V=G.current?G.current.getBoundingClientRect().width:0,q=Math.max(V,255),Y=0===u.length;return o().createElement(o().Fragment,null,o().createElement(c.Z,{label:E,ref:G,InputProps:{startAdornment:Y&&!t?null:o().createElement("div",{className:i()(R.inputText,n.inputText)},Y?o().createElement("div",null,t):o().createElement(b,L({},h,{list:D}))),classes:{root:R.inputRoot,input:i()(R.input,n.input,{[R.emptyInput]:Y&&!t}),disabled:i()(R.disabledInput,{[R.disabledPointer]:m}),underline:R.disabledUnderline},endAdornment:o().createElement(y.Z,{size:"L",icon:d.Z,iconClassName:i()(R.icon,{[R["popup-opened-icon"]]:T}),disabled:m}),readOnly:!0,disableUnderline:Y&&!g},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:i()(R.inputLabel,n.label)}},value:"",onClick:m?void 0:k,classes:{root:i()(R.root,n.root)},size:"small",variant:"filled",disabled:m,"data-reltio-id":w}),o().createElement(v.Z,{open:T,anchorEl:G.current,onClose:U,onSearch:j,title:C,containerWidth:q,containerHeight:355,searchInputOnKeyDown:B,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${w}-popup`}},o().createElement(S,{items:z,onItemClick:F,selectedItems:u,width:q,height:245,focusIndex:M})))}));k.displayName="MetadataTypesSelector"},12350:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(27308);const o=(0,n(4515).Z)(r.ZP)},68977:(e,t,n)=>{n.d(t,{U:()=>c});var r=n(24328),o=n.n(r),a=n(2507),i=n.n(a),l=n(98952),s=n(72108);const c=(0,r.memo)((e=>{let{relationTypes:t,selectedRelationTypes:n,single:a,placeholder:c,enableEmptyValueUnderline:d,onChange:u,classes:p={},ListLabelProps:h={},disabled:m=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.Tt2)),[t]);return o().createElement(s.S,{items:g,selectedItemsUris:n,single:a,placeholder:c,enableEmptyValueUnderline:d,onChange:u,classes:p,ListLabelProps:h,disabled:m,label:i().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:i().text("Select relation types")})}));c.displayName="RelationTypesSelector"},32701:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),o=n.n(r);const a=(0,n(72342).makeStyles)({mark:{color:"red"}}),i=()=>{const e=a();return o().createElement("span",{className:e.mark},"*")}},67275:(e,t,n)=>{n.d(t,{n:()=>f});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(98952),s=n(79386),c=n(76368),d=n(72316),u=n(1824),p=n(62901),h=n(36852),m=n(75647);const g=(0,n(72342).makeStyles)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,r.memo)((e=>{let{entity:t,className:n,historySlice:a}=e;const f=g(),b=(0,r.useMemo)((()=>(0,l.L5S)(t)),[t]),y=(0,h.C)({objectIds:b}),v=(0,l.wwR)(t);return o().createElement(u.e,{collaboration:y},o().createElement(s.Z,{className:i()(n,p.U),entity:(null==a?void 0:a.aEntity)||t},a?o().createElement(m.Z,null):o().createElement(o().Fragment,null,o().createElement(c.a,{className:f.profileBandNavigation}),o().createElement(d.Z,{className:f.comments,uri:v,relatedObjectUris:(0,l.wp9)(l.q7e.ENTITY,{entityUri:v}),objectType:l.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},90590:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),o=n.n(r),a=n(84425),i=n(13980),l=n.n(i),s=n(79312);const c=(0,n(72342).makeStyles)({value:{color:"rgba(0, 0, 0, 0.87)"},placeholder:{color:"rgba(0, 0, 0, 0.38)",fontSize:"14px !important"}}),d=e=>{let{selectProps:{menuIsOpen:t},data:{label:n}}=e;const r=c();return!t&&o().createElement(s.Z,{variant:"body2",classes:{root:r.value}},n)};d.propTypes={selectProps:l().shape({menuIsOpen:l().bool}),data:l().shape({label:l().string})};const u=d;function p(){return p=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},p.apply(this,arguments)}const h=e=>{const t=c(),{innerProps:n={},children:r}=e;return o().createElement(s.Z,p({className:t.placeholder},n),r)};function m(){return m=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},m.apply(this,arguments)}h.propTypes={children:l().node,innerProps:l().object,selectProps:l().object.isRequired};const g={SingleValue:u,Placeholder:h},f=(0,r.memo)((e=>{let t=m({},e);return o().createElement(a.Z,m({components:g},t))}))},98074:(e,t,n)=>{n.d(t,{v:()=>i});var r=n(24328),o=n.n(r),a=n(98952);const i=o().createContext({generateEntityUrl:a.OuZ,generatePivotingUrl:a.FQ2,generateTagUrl:a.W$R});i.displayName="UrlGeneratorsContext"},63532:(e,t,n)=>{n.d(t,{m:()=>o});var r=n(24328);const o=n.n(r)().createContext(null);o.displayName="ViewIdContext"},32794:(e,t,n)=>{n.d(t,{R:()=>c});var r=n(24328),o=n(98952),a=n(50914),i=n(14596);function l(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 c=e=>{let{connection:t,onConnectionChange:n,relatedEntity:s}=e;const c=(0,i.AH)(),d=(0,r.useCallback)((e=>n(l({},t,{relation:e}))),[t,n]),u=(0,r.useCallback)((0,a.pipe)((0,o.zE1)(t.relation),d),[t.relation,d]),p=(0,r.useCallback)((0,a.pipe)((0,o.lIv)(t.relation),d),[t.relation,d]),h=(0,r.useCallback)((0,a.pipe)((0,o.Ilm)(t.relation),d),[t.relation,d]),m=(0,r.useCallback)((e=>{let{type:r,direction:a}=e;const i={entity:t.entity&&(0,o.eHk)(a===o.Nsj.OUT,t.entity,s,c,(0,o.V3K)(c,r))?t.entity:null,relation:l({},t.relation,{attributes:{},type:r,direction:a})};n(i)}),[t,n,s,c]);return{onAddAttributes:u,onChangeAttribute:p,onRemoveAttribute:h,onChangeEntity:(0,r.useCallback)((e=>n(l({},t,{entity:e}))),[t,n]),onChangeRelationType:m}}},19540:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),o=n.n(r);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 i=e=>o().createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M14 11v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v1a1 1 0 01-1 1H6a1 1 0 01-1-1v-4a1 1 0 011-1h4a1 1 0 011 1v1h3z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}))},40577:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Jn});var r=n(24328),o=n.n(r),a=n(54426),i=n(40855),l=n(32479),s=n(41633),c=n(9366),d=n(52730),u=n(50914),p=n(45738),h=n(98952),m=n(87378),g=n(3466),f=n(67275),b=n(98996),y=n(2507),v=n.n(y),x=n(19701),E=n(62127),w=n(72942),C=n(60715),R=n(35174);function T(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 O=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=t.relations.filter((e=>!n.includes(e))).filter((0,u.either)((0,u.pipe)(h.nqN,(0,u.equals)(e)),(0,u.pipe)(h.j5q,(0,u.equals)(e))));n.push(...r);const o=(0,u.pipe)(L,(0,u.without)([e]))(r);return o.forEach((e=>O(e,t,n))),n},L=e=>(0,u.pipe)((0,u.chain)((e=>[(0,h.nqN)(e),(0,h.j5q)(e)])),u.uniq)(e),P=(e,t)=>{const n=(e=>{var t;const n=new Set,r=new Set;e.entities.forEach((e=>n.add(e.uri))),((null===(t=e.relations)||void 0===t?void 0:t.filter((e=>n.has(e.startObject.objectURI)&&n.has(e.endObject.objectURI))))||[]).forEach((e=>{r.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.uri}--${e.type}--${e.direction}`)}));const o=e.entities.map((e=>({id:e.uri,name:e.label,entityTypeUri:e.type,traversedRelationsCount:e.traversedRelations,untraversedRelationsCount:e.untraversedRelations}))),a=[];return r.forEach((e=>{const[t,n,r,o,i]=e.split("--");a.push({from:t,to:n,key:r,relationTypeUri:o,direction:i})})),{nodes:o,edges:a}})(t);n.nodes.forEach((t=>{e.hasNode(t.id)||e.addNode(t.id,{label:(0,h.idV)(t.name),entityTypeUri:t.entityTypeUri,traversedRelationsCount:t.traversedRelationsCount,untraversedRelationsCount:t.untraversedRelationsCount,x:1,y:1})})),n.edges.forEach((t=>{const n=t.from===t.to;e.hasEdge(t.key)||e.addEdgeWithKey(t.key,t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:n,loop:n,relationTypeUri:t.relationTypeUri,direction:t.direction})}))},_=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=t.neighbors(e).filter((e=>!n.includes(e)));return n.push(...r),r.forEach((e=>_(e,t,n))),n},k=(e,t,n)=>{const[o,a]=(0,r.useState)(null),i=(0,d.useDispatch)(),[l,s]=(0,r.useState)(null),[c,m]=(0,r.useState)(!1),g=null==e?void 0:e.uri,f=(0,h.biM)(e),y=(0,d.useSelector)(p.ZP.selectors.getMetadata),S=(0,x._)(),k=(0,x._)(),N=n===h.YGb.TREE,I=(0,E.D)(n),j=(0,r.useContext)(w.F),A=I===h.YGb.TREE&&N,U=(0,r.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return k((0,h.ZYI)({uri:e,deep:n,limitCreditsConsumption:!0,graphTypes:t?[(0,h.nIW)(t)]:null,activenessDate:null,max:t?200:3e3,signal:j}))}),[t,k,j]);(0,r.useEffect)((()=>(!g||(0,h.ZiX)(g)||f||N||(m(!0),S((0,h.ZYI)({uri:g,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,h.nIW)(t)]:null,activenessDate:null,max:t?200:3e3,signal:j})).then((e=>{const t=new b.MultiGraph;P(t,e),a(t),s(e)})).catch((e=>{console.warn(e),s(null),(0,h.D_E)(e)||i(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{m(!1)}))),()=>{a(null),s(null),m(!1)})),[g,f,i,t,A]);const z=(0,r.useCallback)((async e=>{let{startEntityUri:t,endEntityUri:n,relationType:r,attributes:a,startDate:c,endDate:d}=e;try{var f;m(!0);const e=await(0,h.DsR)({startEntityUri:t,endEntityUri:n,relationType:r,attributes:a,startDate:c,endDate:d});if(null==e||null===(f=e[0])||void 0===f||!f.successful)throw null==e?void 0:e[0];const i=e[0].object,p=t===g?i.endObject.objectURI:i.startObject.objectURI,b=await(0,h.HvW)(p,{select:"label"});t===g?i.endObject.label=b.label:i.startObject.label=b.label;const v=((e,t,n)=>{const r=t.startObject.objectURI,o=t.endObject.objectURI,a=[r,o],i=e.entities.map((0,u.prop)("uri")),l=(0,h.V3K)(n,t.type),s=a.find((e=>!(0,u.includes)(e,i))),c=s&&(t.startObject.objectURI===s?t.startObject:t.endObject),d=c&&{type:c.type,label:c.label,uri:c.objectURI,traversedRelations:0,untraversedRelations:1},p=T({},(0,u.pick)(["uri","type","attributes","startDate","endDate","crosswalks","direction"],t),{startObject:(0,u.pick)(["objectURI","directionalLabel"],t.startObject),endObject:(0,u.pick)(["objectURI","directionalLabel"],t.endObject),direction:null==l?void 0:l.direction});return{entities:(d?e.entities.concat([d]):e.entities).map((e=>e.uri===r||e.uri===o?T({},e,{traversedRelations:e.traversedRelations+1}):e)),relations:(e.relations||[]).concat([p])}})(l,i,y);P(o,v);const x=[i.startObject.objectURI,i.endObject.objectURI],E=l.entities.map((0,u.prop)("uri"));x.forEach((e=>{if(E.includes(e)){const t=o.getNodeAttribute(e,"traversedRelationsCount");o.setNodeAttribute(e,"traversedRelationsCount",t+1)}})),s(v)}catch(e){throw i(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Something went wrong")))),e}finally{m(!1)}}),[i,l,o,y]),D=(0,r.useCallback)((e=>{m(!0),(0,h.VGk)(e).then((()=>{o.extremities(e).forEach((e=>{const t=o.getNodeAttribute(e,"traversedRelationsCount");o.setNodeAttribute(e,"traversedRelationsCount",t-1)})),o.dropEdge(e);const{updatedData:t,removedEntitiesUris:n}=((e,t,n,r)=>{const o=r.relations.find((0,u.propEq)("uri",t)),a=(0,h.nqN)(o),i=(0,h.j5q)(o),l=(0,R.toUndirected)(n),s=(0,u.cond)([[()=>!(0,C.Ar)(l,e,a),(0,u.always)(a)],[()=>!(0,C.Ar)(l,e,i),(0,u.always)(i)],[u.T,(0,u.always)(null)]])(),c=(0,u.evolve)({entities:(0,u.map)((e=>e.uri===a||e.uri===i?T({},e,{traversedRelations:e.traversedRelations-1}):e)),relations:(0,u.reject)((0,u.propEq)("uri",t))})(r),{updatedData:d,removedEntitiesUris:p}=s?((e,t)=>{const n=O(e,t),r=(0,u.pipe)(L,(0,u.append)(e),u.uniq)(n);return{updatedData:(0,u.evolve)({relations:(0,u.reject)((e=>n.includes(e))),entities:(0,u.reject)((e=>r.includes(e.uri)))})(t),removedEntitiesUris:r}})(s,c):{updatedData:c,removedEntitiesUris:[]};return{updatedData:d,removedEntitiesUris:p}})(g,e,o,l);((e,t)=>{(t||[]).forEach((t=>{e.dropNode(t)}))})(o,n),s(t)})).catch((e=>{i(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{m(!1)}))}),[i,o,g,l]),F=(0,r.useCallback)(((e,t)=>{const{nodes:n=[]}=t,r=(0,u.difference)(o.neighbors(e),n);((e,t,n,r)=>{const o=(0,R.toUndirected)(r),a=(e,t)=>{o.filterEdges(e,t,(e=>!!e)).forEach((e=>o.dropEdge(e)))};n.forEach((e=>{a(t,e),o.forEachNeighbor(e,(t=>{a(e,t)}))}));const i=[];return o.nodes().forEach((t=>{((e,t,n)=>(0,C.Ar)(e,t,n)?null:n)(o,e,t)&&i.push(t)})),(0,u.uniq)(i.reduce(((e,t)=>_(t,o,e)),[...i]))})(g,e,r,o).forEach((t=>{t!==g&&t!==e&&o.setNodeAttribute(t,"hidden",!0)}))}),[g,o]),Z=(0,r.useCallback)((e=>{if(e&&!(0,h.ZiX)(e)&&!f){const t=o.getNodeAttribute(e,"untraversedRelationsCount");o.neighbors(e).forEach((e=>{o.setNodeAttribute(e,"hidden",!1)})),t>0&&(m(!0),U(e).then((t=>{const n=((e,t,n)=>{const{entities:r=[],relations:o=[]}=t;return{entities:r.reduce(((e,t)=>{if(e.some((e=>{let{uri:n}=e;return n===t.uri}))){if(t.uri===n){const r=e.findIndex((e=>{let{uri:t}=e;return t===n}));e[r]=T({},e[r],{traversedRelations:t.traversedRelations,untraversedRelations:t.untraversedRelations})}}else e.push(t);return e}),[...e.entities||[]]),relations:o.reduce(((e,t)=>(e.some((e=>{let{uri:n}=e;return n===t.uri}))||e.push(t),e)),[...e.relations||[]])}})(l,t,e);P(o,t);const r=t.entities.find((t=>t.uri===e));o.setNodeAttribute(e,"untraversedRelationsCount",r.untraversedRelations),o.setNodeAttribute(e,"traversedRelationsCount",r.traversedRelations),s(n)})).catch((e=>{console.warn(e),(0,h.D_E)(e)||i(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{m(!1)})))}}),[l,i,o,f,U]);return{graphLoading:c,data:l,graphologyGraph:o,onAddRelation:z,onDeleteRelation:D,onCollapseEntity:F,onExpandEntity:Z}};function N(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)=>{const 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){N(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},j=[25,50,100];function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const U=(e,t,n)=>{const{startObject:r,endObject:o,type:a}=t,{directionalLabel:i}=(0,h.nqN)(t)===n?r:o;return i||(0,h.Lmx)(e,a)},z=e=>{let{data:t,selectedEntityUri:n,mainEntityUri:o,graphTypeUri:a}=e;const[i,l]=(0,r.useState)({field:"",order:"asc"}),[s,c]=(0,r.useState)(0),[m,g]=(0,r.useState)(j[0]),[f,b]=(0,r.useState)([]),[y,x]=(0,r.useState)(!1),E=(0,d.useDispatch)(),w=(0,d.useSelector)(p.ZP.selectors.getMetadata),C=(0,r.useMemo)((()=>{const e=(null==t?void 0:t.entities)||[];return(0,u.zipObj)(e.map((0,u.prop)("uri")),e)}),[null==t?void 0:t.entities]),R=(0,r.useMemo)((()=>(0,u.pipe)((0,u.filter)((0,u.either)((0,u.pipe)(h.nqN,(0,u.equals)(n)),(0,u.pipe)(h.j5q,(0,u.equals)(n)))),(0,u.uniqBy)((0,u.prop)("uri")),(0,u.map)((e=>{const t=C[((e,t)=>{const n=(0,h.nqN)(t),r=(0,h.j5q)(t);return n===e?r:n})(n,e)];return{relation:e,entity:t,entityLabel:(0,h.idV)(t.label),entityTypeLabel:(0,h.jFi)(w,t),relationTypeLabel:U(w,e,t.uri)}})))((null==t?void 0:t.relations)||[])),[t,n,C,w]),{searchText:T,onChangeSearchText:S,filters:O,onFilter:L,relationTypesOptions:P,entityTypesOptions:_}=(e=>{const[t,n]=(0,r.useState)(""),[o,a]=(0,r.useState)({entityTypesUris:[],relationTypesUris:[]}),i=(0,d.useSelector)(p.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,u.pipe)((0,u.map)((e=>{let{entity:t}=e;return t.type})),(0,u.concat)(u.__,o.entityTypesUris),u.uniq,(0,u.map)((0,h.nt9)(i)))(e)),[e,i,o.entityTypesUris]),s=(0,r.useMemo)((()=>(0,u.pipe)((0,u.map)((e=>{let{relation:t}=e;return t.type})),(0,u.concat)(u.__,o.relationTypesUris),u.uniq,(0,u.map)((0,h.V3K)(i)))(e)),[e,i,o.relationTypesUris]);return{searchText:t,onChangeSearchText:n,filters:o,onFilter:a,entityTypesOptions:l,relationTypesOptions:s}})(R),k=(0,r.useMemo)((()=>(0,u.pipe)((0,u.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:o,relationTypesUris:a}=O;return h.P6Y.strings.search(t,T)&&(0,u.ifElse)((0,u.prop)("length"),(0,u.includes)(r.type),u.T)(a)&&(0,u.ifElse)((0,u.prop)("length"),(0,u.includes)(n.type),u.T)(o)})),i.field?(0,u.sort)(((e,t)=>h.P6Y.strings.sort(i.order,e[i.field],t[i.field]))):u.identity)(R)),[R,i,T,O]),N=(0,r.useMemo)((()=>k.slice(s*m,s*m+m)),[k,s,m]),I=(0,r.useCallback)((e=>{x(!0),(0,h._vs)(e).then((e=>{b((t=>[...t,{initialRelation:e,relation:e}]))})).catch((e=>{E(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Can't load relationship's attributes"))))})).finally((()=>x(!1)))}),[E]),z=(0,r.useCallback)((e=>{b((t=>t.map((t=>t.relation.uri===e.uri?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){A(e,t,n[t])}))}return e}({},t,{relation:e}):t))))}),[]);(0,r.useEffect)((()=>{c(0),S("")}),[n,a,S,L]),(0,r.useEffect)((()=>{L({entityTypesUris:[],relationTypesUris:[]})}),[a,o,L]),(0,r.useEffect)((()=>{c(0)}),[i,T,O]);const D=(0,r.useCallback)((e=>{b((t=>t.filter((t=>t.relation.uri!==e))))}),[]),F=(0,r.useCallback)(((e,t)=>{x(!0),(0,h.HH7)({oldRelation:e,newRelation:t}).then((()=>{D(t.uri)})).catch((e=>{E(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Can't edit relationship"))))})).finally((()=>x(!1)))}),[D,E]);return{rowsData:N,onSort:l,sorting:i,searchText:T,onChangeSearchText:S,filters:O,onFilter:L,entityTypesOptions:_,relationTypesOptions:P,editingRelations:f,onStartRelationEditing:I,onCancelRelationEditing:D,onUpdateEditingRelation:z,total:k.length,page:s,rowsPerPage:m,onPageChange:c,onRowsPerPageChange:g,onSaveEditingRelation:F,loading:y}};var D=n(89025),F=n(79312),Z=n(79573),M=n(33945),B=n(50548),G=n(71153),V=n.n(G);const q=o().createContext({graphLoading:!1,data:null,graphologyGraph:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{},onCollapseEntity:()=>{},onExpandEntity:()=>{},layout:null,setLayout:()=>{}});q.displayName="GraphStateContext";var Y=n(88267),H=n(44938),W=n(72342);const X="1px solid rgba(0, 0, 0, 0.05)",$=(0,W.makeStyles)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:X},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},editingRow:{paddingTop:"8px",paddingBottom:"8px"},headRow:{borderBottom:X}});function K(){return K=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},K.apply(this,arguments)}const Q=(0,r.memo)((e=>{let{columnsData:t,sorting:n,onSort:r}=e;const a=$();return o().createElement("div",{className:V()(a.tableRow,a.headRow)},t.map((e=>{const{id:t,sortable:a,headCellRenderer:i,columnClassName:l}=e,s=i,c=a?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{r({field:t,order:n.field===t?(0,Z.Dh)(n.order):"asc"})}}:{};return o().createElement("div",{key:t,className:l},o().createElement(s,K({headCellData:e},c)))})))})),J=(0,r.forwardRef)(((e,t)=>{let{classes:n,columnsData:a,rowsData:i,sorting:l,onSort:s,getRowKey:c,ExpandedRowRenderer:d,defaultRowHeight:u}=e;const p=$(),[h,m]=(0,r.useState)({width:0,height:0}),g=(0,r.useCallback)((e=>{let{data:t,index:r}=e;const i=t[r];return o().createElement("div",{className:V()(p.tableRowWrapper,null==n?void 0:n.tableRowWrapper)},o().createElement("div",{className:V()(p.tableRow,null==n?void 0:n.tableRow,{[p.editingRow]:i.expanded})},a.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:r}=e;const a=n;return o().createElement("div",{key:t,className:r},o().createElement(a,{value:i[t],rowValue:i}))}))),i.expanded&&d&&o().createElement(d,{open:i.expanded,rowValue:i}))}),[a,d]),f=(0,r.useCallback)(((e,t)=>{m({width:e,height:t})}),[]),b=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=b.current)||void 0===e||e.scrollTo(0)}}))),o().createElement("div",{className:p.table},o().createElement(Q,{columnsData:a,sorting:l,onSort:s}),o().createElement("div",{className:p.tableBodyWrapper},o().createElement(Y.Z,{handleHeight:!0,handleWidth:!0,onResize:f}),o().createElement("div",{className:p.tableBody},o().createElement(H.Z,{listRef:b,width:h.width,height:h.height,data:i,defaultItemSize:u,itemKey:c,showNotMeasuredItems:!0},g))))})),ee=(0,r.memo)(J);var te=n(92332),ne=n(40007);const re="rgba(238, 238, 238, 1)",oe=(0,W.makeStyles)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{minWidth:"180px",flex:3},relationshipTypeColumn:{minWidth:"70px",flex:1},entityTypeColumn:{minWidth:"70px",flex:1},row:{position:"relative","&:hover":{background:re}}});function ae(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){ie(e,t,n[t])}))}return e}function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const le={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},se=".collapsibleTableRow:hover &",ce=ae({},le,{[se]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${re} 100%)`}}),de=(0,W.makeStyles)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":ae({},le,{right:"25px",width:"20px"})},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":ce},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[se]:{visibility:"visible",background:re}},editingMode:{visibility:"visible"},hidden:{visibility:"hidden"},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"},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)"}},expandedRow:{padding:"0 16px 6px",fontSize:"13px"}})));function ue(){return ue=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},ue.apply(this,arguments)}function pe(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){he(e,t,n[t])}))}return e}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const me=e=>{let{className:t,headCellData:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","headCellData"]);const a=de();return o().createElement("div",{className:V()(a.headCell,t)},o().createElement(te.default,ue({},r,{headCellData:pe({},n,{label:o().createElement(ne.Z,{value:n.label},o().createElement("div",{className:a.headLabel},n.label))})})))},ge=(0,r.memo)((e=>{let{value:t="",tooltip:n,onClick:r,className:a}=e;const i=de();return n=n||t,o().createElement(ne.Z,{value:n},o().createElement("div",{className:V()(i.defaultCell,a,{[i.clickable]:!!r}),onClick:r},t))}));var fe=n(37573);const be=(0,B.l)(q,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:r,onClick:a}=e;const i=de(),l=o().createElement(o().Fragment,null,o().createElement(fe.Z,{entity:n,avatarClassName:i.entityAvatar}),t);return o().createElement(ge,{value:l,tooltip:t,className:V()(i.profileCell,r),onClick:()=>a(n.uri)})}));var ye=n(38677),ve=n(32794),xe=n(1469);const Ee=(0,B.l)(q,((e,t)=>{let{relationshipTable:n}=e;return{editingRelationObject:n.editingRelations.find((e=>{var n;return e.initialRelation.uri===(null==t||null===(n=t.rowValue.relation)||void 0===n?void 0:n.uri)})),onUpdateEditingRelation:n.onUpdateEditingRelation,onCancelRelationEditing:n.onCancelRelationEditing,onSaveEditingRelation:n.onSaveEditingRelation}}),(e=>{let{open:t,editingRelationObject:n,onUpdateEditingRelation:a,onCancelRelationEditing:i,onSaveEditingRelation:l}=e;const s=(0,d.useDispatch)(),c=(0,d.useSelector)(p.ZP.selectors.getMetadata),{relation:m,initialRelation:g}=n,f=(0,r.useMemo)((()=>!(0,u.equals)(g,m)),[m,g]),b=de(),y=(0,r.useCallback)((e=>{let{relation:t}=e;return a(t)}),[a]),x=(0,r.useCallback)((()=>i(m.uri)),[i,m.uri]),E=(0,r.useMemo)((()=>({relation:m})),[m]),{onAddAttributes:w,onChangeAttribute:C,onRemoveAttribute:R}=(0,ve.R)({connection:E,onConnectionChange:y});return t?o().createElement("div",{className:b.expandedRow},o().createElement(xe.n,{connection:E,onAddAttributes:w,onChangeAttribute:C,onRemoveAttribute:R}),o().createElement("div",{className:b.actionButtons},o().createElement(ye.Z,{onClick:x},v().text("Cancel")),o().createElement(ye.Z,{color:"primary",disabled:!f,onClick:()=>{(e=>{const t=(0,h.xkB)(c,{relation:{object:e}});return s(p.N5.errors.actions.errorsSet(t)),0===t.length})(m)&&l(g,m)}},v().text("Save")))):null}));var we=n(39475),Ce=n(29754),Re=n(6163),Te=n(22118);const Se=(0,B.l)(q,(0,u.pick)(["onDeleteRelation"]),(e=>{let{uri:t,open:n,onClose:r,onDeleteRelation:a}=e;return o().createElement(Te.Z,{open:n,title:v().text("Do you want to make a clean break?"),content:v().text("To end this relationship, click Delete Relationship. To keep the connection, click Cancel."),saveCaption:v().text("Delete relationship"),discardCaption:v().text("Cancel"),onDiscard:r,onSave:()=>{a(t),r()}})})),Oe=(0,r.memo)((e=>{let{uri:t}=e;const[n,a]=(0,r.useState)(!1),i=(0,r.useCallback)((()=>a(!0)),[]),l=(0,r.useCallback)((()=>a(!1)),[]);return o().createElement(o().Fragment,null,o().createElement(we.k,{icon:Re.Z,size:"XXS",tooltipTitle:v().text("Delete"),"data-reltio-id":"reltio-delete-relation-button",onClick:i}),o().createElement(Se,{open:n,onClose:l,uri:t}))}));Oe.displayName="DeleteRelationButton";const Le=Oe,Pe=(0,B.l)(q,((e,t)=>{let{relationshipTable:{onStartRelationEditing:n,editingRelations:r}}=e;return{onEdit:n,isEditing:r.some((e=>{var n;return e.initialRelation.uri===(null==t||null===(n=t.rowValue.relation)||void 0===n?void 0:n.uri)}))}}),(e=>{let{rowValue:{relation:{uri:t,type:n}},className:r,onEdit:a,isEditing:i}=e;const l=de(),s=(0,d.useSelector)(p.ZP.selectors.getMetadata),c=(0,h.V3K)(s,n),u=(0,h.Z5t)(h.ARY.Editing,c),m=(0,h.Edd)(h.ARY.Editing,c);return o().createElement("div",{className:V()(l.controlsCell,r,{[l.editingMode]:i})},u&&o().createElement(we.k,{className:V()(l.editButton,{[l.hidden]:i}),icon:Ce.Z,size:"XXS",tooltipTitle:v().text("Edit"),"data-reltio-id":"reltio-edit-relationship-button",onClick:()=>a(t)}),m&&o().createElement(Le,{uri:t}))}));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){ke(e,t,n[t])}))}return e}function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ne=(e,t)=>t[e].relation.uri||`${e}`,Ie=(0,B.l)(q,(e=>{let{relationshipTable:t}=e;return _e({},t)}),(e=>{let{rowsData:t,sorting:n,onSort:a,total:i,page:l,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:d,editingRelations:u,loading:p}=e;const h=oe(),g=(0,r.useMemo)((()=>[{id:"entityLabel",label:v().text("Profile"),headCellRenderer:me,rowCellValueRenderer:be,sortable:!0,columnClassName:h.profileColumn},{id:"relationTypeLabel",label:v().text("Relationship type"),headCellRenderer:me,rowCellValueRenderer:ge,sortable:!0,columnClassName:h.relationshipTypeColumn},{id:"entityTypeLabel",label:v().text("Entity Type"),headCellRenderer:me,rowCellValueRenderer:ge,sortable:!0,columnClassName:h.entityTypeColumn},{id:"controls",label:"",headCellRenderer:Z.Vd,rowCellValueRenderer:Pe}]),[h]),f=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;null===(e=f.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const b=(0,r.useMemo)((()=>t.map((e=>null!=u&&u.some((t=>{var n;return t.initialRelation.uri===(null==e||null===(n=e.relation)||void 0===n?void 0:n.uri)}))?_e({},e,{expanded:!0}):e))),[t,u]),y=(0,r.useMemo)((()=>({tableRow:V()(h.row,"collapsibleTableRow")})),[h]);return o().createElement("div",{className:h.tableWithPagination},o().createElement("div",{className:h.tableContainer},o().createElement(ee,{ref:f,columnsData:g,rowsData:b,sorting:n,onSort:a,getRowKey:Ne,ExpandedRowRenderer:Ee,defaultRowHeight:28,classes:y})),i>j[0]&&o().createElement(M.Z,{count:i,rowsPerPageOptions:j,rowsPerPage:s,onChangeRowsPerPage:d,page:l,onChangePage:c,basicTableRef:f}),p&&o().createElement(m.Z,null))}));var je=n(80653),Ae=n(87037),Ue=n(33662);const ze=(0,W.makeStyles)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),De=(0,B.l)(q,(0,u.pipe)((0,u.prop)("relationshipTable"),(0,u.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const r=ze();return o().createElement(Ue.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:v().text("Search profiles"),classes:{input:r.input}})}));var Fe=n(92934),Ze=n(68977),Me=n(69089);const Be=(0,W.makeStyles)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),Ge=(0,B.l)(q,(0,u.pipe)((0,u.prop)("relationshipTable"),(0,u.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:n,filters:a,onFilter:i,entityTypesOptions:l,relationTypesOptions:s}=e;const c=Be(),[d,u]=(0,r.useState)([]),[p,h]=(0,r.useState)([]),m=()=>{u(a.entityTypesUris),h(a.relationTypesUris),n()};return(0,r.useEffect)((()=>{u(a.entityTypesUris),h(a.relationTypesUris)}),[a.entityTypesUris,a.relationTypesUris]),o().createElement(Me.Z,{classes:{paper:c.dialogPaper},onClose:m,open:t},o().createElement(F.Z,{className:c.title},v().text("Filter")),o().createElement(Fe.Q,{classes:{root:c.entityTypesSelector},entityTypes:l,selectedEntityTypes:d,enableEmptyValueUnderline:!0,onChange:u}),o().createElement(Ze.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:p,enableEmptyValueUnderline:!0,onChange:h}),o().createElement("div",{className:c.footer},o().createElement(ye.Z,{className:c.clearAllButton,onClick:()=>{u([]),h([])}},v().text("Clear All")),o().createElement(ye.Z,{className:c.cancelButton,onClick:m},v().text("Cancel")),o().createElement(ye.Z,{onClick:()=>{i({entityTypesUris:d,relationTypesUris:p}),n()},color:"primary"},v().text("Apply"))))})),Ve=(0,W.makeStyles)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),qe=(0,B.l)(q,(0,u.pipe)((0,u.prop)("relationshipTable"),(0,u.pick)(["filters"])),(e=>{let{filters:t}=e;const n=Ve(),[a,i]=(0,r.useState)(!1),{entityTypesUris:l,relationTypesUris:s}=t,c=l.length||s.length;return o().createElement("div",{className:n.wrapper},o().createElement(De,null),o().createElement(Ae.Z,{"data-reltio-id":"reltio-filter-relationship-button",className:n.iconButton,onClick:()=>i(!0),size:"large"},o().createElement(je.Z,{className:c?n.activeFiltersIcon:n.inactiveFiltersIcon})),o().createElement(Ge,{open:a,onClose:()=>i(!1)}))}));var Ye=n(93553),He=n(25601),We=n(79811),Xe=n(290),$e=n(35936);const Ke=e=>{const t=(0,d.useSelector)(p.ZP.selectors.getMetadata),{inRelations:n=[],outRelations:o=[]}=(0,r.useMemo)((()=>(0,h.UWq)(t,e,(0,h.d89)(h.ARY.Editing))),[t,e]);return{inRelationTypes:n,outRelationTypes:o}},Qe=(0,W.makeStyles)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"12px 16px"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px",fontWeight:"bold"},content:{padding:"8px 16px 0px!important",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}}))),Je=(0,B.l)(q,(e=>{let{selectedEntity:t,onAddRelation:n}=e;return{selectedEntity:t,onAddRelation:n}}),(e=>{let{selectedEntity:t,open:n,onClose:a,onAddRelation:i}=e;const l=Qe(),s=(0,d.useSelector)(p.ZP.selectors.getMetadata),[c,u]=(0,r.useState)({}),{relation:m,entity:g}=c,{type:f,direction:b}=m||{},[y,x]=(0,r.useState)(!1),E=(0,d.useDispatch)();(0,r.useEffect)((()=>{n&&u({relation:{uri:(0,h.ncP)(),type:null,attributes:{}}})}),[n]);const{inRelationTypes:w,outRelationTypes:C}=Ke(null==t?void 0:t.type),R=(0,r.useCallback)((()=>{const e=(0,h.xkB)(s,{relation:{object:m}});return E(p.N5.errors.actions.errorsSet(e)),0===e.length}),[m,s,E]),{onAddAttributes:T,onChangeAttribute:S,onRemoveAttribute:O,onChangeEntity:L,onChangeRelationType:P}=(0,ve.R)({connection:c,onConnectionChange:u,relatedEntity:t});return o().createElement(Me.Z,{open:n,fullWidth:!0,maxWidth:"sm",onClose:a,classes:{paper:l.dialogPaper}},o().createElement($e.Z,{classes:{root:l.dialogTitle}},o().createElement(F.Z,{variant:"subtitle1",classes:{root:l.titleText}},v().text("Add relationship"))),o().createElement(Xe.Z,{classes:{root:l.content}},o().createElement(xe.n,{connection:c,onAddAttributes:T,onChangeAttribute:S,onRemoveAttribute:O,relatedEntity:t,inRelationTypes:w,outRelationTypes:C,onChangeRelationType:P,onChangeEntity:L})),o().createElement(We.Z,null,o().createElement(ye.Z,{onClick:a},v().text("Cancel")),o().createElement(ye.Z,{disabled:!(null!=c&&c.entity)||!f||y,color:"primary",onClick:()=>{const{type:e,attributes:n={},startDate:r,endDate:o}=m,l=b===h.Nsj.OUT?t.uri:g.uri,s=b===h.Nsj.OUT?g.uri:t.uri;R()&&(x(!0),i({startEntityUri:l,endEntityUri:s,relationType:e,attributes:n,startDate:r,endDate:o}).then((()=>{a()})).catch((e=>{console.warn(e)})).finally((()=>{x(!1)})))}},v().text("Add"))))})),et=(0,B.l)(q,(0,u.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;const{inRelationTypes:n,outRelationTypes:a}=Ke(null==t?void 0:t.type),i=n.length+a.length>0,[l,s]=(0,r.useState)(!1);return i&&o().createElement(o().Fragment,null,o().createElement(He.K,{"data-reltio-id":"reltio-add-relationship-button",mode:He.N.button,label:v().text("Add relationship"),icon:Ye.Z,onClick:()=>{s(!0)}}),o().createElement(Je,{open:l,onClose:()=>{s(!1)}}))})),tt=(0,W.makeStyles)({caption:{marginLeft:"16px",marginTop:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),nt=()=>{const e=tt();return o().createElement("div",{className:e.wrapper},o().createElement("div",{className:e.caption},o().createElement(F.Z,{variant:"subtitle1"},v().text("Relationships")),o().createElement(et,null)),o().createElement(qe,null),o().createElement(Ie,null))};var rt=n(56346);const ot=(0,W.makeStyles)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),at=(0,B.l)(q,(0,u.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=ot();return o().createElement("div",{className:r.wrapper},n&&o().createElement(m.Z,null),o().createElement(rt.Z,{entity:t,caption:v().text("Entity details"),className:r.noShadowBlock}))}));var it=n(11821),lt=n(18527),st=n(79386);const ct=(0,W.makeStyles)((e=>({link:{textDecoration:"none",color:e.palette.primary.main}}))),dt=(0,B.l)(q,(0,u.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;const n=ct(),r=(0,d.useSelector)(p.ZP.selectors.getEntityUri),a=null==t?void 0:t.uri;return o().createElement(st.Z,{entity:t,renderLabel:e=>r===a?e:o().createElement(lt.Z,{className:n.link,value:(0,h.wwR)(t),screen:"graph"},e)})}));let ut=function(e){return e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails",e}({});const pt=(0,r.memo)((e=>{var t;let{active:n,tabs:r}=e;const a=!(0,u.isNil)(n);return o().createElement(it.h,{open:a},o().createElement(dt,null),null===(t=r[n])||void 0===t?void 0:t.content)}));function ht(){return ht=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},ht.apply(this,arguments)}pt.displayName="GraphRightSidePanel";const mt=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ht({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var gt=n(46339),ft=n(23304),bt=n(64488),yt=n(95372),vt=n.n(yt),xt=n(88586);const Et=e=>e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),wt=e=>{const t=document.createElement("canvas");return t.style.position="absolute",t.setAttribute("class",`sigma-${e}`),t},Ct=(0,r.createContext)({addRenderers:Z.ZT,canvases:{}}),Rt=()=>(0,r.useContext)(Ct);Ct.displayName="SigmaCustomRenderersContext";const Tt=e=>{let{children:t}=e;const n=(()=>{const{container:e,sigma:t}=(0,gt.Vr)(),[n,o]=(0,r.useState)({}),a=(0,r.useRef)({}),i=(0,r.useRef)(0),l=(0,r.useRef)(0),s=(0,r.useCallback)((e=>{o((0,u.mergeLeft)(e))}),[]),c=(0,r.useCallback)((()=>{i.current=e.offsetWidth,l.current=e.offsetHeight;const t=(0,xt.getPixelRatio)();for(const e in a.current){const{canvasElement:n,context:r}=a.current[e];n.style.width=i.current+"px",n.style.height=l.current+"px",n.setAttribute("width",i.current*t+"px"),n.setAttribute("height",l.current*t+"px"),1!==t&&r.scale(t,t)}}),[e.offsetHeight,e.offsetWidth]),d=(0,r.useCallback)((()=>{for(const e in n){const{context:t}=a.current[e];t.clearRect(0,0,i.current,l.current);const{renderer:r}=n[e];r(t)}}),[n]),p=(0,r.useCallback)((()=>{for(const t in n){if(!(0,h.O27)(a.current[t]))continue;const{insertBefore:r}=n[t],o=e.querySelector(".sigma-container"),i=wt(t),l=Et(i);o.insertBefore(i,o.querySelector(`.sigma-${r}`)),a.current[t]={canvasElement:i,context:l},c()}}),[n,e,c]);return(0,r.useEffect)((()=>(t.addListener("beforeRender",p),()=>{t.off("beforeRender",p)})),[t,p]),(0,r.useEffect)((()=>(t.addListener("afterRender",d),()=>{t.off("afterRender",d)})),[t,d]),(0,r.useEffect)((()=>(t.addListener("resize",c),()=>{t.off("resize",c)})),[t,c]),(0,r.useEffect)((()=>{const e=a.current;return()=>{for(const t in e)e[t].canvasElement.remove(),delete e[t]}}),[]),{addRenderers:s,canvases:a.current}})();return o().createElement(Ct.Provider,{value:n},t)},St=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=2,e.shadowBlur=3,e.shadowColor="rgba(0,0,0,0.2)","string"==typeof t.label){const o=n.labelSize+2,a=2,i=e.measureText(t.label).width,l=Math.round(i+16),s=Math.round(o+4),c=Math.max(t.size,o/2)+2,d=t.y-s/2,u=t.y+s/2,p=t.x+(r?0:c),h=p+l+(r?c:0);e.beginPath(),e.moveTo(p,u-a),e.quadraticCurveTo(p,u,p+a,u),e.lineTo(h-a,u),e.quadraticCurveTo(h,u,h,u-a),e.lineTo(h,d+a),e.quadraticCurveTo(h,d,h-a,d),e.lineTo(p+a,d),e.quadraticCurveTo(p,d,p,d+a),e.closePath(),e.fill(),r&&(e.shadowOffsetX=-2,e.shadowOffsetY=0,e.beginPath(),e.arc(t.x,t.y,c,0,2*Math.PI),e.closePath(),e.fill())}else r&&(e.beginPath(),e.arc(t.x,t.y,t.size+2,0,2*Math.PI),e.closePath(),e.fill())},Ot=function(e,t,n){var r;let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!t.label)return;const a=n.labelSize,i=n.labelFont,l=n.labelWeight;o&&St(e,t,n,!1),e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,e.fillStyle=null!==(r=n.labelColor)&&void 0!==r&&r.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color,e.font=`${l} ${a}px ${i}`,e.fillText(t.label,t.x+t.size+11,t.y+a/3)},Lt=(e,t,n)=>{St(e,t,n,!0),Ot(e,t,n,!1)};class Pt extends ft.AbstractNodeProgram{constructor(e){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute float a_borderSize;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\nvarying float v_borderRadius;\n\nconst float bias = 255.0 / 254.0;\nconst float radius = 0.5;\n\nvoid main() {\n gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n \n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n v_borderRadius = radius - (radius * a_borderSize / a_size); // border radius in node's size (full size is 1)\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}","\nprecision mediump float;\n\nvarying vec4 v_color; // base color of node\nvarying float v_border;\nvarying float v_borderRadius; // inner border radius\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); // transparent color\nconst float radius = 0.5;\n\nvoid main(void) {\n float distToCenter = length(gl_PointCoord - vec2(0.5, 0.5)); // distance from current point to center of node\n\n if (distToCenter < v_borderRadius - v_border) // distance to inner border radius\n gl_FragColor = transparent;\n else if (distToCenter < v_borderRadius)\n gl_FragColor = mix(v_color, transparent, (v_borderRadius - distToCenter) / v_border);\n else if (distToCenter < radius - v_border) // distance to outer border radius\n gl_FragColor = v_color;\n else if (distToCenter < radius)\n gl_FragColor = mix(transparent, v_color, (radius - distToCenter) / v_border);\n else // points outside the button\n gl_FragColor = transparent;\n}\n",1,5),this.borderSize=void 0,this.borderSize=e.getAttribLocation(this.program,"a_borderSize"),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.borderSize),e.vertexAttribPointer(this.borderSize,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16)}process(e,t,n){const r=this.array;let o=1*n*5;if(t||!e.inPath)return r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,xt.floatColor)(e.color),r[o]=e.highlighted?4:2}render(e){const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.drawArrays(t.POINTS,0,this.array.length/5)}}class _t{constructor(){this.rebindTextureFns=[],this.images={},this.textureImage=void 0,this.hasReceivedImages=!1,this.pendingImagesFrameID=void 0,this.loadImage=(e,t)=>{if(this.images[e])return;const n=new Image;var r;n.addEventListener("load",(()=>{this.images[e]={status:"pending",image:n},"number"!=typeof this.pendingImagesFrameID&&(this.pendingImagesFrameID=requestAnimationFrame((()=>this.finalizePendingImages())))})),n.addEventListener("error",(()=>{this.images[e]={status:"error"}})),this.images[e]={status:"loading"},r=n,new URL(t,window.location.href).origin!==window.location.origin&&(r.crossOrigin=""),n.src=t.startsWith("data:image")?t:t+"?not-from-cache"},this.finalizePendingImages=()=>{this.pendingImagesFrameID=void 0;const e=[];for(const t in this.images){const n=this.images[t];"pending"===n.status&&e.push({id:t,image:n.image,size:Math.min(n.image.width,n.image.height)||1})}const t=document.createElement("canvas"),n=t.getContext("2d");t.width=e.reduce(((e,t)=>{let{size:n}=t;return e+n}),this.hasReceivedImages?this.textureImage.width:0),t.height=Math.max(this.hasReceivedImages?this.textureImage.height:0,...e.map((e=>{let{size:t}=e;return t})));let r=0;this.hasReceivedImages&&(n.putImageData(this.textureImage,0,0),r=this.textureImage.width),e.forEach((e=>{let{id:t,image:o,size:a}=e;const i=Math.min(128,a);let l=0,s=0;(o.width||0)>(o.height||0)?l=(o.width-o.height)/2:s=(o.height-o.width)/2,n.drawImage(o,l,s,a,a,r,0,i,i),this.images[t]={status:"ready",x:r,y:0,width:i,height:i},r+=i})),this.textureImage=n.getImageData(0,0,t.width,t.height),this.hasReceivedImages=!0,this.rebindTextureFns.forEach((e=>e()))}}}const kt={id:"defaultImage",path:(0,h.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};class Nt extends ft.AbstractNodeProgram{constructor(e,t){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute vec4 a_texture;\nattribute float a_inactive;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n\n // Pass inactive property\n v_inactive = a_inactive;\n}","\nprecision mediump float;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst float radius = 0.5;\n\n// convert color to gray\nvec4 toGrayscale(in vec4 color)\n{\n float average = (color.r + color.g + color.b) / 3.0;\n return vec4(average, average, average, 1.0);\n}\n\nvoid main(void) {\n vec4 color;\n\n // set texel as color of point\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(v_color, texel, texel.a).rgb, max(texel.a, v_color.a));\n } else {\n color = v_color;\n }\n\n // convert color to gray\n if (v_inactive > 0.0) {\n color = toGrayscale(color);\n }\n\n // distance from point to center of node\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n\n if (dist < radius - v_border) // points inside node\n gl_FragColor = color;\n else if (dist < radius) // border of node\n gl_FragColor = mix(transparent, color, (radius - dist) / v_border);\n else // points outside node\n gl_FragColor = transparent;\n}",1,9),this.imageLoader=void 0,this.texture=void 0,this.textureLocation=void 0,this.atlasLocation=void 0,this.latestRenderParams=void 0,this.inactive=void 0,this.imageLoader=new _t,this.imageLoader.rebindTextureFns.push((()=>{this&&this.rebindTexture&&this.rebindTexture(),t&&t.refresh&&t.refresh()})),this.imageLoader.textureImage=new ImageData(1,1),this.textureLocation=e.getAttribLocation(this.program,"a_texture"),this.inactive=e.getAttribLocation(this.program,"a_inactive");const n=e.getUniformLocation(this.program,"u_atlas");if(null===n)throw new Error("NodeProgramImage: error while getting atlasLocation");this.atlasLocation=n,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),this.imageLoader.loadImage(kt.id,kt.path),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.textureLocation),e.enableVertexAttribArray(this.inactive),e.vertexAttribPointer(this.inactive,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.textureLocation,4,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,20)}process(e,t,n){const r=this.array;let o=1*n*9;const a=e.image;let i=a&&this.imageLoader.images[a];if("string"!=typeof a||i||this.imageLoader.loadImage(a,a),t)return r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,xt.floatColor)(e.color),r[o++]=e.inactive?1:0,i&&"ready"===i.status||(i=this.imageLoader.images[kt.id]),i&&"ready"===i.status){const{width:e,height:t}=this.imageLoader.textureImage;r[o++]=i.x/e,r[o++]=i.y/t,r[o++]=i.width/e,r[o++]=i.height/t}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}render(e){if(this.hasNothingToRender())return;this.latestRenderParams=e;const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1i(this.atlasLocation,0),t.drawArrays(t.POINTS,0,this.array.length/9)}rebindTexture(){const e=this.gl;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.imageLoader.textureImage),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))}}const It=[{id:"expandIcon",path:(0,h.m5F)('<svg width="32" height="32" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="8" cy="8" r="8" fill="white"/>\n<circle cx="8" cy="8" r="7.5" stroke="black" stroke-opacity="0.541176"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.80013 7.20003V4H7.20013L7.20013 7.20003H4V8.80003H7.20013L7.20013 12H8.80013V8.80003H12V7.20003H8.80013Z" fill="black" fill-opacity="0.541176"/>\n</svg>')},{id:"collapseIcon",path:(0,h.m5F)('<svg width="32" height="32" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="8" cy="8" r="8" fill="white"/>\n<circle cx="8" cy="8" r="7.5" stroke="black" stroke-opacity="0.541176"/>\n<path d="M4 7.20004H12V8.80004H4V7.20004Z" fill="black" fill-opacity="0.541176"/>\n</svg>\n')}];class jt extends ft.AbstractNodeProgram{constructor(e,t){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute float a_buttonSize;\nattribute vec2 a_normals;\nattribute vec4 a_texture;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying float v_border;\nvarying vec4 v_texture;\nvarying vec4 v_color;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normals);\n vec2 unitNormal = (a_normals) / normalLength;\n\n float pixelsThickness = max(normalLength, 1.0 * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Move the point\n float adaptedWebGLNodeRadius = a_size * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n vec2 compensationVector = vec2(-unitNormal.y, unitNormal.x) * (adaptedWebGLNodeRadius);\n\n // Set position\n gl_Position = vec4((u_matrix * vec3(a_position + compensationVector, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_buttonSize * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n}","\nprecision mediump float;\n\nvarying float v_border;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 black = vec4(0.0, 0.0, 0.0, 1.0);\nconst float bias = 255.0 / 254.0;\nconst float radius = 0.5;\n\nvoid main(void) {\n vec4 color;\n float distToCenter = length(gl_PointCoord - vec2(0.5, 0.5));\n\n // set texel as color of point\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(black, texel, texel.a).rgb, max(texel.a, bias));\n } else {\n color = black;\n }\n\n if (distToCenter < radius - v_border) // points inside button\n gl_FragColor = color;\n else if (distToCenter < radius) // border of button\n gl_FragColor = mix(transparent, color, (0.5 - distToCenter) / v_border);\n else // points outside button\n gl_FragColor = transparent;\n}",2,11),this.imageLoader=void 0,this.texture=void 0,this.textureLocation=void 0,this.buttonSize=void 0,this.normals=void 0,this.correctionRatioLocation=void 0,this.sqrtZoomRatioLocation=void 0,this.atlasLocation=void 0,this.latestRenderParams=void 0,this.imageLoader=new _t,this.imageLoader.rebindTextureFns.push((()=>{this&&this.rebindTexture&&this.rebindTexture(),t&&t.refresh&&t.refresh()})),this.imageLoader.textureImage=new ImageData(1,1),this.textureLocation=e.getAttribLocation(this.program,"a_texture"),this.buttonSize=e.getAttribLocation(this.program,"a_buttonSize"),this.normals=e.getAttribLocation(this.program,"a_normals");const n=e.getUniformLocation(this.program,"u_correctionRatio");if(null===n)throw new Error("NodeButtonsProgram: error while getting correctionRatioLocation");this.correctionRatioLocation=n;const r=e.getUniformLocation(this.program,"u_sqrtZoomRatio");if(null===r)throw new Error("NodeButtonsProgram: error while getting sqrtZoomRatioLocation");this.sqrtZoomRatioLocation=r;const o=e.getUniformLocation(this.program,"u_atlas");if(null===o)throw new Error("NodeButtonsProgram: error while getting atlasLocation");this.atlasLocation=o,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),It.map((e=>this.imageLoader.loadImage(e.id,e.path))),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.buttonSize),e.enableVertexAttribArray(this.normals),e.enableVertexAttribArray(this.textureLocation),e.vertexAttribPointer(this.buttonSize,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.normals,2,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,20),e.vertexAttribPointer(this.textureLocation,4,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,28)}process(e,t,n){const r=this.array;let o=2*n*11;const a=t||e.inactive&&!e.highlighted,[i,l]=e.buttonOffset||[0,0];let s=i*i+l*l,c=0,d=0;if(s&&(s=1/Math.sqrt(s),c=l*s,d=i*s),a||!e.showExpand)r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0;else{const t=this.imageLoader.images.expandIcon;if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,xt.floatColor)(e.color),r[o++]=e.buttonSize||0,r[o++]=c,r[o++]=-d,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[o++]=t.x/e,r[o++]=t.y/n,r[o++]=t.width/e,r[o++]=t.height/n}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}if(a||!e.showCollapse)r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0;else{const t=this.imageLoader.images.collapseIcon;if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,xt.floatColor)(e.color),r[o++]=e.buttonSize||0,r[o++]=-c,r[o++]=-d,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[o++]=t.x/e,r[o++]=t.y/n,r[o++]=t.width/e,r[o++]=t.height/n}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}}render(e){if(this.hasNothingToRender())return;this.latestRenderParams=e;const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.uniform1i(this.atlasLocation,1),t.drawArrays(t.POINTS,0,this.array.length/11)}rebindTexture(){const e=this.gl;e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.imageLoader.textureImage),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))}}var At=n(23193),Ut=n.n(At);class zt extends(Ut()){process(e,t,n,r,o){if(r){for(let e=27*o,t=e+27;e<t;e++)this.array[e]=0;return}const a=n.arrowSizeRatio||1,i=n.size*a||1,l=t.size||1,s=e.x,c=e.y,d=t.x,u=t.y,p=(0,xt.floatColor)(n.color),h=d-s,m=u-c;let g=h*h+m*m,f=0,b=0;g&&(g=1/Math.sqrt(g),f=-m*g*i,b=h*g*i);let y=27*o;const v=this.array;v[y++]=d,v[y++]=u,v[y++]=-f,v[y++]=-b,v[y++]=l,v[y++]=p,v[y++]=1,v[y++]=0,v[y++]=0,v[y++]=d,v[y++]=u,v[y++]=-f,v[y++]=-b,v[y++]=l,v[y++]=p,v[y++]=0,v[y++]=1,v[y++]=0,v[y++]=d,v[y++]=u,v[y++]=-f,v[y++]=-b,v[y++]=l,v[y++]=p,v[y++]=0,v[y++]=0,v[y]=1}}class Dt extends zt{process(e,t,n,r,o){super.process(t,e,n,r,o)}}var Ft=n(73343),Zt=n.n(Ft);class Mt extends bt.AbstractEdgeProgram{constructor(e){super(e,"\nattribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\nattribute float a_arrowSizeRatio;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // our change - apply a_arrowSizeRatio depending on current zoom and minThickness\n float arrowSizeCoefficient = min(a_arrowSizeRatio, a_arrowSizeRatio / (u_sqrtZoomRatio * minThickness));\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio * arrowSizeCoefficient;\n\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}",Zt(),4,7),this.IndicesArray=void 0,this.indicesArray=void 0,this.indicesBuffer=void 0,this.indicesType=void 0,this.positionLocation=void 0,this.colorLocation=void 0,this.normalLocation=void 0,this.radiusLocation=void 0,this.arrowSizeRatioLocation=void 0,this.matrixLocation=void 0,this.sqrtZoomRatioLocation=void 0,this.correctionRatioLocation=void 0,this.canUse32BitsIndices=void 0;const t=e.createBuffer();if(null===t)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");this.indicesBuffer=t,this.positionLocation=e.getAttribLocation(this.program,"a_position"),this.colorLocation=e.getAttribLocation(this.program,"a_color"),this.normalLocation=e.getAttribLocation(this.program,"a_normal"),this.radiusLocation=e.getAttribLocation(this.program,"a_radius"),this.arrowSizeRatioLocation=e.getAttribLocation(this.program,"a_arrowSizeRatio");const n=e.getUniformLocation(this.program,"u_matrix");if(null===n)throw new Error("EdgeClampedProgram: error while getting matrixLocation");this.matrixLocation=n;const r=e.getUniformLocation(this.program,"u_sqrtZoomRatio");if(null===r)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");this.sqrtZoomRatioLocation=r;const o=e.getUniformLocation(this.program,"u_correctionRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");this.correctionRatioLocation=o,this.canUse32BitsIndices=(0,xt.canUse32BitsIndices)(e),this.IndicesArray=this.canUse32BitsIndices?Uint32Array:Uint16Array,this.indicesArray=new this.IndicesArray,this.indicesType=this.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,this.bind()}bind(){const e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),e.enableVertexAttribArray(this.positionLocation),e.enableVertexAttribArray(this.normalLocation),e.enableVertexAttribArray(this.colorLocation),e.enableVertexAttribArray(this.radiusLocation),e.enableVertexAttribArray(this.arrowSizeRatioLocation),e.vertexAttribPointer(this.positionLocation,2,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,0),e.vertexAttribPointer(this.normalLocation,2,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,8),e.vertexAttribPointer(this.colorLocation,4,e.UNSIGNED_BYTE,!0,7*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.radiusLocation,1,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,20),e.vertexAttribPointer(this.arrowSizeRatioLocation,1,e.FLOAT,!1,7*Float32Array.BYTES_PER_ELEMENT,24)}process(e,t,n,r,o){if(r){for(let e=28*o,t=e+28;e<t;e++)this.array[e]=0;return}const a=n.arrowSizeRatio||1,i=n.size||1,l=e.x,s=e.y,c=t.x,d=t.y,u="doubleArrow"===n.type?e.size||1:0,p=t.size||1,h=(0,xt.floatColor)(n.color),m=c-l,g=d-s;let f=m*m+g*g,b=0,y=0;f&&(f=1/Math.sqrt(f),b=-g*f*i,y=m*f*i);let v=28*o;const x=this.array;x[v++]=l,x[v++]=s,x[v++]=b,x[v++]=y,x[v++]=h,x[v++]=-u,x[v++]=a,x[v++]=l,x[v++]=s,x[v++]=-b,x[v++]=-y,x[v++]=h,x[v++]=u,x[v++]=a,x[v++]=c,x[v++]=d,x[v++]=b,x[v++]=y,x[v++]=h,x[v++]=p,x[v++]=a,x[v++]=c,x[v++]=d,x[v++]=-b,x[v++]=-y,x[v++]=h,x[v++]=-p,x[v]=a}computeIndices(){const e=this.array.length/7,t=e+e/2,n=new this.IndicesArray(t);for(let t=0,r=0;t<e;t+=4)n[r++]=t,n[r++]=t+1,n[r++]=t+2,n[r++]=t+2,n[r++]=t+1,n[r++]=t+3;this.indicesArray=n}bufferData(){super.bufferData();const e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)}render(e){if(this.hasNothingToRender())return;const t=this.gl,n=this.program;t.useProgram(n),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.drawElements(t.TRIANGLES,this.indicesArray.length,this.indicesType,0)}}const Bt=e=>{let{children:t}=e;const n=(0,r.useMemo)((()=>({allowInvalidContainer:!0,defaultNodeType:"image",hoverRenderer:Lt,labelRenderer:Ot,nodeProgramClasses:{image:(0,ft.createNodeCompoundProgram)([Nt,Pt,jt])},edgeProgramClasses:{line:vt(),arrow:(0,bt.createEdgeCompoundProgram)([Mt,zt]),doubleArrow:(0,bt.createEdgeCompoundProgram)([Mt,zt,Dt])},labelFont:"Roboto",labelSize:13,labelColor:{color:"rgba(0, 0, 0, 0.87)"}})),[]);return o().createElement(gt.C6,{graph:b.MultiGraph,style:{background:"transparent"},settings:n},o().createElement(Tt,null,t))};var Gt=n(28833),Vt=n.n(Gt),qt=n(3660),Yt=n.n(qt),Ht=n(28301),Wt=n.n(Ht),Xt=n(55962),$t=n(31181);const Kt={[h.MCv.bidirectional]:"doubleArrow",[h.MCv.directed]:"arrow",[h.MCv.undirected]:"line"},Qt=(e,t,n,r,o)=>e>n-o&&e<n+o&&t>r-o&&t<r+o&&Math.sqrt(Math.pow(e-n,2)+Math.pow(t-r,2))<o,Jt=e=>{let{graph:t,undirectedGraph:n,selectedNode:r,rootNodeUri:o}=e;if(t&&n&&o&&r&&o!==r)try{const e=(0,C.Ar)(n,o,r),a=function(e,t){const n=[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?"findOutEdge":"findEdge";return t&&t.forEach(((t,o,a)=>{const i=a[o+1];i&&n.push(e[r](t,i,(e=>!!e)))})),n}(t,e);return e?{edges:a,nodes:e}:{}}catch(e){}return{}},en=.4,tn=(e,t,n,r,o,a,i)=>({aX:e+(r-e)*(n-i-a)/n,aY:t+(o-t)*(n-i-a)/n,vX:(r-e)*i/n,vY:(o-t)*i/n}),nn=(e,t,n,r,o)=>{e.beginPath(),e.moveTo(t+r,n+o),e.lineTo(t+o*en,n-r*en),e.lineTo(t-o*en,n+r*en),e.lineTo(t+r,n+o),e.closePath(),e.fill()};function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){on(e,t,n[t])}))}return e}function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ln(e,t,n[t])}))}return e}function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sn=(0,u.memoizeWith)(((e,t,n)=>n.type),h.uie),cn={size:24,buttonSize:8,buttonOffset:[19,19]},dn={size:12,buttonSize:6,buttonOffset:[8,13]},un=e=>{let{data:t,graph:n,syncLayout:o,workerLayout:a,layoutSettings:i,selectedNode:l,isDirected:s=!1,onNodeClick:c,onNodeCollapse:u,onNodeExpand:m,filters:g}=e;const f=(0,gt.Ys)(),b=(0,gt.sG)(),y=(0,gt.$j)(),v=(0,gt.eP)(),{selfRelationsPathsMap:x,selfRelationLoopsCanvas:E}=(e=>{const t=(0,gt.Ys)(),{addRenderers:n,canvases:o}=Rt(),a=(0,r.useRef)({}),{selfRelationLoops:i}=o;return(0,r.useEffect)((()=>{n({selfRelationLoops:{renderer:n=>{e.forEachEdge(((e,r,o)=>{if(r.loop){delete a.current[e];const r=t.getEdgeDisplayData(e),i=t.getNodeDisplayData(o);if(r.hidden||i.hidden)return;const l=((e,t,n)=>{const{size:r,color:o,arrowSizeRatio:a=1}=t,i=n.x,l=n.y,s=n.size,c=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(n+r),y1:t,x2:e,y2:t+7*(n+r)}}(i,l,.6*s);e.strokeStyle=o,e.lineWidth=r;const d=new Path2D;if("arrow"===t.type||"doubleArrow"===t.type){if(e.fillStyle=o,"doubleArrow"===t.type){const t=((e,t,n,r,o)=>{const a=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return tn(e.x2,e.y2,a,t,n,r,o)})(c,i,l,s,r*a*2.2);nn(e,t.aX,t.aY,t.vX,t.vY),d.moveTo(t.aX,t.aY)}else d.moveTo(i,l);const n=((e,t,n,r,o)=>{const a=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return tn(e.x1,e.y1,a,t,n,r,o)})(c,i,l,s,r*a*2.2);d.bezierCurveTo(c.x2,c.y2,c.x1,c.y1,n.aX,n.aY),e.stroke(d),nn(e,n.aX,n.aY,n.vX,n.vY)}else d.moveTo(i,l),d.bezierCurveTo(c.x1,c.y1,c.x2,c.y2,i,l),e.stroke(d);return d})(n,rn({},r,{size:t.scaleSize(r.size)}),rn({},i,t.framedGraphToViewport(i),{size:t.scaleSize(i.size)}));a.current[e]=l}}))},insertBefore:"edges"}})}),[n,e,t]),{selfRelationsPathsMap:a.current,selfRelationLoopsCanvas:i}})(n),w=((e,t,n)=>{const o=(0,gt.Ys)(),a=(0,gt.$j)(),{addRenderers:i}=Rt(),l=(0,r.useRef)({x:0,y:0}),[s,c]=(0,r.useState)(null),[d,u]=(0,r.useState)(null),p=s||d;return(0,r.useEffect)((()=>{a({enterEdge:e=>{let{edge:t}=e;c(t)},leaveEdge:()=>{c(null)},mousemove:e=>{if(l.current.x=e.x,l.current.y=e.y,!t)return;const{context:r,canvasElement:o}=t,{x:a,y:i}=((e,t)=>{const n=e.getBoundingClientRect();return{x:(t.clientX-n.left)/(n.right-n.left)*e.width,y:(t.clientY-n.top)/(n.bottom-n.top)*e.height}})(o,e.original);for(const e in n){const t=n[e];if(r.isPointInStroke(t,a,i)){u(e);break}u(null)}}})}),[o,a,t,n]),(0,r.useEffect)((()=>{i({tooltips:{renderer:t=>{e.forEachEdge(((e,n,r)=>{const a=o.getEdgeDisplayData(e),i=o.getNodeDisplayData(r);if(!a.hovered||i.highlighted)return;const{x:s,y:c}=l.current;((e,t,n,r)=>{e.font="normal 10px Roboto",e.textAlign="center",e.textBaseline="middle";const o=e.measureText(r).width+16,a=t-o/2,i=n-12;e.fillStyle="rgba(0, 0, 0, 0.54)",((e,t,n,r,o,a)=>{e.beginPath(),e.moveTo(t,n+4),e.arcTo(t,n+24,t+4,n+24,4),e.arcTo(t+r,n+24,t+r,n+24-4,4),e.arcTo(t+r,n,t+r-4,n,4),e.arcTo(t,n,t,n+4,4),e.fill()})(e,a,i,o),e.fillStyle="#fff",e.fillText(r,a+o/2,i+12)})(t,s,c-15,a.relationLabel)}))},insertBefore:"mouse"}})}),[i,e,o]),p})(n,E,x),C=(0,d.useSelector)(p.ZP.selectors.getEntity),T=(0,d.useSelector)(p.ZP.selectors.getMetadata),S=(0,d.useSelector)(p.ZP.selectors.getAbsoluteImagePath)||"",[O,L]=(0,r.useState)(void 0),[P,_]=(0,r.useState)(null),[k,N]=(0,r.useState)({}),I=null==C?void 0:C.uri;(0,r.useEffect)((()=>{f.getCamera().setState({ratio:1.2})}),[n,f]),(0,r.useEffect)((()=>{if(_((0,R.toUndirected)(n)),b(n),o){const e=o(f.getGraph(),i);(0,$t.animateNodes)(f.getGraph(),e,{duration:1e3})}if(a){const e=new a(f.getGraph(),i);e.start();const t=setTimeout((()=>{e.stop()}),5e3);return()=>{clearTimeout(t),e.kill()}}}),[t,n,o,a,f,i,b,s]),(0,r.useEffect)((()=>{const e=Jt({graph:f.getGraph(),undirectedGraph:P,selectedNode:l,rootNodeUri:I});N(e)}),[l,I,f,P]),(0,r.useEffect)((()=>{y({enterNode:e=>{let{node:t}=e;L(t)},leaveNode:()=>{L(void 0)},clickNode:e=>{let{node:t}=e;c(t)},click:e=>{const t=(e=>{let{x:t,y:n}=e;const r=f.viewportToGraph({x:t,y:n}),o=f.getGraph(),a=o.nodes().map((e=>{const t=o.getNodeAttributes(e);return{nodeId:e,distance:Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2),hidden:t.hidden}})).sort(((e,t)=>e.distance-t.distance)).filter((e=>{let{hidden:t}=e;return!t}));return a.length>0?a[0].nodeId:null})(e);if(!t)return;const n=f.getNodeDisplayData(t),r=f.framedGraphToViewport({x:n.x,y:n.y}),o=f.scaleSize(n.buttonOffset[0]),a=f.scaleSize(n.buttonOffset[1]),i=f.scaleSize(n.buttonSize),l=Qt(e.x,e.y,r.x+o,r.y-a,i),s=Qt(e.x,e.y,r.x+o,r.y+a,i);if(n.showExpand&&l&&(m(t),c(t)),n.showCollapse&&s){const e=Jt({graph:f.getGraph(),undirectedGraph:P,selectedNode:t,rootNodeUri:I});u(t,e),c(t)}}})}),[f,y,c,u,m,I,P]),(0,r.useEffect)((()=>{const e=f.getGraph();let t;try{t=e.neighbors(l)}catch(e){}v({nodeReducer:(n,r)=>{const{entityTypesUris:o=[]}=g||{},a=sn(T,S,{type:r.entityTypeUri}),i=e.neighbors(n),s=i.map((t=>e.getNodeAttribute(t,"hidden"))).filter((e=>!!e)).length,c=(k.nodes||[]).includes(n),d=O===n,u=n===I,p=n===l,h=t&&!t.includes(n)&&l!==n&&l!==I&&!c,m=![l,I].includes(n)&&o.length>0&&!o.includes(r.entityTypeUri),f=an({},r,n===l?cn:dn,{color:"#0072CE",image:a,showExpand:r.untraversedRelationsCount>0||s>0,showCollapse:r.traversedRelationsCount>1&&i.length-s>1});return c||p||u?(f.inPath=!0,f.color=u?"#00FFFF":r.color):h&&(f.label=d?r.label:"",f.inactive=!0),d&&(f.highlighted=!0),m&&(f.hidden=!0),f},edgeReducer:(t,n)=>{const{relationTypesUris:r=[]}=g||{},o=an({},n,{hidden:!1}),a=(k.edges||[]).includes(t),i=(0,h.V3K)(T,n.relationTypeUri),c=(0,h.oSN)(T,i,"typeColor"),d=l&&l!==I&&!e.hasExtremity(t,l)&&!a||r.length>0&&!r.includes(n.relationTypeUri);var u;return c&&(o.color=c),w===t&&(o.hovered=!0),d&&(o.hidden=!0),s&&(o.arrowSizeRatio=4),a&&(o.color="#0072CE",o.size=4,o.arrowSizeRatio=s?1.4:n.arrowSizeRatio),o.type=(u=s?n.direction:h.MCv.undirected,Kt[u]||"line"),o.relationLabel=(0,h.idV)(null==i?void 0:i.label),o},enableEdgeHoverEvents:!0})}),[f,v,O,l,k,I,T,S,s,g,w])};function pn(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){hn(e,t,n[t])}))}return e}function hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mn=e=>{let{data:t,graph:n,selectedNode:o,layout:a,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const d=(0,E.D)(t);(0,Xt.D)((()=>{if(d){const e=(0,u.difference)(t.entities.map((0,u.prop)("uri")),d.entities.map((0,u.prop)("uri")));if(e.length){const t=n.copy();Vt().assign(t),e.forEach((e=>{n.setNodeAttribute(e,"x",t.getNodeAttribute(e,"x")),n.setNodeAttribute(e,"y",t.getNodeAttribute(e,"y"))}))}}}),[t]);const p=(0,r.useMemo)((()=>(Vt().assign(n),{settings:pn({},Yt().inferSettings(n),{gravity:1})})),[n]);return un({workerLayout:Wt(),layoutSettings:p,data:t,graph:n,selectedNode:o,onNodeClick:i,isDirected:a===h.YGb.DIRECTED_NETWORK,onNodeCollapse:l,onNodeExpand:s,filters:c}),null};var gn=n(36039);const fn=(e,t,n)=>{const r=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||r.add(t.id)})),r.size||r.add(n),r},bn=(e,t,n,r)=>{const o=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{n.add(t),r.forEach((r=>{r.from!==t||e.has(r.to)||n.has(r.to)||o.add(r.to)}))})),o.size&&t.push(Array.from(o)),((e,t,n)=>{const r=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||n.has(t.to)||r.add(t.to)}))})),!!r.size})(o,r,n)?bn(o,t,n,r):t},yn=(e,t,n,r,o)=>{if(e.length<=o&&(t[r]=[...e]),e.length>o){const a=e.slice(o),i=e.slice(0,o);t[r]=i,t[r+1]=n[r+1]?[...n[r+1],...a]:a}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return yn(e,t,n,r,o)}return t},vn=e=>{let{quantityAtLvl:t,rowNumber:n,isEvenItem:r,layout:o,shouldUseCheckboardPattern:a}=e;const i=o===h.YGb.VERTICAL_TB;return a&&i&&r&&1!==t?10*n+5:10*n},xn=e=>{let{quantityAtLvl:t,posAtLvl:n,max:r,isEvenRow:o,layout:a,shouldUseCheckboardPattern:i}=e;const l=a===h.YGb.HORIZONTAL_LR;return t===r?i&&o&&l?10*n+5:10*n:1===t?10*(r-1)/2:10*(r-1)/(t+1)*(n+1)},En=e=>e<100;function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Cn=e=>{let{data:t,graph:n,selectedNode:o,layout:a,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const d=(0,r.useCallback)((e=>{const t=e.copy(),n=(e=>{switch(e){case h.YGb.VERTICAL_TB:return 180;case h.YGb.HORIZONTAL_LR:return 270}})(a),r=(e=>{const t=e.nodes().map((e=>({id:e,name:""}))),n=e.mapEdges(((e,t,n,r)=>({from:n,to:r,key:e,relationTypeUri:t.relationTypeUri,direction:t.direction})));return{nodes:t,edges:n}})(t),i=r.nodes.length,l=!En(i),s=((e,t)=>{if(En(e))return 10;const n=t===h.YGb.VERTICAL_TB?1.5:.7;return Math.round(Math.sqrt(e)*n)})(i,a),c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=e.nodes,o=e.edges.filter((e=>e.from!==e.to)),a=fn(o,r,t),i=bn(a,[],new Set,o);return yn(i[0],[],i,0,n)}(r,o,s),d=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(c);for(let e=0;e<c.length;++e){const n=e%2==0,r=c[e].length;for(let o=0;o<r;++o){const i=o%2==0,s=xn({quantityAtLvl:r,posAtLvl:o,max:d,isEvenRow:n,layout:a,shouldUseCheckboardPattern:l}),u=vn({quantityAtLvl:r,rowNumber:e,isEvenItem:i,layout:a,shouldUseCheckboardPattern:l});t.setNodeAttribute(c[e][o],"x",s),t.setNodeAttribute(c[e][o],"y",u)}}return gn.rotation.assign(t,n,{degrees:!0}),t.reduceNodes(((e,t,n)=>{let{x:r,y:o}=n;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){wn(e,t,n[t])}))}return e}({},e,{[t]:{x:r,y:o}})}),{})}),[a,o]);return un({syncLayout:d,data:t,graph:n,selectedNode:o,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c}),null};var Rn=n(84425);const Tn=(0,W.makeStyles)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),Sn=(0,B.l)(q,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;const a=Tn(),i=(0,d.useSelector)(p.ZP.selectors.getMetadata),l=(0,d.useSelector)(p.ZP.selectors.getEntity),s=(0,r.useMemo)((()=>[{label:v().text("All"),value:null},...(0,h.mmY)(i,l.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[l,i]),c=(0,r.useMemo)((()=>s.find((e=>e.value===t))),[s,t]);return o().createElement(Rn.Z,{classes:{valueContainer:a.valueContainer},className:a.graphTypeSelector,height:42,label:v().text("Graph type"),value:c,options:s,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:a.filledInputRoot}}}})})),On=(0,W.makeStyles)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),Ln=(0,r.memo)((e=>{let{value:t,onChangeHandler:n,graphTypeUri:r}=e;const a=On(),i=[{label:v().text("Simple network"),value:h.YGb.SIMPLE_NETWORK},{label:v().text("Vertical hierarchy"),value:h.YGb.VERTICAL_TB},{label:v().text("Horizontal hierarchy"),value:h.YGb.HORIZONTAL_LR},{label:v().text("Directed network"),value:h.YGb.DIRECTED_NETWORK},{label:v().text("Tree"),value:h.YGb.TREE}],l=r?i:i.filter((e=>e.value!==h.YGb.TREE));return o().createElement(Rn.Z,{className:a.graphLayoutSelector,label:v().text("Graph layout"),value:i.find((0,u.propEq)("value",t)),options:l,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:a.filledInputRoot}}}})})),Pn=()=>{const e=(0,gt.Ys)(),t=(0,r.useCallback)((()=>{e.refresh()}),[e]);return o().createElement(Y.Z,{handleWidth:!0,onResize:t})};var _n=n(81087),kn=n(16844);function Nn(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){In(e,t,n[t])}))}return e}function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const jn="0 1px 1px rgba(0,0,0,0.14), 0 2px 1px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.2)",An={background:"#FFFFFF",boxShadow:jn,width:"28px",height:"28px"},Un=(0,W.makeStyles)({container:{display:"flex",alignItems:"center"},maxButton:Nn({},An,{borderRadius:"2px 4px 4px 2px"}),minButton:Nn({},An,{borderRadius:"4px 2px 2px 4px"}),thumb:{boxShadow:jn,borderRadius:"2px",width:"8px",height:"28px",marginLeft:"5px",color:"rgba(0,0,0,0.54)",backgroundColor:"#FFFFFF","&.MuiSlider-thumb.Mui-focusVisible, &:hover":{boxShadow:jn},"&:before":{boxShadow:"none"}},thumbIcon:{transform:"rotate(90deg)"},icon:{width:"18px",height:"18px"},rail:{opacity:1,height:"4px",paddingRight:"10px",marginTop:"1px"},sliderRoot:{color:"#EDEDED",marginRight:"10px",height:"2px"}});const zn=e=>Math.pow(100/e,2),Dn=e=>100/Math.sqrt(e),Fn=e=>{const{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children"]),r=Un();return o().createElement(kn.gs,n,t,o().createElement(_n.Z,{className:V()(r.icon,r.thumbIcon)}))},Zn=e=>{let{className:t,max:n,min:a}=e;const i=Un(),l=(0,gt.eP)(),s=(0,gt.$j)(),c=(0,gt.Ys)().getCamera(),{zoomIn:d,zoomOut:p}=(0,gt.AH)({factor:1.2}),[h,m]=(0,r.useState)((0,u.clamp)(a,n,Dn(c.getState().ratio))),g=(0,r.useMemo)((()=>a>0?zn(a):null),[a]),f=(0,r.useMemo)((()=>n>0?zn(n):null),[n]);return(0,r.useEffect)((()=>(l({maxCameraRatio:g,minCameraRatio:f}),()=>{l({maxCameraRatio:null,minCameraRatio:null})})),[l,f,g]),(0,r.useEffect)((()=>{s({updated:e=>m(Dn(e.ratio))})}),[s]),o().createElement("div",{className:V()(i.container,t)},o().createElement(Ae.Z,{className:i.minButton,onClick:()=>p(),size:"large"},o().createElement(_n.Z,{className:i.icon})),o().createElement(kn.ZP,{slots:{thumb:Fn},slotProps:{thumb:{className:i.thumb}},classes:{root:i.sliderRoot,rail:i.rail},track:!1,value:h,min:a,max:n,onChange:(e,t)=>c.setState({ratio:c.getBoundedRatio(zn(t))})}),o().createElement(Ae.Z,{className:i.maxButton,onClick:()=>d(),size:"large"},o().createElement(Ye.Z,{className:i.icon})))};var Mn=n(35299);const Bn=(0,W.makeStyles)({button:{background:"#FFFFFF",boxShadow:"0 1px 1px rgba(0,0,0,0.14), 0 2px 1px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.2)",width:"28px",height:"28px",borderRadius:"4px"},icon:{width:"18px",height:"18px"}}),Gn=e=>{let{node:t}=e;const n=Bn(),{gotoNode:r}=(0,gt.AH)();return o().createElement(Ae.Z,{className:n.button,onClick:()=>r(t),size:"large"},o().createElement(Mn.Z,{className:n.icon}))};var Vn=n(55201);const qn=(0,W.makeStyles)({hierarchyTree:{position:"relative",width:"calc(100% - 190px)",margin:"80px 95px 0",height:"calc(100% - 100px)"}}),Yn=e=>{var t;let{graphTypeUri:n}=e;const a=qn(),i=(0,d.useSelector)(p.ZP.selectors.getMetadata),l=(0,d.useSelector)(p.ZP.selectors.getEntity),s=null===(t=(0,h.mmY)(i,l.type).find((0,u.propEq)("uri",n)))||void 0===t?void 0:t.label,c=(0,r.useMemo)((()=>({id:"___graphView___",class:h.ZIY.HierarchyTree,graph:{type:n},caption:s})),[s,n]);return o().createElement(Vn.Pd,{config:c,className:a.hierarchyTree,isGraphView:!0})},Hn=(0,W.makeStyles)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"},rightBottomControls:{position:"absolute",zIndex:100,right:"18px",bottom:"16px",display:"flex",width:"200px"},zoomSlider:{flexGrow:1,marginRight:"8px"}}),Wn=(0,B.l)(q,(e=>{let{data:t,graphologyGraph:n,selectedEntity:r,onEntitySelect:o,onCollapseEntity:a,onExpandEntity:i,relationshipTable:{filters:l},graphTypeUri:s,layout:c,setLayout:d}=e;return{data:t,graph:n,selectedNode:null==r?void 0:r.uri,onNodeSelect:o,onNodeCollapse:a,onNodeExpand:i,filters:l,graphTypeUri:s,layout:c,setLayout:d}}),(e=>{let{data:t,graph:n,selectedNode:r,onNodeSelect:a,onNodeCollapse:i,onNodeExpand:l,filters:s,graphTypeUri:c,layout:d,setLayout:u}=e;const p=Hn(),m={data:t,graph:n,selectedNode:r,layout:d,onNodeClick:a,onNodeCollapse:i,onNodeExpand:l,filters:s};return o().createElement("div",{className:p.wrapper},o().createElement("div",{className:p.selectors},o().createElement(Sn,null),o().createElement(Ln,{value:d,onChangeHandler:u,graphTypeUri:c})),o().createElement("div",{className:p.graph},d===h.YGb.TREE?o().createElement(Yn,{graphTypeUri:c}):n&&o().createElement(Bt,null,o().createElement(o().Fragment,null,o().createElement(Pn,null),d===h.YGb.SIMPLE_NETWORK||d===h.YGb.DIRECTED_NETWORK?o().createElement(mn,m):o().createElement(Cn,m),o().createElement("div",{className:p.rightBottomControls},o().createElement(Zn,{className:p.zoomSlider,min:30,max:300}),o().createElement(Gn,{node:r}))))))})),Xn=(0,W.makeStyles)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),$n=(0,r.memo)((e=>{let{graphTypeUri:t,graphLayout:n}=e;const a=Xn(),i=(0,d.useSelector)(p.ZP.selectors.getEntity),l=((e,t,n)=>{const{layout:o,setLayout:a}=(e=>{const[t,n]=(0,r.useState)(h.YGb.SIMPLE_NETWORK);return(0,r.useEffect)((()=>{const t=Object.values(h.YGb).some((t=>e===t));t&&n(e)}),[e]),{layout:t,setLayout:n}})(n),{graphTypeUri:i,setGraphTypeUri:l}=((e,t,n)=>{const[o,a]=(0,r.useState)(null),i=(0,d.useSelector)(p.ZP.selectors.getMetadata);return(0,r.useEffect)((()=>{(0,h.mmY)(i,e.type).some((e=>{let{uri:n}=e;return t===n}))&&a(t)}),[t,e,i]),{graphTypeUri:o,setGraphTypeUri:e=>{a(e),e||n(h.YGb.SIMPLE_NETWORK)}}})(e,t,a),{graphLoading:s,data:c,graphologyGraph:m,onAddRelation:g,onDeleteRelation:f,onCollapseEntity:b,onExpandEntity:y}=k(e,i,o),{selectedEntity:E,onEntitySelect:w,selectedEntityLoading:C}=((e,t)=>{const n=(0,x._)(),o=(0,d.useDispatch)(),[a,i]=(0,r.useState)(null),l=(0,r.useRef)({}),[s,c]=(0,r.useState)(!1),m=(0,r.useCallback)((e=>{const t=l.current[e];return t?Promise.resolve(t):(0,h.HvW)(e).then((e=>(l.current=I(l.current,e),e)))}),[]),g=(0,r.useCallback)((e=>{var r;const a=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,u.propEq)("uri",e));a&&i(a),c(!0),n(m(e)).then(i).catch((e=>{o(p.ui.actions.errorSet((0,h.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{c(!1)}))}),[o,t,n,m]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(l.current=I({},e),g(e.uri))}),[null==e?void 0:e.uri]),(0,r.useEffect)((()=>{const n=null==t?void 0:t.entities.find((e=>(null==a?void 0:a.uri)===e.uri));n||(null!=e&&e.uri?(l.current=I({},e),g(e.uri)):(l.current={},i(null)))}),[t]),{selectedEntityLoading:s,selectedEntity:a,onEntitySelect:g}})(e,c);return{graphLoading:s,data:c,graphologyGraph:m,selectedEntity:E,selectedEntityLoading:C,graphTypeUri:i,relationshipTable:z({data:c,selectedEntityUri:null==E?void 0:E.uri,mainEntityUri:null==e?void 0:e.uri,graphTypeUri:i}),layout:o,onAddRelation:g,onDeleteRelation:f,onCollapseEntity:b,onExpandEntity:y,onEntitySelect:w,setGraphTypeUri:l,setLayout:a}})(i,t,n),{graphLoading:s,layout:c}=l,b=c===h.YGb.TREE,{tabs:y}={tabs:(0,r.useMemo)((()=>[{buttonProps:{id:ut.Relationship,icon:mt,tooltipTitle:v().text("Relationship"),showForDisabled:!0},content:o().createElement(nt,null)},{buttonProps:{id:ut.EntityDetails,icon:D.Z,tooltipTitle:v().text("Entity Details"),showForDisabled:!0},content:o().createElement(at,null)}]),[])};return o().createElement(q.Provider,{value:l},o().createElement("div",{className:a.perspectiveView},s&&o().createElement(m.Z,null),(null==i?void 0:i.uri)&&o().createElement("div",{className:a.graphContainer},o().createElement(g.n,{disabled:b,perspectiveId:"graph",buttonsProps:(0,u.pluck)("buttonProps",y)},o().createElement("div",{className:a.graphWrapper},o().createElement(f.n,{entity:i}),o().createElement(Wn,null)),o().createElement(pt,{tabs:y})))))}));$n.displayName="GraphPerspectiveView";const Kn=$n,Qn=(0,a.Z)({productionPrefix:"graph",disableGlobal:!0,seed:"grp"}),Jn=e=>{let{graphTypeUri:t,graphLayout:n}=e;return o().createElement(i.ZP,{generateClassName:Qn},o().createElement(s._,{dateAdapter:c.Q},o().createElement(Kn,{graphTypeUri:t,graphLayout:n}),o().createElement(l.Z,{showErrorFromStore:!0})))}}}]);
|
|
2
|
-
//# sourceMappingURL=3209.js.map
|