@reltio/remotes 1.4.1118 → 1.4.1121
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/22.js +1 -0
- package/2507.js +1 -0
- package/2712.js +1 -0
- package/2725.js +1 -0
- package/2864.js +1 -1
- package/3029.js +1 -0
- package/3213.js +2 -0
- package/{6375.js.LICENSE.txt → 3213.js.LICENSE.txt} +0 -0
- package/3553.js +1 -0
- package/4126.js +1 -0
- package/5026.js +2 -0
- package/{3100.js.LICENSE.txt → 5026.js.LICENSE.txt} +0 -0
- package/5276.js +1 -0
- package/5884.js +1 -1
- package/5912.js +1 -0
- package/6027.js +1 -0
- package/{4765.css → 604.css} +0 -0
- package/604.js +1 -0
- package/6947.js +1 -1
- package/737.js +1 -0
- package/{8716.js → 7621.js} +2 -2
- package/{8716.js.LICENSE.txt → 7621.js.LICENSE.txt} +0 -0
- package/8387.js +1 -1
- package/8419.js +1 -1
- package/8442.js +1 -0
- package/8581.js +1 -0
- package/9306.js +1 -0
- package/9609.js +1 -0
- package/9819.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1508.js +0 -1
- package/1867.js +0 -1
- package/3100.js +0 -2
- package/350.js +0 -1
- package/4190.js +0 -1
- package/4355.js +0 -1
- package/4765.js +0 -1
- package/5396.js +0 -1
- package/5580.js +0 -1
- package/597.js +0 -1
- package/6375.js +0 -2
- package/6425.js +0 -1
- package/6940.js +0 -1
- package/6971.js +0 -1
- package/6974.js +0 -1
- package/8421.js +0 -1
- package/8462.js +0 -1
- package/9123.js +0 -1
- package/9497.js +0 -1
package/597.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[597],{48852:(e,t,n)=>{n.d(t,{l:()=>a});var r=n(24328),o=n.n(r);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)}const a=(e,t,n)=>{if(e&&t){const a=(0,r.memo)(n);return n=>o().createElement(e.Consumer,null,(e=>o().createElement(a,l({},n,t(e,n)))))}return n}},32528:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(13688),o=n(48852);const l=e=>t=>(0,o.l)(r.X,e,t)},68439:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(99493),u=n(87638);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=t.type,g=(0,c.nt9)(p,m)||{},f=(0,c.VD3)(p,g,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),d=n(94079),p=n(87918),m=n.n(p),g=n(99493),f=n(87638),h=n(53180),y=n(68439);const b=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:l,classes:a}=e;const i=b({classes:a}),p=(0,c.useSelector)(f.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,g.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const x=(0,g.idV)(n.label),k=n.secondaryLabel,E=(0,g.ptG)(p,n),w=(0,g.Fn9)(n),C=n.uri,S=(0,g.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":C},o().createElement(h.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(d.Typography,{variant:"h6",className:i.label},x),k&&o().createElement(d.Typography,{variant:"subtitle2",className:i.secondaryLabel},k),E&&o().createElement(d.Typography,{variant:"subtitle1",className:i.businessCard},E)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,g.ZiX)(C)&&o().createElement(d.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(d.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",S))))),l&&o().createElement("div",null,l)))};v.propTypes={className:a().string,entity:a().object,children:a().node,classes:a().object};const x=v},39827:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(8818),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:g}=s,f=p(s,["active","buttonWrapper"]);return o().createElement("div",{className:a()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,d({},r,{classes:f,size:"S",key:t,className:a()({[a()(c.active,m)]:n===t},c.buttonWrapper,g),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},68108:(e,t,n)=>{n.r(t),n.d(t,{default:()=>lt});var r=n(24328),o=n.n(r),l=n(52730),a=n(8598),i=n(36138),s=n(44443),c=n(22664),u=n(39450),d=n(585),p=n(87918),m=n.n(p),g=n(87638),f=n(99493),h=n(71820),y=n(57730),b=n(20562),v=n(2804),x=n(85965),k=n(85890),E=n(91515),w=n(54362),C=n(6674),S=n(63149),O=n(48017),T=n(96955),N=n(57304),M=n(3409),R=n(93873),z=n(66095),P=n(20982),L=n(39827),U=n(94079),D=n(80147),Z=n(87685),B=n(22385),H=n(79692);const F=(0,H.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),j=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=F();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(B.Z,{className:a.closeButton,icon:Z.default,onClick:r}),t),l)};var I=n(99144),$=n(17440),W=n(31276),A=n(83401);let V;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(V||(V={}));const X=e=>(0,$.pipe)((0,$.map)((0,$.prop)("value")),$.sum)(e);function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Y(e,t,n[t])}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=e=>{let{data:t,width:n,height:o}=e;return(0,r.useMemo)((()=>{if(!n||!o)return{nodes:[],links:[]};const e=function(){let e=24,t=15,n=10,r=8,o=[1,1];function l(l){let{nodes:i,links:s}=l;const c={nodes:i,links:s};return function(e){let{nodes:t,links:n}=e;t.forEach((e=>{e.sourceLinks=[],e.targetLinks=[]})),n.forEach((e=>{e.source.sourceLinks.push(e),e.target.targetLinks.push(e)}))}(c),function(e){let{nodes:t}=e;t.forEach((e=>{e.value=Math.max(X(e.sourceLinks),X(e.targetLinks))}))}(c),function(t){let{nodes:n}=t;if(!n.length)return;let r,l=[n[0]],a=0;for(;l.length;)r=[],l.forEach((t=>{t.x=a,t.dx=e,t.targetLinks.forEach((e=>{r.indexOf(e.source)<0&&r.push(e.source)}))})),l=r,++a;if(n.forEach((e=>{e.x=a-1-e.x})),a>2){const t=(o[0]-2*e-22)/(a-2);n.forEach((n=>{n.sourceLinks&&0!=n.sourceLinks.length?n.x*=t:n.x=o[0]-e}))}else n[0].x=o[0]-e,n[1].x=n[0].x-22-e}(c),function(e){let{nodes:l,links:a}=e;const i=(0,$.pipe)((0,$.groupBy)((0,$.prop)("x")),$.toPairs,(0,$.sort)(((e,t)=>e[0]-t[0])),(0,$.map)((0,$.nth)(1)))(l);(function(){let e=(0,$.pipe)((0,$.map)((e=>(o[1]-(e.length-1)*r)/X(e))),(0,$.reduce)(Math.min,1/0))(i);const s=(0,$.pipe)((0,$.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,$.reduce)(Math.min,1/0))(l);e=Math.max(Math.min(e,t/s),n/s),i.forEach((t=>{t.forEach(((t,n)=>{t.y=n,t.dy=t.value*e}))})),a.forEach((t=>{t.dy=t.value*e}))})(),i.forEach((e=>{let t,n,l,a=0;const i=e.length;for(e.sort(((e,t)=>e.y-t.y)),l=0;l<i;++l)t=e[l],n=a-t.y,n>0&&(t.y+=n),a=t.y+t.dy+r;if(n=a-r-o[1],n>0)for(a=t.y-=n,l=i-2;l>=0;--l)t=e[l],n=t.y+t.dy+r-a,n>0&&(t.y-=n),a=t.y}));const s=(0,$.pipe)((0,$.map)((e=>(e.length-1)*r+(0,$.sum)((0,$.map)((e=>e.dy),e)))),(0,$.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,$.last)(e),r=o[1]-(t+n);e.forEach((e=>{e.y+=r,c>0&&(e.y-=c)}))}))}(c),a(c),function(e){let{nodes:t}=e;(0,$.pipe)((0,$.groupBy)((0,$.prop)("x")),$.toPairs,(0,$.sort)(((e,t)=>t[0]-e[0])),(0,$.map)((0,$.nth)(1)))(t).forEach((e=>{(e=e.concat().sort(((e,t)=>e.y-t.y))).forEach(((t,n)=>{var o;if(null!==(o=t.sourceLinks)&&void 0!==o&&o.length){var l,a,i;const{target:o,ty:s,dy:c}=(0,$.last)(t.sourceLinks);let u=o.y+s+c-t.dy;(null===(l=e[n-1])||void 0===l?void 0:l.x)==t.x&&u<(null===(a=e[n-1])||void 0===a?void 0:a.y)+(null===(i=e[n-1])||void 0===i?void 0:i.dy)+r&&(u=e[n-1].y+e[n-1].dy+r),t.y>u&&(t.y=u)}}))}))}(c),c}function a(e){let{nodes:t}=e;(0,$.pipe)((0,$.groupBy)((0,$.prop)("x")),$.toPairs,(0,$.sort)(((e,t)=>e[0]-t[0])),(0,$.map)((0,$.nth)(1)))(t).forEach((e=>{e.forEach((e=>{var t,n;if(null!==(t=e.targetLinks)&&void 0!==t&&t.length){const t=[],n=e.targetLinks.map((e=>e.crosswalk.uuid)),r=[];e.targetLinks.forEach((function(e){-1==this.indexOf(e.source)&&this.push(e.source)}),r);for(let o=0;o<r.length;o++)for(let l=0;l<r[o].sourceLinks.length;l++){const a=n.indexOf(r[o].sourceLinks[l].crosswalk.uuid);-1!=a&&t.push(e.targetLinks[a])}e.targetLinks=t}if(null!==(n=e.sourceLinks)&&void 0!==n&&n.length){var r;const t=[];if(null!==(r=e.targetLinks)&&void 0!==r&&r.length){const n=e.sourceLinks.map((e=>e.crosswalk.uuid));for(let r=0;r<e.targetLinks.length;r++){const o=n.indexOf(e.targetLinks[r].crosswalk.uuid);-1!=o&&t.push(e.sourceLinks[o])}}const n=t.map((e=>e.crosswalk.uuid)),o=e.sourceLinks.filter((function(e){return-1==this.indexOf(e.crosswalk.uuid)}),n);if(e.sourceLinks=o.concat(t),t.length>0){let t=0;for(let e=0;e<o.length;e++)t+=o[e].dy;e.sizeForNewSources=t}}}))})),t.forEach((e=>{let t=0,n=e.sizeForNewSources||0;delete e.sizeForNewSources,e.sourceLinks.forEach((e=>{e.sy=t,t+=e.dy})),e.targetLinks.forEach((e=>{e.ty=n,n+=e.dy}))}))}return l.nodeWidth=()=>e,l.setNodeWidth=t=>(e=+t,l),l.nodePadding=()=>r,l.setNodePadding=e=>(r=+e,l),l.smallestNodeMaxHeight=()=>t,l.setSmallestNodeMaxHeight=e=>(t=+e,l),l.smallestNodeMinHeight=()=>n,l.setSmallestNodeMinHeight=e=>(n=+e,l),l.size=()=>o,l.setSize=e=>(o=e,l),l.update=e=>(a(e),e),l.link=()=>{let t=.5;function n(n){const r=!n.target.sourceLinks||0==n.target.sourceLinks.length,o=n.source.x+n.source.dx,l=n.target.x,a=(d=+(d=o),p=+(p=l),e=>d*(1-e)+p*e),i=a(t),s=a(1-t),c=n.source.y+n.sy-.13,u=n.target.y+n.ty-.13;var d,p;const m=r?"":`L${l+e},${u} L${l+e},${u+n.dy+.26}`;return c===u?`M${o},${c} \n L${l},${u}${m} \n L${l},${u+n.dy+.26} \n L${o},${c+n.dy+.26} Z`:`M${o},${c}\n C${i},${c} ${s},${u} ${l},${u}${m} \n L${l},${u+n.dy+.26} \n C${s},${u+n.dy+.26} ${i},${c+n.dy+.26} \n ${o},${c+n.dy+.26} Z`}return n.curvature=function(e){return arguments.length?(t=+e,n):t},n},l}().setNodeWidth(14).setNodePadding(20).setSize([o-2,n-2]),r=e.nodeWidth(),l=e.link(),a=(e=>{const t=e.nodes.map((e=>G({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>G({},e,{source:n(e.source),target:n(e.target)})));return{nodes:t,links:r}})(t),{nodes:i,links:s}=e(a);return{nodes:i,links:s,nodeWidth:r,path:l}}),[t,o,n])};var q=n(94111),K=n(12147),Q=n(98685);const J=(0,H.Z)({tooltipTitle:{fontWeight:500,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.15px",marginBottom:"8px",userSelect:"none"},tooltipRow:{display:"flex",alignItems:"center",fontSize:"13px",lineHeight:"15px",fontWeight:"normal","&:not(:last-child)":{marginBottom:"4px"}},tooltipIcon:{fontSize:"18px",color:"rgba(0, 0, 0, 0.54)",marginRight:"8px"},node:{stroke:"#000000",strokeWidth:1,strokeOpacity:.38},rootNode:{transform:"rotate(90deg)",userSelect:"none",fontSize:"13px"}}),ee=e=>{let{user:t,time:n,children:r}=e;const l=J(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(K.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(Q.Z,{className:l.tooltipIcon}),t));return o().createElement(q.Z,{title:a,placement:"top"},r)},te=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=J(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:g,targetLinks:f,sourceLinks:h,entity:{crosswalks:y=[],merges:b}}=t,[v]=y,{isDimmed:x,highlightCrosswalk:k,removeHighlight:E}=(0,S.pu)(v),w=(0,S.nX)(v),C=null!=y&&y.length?h[y.length-1].sy+h[y.length-1].dy:0;return(0,r.useEffect)((()=>{var e;const n=t.dy,r=(null==u||null===(e=u.current)||void 0===e?void 0:e.clientWidth)||0;n<r&&c(n/2-r/2)}),[]),o().createElement("g",{transform:`translate(${d},${p})`},"ROOT"===m?o().createElement("text",{dy:-5,dx:s,ref:u,className:i.rootNode},g||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",opacity:l&&x?.19:1,onMouseEnter:()=>{l&&k()},onMouseLeave:()=>{l&&E()}}),!(null==f||!f.length)&&(()=>{const e=(0,$.pipe)((0,$.map)((0,$.prop)("source")),(0,$.groupBy)((0,$.prop)("time")))(f);return null==b?void 0:b.map(((t,r)=>{let{time:a,user:s}=t;const c=e[a];if(!c)return;const[u,d]=c.reduce(((e,t)=>{let{sourceLinks:n}=t;return[(0,$.min)((0,$.head)(n).ty,e[0]),(0,$.max)((0,$.last)(n).ty+(0,$.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(ee,{user:s,time:a,key:"node-"+r},o().createElement("rect",{transform:`translate(0,${u})`,height:d-u,width:n,className:i.node,fillOpacity:.54,fill:"#F0F0F0",opacity:l&&x?.38:1}))}))})()))},ne=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,S.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,S.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",opacity:r&&s?.1:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},re=e=>{let{width:t,height:n,data:l,accentContributors:a}=e;const[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0),[d,p]=(0,r.useState)(0),{links:m,nodes:g,nodeWidth:f,path:h}=_({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const y=(0,r.useMemo)((()=>g.map(((e,t)=>o().createElement(te,{highlightEnabled:a,isColored:a,node:e,nodeWidth:f,key:`SankeyNode-${t}`})))),[g,a,f,t,n]),b=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(ne,{highlightEnabled:!a,isColored:!a,link:e,path:h(e),key:`SankeyLink-${t}`})))),[a,m,h]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),k=i?"none":"auto",E=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:E,onPointerDown:e=>{e.preventDefault(),s(!0),v(e)},onPointerMove:e=>{if(!i)return;const t=v(e);p(d+t)},onPointerUp:x,onPointerLeave:x},o().createElement("g",{transform:`translate(${d},${n}) rotate(-90)`,pointerEvents:k},o().createElement("g",null,b),o().createElement("g",null,y)))};function oe(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=(0,$.curry)(((e,t)=>!e||e.some((0,f.aFF)(t)))),ae=(0,$.curry)(((e,t)=>(0,$.evolve)({crosswalks:(0,$.filter)(le(e)),merges:(0,$.map)((0,$.evolve)({losers:(0,$.map)(ae(e))}))},t))),ie=e=>{let t=1;const n=(0,$.pipe)((0,$.evolve)({crosswalks:(0,$.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){oe(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,$.evolve)({merges:(0,$.map)((0,$.evolve)({losers:(0,$.map)((e=>n(e)))}))}));return n(e)},se=e=>{const t=[],n=[],r=(e,o,l)=>{const{crosswalks:a=[],merges:i=[],uri:s="",label:c}=e;t.push({entity:e,name:s,time:l,label:c});const u=t.length-1,d=(0,$.pipe)((0,$.chain)((e=>{let{losers:t,time:n}=e;return(0,$.pipe)((0,$.filter)((e=>{var t,n;return(null===(t=e.crosswalks)||void 0===t?void 0:t.length)||(null===(n=e.merges)||void 0===n?void 0:n.length)})),(0,$.chain)((e=>r(e,u,n))))(t)})),(0,$.concat)(a))(i);return-1!=o&&d.forEach((e=>n.push({source:t[u],target:t[o],value:10,crosswalk:e}))),d};r(e,-1,Date.now());const o=(0,$.pipe)((0,$.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),$.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},ce=(0,H.Z)((()=>({graph:{padding:"8px 12px",boxSizing:"border-box",height:"100%",width:"100%",maxHeight:"500px"}}))),ue=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=ce(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,$.pipe)(ae(n),ie,se)({uri:"ROOT",label:t,crosswalks:[],merges:[{time:Date.now(),losers:[e]}]})}(t,n,r);return o().createElement("div",{className:a.graph},o().createElement(s.Z,{refreshMode:"debounce",refreshRate:100,handleWidth:!0,handleHeight:!0},(e=>{let{width:t=0,height:n=200}=e;return o().createElement(re,{width:t,height:n,data:i,accentContributors:l})})))}));var de=n(90186),pe=n(77243);function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ge(e,t,n[t])}))}return e}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fe=n(52017),he=n(79769),ye=n(71153),be=n.n(ye),ve=n(72753),xe=n(65549);function ke(){return ke=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},ke.apply(this,arguments)}const Ee=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={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ke({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M17 13.138l4.5 4.5-4.5 4.5V18.5h-1.247l-3.488-3.479 1.413-1.414 2.901 2.893H17v-3.362zM17 1.5L21.5 6 17 10.5V7.138h-.421l-11.03 11H2v-2h2.723l11.03-11H17V1.5zm-11.45 4l3.294 3.286-1.414 1.413L4.723 7.5H2v-2h3.55z",id:"svg457070356a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg457070356b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg457070356a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg457070356b)",d:"M0 0h24v24H0z"})))};var we=n(22983),Ce=n(8818),Se=n(51229);const Oe=(0,H.Z)((e=>({root:{display:"flex",alignItems:"center",paddingRight:"8px","& button + button":{marginLeft:"4px"}},focusedIcon:e=>{let{isFocused:t}=e;return{width:28,height:28,color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0}},title:{color:e.palette.text.secondary,paddingLeft:"6px",paddingRight:"2px"},uri:{lineHeight:"15px",color:e.palette.text.primary}}))),Te=e=>{let{contributorUri:t,focusable:n,disableAdd:r,disableUnmerge:l,onAdd:a,onUnmerge:i,onToggleFocus:s,onUnsubscribe:c,isFocused:u}=e;const d=Oe({isFocused:u});return o().createElement("div",{className:d.root},o().createElement(Ce.k,{size:"XXS",onClick:()=>s(),className:d.focusedIcon,icon:n&&ve.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(U.Typography,{variant:"body2",className:d.uri},o().createElement("span",{className:d.title},m().text("Entity ID:")),(0,f.nIW)(t)),o().createElement(Se.Z,null),a&&o().createElement(Ce.k,{size:"XS",icon:xe.Z,disabled:r,tooltipTitle:m().text("Add crosswalk"),showForDisabled:!0,onClick:()=>a()}),o().createElement(Ce.k,{size:"XS",icon:Ee,disabled:l,tooltipTitle:m().text("Unmerge"),showForDisabled:!0,onClick:()=>i()}),c&&o().createElement(Ce.k,{size:"XS",icon:we.Z,disabled:l,tooltipTitle:m().text("Unsubscribe"),showForDisabled:!0,onClick:()=>c()}))},Ne=(0,H.Z)((()=>({root:e=>{let{contributorColor:t}=e;return{fontSize:"13px",position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid rgba(0, 0, 0, 0.05)",paddingLeft:"8px","&:before":{content:'" "',borderLeft:`8px solid ${t}`,position:"absolute",top:-1,left:0,bottom:-1},"& > div + div":{marginTop:"1px"}}},editor:{padding:"0px 30px 0px 25px"}}))),Me=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,disableAddCrosswalk:c,disableEditCrosswalk:u,disableDeleteCrosswalk:d,disableUnmergeContributor:p,onUnmerge:m,onEdit:h,onDelete:y,onAdd:b,onToggleSourceExpanded:v,onUnsubscribeContributor:x}=e;const k=a?(0,f.GtP)(n):"rgba(0, 0, 0, 0.38)",E=Ne({contributorColor:k}),w=(0,l.useSelector)(g.ZP.selectors.getDataTenants),C=(0,r.useRef)(null),[O]=(0,S.RT)();(0,r.useEffect)((()=>{var e;a&&O&&((0,$.pipe)((0,$.find)((e=>{let{source:t}=e;return t===O.type})),(0,$.propOr)({},"crosswalksByTypes"),$.values,$.flatten)(i).some((e=>(0,f.aFF)(O,e)&&e!==O))&&(null==C||null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[O]);const[T,N]=(0,r.useState)(!1),M=(0,$.pipe)((0,$.pluck)("crosswalksByTypes"),(0,$.find)((e=>e[pe.Y.Simple].length||e[pe.Y.Empty].length)),(0,$.props)([pe.Y.Simple,pe.Y.Empty]),$.flatten,$.head)(i),{toggleCrosswalkFocus:R,isFocused:z}=(0,S.BF)(M),P=(0,$.pipe)((0,$.pluck)("crosswalksByTypes"),(0,$.chain)($.values),$.flatten)(i),L=(0,f.KMQ)(P,w);return o().createElement("div",{ref:C,className:be()(E.root,t)},o().createElement(Te,{contributorUri:n,focusable:a&&!!M,disableAdd:c,disableUnmerge:p,isFocused:a&&z,onToggleFocus:R,onAdd:M&&(()=>N(!0)),onUnmerge:m,onUnsubscribe:L&&(()=>x({contributorUri:n,dataTenant:L,crosswalk:M}))}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(fe.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:u,disableDeleteCrosswalk:d,onEdit:h,onDelete:y,onToggleExpanded:()=>v(t)})})),T&&o().createElement(he.Z,{className:E.editor,onAdd:e=>b({contributorCrosswalk:M,crosswalk:e}),onClose:()=>N(!1)}))},Re=(0,H.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function ze(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){Pe(e,t,n[t])}))}return e}function Pe(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=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,onAddCrosswalk:u=W.ZT,onEditCrosswalk:d=W.ZT,onDeleteCrosswalk:p=W.ZT,onUnmergeContributor:m=W.ZT,onUnsubscribeContributor:h=W.ZT}=e;const y=(0,l.useSelector)(g.ZP.selectors.getMetadata),b=(0,f.nt9)(y,n.type),v=Re(),x=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,f.HQx)(e);return t.filter((e=>!(0,f.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,$.pipe)((0,$.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,f.aFF)(e));return t&&me({ownerType:"relation"},t)}{const t=r.find((0,f.aFF)(e));return t&&me({ownerType:"entity"},t)}})),(0,$.filter)((e=>!!e)),(0,de.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[k,E]=(0,r.useState)({}),w=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,$.chain)((e=>{var n;let{source:o,crosswalksByTypes:l}=e;const a=null===(n=t[r])||void 0===n?void 0:n.includes(o);return l[pe.Y.Simple].concat(l[pe.Y.Empty]).concat(a?l[pe.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(x,k)),[x,k]);(0,r.useEffect)((()=>{s(w)}),[w]);const C=(0,r.useCallback)((e=>{p({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,p]),S=(0,r.useCallback)((e=>{d(ze({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,d]);return o().createElement("div",{className:v.table},x.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Me,{key:r,className:v.tableRow,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,f.mkC)(b),disableEditCrosswalk:c||!(0,f.Zm0)(b),disableDeleteCrosswalk:c||!(0,f.a14)(b),disableUnmergeContributor:c||!(0,f.uGe)(f.BDP.UNMERGE,b),onAdd:e=>u(ze({},e,{entity:n})),onDelete:C,onEdit:S,onUnmerge:()=>m(r),onUnsubscribeContributor:h,expandedSources:k[r],onToggleSourceExpanded:e=>{E((0,$.pipe)((0,$.unless)((0,$.has)(r),(0,$.assoc)(r,[])),(0,$.evolve)({[r]:(0,$.ifElse)((0,$.includes)(e),(0,$.without)([e]),(0,$.append)(e))})))}})})))}));var Ue=n(81556);const De=(0,H.Z)((e=>({container:{display:"flex",flexDirection:"column","& + &":{marginLeft:"16px"}},title:{fontSize:"13px",lineHeight:"15px",color:"#666666",marginBottom:"7px"},hintIcon:{width:"16px",height:"16px",verticalAlign:"middle"},graph:{width:"400px",height:"300px",borderRadius:"8px",background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",position:"relative"},checkedIcon:{position:"absolute",height:"20px",width:"20px",right:"10px",top:"10px",color:e.palette.primary.main},selectedTree:{border:`1px solid ${e.palette.primary.main}`,background:"rgba(0, 114, 206, 0.05)"}}))),Ze=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=W.ZT}=e;const s=De(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,f.CJp)((0,f.uKF)(e)):"#CACCD1"),[t]);return o().createElement(S.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(I.Z,{className:s.hintIcon})),o().createElement("div",{className:be()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(Ue.Z,{className:s.checkedIcon}),o().createElement(ue,{crosswalkTree:n}))))},Be=(0,H.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},trees:{display:"flex"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),He=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=Be(),[c,u]=(0,r.useState)(f.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,f.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(U.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(U.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(U.DialogContent,{classes:{root:s.dialogContent}},o().createElement(U.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Ze,{onSelect:()=>u(f.MBD.Unmerge),selected:c===f.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Ze,{onSelect:()=>u(f.MBD.TreeUnmerge),selected:c===f.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(U.DialogActions,null,o().createElement(U.Button,{onClick:a},m().text("Cancel")),o().createElement(U.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},Fe=(0,H.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),je=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=Fe(),c=(0,r.useMemo)((()=>(0,f.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(U.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(U.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(U.DialogContent,{classes:{root:s.dialogContent}},o().createElement(U.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,f.nIW)(n.uri).toUpperCase()),o().createElement(Ze,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(U.DialogActions,null,o().createElement(U.Button,{onClick:a},m().text("Cancel")),o().createElement(U.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},Ie=(0,H.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%"},modeSwitcher:{backgroundColor:e.palette.background.paper,marginTop:"8px"},infoIcon:{fontSize:"18px",marginRight:"8px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"5px 12px 10px 12px"},hintText:{fontSize:"12px",lineHeight:"16px"},crosswalksList:{height:"100%",width:"calc(100% - 24px)",margin:"8px 12px",background:e.palette.divider,opacity:.2},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},resizablePanesWrapper:{flexGrow:1,width:"100%"}})));function $e(){return $e=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},$e.apply(this,arguments)}const We=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=W.ZT,onUnsubscribeContributor:c=W.ZT}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["activeMode","contributors","crosswalkTree","entity","onChangeMode","onUnmergeContributor","onUnsubscribeContributor"]);const d=Ie(),[p,g]=(0,r.useState)("50%"),h=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return g(t)}),[]),[y,b]=(0,r.useState)(),[v,x]=(0,r.useState)(),k=(0,r.useMemo)((()=>(0,f.Qbq)(l)>1),[l]),E=(0,r.useMemo)((()=>[{id:V.Crosswalk,title:m().text("Crosswalk")},{id:V.Source,title:m().text("Source")},{id:V.Contributor,title:m().text("Contributor")}]),[]),[w,C]=(0,r.useState)(),S=t===V.Contributor;return o().createElement("div",{className:d.root},y&&o().createElement(He,{canUnmerge:k,onClose:()=>b(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:y,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===y}))}),v&&o().createElement(je,{canUnsubscribe:k,onClose:()=>x(null),onUnsubscribeContributor:()=>c({dataTenant:v.dataTenant,crosswalk:v.crosswalk}),crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===v.contributorUri}))}),o().createElement(A.Z,{modes:E,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(T.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:p,minSize:170,maxSize:-170,allowResize:!0,onChange:h},o().createElement("div",{className:d.pane},l&&!(0,$.isEmpty)(w)&&o().createElement(ue,{entityLabel:(0,f.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:w,accentContributors:S})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(I.Z,{className:d.infoIcon}),o().createElement("span",{className:d.hintText},m().text("You can drag a crosswalk to add values to attributes swimlanes"))),a&&o().createElement(Le,$e({onUnmergeContributor:b,onUnsubscribeContributor:x,accentContributors:S,contributors:n,entity:a,onChangeVisibleCrosswalks:C},u)))))}));var Ae=n(67218);function Ve(){return Ve=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},Ve.apply(this,arguments)}const Xe=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={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ve({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("mask",{id:"svg4041339336a",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"19",height:"17"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S4.83 6.5 4 6.5 2.5 5.83 2.5 5zM21 20H8v-2h13v2zM8 10h13V8H8v2zm0-4V4h13v2H8zm0 10h13v-2H8v2zm-2.5.5v-3h-3v3h3z",fill:"#fff"})),o().createElement("g",{mask:"url(#svg4041339336a)"},o().createElement("path",{fillOpacity:".54",fill:"#000",d:"M0 0h24v24H0z"})))},Ge=e=>{console.error(e),d.Z.addError({title:m().text("Error"),message:(0,f.xU7)(e,m().text("Something went wrong"))})};var Ye=n(39417),_e=n(58651),qe=n(13896);function Ke(){return Ke=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},Ke.apply(this,arguments)}const Qe=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={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ke({width:"90",height:"90",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#0072CE",fillOpacity:".1"}),o().createElement("mask",{id:"svg985456408a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"90",height:"90"},o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#fff"})),o().createElement("g",{mask:"url(#svg985456408a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-5.625 3.164h90V90h-90V3.164z",fill:"url(#paint0_linear)"}),o().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M66.01 19.992l20.615 20.615v52.337H32.83L18.281 79.131V19.99H66.01z",fill:"url(#paint1_linear)"}),o().createElement("path",{opacity:".06",fillRule:"evenodd",clipRule:"evenodd",d:"M16.523 20.39H87.54A2.46 2.46 0 0190 22.853v55.195a2.46 2.46 0 01-2.46 2.46H16.522a2.46 2.46 0 01-2.46-2.46V22.852a2.46 2.46 0 012.46-2.461z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 19.688h70.664c.971 0 1.758.787 1.758 1.757v55.196c0 .97-.787 1.757-1.758 1.757H17.578c-.97 0-1.758-.787-1.758-1.757V21.445c0-.97.787-1.758 1.758-1.758z",fill:"#fff"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 25.536c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 29.754c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 57.305c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 61.523c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 67.852c0-.583.472-1.055 1.055-1.055h28.696a1.055 1.055 0 110 2.11H38.1a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 72.07c0-.582.472-1.054 1.055-1.054h26.087a1.055 1.055 0 110 2.109H37.97a1.055 1.055 0 01-1.055-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 36.21c0-.582.472-1.054 1.054-1.054h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 40.43c0-.583.472-1.055 1.054-1.055h22.572a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"37.266",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"47.813",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"59.414",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"69.961",r:"3.164",fill:"#B6C7DB"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 46.758c0-.583.472-1.055 1.054-1.055h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 50.977c0-.583.472-1.055 1.054-1.055h26.088a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M32.524 37.969v-2.813h-.703v14.191h3.93v-.703h-3.227v-9.972h3.227v-.703h-3.227z",fill:"#2B98F0"}),o().createElement("path",{opacity:".54",fillRule:"evenodd",clipRule:"evenodd",d:"M33.423 27.07l-1.242 1.243-1.243-1.243h2.485z",fill:"#000"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 7.734h65.39a2.11 2.11 0 012.11 2.11v6.328a2.11 2.11 0 01-2.11 2.11h-65.39a2.11 2.11 0 01-2.11-2.11V9.844a2.11 2.11 0 012.11-2.11z",fill:"#fff"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M20.39 13.008a2.11 2.11 0 012.11-2.11h24.61a2.11 2.11 0 110 4.22H22.5a2.11 2.11 0 01-2.11-2.11zM52.031 13.008a2.11 2.11 0 012.11-2.11h3.515a2.11 2.11 0 110 4.22h-3.515a2.11 2.11 0 01-2.11-2.11z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear",x1:"-5.625",y1:"3.164",x2:"-5.625",y2:"90",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:".01"}),o().createElement("stop",{offset:"1",stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"paint1_linear",x1:"93.557",y1:"63.672",x2:"54.451",y2:"27.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"}))))},Je=(0,H.Z)((e=>({root:{height:"100%",overflow:"hidden",background:e.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"115px"},info:{color:e.palette.text.secondary,fontSize:"16px",lineHeight:"24px",marginTop:"16px"}}))),et=()=>{const e=Je();return o().createElement("div",{className:e.root},o().createElement(Qe,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))},tt=(0,H.Z)({sourcesView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},resizablePanesWrapper:{flexGrow:1,height:"100%"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},tabs:{marginLeft:"1px"}});var nt;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(nt||(nt={}));const rt=(0,l.connect)((e=>({entity:g.ZP.selectors.getEntity(e),metadata:g.ZP.selectors.getMetadata(e),historyEvent:g.ZP.selectors.getHistoryEvent(e)})))((e=>{var t,n;let{config:a,entity:i,metadata:s,getSavedState:c,saveState:u,dispatch:d,historyEvent:p}=e;const Z=tt(),[B,H]=(0,r.useState)(V.Crosswalk),[F,I]=(0,r.useState)(0),A=e=>I((t=>t===e?null:e)),X=null!==F,G=F===nt.History,{isHistoryEnabled:Y,isProfilePersisted:_}=(0,h.C)({isHistoryTabActive:G,entity:i}),q=_?i:null,K=null==q?void 0:q.uri,Q=(0,f.nt9)(s,null==i?void 0:i.type),{historySlice:J}=(0,y.a)({entity:q,historyEvent:p}),[ee,te]=(0,r.useState)();(0,b.D)((()=>{te(void 0)}),[J]),(0,b.D)((()=>{te(void 0)}),[K]);const[ne,re]=(0,r.useState)(-480),oe=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return re(t)}),[]),{isLoaded:le,savedState:ae}=(0,v.a)(c),[ie,se]=(0,r.useState)();(0,r.useEffect)((()=>{le&&se(ae.visibleColumns)}),[le]),(0,r.useEffect)((()=>{const e=!(0,$.equals)(ie,ae.visibleColumns);le&&e&&u({visibleColumns:ie})}),[ie]);const{crosswalkTree:ce,reload:ue}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,Ae._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,f.wo0)({entityUri:e})).then((e=>{n(e)})).catch(i).finally((()=>{l(!1)}))):n(null)}),[e]);return(0,r.useEffect)((()=>{s()}),[s]),{isLoading:o,crosswalkTree:t,reload:s}})((null==J?void 0:J.aEntity.uri)||K),de=(0,r.useMemo)((()=>(0,f.b7X)(ce)),[ce]),pe=(0,r.useCallback)((()=>{K&&d(g.N5.entity.actions.loadEntity({viewId:a.id,uri:K}))}),[K,a,d]),me=(0,r.useCallback)((0,$.pipe)(pe,ue),[pe,ue]),{modifiedEntity:ge,crosswalksMap:fe,newlyCreatedAttributes:he,onDeleteAttribute:ye,onPinAttribute:be,onIgnoreAttribute:ve,onEditAttribute:xe,onAddAttribute:ke}=(0,x.Q)({entity:(null==J?void 0:J.aEntity)||q,onModify:me,onError:Ge}),{addCrosswalk:Ee,deleteCrosswalk:we,editCrosswalk:Ce,unmergeContributor:Se,unsubscribeContributor:Oe}=(e=>{let{onLoad:t=W.ZT,onSuccess:n=W.ZT,onError:o=W.ZT}=e;const{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s}=(0,Ye.P)({onLoad:t,onSuccess:n,onError:o}),c=(0,l.useSelector)(g.ZP.selectors.getDtssPath),u=(0,l.useSelector)(g.ZP.selectors.getTenant),d=(0,r.useCallback)((e=>{t(),e.then((()=>{n()})).catch(o)}),[t,o,n]);return{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s,unmergeContributor:(0,r.useCallback)((e=>(0,$.pipe)(f.L8n,d)(e)),[d]),unsubscribeContributor:(0,r.useCallback)((e=>{let{crosswalk:t,dataTenant:n}=e;return(0,$.pipe)(f.R9X,(0,$.andThen)((e=>{if(!e.successful)throw new Error(m().text("Failed to unsubscribe contributor"));return e})),d)({dtssPath:c,value:t.value,type:t.type,sourceTable:t.sourceTable,dataTenant:n.id,customerTenant:u})}),[d,c,u])}})({onSuccess:me,onError:(0,r.useCallback)((e=>{Ge(e),e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND&&me()}),[me])}),{historyFilter:Te,onApplyFilter:Ne,onClearFilter:Me,isLoading:Re,historicUris:ze,historyWithTotal:Pe,canLoadMore:Le,onLoadMore:Ue}=(0,k.k)({entity:q,enabled:Y}),De=(e=>{let{activeMode:t,contributors:n}=e;const o=(0,r.useCallback)((e=>{var r;switch(t){case V.Source:return(0,f.kW2)(e.type);case V.Contributor:return(0,f.GtP)((null===(r=(0,f.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case V.Crosswalk:return(0,f.CJp)((0,f.uKF)(e))}}),[t,n]),[l,a]=(0,r.useState)([]),i=(0,r.useRef)([]),s=(0,r.useCallback)((0,f.DsO)((()=>{a([...i.current])}),50),[]),c=(0,r.useCallback)((e=>{i.current=e,s(e)}),[s]),u=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===V.Contributor){const t=(0,f.A1W)(n,e);c([e,...(null==t?void 0:t.crosswalks)||[]])}else c([e]);else c([])}),[t,c,n]),[d,p]=(0,r.useState)([]),m=(0,r.useCallback)(((e,t)=>(0,$.concat)(e.filter((e=>!(0,$.any)((0,f.aFF)(e),t))),t.filter((t=>!(0,$.any)((0,f.aFF)(t),e))))),[]),g=(0,r.useCallback)((e=>{if(e)if(t===V.Contributor){const t=(0,f.A1W)(n,e);p((n=>m([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else p((t=>m([e],t)))}),[t,m,n]);return(0,r.useEffect)((()=>{p([])}),[t]),{getCrosswalkColor:o,highlightedCrosswalks:(0,r.useMemo)((()=>[...l,...d]),[l,d]),focusedCrosswalks:d,toggleCrosswalkFocus:g,setCrosswalkHighlighted:u}})({activeMode:B,contributors:de}),Ze=[{buttonProps:{id:nt.Legend,icon:Xe,tooltipTitle:m().text("Legend")},title:o().createElement(U.Typography,{variant:"h6"},m().text("Legend")),content:o().createElement(We,{activeMode:B,onChangeMode:H,entity:(null==J?void 0:J.aEntity)||q,crosswalkTree:ce,contributors:de,selectedAttributeTypes:ee,readOnly:!!J,onAddCrosswalk:Ee,onUnmergeContributor:Se,onUnsubscribeContributor:Oe,onEditCrosswalk:Ce,onDeleteCrosswalk:we})},{buttonProps:{id:nt.History,icon:D.Z,tooltipTitle:m().text("History")},title:o().createElement(E.Z,{total:((null==ze?void 0:ze.length)||0)+1,entityType:Q,filter:Te,onApplyFilter:Ne,onClearFilter:Me}),content:_?o().createElement(w.Z,{isLoading:Re,historyWithTotal:Pe,contributorsUris:ze,entityUri:K,historyEvent:p,onLoadMore:Ue,canLoadMore:Le}):o().createElement(C.Z,null)}];return o().createElement("div",{className:Z.sourcesView},o().createElement(S.hR,De,o().createElement(qe.DndProvider,{backend:_e.default},o().createElement(O.Z,null),o().createElement(T.Z,{className:Z.resizablePanesWrapper,orientation:"vertical",size:X?ne:"100%",minSize:480,maxSize:-480,allowResize:X,onChange:oe},o().createElement("div",{className:Z.pane},o().createElement(N.Z,{entity:(null==J?void 0:J.aEntity)||i},J?o().createElement(M.Z,null):o().createElement(R.a,null)),_?o().createElement(z.R,{attributeUris:he},o().createElement(P.Z,{visibleColumns:ie,onChangeVisibleColumns:se,entity:ge,crosswalksMap:fe,selectedAttributeTypes:ee,onSelectAttributeTypes:te,readOnly:!!J,onDelete:ye,onPin:be,onIgnore:ve,onEdit:xe,onAdd:ke})):o().createElement(et,null)),o().createElement(j,{className:Z.pane,title:null===(t=Ze[F])||void 0===t?void 0:t.title,onClose:()=>A(F)},null===(n=Ze[F])||void 0===n?void 0:n.content)))),o().createElement(L.G,{className:Z.tabs,buttonsProps:(0,$.pipe)((0,$.reject)((0,$.propEq)("hidden",!0)),(0,$.pluck)("buttonProps"))(Ze),onButtonClick:A,activeIndexId:F}))})),ot=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),lt=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:g}=e;const h=(0,r.useCallback)((0,f.aYu)(g),[g]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:ot},o().createElement(c.MuiPickersUtilsProvider,{utils:a.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==p?void 0:p(Math.floor(e),Math.floor(t))}),t&&o().createElement(rt,{config:t,saveState:m,getSavedState:h}),o().createElement(d.Z,null)))))}}}]);
|
package/6375.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6375.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6375],{8598:(e,n,t)=>{"use strict";t.d(n,{Z:()=>o});var r=t(95038),i=t.n(r);const o=function(){function e(e){var n=void 0===e?{}:e,t=n.locale,r=n.instance,o=n.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=r||o||i(),this.locale=t}return e.prototype.parse=function(e,n){return""===e?null:this.moment(e,n,!0)},e.prototype.date=function(e){if(null===e)return null;var n=this.moment(e);return n.locale(this.locale),n},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,n){return e.diff(n)},e.prototype.isAfter=function(e,n){return e.isAfter(n)},e.prototype.isBefore=function(e,n){return e.isBefore(n)},e.prototype.isAfterDay=function(e,n){return e.isAfter(n,"day")},e.prototype.isBeforeDay=function(e,n){return e.isBefore(n,"day")},e.prototype.isBeforeYear=function(e,n){return e.isBefore(n,"year")},e.prototype.isAfterYear=function(e,n){return e.isAfter(n,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,n){return e.locale(this.locale),e.format(n)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,n){return n<0?e.clone().subtract(Math.abs(n),"days"):e.clone().add(n,"days")},e.prototype.setHours=function(e,n){return e.clone().hours(n)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,n){return e.clone().minutes(n)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,n){return e.clone().seconds(n)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,n){return e.isSame(n,"day")},e.prototype.isSameMonth=function(e,n){return e.isSame(n,"month")},e.prototype.isSameYear=function(e,n){return e.isSame(n,"year")},e.prototype.isSameHour=function(e,n){return e.isSame(n,"hour")},e.prototype.setMonth=function(e,n){return e.clone().month(n)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var n=[e.clone().startOf("year")];n.length<12;){var t=n[n.length-1];n.push(this.getNextMonth(t))}return n},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,n){return e.clone().set("year",n)},e.prototype.mergeDateAndTime=function(e,n){return this.setMinutes(this.setHours(e,this.getHours(n)),this.getMinutes(n))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,n){return null===e&&null===n||this.moment(e).isSame(n)},e.prototype.getWeekArray=function(e){for(var n=e.clone().startOf("month").startOf("week"),t=e.clone().endOf("month").endOf("week"),r=0,i=n,o=[];i.isBefore(t);){var s=Math.floor(r/7);o[s]=o[s]||[],o[s].push(i),i=i.clone().add(1,"day"),r+=1}return o},e.prototype.getYearRange=function(e,n){for(var t=this.moment(e).startOf("year"),r=this.moment(n).endOf("year"),i=[],o=t;o.isBefore(r);)i.push(o),o=o.clone().add(1,"year");return i},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,n){return this.format(e,n?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},74443:(e,n,t)=>{"use strict";var r=t(14859);n.Z=void 0;var i=r(t(24328)),o=(0,r(t(50175)).default)(i.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddCircle");n.Z=o},57676:(e,n,t)=>{"use strict";var r=t(14859);n.Z=void 0;var i=r(t(24328)),o=(0,r(t(50175)).default)(i.default.createElement("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"Tune");n.Z=o},45767:(e,n,t)=>{"use strict";t.d(n,{Z:()=>u});var r=t(24328),i=t.n(r),o=t(7560),s=t(72379);const u=(c=i().createElement("path",{d:"M7 10l5 5 5-5z"}),(a=i().memo(i().forwardRef((function(e,n){return i().createElement(s.Z,(0,o.Z)({ref:n},e),c)})))).muiName=s.Z.muiName,a);var c,a},52180:function(e,n,t){var r;!function(i){"use strict";var o,s,u,c=9e15,a=1e9,f="0123456789abcdef",d="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",h={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-c,maxE:c,crypto:!1},p=!0,g="[DecimalError] ",m=g+"Invalid argument: ",v=g+"Precision limit exceeded",w=g+"crypto unavailable",y=Math.floor,M=Math.pow,N=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,b=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,x=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,E=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,_=1e7,O=d.length-1,R=l.length-1,A={name:"[object Decimal]"};function C(e){var n,t,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,n=1;n<i;n++)(t=7-(r=e[n]+"").length)&&(o+=Z(t)),o+=r;(t=7-(r=(s=e[n])+"").length)&&(o+=Z(t))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function j(e,n,t){if(e!==~~e||e<n||e>t)throw Error(m+e)}function D(e,n,t,r){var i,o,s,u;for(o=e[0];o>=10;o/=10)--n;return--n<0?(n+=7,i=0):(i=Math.ceil((n+1)/7),n%=7),o=M(10,7-n),u=e[i]%o|0,null==r?n<3?(0==n?u=u/100|0:1==n&&(u=u/10|0),s=t<4&&99999==u||t>3&&49999==u||5e4==u||0==u):s=(t<4&&u+1==o||t>3&&u+1==o/2)&&(e[i+1]/o/100|0)==M(10,n-2)-1||(u==o/2||0==u)&&0==(e[i+1]/o/100|0):n<4?(0==n?u=u/1e3|0:1==n?u=u/100|0:2==n&&(u=u/10|0),s=(r||t<4)&&9999==u||!r&&t>3&&4999==u):s=((r||t<4)&&u+1==o||!r&&t>3&&u+1==o/2)&&(e[i+1]/o/1e3|0)==M(10,n-3)-1,s}function F(e,n,t){for(var r,i,o=[0],s=0,u=e.length;s<u;){for(i=o.length;i--;)o[i]*=n;for(o[0]+=f.indexOf(e.charAt(s++)),r=0;r<o.length;r++)o[r]>t-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/t|0,o[r]%=t)}return o.reverse()}A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},A.ceil=function(){return T(new this.constructor(this),this.e+1,2)},A.comparedTo=A.cmp=function(e){var n,t,r,i,o=this,s=o.d,u=(e=new o.constructor(e)).d,c=o.s,a=e.s;if(!s||!u)return c&&a?c!==a?c:s===u?0:!s^c<0?1:-1:NaN;if(!s[0]||!u[0])return s[0]?c:u[0]?-a:0;if(c!==a)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(n=0,t=(r=s.length)<(i=u.length)?r:i;n<t;++n)if(s[n]!==u[n])return s[n]>u[n]^c<0?1:-1;return r===i?0:r>i^c<0?1:-1},A.cosine=A.cos=function(){var e,n,t=this,r=t.constructor;return t.d?t.d[0]?(e=r.precision,n=r.rounding,r.precision=e+Math.max(t.e,t.sd())+7,r.rounding=1,t=function(e,n){var t,r,i=n.d.length;i<32?r=(1/G(4,t=Math.ceil(i/3))).toString():(t=16,r="2.3283064365386962890625e-10"),e.precision+=t,n=J(e,1,n.times(r),new e(1));for(var o=t;o--;){var s=n.times(n);n=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,n}(r,K(r,t)),r.precision=e,r.rounding=n,T(2==u||3==u?t.neg():t,e,n,!0)):new r(1):new r(NaN)},A.cubeRoot=A.cbrt=function(){var e,n,t,r,i,o,s,u,c,a,f=this,d=f.constructor;if(!f.isFinite()||f.isZero())return new d(f);for(p=!1,(o=f.s*M(f.s*f,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(t=C(f.d),(o=((e=f.e)-t.length+1)%3)&&(t+=1==o||-2==o?"0":"00"),o=M(t,1/3),e=y((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)).s=f.s),s=(e=d.precision)+3;;)if(a=(c=(u=r).times(u).times(u)).plus(f),r=S(a.plus(f).times(u),a.plus(c),s+2,1),C(u.d).slice(0,s)===(t=C(r.d)).slice(0,s)){if("9999"!=(t=t.slice(s-3,s+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(T(r,e+1,1),n=!r.times(r).times(r).eq(f));break}if(!i&&(T(u,e+1,0),u.times(u).times(u).eq(f))){r=u;break}s+=4,i=1}return p=!0,T(r,e,d.rounding,n)},A.decimalPlaces=A.dp=function(){var e,n=this.d,t=NaN;if(n){if(t=7*((e=n.length-1)-y(this.e/7)),e=n[e])for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t},A.dividedBy=A.div=function(e){return S(this,new this.constructor(e))},A.dividedToIntegerBy=A.divToInt=function(e){var n=this.constructor;return T(S(this,new n(e),0,1,1),n.precision,n.rounding)},A.equals=A.eq=function(e){return 0===this.cmp(e)},A.floor=function(){return T(new this.constructor(this),this.e+1,3)},A.greaterThan=A.gt=function(e){return this.cmp(e)>0},A.greaterThanOrEqualTo=A.gte=function(e){var n=this.cmp(e);return 1==n||0===n},A.hyperbolicCosine=A.cosh=function(){var e,n,t,r,i,o=this,s=o.constructor,u=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return u;t=s.precision,r=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?n=(1/G(4,e=Math.ceil(i/3))).toString():(e=16,n="2.3283064365386962890625e-10"),o=J(s,1,o.times(n),new s(1),!0);for(var c,a=e,f=new s(8);a--;)c=o.times(o),o=u.minus(c.times(f.minus(c.times(f))));return T(o,s.precision=t,s.rounding=r,!0)},A.hyperbolicSine=A.sinh=function(){var e,n,t,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(n=o.precision,t=o.rounding,o.precision=n+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=J(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=J(o,2,i=i.times(1/G(5,e)),i,!0);for(var s,u=new o(5),c=new o(16),a=new o(20);e--;)s=i.times(i),i=i.times(u.plus(s.times(c.times(s).plus(a))))}return o.precision=n,o.rounding=t,T(i,n,t,!0)},A.hyperbolicTangent=A.tanh=function(){var e,n,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+7,r.rounding=1,S(t.sinh(),t.cosh(),r.precision=e,r.rounding=n)):new r(t.s)},A.inverseCosine=A.acos=function(){var e,n=this,t=n.constructor,r=n.abs().cmp(1),i=t.precision,o=t.rounding;return-1!==r?0===r?n.isNeg()?P(t,i,o):new t(0):new t(NaN):n.isZero()?P(t,i+4,o).times(.5):(t.precision=i+6,t.rounding=1,n=n.asin(),e=P(t,i+4,o).times(.5),t.precision=i,t.rounding=o,e.minus(n))},A.inverseHyperbolicCosine=A.acosh=function(){var e,n,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(e=r.precision,n=r.rounding,r.precision=e+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,p=!1,t=t.times(t).minus(1).sqrt().plus(t),p=!0,r.precision=e,r.rounding=n,t.ln()):new r(t)},A.inverseHyperbolicSine=A.asinh=function(){var e,n,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,p=!1,t=t.times(t).plus(1).sqrt().plus(t),p=!0,r.precision=e,r.rounding=n,t.ln())},A.inverseHyperbolicTangent=A.atanh=function(){var e,n,t,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,n=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?T(new o(i),e,n,!0):(o.precision=t=r-i.e,i=S(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=n,i.times(.5))):new o(NaN)},A.inverseSine=A.asin=function(){var e,n,t,r,i=this,o=i.constructor;return i.isZero()?new o(i):(n=i.abs().cmp(1),t=o.precision,r=o.rounding,-1!==n?0===n?((e=P(o,t+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=r,i.times(2)))},A.inverseTangent=A.atan=function(){var e,n,t,r,i,o,s,u,c,a=this,f=a.constructor,d=f.precision,l=f.rounding;if(a.isFinite()){if(a.isZero())return new f(a);if(a.abs().eq(1)&&d+4<=R)return(s=P(f,d+4,l).times(.25)).s=a.s,s}else{if(!a.s)return new f(NaN);if(d+4<=R)return(s=P(f,d+4,l).times(.5)).s=a.s,s}for(f.precision=u=d+10,f.rounding=1,e=t=Math.min(28,u/7+2|0);e;--e)a=a.div(a.times(a).plus(1).sqrt().plus(1));for(p=!1,n=Math.ceil(u/7),r=1,c=a.times(a),s=new f(a),i=a;-1!==e;)if(i=i.times(c),o=s.minus(i.div(r+=2)),i=i.times(c),void 0!==(s=o.plus(i.div(r+=2))).d[n])for(e=n;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<<t-1)),p=!0,T(s,f.precision=d,f.rounding=l,!0)},A.isFinite=function(){return!!this.d},A.isInteger=A.isInt=function(){return!!this.d&&y(this.e/7)>this.d.length-2},A.isNaN=function(){return!this.s},A.isNegative=A.isNeg=function(){return this.s<0},A.isPositive=A.isPos=function(){return this.s>0},A.isZero=function(){return!!this.d&&0===this.d[0]},A.lessThan=A.lt=function(e){return this.cmp(e)<0},A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1},A.logarithm=A.log=function(e){var n,t,r,i,o,s,u,c,a=this,f=a.constructor,d=f.precision,l=f.rounding;if(null==e)e=new f(10),n=!0;else{if(t=(e=new f(e)).d,e.s<0||!t||!t[0]||e.eq(1))return new f(NaN);n=e.eq(10)}if(t=a.d,a.s<0||!t||!t[0]||a.eq(1))return new f(t&&!t[0]?-1/0:1!=a.s?NaN:t?0:1/0);if(n)if(t.length>1)o=!0;else{for(i=t[0];i%10==0;)i/=10;o=1!==i}if(p=!1,s=V(a,u=d+5),r=n?q(f,u+10):V(e,u),D((c=S(s,r,u,1)).d,i=d,l))do{if(s=V(a,u+=10),r=n?q(f,u+10):V(e,u),c=S(s,r,u,1),!o){+C(c.d).slice(i+1,i+15)+1==1e14&&(c=T(c,d+1,0));break}}while(D(c.d,i+=10,l));return p=!0,T(c,d,l)},A.minus=A.sub=function(e){var n,t,r,i,o,s,u,c,a,f,d,l,h=this,g=h.constructor;if(e=new g(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new g(e.d||h.s!==e.s?h:NaN):e=new g(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(a=h.d,l=e.d,u=g.precision,c=g.rounding,!a[0]||!l[0]){if(l[0])e.s=-e.s;else{if(!a[0])return new g(3===c?-0:0);e=new g(h)}return p?T(e,u,c):e}if(t=y(e.e/7),f=y(h.e/7),a=a.slice(),o=f-t){for((d=o<0)?(n=a,o=-o,s=l.length):(n=l,t=f,s=a.length),o>(r=Math.max(Math.ceil(u/7),s)+2)&&(o=r,n.length=1),n.reverse(),r=o;r--;)n.push(0);n.reverse()}else{for((d=(r=a.length)<(s=l.length))&&(s=r),r=0;r<s;r++)if(a[r]!=l[r]){d=a[r]<l[r];break}o=0}for(d&&(n=a,a=l,l=n,e.s=-e.s),s=a.length,r=l.length-s;r>0;--r)a[s++]=0;for(r=l.length;r>o;){if(a[--r]<l[r]){for(i=r;i&&0===a[--i];)a[i]=_-1;--a[i],a[r]+=_}a[r]-=l[r]}for(;0===a[--s];)a.pop();for(;0===a[0];a.shift())--t;return a[0]?(e.d=a,e.e=I(a,t),p?T(e,u,c):e):new g(3===c?-0:0)},A.modulo=A.mod=function(e){var n,t=this,r=t.constructor;return e=new r(e),!t.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||t.d&&!t.d[0]?T(new r(t),r.precision,r.rounding):(p=!1,9==r.modulo?(n=S(t,e.abs(),0,3,1)).s*=e.s:n=S(t,e,0,r.modulo,1),n=n.times(e),p=!0,t.minus(n))},A.naturalExponential=A.exp=function(){return B(this)},A.naturalLogarithm=A.ln=function(){return V(this)},A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s,T(e)},A.plus=A.add=function(e){var n,t,r,i,o,s,u,c,a,f,d=this,l=d.constructor;if(e=new l(e),!d.d||!e.d)return d.s&&e.s?d.d||(e=new l(e.d||d.s===e.s?d:NaN)):e=new l(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(a=d.d,f=e.d,u=l.precision,c=l.rounding,!a[0]||!f[0])return f[0]||(e=new l(d)),p?T(e,u,c):e;if(o=y(d.e/7),r=y(e.e/7),a=a.slice(),i=o-r){for(i<0?(t=a,i=-i,s=f.length):(t=f,r=o,s=a.length),i>(s=(o=Math.ceil(u/7))>s?o+1:s+1)&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for((s=a.length)-(i=f.length)<0&&(i=s,t=f,f=a,a=t),n=0;i;)n=(a[--i]=a[i]+f[i]+n)/_|0,a[i]%=_;for(n&&(a.unshift(n),++r),s=a.length;0==a[--s];)a.pop();return e.d=a,e.e=I(a,r),p?T(e,u,c):e},A.precision=A.sd=function(e){var n,t=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(m+e);return t.d?(n=H(t.d),e&&t.e+1>n&&(n=t.e+1)):n=NaN,n},A.round=function(){var e=this,n=e.constructor;return T(new n(e),e.e+1,n.rounding)},A.sine=A.sin=function(){var e,n,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+Math.max(t.e,t.sd())+7,r.rounding=1,t=function(e,n){var t,r=n.d.length;if(r<3)return J(e,2,n,n);t=(t=1.4*Math.sqrt(r))>16?16:0|t,n=J(e,2,n=n.times(1/G(5,t)),n);for(var i,o=new e(5),s=new e(16),u=new e(20);t--;)i=n.times(n),n=n.times(o.plus(i.times(s.times(i).minus(u))));return n}(r,K(r,t)),r.precision=e,r.rounding=n,T(u>2?t.neg():t,e,n,!0)):new r(NaN)},A.squareRoot=A.sqrt=function(){var e,n,t,r,i,o,s=this,u=s.d,c=s.e,a=s.s,f=s.constructor;if(1!==a||!u||!u[0])return new f(!a||a<0&&(!u||u[0])?NaN:u?s:1/0);for(p=!1,0==(a=Math.sqrt(+s))||a==1/0?(((n=C(u)).length+c)%2==0&&(n+="0"),a=Math.sqrt(n),c=y((c+1)/2)-(c<0||c%2),r=new f(n=a==1/0?"5e"+c:(n=a.toExponential()).slice(0,n.indexOf("e")+1)+c)):r=new f(a.toString()),t=(c=f.precision)+3;;)if(r=(o=r).plus(S(s,o,t+2,1)).times(.5),C(o.d).slice(0,t)===(n=C(r.d)).slice(0,t)){if("9999"!=(n=n.slice(t-3,t+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(T(r,c+1,1),e=!r.times(r).eq(s));break}if(!i&&(T(o,c+1,0),o.times(o).eq(s))){r=o;break}t+=4,i=1}return p=!0,T(r,c,f.rounding,e)},A.tangent=A.tan=function(){var e,n,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,n=r.rounding,r.precision=e+10,r.rounding=1,(t=t.sin()).s=1,t=S(t,new r(1).minus(t.times(t)).sqrt(),e+10,0),r.precision=e,r.rounding=n,T(2==u||4==u?t.neg():t,e,n,!0)):new r(NaN)},A.times=A.mul=function(e){var n,t,r,i,o,s,u,c,a,f=this,d=f.constructor,l=f.d,h=(e=new d(e)).d;if(e.s*=f.s,!(l&&l[0]&&h&&h[0]))return new d(!e.s||l&&!l[0]&&!h||h&&!h[0]&&!l?NaN:l&&h?0*e.s:e.s/0);for(t=y(f.e/7)+y(e.e/7),(c=l.length)<(a=h.length)&&(o=l,l=h,h=o,s=c,c=a,a=s),o=[],r=s=c+a;r--;)o.push(0);for(r=a;--r>=0;){for(n=0,i=c+r;i>r;)u=o[i]+h[r]*l[i-r-1]+n,o[i--]=u%_|0,n=u/_|0;o[i]=(o[i]+n)%_|0}for(;!o[--s];)o.pop();return n?++t:o.shift(),e.d=o,e.e=I(o,t),p?T(e,d.precision,d.rounding):e},A.toBinary=function(e,n){return Q(this,2,e,n)},A.toDecimalPlaces=A.toDP=function(e,n){var t=this,r=t.constructor;return t=new r(t),void 0===e?t:(j(e,0,a),void 0===n?n=r.rounding:j(n,0,8),T(t,e+t.e+1,n))},A.toExponential=function(e,n){var t,r=this,i=r.constructor;return void 0===e?t=k(r,!0):(j(e,0,a),void 0===n?n=i.rounding:j(n,0,8),t=k(r=T(new i(r),e+1,n),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+t:t},A.toFixed=function(e,n){var t,r,i=this,o=i.constructor;return void 0===e?t=k(i):(j(e,0,a),void 0===n?n=o.rounding:j(n,0,8),t=k(r=T(new o(i),e+i.e+1,n),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t},A.toFraction=function(e){var n,t,r,i,o,s,u,c,a,f,d,l,h=this,g=h.d,v=h.constructor;if(!g)return new v(h);if(a=t=new v(1),r=c=new v(0),s=(o=(n=new v(r)).e=H(g)-h.e-1)%7,n.d[0]=M(10,s<0?7+s:s),null==e)e=o>0?n:a;else{if(!(u=new v(e)).isInt()||u.lt(a))throw Error(m+u);e=u.gt(n)?o>0?n:a:u}for(p=!1,u=new v(C(g)),f=v.precision,v.precision=o=7*g.length*2;d=S(u,n,0,1,1),1!=(i=t.plus(d.times(r))).cmp(e);)t=r,r=i,i=a,a=c.plus(d.times(i)),c=i,i=n,n=u.minus(d.times(i)),u=i;return i=S(e.minus(t),r,0,1,1),c=c.plus(i.times(a)),t=t.plus(i.times(r)),c.s=a.s=h.s,l=S(a,r,o,1).minus(h).abs().cmp(S(c,t,o,1).minus(h).abs())<1?[a,r]:[c,t],v.precision=f,p=!0,l},A.toHexadecimal=A.toHex=function(e,n){return Q(this,16,e,n)},A.toNearest=function(e,n){var t=this,r=t.constructor;if(t=new r(t),null==e){if(!t.d)return t;e=new r(1),n=r.rounding}else{if(e=new r(e),void 0===n?n=r.rounding:j(n,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(p=!1,t=S(t,e,0,n,1).times(e),p=!0,T(t)):(e.s=t.s,t=e),t},A.toNumber=function(){return+this},A.toOctal=function(e,n){return Q(this,8,e,n)},A.toPower=A.pow=function(e){var n,t,r,i,o,s,u=this,c=u.constructor,a=+(e=new c(e));if(!(u.d&&e.d&&u.d[0]&&e.d[0]))return new c(M(+u,a));if((u=new c(u)).eq(1))return u;if(r=c.precision,o=c.rounding,e.eq(1))return T(u,r,o);if((n=y(e.e/7))>=e.d.length-1&&(t=a<0?-a:a)<=9007199254740991)return i=U(c,u,t,r),e.s<0?new c(1).div(i):T(i,r,o);if((s=u.s)<0){if(n<e.d.length-1)return new c(NaN);if(0==(1&e.d[n])&&(s=1),0==u.e&&1==u.d[0]&&1==u.d.length)return u.s=s,u}return(n=0!=(t=M(+u,a))&&isFinite(t)?new c(t+"").e:y(a*(Math.log("0."+C(u.d))/Math.LN10+u.e+1)))>c.maxE+1||n<c.minE-1?new c(n>0?s/0:0):(p=!1,c.rounding=u.s=1,t=Math.min(12,(n+"").length),(i=B(e.times(V(u,r+t)),r)).d&&D((i=T(i,r+5,1)).d,r,o)&&(n=r+10,+C((i=T(B(e.times(V(u,n+t)),n),n+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=T(i,r+1,0))),i.s=s,p=!0,c.rounding=o,T(i,r,o))},A.toPrecision=function(e,n){var t,r=this,i=r.constructor;return void 0===e?t=k(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(j(e,1,a),void 0===n?n=i.rounding:j(n,0,8),t=k(r=T(new i(r),e,n),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+t:t},A.toSignificantDigits=A.toSD=function(e,n){var t=this.constructor;return void 0===e?(e=t.precision,n=t.rounding):(j(e,1,a),void 0===n?n=t.rounding:j(n,0,8)),T(new t(this),e,n)},A.toString=function(){var e=this,n=e.constructor,t=k(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t},A.truncated=A.trunc=function(){return T(new this.constructor(this),this.e+1,1)},A.valueOf=A.toJSON=function(){var e=this,n=e.constructor,t=k(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+t:t};var S=function(){function e(e,n,t){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*n+i,e[o]=r%t|0,i=r/t|0;return i&&e.unshift(i),e}function n(e,n,t,r){var i,o;if(t!=r)o=t>r?1:-1;else for(i=o=0;i<t;i++)if(e[i]!=n[i]){o=e[i]>n[i]?1:-1;break}return o}function t(e,n,t,r){for(var i=0;t--;)e[t]-=i,i=e[t]<n[t]?1:0,e[t]=i*r+e[t]-n[t];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,u,c,a){var f,d,l,h,p,g,m,v,w,M,N,b,x,E,O,R,A,C,j,D,F=r.constructor,S=r.s==i.s?1:-1,k=r.d,I=i.d;if(!(k&&k[0]&&I&&I[0]))return new F(r.s&&i.s&&(k?!I||k[0]!=I[0]:I)?k&&0==k[0]||!I?0*S:S/0:NaN);for(a?(p=1,d=r.e-i.e):(a=_,p=7,d=y(r.e/p)-y(i.e/p)),j=I.length,A=k.length,M=(w=new F(S)).d=[],l=0;I[l]==(k[l]||0);l++);if(I[l]>(k[l]||0)&&d--,null==o?(E=o=F.precision,u=F.rounding):E=c?o+(r.e-i.e)+1:o,E<0)M.push(1),g=!0;else{if(E=E/p+2|0,l=0,1==j){for(h=0,I=I[0],E++;(l<A||h)&&E--;l++)O=h*a+(k[l]||0),M[l]=O/I|0,h=O%I|0;g=h||l<A}else{for((h=a/(I[0]+1)|0)>1&&(I=e(I,h,a),k=e(k,h,a),j=I.length,A=k.length),R=j,b=(N=k.slice(0,j)).length;b<j;)N[b++]=0;(D=I.slice()).unshift(0),C=I[0],I[1]>=a/2&&++C;do{h=0,(f=n(I,N,j,b))<0?(x=N[0],j!=b&&(x=x*a+(N[1]||0)),(h=x/C|0)>1?(h>=a&&(h=a-1),1==(f=n(m=e(I,h,a),N,v=m.length,b=N.length))&&(h--,t(m,j<v?D:I,v,a))):(0==h&&(f=h=1),m=I.slice()),(v=m.length)<b&&m.unshift(0),t(N,m,b,a),-1==f&&(f=n(I,N,j,b=N.length))<1&&(h++,t(N,j<b?D:I,b,a)),b=N.length):0===f&&(h++,N=[0]),M[l++]=h,f&&N[0]?N[b++]=k[R]||0:(N=[k[R]],b=1)}while((R++<A||void 0!==N[0])&&E--);g=void 0!==N[0]}M[0]||M.shift()}if(1==p)w.e=d,s=g;else{for(l=1,h=M[0];h>=10;h/=10)l++;w.e=l+d*p-1,T(w,c?o+w.e+1:o,u,g)}return w}}();function T(e,n,t,r){var i,o,s,u,c,a,f,d,l,h=e.constructor;e:if(null!=n){if(!(d=e.d))return e;for(i=1,u=d[0];u>=10;u/=10)i++;if((o=n-i)<0)o+=7,s=n,c=(f=d[l=0])/M(10,i-s-1)%10|0;else if((l=Math.ceil((o+1)/7))>=(u=d.length)){if(!r)break e;for(;u++<=l;)d.push(0);f=c=0,i=1,s=(o%=7)-7+1}else{for(f=u=d[l],i=1;u>=10;u/=10)i++;c=(s=(o%=7)-7+i)<0?0:f/M(10,i-s-1)%10|0}if(r=r||n<0||void 0!==d[l+1]||(s<0?f:f%M(10,i-s-1)),a=t<4?(c||r)&&(0==t||t==(e.s<0?3:2)):c>5||5==c&&(4==t||r||6==t&&(o>0?s>0?f/M(10,i-s):0:d[l-1])%10&1||t==(e.s<0?8:7)),n<1||!d[0])return d.length=0,a?(n-=e.e+1,d[0]=M(10,(7-n%7)%7),e.e=-n||0):d[0]=e.e=0,e;if(0==o?(d.length=l,u=1,l--):(d.length=l+1,u=M(10,7-o),d[l]=s>0?(f/M(10,i-s)%M(10,s)|0)*u:0),a)for(;;){if(0==l){for(o=1,s=d[0];s>=10;s/=10)o++;for(s=d[0]+=u,u=1;s>=10;s/=10)u++;o!=u&&(e.e++,d[0]==_&&(d[0]=1));break}if(d[l]+=u,d[l]!=_)break;d[l--]=0,u=1}for(o=d.length;0===d[--o];)d.pop()}return p&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function k(e,n,t){if(!e.isFinite())return z(e);var r,i=e.e,o=C(e.d),s=o.length;return n?(t&&(r=t-s)>0?o=o.charAt(0)+"."+o.slice(1)+Z(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Z(-i-1)+o,t&&(r=t-s)>0&&(o+=Z(r))):i>=s?(o+=Z(i+1-s),t&&(r=t-i-1)>0&&(o=o+"."+Z(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),t&&(r=t-s)>0&&(i+1===s&&(o+="."),o+=Z(r))),o}function I(e,n){var t=e[0];for(n*=7;t>=10;t/=10)n++;return n}function q(e,n,t){if(n>O)throw p=!0,t&&(e.precision=t),Error(v);return T(new e(d),n,1,!0)}function P(e,n,t){if(n>R)throw Error(v);return T(new e(l),n,t,!0)}function H(e){var n=e.length-1,t=7*n+1;if(n=e[n]){for(;n%10==0;n/=10)t--;for(n=e[0];n>=10;n/=10)t++}return t}function Z(e){for(var n="";e--;)n+="0";return n}function U(e,n,t,r){var i,o=new e(1),s=Math.ceil(r/7+4);for(p=!1;;){if(t%2&&X((o=o.times(n)).d,s)&&(i=!0),0===(t=y(t/2))){t=o.d.length-1,i&&0===o.d[t]&&++o.d[t];break}X((n=n.times(n)).d,s)}return p=!0,o}function Y(e){return 1&e.d[e.d.length-1]}function L(e,n,t){for(var r,i=new e(n[0]),o=0;++o<n.length;){if(!(r=new e(n[o])).s){i=r;break}i[t](r)&&(i=r)}return i}function B(e,n){var t,r,i,o,s,u,c,a=0,f=0,d=0,l=e.constructor,h=l.rounding,g=l.precision;if(!e.d||!e.d[0]||e.e>17)return new l(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==n?(p=!1,c=g):c=n,u=new l(.03125);e.e>-2;)e=e.times(u),d+=5;for(c+=r=Math.log(M(2,d))/Math.LN10*2+5|0,t=o=s=new l(1),l.precision=c;;){if(o=T(o.times(e),c,1),t=t.times(++f),C((u=s.plus(S(o,t,c,1))).d).slice(0,c)===C(s.d).slice(0,c)){for(i=d;i--;)s=T(s.times(s),c,1);if(null!=n)return l.precision=g,s;if(!(a<3&&D(s.d,c-r,h,a)))return T(s,l.precision=g,h,p=!0);l.precision=c+=10,t=o=u=new l(1),f=0,a++}s=u}}function V(e,n){var t,r,i,o,s,u,c,a,f,d,l,h=1,g=e,m=g.d,v=g.constructor,w=v.rounding,y=v.precision;if(g.s<0||!m||!m[0]||!g.e&&1==m[0]&&1==m.length)return new v(m&&!m[0]?-1/0:1!=g.s?NaN:m?0:g);if(null==n?(p=!1,f=y):f=n,v.precision=f+=10,r=(t=C(m)).charAt(0),!(Math.abs(o=g.e)<15e14))return a=q(v,f+2,y).times(o+""),g=V(new v(r+"."+t.slice(1)),f-10).plus(a),v.precision=y,null==n?T(g,y,w,p=!0):g;for(;r<7&&1!=r||1==r&&t.charAt(1)>3;)r=(t=C((g=g.times(e)).d)).charAt(0),h++;for(o=g.e,r>1?(g=new v("0."+t),o++):g=new v(r+"."+t.slice(1)),d=g,c=s=g=S(g.minus(1),g.plus(1),f,1),l=T(g.times(g),f,1),i=3;;){if(s=T(s.times(l),f,1),C((a=c.plus(S(s,new v(i),f,1))).d).slice(0,f)===C(c.d).slice(0,f)){if(c=c.times(2),0!==o&&(c=c.plus(q(v,f+2,y).times(o+""))),c=S(c,new v(h),f,1),null!=n)return v.precision=y,c;if(!D(c.d,f-10,w,u))return T(c,v.precision=y,w,p=!0);v.precision=f+=10,a=s=g=S(d.minus(1),d.plus(1),f,1),l=T(g.times(g),f,1),i=u=1}c=a,i+=2}}function z(e){return String(e.s*e.s/0)}function $(e,n){var t,r,i;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(t<0&&(t=r),t+=+n.slice(r+1),n=n.substring(0,r)):t<0&&(t=n.length),r=0;48===n.charCodeAt(r);r++);for(i=n.length;48===n.charCodeAt(i-1);--i);if(n=n.slice(r,i)){if(i-=r,e.e=t=t-r-1,e.d=[],r=(t+1)%7,t<0&&(r+=7),r<i){for(r&&e.d.push(+n.slice(0,r)),i-=7;r<i;)e.d.push(+n.slice(r,r+=7));r=7-(n=n.slice(r)).length}else r-=i;for(;r--;)n+="0";e.d.push(+n),p&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function W(e,n){var t,r,i,s,u,c,a,f,d;if("Infinity"===n||"NaN"===n)return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(b.test(n))t=16,n=n.toLowerCase();else if(N.test(n))t=2;else{if(!x.test(n))throw Error(m+n);t=8}for((s=n.search(/p/i))>0?(a=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),u=(s=n.indexOf("."))>=0,r=e.constructor,u&&(s=(c=(n=n.replace(".","")).length)-s,i=U(r,new r(t),s,2*s)),s=d=(f=F(n,t,_)).length-1;0===f[s];--s)f.pop();return s<0?new r(0*e.s):(e.e=I(f,d),e.d=f,p=!1,u&&(e=S(e,i,4*c)),a&&(e=e.times(Math.abs(a)<54?M(2,a):o.pow(2,a))),p=!0,e)}function J(e,n,t,r,i){var o,s,u,c,a=e.precision,f=Math.ceil(a/7);for(p=!1,c=t.times(t),u=new e(r);;){if(s=S(u.times(c),new e(n++*n++),a,1),u=i?r.plus(s):r.minus(s),r=S(s.times(c),new e(n++*n++),a,1),void 0!==(s=u.plus(r)).d[f]){for(o=f;s.d[o]===u.d[o]&&o--;);if(-1==o)break}o=u,u=r,r=s,s=o}return p=!0,s.d.length=f+1,s}function G(e,n){for(var t=e;--n;)t*=e;return t}function K(e,n){var t,r=n.s<0,i=P(e,e.precision,1),o=i.times(.5);if((n=n.abs()).lte(o))return u=r?4:1,n;if((t=n.divToInt(i)).isZero())u=r?3:2;else{if((n=n.minus(t.times(i))).lte(o))return u=Y(t)?r?2:3:r?4:1,n;u=Y(t)?r?1:4:r?3:2}return n.minus(i).abs()}function Q(e,n,t,r){var i,o,u,c,d,l,h,p,g,m=e.constructor,v=void 0!==t;if(v?(j(t,1,a),void 0===r?r=m.rounding:j(r,0,8)):(t=m.precision,r=m.rounding),e.isFinite()){for(v?(i=2,16==n?t=4*t-3:8==n&&(t=3*t-2)):i=n,(u=(h=k(e)).indexOf("."))>=0&&(h=h.replace(".",""),(g=new m(1)).e=h.length-u,g.d=F(k(g),10,i),g.e=g.d.length),o=d=(p=F(h,10,i)).length;0==p[--d];)p.pop();if(p[0]){if(u<0?o--:((e=new m(e)).d=p,e.e=o,p=(e=S(e,g,t,r,0,i)).d,o=e.e,l=s),u=p[t],c=i/2,l=l||void 0!==p[t+1],l=r<4?(void 0!==u||l)&&(0===r||r===(e.s<0?3:2)):u>c||u===c&&(4===r||l||6===r&&1&p[t-1]||r===(e.s<0?8:7)),p.length=t,l)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(d=p.length;!p[d-1];--d);for(u=0,h="";u<d;u++)h+=f.charAt(p[u]);if(v){if(d>1)if(16==n||8==n){for(u=16==n?4:3,--d;d%u;d++)h+="0";for(d=(p=F(h,i,n)).length;!p[d-1];--d);for(u=1,h="1.";u<d;u++)h+=f.charAt(p[u])}else h=h.charAt(0)+"."+h.slice(1);h=h+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)h="0"+h;h="0."+h}else if(++o>d)for(o-=d;o--;)h+="0";else o<d&&(h=h.slice(0,o)+"."+h.slice(o))}else h=v?"0p+0":"0";h=(16==n?"0x":2==n?"0b":8==n?"0o":"")+h}else h=z(e);return e.s<0?"-"+h:h}function X(e,n){if(e.length>n)return e.length=n,!0}function ee(e){return new this(e).abs()}function ne(e){return new this(e).acos()}function te(e){return new this(e).acosh()}function re(e,n){return new this(e).plus(n)}function ie(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function se(e){return new this(e).atan()}function ue(e){return new this(e).atanh()}function ce(e,n){e=new this(e),n=new this(n);var t,r=this.precision,i=this.rounding,o=r+4;return e.s&&n.s?e.d||n.d?!n.d||e.isZero()?(t=n.s<0?P(this,r,i):new this(0)).s=e.s:!e.d||n.isZero()?(t=P(this,o,1).times(.5)).s=e.s:n.s<0?(this.precision=o,this.rounding=1,t=this.atan(S(e,n,o,1)),n=P(this,o,1),this.precision=r,this.rounding=i,t=e.s<0?t.minus(n):t.plus(n)):t=this.atan(S(e,n,o,1)):(t=P(this,o,1).times(n.s>0?.25:.75)).s=e.s:t=new this(NaN),t}function ae(e){return new this(e).cbrt()}function fe(e){return T(e=new this(e),e.e+1,2)}function de(e){if(!e||"object"!=typeof e)throw Error(g+"Object expected");var n,t,r,i=!0===e.defaults,o=["precision",1,a,"rounding",0,8,"toExpNeg",-c,0,"toExpPos",0,c,"maxE",0,c,"minE",-c,0,"modulo",0,9];for(n=0;n<o.length;n+=3)if(t=o[n],i&&(this[t]=h[t]),void 0!==(r=e[t])){if(!(y(r)===r&&r>=o[n+1]&&r<=o[n+2]))throw Error(m+t+": "+r);this[t]=r}if(t="crypto",i&&(this[t]=h[t]),void 0!==(r=e[t])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(m+t+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(w);this[t]=!0}else this[t]=!1}return this}function le(e){return new this(e).cos()}function he(e){return new this(e).cosh()}function pe(e,n){return new this(e).div(n)}function ge(e){return new this(e).exp()}function me(e){return T(e=new this(e),e.e+1,3)}function ve(){var e,n,t=new this(0);for(p=!1,e=0;e<arguments.length;)if((n=new this(arguments[e++])).d)t.d&&(t=t.plus(n.times(n)));else{if(n.s)return p=!0,new this(1/0);t=n}return p=!0,t.sqrt()}function we(e){return e instanceof o||e&&"[object Decimal]"===e.name||!1}function ye(e){return new this(e).ln()}function Me(e,n){return new this(e).log(n)}function Ne(e){return new this(e).log(2)}function be(e){return new this(e).log(10)}function xe(){return L(this,arguments,"lt")}function Ee(){return L(this,arguments,"gt")}function _e(e,n){return new this(e).mod(n)}function Oe(e,n){return new this(e).mul(n)}function Re(e,n){return new this(e).pow(n)}function Ae(e){var n,t,r,i,o=0,s=new this(1),u=[];if(void 0===e?e=this.precision:j(e,1,a),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(n=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=n[o])>=429e7?n[o]=crypto.getRandomValues(new Uint32Array(1))[0]:u[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(w);for(n=crypto.randomBytes(r*=4);o<r;)(i=n[o]+(n[o+1]<<8)+(n[o+2]<<16)+((127&n[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(n,o):(u.push(i%1e7),o+=4);o=r/4}else for(;o<r;)u[o++]=1e7*Math.random()|0;for(e%=7,(r=u[--o])&&e&&(i=M(10,7-e),u[o]=(r/i|0)*i);0===u[o];o--)u.pop();if(o<0)t=0,u=[0];else{for(t=-1;0===u[0];t-=7)u.shift();for(r=1,i=u[0];i>=10;i/=10)r++;r<7&&(t-=7-r)}return s.e=t,s.d=u,s}function Ce(e){return T(e=new this(e),e.e+1,this.rounding)}function je(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function De(e){return new this(e).sin()}function Fe(e){return new this(e).sinh()}function Se(e){return new this(e).sqrt()}function Te(e,n){return new this(e).sub(n)}function ke(e){return new this(e).tan()}function Ie(e){return new this(e).tanh()}function qe(e){return T(e=new this(e),e.e+1,1)}(o=function e(n){var t,r,i;function o(e){var n,t,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,e instanceof o)return i.s=e.s,void(p?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"==(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(n=0,t=e;t>=10;t/=10)n++;return void(p?n>o.maxE?(i.e=NaN,i.d=null):n<o.minE?(i.e=0,i.d=[0]):(i.e=n,i.d=[e]):(i.e=n,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):$(i,e.toString())}if("string"!==r)throw Error(m+e);return 45===(t=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===t&&(e=e.slice(1)),i.s=1),E.test(e)?$(i,e):W(i,e)}if(o.prototype=A,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=de,o.clone=e,o.isDecimal=we,o.abs=ee,o.acos=ne,o.acosh=te,o.add=re,o.asin=ie,o.asinh=oe,o.atan=se,o.atanh=ue,o.atan2=ce,o.cbrt=ae,o.ceil=fe,o.cos=le,o.cosh=he,o.div=pe,o.exp=ge,o.floor=me,o.hypot=ve,o.ln=ye,o.log=Me,o.log10=be,o.log2=Ne,o.max=xe,o.min=Ee,o.mod=_e,o.mul=Oe,o.pow=Re,o.random=Ae,o.round=Ce,o.sign=je,o.sin=De,o.sinh=Fe,o.sqrt=Se,o.sub=Te,o.tan=ke,o.tanh=Ie,o.trunc=qe,void 0===n&&(n={}),n&&!0!==n.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)n.hasOwnProperty(r=i[t++])||(n[r]=this[r]);return o.config(n),o}(h)).default=o.Decimal=o,d=new o(d),l=new o(l),void 0===(r=function(){return o}.call(n,t,n,e))||(e.exports=r)}()},15554:e=>{"use strict";var n="%[a-f0-9]{2}",t=new RegExp(n,"gi"),r=new RegExp("("+n+")+","gi");function i(e,n){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;n=n||1;var t=e.slice(0,n),r=e.slice(n);return Array.prototype.concat.call([],i(t),i(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var n=e.match(t),r=1;r<n.length;r++)n=(e=i(n,r).join("")).match(t);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(n){return function(e){for(var n={"%FE%FF":"��","%FF%FE":"��"},t=r.exec(e);t;){try{n[t[0]]=decodeURIComponent(t[0])}catch(e){var i=o(t[0]);i!==t[0]&&(n[t[0]]=i)}t=r.exec(e)}n["%C2"]="�";for(var s=Object.keys(n),u=0;u<s.length;u++){var c=s[u];e=e.replace(new RegExp(c,"g"),n[c])}return e}(e)}}},37320:e=>{"use strict";var n=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,u,c=i(e),a=1;a<arguments.length;a++){for(var f in s=Object(arguments[a]))t.call(s,f)&&(c[f]=s[f]);if(n){u=n(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(c[u[d]]=s[u[d]])}}return c}},34126:(e,n,t)=>{"use strict";var r=t(57785),i=t(37320),o=t(15554);function s(e,n){return n.encode?n.strict?r(e):encodeURIComponent(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort((function(e,n){return Number(e)-Number(n)})).map((function(n){return e[n]})):e}n.extract=function(e){return e.split("?")[1]||""},n.parse=function(e,n){var t=function(e){var n;switch(e.arrayFormat){case"index":return function(e,t,r){n=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),n?(void 0===r[e]&&(r[e]={}),r[e][n[1]]=t):r[e]=t};case"bracket":return function(e,t,r){n=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),n?void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=[t]:r[e]=t};default:return function(e,n,t){void 0!==t[e]?t[e]=[].concat(t[e],n):t[e]=n}}}(n=i({arrayFormat:"none"},n)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),i=n.shift(),s=n.length>0?n.join("="):void 0;s=void 0===s?null:o(s),t(o(i),s,r)})),Object.keys(r).sort().reduce((function(e,n){var t=r[n];return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)?e[n]=u(t):e[n]=t,e}),Object.create(null))):r},n.stringify=function(e,n){var t=function(e){switch(e.arrayFormat){case"index":return function(n,t,r){return null===t?[s(n,e),"[",r,"]"].join(""):[s(n,e),"[",s(r,e),"]=",s(t,e)].join("")};case"bracket":return function(n,t){return null===t?s(n,e):[s(n,e),"[]=",s(t,e)].join("")};default:return function(n,t){return null===t?s(n,e):[s(n,e),"=",s(t,e)].join("")}}}(n=i({encode:!0,strict:!0,arrayFormat:"none"},n));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return s(r,n);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(t(r,e,o.length))})),o.join("&")}return s(r,n)+"="+s(i,n)})).filter((function(e){return e.length>0})).join("&"):""}},2314:(e,n,t)=>{"use strict";var r=t(28523).compose;n.__esModule=!0,n.composeWithDevTools=function(){if(0!==arguments.length)return"object"==typeof arguments[0]?r:r.apply(null,arguments)},n.devToolsEnhancer=function(){return function(e){return e}}},83273:(e,n,t)=>{"use strict";n.__esModule=!0,n.createDynamicMiddlewares=n.resetMiddlewares=n.removeMiddleware=n.addMiddleware=void 0;var r=t(28523),i=function(){var e=[];return{enhancer:function(n){return function(t){return function(i){var o=e.map((function(e){return e(n)}));return r.compose.apply(void 0,o)(t)(i)}}},addMiddleware:function(){for(var n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];e=[].concat(e,t)},removeMiddleware:function(n){var t=e.findIndex((function(e){return e===n}));-1!==t?e=e.filter((function(e,n){return n!==t})):console.error("Middleware does not exist!",n)},resetMiddlewares:function(){e=[]}}},o=i();n.default=o.enhancer;var s=o.addMiddleware,u=o.removeMiddleware,c=o.resetMiddlewares;n.addMiddleware=s,n.removeMiddleware=u,n.resetMiddlewares=c,n.createDynamicMiddlewares=i},95174:(e,n,t)=>{"use strict";n.__esModule=!0;var r=t(83273);n.getMiddlewareManager=function(){var e=r.createDynamicMiddlewares();return{getItems:function(){return[]},enhancer:e.enhancer,add:function(n){return e.addMiddleware.apply(e,n),n},remove:function(n){return n.forEach(e.removeMiddleware),n},dispose:function(){e.resetMiddlewares()}}}},12519:function(e,n,t){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var r=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};n.__esModule=!0;var i=t(79329);n.getModuleManager=function(e,n,t){var o,s=null,u=[],c=new Set,a=function(e){if(e){if(!s)throw new Error("setDispatch should be called on ModuleManager before adding any modules.");e.forEach(s)}},f={getReducer:function(e,n){return o?o.reduce(e,n):e||null},setDispatch:function(e){s=e},getItems:function(){return[]},add:function(f){if(f&&0!==f.length){f=f.filter((function(e){return e}));var d=[];f.forEach((function(n){if(!c.has(n.id)){c.add(n.id),u.push(n),function(e){if(e)if(o)for(var n in e)o.add(n,e[n]);else o=i.getRefCountedReducerManager(i.getReducerManager(e,t))}(n.reducerMap);var r=n.middlewares;r&&function(n){n&&e.add(n)}(r),d.push(n)}})),s({type:"@@Internal/ModuleManager/SeedReducers"}),d.forEach((function(e){n.forEach((function(n){n.onModuleAdded&&n.onModuleAdded(e)}));var t={type:"@@Internal/ModuleManager/ModuleAdded",payload:e.id};a(e.initialActions?r([t],e.initialActions):[t])}))}},remove:function(t){t&&(t=t.filter((function(e){return e})).reverse()).forEach((function(t){var r;c.has(t.id)&&(a(t.finalActions),function(e){if(e&&o)for(var n in e)o.remove(n)}(t.reducerMap),(r=t.middlewares)&&e.remove(r),n.forEach((function(e){e.onModuleRemoved&&e.onModuleRemoved(t)})),c.delete(t.id),u=u.filter((function(e){return e.id!==t.id})),a([{type:"@@Internal/ModuleManager/ModuleRemoved",payload:t.id}]))}))},dispose:function(){f.remove(u)}};return f}},79329:function(e,n,t){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},r.apply(this,arguments)};n.__esModule=!0;var i=t(28523),o=t(24446);function s(e,n){return void 0===n&&(n=i.combineReducers),e&&0!==Object.keys(e).length?n(e):function(e,n){return e||null}}n.getRefCountedReducerManager=function(e){var n=o.getStringRefCounter();for(var t in e.getReducerMap())n.add(t);return{reduce:e.reduce,getReducerMap:e.getReducerMap,add:function(t,r){0===n.getCount(t)&&e.add(t,r),n.add(t)},remove:function(t){n.remove(t),0===n.getCount(t)&&e.remove(t)}}},n.getReducerManager=function(e,n){void 0===n&&(n=i.combineReducers);var t=n(e),o=r({},e),u=[];return{getReducerMap:function(){return o},reduce:function(e,n){if(u.length>0){e=r({},e);for(var i=0,o=u;i<o.length;i++)delete e[o[i]];u=[]}return void 0===e&&(e={}),t(e,n)},add:function(e,r){e&&!o[e]&&(o[e]=r,t=s(o,n))},remove:function(e){e&&o[e]&&(delete o[e],u.push(e),t=s(o,n))}}}},45105:function(e,n,t){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},r.apply(this,arguments)};n.__esModule=!0;var i=t(24446);n.getRefCountedManager=function(e,n,t){var o=i.getObjectRefCounter(n,t);e.getItems().forEach((function(e){return o.add(e)}));var s=r({},e);return s.add=function(n){if(n){var t=n.filter((function(e){return e})),r=t.filter((function(e){return 0===o.getCount(e)}));e.add(r),t.forEach(o.add)}},s.remove=function(n){n&&n.forEach((function(n){n&&(o.remove(n),0===o.getCount(n)&&e.remove([n]))}))},s.dispose=function(){e.dispose()},s}},88526:function(e,n,t){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var r=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};n.__esModule=!0;var i=t(28523),o=t(2314),s=t(95174),u=t(12519),c=t(45105),a=t(23425);n.createStore=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var f=e.initialState,d=void 0===f?{}:f,l=e.extensions,h=void 0===l?[]:l,p=e.enhancers,g=void 0===p?[]:p,m=e.advancedComposeEnhancers,v=void 0===m?o.composeWithDevTools({}):m,w=e.advancedCombineReducers,y=h.reduce((function(e,n){return n.middleware&&e.push.apply(e,n.middleware),e}),[]),M=c.getRefCountedManager(s.getMiddlewareManager(),(function(e,n){return e===n})),N=v.apply(void 0,r(g,[i.applyMiddleware.apply(void 0,r(y,[M.enhancer]))])),b=c.getRefCountedManager(u.getModuleManager(M,h,w),(function(e,n){return e.id===n.id}),(function(e){return e.retained})),x=i.createStore(b.getReducer,d,N);b.setDispatch(x.dispatch);var E=function(e){var n=a.flatten(e);return b.add(n),{remove:function(){b.remove(n)}}},_=function(e){return E([e])};return h.forEach((function(e){e.onModuleManagerCreated&&e.onModuleManagerCreated({addModule:_,addModules:E})})),x.addModule=_,x.addModules=E,x.dispose=function(){b.dispose(),M.dispose(),h.forEach((function(e){e.dispose&&e.dispose()}))},x.addModules(n),x}},58166:(e,n)=>{"use strict";n.__esModule=!0,n.getMap=function(e){var n=[],t={};return{keys:n,get:function(r){if(r){var i=n.findIndex((function(n){return n&&e(n,r)}));if(-1!==i)return t[i]}},add:function(r,i){r&&-1===n.findIndex((function(n){return n&&e(n,r)}))&&(n.push(r),t[n.length-1]=i)},remove:function(r){if(r){var i=n.findIndex((function(n){return n&&e(n,r)}));if(-1!==i){delete n[i];var o=t[i];return delete t[i],o}}}}}},23425:function(e,n){"use strict";var t=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var r=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};n.__esModule=!0,n.flatten=function(e){if(e){for(var n=e.slice(),r=0;r<n.length;)Array.isArray(n[r])?n.splice.apply(n,t([r,1],n[r])):r++;return n}return e}},24446:(e,n)=>{"use strict";n.__esModule=!0,n.getObjectRefCounter=function(e,n){e||(e=function(e,n){return e===n}),n||(n=function(){return!1});var t=[],r=[];return{getCount:function(n){if(null==n)return 0;var i=t.findIndex((function(t){return t&&e(t,n)}));return-1===i?0:r[i]},add:function(i){if(null!=i){var o=t.findIndex((function(n){return n&&e(n,i)})),s=1;-1===o?(o=t.length,t.push(i)):s=r[o]+1,n(i)&&(s=1/0),r[o]=s}},remove:function(i){if(n(i))return!1;var o=t.findIndex((function(n){return n&&e(n,i)}));return-1!==o&&(1===r[o]?(delete t[o],delete r[o],!0):(r[o]=r[o]-1,!1))}}},n.getStringRefCounter=function(){var e={};return{getCount:function(n){return null==n?0:e[n]||0},add:function(n){null!=n&&(e[n]?e[n]++:e[n]=1)},remove:function(n){return null!=n&&!!e[n]&&(1===e[n]?(delete e[n],!0):(e[n]--,!1))}}}},70315:(e,n,t)=>{"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}n.__esModule=!0,r(t(88526)),r(t(58166)),r(t(24446)),r(t(95174)),r(t(45105))},78522:function(e,n,t){"use strict";var r,i=this&&this.__extends||(r=function(e,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},r(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},o.apply(this,arguments)};n.__esModule=!0;var s=t(24328),u=t(52730),c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n.prototype.render=function(){var e=this;return s.createElement(u.ReactReduxContext.Consumer,null,(function(n){return s.createElement(a,o({},e.props,{reactReduxContext:n}))}))},n}(s.Component);n.DynamicModuleLoader=c;var a=function(e){function n(n){var t=e.call(this,n)||this;if(t._providerInitializationNeeded=!1,t._cleanup=function(){t._addedModules&&(t._addedModules.remove(),t._addedModules=void 0)},null==n.reactReduxContext){var r="Tried to render DynamicModuleLoader, but no ReactReduxContext was provided";throw console.error(r),new Error(r)}return t._store=n.reactReduxContext?n.reactReduxContext.store:void 0,t.props.strictMode?t.state={readyToRender:!1}:(t._addModules(),t.state={readyToRender:!0}),t}return i(n,e),n.prototype.render=function(){return this.state.readyToRender?this._providerInitializationNeeded?s.createElement(u.Provider,{store:this._store},s.createElement(c,o({},this.props))):s.createElement(s.Fragment,null,this._renderLoader(),s.createElement(f,{cleanup:this._cleanup})):null},n.prototype._renderLoader=function(){return this.props.children?"function"==typeof this.props.children?this.props.children():this.props.children:null},n.prototype._addModules=function(){var e=this.props,n=e.createStore,t=e.modules;if(this._store)this._addedModules=this._store.addModules(t);else{if(!n)throw new Error("Store could not be resolved from React context");this._store=n(),this._providerInitializationNeeded=!0}},n.prototype.componentDidMount=function(){this.props.strictMode&&(this._addModules(),this.setState({readyToRender:!0}))},n}(s.Component),f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n.prototype.render=function(){return null},n.prototype.componentWillUnmount=function(){this.props.cleanup()},n}(s.Component)},66780:(e,n,t)=>{"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}n.__esModule=!0,r(t(70315)),r(t(78522))},57785:e=>{"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}}}]);
|
package/6425.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6425],{7089:(e,t,a)=>{a.d(t,{Z:()=>h});var o=a(7560),r=a(54530),n=a(24328),l=(a(13980),a(6277));const i=(0,a(3752).Z)(n.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var c=a(15459),s=a(41128),u=a(85974),d=a(97580),p=a(57074);function f(e){return"Backspace"===e.key||"Delete"===e.key}var m=n.forwardRef((function(e,t){var a=e.avatar,c=e.classes,s=e.className,m=e.clickable,h=e.color,y=void 0===h?"default":h,v=e.component,g=e.deleteIcon,b=e.disabled,C=void 0!==b&&b,k=e.icon,S=e.label,_=e.onClick,Z=e.onDelete,x=e.onKeyDown,w=e.onKeyUp,O=e.size,R=void 0===O?"medium":O,E=e.variant,I=void 0===E?"default":E,P=(0,r.Z)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),$=n.useRef(null),z=(0,u.Z)($,t),L=function(e){e.stopPropagation(),Z&&Z(e)},T=!(!1===m||!_)||m,M="small"===R,N=v||(T?p.Z:"div"),j=N===p.Z?{component:"div"}:{},D=null;if(Z){var F=(0,l.Z)("default"!==y&&("default"===I?c["deleteIconColor".concat((0,d.Z)(y))]:c["deleteIconOutlinedColor".concat((0,d.Z)(y))]),M&&c.deleteIconSmall);D=g&&n.isValidElement(g)?n.cloneElement(g,{className:(0,l.Z)(g.props.className,c.deleteIcon,F),onClick:L}):n.createElement(i,{className:(0,l.Z)(c.deleteIcon,F),onClick:L})}var U=null;a&&n.isValidElement(a)&&(U=n.cloneElement(a,{className:(0,l.Z)(c.avatar,a.props.className,M&&c.avatarSmall,"default"!==y&&c["avatarColor".concat((0,d.Z)(y))])}));var V=null;return k&&n.isValidElement(k)&&(V=n.cloneElement(k,{className:(0,l.Z)(c.icon,k.props.className,M&&c.iconSmall,"default"!==y&&c["iconColor".concat((0,d.Z)(y))])})),n.createElement(N,(0,o.Z)({role:T||Z?"button":void 0,className:(0,l.Z)(c.root,s,"default"!==y&&[c["color".concat((0,d.Z)(y))],T&&c["clickableColor".concat((0,d.Z)(y))],Z&&c["deletableColor".concat((0,d.Z)(y))]],"default"!==I&&[c.outlined,{primary:c.outlinedPrimary,secondary:c.outlinedSecondary}[y]],C&&c.disabled,M&&c.sizeSmall,T&&c.clickable,Z&&c.deletable),"aria-disabled":!!C||void 0,tabIndex:T||Z?0:void 0,onClick:_,onKeyDown:function(e){e.currentTarget===e.target&&f(e)&&e.preventDefault(),x&&x(e)},onKeyUp:function(e){e.currentTarget===e.target&&(Z&&f(e)?Z(e):"Escape"===e.key&&$.current&&$.current.blur()),w&&w(e)},ref:z},j,P),U||V,n.createElement("span",{className:(0,l.Z)(c.label,M&&c.labelSmall)},S),D)}));const h=(0,c.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],a=(0,s.U1)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:(0,s._4)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:(0,s._4)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:(0,s._4)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:(0,s._4)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:(0,s._4)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:(0,s._4)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,s.U1)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,s.U1)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,s.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:a,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:(0,s.U1)(a,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:(0,s.U1)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:(0,s.U1)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:(0,s.U1)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:(0,s.U1)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}}),{name:"MuiChip"})(m)},81819:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z});var o=a(29611)},69112:(e,t,a)=>{a.d(t,{Z:()=>p});var o=a(7560),r=a(54530),n=a(24328),l=(a(13980),a(6277));const i=(0,a(3752).Z)(n.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var c=a(15459),s=a(57074),u=a(97580),d=n.forwardRef((function(e,t){var a=e.active,c=void 0!==a&&a,d=e.children,p=e.classes,f=e.className,m=e.direction,h=void 0===m?"asc":m,y=e.hideSortIcon,v=void 0!==y&&y,g=e.IconComponent,b=void 0===g?i:g,C=(0,r.Z)(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return n.createElement(s.Z,(0,o.Z)({className:(0,l.Z)(p.root,f,c&&p.active),component:"span",disableRipple:!0,ref:t},C),d,v&&!c?null:n.createElement(b,{className:(0,l.Z)(p.icon,p["iconDirection".concat((0,u.Z)(h))])}))}));const p=(0,c.Z)((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:.5}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(d)},15223:(e,t,a)=>{a.d(t,{Z:()=>u});var o=a(7560),r=a(54530),n=a(51119),l=a(24328),i=(a(13980),a(6277)),c=a(15459),s=l.forwardRef((function(e,t){var a=e.classes,n=e.className,c=e.component,s=void 0===c?"div":c,u=e.disableGutters,d=void 0!==u&&u,p=e.variant,f=void 0===p?"regular":p,m=(0,r.Z)(e,["classes","className","component","disableGutters","variant"]);return l.createElement(s,(0,o.Z)({className:(0,i.Z)(a.root,a[f],n,!d&&a.gutters),ref:t},m))}));const u=(0,c.Z)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,n.Z)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(s)},98989:(e,t,a)=>{var o=a(14859);t.Z=void 0;var r=o(a(24328)),n=(0,o(a(50175)).default)(r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"M10 17l5-5-5-5v10z"}),r.default.createElement("path",{fill:"none",d:"M0 24V0h24v24H0z"})),"ArrowRight");t.Z=n},51209:(e,t,a)=>{var o=a(14859);t.Z=void 0;var r=o(a(24328)),n=(0,o(a(50175)).default)(r.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");t.Z=n},82726:(e,t,a)=>{var o=a(14859);t.Z=void 0;var r=o(a(24328)),n=(0,o(a(50175)).default)(r.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");t.Z=n},43266:(e,t,a)=>{var o=a(14859);t.Z=void 0;var r=o(a(24328)),n=(0,o(a(50175)).default)(r.default.createElement("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay");t.Z=n},21853:(e,t,a)=>{var o=a(14859);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(a(24328)),n=(0,o(a(50175)).default)(r.default.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=n},15115:(e,t,a)=>{t.Z=void 0;var o=m(a(72579)),r=m(a(54073)),n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==h(e)&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=o?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(a,r,n):a[r]=e[r]}return a.default=e,t&&t.set(e,a),a}(a(24328)),l=m(a(13980)),i=m(a(71153)),c=m(a(16805)),s=m(a(2630)),u=m(a(81819)),d=m(a(21853)),p=m(a(87685));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function m(e){return e&&e.__esModule?e:{default:e}}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function g(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function k(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(f,e);var t,a,l=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var a,o=C(e);if(t()){var r=C(this).constructor;a=Reflect.construct(o,arguments,r)}else a=o.apply(this,arguments);return g(this,a)}}(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),k(b(t=l.call(this,e)),"emitChange",(0,r.default)((function(e){return t.props.onChange(e)}),200)),k(b(t),"handleChange",(function(e){var a=(0,o.default)(e,["target","value"]);t.setState({value:a}),t.emitChange(a)})),k(b(t),"handleFocus",(function(){return t.inputRef.current.focus()})),k(b(t),"handleOpen",(function(){t.props.forceOpen||t.setState({open:!0},t.handleFocus)})),k(b(t),"handleClose",(function(){t.props.forceOpen||t.setState({open:!1}),t.setState({value:""}),t.emitChange()})),t.state={open:Boolean(t.props.initialValue),value:t.props.initialValue||""},t.inputRef=n.default.createRef(),t}return t=f,(a=[{key:"render",value:function(){var e=this.state,t=e.open,a=e.value,o=this.props,r=o.classes,l=o.placeholder,f=o.forceOpen,m=t||f,h=t||f&&a;return n.default.createElement("div",{className:(0,i.default)(c.default.searchInputContainer,k({},c.default.colored,m),r.root)},n.default.createElement(s.default,{name:"expand-input-btn",onClick:this.handleOpen},n.default.createElement(d.default,null)),m&&n.default.createElement(u.default,{value:a,disableUnderline:!0,className:c.default.searchInputField,classes:{input:c.default.input},placeholder:l,onChange:this.handleChange,inputProps:{ref:this.inputRef}}),h&&n.default.createElement(s.default,{name:"collapse-input-btn",onClick:this.handleClose},n.default.createElement(p.default,null)))}}])&&y(t.prototype,a),f}(n.PureComponent);t.Z=S,S.defaultProps={classes:{},forceOpen:!1},S.propTypes={classes:l.default.shape({root:l.default.string}),placeholder:l.default.string,forceOpen:l.default.bool,onChange:l.default.func.isRequired,initialValue:l.default.string}},16805:(e,t,a)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,(0,((o=a(86698))&&o.__esModule?o:{default:o}).default)("<style>.Form__searchInputContainer_3vqs6{display:flex;min-height:48px}.Form__searchInputField_3mnAi{flex:1 1 auto;padding:2px}.Form__input_3ulP-::-ms-clear{display:none}.Form__colored_2WMqk{background-color:#fafafa}</style>"),t.default={searchInputContainer:"Form__searchInputContainer_3vqs6",searchInputField:"Form__searchInputField_3mnAi",input:"Form__input_3ulP-",colored:"Form__colored_2WMqk"}}}]);
|
package/6940.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6940],{16940:(e,t,n)=>{n.d(t,{_:()=>ca,t:()=>Sa});var r=n(24328),o=n.n(r),a=n(52730),l=n(8598),i=n(17440),s=n(36138),c=n(44443),u=n(22664),p=n(39450),d=n(60115),m=n(585),g=n(99493),f=n(87918),b=n.n(f),h=n(3096),y=n.n(h),v=n(87638),x=n(2804),E=n(7718),w=n(3515),C=n(17554),S=n(61756),P=n(57730),O=n(76536),N=n(26481),k=n(49759),Z=n(94150),T=n(26005),R=n(99136),j=n(21077),D=n(67268),I=n(71153),L=n.n(I),A=n(8962);const M=o().createContext(null);M.displayName="SingleAttributeContext";var U=n(60995),z=n(10237),V=n(58662),F=n(94079),H=n(93416),B=n(75512),W=n(30553),q=n(91181),G=n(32152),$=n(36444),_=n(79692);const Q=(0,_.Z)((()=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"36px"},popupContent:{paddingTop:"19px",paddingBottom:"23px",paddingLeft:"23px",paddingRight:"23px",maxWidth:"180px",width:"40%"},checkboxControlRoot:{marginTop:"6px",marginLeft:"-12px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),X=e=>{let{className:t}=e;const n=Q(),a=(0,r.useRef)(),[l,i]=(0,r.useState)(!1),{showInactive:s,toggleShowInactive:c}=(0,r.useContext)(M),u=()=>i((e=>!e));return o().createElement(o().Fragment,null,o().createElement(F.Button,{ref:a,classes:{root:L()(n.triggerButton,t)},onClick:u},o().createElement($.Z,null)),o().createElement(F.Popover,{open:l,classes:{paper:n.popupContent},anchorEl:a.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(F.FormControlLabel,{classes:{root:n.checkboxControlRoot,label:n.checkboxControlLabel},control:o().createElement(F.Checkbox,{className:n.checkboxControlCheckbox,checked:s,onChange:e=>c(e.target.checked)}),label:b().text("Show inactive values")})))},Y=(0,_.Z)((()=>({root:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},ovIcon:{marginTop:"2px",marginLeft:"5px"}}))),K=e=>{let{caption:t,totalVisibleValues:n,showInactiveValuesMenu:a}=e;const l=Y(),{searchQuery:i,setSearchQuery:s,setPage:c,totalNonVisibleValues:u,nonVisibleValues:p,attributeType:d}=(0,r.useContext)(M);return o().createElement(H.Z,{title:b().text(t),className:l.root},o().createElement(B.Z,{widthToHide:500},o().createElement(W.Z,{height:24,margin:16}),o().createElement(F.Typography,{className:l.totalCaption,variant:"caption"},b().number(n)," ",1===n?b().text("item"):b().text("items"))),o().createElement(q.Z,{nonOvTotal:u,className:l.ovIcon,nonOvValues:p,attributeType:d}),o().createElement(G.i,{query:i,onChange:e=>{s(e),c(0)}}),a&&o().createElement(X,null))};var J=n(65549),ee=n(93140),te=n(76134),ne=n(96698);const re=(0,_.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 -16px 8px",backgroundColor:"rgba(0,0,0,0.12)"},ovFalse:e.inactive}))),oe=g.nIW,ae=(e,t)=>"object"==typeof e?Object.values(e).some((e=>e.some((e=>{let{value:n}=e;return ae(n,t)})))):g.P6Y.strings.search(String(e),t),le=async e=>{let{metadata:t,entity:n,attributeTypeUri:r,defaultMaxValues:o=1/0,offset:a=0,searchQuery:l=""}=e;const s=(0,i.pipe)(g.XtP,(0,i.filter)((e=>{let{value:t}=e;return ae(t,l)})))(t,n,r),c=(0,i.filter)(g.OXP,s);return{[(0,g.xy8)(r)]:{[oe(r)]:c.slice(a,a+o),paging:{[r]:{totalOvValues:c.length,totalValues:s.length}}}}};function ie(){return ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ie.apply(this,arguments)}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ce(e,t,n[t])}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ue=[],pe=e=>{let{values:t,attributeType:n,parentUri:l,showInactive:s}=e;const c=re(),{uri:u,required:d,cardinality:m,name:f}=n,h=(0,a.useDispatch)(),y=(0,r.useContext)(p.m),x=(0,a.useSelector)(v.ZP.selectors.getEntity),E=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,x.uri)||{})),w=(0,a.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,l,n))),C=(0,a.useSelector)((e=>(0,g.tQX)(l,n,v.ZP.selectors.getProfileErrors(e)))),S=(0,a.useSelector)(v.ZP.selectors.getMode),P=(0,g.xy8)(n),O=(0,i.pipe)((0,i.pathOr)(ue,[P,f]),(0,i.map)((0,i.prop)("uri")))(x),N=(0,i.pathOr)(ue,[P,f],E),k=N.map((0,i.prop)("uri")),Z=(0,g.ZiX)(x.uri),T=(0,r.useRef)((0,g.gjI)({parentUri:l,attributeType:n})),R=(0,g.O27)(N),j=d&&R,D=j?[T.current]:N.filter((0,i.pipe)((0,i.prop)("uri"),g.ZiX)),I=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,h)(e.map((e=>se({},e,{viewId:y}))))),[y,h]),A=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.modifyAttribute,h)(se({},e,{viewId:y}))),[y,h]),M=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,h)(se({},e,{viewId:y}))),[y,h]),U=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,h),[h]),z=(0,r.useCallback)((()=>{const e={parentUri:l,attributeType:n};return I(j&&!(0,g.YkM)(n.type)?[e,e]:[e])}),[I,l,n,j]),V=(0,g.Vg3)({attributeType:n,mode:S}),H={attributeType:n,errors:w,crosswalks:E.crosswalks,mode:S,onAddAttributes:I,onChangeAttribute:A,onDeactivateError:U,showNonOv:s};return o().createElement("div",null,o().createElement(ee.Z,{cardinality:m}),o().createElement(te.Z,{message:C}),V&&o().createElement(F.Button,{color:"primary",onClick:z,className:c.moreButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),D.map(((e,t)=>o().createElement(ne.Z,ie({key:e.uri},H,{attributeValue:e,lazy:j&&!d,showEmptyEditors:Z,ownError:(0,g.ADq)(e,t,u,w),onDeleteAttribute:M})))),D.length>0&&t.length>0&&o().createElement(F.Divider,{className:c.divider}),t.map((e=>{const t=N.find((0,i.propEq)("uri",e.uri)),n=t||e,r=O.includes(n.uri)&&!k.includes(n.uri),a=!r&&t&&!((e,t)=>{const n=(0,i.is)(Object,e.value)||(0,i.is)(Object,t.value)?(0,i.over)((0,i.lensPath)(["value"]),(0,g.vKJ)({valueTransformer:(0,i.unless)(g.OXP,(0,i.omit)(["value"])),deleteEmptyComplex:!0})):i.identity;return(0,i.equals)(n(e),n(t))})(t,e),l=(0,i.cond)([[(0,i.always)(r),(0,i.always)("deleted")],[(0,i.always)(a),(0,i.always)("edited")]])();return o().createElement("div",{key:n.uri,className:L()({[c.ovFalse]:!(0,g.OXP)(n)})},o().createElement(ne.Z,ie({},H,{attributeValue:n,ownError:(0,g.ADq)(n,null,u,w),onDeleteAttribute:M,state:l})))})))};var de=n(81303);const me=(0,_.Z)((e=>({ovFalse:e.inactive}))),ge=e=>{let{values:t,attributeType:n,showInactive:r}=e;const a=me();return o().createElement(o().Fragment,null,t.map((e=>o().createElement("div",{key:e.uri,className:L()({[a.ovFalse]:!(0,g.OXP)(e)})},o().createElement(de.Z,{attributeValue:e,attributeType:n,showNonOv:r})))))},fe=(0,_.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"},pagination:{flexGrow:0,flexShrink:0}}))),be=e=>{let{config:t,className:n}=e;const{caption:l,max:i,showInactiveValuesMenu:s}=t,c=fe(),{values:u,totalVisibleValues:p,page:d,setPage:m,isLoading:g,hasPaging:f,attributeType:h,showInactive:y}=(0,r.useContext)(M),x=(0,a.useSelector)(v.ZP.selectors.getEntityUri),E=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),w=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),C=(0,a.useSelector)(v.ZP.selectors.getPivotingAttributes),S=0!==u.length;return o().createElement(U.J.Provider,{value:C},o().createElement(z.Z,{className:L()(c.root,n)},o().createElement(K,{totalVisibleValues:p,caption:l,showInactiveValuesMenu:s}),o().createElement(F.Box,{className:c.content},(()=>{if(g)return o().createElement(R.Z,null);if(h){if(E&&S){const e={values:u,attributeType:h,showInactive:y};return o().createElement(ge,e)}if(w){const e={values:u,attributeType:h,parentUri:x,showInactive:y};return o().createElement(pe,e)}}return o().createElement(F.Typography,{className:c.noData},b().text("No data"))})()),f&&o().createElement(V.Z,{count:p,page:d,rowsPerPage:i,rowsPerPageOptions:[],onChangePage:m,classes:{root:c.pagination}})))};var he=n(67218),ye=n(20562);function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xe=(e,t,n)=>{const{attributeUri:o,max:l=15}=e,s=(0,a.useSelector)(v.ZP.selectors.getMetadata),[c,u]=(0,r.useState)([]),[p,d]=(0,r.useState)(null),[m,f]=(0,r.useState)(!1),b=(0,he._)(),h=(0,r.useRef)(null),y=(0,a.useDispatch)(),x=(0,a.useSelector)(v.ZP.selectors.getApiPath),E=(0,a.useSelector)(v.ZP.selectors.getTenant),w=n?v.ZP.selectors.getEntityWithDiff:v.ZP.selectors.getEntityWithoutDiff,C=(0,a.useSelector)(w),S=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),P=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),O=(0,a.useSelector)(v.ZP.selectors.getHistoryDiff),N=C.uri,k=oe(o),Z=(0,g.xy8)(o);h.current=(0,g.JQy)(C,N,k);const T=(0,r.useMemo)((()=>(0,g.zeJ)(s,o)),[s,o]),{globalFilter:R}=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),{showInactive:j}=t,D=(0,r.useCallback)((()=>{if(T&&(0,g.Uty)(T)&&!(0,g.ZiX)(N)&&(0,g.YOQ)(o)){f(!0);const{page:e,showInactive:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["page","showInactive"]),a=(0,g.biM)(C)||P?le:g.KbL;b(a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ve(e,t,n[t])}))}return e}({metadata:s,entity:C,apiPath:x,tenant:E,parentUri:N,defaultMaxValues:l,attributeTypeUri:o,offset:l*e,globalFilter:R,options:n?"":void 0},r))).then((e=>{const t=(0,i.path)([Z],e),n=(0,i.pathOr)([],[k],t);P||y(v.N5.actions.processNextPageOfAttributeValues({parentUri:N,attributeTypeUri:o,attributeTypeName:k,values:n})),u(n.map((e=>{var t;return(null===(t=h.current)||void 0===t?void 0:t.find((0,i.propEq)("uri",e.uri)))||e}))),d((0,i.path)(["paging",o],t))})).finally((()=>{f(!1)}))}else u([]),d(null)}),[x,N,E,o,l,s,t,R,T,P,O]);(0,r.useEffect)((()=>{D()}),[D]),(0,ye.D)((()=>{S&&D()}),[S]);const I=(0,i.partition)(g.OXP),[,L]=I(h.current||[]),A=j?[]:L,M=j?"totalValues":"totalOvValues",U=(0,i.ifElse)((0,i.has)(M),(0,i.prop)(M),(0,i.always)(c.length))(p),z=l<U,V=null!=p&&p.totalValues?p.totalValues-U:A.length;return{values:c,isLoading:m,hasPaging:z,totalVisibleValues:U,attributeType:T,totalNonVisibleValues:V,nonVisibleValues:A}};function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var we=n(37152),Ce=n(31274),Se=n(79026),Pe=n(8818),Oe=n(90324),Ne=n(70595);const ke=o().createContext(null);ke.displayName="RelationsViewStateContext";const Ze=(0,_.Z)((e=>({button:{color:e.palette.text.secondary,width:"36px",minWidth:"36px"},popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"},divider:{backgroundColor:"rgba(0,0,0,0.1)",margin:"19px -23px"},title:{marginBottom:"30px"},sortControls:{display:"flex",alignItems:"center"},sortSelectorRoot:{flex:1,padding:"13px 16px",fontSize:"0.85rem"},sortSelectorMenuItem:{fontSize:"0.85rem"},sortOrderButton:{flexShrink:0,margin:"0 8px 0 7px"}}))),Te=e=>{let{className:t}=e;const n=Ze(),a=(0,r.useRef)(),{showInactive:l,toggleShowInactive:i,sortOrder:s,toggleSortOrder:c,sortOption:u,changeSortOption:p,sortOptions:d}=(0,r.useContext)(ke),[m,f]=(0,r.useState)(!1),h=()=>f((e=>!e)),y=!(0,g.O27)(d),v="asc"===s;return o().createElement(o().Fragment,null,o().createElement(F.Button,{ref:a,classes:{root:L()(n.button,t)},onClick:h},o().createElement($.Z,null)),o().createElement(F.Popover,{open:m,classes:{paper:n.popupContent},anchorEl:a.current,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(F.FormControlLabel,{classes:{label:n.checkboxControlLabel},control:o().createElement(F.Checkbox,{className:n.checkboxControlCheckbox,checked:l||!1,onChange:i}),label:b().text("Show inactive Relationships")}),y&&o().createElement(o().Fragment,null,o().createElement(F.Divider,{className:n.divider}),o().createElement(F.Typography,{className:n.title,variant:"h6"},b().text("Sort by")),o().createElement("div",{className:n.sortControls},o().createElement(Se.Z,{entries:d,TextFieldProps:{variant:"filled"},classes:{root:n.sortSelectorRoot,menuItem:n.sortSelectorMenuItem},fullWidth:!0,disableUnderline:!0,value:u,onChange:p,MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}}),o().createElement(Pe.k,{tooltipTitle:v?b().text("Ascending"):b().text("Descending"),icon:v?Oe.Z:Ne.Z,onClick:c,className:n.sortOrderButton,size:"L"})))))};Te.displayName="FilterButton";const Re=Te,je=(0,_.Z)({header:{padding:"0 6px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"}});var De=n(61932),Ie=n(55847);const Le=o().createContext(null);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){Me(e,t,n[t])}))}return e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ue=Math.pow(2,31)-1,ze=(0,_.Z)((()=>({tenant:{backgroundColor:"#0000EE",cursor:"pointer",position:"absolute",top:"8px",left:"22px",width:"10px",height:"10px",color:"white",fontSize:"10px",fontWeight:"bold",userSelect:"text",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},button:{position:"relative"},badge:{fontSize:"10px",height:"14px",minWidth:"14px",width:"14px",fontWeight:"bold",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px",top:"4px"}})));var Ve=n(81137);const Fe=e=>{let{label:t}=e;const n=ze();return o().createElement(F.Badge,{classes:{anchorOriginTopRightRectangle:n.badgePosition,badge:n.badge},badgeContent:t},o().createElement(De.Z,null))},He=()=>{const{tenants:e,selectedTenant:t,onConfirmImport:n,onCancelConfirmation:l,onImportClick:i}=(()=>{var e;const t=(0,a.useSelector)(v.ZP.selectors.getDataTenants),n=(0,a.useDispatch)(),{config:o,reloadRelations:l}=(0,r.useContext)(Le),i=(0,a.useSelector)(v.ZP.selectors.getEntityUri),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(null),d=(0,a.useSelector)(v.ZP.selectors.getDtssPath),m=(0,a.useSelector)(v.ZP.selectors.getTenant),f=[Ae({},o.content,{offset:0,max:null!==(e=o.maxDtssImport)&&void 0!==e?e:Ue})],h=(0,r.useCallback)((()=>{c([]),o.importFromDT&&!(0,g.ZiX)(i)&&Promise.all((t||[]).map((e=>(0,g.QXb)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:e.id}).then((t=>{let{hasNonImportedConnections:n}=t;return Ae({},e,{hasNonImportedConnections:n})}))))).then((e=>e.filter((e=>e.hasNonImportedConnections)))).then(c)}),[i,d,m,o,t]),y=(0,r.useCallback)((()=>{(0,g.MOC)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:u.id}).then((()=>{l(),h()})).catch((e=>n(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))))),p(null)}),[i,d,m,o,h,l,u,p]);(0,r.useEffect)((()=>{h()}),[h]);const x=(0,r.useCallback)((()=>p(null)),[]),E=(0,r.useCallback)((e=>p(e)),[]);return{tenants:s,selectedTenant:u,onConfirmImport:y,onCancelConfirmation:x,onImportClick:E}})(),s=ze(),c=1===e.length,u=c?0===e[0].label.indexOf("DT:")?e[0].label[3]:e[0].label[0]:e.length;return o().createElement(o().Fragment,null,!!e.length&&o().createElement(o().Fragment,null,c?o().createElement("div",{className:s.button},o().createElement(Pe.k,{size:"L",icon:De.Z,tooltipTitle:b().text("Import connections from ${label}",{label:e[0].label}),onClick:()=>i(e[0])}),o().createElement("div",{className:L()(s.tenant)},u)):o().createElement(Ie.Z,{menuId:"importDT-table-actions",buttonComponent:Pe.k,buttonProps:{tooltipTitle:b().text("Import connections"),size:"L",icon:()=>o().createElement(Fe,{label:u})},menuItems:e.map((e=>({onClick:()=>{i(e)},text:e.label})))}),o().createElement(Ve.Z,{open:!!t,title:b().text("Confirmation"),content:b().text("Import connections from ${label}?",{label:null==t?void 0:t.label}),discardCaption:b().text("Cancel"),saveCaption:b().text("Import"),onDiscard:l,onSave:n})))},Be=e=>{let{title:t,total:n}=e;const a=je(),{searchQuery:l,changeSearchQuery:i}=(0,r.useContext)(ke);return o().createElement(H.Z,{title:t||"",className:a.header},n>0&&o().createElement(B.Z,{widthToHide:400},o().createElement(W.Z,{height:24,margin:16}),o().createElement(F.Typography,{className:a.totalCaption,variant:"caption"},n>1?b().text("${count} items",{count:n}):b().text("${count} item",{count:n}))),o().createElement(G.i,{query:l,onChange:i}),o().createElement(He,null),o().createElement(Re,null))};var We=n(11013),qe=n(27604),Ge=n(22983),$e=n(31254),_e=n(31039);const Qe=(0,_.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px"},label:{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},secondaryLabel:{color:"rgba(255, 255, 255, 0.7)",fontSize:"10px",marginTop:"4px",fontWeight:500,lineHeight:"11px"},progress:{marginTop:"4px",color:"#FFFFFF"}})));function Xe(){return Xe=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},Xe.apply(this,arguments)}const Ye=e=>{let{label:t,entity:n,children:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","entity","children"]);const c=Qe(),u=(0,he._)(),p=(0,a.useSelector)(v.ZP.selectors.getTenant),d=(0,a.useSelector)(v.ZP.selectors.getDtssPath),[m,f]=(0,r.useState)(!1),[b,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(null)}),[n]);const y=(0,r.useCallback)((()=>{if(null!=n&&n.entityUri&&(0,i.isNil)(b)){const e=(0,i.ifElse)(g.biM,(e=>(0,g.vTU)({entityUri:e.entityUri,dataTenant:e.dataTenant,customerTenant:p,dtssPath:d})),(e=>(0,g.XkT)(e.entityUri)));f(!0),u(e(n)).then((e=>{let{secondaryLabel:t}=e;h(t)})).finally((()=>{f(!1)}))}}),[d,n,p,u,b]),x=o().createElement("div",{className:c.tooltipContent},o().createElement("div",{className:c.label},t),m&&o().createElement(F.CircularProgress,{size:16,classes:{colorPrimary:c.progress}}),b&&o().createElement("div",{className:c.secondaryLabel},b));return o().createElement(F.Tooltip,Xe({onOpen:y,title:x,disableFocusListener:!0,classes:{tooltip:c.tooltip}},s),l)},Ke=(e,t)=>{const{entity:n,relation:r}=e;return{entityType:(0,g.nt9)(t,null==n?void 0:n.entityType),entityLabel:(0,g.idV)(null==n?void 0:n.entityLabel),preparedUri:(0,g.wwR)({uri:null==n?void 0:n.entityUri,dataTenant:null==n?void 0:n.dataTenant}),relationLabel:(null==r?void 0:r.relationLabel)||(0,g.Lmx)(t,null==r?void 0:r.relationType)}};var Je=n(77277);const et=(0,_.Z)((()=>({container:{display:"flex"}})));function tt(){return tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}const nt=e=>{let{acceptRelation:t,ignoreRelation:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["acceptRelation","ignoreRelation"]);const a=et();return o().createElement("div",{className:a.container},o().createElement(Je.Z,tt({onClick:t,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Accept")),o().createElement(Je.Z,tt({onClick:n,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Ignore")))},rt=(0,_.Z)((e=>({container:{display:"flex",flexDirection:"column",marginBottom:"2px"},row:{display:"flex",alignItems:"center",flexDirection:"row",minHeight:"24px",padding:"0 16px"},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},editButtonsContent:{marginLeft:"auto",flex:"0 0 40px"},editButtons:{padding:0},removed:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary,margin:"0 5px"}}))),ot=(0,r.memo)((e=>{let{connection:t,metadata:n,showControls:a,onRemoveRelation:l,onEditRelation:i,onAcceptRelation:s,onIgnoreRelation:c,renderRelationArrowButton:u}=e;const p=rt(),{entity:d,relation:m}=t,f=(0,g.$qe)(t),h=(0,g.xr3)(t),y=(0,g.iJH)(t),{entityType:v,entityLabel:x,preparedUri:E,relationLabel:w}=Ke(t,n),C=(0,g.Fn9)(m)&&(0,g.Fn9)(d),{canRemove:S,canUpdate:P}=(e=>{let{metadata:t,mode:n,connection:r,onRemoveRelation:o,onEditRelation:a}=e;if((n===g.ARY.Editing||n===g.ARY.Suggesting)&&r){const{relation:{relationType:e}}=r,l=(0,g.$qe)(r),i=(0,g.V3K)(t,e);return{canRemove:o&&!l&&(0,g.Edd)(n,i),canUpdate:a&&!l&&(0,g.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:g.ARY.Editing,onRemoveRelation:l,onEditRelation:i,metadata:n,connection:t}),O=(0,r.useCallback)((()=>l(t.relation.relationUri)),[l,t]),N=(0,r.useCallback)((()=>i(t)),[i,t]),k=(0,r.useCallback)((()=>{s(t)}),[s,t]),Z=(0,r.useCallback)((()=>c(t)),[c,t]),T=(S||P)&&a&&!t.suggested?o().createElement(o().Fragment,null,P&&o().createElement(Pe.k,{icon:qe.Z,size:"XS",onClick:N,tooltipTitle:b().text("Edit")}),S&&o().createElement(Pe.k,{icon:Ge.Z,size:"XS",onClick:O,tooltipTitle:b().text("Remove")})):void 0,R=t.suggested?o().createElement(nt,{acceptRelation:k,ignoreRelation:Z,size:"small",disabled:y}):void 0,j=y?b().text("ignored"):b().text("edited");return o().createElement("div",{className:L()(p.container,{[p.rowInactive]:!C},{[p.removed]:f||y})},o().createElement("div",{className:p.row},u&&u(),o().createElement($e.Z,{className:p.entityAvatar,entityType:v}),o().createElement(_e.Z,{value:E,className:p.entityLabelContainer},o().createElement(Ye,{label:x,entity:d},o().createElement("span",{className:p.entityLabel},x)),(h||y)&&o().createElement(F.Typography,{variant:"caption",className:p.editedLabel},"(",j,")"),w&&o().createElement("span",{className:p.relationLabel},`, ${w}`)),o().createElement("div",{className:p.editButtonsContent},T),R))})),at=(e,t)=>{const n=(e,t)=>(t?(0,g.VGB)(t):[]).map((t=>({type:t,direction:e===g.Nsj.IN?g.Nsj.IN:g.Nsj.OUT})));return n(g.Nsj.IN,e).concat(n(g.Nsj.OUT,t))[0]};function lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var it=n(98989),st=n(83543);const ct=(0,_.Z)({arrowIcon:{fontSize:"16px",marginRight:"6px"}}),ut=e=>{let{onClick:t,connection:n,config:r,showSecondLevel:a}=e;const l=ct(),{parentEntityUri:i}=n,{contentSecondLevel:s}=r,c={onClick:t,className:l.arrowIcon};return i||!s||(0,g.xvW)(n)?null:a?o().createElement(st.Z,c):o().createElement(it.Z,c)},pt=(0,_.Z)({row:{display:"flex",alignItems:"center",width:"100%"},secondLevelContent:{paddingLeft:"24px"}}),dt=e=>{let{config:t,connection:n,children:l}=e;const i=pt(),{showInactive:s}=(0,r.useContext)(ke),{connections:c,showSecondLevel:u,toggleShowSecondLevel:p,loadRelations:d,loading:m,total:f}=(e=>{let{config:t,connection:n,relationActivityFilter:o}=e;const l=(0,a.useDispatch)(),[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(0),{contentSecondLevel:m}=t,{entity:f}=n,b=(0,a.useSelector)((e=>v.ZP.selectors.getConnectionsWithDraftsByViewId(e,t.id,f.entityUri)))||[],{activityFilter:h}=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions)||{},y=(0,r.useCallback)((()=>{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){lt(e,t,n[t])}))}return e}({},m,{returnObjects:!0,returnDates:!0,activeness:{relation:o||g.Ng6.ALL,entity:h}});u(!0),(0,g.N6e)(f.entityUri,[e]).then((e=>{const{connections:n,total:r}=e[0];n&&l(v.N5.relations.actions.secondLevelRelationsLoaded({connections:n,parentEntityUri:f.entityUri,id:t.id})),d(r),u(!1)}))}),[t.id,m,l,f.entityUri,h,o]),x=(0,r.useCallback)((()=>{i||n.connections||y(),s((e=>!e))}),[y,n.connections,i]);return{connections:b,showSecondLevel:i,toggleShowSecondLevel:x,loadRelations:y,loading:c,total:p}})({config:t,connection:n,relationActivityFilter:s?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY}),b=(0,r.useMemo)((()=>(0,g.Px$)(c)),[c]);return o().createElement(o().Fragment,null,l((()=>o().createElement(ut,{onClick:p,connection:n,config:t,showSecondLevel:u}))),u&&o().createElement(Ce.X.Provider,{value:b},o().createElement("div",{className:i.secondLevelContent},o().createElement(Bt,{isLoading:m,config:t,loadRelations:d,connections:c,total:f,parentEntityUri:n.entity.entityUri}))))},mt=(0,_.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px",marginLeft:"16px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 0 8px",backgroundColor:"rgba(0,0,0,0.12)"},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),gt=e=>{let{className:t,connections:n=[],config:l,mode:s,noDataText:c,parentEntityUri:u}=e;const p=(0,a.useSelector)(v.ZP.selectors.getMetadata),d=(0,a.useSelector)((e=>v.ZP.selectors.getRelationToAddByViewId(e,l.id))),m=(0,a.useSelector)((e=>v.ZP.selectors.getRelationsToEditByViewId(e,l.id))),f=(0,a.useSelector)(v.ZP.selectors.getEntity),h=(0,a.useSelector)((e=>v.ZP.selectors.getCheckIfCanAddRelations(e,l.content))),y=(0,a.useDispatch)(),x=mt(),E=(0,r.useCallback)((()=>{const e=(0,g.vlo)({config:l,mode:s,metadata:p,parentEntityUri:u});(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y)(e)}),[l,s,p,y,u]),w=(0,r.useCallback)((e=>{y(v.N5.relations.actions.closeRelationEditor(l.id,e)),y(v.N5.relations.actions.removeRelation(l.id,e));const t=n.find((t=>v.N5.relations.selectors.getRelationUriFromConnection(t)===e)),r=v.N5.relations.selectors.getEntityUriFromConnection(t);(0,g.ZiX)(r)&&y(v.N5.modifiedEntities.actions.entityDeleted(r))}),[l,n,y]),C=l.content,S=at(C.inRelations,C.outRelations),P=(0,r.useCallback)((e=>{const t=(0,i.pipe)((0,i.omit)(["suggested"]),(0,i.evolve)({relation:{relationType:(0,i.always)(S.type),object:(0,i.evolve)({type:(0,i.always)(S.type),attributes:(0,i.always)(null)})}}))(e);y(v.N5.relations.actions.addRelation(l.id,t))}),[y,l,S]),O=(0,r.useCallback)((e=>{y(v.N5.relations.actions.ignoreRelation(l.id,{relationType:S.type,relationDirection:S.direction,entityUri:e.entity.entityUri,relationUri:e.relation.relationUri}))}),[y,l,S]),[N,k]=(0,i.partition)(g.xvW,n),Z=f&&h,T=0===N.length&&0===k.length,R=e=>{var t,n;const r=m.find((t=>{var n,r;return(null==t||null===(n=t.relation)||void 0===n?void 0:n.relationUri)===(null==e||null===(r=e.relation)||void 0===r?void 0:r.relationUri)})),a=!l.allowOnlyCreateNew||(0,g.xvW)(e),c=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(dt,{config:l,connection:e,key:c},(t=>r?o().createElement(We.Z,{connection:r,config:l,mode:s,metadata:p}):o().createElement(ot,{renderRelationArrowButton:t,connection:e,metadata:p,showControls:a,onRemoveRelation:w,onEditRelation:(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y),onAcceptRelation:P,onIgnoreRelation:O})))},j=Z&&(!d||d&&d.parentEntityUri===u),D=d&&d.parentEntityUri===u;return o().createElement("div",{className:t},j&&o().createElement(F.Button,{color:"primary",onClick:E,className:x.moreButton},o().createElement(J.Z,{classes:{root:x.icon}}),o().createElement("div",{className:x.buttonLabel},b().text("Add"))),D&&o().createElement(We.Z,{connection:d,config:l,mode:s,metadata:p}),N.map(R),N.length>0&&k.length>0&&o().createElement(F.Divider,{className:x.divider}),k.map(R),T&&o().createElement(F.Typography,{className:x.noData},c))};var ft=n(19603),bt=n(94646),ht=n(78101),yt=n(80931);const vt=(0,_.Z)((e=>({attributesList:{paddingLeft:"46px",paddingRight:"16px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0}})));function xt(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){Et(e,t,n[t])}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wt=e=>{let{connection:t,className:n}=e;const l=vt(),{relation:s}=t,c=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),u=(0,a.useSelector)(v.ZP.selectors.getMetadata),p=(0,r.useMemo)((()=>(0,g.xF8)(u,null==s?void 0:s.relationType)),[null==s?void 0:s.relationType,u]),d=(0,r.useMemo)((()=>xt({attributes:xt({},v.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,g.p2l)((null==t?void 0:t.relation)||{}))),[t]),m=(0,r.useMemo)((()=>(0,g.fyF)(p,d)),[p,d]).filter((e=>{let{values:t}=e;return!(0,g.O27)(t)})).length>0,f=(0,r.useMemo)((()=>(0,g.R$r)(d.attributes)),[d]),{getCommentsCount:h}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{!(0,i.isEmpty)(f)&&h(f)}),[h,f]);const y=(0,r.useMemo)((()=>(0,g.wp9)(g.q7e.RELATION,{entityUri:c,connection:t})),[t,c]);return m?o().createElement(ht.A.Provider,{value:y},o().createElement(yt.Z,{className:L()(l.attributesList,n),entity:d,attrTypes:p})):o().createElement("div",{className:L()(l.attributesList,n)},b().text("No attributes"))};var Ct=n(86602),St=n(82726);const Pt=e=>{let{show:t,onToggle:n,className:r}=e;return o().createElement(Pe.k,{className:r,tooltipTitle:t?b().text("Hide attributes of the relationship"):b().text("Show attributes of the relationship"),tooltipPlacement:"bottom-end",size:"XXS",icon:t?Ct.Z:St.Z,onClick:n})},Ot=(0,_.Z)((e=>({container:{display:"flex",flexDirection:"column",paddingBottom:"2px"},row:{display:"flex",alignItems:"flex-start",flexDirection:"row",minHeight:"16px",padding:"3px 16px 0 "},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px",wordBreak:"break-all"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},showDetails:{marginLeft:"auto"},attributesList:{paddingLeft:"46px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0},suggestedWrapper:{backgroundColor:e.suggested},commentsContainer:{marginLeft:"auto",alignItems:"center","& + $showDetails":{marginLeft:"4px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"},suggestedLabelWrapper:{marginTop:"6px"},labelWrapper:{display:"flex"}}))),Nt=(0,r.memo)((e=>{let{connection:t,renderRelationArrowButton:n,acceptRelation:l,ignoreRelation:s}=e;const c=Ot(),u=t.suggested,{entity:p,relation:d}=t,[m,f]=(0,r.useState)(!1),b=(0,a.useSelector)(v.ZP.selectors.getMetadata),{entityType:h,entityLabel:y,preparedUri:x,relationLabel:E}=Ke(t,b),w=(0,g.Fn9)(d)&&(0,g.Fn9)(p),C=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),S=p&&d&&(0,g.wp9)(g.q7e.RELATION,{entityUri:C,connection:t})||[];return o().createElement("div",{className:L()(c.container,{[c.rowInactive]:!w},{[c.suggestedWrapper]:u})},o().createElement("div",{className:L()(c.row,ft.U)},n&&n(),o().createElement("div",{className:L()(c.labelWrapper,{[c.suggestedLabelWrapper]:u})},o().createElement($e.Z,{className:c.entityAvatar,entityType:h}),o().createElement(_e.Z,{value:x,className:c.entityLabelContainer},o().createElement(Ye,{label:y,entity:p},o().createElement("span",{className:c.entityLabel},y)),E&&o().createElement("span",{className:c.relationLabel},`, ${E}`))),o().createElement("div",{className:c.additionalButtonsWrapper},!(0,i.isEmpty)(S)&&o().createElement(bt.Z,{className:c.commentsContainer,uri:(0,g.gjS)(d),relatedObjectUris:S,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),u&&o().createElement(nt,{size:"small",acceptRelation:l(t),ignoreRelation:s(t)}),!u&&o().createElement(Pt,{show:m,onToggle:()=>{f((e=>!e))},className:c.showDetails}))),m&&o().createElement(wt,{connection:t}))}));var kt=n(52691),Zt=n(16208);const Tt=e=>e.filter((e=>5===e.value)).length,Rt=e=>e.filter((e=>1===e.value)).length,jt=e=>0===e.length?"0%":Tt(e)/e.length*100+"%",Dt=e=>0===e.length?"0%":Rt(e)/e.length*100+"%",It=(0,_.Z)((e=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-end"},averageRating:{marginBottom:"7px",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px",color:e.palette.text.primary},scale:{display:"flex",marginBottom:"6px",width:"128px",height:"4px"},likesScale:{height:"100%",backgroundColor:"#8CC152"},dislikesScale:{height:"100%",backgroundColor:"rgb(255, 112, 112)"},counts:{display:"flex"},likesCount:{marginRight:"32px"},count:{display:"flex",alignItems:"center",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},icon:{marginRight:"4px",width:"14px",height:"14px",color:"rgba(0,0,0,0.38)"}}))),Lt=e=>{let{ratings:t,className:n}=e;const r=It();return o().createElement("div",{className:L()(r.wrapper,n)},o().createElement(F.Typography,{className:r.averageRating},(e=>(0,i.pipe)((0,i.pluck)("value"),i.mean,(0,i.defaultTo)(0))(e))(t).toFixed(1)),o().createElement("div",{className:r.scale},o().createElement("div",{className:r.likesScale,style:{width:jt(t)}}),o().createElement("div",{className:r.dislikesScale,style:{width:Dt(t)}})),o().createElement("div",{className:r.counts},o().createElement("div",{className:L()(r.likesCount,r.count)},o().createElement(kt.Z,{className:r.icon}),Tt(t)),o().createElement("div",{className:r.count},o().createElement(Zt.Z,{className:r.icon}),Rt(t))))},At=(0,_.Z)((e=>({wrapper:{display:"flex"},button:{fontSize:"14px",textTransform:"none",color:e.palette.text.secondary},likeButton:{marginLeft:"-12px",marginRight:"8px"},isActive:{color:e.palette.text.primary}}))),Mt=e=>{let{ratings:t,onAgree:n,onDisagree:r}=e;const l=At(),i=(0,a.useSelector)(v.ZP.selectors.getUserName),s=t.find((e=>{let{user:t}=e;return t===i})),c=[{text:b().text("Has left the practice"),onClick:()=>r(b().text("Has left the practice"))},{text:b().text("Has moved away"),onClick:()=>r(b().text("Has moved away"))},{text:b().text("Has passed away"),onClick:()=>r(b().text("Has passed away"))},{text:b().text("Has retired"),onClick:()=>r(b().text("Has retired"))},{text:b().text("Other"),onClick:()=>r(b().text("Other"))}];return o().createElement("div",{className:l.wrapper},o().createElement(F.Button,{onClick:n,variant:"text",size:"small",className:L()(l.button,l.likeButton,{[l.isActive]:5===(null==s?void 0:s.value)})},"Agree"),o().createElement(Ie.Z,{buttonProps:{endIcon:o().createElement(st.Z,null),variant:"text",size:"small",className:L()(l.button,{[l.isActive]:1===(null==s?void 0:s.value)})},buttonContent:1===(null==s?void 0:s.value)?s.comment:"Disagree",menuItems:c,menuId:"disagree-dropdown-menu-button"}))},Ut=(0,_.Z)((e=>({wrapper:{padding:"6px 16px 3px"},entityTypeIcon:{marginRight:"16px"},entityLabel:{color:e.palette.primary.main,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},entityLabelContainer:{textDecoration:"none",wordBreak:"break-all"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},ratings:{marginLeft:"auto"},showDetailsButton:{marginLeft:"16px",marginTop:"18px"},relationAttributes:{paddingLeft:"60px"},suggestedWrapper:{padding:"6px 16px 3px",backgroundColor:e.suggested},commentsContainer:{marginTop:"21px","& + $ratings":{marginLeft:"16px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"}}))),zt=e=>{let{connection:t,loadRelations:n,renderRelationArrowButton:l,acceptRelation:s,ignoreRelation:c}=e;const u=Ut(),p=t.suggested,[d,m]=(0,r.useState)(!1),{entity:f,relation:b}=t,h=(0,a.useSelector)(v.ZP.selectors.getMetadata),{entityLabel:y,entityType:x,preparedUri:E,relationLabel:w}=Ke(t,h),C=(null==b?void 0:b.ratings)||[],S=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),P=f&&b&&(0,g.wp9)(g.q7e.RELATION,{entityUri:S,connection:t})||[];return o().createElement("div",{className:L()(u.wrapper,{[u.suggestedWrapper]:p})},o().createElement(F.Box,{display:"flex",minHeight:"62px",className:ft.U},o().createElement(F.Box,{display:"flex",alignItems:"flex-start"},o().createElement(F.Box,{display:"flex",alignItems:"center"},l&&l(),o().createElement($e.Z,{entityType:x,className:u.entityTypeIcon})),o().createElement(F.Box,{display:"flex",flexDirection:"column"},o().createElement(_e.Z,{value:E,className:u.entityLabelContainer},o().createElement(Ye,{label:y,entity:f},o().createElement("span",{className:u.entityLabel},y))),w&&o().createElement("span",{className:u.relationLabel},w),!p&&o().createElement(Mt,{ratings:C,onAgree:()=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:"",value:5}).then(n)},onDisagree:e=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:e,value:1}).then(n)}}))),o().createElement("div",{className:u.additionalButtonsWrapper},!(0,i.isEmpty)(P)&&o().createElement(bt.Z,{className:u.commentsContainer,uri:(0,g.gjS)(b),relatedObjectUris:P,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),p&&o().createElement(nt,{acceptRelation:s(t),ignoreRelation:c(t)}),!p&&o().createElement(o().Fragment,null,o().createElement(Lt,{ratings:C,className:u.ratings}),o().createElement(Pt,{show:d,onToggle:()=>{m((e=>!e))},className:u.showDetailsButton})))),d&&o().createElement(wt,{connection:t,className:u.relationAttributes}))},Vt=e=>{let{className:t,connections:n=[],loadRelations:l,config:i,mainEnityUri:s}=e;const{isComplex:c,content:u}=i,{ignoreRelation:p,acceptRelation:d}=((e,t,n)=>{const r=at(e.inRelations,e.outRelations),o=(0,a.useDispatch)();return{ignoreRelation:e=>()=>{const{entity:a}=e;(0,g.iiD)(n,{relatedEntityUri:a.entityUri,relationType:r.type,relationDirection:r.direction}).then(t).catch((e=>{o(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))},acceptRelation:e=>()=>{const{entity:a,relation:l}=e,{startDate:i,endDate:s}=l,c=r.direction===g.Nsj.IN,u=c?a.entityUri:n,p=c?n:a.entityUri;(0,g.DsR)({startEntityUri:u,endEntityUri:p,relationType:r.type,attributes:null,startDate:i,endDate:s}).then(t).catch((e=>{o(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))}}})(u,l,s),m=(0,r.useMemo)((()=>(0,g.w3p)(n)),[n]),{getCommentsCount:f}=(0,r.useContext)(w.h);return(0,r.useEffect)((()=>{f(m)}),[f,m]),o().createElement("div",{className:t},n.map((e=>{var t,n;const r=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(dt,{config:i,connection:e,key:r},(t=>c?o().createElement(zt,{loadRelations:l,connection:e,acceptRelation:d,ignoreRelation:p,renderRelationArrowButton:t}):o().createElement(Nt,{acceptRelation:d,ignoreRelation:p,connection:e,renderRelationArrowButton:t})))})))};Vt.displayName="RelationsList";const Ft=Vt,Ht=(0,_.Z)((e=>({list:{paddingTop:"8px",paddingBottom:"10px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),Bt=e=>{let{isLoading:t,config:n,loadRelations:r,connections:l,total:i,parentEntityUri:s}=e;const c=Ht(),{selectors:u}=v.ZP,p=(0,a.useSelector)(u.getEntity),d=(0,a.useSelector)(u.getMode),m=n["text-empty"]||b().text("No data found");return t?o().createElement(R.Z,null):(0,g.KIu)(d)?o().createElement(gt,{connections:l,className:c.list,key:null==p?void 0:p.uri,config:n,mode:d,noDataText:m,parentEntityUri:s}):i>0?o().createElement(Ft,{config:n,loadRelations:r,connections:l,className:c.list,key:null==p?void 0:p.uri,mainEnityUri:p.uri}):o().createElement(F.Typography,{className:c.noData},m)},Wt=(0,_.Z)({container:{flexGrow:1,display:"flex",flexDirection:"column",minHeight:0},content:{position:"relative",display:"flex",flexGrow:1,flexDirection:"column",minHeight:0},pagination:{height:"52px",flexGrow:0,flexShrink:0}}),qt=e=>{let{config:t,className:n}=e;const l=Wt(),{page:s,setPage:c,rowsPerPage:u,sortOrder:p,sortOption:d,showInactive:m,searchQuery:f,changeSearchQuery:b}=(0,r.useContext)(ke),{selectors:h}=v.ZP,y=(0,a.useSelector)((e=>h.getConnectionsWithDraftsByViewId(e,t.id))),x=(0,a.useSelector)(h.getEntity),E=(0,a.useSelector)((e=>h.getTotalByViewId(e,t.id))),w=(0,a.useSelector)(h.getMode),C=(0,r.useMemo)((()=>({order:p,field:d})),[p,d]);(0,r.useEffect)((()=>{b("")}),[null==x?void 0:x.uri]);const S=(0,r.useMemo)((()=>(e=>{const t=g.wSh.fromFalsy(e).map(g.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome("");return(new g.MEy).addClause(t).build()})(f)),[f]),{isLoading:P,reload:O}=(0,we.a)({sorting:C,filter:S,page:s,rowsPerPage:u,config:t,entity:x,relationActivityFilter:m?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY,mode:w}),N=(0,r.useMemo)((()=>(0,g.Px$)(y)),[y]),k=(0,r.useMemo)((()=>({reloadRelations:O,config:(0,i.pick)(["content","importFromDT","maxDtssImport"],t)})),[O,t]);return o().createElement(Ce.X.Provider,{value:N},o().createElement(z.Z,{className:n},o().createElement("div",{className:l.container},o().createElement(Le.Provider,{value:k},o().createElement(Be,{title:t.caption,total:E})),o().createElement("div",{className:l.content},o().createElement(Bt,{isLoading:P,config:t,loadRelations:O,connections:y,total:E}),E>u&&o().createElement(V.Z,{classes:{root:l.pagination},count:E,rowsPerPageOptions:[],rowsPerPage:u,page:s,onChangePage:c})))))};qt.displayName="RelationsView";const Gt=o().createContext(null);Gt.displayName="SingleAttributeContext";var $t=n(86361),_t=n(26180),Qt=n(31276);function Xt(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){Yt(e,t,n[t])}))}return e}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Kt="CHANGE_SEARCH_QUERY",Jt=Xt({},_t.ZP.actions,{changeSearchQuery:(0,Qt.zD)(Kt)}),en=(e,t)=>t.type===Kt?Xt({},e,{searchQuery:t.payload,page:0}):_t.ZP.reducer(e,t);var tn=n(92332),nn=n(67353);const rn={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},on=(0,_.Z)((()=>({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}},headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},"row-cell--removed":{pointerEvents:"none","& > div":rn}}))),an=(0,nn.Z)((e=>{const t=on();return o().createElement("div",{className:t.headCell},o().createElement(tn.default,e))}));var ln=n(64091);function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cn=(0,i.pipe)((0,i.map)((e=>({id:(0,g.Tde)(e.uri),label:e.label,dataTypeDefinition:(0,g.PFL)(e)}))),(0,i.uniqBy)((0,i.prop)("id"))),un=(0,i.pipe)(g.DK$,cn),pn=(0,i.pipe)((0,i.split)("."),(0,i.slice)(2,1/0)),dn=e=>{if((0,g.vZp)(e)){const t=pn(e);return t.length>1?t.slice(0,-1):null}return null},mn=(0,i.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sn(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:dn(e.id),headCellRenderer:an,rowCellValueRenderer:ln.Z})));var gn=n(99341);function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bn=n(52016),hn=n(1876),yn=n(60894);const vn=(0,_.Z)((()=>({header:{padding:"0 4px 0 16px"}}))),xn=e=>{let{title:t,searchQuery:n,onChangeSearchQuery:r,filtersEnabled:a,onToggleFilters:l,columnsData:i,selectedColumns:s,onChangeColumns:c}=e;const u=vn();return o().createElement(H.Z,{title:t,className:u.header},o().createElement(G.i,{query:n,onChange:r}),o().createElement(hn.Z,{enabled:a,onClick:l}),o().createElement(W.Z,{height:24,margin:4}),o().createElement(yn.Z,{columnsData:i,selectedColumns:s,onChangeColumns:c}))};function En(){return En=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},En.apply(this,arguments)}const wn=(0,n(32528).Z)(((e,t)=>{let{deletedUris:n}=e,{rowValue:{value:r}}=t;return{isRemoved:Boolean(n.find((e=>r.uri===e)))}}))((e=>{let{cell:t,CellValueRenderer:n,isRemoved:r,isSorted:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["cell","CellValueRenderer","isRemoved","isSorted"]);const i=on();return o().createElement("div",{className:L()({[i["row-cell--sorted"]]:a,[i["row-cell--removed"]]:r},i.rowCell)},t.values.map(((e,t)=>o().createElement(n,En({key:t,value:e},l)))))}));var Cn=n(85709);const Sn=e=>{let{onEdit:t,onRemove:n}=e;return o().createElement(o().Fragment,null,t&&o().createElement(Pe.k,{tooltipTitle:b().text("Edit"),icon:qe.Z,size:"L",onClick:t}),n&&o().createElement(Pe.k,{tooltipTitle:b().text("Remove"),icon:Ge.Z,size:"L",onClick:n}))};function Pn(){return Pn=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},Pn.apply(this,arguments)}const On=e=>{let{columnsData:t,values:n,sorting:l,onSort:s,filters:c,onFilter:u,config:p,onEdit:d,onDeleteAttribute:m,deletedUris:f}=e;const b=(0,r.useMemo)((()=>((e,t)=>e.map((e=>(0,i.pipe)((0,i.reduce)(((t,n)=>{let{id:r}=n;return(0,i.assoc)(r,((e,t)=>((e,t)=>(0,i.pipe)((0,i.path)(["value"]),(0,g.tT_)(e))(t))(pn(e),t))(r,e),t)}),{}),(0,i.assoc)("value",e))(t))))(n,t)),[n,t]),h=(0,r.useMemo)((()=>mn(t)),[t]),y=on(),x=(0,a.useSelector)(v.ZP.selectors.getMode),E=(0,g.KIu)(x),w=(0,a.useSelector)(v.ZP.selectors.getMetadata),C=(0,a.useSelector)(v.ZP.selectors.getEntityUri),S=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,C)||{})),{attributeType:P}=(0,r.useContext)(Gt),O=(0,r.useCallback)((e=>o().createElement(wn,Pn({},e,{isSorted:!!l&&l.field===e.columnData.id}))),[l]),[N,k]=(0,r.useState)(null),{canUpdate:Z,canDelete:T}=(0,bn.l)(),R=(0,r.useMemo)((()=>"number"!=typeof N||!E||f.includes((0,i.pipe)((0,i.path)([N]),(0,i.prop)("uri"))(n))),[N,f,n,E]),j="number"==typeof N&&(D=(0,i.path)([N],n),T(p)&&(0,g.xv5)({attributeType:P,mode:x,attributeValue:D,metadata:w,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,D)}));var D;const I="number"==typeof N&&(e=>Z(p)&&(0,g.yv0)({attributeType:P,mode:x,attributeValue:e,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,e)}))((0,i.path)([N],n)),L=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);I&&d(e)}),[d,N,n,I]),A=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);if(!j)return;const t={parentUri:C,attributeType:P,uri:e.uri,value:e};m(t),k(null)}),[N,n,m,j,P,C]),M=R||!j&&!I?void 0:o().createElement(Sn,{onEdit:I?L:void 0,onRemove:j?A:void 0}),U=(0,r.useMemo)((()=>({deletedUris:f})),[f]);return o().createElement("div",{className:y.tableContainer},o().createElement(Cn.Z,{columnsData:h,rowsData:b,sorting:l,onSort:s,filters:c,onFilter:u,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:O,onRowHover:k,hoverRowIndex:N,hoveredRowRightContent:M,context:U,classes:{hoveredRowRightContentWrapper:y["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:y["row-cell__buttons-container"]}}))},Nn=(0,_.Z)((()=>({actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}})));function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Zn=e=>{let{onChangeAttribute:t,onCancel:n,onApply:l,onDeleteAttribute:s,hasChanges:c,attributeValue:u}=e;const d=Nn(),m=(0,a.useSelector)(v.ZP.selectors.getEntityUri),{attributeType:f}=(0,r.useContext)(Gt),h=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,m)||{})),y=(0,a.useSelector)(v.ZP.selectors.getMode),x=(0,a.useDispatch)(),E=(0,r.useContext)(p.m),w=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,x)(e.map((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kn(e,t,n[t])}))}return e}({},e,{viewId:E}))))),[E,x]),C=(0,g.ZiX)(m),S=(0,a.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,m,f))),P=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,x),[x]);return o().createElement(o().Fragment,null,o().createElement(ne.Z,{attributeValue:u,showEmptyEditors:C,onDeleteAttribute:s,onDeactivateError:P,onChangeAttribute:t,onAddAttributes:w,mode:y,crosswalks:h.crosswalks,errors:S,attributeType:f,ownError:(0,g.ADq)(u,null,f.uri,S)}),o().createElement("div",{className:d.actionButtons},o().createElement(F.Button,{onClick:()=>{n(u)}},b().text("Cancel")),o().createElement(F.Button,{color:"primary",disabled:!c,onClick:()=>{l(u)}},b().text("Apply"))))},Tn=(0,_.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",flex:1,overflow:"auto"},noData:{fontSize:"13px",paddingLeft:"20px",color:"rgba(0,0,0,0.54)"},tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},header:{padding:"0 4px 0 16px"},addButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{padding:"4px 16px"}})));function 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){jn(e,t,n[t])}))}return e}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dn=[],In=e=>{let{config:t,className:n}=e;const{caption:l,max:s}=t,c=Tn(),{values:u,page:d,setPage:m,isLoading:f,searchQuery:h,setSearchQuery:y,visibleColumns:x,onFilter:E,onSort:w,onToggleFilters:C,onChangeColumns:S,filters:P,sorting:O,totalVisibleValues:N,hasPaging:k,attributeType:Z,showTable:T}=(0,r.useContext)(Gt),j=(0,r.useMemo)((()=>un(Z)),[Z]),{checkHasChanges:D,onChangeAttribute:I,onDeleteAttribute:A,onAdd:M,onCancel:U,onApply:B,onStartEditing:W,modifiedValues:q,editingValues:G,deletedUris:$}=(()=>{const[e,t]=(0,r.useState)(),[n,o]=(0,r.useState)([]),l=(0,a.useSelector)(v.ZP.selectors.getMode);(0,r.useEffect)((()=>{o([]),t(null)}),[l]);const s=(0,a.useDispatch)(),c=(0,r.useContext)(p.m),{attributeType:u,values:d}=(0,r.useContext)(Gt),m=(0,a.useSelector)(v.ZP.selectors.getEntityUri),f=(0,a.useSelector)(v.ZP.selectors.getMetadata),b=(0,r.useCallback)((e=>{(0,i.pipe)(v.N5.actions.modifyAttribute,s)(Rn({},e,{viewId:c}))}),[c,s]),h=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(Rn({},e,{viewId:c}))),[c,s]),y=(0,r.useCallback)((()=>{const e=(0,g.gjI)({parentUri:m,attributeType:u});t(e.uri),b(Rn({},e,{value:(0,g.GPx)({attributeTypes:u.attributes,parentUri:e.uri,mode:l,metadata:f}),attributeType:u}))}),[m,u]),x=(0,r.useCallback)((e=>{o((t=>t.find((0,i.propEq)("uri",e.uri))?t:[...t,e]))}),[o]),E=(0,r.useCallback)((e=>{const r=n.find((0,i.propEq)("uri",e.uri));if(r){const t=Rn({},e,{value:r,attributeType:u,uri:e.uri});o((e=>(0,i.without)([r],e))),b(t)}else{const n={value:e,attributeType:u,uri:e.uri};t(null),h(n)}}),[h,b,o,n]),w=(0,r.useCallback)((e=>{t(null),o((t=>{const n=t.find((0,i.propEq)("uri",e.uri));return n?(0,i.without)([n],t):t}))}),[o,t]),C=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,m)||{})),S=(0,g.KIu)(l),P=(0,g.xy8)(u),O=(0,i.pathOr)(Dn,[P,null==u?void 0:u.name],C),N=(0,r.useMemo)((()=>[...O.filter((0,i.pipe)((0,i.prop)("uri"),(0,i.both)(g.ZiX,(0,i.pipe)((0,i.equals)(e),i.not)))),...(0,i.map)((e=>O.find((0,i.propEq)("uri",e.uri))||e))(d)].map((e=>{var t;return null!==(t=n.find((0,i.propEq)("uri",e.uri)))&&void 0!==t?t:e}))),[O,n,e,d]),k=(0,r.useMemo)((()=>S?(0,i.pipe)((0,i.map)((0,i.prop)("uri")),(0,i.filter)((e=>!O.find((0,i.propEq)("uri",e)))))(d):[]),[O,d]),Z=O.filter((t=>{let{uri:r}=t;return r===e||n.find((0,i.propEq)("uri",r))}));return{checkHasChanges:e=>n.find((0,i.propEq)("uri",e.uri))!==e,onChangeAttribute:b,onDeleteAttribute:h,onAdd:y,onCancel:E,onApply:w,onStartEditing:x,modifiedValues:N,editingValues:Z,deletedUris:k}})(),_=(0,a.useSelector)(v.ZP.selectors.getMode),Q=(0,g.KIu)(_),X=Q?q:u,{canCreate:Y}=(0,bn.l)(),K=Y(t)&&Z&&(0,g.Vg3)({attributeType:Z,mode:_})&&!G.length,ee=(0,r.useMemo)((()=>x.map((e=>j.find((0,i.propEq)("id",e))))),[x,j]);return o().createElement(z.Z,{className:L()(c.root,n)},T?o().createElement(o().Fragment,null,o().createElement(xn,{title:l,total:N,columnsData:j,selectedColumns:x,onChangeColumns:S,searchQuery:h,onChangeSearchQuery:y,filtersEnabled:!!P,onToggleFilters:C}),o().createElement("div",{style:{position:"relative"}},Q&&o().createElement("div",{className:c.editor},K&&o().createElement(F.Button,{color:"primary",onClick:M,className:c.addButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),G.map((e=>o().createElement(Zn,{key:e.uri,attributeValue:e,onChangeAttribute:I,onDeleteAttribute:A,onCancel:U,onApply:B,hasChanges:D(e)})))),o().createElement(On,{columnsData:ee,config:t,values:X,filters:P,onFilter:E,sorting:O,onSort:w,onEdit:W,onDeleteAttribute:A,deletedUris:$}),k&&o().createElement(V.Z,{count:N,rowsPerPageOptions:[],rowsPerPage:s,page:d,onChangePage:m}),f&&o().createElement(R.Z,null))):o().createElement(o().Fragment,null,o().createElement(H.Z,{title:l,className:c.header}),o().createElement(F.Typography,{className:c.noData},b().text("No data"))))};var Ln=n(58600);let An=0;const Mn=()=>An++,Un=e=>{const t={children:[],nodeId:Mn()};if(e.parentPaths)for(let n=0;n<e.parentPaths.length;n++){const r=e.parentPaths[n];let o=t;for(let t=r.length-1;t>=0;t--){const a=r[t],l=e.entities[a.entityUri],i=t===r.length-1,s={entity:l,children:[],nodeId:Mn(),expanded:!0,rootIndex:i?n+1:void 0};i&&(s.root=i),o.children.push(s),o=s}}return t.children},zn=(0,_.Z)((e=>({container:{fontSize:"13px",display:"flex",paddingTop:"6px",position:"relative"},title:{flexGrow:1,minHeight:"15px",color:e.palette.secondary.main,lineHeight:"15px"},link:{cursor:"pointer",color:e.palette.secondary.main,lineHeight:"15px"},selected:{fontWeight:"bold"},wrapper:{width:"100%"},avatar:{height:"16px",width:"16px",marginRight:"8px",marginLeft:"8px"},header:{padding:"0 4px 0 16px"},treeContainer:{flexGrow:1,display:"flex",flexDirection:"column",height:"100%",minHeight:"372px",maxHeight:"507px",overflow:"auto"},tree:{flexGrow:1,height:0},buttonsContainer:{flexShrink:0,marginLeft:"auto","& > * + *":{marginLeft:"-4px"}},button:{padding:"8px"}})));var Vn=n(1242);const Fn=o().createContext(null);var Hn=n(55400);const Bn=e=>{e.target.src=Vn},Wn=e=>{let{node:t}=e;const n=zn(),l=(0,a.useDispatch)(),i=t.entity.uri,s=(0,a.useSelector)(v.ZP.selectors.getAbsoluteImagePath),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,r.useContext)(Fn),p=(0,a.useSelector)(v.ZP.selectors.getUIPath),{uri:d}=(0,a.useSelector)(v.ZP.selectors.getEntity),m=(0,g.ChB)({uiPath:p,uri:i}),f=i===d,b=(0,r.useCallback)((()=>{l(v.ui.actions.openEntity({uri:i,viewId:u.id}))}),[l,u,i]),{entity:{label:h},nodeId:y}=t,x=(0,g.nt9)(c,t.entity.type)||{},E=(0,g.VD3)(c,x,"typeGraphIcon"),w=E&&(0,g.vPL)(s,E);return o().createElement("div",{className:n.wrapper,"data-node-id":y},o().createElement("div",{className:n.container},o().createElement(F.Avatar,{className:L()(n.avatar),src:w||Vn,onError:Bn}),o().createElement("span",{className:L()(n.link,{[n.selected]:f})},o().createElement(Hn.Z,{to:m,onClick:b},h))))},qn=((0,r.memo)(Wn),e=>{let{node:t}=e;return t.nodeId}),Gn=(0,_.Z)((()=>({lineBlock:{height:"100%",position:"relative",display:"inline-block"},lineChildren:{height:"100%",position:"absolute",display:"inline-block"},rootIndex:{display:"flex",alignItems:"center",color:"rgba(0,0,0,0.54)",height:"100%"},verticalLine:{width:"1px",left:"50%",top:0,height:"50%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},horizontalLineRight:{height:"1px",top:"14px",left:"50%",width:"24%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},node:{minWidth:"100%",position:"relative",textAlign:"left",padding:"0 24px 0 18px",boxSizing:"border-box",whiteSpace:"normal","&:hover":{backgroundColor:"rgba(0,0,0,0.06)"}},nodeContent:{position:"absolute",top:0,bottom:0,paddingLeft:"18px",boxSizing:"border-box"},row:{display:"flex"},rowContents:{position:"relative",borderLeft:"none",paddingLeft:"4px",flex:"1 1 auto",width:0,display:"flex",verticalAlign:"middle",boxSizing:"border-box"},buttonWrapper:{display:"flex",paddingTop:"13px",width:"12px",cursor:"pointer"},collapsedButton:{transform:"rotate(-90deg)"},expandedButton:{transform:"rotate(0deg)"},button:{transition:"transform .15s ease",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid rgba(0, 0, 0, 0.54)"},rowTitle:{flex:"1 1 auto",width:0,paddingRight:"11px"}})));function $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 _n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qn(){return Qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qn.apply(this,arguments)}const Xn={nodeContentRenderer:e=>{const t=(0,i.omit)(["connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","draggedNode","isSearchMatch","isSearchFocus","buttons","didDrop","children","treeId","isOver","parentNode","rowDirection"],e),{scaffoldBlockPxWidth:n,toggleChildrenVisibility:r,node:a,title:l,path:s,treeIndex:c,style:u}=t,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","node","title","path","treeIndex","style"]),d=l,m=r&&!a.root&&a.children&&a.children.length>0,g=Gn();return o().createElement("div",Qn({style:{height:"100%"}},p,{key:a.nodeId}),m&&a.expanded&&o().createElement("div",{style:{width:n-2},className:g.lineChildren}),o().createElement("div",{className:g.row,style:u},o().createElement("div",{className:g.rowContents},m&&o().createElement("div",{className:g.buttonWrapper,onClick:()=>{r({node:a,path:s,treeIndex:c})}},o().createElement("div",{"aria-label":a.expanded?"Collapse":"Expand",className:L()(g.button,a.expanded?g.expandedButton:g.collapsedButton)})),o().createElement("div",{className:g.rowTitle},"function"==typeof d?d({node:a,path:s,treeIndex:c}):d))))},treeNodeRenderer:e=>{const t=(0,i.omit)(["listIndex","swapFrom","swapLength","swapDepth","draggedNode","getPrevRow","connectDropTarget","isOver","canDrop","treeIndex","treeId","path","rowDirection"],e),{children:n,scaffoldBlockPxWidth:r,lowerSiblingCounts:a,node:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["children","scaffoldBlockPxWidth","lowerSiblingCounts","node"]),c=Gn(),u=a.length,p=[];a.forEach(((e,t)=>{p.push(o().createElement("div",{key:`pre_${1+t}`,style:{width:r},className:c.lineBlock},l.root&&o().createElement("div",{className:c.rootIndex},l.rootIndex,"."),t===u-1&&0!==t&&o().createElement(o().Fragment,null,o().createElement("div",{className:c.verticalLine}),o().createElement("div",{className:c.horizontalLineRight}))))}));const d=l.root?r-4:0,m=r*u-d,g={left:m,width:`calc(100% - ${m}px`},f=`${m+250}px`,b=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_n(e,t,n[t])}))}return e}({},s.style,{width:f});return o().createElement("div",$n({},s,{className:c.node,style:b}),p,o().createElement("div",{className:c.nodeContent,style:g},n))},scaffoldBlockPxWidth:16,rowHeight:28,slideRegionSize:50};function Yn(){return Yn=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},Yn.apply(this,arguments)}const Kn=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Yn({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".54"},o().createElement("path",{d:"M14.5 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm4 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm-17 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM4 4a2 2 0 110-4 2 2 0 010 4zm1 16a2 2 0 110-4 2 2 0 010 4zm4.5-6a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-2a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm6 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",fill:"#000"})))},Jn=e=>{let{title:t,onGraphOpen:n}=e;const r=zn();return o().createElement(H.Z,{title:t,className:r.header},o().createElement("div",{className:r.buttonsContainer},o().createElement(Pe.k,{className:r.button,tooltipTitle:b().text("Show Graph"),icon:Kn,onClick:n,size:"L"})))};var er=n(33165),tr=n(59601);const nr=(0,_.Z)((()=>({root:{position:"relative"},bodyWrapper:{paddingTop:"21px"}})));function rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){or(e,t,n[t])}))}return e}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ar=n(14940);const lr=(0,_.Z)({resizableHandleContainer:{position:"relative",width:"100%",height:"inherit"},resizableHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"24px",zIndex:11,"&:hover $resizableHandle":{visibility:"visible"},".react-grid-item.static &:hover $resizableHandle":{visibility:"hidden"}},resizableHandle:{position:"absolute",width:"100%",display:"flex",justifyContent:"center",top:"-3px",zIndex:11,cursor:"move",visibility:"hidden"},dragIcon:{transform:"translateX(-50%) rotate(90deg)",color:"rgba(0, 0, 0, 0.3)"}}),ir=e=>{const t=t=>{const n=lr();return o().createElement("div",{className:n.resizableHandleContainer},o().createElement("div",{className:n.resizableHandleVisibilityArea},o().createElement("div",{className:L()("viewDraggableHandle",n.resizableHandle)},o().createElement(ar.Z,{className:n.dragIcon}))),o().createElement(e,t))};return t.displayName="WithResizableHandle",t},sr=(0,_.Z)({stubView:{padding:"20px"},fullHeight:{height:"100%"},component:{boxSizing:"border-box",overflow:"auto",boxShadow:"none",borderRadius:"unset"}});var cr=n(29103),ur=n(83911),pr=n(79485),dr=n(22385);const mr=(0,i.pipe)((0,i.path)(["point","lat"]),(0,i.both)((0,i.gt)(90),(0,i.lt)(-90))),gr=(0,_.Z)((()=>({root:{height:"100%",display:"flex",flexDirection:"column"},fullHeight:{height:"100%"},fullscreenBtn:{position:"absolute",right:"5px",top:"5px",zIndex:100}})));var fr=n(13074),br=n(24338);const hr=(0,_.Z)((e=>({caption:{color:e.palette.text.secondary,fontSize:"13px"}}))),yr=hr,vr=e=>{let{totalImages:t}=e;const n=yr(),r=t>1?b().text("photos"):b().text("photo");return o().createElement(F.Typography,{variant:"caption",className:n.caption},`${t} ${r}`)};function xr(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){Er(e,t,n[t])}))}return e}function Er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wr=e=>{let{config:t,attributeType:n,paging:r,requestNextPageOfAttributeValues:l}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getEntity),u=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,c.uri)||{})),p=(0,i.pathOr)([],["attributes",n.name],u),d=t.id;return o().createElement(o().Fragment,null,o().createElement(br.Z,{attributeValues:p,attributeType:n,onDeleteAttribute:e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(xr({},e,{viewId:d})),parentUri:u.uri,onChangeAttribute:e=>(0,i.pipe)(v.N5.actions.modifyAttribute,s)(xr({},e,{viewId:d})),imageSize:Pr,paging:r,requestNextPageOfAttributeValues:l}),o().createElement(vr,{totalImages:p.length}))},Cr=(0,_.Z)((e=>({container:{padding:"8px 16px"},noData:{fontSize:"13px",color:e.palette.text.secondary}}))),Sr=Cr,Pr={imageMargin:4,imageWidth:162,imageHeight:162};var Or=n(28741);const Nr=(0,_.Z)((e=>({root:{display:"flex",flexDirection:"column"},matchesContainer:{position:"relative"},footer:{display:"flex",alignItems:"end",flexGrow:1,justifyContent:"flex-start",borderTop:"1px solid rgba(0,0,0, 0.12)",padding:"8px 16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},noData:{paddingLeft:"16px",paddingBottom:"16px",fontSize:"13px",color:"rgba(0,0,0,0.54)"}})));var kr=n(49734),Zr=n(98808),Tr=n(93428),Rr=n(30885);function jr(){return jr=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},jr.apply(this,arguments)}const Dr=e=>{let{config:t,match:n,onStartRequest:l,onFinishRequest:i}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,a.useSelector)(v.ZP.selectors.getEntity),{canMerge:d,canMark:m}=(0,g.hXd)(c,t,n.object,u,n.matchRules),f=(0,r.useMemo)((()=>[n.object]),[n.object]),b={entity:u,entities:f,mode:Zr.N.iconButton,onStartRequest:l},h=(0,r.useContext)(p.m),y=(0,r.useCallback)((()=>{i(),s(v.N5.entity.actions.loadEntity({viewId:h,uri:u.uri}))}),[s,u.uri,i,h]);return o().createElement(o().Fragment,null,d&&o().createElement(Tr.H,jr({},b,{onFinishRequest:y})),m&&o().createElement(Rr.i,jr({},b,{onFinishRequest:i})))},Ir=e=>{let{config:t,entitiesMap:n,match:r,onFinishRequest:l,onStartRequest:i}=e;const s=(0,a.useSelector)(v.ZP.selectors.getMetadata),c=(0,a.useSelector)(v.ZP.selectors.getEntity);return o().createElement(kr.M,{match:r,entity:c,entitiesMap:n,metadata:s,className:ft.U},o().createElement(bt.Z,{uri:(0,g.E_P)(c.uri,r.object.uri),relatedObjectUris:(0,g.wp9)(g.q7e.POTENTIAL_MATCH,{entityUri:c.uri,matchEntityUri:r.object.uri}),objectType:g.q7e.POTENTIAL_MATCH}),o().createElement(Dr,{match:r,config:t,onStartRequest:i,onFinishRequest:l}))},Lr={showTransitiveMatches:!0,showInactiveEntities:!1},Ar={order:"asc",field:"score"};var Mr;!function(e){e[e.Loading=0]="Loading",e[e.NoData=1]="NoData",e[e.Loaded=2]="Loaded"}(Mr||(Mr={}));const Ur=ir((e=>{let{className:t}=e;const n=sr();return o().createElement(z.Z,{className:L()(n.stubView,"viewDraggableHandle",t)},"NOT IMPLEMENTED")})),zr=ir((e=>{let{className:t,config:n}=e;return o().createElement(A.Z,{className:t,caption:n.caption,excludeUris:n.excludeUris,includeUris:n.includeUris,attributesCount:n.attributesCount,pinnedAttributes:n.pinnedAttributes})})),Vr=ir((e=>{let{className:t,config:n}=e;const a=(e=>{const[t,n]=(0,r.useState)(""),[o,a]=(0,r.useState)(0),[l,i]=(0,r.useState)(!1),s=(0,r.useMemo)((()=>({page:o,searchQuery:t,showInactive:l})),[o,t,l]),c=xe(e,s,!0),u=(0,r.useCallback)((()=>{a(0),i((e=>!e))}),[]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ee(e,t,n[t])}))}return e}({setSearchQuery:n,searchQuery:t,setPage:a,page:o,toggleShowInactive:u,showInactive:l},c)})(n);return o().createElement(M.Provider,{value:a},o().createElement(be,{config:n,className:t}))})),Fr=ir((e=>{let{config:t,className:n}=e;const l=(e=>{var t;const{attributeUri:n}=e,o=(0,a.useSelector)(v.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,g.zeJ)(o,n)),[o,n]),s=(0,r.useMemo)((()=>un(l)),[l]),c=(0,r.useMemo)((()=>({searchQuery:"",filters:null,sorting:void 0,visibleColumns:s.filter((0,i.pipe)((0,i.prop)("dataTypeDefinition"),g.YkM,i.not)).map((e=>{let{id:t}=e;return t})).slice(0,5),page:0})),[s]),[u,p]=(0,r.useReducer)(en,c),{searchQuery:d,filters:m,sorting:f,page:b}=u,h=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),y=(0,r.useMemo)((()=>{const e=((e,t)=>g.wSh.fromNull(t).map((t=>Object.entries(t).map((t=>{let[n,r]=t;const o=e.find((0,i.propEq)("id",n));return(0,gn.su)(o,r)})))).orSome([]))(s,m);return e.length?e:null}),[m,s]),x=(0,r.useMemo)((()=>(0,i.reject)(i.isNil,{filters:y,page:b,sorting:f,searchQuery:d})),[y,b,f,d]),{changeSearchQuery:E,changePage:w,toggleSort:C,changeFilter:S,toggleFilters:P,changeColumns:O}=(0,$t.o)({actions:Jt,dispatch:p}),N=xe(e,x,!1);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fn(e,t,n[t])}))}return e}({},u,{setSearchQuery:E,setPage:w,onSort:C,onFilter:S,onToggleFilters:P,onChangeColumns:O,showTable:Boolean(((null==N||null===(t=N.values)||void 0===t?void 0:t.length)||y||d||h)&&l&&!l.hidden)},N)})(t);return o().createElement(Gt.Provider,{value:l},t&&o().createElement(In,{config:t,className:n}))})),Hr=ir((e=>{let{config:t,className:n}=e;const a=(e=>{var t;const n=(0,r.useMemo)((()=>Object.entries(e.sortOptions||{}).map((e=>{let[t,n]=e;return{value:t,label:n}}))),[e.sortOptions]),o=e.max||15,[a,l]=(0,r.useState)(0),[i,s]=(0,r.useState)(e.sortOrder||"asc"),[c,u]=(0,r.useState)(null===(t=n[0])||void 0===t?void 0:t.value),[p,d]=(0,r.useState)(""),[m,g]=(0,r.useState)(!1),f=(0,r.useCallback)((()=>{l(0),g((e=>!e))}),[]),b=(0,r.useCallback)((()=>{l(0),s((e=>"asc"===e?"desc":"asc"))}),[]),h=(0,r.useCallback)((e=>{l(0),u(e)}),[]);return{searchQuery:p,changeSearchQuery:(0,r.useCallback)((e=>{l(0),d(e)}),[]),sortOrder:i,toggleSortOrder:b,sortOption:c,changeSortOption:h,sortOptions:n,page:a,setPage:l,rowsPerPage:o,showInactive:m,toggleShowInactive:f}})(t);return o().createElement(ke.Provider,{value:a},o().createElement(qt,{config:t,className:n}))})),Br=ir((e=>{let{config:t,className:n}=e;const a=(0,r.useRef)(),[l,s]=(0,r.useState)(null),{height:c,width:u,tooltip:p}=t,{html:d,visible:m,tooltip:g,customStyles:f,onClosePopup:b,message:h}=(0,er.E)(t),y=nr(),v=g||p;if((0,r.useEffect)((()=>{a.current&&d&&(a.current.innerHTML="",d.childNodes.forEach((e=>{a.current.appendChild(e)})),s(a.current))}),[d]),!m)return null;const x=(0,i.reject)(i.isNil,{width:u,height:c}),E=o().createElement("div",{ref:a,style:rr({},x,f),className:L()(y.root,n)});return o().createElement("div",{className:y.bodyWrapper},v?o().createElement(F.Tooltip,{title:v},E):E,o().createElement(tr.Z,{placement:"bottom",anchorEl:l,open:!!h,onClose:b},h))})),Wr=ir((e=>{let{config:t,className:n}=e;const l=(0,a.useSelector)(v.ZP.selectors.getEntityUri),{treeData:i,setTreeData:s}=((e,t)=>{const n=(0,he._)(),[o,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>((0,g.ZiX)(e)||n((0,g.RFJ)({uri:e,graphUri:t})).then(Un).then(a).catch((e=>{console.warn(e)})),()=>{a([])})),[e,t,n]),{treeData:o,setTreeData:a}})(l,t.graph.type),c=zn(),u=(0,a.useDispatch)(),{id:p,graph:d}=t,m=(0,r.useCallback)((()=>{u(v.ui.actions.openGraph({viewId:p,graphType:d.type}))}),[u,p,d]),f=(0,r.useCallback)((e=>({title:o().createElement(Wn,{node:e.node})})),[]);return o().createElement(z.Z,{className:n},o().createElement(Jn,{onGraphOpen:m,title:t.caption}),o().createElement(Fn.Provider,{value:t},o().createElement("div",{className:c.treeContainer},o().createElement("div",{className:c.tree},o().createElement(Ln.ZP,{isVirtualized:!1,treeData:i,canDrag:!1,theme:Xn,generateNodeProps:f,onChange:s,getNodeKey:qn})))))})),qr=ir((e=>{let{config:t,className:n}=e;const l=Nr(),s=(0,a.useSelector)(v.ZP.selectors.getEntity),c=(0,g.wwR)(s),[u,d]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>{d(!0)}),[]),f=(0,r.useCallback)((()=>{d(!1)}),[]),{matches:h,entitiesMap:y,loadMatches:x,total:E}=(0,Or.s)({enabled:!!c,entity:s,options:Lr,filter:"",page:0,sorting:Ar,rowsPerPage:3,onStartLoading:m,onFinishLoading:f}),C=(0,r.useCallback)((()=>{x()}),[x]),S=(0,a.useDispatch)(),P=(0,r.useContext)(p.m),O=(0,r.useCallback)((()=>{S(v.ui.actions.openPerspective({perspectiveId:"potentialMatches",viewId:P}))}),[S,P]),N=(0,r.useMemo)((()=>(0,g.NVY)(c,(0,i.map)(g.ev7,h))),[c,h]),{getCommentsCount:k}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{k(N)}),[k,N]);const Z=E>3&&!(0,i.isEmpty)(h),T=u?Mr.Loading:(0,i.isEmpty)(h)?Mr.NoData:Mr.Loaded;return o().createElement(Ce.X.Provider,{value:y},o().createElement(z.Z,{className:L()(l.root,n)},o().createElement(H.Z,{title:t.caption}),o().createElement("div",{className:l.matchesContainer},T===Mr.Loading&&o().createElement(R.Z,null),T===Mr.NoData&&o().createElement(F.Typography,{className:l.noData},b().text("No matches found")),T===Mr.Loaded&&h.map((e=>o().createElement(Ir,{config:t,entitiesMap:y,match:e,onFinishRequest:C,onStartRequest:m,key:e.object.uri})))),Z&&o().createElement(o().Fragment,null,o().createElement("div",{className:l.footer},o().createElement(F.Link,{component:"button",variant:"caption",onClick:O,underline:"none"},b().text("See all"))))))})),Gr=(0,r.lazy)((()=>n.e(6596).then(n.bind(n,46596)).then((e=>({default:ir(e.HierarchyTreeView)}))))),$r=(0,r.lazy)((()=>n.e(4361).then(n.bind(n,14361)).then((e=>({default:ir(e.RelationshipsTableView)}))))),_r=ir((e=>{let{config:t,isFullscreen:n,onToggleFullscreen:l,className:i}=e;const s=gr(),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,a.useSelector)(v.ZP.selectors.getEntity),p=(0,a.useSelector)(v.ZP.selectors.getGoogleMapKey),{markers:d,loading:m}=((e,t,n)=>{const[o,a]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0),s=(0,he._)();return(0,r.useEffect)((()=>{i(!0),s((0,g.DBr)(t,[e],n)).then((e=>{a(e.filter(mr))})).catch((()=>{a([])})).finally((()=>{i(!1)}))}),[e,t,n,s]),{markers:o,loading:l}})(u,c,p),f=(0,r.useMemo)((()=>o().createElement("div",{className:s.fullHeight},o().createElement(R.Z,null))),[s]),b=(0,r.useMemo)((()=>({lat:0,lng:0})),[]);return p&&o().createElement(z.Z,{className:L()(s.root,i)},m&&o().createElement(R.Z,null),o().createElement(dr.Z,{size:"S",icon:n?ur.Z:cr.Z,onClick:()=>l(t.id),className:s.fullscreenBtn}),o().createElement(pr.Z,{loadingElement:f,defaultZoom:1,defaultCenter:b,markers:d,mapContainerClassName:s.fullHeight,mapKey:p}))})),Qr=ir((e=>{let{config:t,className:n}=e;const{attributeUri:l}=t,s=Sr(),c=(0,a.useDispatch)(),u=(0,a.useSelector)(v.ZP.selectors.getMode),p=(0,a.useSelector)(v.ZP.selectors.getEntityWithDiff),d=(0,a.useSelector)(v.ZP.selectors.getMetadata),m=(0,g.zeJ)(d,l),f=(0,i.pathOr)([],["attributes",null==m?void 0:m.name],p),h=(0,i.path)(["attributes","paging",l],p),y=f.length,x=t["text-empty"]||b().text("No data found"),E=(0,r.useCallback)((e=>c(v.N5.actions.requestNextPageOfAttributeValues(e))),[c]);return o().createElement(z.Z,{className:n},o().createElement(H.Z,{title:t.caption}),o().createElement("div",{className:s.container},(()=>{if(m){if((0,g.KIu)(u)){const e={attributeType:m,config:t,paging:h,requestNextPageOfAttributeValues:E};return o().createElement(wr,e)}if(y>0){const e={attributeValues:f,attributeType:m,imageSize:Pr,paging:h,parentUri:p.uri,requestNextPageOfAttributeValues:E};return o().createElement(o().Fragment,null,o().createElement(fr.Z,e),o().createElement(vr,{totalImages:y}))}}return o().createElement(F.Typography,{className:s.noData},x)})()))}));class Xr{}Xr.ViewTypes=g.ZIY,Xr.getComponentBy=(e,t)=>{let{store:n,config:r,className:a,isFullscreen:l,onToggleFullscreen:i}=t;switch(r[e]){case Xr.ViewTypes.HierarchyTree:return o().createElement(Gr,{config:r,store:n,className:a});case Xr.ViewTypes.HierarchyPaths:return o().createElement(Wr,{config:r,className:a});case Xr.ViewTypes.RelationsTable:return o().createElement($r,{config:r,store:n,className:a});case Xr.ViewTypes.Relations:return o().createElement(Hr,{config:r,className:a});case Xr.ViewTypes.Attributes:return o().createElement(zr,{className:a,config:r});case Xr.ViewTypes.SingleAttributeView:return o().createElement(Vr,{config:r,className:a});case Xr.ViewTypes.TableAttributeView:return o().createElement(Fr,{config:r,className:a});case Xr.ViewTypes.MapView:return o().createElement(_r,{config:r,isFullscreen:l,onToggleFullscreen:i,className:a});case Xr.ViewTypes.CustomView:return o().createElement(Br,{config:r,className:a});case Xr.ViewTypes.ImageAttributeView:return o().createElement(Qr,{config:r,className:a});case Xr.ViewTypes.PotentialMatchesView:return o().createElement(qr,{config:r,className:a})}},Xr.getComponent=e=>Xr.getComponentBy("class",e)||Xr.getComponentBy("react-class",e)||o().createElement(Ur,{className:e.className});const Yr=Xr,Kr=()=>null,Jr=(0,r.memo)((e=>{let{config:t,store:n,isFullscreen:a,isAutosize:l,onToggleFullscreen:i}=e;const s=sr();return o().createElement(r.Suspense,{fallback:o().createElement(Kr,null)},Yr.getComponent({config:t,store:n,className:L()(s.component,{[s.fullHeight]:!l}),isFullscreen:a,onToggleFullscreen:i}))}));Jr.displayName="ViewComponent";const eo=(0,_.Z)((e=>({item:e.basicView,fixedSizeContainer:{height:"100%"}})));function to(){return to=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},to.apply(this,arguments)}const no=["onConfigChanged","onRemove"],ro=e=>{let{layoutItemConfig:t,views:n,className:l,children:s,style:c,isFullscreen:u,onToggleFullscreen:p,AutosizeComponent:d}=e,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["layoutItemConfig","views","className","children","style","isFullscreen","onToggleFullscreen","AutosizeComponent"]);const g=n.find((e=>{let{id:n}=e;return t.i===n})),f=eo(),{store:b}=(0,r.useContext)(a.ReactReduxContext);if(!g)return null;const h=g.class===Yr.ViewTypes.CustomView;return o().createElement("div",to({},(0,i.omit)(no,m),{style:c,className:L()(l,{[f.item]:!h})}),o().createElement("div",{className:L()({[f.fixedSizeContainer]:!d})},d,o().createElement(Jr,{store:b,config:g,isFullscreen:u,onToggleFullscreen:p,isAutosize:Boolean(d)})),s)},oo=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a}=e;return o().createElement(D.Z,{LayoutItem:ro,views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"})};var ao=n(57304),lo=n(3409),io=n(93873),so=n(22860),co=n(72753),uo=n(43576);function po(){return po=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},po.apply(this,arguments)}const mo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",po({width:"19",height:"17",viewBox:"0 0 19 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z",id:"svg1467685497a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",{transform:"translate(-4 -2.5)"},o().createElement("mask",{id:"svg1467685497b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg1467685497a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1467685497b)",d:"M0 0h24v24H0z"}))))},go=(0,_.Z)({editingButtons:{display:"flex","& button + button":{width:"88px",marginLeft:"8px"}},searchResults:{width:"150px",height:"25px",backgroundColor:"#ccc"},comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),fo=e=>o().createElement(F.SvgIcon,e,o().createElement(mo,null)),bo=(e,t,n,r,o)=>e.filter((e=>{let{value:a,permission:l}=e;return!(n&&!(0,g.KIu)(a))&&!!(r&&o||!(0,g.fnZ)(a))&&(0,g.uGe)(l,t)})),ho=e=>{let{className:t}=e;const n=go(),l=(0,a.useDispatch)(),i=(0,a.useSelector)(v.ZP.selectors.getCanUserStartProcessFromQuery),s=(0,a.useSelector)(v.ZP.selectors.getEntityWithoutDiff),c=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,s.uri))),u=(0,a.useSelector)(v.ZP.selectors.getMetadata),p=(0,a.useSelector)(v.ZP.selectors.isWorkflowEnabled),d=(0,a.useSelector)(v.ZP.selectors.getMode),m=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),f=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),h=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),y=(0,a.useSelector)(v.ZP.selectors.getProfileOperation)===g.OXy.Saving,x=null==s?void 0:s.type,E=(0,r.useMemo)((()=>[{label:b().text("Editing"),value:g.fO_.EDITING,description:b().text("Edit profile directly"),icon:uo.Z,permission:"UPDATE"},{label:b().text("Suggesting"),value:g.fO_.SUGGESTING,description:b().text("Suggest changes and initiate a workflow review"),icon:fo,permission:"INITIATE_CHANGE_REQUEST"},{label:b().text("Viewing"),value:g.fO_.VIEWING,description:b().text("Suggest changes and initiate a workflow review"),icon:co.Z,permission:"READ"}]),[]),w=(0,r.useMemo)((()=>[{label:b().text("Delete"),value:"Delete",description:b().text("Permanently delete profile"),icon:Ge.Z,onClick:()=>{window.confirm(b().text("Are you sure you want to delete this?"))&&l(v.N5.entity.actions.entityRemoveRequested({entityUri:s.uri}))},permission:"DELETE"}]),[l,s.uri]),C=(0,r.useMemo)((()=>(0,g.nt9)(u,x)||{}),[u,x]),S=!h&&!(0,g.biM)(s)&&!(e=>(0,g.uGe)(g.BDP.READ,e)&&!(0,g.uGe)(g.BDP.UPDATE,e)&&!(0,g.uGe)(g.BDP.DELETE,e)&&!(0,g.uGe)(g.BDP.INITIATE_CHANGE_REQUEST,e))(C),P=(0,g.ZiX)(null==s?void 0:s.uri),O=(0,r.useMemo)((()=>bo(E,C,P,p,i)),[E,C,p,i,P]),N=(0,r.useMemo)((()=>bo(w,C,P,p,i)),[w,C,p,i,P]),k=(0,r.useCallback)((e=>{l(v.N5.mode.actions.modeUpdated(e))}),[l]),Z=(0,r.useCallback)((()=>{l(v.N5.mode.actions.modeCancelEditing())}),[l]),T=(0,r.useCallback)((()=>{l(v.N5.actions.saveProfile())}),[l]);return o().createElement(ao.Z,{className:L()(t,ft.U),entity:m&&c?c:s},o().createElement(F.Box,{display:"flex",alignItems:"center"},o().createElement(F.Box,{mr:3},m&&o().createElement(F.Box,{className:n.editingButtons},o().createElement(F.Button,{variant:"outlined",onClick:Z,"data-reltio-id":"reltio-profile-cancel-editing",disabled:y},b().text("Cancel")),o().createElement(F.Button,{variant:"contained",color:"primary","data-reltio-id":"reltio-profile-save-profile",onClick:T,disabled:y},(0,g.fnZ)(d)?b().text("Suggest"):b().text("Save"))),h&&f?o().createElement(lo.Z,null):f&&o().createElement(io.a,null)),S&&o().createElement(so.T,{optionsGroup:O,buttonsGroup:N,value:d,onChange:k,disabled:y})),o().createElement(F.Box,{className:n.comments},o().createElement(bt.Z,{uri:s.uri,relatedObjectUris:(0,g.wp9)(g.q7e.ENTITY,{entityUri:s.uri}),objectType:g.q7e.ENTITY})))};var yo=n(71820),vo=n(85890),xo=n(26789),Eo=n(54362),wo=n(6674),Co=n(91515),So=n(52043),Po=n(17308),Oo=n(39827),No=n(80147),ko=n(76569);const Zo=(0,_.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0},badge:{fontSize:"12px",height:"18px",minWidth:"18px",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px"}}),To=()=>{const{total:e}=(0,r.useContext)(Z.O),t=Zo();return o().createElement(F.Badge,{badgeContent:e,classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(ko.Z,null))};var Ro=n(26313),jo=n(9371),Do=n(4426);const Io=(0,_.Z)({wrapper:{overflow:"auto",paddingRight:"12px"},showMoreLink:{display:"flex",margin:"16px"},showMoreIcon:{fontSize:"1rem"}}),Lo=()=>{const e=Io(),{getComments:t,comments:n,pageToken:l}=(0,r.useContext)(w.h),i=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant);(0,r.useEffect)((()=>{t(i)}),[t,i]);const s=(0,Ro.Q)(n);return o().createElement(Ce.X.Provider,{value:s},o().createElement(F.Box,{className:e.wrapper},n.map((e=>{const{objectId:t,relatedObjectUris:n,objectType:r,commentId:a}=e;return o().createElement(jo.J,{key:a,uri:t,relatedObjectUris:n,objectType:r,comment:e})})),l&&o().createElement(F.Link,{component:"button",variant:"caption",className:e.showMoreLink,onClick:()=>{t(i,l)},underline:"none"},o().createElement(Do.Z,{className:e.showMoreIcon}),b().text("Show more"))))};var Ao=n(34120);const Mo=(0,_.Z)({wrapper:{overflow:"auto",position:"relative",height:"100%"}}),Uo=()=>{const e=Mo(),{tasks:t,loading:n}=(0,r.useContext)(Z.O);return o().createElement("div",{className:e.wrapper},n&&o().createElement(R.Z,null),t&&t.map((e=>o().createElement(Ao.s,{key:e.taskId,task:e}))))};function zo(){return zo=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},zo.apply(this,arguments)}const Vo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",zo({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"svg2697213709a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",null,o().createElement("g",{transform:"translate(-2 -2)"},o().createElement("mask",{id:"svg2697213709b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg2697213709a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2697213709b)",d:"M0 0h24v24H0z"})))))},Fo=()=>{const{commentsMap:e}=(0,r.useContext)(w.h),t=Zo();return o().createElement(F.Badge,{badgeContent:(0,g.mdt)(e),classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(Vo,null))};var Ho=n(10159);const Bo=()=>o().createElement(Ho.Z,{text:b().text("Ready to go with the flow?"),secondaryText:b().text("Suggest a change or submit a match review, and we’ll kick off a workflow task to get things going.")}),Wo=()=>o().createElement(Ho.Z,{text:b().text("Care to join the conversation?"),secondaryText:b().text("Leave comments for team members anywhere in the Profile page, and we’ll record it here.")});function qo(){return qo=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},qo.apply(this,arguments)}let Go;!function(e){e[e.Workflow=0]="Workflow",e[e.Collaboration=1]="Collaboration",e[e.History=2]="History"}(Go||(Go={}));const $o=e=>{if(e)return 1===e?b().text("${total} item",{total:e}):b().text("${total} items",{total:e})},_o=()=>{var e,t,n;const l=Zo(),s=(0,a.useSelector)(v.ZP.selectors.isWorkflowSideViewEnabled),c=(0,a.useSelector)(v.ZP.selectors.isWorkflowEnabled),u=(0,a.useSelector)(v.ZP.selectors.isCollaborationSideViewEnabled),p=(0,a.useSelector)(v.ZP.selectors.isCollaborationEnabled),d=(0,a.useSelector)(v.ZP.selectors.getHistoryEvent),m=(0,a.useSelector)(v.ZP.selectors.getMetadata),f=(0,a.useSelector)(v.ZP.selectors.getEntity),h=(0,r.useContext)(Z.O),y=(0,r.useContext)(w.h),[x,E]=(0,r.useState)(null),C=(0,r.useCallback)((e=>{E((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{E(null)}),[]),P=null!==x,O=x===Go.History,{isHistoryEnabled:N,isProfilePersisted:k}=(0,yo.C)({isHistoryTabActive:O,entity:f}),{historyFilter:T,onApplyFilter:R,onClearFilter:j,isLoading:D,historicUris:I,historyWithTotal:L,canLoadMore:A,onLoadMore:M}=(0,vo.k)({entity:f,enabled:N}),U=s&&c&&!(0,g.ZiX)(null==f?void 0:f.uri),z=u&&p,V=(0,g.mdt)(null==y?void 0:y.commentsMap),F=[{buttonProps:{id:Go.Workflow,icon:To,tooltipTitle:b().text("Workflow")},content:null!=h&&h.total?o().createElement(Uo,null):o().createElement(Bo,null),headerProps:{mainTitle:b().text("Workflow"),secondTitle:$o(null==h?void 0:h.total),rightContent:o().createElement(xo.G,null)},hidden:!U},{buttonProps:{id:Go.Collaboration,icon:Fo,tooltipTitle:b().text("Collaboration")},content:V?o().createElement(Lo,null):o().createElement(Wo,null),headerProps:{mainTitle:b().text("Collaboration"),secondTitle:$o(V)},hidden:!z},{buttonProps:{id:Go.History,icon:No.Z,tooltipTitle:b().text("History")},content:k?o().createElement(Eo.Z,{isLoading:D,historyWithTotal:L,contributorsUris:I,entityUri:null==f?void 0:f.uri,historyEvent:d,onLoadMore:M,canLoadMore:A}):o().createElement(wo.Z,null),headerProps:{content:o().createElement(Co.Z,{total:k?((null==I?void 0:I.length)||0)+1:void 0,entityType:(0,g.nt9)(m,null==f?void 0:f.type),filter:T,onApplyFilter:R,onClearFilter:j})}}],H=(0,i.reject)((0,i.propEq)("hidden",!0))(F);return(0,r.useEffect)((()=>{var e;null!==(e=F[x])&&void 0!==e&&e.hidden&&S()}),[x,F,S,H]),o().createElement("div",{className:l.wrapper},o().createElement(So.h,{open:P,width:480},!(null!==(e=F[x])&&void 0!==e&&e.hidden)&&o().createElement(o().Fragment,null,o().createElement(Po.P,qo({},null===(t=F[x])||void 0===t?void 0:t.headerProps,{onClose:S})),null===(n=F[x])||void 0===n?void 0:n.content)),o().createElement(Oo.G,{buttonsProps:(0,i.pipe)((0,i.reject)((0,i.propEq)("hidden",!0)),(0,i.pluck)("buttonProps"))(F),onButtonClick:C,activeIndexId:x}))};var Qo=n(39781),Xo=n(16715);const Yo="48px",Ko="1px solid rgba(0, 0, 0, .125)",Jo=(0,_.Z)((e=>({accordion:{borderTop:Ko,borderBottom:Ko,fontSize:"13px",boxShadow:"none","&:not(:first-child)":{borderTop:0},"&:before":{display:"none"},"&$accordionExpanded":{margin:"auto"}},accordionExpanded:{},accordionSummary:{display:"flex",alignItems:"center",height:Yo,minHeight:Yo,"&$accordionSummaryExpanded":{height:Yo,minHeight:Yo}},accordionSummaryHeading:{flex:1,fontSize:e.typography.pxToRem(13),fontWeight:e.typography.fontWeightRegular},accordionSummaryExpanded:{},accordionSummaryContent:{display:"flex",alignItems:"center"},accordionDetails:{maxHeight:"21vh",overflow:"auto",paddingTop:0,paddingBottom:0,"& ul":{paddingLeft:"23px",marginTop:"3px"},"& li":{paddingLeft:"9px",paddingBottom:"8px"}},parents:{color:e.palette.text.primary},errorsAccordion:{backgroundColor:"#FFF4F6",borderColor:"#FFB8B3"},errorsAccordionDetails:{color:"#DD2C00"},warningsAccordion:{backgroundColor:"#FFF9ED",borderColor:"#FFDD91"},warningsAccordionDetails:{color:"#CC7500"},icon:{marginRight:"8px"},errorIcon:{fill:"#FF1744"},warningIcon:{fill:"#F9A825"}}))),ea=Jo;var ta=n(38016);const na=(0,r.memo)((e=>{let{panels:t,expandedPanelId:n,onToggle:r,ErrorComponent:a}=e;const l=ea();return t.length>0?o().createElement("div",null,t.map((e=>{let{id:t,icon:i,title:s,items:c,accordionClassName:u,accordionDetailsClassName:p}=e;return o().createElement(F.Accordion,{key:t,square:!0,expanded:n===t,onChange:r(t),className:u,classes:{root:l.accordion,expanded:l.accordionExpanded}},o().createElement(F.AccordionSummary,{classes:{root:l.accordionSummary,expanded:l.accordionSummaryExpanded,content:l.accordionSummaryContent},expandIcon:o().createElement(ta.Z,null)},i,o().createElement(F.Typography,{className:l.accordionSummaryHeading},s)),o().createElement(F.AccordionDetails,{className:L()(l.accordionDetails,p)},o().createElement("ul",null,c.map(((e,t)=>o().createElement(a,{key:t,error:e}))))))}))):null}));na.displayName="ErrorsPanel";const ra=(0,i.omit)(["deactivated","path"]),oa=(0,r.memo)((e=>{let{error:t}=e;const n=ea(),r=((e,t)=>{let{type:n,source:r,message:o,attributeTypeUri:a="",attributeType:l}=t;if(n===g.NIO.missed&&r===g.zHr.local){const t=l||(0,g.zeJ)(e,a);return t?b().text("${attribute} is required",{attribute:t.label}):o}return o})((0,a.useSelector)(v.ZP.selectors.getMetadata),t),l=(e=>{let{path:t,uri:n}=e;return null==t?void 0:t.slice(0,n?t.length-1:t.length).filter((e=>{let{type:t}=e;return[g.HAc.attributeValue,g.HAc.relationConnection].includes(t)})).map((e=>{let{label:t}=e;return t})).filter(i.identity).join(" / ")})(t);return o().createElement("li",null,o().createElement("span",null,r),l&&o().createElement(o().Fragment,null,o().createElement("br",null),o().createElement("span",{className:n.parents},l)))}));oa.displayName="Error";const aa=()=>{const e=ea(),t=(e=>{const t=(0,r.useRef)(e);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,i.equals)(e.map(ra),t.map(ra))}(e,t.current)||(t.current=e),t.current})((0,a.useSelector)(v.ZP.selectors.getProfileErrors)),[n,l]=(0,r.useMemo)((()=>(0,i.partition)(g.IT0,t)),[t]),[s,c]=(0,r.useState)(null),u=(0,r.useMemo)((()=>[{id:"errors",title:b().text("${number} ${errors}",{number:n.length,errors:1===n.length?b().text("error"):b().text("errors")}),icon:o().createElement(Qo.Z,{className:L()(e.icon,e.errorIcon)}),items:n,accordionClassName:e.errorsAccordion,accordionDetailsClassName:e.errorsAccordionDetails},{id:"warnings",title:b().text("${number} ${warnings}",{number:l.length,warnings:1===l.length?b().text("warning"):b().text("warnings")}),icon:o().createElement(Xo.Z,{className:L()(e.icon,e.warningIcon)}),items:l,accordionClassName:e.warningsAccordion,accordionDetailsClassName:e.warningsAccordionDetails}].filter((e=>{let{items:t}=e;return t.length>0}))),[n,l,e]);(0,r.useEffect)((()=>{c("errors")}),[n]);const p=(0,r.useCallback)((e=>(t,n)=>{c(n?e:null)}),[]);return u.length>0?o().createElement(na,{panels:u,expandedPanelId:s,onToggle:p,ErrorComponent:oa}):null},la=(0,_.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},scrollWrapper:{flexGrow:1,overflowY:"auto"},emptyState:{backgroundColor:"#FAFAFA",height:"100%"},profileWrapper:e=>{let{maxWidth:t}=e;return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,maxWidth:t?`${t}px`:"100%"}},profileContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),ia=(0,r.memo)((e=>{let{config:t,saveState:n,getSavedState:l}=e;const i=la({maxWidth:null==t?void 0:t.maxWidth}),s=(0,a.useDispatch)(),c=(0,r.useRef)(),u=(0,r.useCallback)((0,g.DsO)(n,5e3),[n]),{isLoaded:p,savedState:d}=(0,x.a)(l),[m,f]=(0,r.useState)([]),[h,D]=(0,r.useState)([]),I=(0,r.useMemo)((()=>y()(t)),[t]),L=(0,a.useSelector)(v.ZP.selectors.getEntity),A=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),M=(0,r.useMemo)((()=>(0,g.dvH)(L)),[L]),U=(0,E.C)({objectIds:M}),z=(0,r.useContext)(w.h),V=(0,C.U)(),F=(0,S.v)(null==t?void 0:t.workflow),H=(0,a.useSelector)(v.ZP.selectors.getHistoryEvent);(0,P.a)({entity:L,historyEvent:H});const B=(0,O.u)();(0,r.useEffect)((()=>{if(p){const e=I!==d.configHash,{views:n,layout:r}=(0,g.Mfk)({views:e||!d.views?t.views:d.views,layout:e?t.layout:d.layout});D(n),f(r)}}),[p]),(0,r.useEffect)((()=>{s(v.N5.views.actions.profileViewsSet(h))}),[s,h]),(0,r.useEffect)((()=>{t.sidePanelViews&&s(v.N5.sidePanelViews.actions.sidePanelViewsLoaded(t.sidePanelViews))}),[t]),(0,r.useEffect)((()=>{c.current&&(c.current.scrollTop=0)}),[null==L?void 0:L.uri]),(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(v.ZP.selectors.getValidateReadMode),n=(0,a.useSelector)(v.ZP.selectors.getEntity)||{},{uri:o,updatedTime:l}=n,i=(0,g.biM)(n),s=(0,a.useSelector)(v.ZP.selectors.getMode),c=(0,a.useSelector)(v.ZP.selectors.getProfileViews),u=c&&c.length>0,p=(0,r.useCallback)((0,g.DsO)((t=>{t&&e(v.N5.actions.validateProfile())}),500),[e]);(0,r.useEffect)((()=>{const e=t&&!i&&o&&!(0,g.ZiX)(o)&&s===g.ARY.Viewing&&u;p(e)}),[p,i,t,l,o,s,u])})();const W=(0,r.useCallback)((e=>{u({layout:e,views:h,configHash:I}),f(e)}),[u,I,h]);return o().createElement(N.j.Provider,{value:!0},o().createElement(k.s.Provider,{value:V},o().createElement(w.h.Provider,{value:A?z:U},o().createElement(Z.O.Provider,{value:F},o().createElement(T.m.Provider,{value:B},o().createElement("div",{className:i.perspectiveView},(!p||!(null!=L&&L.uri))&&o().createElement(R.Z,null),p&&null!=L&&L.uri?o().createElement("div",{className:i.profileContainer},o().createElement("div",{className:i.profileWrapper},o().createElement(ho,null),!A&&o().createElement(aa,null),o().createElement("div",{ref:c,className:i.scrollWrapper},o().createElement(oo,{layout:m,onLayoutChanged:W,views:h}))),o().createElement(_o,null)):o().createElement("div",{className:i.emptyState},o().createElement(j.ZP,{LogoRenderer:j.B9.NO_DATA,text:b().text("No data to display."),variant:j.tC.embedded}))))))))}));ia.displayName="ProfilePerspectiveView";const sa=(0,s.createGenerateClassName)({productionPrefix:"profilePerspective",disableGlobal:!0}),ca=e=>{let{config:t,store:n,onResize:f=i.identity,saveState:b,getSavedState:h,qxSandboxApi:y}=e;const v=(0,r.useCallback)((0,g.aYu)(h),[h]),x=(0,r.useMemo)((()=>(0,g.Vr9)(t)),[t]);return o().createElement(a.Provider,{store:n},o().createElement(p.m.Provider,{value:x.id},o().createElement(d.Y.Provider,{value:y},o().createElement(s.StylesProvider,{generateClassName:sa},o().createElement(u.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>f(Math.floor(e),Math.floor(t))}),x&&o().createElement(ia,{config:x,saveState:b,getSavedState:v}),o().createElement(m.Z,{showErrorFromStore:!0}))))))};var ua=n(82842),pa=n(51229),da=n(91131);const ma=(0,_.Z)((e=>({titleContainer:{overflow:"hidden",fontSize:"16px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",alignItems:"center",display:"flex",minHeight:"48px",color:e.palette.text.secondary},link:{fontSize:"16px",fontWeight:"normal"},icon:{height:"18px",color:e.palette.text.secondary},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500}}))),ga=e=>{let{total:t=0}=e;const n=ma(),l=(0,a.useDispatch)(),i=(0,r.useContext)(p.m),s=(0,r.useCallback)((()=>{l(v.ui.actions.openPerspective({perspectiveId:"profile",viewId:i}))}),[l,i]);return o().createElement(H.Z,{title:""},o().createElement("div",{className:n.titleContainer},o().createElement(F.Link,{component:"button",variant:"caption",className:n.link,onClick:s,underline:"none"},b().text("Profile")),o().createElement(da.Z,{className:n.icon}),b().text("Tags")),o().createElement(pa.Z,null),o().createElement(F.Typography,{className:n.totalCaption,variant:"caption"},o().createElement("span",{className:n.totalNumber},b().number(t,"0,0")),b().text("total profiles")))};var fa=n(20404);const ba=(0,_.Z)((e=>({toolbar:{display:"flex",flexShrink:0,background:"white",borderBottom:"1px solid rgba(0,0,0,0.1)",boxSizing:"border-box",paddingLeft:"16px"},avatar:{color:"rgba(0, 0, 0, 0.38)",marginRight:"12px"},label:{fontSize:"20px",letterSpacing:"0.25px",lineHeight:"1.2",fontWeight:500,color:e.palette.text.primary,wordBreak:"break-word"}}))),ha=e=>{let{label:t}=e;const n=ba();return o().createElement(F.Toolbar,{className:n.toolbar},o().createElement(fa.Z,{className:n.avatar}),o().createElement(F.Typography,{variant:"h6",className:n.label},t))};function ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){va(e,t,n[t])}))}return e}function va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xa=(0,_.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflow:"hidden",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},tagsContainer:{display:"flex"},fullHeight:{flexGrow:1,height:0},tagsView:{margin:"16px",width:"100%",paddingTop:"4px"},listContainer:{flex:1,display:"flex",overflow:"hidden",position:"relative",flexDirection:"column",minHeight:"4px"},entitiesList:{overflowY:"auto",flexGrow:1},pagination:{flexGrow:0}}))),Ea=[25,50,100],wa=(0,r.memo)((e=>{let{tag:t,entityUri:n}=e;const l=xa(),[s,c]=(0,r.useState)(Ea[0]),[u,p]=(0,r.useState)(0),d=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions);(0,r.useEffect)((()=>{p(0)}),[t,n,d]);const{isLoading:m,total:f,entities:h}=(e=>{let{tag:t,entityUri:n,page:o=0,rowsPerPage:l=50}=e;const s=(0,a.useDispatch)(),c=(0,he._)(),u=(0,he._)(),[p,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(0),[h,y]=(0,r.useState)([]),{requestEntities:x,requestTotal:E}=(e=>{let{entityUri:t,tag:n}=e;const o=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),l=(0,a.useSelector)(v.ZP.selectors.getTenant),s=(0,a.useSelector)(v.ZP.selectors.getDtssPath),c=(0,r.useMemo)((()=>(0,g.Do$)(t)),[t]),u=(0,r.useMemo)((()=>[{filter:"equals",fieldName:"tags",values:[n]}]),[n]),p=!!c,d=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=ya({select:"uri,label,type,secondaryLabel,defaultProfilePicValue,startDate,endDate"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return p?(0,g.uqV)({filters:e,options:t,customerTenant:l,dataTenant:c,dtssPath:s}).then((0,i.map)((0,i.assoc)("dataTenant",c))):(0,g.ZOr)(e,t)}),[p,c,l,s]);return{requestEntities:(0,r.useCallback)(((e,t)=>d(u,ya({offset:t,max:e},o))),[u,o,d]),requestTotal:(0,r.useCallback)((()=>{const e=o;return(p?(0,g.J$m)({filters:u,options:e,customerTenant:l,dataTenant:c,dtssPath:s}):(0,g.j_Q)(u,e)).then((e=>e.total))}),[u,o,p,c,l,s])}})({entityUri:n,tag:t}),w=(0,r.useCallback)((e=>{s(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))),f(0)}),[s]);return(0,r.useEffect)((()=>{c(E()).then(f).catch(w)}),[E,c,w]),(0,r.useEffect)((()=>{d(!0),u(x(l,o*l)).then(y).catch(w).finally((()=>d(!1)))}),[o,l,x,u,w]),{isLoading:p,total:m,entities:h}})({tag:t,entityUri:n,page:u,rowsPerPage:s}),y=(0,r.useRef)(null);(0,r.useEffect)((()=>{y.current&&(y.current.scrollTop=0)}),[h]);const x=f>Ea[0];return o().createElement("div",{className:l.perspectiveView},o().createElement(ha,{label:t}),o().createElement("div",{className:L()(l.tagsContainer,{[l.fullHeight]:x})},o().createElement(z.Z,{className:l.tagsView},o().createElement(ga,{total:f}),o().createElement("div",{className:l.listContainer},m&&o().createElement(R.Z,null),f>0&&o().createElement("div",{className:l.entitiesList,ref:y},o().createElement(ua.Z,{entities:h})),x&&o().createElement("div",{className:l.pagination},o().createElement(V.Z,{count:f,rowsPerPageOptions:Ea,rowsPerPage:s,page:u,onChangePage:p,onChangeRowsPerPage:c}))))))}));wa.displayName="TagPerspectiveView";const Ca=(0,s.createGenerateClassName)({productionPrefix:"tagPerspective",disableGlobal:!0}),Sa=e=>{let{config:t,tag:n,entityUri:r,store:l,onResize:u=i.identity}=e;return o().createElement(a.Provider,{store:l},o().createElement(p.m.Provider,{value:t.id},o().createElement(s.StylesProvider,{generateClassName:Ca},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>u(Math.floor(e),Math.floor(t))}),t&&o().createElement(wa,{tag:n,entityUri:r}),o().createElement(m.Z,{showErrorFromStore:!0}))))}},1242:(e,t,n)=>{e.exports=n.p+"5271a9e7b6651c852e93.png"}}]);
|