@reltio/remotes 1.4.1661 → 1.4.1663
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/1039.js +1 -1
- package/1088.js +1 -1
- package/1088.js.map +1 -1
- package/1146.js +1 -1
- package/1148.js +1 -1
- package/1334.js +1 -1
- package/1425.js +1 -1
- package/1572.js +1 -1
- package/1664.js +1 -1
- package/1707.js +1 -1
- package/1790.js +1 -1
- package/1840.js +1 -1
- package/2066.js +1 -1
- package/2300.js +1 -1
- package/2400.js +1 -1
- package/2966.js +1 -1
- package/3096.js +1 -1
- package/3348.js +1 -1
- package/3373.js +1 -1
- package/3381.js +1 -1
- package/3383.js +1 -1
- package/3463.js +1 -1
- package/3469.js +1 -1
- package/3538.js +1 -1
- package/3538.js.map +1 -1
- package/3639.js +1 -1
- package/3854.js +1 -1
- package/3854.js.map +1 -1
- package/3912.js +1 -1
- package/415.js +1 -1
- package/4212.js +1 -1
- package/4390.js +1 -1
- package/446.js +1 -1
- package/4481.js +1 -1
- package/4583.js +1 -1
- package/4609.js +1 -1
- package/4610.js +1 -1
- package/4680.js +1 -1
- package/4780.js +1 -1
- package/4806.js +1 -1
- package/4838.js +1 -1
- package/50.js +1 -1
- package/5039.js +1 -1
- package/5053.js +1 -1
- package/5108.js +1 -1
- package/5177.js +1 -1
- package/5292.js +1 -1
- package/5368.js +1 -1
- package/5383.js +1 -1
- package/5617.js +1 -1
- package/5738.js +1 -1
- package/5738.js.map +1 -1
- package/5939.js +1 -1
- package/6287.js +1 -1
- package/636.js +1 -1
- package/658.js +1 -1
- package/{9831.css → 6774.css} +1 -1
- package/{9831.css.map → 6774.css.map} +1 -1
- package/6774.js +2 -0
- package/6774.js.map +1 -0
- package/6799.js +1 -1
- package/6844.js +1 -1
- package/6860.js +1 -1
- package/6903.js +1 -1
- package/7119.js +1 -1
- package/7128.js +1 -1
- package/7151.js +1 -1
- package/7340.js +1 -1
- package/735.js +1 -1
- package/7363.js +1 -1
- package/7422.js +1 -1
- package/7605.js +1 -1
- package/7626.js +1 -1
- package/7744.js +1 -1
- package/7896.js +1 -1
- package/820.js +1 -1
- package/8207.js +1 -1
- package/8216.js +1 -1
- package/8418.js +1 -1
- package/8462.js +1 -1
- package/8565.js +1 -1
- package/8741.js +1 -1
- package/9016.js +1 -1
- package/9050.js +1 -1
- package/9283.js +1 -1
- package/9309.js +1 -1
- package/9328.js +1 -1
- package/9387.js +1 -1
- package/9719.js +1 -1
- package/9861.js +1 -1
- package/987.js +1 -1
- package/99.js +1 -1
- package/9960.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/9831.js +0 -2
- package/9831.js.map +0 -1
package/3854.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="92312d01-78a6-4fdf-9048-02438f80b766",e._sentryDebugIdIdentifier="sentry-dbid-92312d01-78a6-4fdf-9048-02438f80b766")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1662"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3854],{31421:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>zs,IL3:()=>VT,PY2:()=>gt,Ng6:()=>Me,YJ7:()=>Ne,NlI:()=>Ee,XYV:()=>ge,Xt7:()=>Ce,wfT:()=>lr,EMD:()=>Xt,HAc:()=>je,PEf:()=>Rt,oA3:()=>Qt,$XE:()=>et,eWf:()=>Nt,q7e:()=>Le,KVe:()=>ur,WVQ:()=>Ei,oZZ:()=>Er,bNA:()=>mr,Rjq:()=>hr,G39:()=>wt,W0P:()=>ct,X1H:()=>st,hdG:()=>yt,ws7:()=>ft,VI$:()=>dt,yn8:()=>Qe,N0y:()=>Ke,dZX:()=>tt,bQt:()=>Or,oS0:()=>mt,KfU:()=>De,bZE:()=>Oe,Nsj:()=>Se,psV:()=>Ae,xPW:()=>_t,pyR:()=>nr,p8l:()=>Zt,Wkf:()=>Ue,zHr:()=>Ie,NIO:()=>we,$26:()=>K_,s9T:()=>He,MEy:()=>$u,j5E:()=>Te,vAw:()=>Kt,NMQ:()=>Jt,eVu:()=>uc,YGb:()=>ut,Z9$:()=>nt,Y1q:()=>qh,RgZ:()=>er,Qy0:()=>br,Q26:()=>Re,pYu:()=>Yt,wIJ:()=>iA,GFH:()=>$e,Ury:()=>It,S91:()=>Ut,wSh:()=>te,BDP:()=>ki,pGS:()=>rr,ARY:()=>ht,XGc:()=>sr,fO_:()=>kt,wwy:()=>We,h_8:()=>Dt,_XL:()=>Pe,j2V:()=>cr,dMV:()=>ar,xYD:()=>Tt,OXy:()=>bt,BXd:()=>Xe,KM9:()=>Fe,lXI:()=>at,C68:()=>St,Yj_:()=>Ye,D25:()=>Ge,ZIY:()=>rt,Tl4:()=>pA,lwr:()=>Pt,NkU:()=>pr,Rtp:()=>or,YGx:()=>ze,uTS:()=>ir,MCv:()=>ke,IYE:()=>zt,PiC:()=>Tr,MVv:()=>pt,Q_m:()=>gr,h_m:()=>ot,DUe:()=>ve,tJI:()=>xe,fDt:()=>Ve,cNQ:()=>dr,SwE:()=>qt,ZHR:()=>fr,PYu:()=>lt,lD1:()=>Ct,lVm:()=>Ze,vnX:()=>b_,$x5:()=>O_,_R1:()=>m_,wUm:()=>h_,dC6:()=>Je,MBD:()=>Be,GmF:()=>fa,cKm:()=>it,iP_:()=>At,NVC:()=>qe,tPT:()=>Pl,tZe:()=>iE,kRE:()=>Im,psB:()=>Um,X0$:()=>Nl,$vY:()=>Al,zE1:()=>kl,Wm5:()=>fl,vyX:()=>Hc,wLZ:()=>Rl,W4V:()=>ue,EtK:()=>Ds,ayi:()=>_l,asT:()=>OP,kGs:()=>vb,RLE:()=>pg,ewt:()=>ay,O_f:()=>Cu,sOy:()=>ln,kP7:()=>cg,Tde:()=>Jn,LMI:()=>wc,skb:()=>eN,sPt:()=>Oc,sH1:()=>vc,lPZ:()=>Nf,bG8:()=>Af,_LJ:()=>Pf,RPM:()=>gy,h27:()=>$c,Uqd:()=>qc,xG:()=>yN,Z2f:()=>Ig,fgW:()=>jA,I69:()=>aN,ZxB:()=>sN,dwd:()=>_f,F$g:()=>gf,mdt:()=>Fb,Qbq:()=>ab,rny:()=>Xi,UEY:()=>La,Q0T:()=>ja,Lyr:()=>Ga,sBn:()=>Da,itK:()=>wa,H9$:()=>Ca,KPc:()=>Ua,zos:()=>Ia,ELQ:()=>Ba,dZs:()=>ba,Cz4:()=>ha,z_L:()=>$a,fGe:()=>ma,iuF:()=>Ra,Wib:()=>Sa,Hn0:()=>Va,obS:()=>Wa,E$L:()=>Oa,XUh:()=>Pa,Qp_:()=>Aa,_jk:()=>va,sKE:()=>ga,WmG:()=>Na,QKx:()=>Ma,Oik:()=>Fa,s0A:()=>_a,o9m:()=>ka,MCd:()=>xa,RsS:()=>Vc,tGK:()=>iu,lIv:()=>Fl,mqZ:()=>xi,Vg3:()=>ia,mkC:()=>Yi,xv5:()=>oa,a14:()=>Hi,yv0:()=>aa,Zm0:()=>qi,Nxd:()=>Wi,$mM:()=>na,ifj:()=>hi,NWi:()=>Zg,xr3:()=>zg,wNf:()=>mu,iJH:()=>e_,KB$:()=>cP,d89:()=>Vi,Edd:()=>Gi,Z5t:()=>Bi,uGe:()=>Mi,UoR:()=>Fi,xvW:()=>Xg,$qe:()=>Qg,yPM:()=>Ea,$cp:()=>Ll,vKJ:()=>Dl,VtG:()=>Qf,AID:()=>Uh,B1H:()=>sP,b7X:()=>rb,$uE:()=>Ab,keo:()=>ib,C_p:()=>uf,G27:()=>GO,O8b:()=>wf,JA0:()=>bm,b3T:()=>Ob,oC6:()=>hb,_Zs:()=>bb,epC:()=>Pb,YYG:()=>Nb,f_2:()=>vm,w3l:()=>FN,QHB:()=>VO,Jso:()=>WN,RXH:()=>PO,Vr9:()=>XO,lMm:()=>Qv,BlA:()=>CP,fmQ:()=>Ns,yRD:()=>AN,NcL:()=>Ef,QK6:()=>Rr,ymd:()=>$T,JV_:()=>Hm,XiW:()=>fd,Yrx:()=>om,BiY:()=>kp,GPx:()=>gl,gjI:()=>vl,vlo:()=>fy,E_P:()=>Ub,aAL:()=>RT,NBq:()=>Ps,wp9:()=>kb,DsR:()=>vT,MPc:()=>ed,gWE:()=>td,DT_:()=>rd,ipn:()=>id,ORg:()=>Ci,_wz:()=>nd,RYR:()=>Id,PP2:()=>pm,wS7:()=>Vg,cBQ:()=>aT,pBq:()=>Th,DsO:()=>re,X78:()=>Km,xZs:()=>Bm,YFy:()=>lm,Gmt:()=>Lm,K$w:()=>jm,DSj:()=>ST,Mfr:()=>um,k9j:()=>sT,EjS:()=>Z,ww$:()=>Sl,WVU:()=>Dm,hxF:()=>El,n6p:()=>Mp,E7G:()=>Dp,nwO:()=>FP,Mzk:()=>Zf,aFF:()=>pb,HRH:()=>Yu,EZK:()=>ap,Kxm:()=>tp,Z9i:()=>$y,CrF:()=>Pm,Oz9:()=>yh,DNd:()=>qa,vUy:()=>NP,lJh:()=>Qu,zHo:()=>Xu,UO$:()=>vh,zeJ:()=>ei,dLR:()=>Fs,JQy:()=>Ks,XtP:()=>Ls,Ug0:()=>Ai,fa7:()=>dy,A1W:()=>nb,sw:()=>ip,nv3:()=>l_,JgD:()=>s_,SkP:()=>Qs,SAs:()=>mh,i5L:()=>Xs,PWK:()=>Qo,IM5:()=>ks,Aup:()=>QO,Mfk:()=>Zv,HQx:()=>cs,oN$:()=>us,mB6:()=>Dg,p6d:()=>U,o0x:()=>D,ufS:()=>Og,k7L:()=>vg,ped:()=>pP,mrB:()=>C,OuZ:()=>op,ncP:()=>tn,FQ2:()=>sp,W$R:()=>lp,JOV:()=>Kr,Zmi:()=>Qr,hm5:()=>zr,ECL:()=>su,vPL:()=>up,qmL:()=>Yh,hPi:()=>dh,hXd:()=>Zi,OCS:()=>ea,p2l:()=>el,qF1:()=>GT,_X$:()=>BT,$1R:()=>QN,bzh:()=>$b,k66:()=>os,kiP:()=>vo,pSg:()=>de,Z$v:()=>Qd,kz_:()=>Tm,H_U:()=>ls,t9e:()=>Za,j2$:()=>aE,PFL:()=>Fn,aJ3:()=>$_,To9:()=>Kn,ADq:()=>Ly,UUb:()=>Dy,tQX:()=>jy,xy8:()=>Vn,EUG:()=>ti,AFK:()=>fn,X3M:()=>Zn,WN0:()=>ss,kDl:()=>Ms,uDV:()=>Wh,IhQ:()=>Ws,pfb:()=>qs,R$r:()=>Ib,w80:()=>Fo,Pfu:()=>Xa,Gtj:()=>Kl,fyF:()=>Jl,kkq:()=>as,u5q:()=>rn,O$n:()=>Np,ptG:()=>Pp,b7z:()=>vf,f4_:()=>Kb,uap:()=>Jb,d7q:()=>am,liG:()=>dm,$oF:()=>im,avf:()=>Jp,DiQ:()=>Hp,cfX:()=>qp,vD3:()=>Qp,Qrb:()=>Yp,EJQ:()=>Kp,HWy:()=>Wp,gjS:()=>Dd,y6v:()=>Bp,JUW:()=>gm,GtP:()=>lO,_kX:()=>Ja,u1e:()=>Ka,sJj:()=>lb,CJp:()=>oO,uKF:()=>sb,wo0:()=>wm,s5:()=>Zo,cwx:()=>zo,Y6b:()=>JE,TTx:()=>xm,UtR:()=>KE,HaQ:()=>$m,E6I:()=>Nm,Won:()=>XE,vTU:()=>qE,Nsy:()=>Tp,KMQ:()=>cb,Do$:()=>bp,CSV:()=>nl,TMe:()=>QE,l1V:()=>ec,RHh:()=>lc,VQ1:()=>oc,cGG:()=>ac,z7d:()=>Ty,Xaq:()=>ys,_2w:()=>IP,Sj8:()=>SP,PJj:()=>tu,me4:()=>wP,k3T:()=>Pi,PjQ:()=>ji,qjb:()=>Zd,s7l:()=>Wf,jLA:()=>uO,BoX:()=>ri,GGR:()=>cy,j5q:()=>ly,DnY:()=>Vf,RY5:()=>Mh,Px$:()=>Ud,KPC:()=>iP,NIY:()=>Xf,HvW:()=>qf,Fof:()=>to,BXy:()=>Hf,fX:()=>cO,BTI:()=>vp,uie:()=>pp,q27:()=>Sp,vrC:()=>pv,fAQ:()=>Zm,XkT:()=>$f,lrH:()=>eh,nt9:()=>bi,XH8:()=>Ap,XH2:()=>Ni,jFi:()=>_p,qhs:()=>ko,GBJ:()=>eT,wwR:()=>Op,Uk3:()=>Tn,yV:()=>Hd,$Rg:()=>_n,ev7:()=>lP,RB9:()=>hm,iFp:()=>Ay,e$p:()=>Py,PcX:()=>Ry,SpP:()=>Ny,R6_:()=>G_,CY1:()=>Q_,Ajk:()=>Lf,Yiz:()=>jf,FK9:()=>Sf,UOo:()=>gg,uug:()=>Eu,P$2:()=>Z_,XS2:()=>lu,Hyb:()=>Su,d3Y:()=>Xc,Klp:()=>Zc,WxZ:()=>eA,Gzu:()=>Zu,ZOr:()=>xf,uqV:()=>BE,Pm4:()=>ie,hWO:()=>pn,nHA:()=>zb,nVD:()=>$h,_tF:()=>dc,jrj:()=>XN,nDj:()=>eP,dED:()=>rm,P2h:()=>tm,jrr:()=>mo,mmY:()=>bo,T6O:()=>ps,h6J:()=>tE,hM2:()=>HN,XR6:()=>ee,jmz:()=>Bh,IHt:()=>Gh,NZI:()=>xy,wdF:()=>Xm,YNv:()=>tb,IFm:()=>eb,o_F:()=>Jh,kgP:()=>zm,ZYI:()=>kT,QXK:()=>Wl,efz:()=>Yl,Q5d:()=>Bl,Ysv:()=>ql,UWq:()=>hy,ocC:()=>my,io3:()=>gi,XS1:()=>iy,IK$:()=>ny,Sbt:()=>xo,roS:()=>Mo,Ww1:()=>$o,QaS:()=>tT,wsP:()=>Ur,ERZ:()=>LN,CL1:()=>JN,idV:()=>np,nIW:()=>cn,x7Y:()=>A,fjE:()=>B_,sG0:()=>Ng,tV7:()=>ru,g8o:()=>uA,Qy:()=>lA,t2P:()=>x_,KbW:()=>Po,wId:()=>So,TAC:()=>uP,LS0:()=>wo,bFH:()=>IE,Rgl:()=>CE,fW1:()=>Vb,GFW:()=>Vm,Ywp:()=>y_,pg:()=>dE,WSA:()=>DE,ffJ:()=>yg,gEI:()=>Tg,fed:()=>YN,tT_:()=>Ys,BgZ:()=>Hs,xIV:()=>Js,KbL:()=>Bf,JBA:()=>bn,aNC:()=>o_,RFJ:()=>LT,Zeh:()=>Oh,OT5:()=>d_,mC3:()=>xl,kR6:()=>UP,gFw:()=>Qb,NVY:()=>jb,k6v:()=>WT,FEC:()=>YT,L5S:()=>Cb,Ob5:()=>wp,KUV:()=>Ip,dvH:()=>Db,V3i:()=>ev,VD3:()=>_i,mm2:()=>ic,rou:()=>lh,_Zp:()=>eo,izH:()=>Qa,DK$:()=>za,KMp:()=>PT,c31:()=>Pn,mbo:()=>Fy,gT8:()=>wn,CZ8:()=>_s,uGi:()=>ws,Poc:()=>An,_9k:()=>Cs,ZTM:()=>Rs,bwT:()=>Is,tF$:()=>Sn,o96:()=>As,M4S:()=>Us,_vs:()=>bT,Ff:()=>qd,xF8:()=>jd,PUO:()=>db,CNu:()=>Kd,ATu:()=>ky,j1S:()=>Ii,X1R:()=>Jd,GWB:()=>ty,VFB:()=>zd,V3K:()=>Si,Lmx:()=>wi,oSN:()=>Li,ZaZ:()=>Nn,w1L:()=>Yd,n_1:()=>YE,N6e:()=>_T,IwQ:()=>ey,GWs:()=>Xd,SxO:()=>ho,w3p:()=>Lb,xU7:()=>Nr,hAq:()=>Ar,Y_p:()=>Bo,$k6:()=>Go,Gdl:()=>Rg,U6P:()=>Pg,OwB:()=>V_,hTh:()=>Vh,xqc:()=>es,JvE:()=>ts,i29:()=>Lc,dzT:()=>Ki,uPS:()=>iT,cZV:()=>nT,n3B:()=>VA,e6O:()=>LA,s7j:()=>nA,j$Q:()=>_m,$op:()=>zN,PeS:()=>Xy,kW2:()=>sO,tH7:()=>Xo,Yxg:()=>ll,bOT:()=>fg,MaZ:()=>uy,nqN:()=>sy,$wt:()=>ZN,jWj:()=>Oy,o_J:()=>fs,yW4:()=>rE,uT0:()=>ZT,C82:()=>eE,Jkk:()=>Vp,_we:()=>ry,bsH:()=>Xb,u9Z:()=>sh,LCU:()=>Gm,J$m:()=>WE,j_Q:()=>If,OaI:()=>Uf,wB1:()=>oP,SP6:()=>pE,ZYr:()=>nP,IMU:()=>jT,FoU:()=>Om,DVz:()=>Cg,mxe:()=>xA,FHr:()=>hh,D1g:()=>uh,VO3:()=>A_,de5:()=>__,Uw1:()=>Ir,J6q:()=>My,XCe:()=>co,fbl:()=>f_,Ir:()=>Ao,XQO:()=>No,QXb:()=>_E,zXF:()=>Hh,P8_:()=>Ym,iiD:()=>NT,MOC:()=>AE,WF:()=>gE,xE1:()=>Di,idW:()=>hP,QWZ:()=>ng,YL3:()=>zf,NW9:()=>bg,D_E:()=>Pr,Fn9:()=>T,j2U:()=>Zs,MpE:()=>Cn,kQw:()=>xn,mfm:()=>wu,vZp:()=>En,Wah:()=>Gy,E8K:()=>fP,VSb:()=>vs,vr_:()=>Mn,Vmh:()=>AP,FgW:()=>ZO,oDv:()=>Es,fGG:()=>ig,kuw:()=>hs,eHk:()=>by,Tt2:()=>Ts,pQZ:()=>bs,oZ7:()=>ag,T6Y:()=>pi,VRd:()=>vn,_26:()=>Nu,YkM:()=>Hn,J6y:()=>pu,njU:()=>bu,TBP:()=>ms,IT0:()=>Vy,x_:()=>ub,FP6:()=>gn,biM:()=>mp,TMl:()=>hp,Vkd:()=>gu,WiY:()=>H_,_zi:()=>_u,RZp:()=>mf,J6D:()=>nc,Lt4:()=>ai,QEi:()=>Xn,whI:()=>Mt,KIu:()=>$t,JhM:()=>le,C_0:()=>fi,lzc:()=>Cp,qIF:()=>GA,O27:()=>E,aBi:()=>Rp,xOX:()=>yl,EdS:()=>on,WgC:()=>an,eEv:()=>Ln,A4t:()=>Ou,YOQ:()=>hn,Wos:()=>ui,jWr:()=>Ya,Or$:()=>qn,lhE:()=>vi,CwH:()=>Qn,pzC:()=>cl,ymH:()=>hu,QZu:()=>Wn,rYH:()=>q_,FVt:()=>li,Kn2:()=>pe,jgw:()=>Iu,Qgr:()=>rc,OXP:()=>Os,nsY:()=>Iy,vyG:()=>Sy,lS4:()=>zn,g5f:()=>J_,fp6:()=>fu,Uty:()=>ua,YkG:()=>Yn,xdS:()=>In,kMF:()=>ad,$NE:()=>sn,bC9:()=>nn,Ian:()=>Ui,KVV:()=>ob,q9e:()=>Vo,iIf:()=>Sg,ian:()=>ml,m6e:()=>Ti,OFd:()=>pl,kqr:()=>$n,fnZ:()=>Ft,VFZ:()=>hl,ZiX:()=>Zr,j5n:()=>oi,zkt:()=>N,Pcm:()=>aP,QDV:()=>ul,M5u:()=>Y_,laD:()=>$A,mtq:()=>jn,CtB:()=>wg,CBv:()=>se,I0t:()=>yi,u1G:()=>yy,gk1:()=>FA,Bgb:()=>kA,uzs:()=>xt,v0l:()=>mc,Zqp:()=>zE,j0k:()=>Jo,l22:()=>LP,tCm:()=>yn,gmx:()=>uu,mOr:()=>Vu,TwZ:()=>cA,GyU:()=>u_,zGm:()=>TE,bMg:()=>FE,EyD:()=>Jg,FQA:()=>Kg,fZN:()=>$E,xsF:()=>qg,Lxg:()=>Hg,O3l:()=>uT,Wni:()=>lT,wRx:()=>r_,OxG:()=>RE,Jwg:()=>NE,uJQ:()=>PE,qWg:()=>Ug,i96:()=>yE,NPd:()=>Ju,MrZ:()=>Ko,zhn:()=>t_,G8q:()=>vr,Jct:()=>Nd,A9Y:()=>ne,Y5F:()=>RN,gxP:()=>ce,c$P:()=>cu,M7o:()=>Yc,BBN:()=>yo,fS6:()=>Wd,ZBU:()=>z,UkJ:()=>Io,xkv:()=>Wm,z$M:()=>bP,KAm:()=>mm,lCl:()=>Ch,D9R:()=>pf,rkF:()=>cf,IU6:()=>cE,RGr:()=>h,aYu:()=>m,ije:()=>Zl,Buf:()=>AT,YLu:()=>zl,ct9:()=>Yo,XkY:()=>ME,T5R:()=>EE,uQS:()=>VE,wcJ:()=>Wo,d$I:()=>wl,rSp:()=>Ep,Sx:()=>Kf,Ilm:()=>Ml,Ki6:()=>Tl,VGk:()=>OT,sFD:()=>RO,eWN:()=>vP,dWE:()=>rA,Lkd:()=>Td,aDL:()=>gh,yaA:()=>GE,lOh:()=>ph,DBr:()=>k_,hK$:()=>nu,uKH:()=>dg,TZ_:()=>uE,CMB:()=>BA,FU8:()=>Jf,J$p:()=>Ph,b5s:()=>Nh,h2W:()=>dn,SL_:()=>nh,oUH:()=>QT,ck9:()=>mE,RAb:()=>pc,nL:()=>Ag,k$p:()=>wO,Xs0:()=>Xl,u7I:()=>ch,rxg:()=>ju,bji:()=>Lu,oCZ:()=>af,MjG:()=>g_,FuV:()=>KT,$ju:()=>zT,t6d:()=>XT,m5F:()=>wr,sx:()=>gP,rSc:()=>jg,U10:()=>Cf,L8n:()=>Cm,R9X:()=>HE,rj2:()=>Jm,_C4:()=>oE,tCj:()=>qm,uAg:()=>sm,wx9:()=>oy,KF3:()=>sE,ax9:()=>lE,HH7:()=>gT,ufV:()=>cm,_6y:()=>oT,XTh:()=>E_,AJo:()=>rT,Ixr:()=>Am,oss:()=>kP,P6Y:()=>MP,q5j:()=>zy,Bd_:()=>ef,xkB:()=>Zy,W41:()=>ah,WkI:()=>ih,sSE:()=>Qy,GMd:()=>Ic,jtL:()=>Uc,Bxm:()=>rf,zWh:()=>Eo,AlY:()=>oh,FVh:()=>Yy,inb:()=>p_,U_T:()=>jE,FTe:()=>oe,VGB:()=>ae,tM8:()=>ku,Wfe:()=>Hu,Ls5:()=>qu,$bd:()=>Mu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>_,durationToTimestamp:()=>Z,formatDate:()=>U,formatDateTime:()=>D,formatTime:()=>C,getEndOfDay:()=>I,getLocaleFormat:()=>A,getMomentFormatFromDateMask:()=>J,getMomentFormatFromDateTimeMask:()=>X,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>w,isDateInRange:()=>v,isToday:()=>N,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>g,parseTimestamp:()=>z,toLocalDate:()=>P,toUtcDate:()=>R});var a={};r.r(a),r.d(a,{addAttribute:()=>Lr,editAttribute:()=>kr,editEndDate:()=>Gr,editRoles:()=>xr,editStartDate:()=>Vr,editTags:()=>$r,removeAttribute:()=>Mr});var o={};r.r(o),r.d(o,{EventType:()=>fb,applyCrosswalks:()=>vb,collectCrosswalksFromAttributes:()=>Ab,compareActivenessAttributes:()=>Ob,compareAttributes:()=>hb,compareImages:()=>bb,compareRoles:()=>Pb,compareTags:()=>Nb});var s={};r.r(s),r.d(s,{createHistoryManager:()=>wb});var l=r(50914);const u=e=>"string"==typeof e&&"function"==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,c=(e,t)=>(t=(u(t)||"").toLowerCase(),(e=(u(e)||"").toLowerCase()).includes(t)),p=(0,l.curry)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n="asc"===e.toLowerCase();return t=t.toLowerCase(),r=r.toLowerCase(),t<r?n?-1:1:t>r?n?1:-1:0})),d=(0,l.replace)(/(\r\n|\n|\r)/gm,"");var y=r(95038),f=r.n(y);const T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{startDate:t,endDate:r}=e,n=Date.now();return!(r&&r<n||t&&t>n)},E=(0,l.anyPass)([l.isEmpty,l.isNil]),m=e=>()=>new Promise(e),h=e=>Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e}))).catch((e=>({status:"rejected",reason:e})))))),b=e=>e&&e.isValid(),O=(0,l.either)(b,l.isNil),v=(e,t)=>r=>!!(0,l.isNil)(r)||f()(r).isBetween(e,t,"days","[]"),g=e=>e&&e.toDate(),_=e=>(e&&e.setHours(0,0,0,0),e),A=()=>`${f().localeData().longDateFormat("L")} ${f().localeData().longDateFormat("LTS")}`,N=e=>f()(e).isSame(Date.now(),"day"),P=e=>{const t=new Date(e),r=new Date("2023-01-05");return r.setFullYear(t.getUTCFullYear()),r.setMonth(t.getUTCMonth()),r.setDate(t.getUTCDate()),r.setHours(t.getUTCHours()),r.setMinutes(t.getUTCMinutes()),r.setSeconds(t.getUTCSeconds()),r.setMilliseconds(t.getUTCMilliseconds()),r},R=e=>{const t=new Date(e),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());return new Date(r)},S=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),w=S("startOf"),I=S("endOf"),U=e=>f()(e).format(f().localeData().longDateFormat("L")),C=e=>f()(e).format(f().localeData().longDateFormat("LTS")),D=e=>`${U(e)} ${C(e)}`,j=(0,l.equals)("9"),L=(0,l.equals)("99"),k=(0,l.equals)("9999"),F=(0,l.test)(/^[az][az][az]$/),M=(0,l.test)(/^[az][az][az][az]$/),x=(0,l.test)(/^9+$/),$=(0,l.test)(/^[9az]+$/),V=(0,l.cond)([[j,(0,l.always)("M")],[L,(0,l.always)("MM")],[F,(0,l.always)("MMM")],[M,(0,l.always)("MMMM")],[$,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),G=(0,l.cond)([[j,(0,l.always)("D")],[L,(0,l.always)("DD")],[$,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),B=(0,l.cond)([[j,(0,l.always)("y")],[L,(0,l.always)("YY")],[k,(0,l.always)("YYYY")],[x,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),W=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),j),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),L),(0,l.always)("hh")],[j,(0,l.always)("H")],[L,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),Y=(0,l.cond)([[j,(0,l.always)("m")],[L,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),q=(0,l.cond)([[j,(0,l.always)("s")],[L,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),H=/([9az]+)([^9az]+)*/g,J=e=>{const t=[...e.toLowerCase().matchAll(H)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t);return(0,l.join)("",[V(e),r,G(n),i,B(a),o])}return e},K=/(9+)([^9]+)*/g,Q=e=>{const t=[...e.toLowerCase().matchAll(K)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[W(e,s),r,Y(n),i,a?q(a):"",o]),c=s?" A":"",p=(0,l.pipe)(l.init,(0,l.append)(c));return(0,l.pipe)((0,l.when)((0,l.always)(s),p),(0,l.join)(""))(u)}return e},X=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${J(t)} ${Q(r)}`},z=e=>{const t=Number(e);return Number.isNaN(t)?e:t},Z=e=>{const[t,r]=e;return f()().subtract(t,r).valueOf()},ee=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt(0))).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0";class te{constructor(e){this.value=void 0,this.value=e}isNone(){return(0,l.isNil)(this.value)}extract(){return this.value}orSome(e){return(0,l.isNil)(this.value)?e:this.value}map(e){return(0,l.isNil)(this.value)?te.None():te.Some(e(this.value))}static Some(e){return new te(e)}static None(){return new te(null)}static fromFalsy(e){return e?te.Some(e):te.None()}static fromNull(e){return(e=>null==e)(e)?te.None():te.Some(e)}static fromUndefined(e){return void 0===e?te.None():te.Some(e)}static fromEmpty(e){return E(e)?te.None():te.Some(e)}}const re=(e,t)=>{let r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];const o=()=>{e.apply(this,i),r=null};r&&clearTimeout(r),r=setTimeout(o,t)}},ne=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},ie=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ae=e=>Array.isArray(e)?e:[e],oe=e=>[e],se=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),le=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),ue=e=>le(e=e||"")?`mailto:${e}`:!e.includes("://")&&(e.toLowerCase().startsWith("www.")||e.split(".").length>2)?`http://${e}`:e,ce=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),pe=e=>null!=e&&["object","function"].includes(typeof e),de=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),pe(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t};var ye=r(2507),fe=r.n(ye);const Te={EQUALS:"equals",NOT_EQUALS:"not equals",EXISTS:"exists",FULL_TEXT:"fullText",HAS_ALL:"hasAll",MISSING_VALUE:"missing",IN_RANGE:"range",LT:"lt",LTE:"lte",GT:"gt",GTE:"gte",STARTS_WITH:"startsWith",COUNT_EQUALS:"count.equals",COUNT_NOT_EQUALS:"count.not.equals",COUNT_LT:"count.less",COUNT_LTE:"count.less.or.equals",COUNT_GT:"count.greater",COUNT_GTE:"count.greater.or.equals",COUNT_RANGE:"count.range",IN_FILE:"in.file",NOT_IN_FILE:"not.in.file",CONTAINS:"contains",ON:"on",BEFORE:"before",AFTER:"after",WITHIN:"within"},Ee={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},me={[Te.EQUALS]:"equals",[Te.NOT_EQUALS]:"not",[Te.STARTS_WITH]:"starts with",[Te.MISSING_VALUE]:"missing value",[Te.IN_RANGE]:"in range",[Te.HAS_ALL]:"has all",[Te.FULL_TEXT]:"full text",[Te.EXISTS]:"exists",[Te.COUNT_EQUALS]:"count equals",[Te.COUNT_NOT_EQUALS]:"count not equal",[Te.COUNT_LT]:"count less",[Te.COUNT_LTE]:"count less or equal",[Te.COUNT_GT]:"count greater",[Te.COUNT_GTE]:"count greater or equal",[Te.COUNT_RANGE]:"count in range",[Te.LT]:"less than",[Te.LTE]:"less than or equal",[Te.GT]:"greater than",[Te.GTE]:"greater than or equal",[Te.IN_FILE]:"in file",[Te.NOT_IN_FILE]:"not in file",[Te.CONTAINS]:"contains",[Te.ON]:"on",[Te.BEFORE]:"before",[Te.AFTER]:"after",[Te.WITHIN]:"within"};var he;!function(e){e.IN="in",e.NOT_IN="notIn",e.NOT_IN_RANGE="not range"}(he||(he={}));const be=e=>({[he.IN]:Te.EQUALS,[he.NOT_IN]:Te.NOT_EQUALS}[e]||e);var Oe,ve;!function(e){e.LAST_DAY="lastDay",e.LAST_WEEK="lastWeek",e.LAST_MONTH="lastMonth",e.LAST_6MONTHS="last6Months",e.LAST_YEAR="lastYear",e.PICK_DATE="pickDate"}(Oe||(Oe={})),function(e){e.LAST_3DAYS="last3Days"}(ve||(ve={}));const ge=["LAST_DAY","LAST_3DAYS","LAST_WEEK","LAST_MONTH","LAST_6MONTHS","LAST_YEAR","PICK_DATE"].reduce(((e,t)=>(e[t]=Oe[t]||ve[t],e)),{}),_e={[Oe.LAST_DAY]:"Last 24 hours",[ve.LAST_3DAYS]:"Last 3 days",[Oe.LAST_WEEK]:"Last 7 days",[Oe.LAST_MONTH]:"Last month",[Oe.LAST_6MONTHS]:"Last 6 months",[Oe.LAST_YEAR]:"Last year",[Oe.PICK_DATE]:"Pick date"},Ae={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},Ne={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Pe="<No label>",Re="__number";var Se;let we,Ie,Ue,Ce,De,je,Le,ke,Fe,Me,xe,$e,Ve,Ge,Be,We,Ye,qe,He,Je,Ke,Qe,Xe,ze,Ze,et,tt,rt,nt,it,at,ot,st,lt,ut,ct,pt,dt,yt,ft,Tt;var Et;!function(e){e.IN="in",e.OUT="out"}(Se||(Se={})),function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(we||(we={})),function(e){e.local="local",e.validationService="validationService"}(Ie||(Ie={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(Ue||(Ue={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(Ce||(Ce={})),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(De||(De={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(je||(je={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(Le||(Le={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(ke||(ke={})),function(e){e.asc="asc",e.desc="desc"}(Fe||(Fe={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Me||(Me={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(xe||(xe={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}($e||($e={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Ve||(Ve={})),function(e){e.PROFILE="profile",e.MAP="map"}(Ge||(Ge={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(Be||(Be={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(We||(We={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(Ye||(Ye={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(qe||(qe={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(He||(He={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(Je||(Je={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(Ke||(Ke={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(Qe||(Qe={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(Xe||(Xe={})),function(e){e.IN="in",e.OUT="out"}(ze||(ze={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(Ze||(Ze={})),function(e){e.BAR="bar",e.DONUT="donut",e.PIE="pie",e.TREE="tree",e.TABLE="table",e.BUBBLE="bubble",e.LINE="line",e.MAP="map",e.CLOUD="cloud"}(et||(et={})),function(e){e.ActivitiesViewFacet="ActivitiesViewFacet",e.CustomActionViewFacet="CustomActionViewFacet",e.DashboardFacet="DashboardFacet",e.EntitiesByTypeViewFacet="EntitiesByTypeViewFacet",e.FilteredSavedSearchesFacet="FilteredSavedSearchesFacet",e.FilteredEntitiesViewFacet="FilteredEntitiesViewFacet",e.NotificationInboxFacet="NotificationInboxFacet",e.ProfileStatsFacet="ProfileStatsFacet"}(tt||(tt={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttribute="com.reltio.plugins.entity.attributes.SingleAttributeView",e.AttributeTable="com.reltio.plugins.entity.attributes.AttributeTableView",e.Custom="com.reltio.plugins.ui.CustomActionView",e.Map="com.reltio.plugins.react.EntityMapView",e.ImageAttribute="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatches="com.reltio.plugins.entity.PotentialMatchesView"}(rt||(rt={})),function(e){e.Current="Current",e.Previous="Previous"}(nt||(nt={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(it||(it={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.NestedProfile="NestedProfileView",e.Search="SearchView",e.Tags="Tags",e.Pivoting="Pivoting",e.DCRReview="DCRReview",e.Authoring="Authoring"}(at||(at={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(ot||(ot={})),function(e){e.NEW="new",e.CLASSIC="classic"}(st||(st={})),function(e){e.ASC_BY_NAME="ascByName"}(lt||(lt={})),function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy",e.DIRECTED_NETWORK="Directed Network",e.TREE="Tree"}(ut||(ut={})),function(e){e.SET_HTML="setHtml",e.SHOW_POPUP="showPopup",e.HIDE_POPUP="hidePopup",e.LOG="log",e.SET_VISIBILITY="setVisibility",e.MESSAGE="message",e.SET_ENABLED="setEnabled",e.SET_TOOLTIP="setToolTip",e.SET_LABEL="setLabel",e.SET_HEIGHT="setHeight",e.SET_WIDTH="setWidth",e.RETURN_PROCESSED_API_RESPONSE="returnProcessedApiResponse",e.RETURN_PROCESSED_API_REQUEST="returnProcessedApiRequest",e.REQUEST="request",e.EVENT="event"}(ct||(ct={})),function(e){e.WORKFLOW="workflow",e.WORKFLOW_START_PROCESS_FROM_QUERY="workflow/startProcessFromQuery",e.API="api",e.GET_ENTITY_URI="getEntityUri",e.GET_ENTITY="getEntity",e.GET_API_PATH="getApiPath",e.WORKFLOW_GET_WORKFLOW_PATH="workflow/getWorkflowPath",e.GET_SEARCH_QUERY="getSearchQuery",e.GET_TENANT="getTenant",e.GET_USER="getUser",e.GET_PERSPECTIVE="getPerspective",e.SET_PERSPECTIVE="setPerspective",e.SET_ENTITY_URI="setEntityUri",e.ALERT="alert",e.CONFIRM="confirm",e.PROMPT="prompt",e.OPEN_WINDOW="openWindow",e.GET_CONFIGURATION="getConfiguration",e.GET_UI_CONFIGURATION="getUiConfiguration",e.OPEN_SEARCH="openSearch",e.WORKFLOW_CHECK_PERMISSION="workflow/checkPermission",e.RELOAD_PAGE="reloadPage"}(pt||(pt={})),function(e){e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.PIN_ATTRIBUTE="PIN_ATTRIBUTE",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e.CREATE_ENTITY="CREATE_ENTITY",e.CREATE_RELATIONSHIP="CREATE_RELATIONSHIP",e.UPDATE_TAGS="UPDATE_TAGS",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.DELETE_RELATIONSHIP="DELETE_RELATIONSHIP"}(dt||(dt={})),function(e){e.AWAITING_REVIEW="AWAITING_REVIEW",e.APPLIED="APPLIED",e.REJECTED="REJECTED"}(yt||(yt={})),function(e){e.ADDED="added",e.EDITED="edited",e.DELETED="deleted",e.PINNED="pinned",e.IGNORED="ignored",e.PIN_DELETED="pin_deleted",e.IGNORE_DELETED="ignore_deleted"}(ft||(ft={})),function(e){e.percent="percent"}(Tt||(Tt={})),function(e){e.TYPE_STRING="String",e.TYPE_TEXT="Text",e.TYPE_PASSWORD="Password",e.TYPE_LONG="Long",e.TYPE_INT="Int",e.TYPE_DOLLAR="Dollar",e.TYPE_FLOAT="Float",e.TYPE_DOUBLE="Double",e.TYPE_NUMBER="Number",e.TYPE_BOOLEAN="Boolean",e.TYPE_BOOLEAN_RADIO="Boolean_Radio",e.TYPE_DATE="Date",e.TYPE_TIMESTAMP="Timestamp",e.TYPE_ACTIVENESS_DATE="ActivenessDate",e.TYPE_LOCAL_DATE="LocalDate",e.TYPE_BLOB="Blob",e.TYPE_ENUM="Enum",e.TYPE_CIK_ID="cik id",e.TYPE_LOOKUP="Lookup",e.TYPE_TYPEAHEAD="Typeahead",e.TYPE_URL="URL",e.TYPE_BLOG_URL="Blog URL",e.TYPE_IMAGE_URL="Image URL",e.TYPE_EMAIL="Email",e.TYPE_DEPENDENT_LOOKUP="DependentLookup",e.TYPE_ENTITY_ID="EntityId",e.TYPE_RDM_LOOKUPS_NOT_RESOLVED="RdmLookupsNotResolved",e.TYPE_COUNT="Count",e.TYPE_FILE="File",e.TYPE_SELECT="Select",e.TYPE_NESTED="Nested",e.TYPE_REFERENCE="Reference",e.TYPE_IMAGE="Image",e.TYPE_SSN="SSN"}(Et||(Et={}));const mt=Et;let ht,bt;function Ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vt(e,t,r[t])}))}return e}function vt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(ht||(ht={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(bt||(bt={}));const gt={startDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return fe().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return fe().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},_t=Ot({id:{type:mt.TYPE_ENTITY_ID,get label(){return fe().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},gt,{roles:{type:mt.TYPE_STRING,get label(){return fe().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:mt.TYPE_STRING,get label(){return fe().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),At={workflow:{type:mt.TYPE_STRING,get label(){return fe().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:mt.TYPE_STRING,get label(){return fe().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:mt.TYPE_STRING,get label(){return fe().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},Nt={commenter:{type:mt.TYPE_STRING,get label(){return fe().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Pt={notResolved:{type:mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return fe().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Rt={createdBy:{type:mt.TYPE_STRING,get label(){return fe().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:mt.TYPE_STRING,get label(){return fe().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},St={matches:{type:mt.TYPE_COUNT,get label(){return fe().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:mt.TYPE_COUNT,get label(){return fe().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0},relevanceScore:{type:mt.TYPE_FLOAT,get label(){return fe().text("Relevance scores")},uri:"relevanceScore",name:"relevanceScores.relevance",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchAction:{type:mt.TYPE_STRING,get label(){return fe().text("Match action")},uri:"matchAction",name:"relevanceScores.actionLabel",singleValue:!0,hideForDataTenant:!0,faceted:!0}},wt={sourceSystems:{type:mt.TYPE_STRING,get label(){return fe().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:mt.TYPE_STRING,get label(){return fe().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:mt.TYPE_INT,get label(){return fe().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:mt.TYPE_STRING,get label(){return fe().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let It;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(It||(It={}));const Ut={[It.matchRules]:{type:mt.TYPE_STRING,get label(){return fe().text("Match Rules")},uri:It.matchRules,name:It.matchRules,faceted:!0,hideForDataTenant:!0},[It.MLRecommendedMatch]:{type:mt.TYPE_STRING,get label(){return fe().text("Match IQ")},uri:It.MLRecommendedMatch,name:It.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},Ct=Ot({},_t,At,Nt,Pt,Rt,St,wt,Ut,{type:{type:mt.TYPE_STRING,get label(){return fe().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),Dt="NOT_MATCH";var jt=r(13980),Lt=r.n(jt);const kt={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Ft=(0,l.equals)(kt.SUGGESTING),Mt=(0,l.equals)(kt.EDITING),xt=(0,l.equals)(kt.VIEWING),$t=(0,l.either)(Mt,Ft);function Vt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Gt(e,t,r[t])}))}return e}function Gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bt=Lt().oneOf(["mobile","tablet","desktop"]),Wt=Lt().shape({deviceTypes:Lt().oneOfType([Bt,Lt().arrayOf(Bt)]),roles:Lt().arrayOf(Lt().string)}),Yt=Lt().shape({value:Lt().string,lookupCode:Lt().string}),qt=Lt().shape({displayName:Lt().string,parent:Lt().string}),Ht=Lt().oneOfType([Lt().string,Lt().number,Lt().bool,Yt]),Jt=Lt().oneOfType([Ht,Lt().arrayOf(Ht)]),Kt=Lt().shape({fieldName:Lt().string,values:Lt().arrayOf(Jt),filter:Lt().string,type:Lt().string}),Qt=Lt().shape({minValue:Lt().number,maxValue:Lt().number}),Xt=Lt().shape({label:Lt().string,name:Lt().string,description:Lt().string,type:Lt().string,hidden:Lt().bool,faceted:Lt().bool,searchable:Lt().bool,uri:Lt().string,access:Lt().arrayOf(Lt().string),cardinality:Qt}),zt=Lt().shape({label:Lt().string,uri:Lt().string,typeColor:Lt().string,direction:Lt().string,startObject:Lt().object,endObject:Lt().object}),Zt=Lt().shape({typeColor:Lt().string,typeIcon:Lt().string,typeImage:Lt().string,label:Lt().string,uri:Lt().string,attributes:Lt().arrayOf(Xt)}),er=Lt().shape({uri:Lt().string,label:Lt().string,memberTypes:Lt().array,extendsTypeUri:Lt().string,attributes:Lt().arrayOf(Xt)}),tr=Lt().shape({uri:Lt().string,label:Lt().string,extendsTypeUri:Lt().string,relationshipTypeURIs:Lt().arrayOf(Lt().string)}),rr=Lt().shape({uri:Lt().string,description:Lt().string,label:Lt().string,schemaVersion:Lt().string,entityTypes:Lt().arrayOf(Zt),roles:Lt().arrayOf(Lt().object),groupTypes:Lt().arrayOf(Lt().object),relationTypes:Lt().arrayOf(zt),graphTypes:Lt().arrayOf(tr),interactionTypes:Lt().arrayOf(er),sources:Lt().arrayOf(Lt().object)}),nr=Lt().shape({uri:Lt().string,type:Lt().string}),ir=Lt().shape({uri:Lt().string,type:Lt().string}),ar=Lt().shape({value:Lt().object,ov:Lt().bool,type:Lt().string,uri:Lt().string}),or=Lt().shape({refEntity:Lt().oneOfType([Lt().array,Lt().object]),refRelation:Lt().oneOfType([Lt().array,Lt().object]),value:Lt().object,ov:Lt().bool,type:Lt().string,uri:Lt().string}),sr=Lt().oneOf((0,l.values)(kt)),lr=Lt().shape({type:Lt().oneOf(Object.values(we)).isRequired,attributeTypeUri:Lt().string.isRequired,parentUri:Lt().string.isRequired,uri:Lt().string,message:Lt().string}),ur={attributeType:Xt,showEmptyEditors:Lt().bool,lazy:Lt().bool,mode:sr,metadata:rr,ownError:lr,errors:Lt().arrayOf(lr),crosswalks:Lt().array,onAddAttributes:Lt().func,onAddOneMore:Lt().func,onDeleteAttribute:Lt().func,onChangeAttribute:Lt().func,additionalControlsRenderer:Lt().func,hideDeleteButton:Lt().bool,showNonOv:Lt().bool,state:Lt().oneOf(["deleted","edited"]),expanded:Lt().bool},cr=Vt({attributeValue:ar},ur),pr=Vt({attributeValue:or},ur),dr=Lt().shape({value:Lt().oneOfType([Lt().string,Lt().bool,Lt().number]),ov:Lt().bool,type:Lt().string,uri:Lt().string,lookupCode:Lt().string,lookupRawValue:Lt().string}),yr=Lt().shape({inRelations:Lt().arrayOf(Lt().oneOfType([Lt().object,Lt().string])),outRelations:Lt().arrayOf(Lt().oneOfType([Lt().object,Lt().string])),groups:Lt().arrayOf(Lt().string),entityTypes:Lt().arrayOf(Lt().string),nextEntry:Lt().object}),fr=Lt().oneOf(["asc","desc"]),Tr=Lt().shape({id:Lt().string,content:yr,allowOnlyCreateNew:Lt().bool,sortColumn:Lt().string,sortOrder:fr,"text-empty":Lt().string,max:Lt().number,icon:Lt().string,caption:Lt().string,canCreate:Wt,canRead:Wt,canUpdate:Wt,canDelete:Wt,editingEnabled:Lt().bool}),Er=Lt().shape({entityUri:Lt().string,entityType:Lt().string,entityLabel:Lt().string,object:nr}),mr=Lt().shape({relationUri:Lt().string,relationType:Lt().string,relationLabel:Lt().string,direction:Lt().string,object:ir}),hr=Lt().shape({entity:Er,relation:mr}),br=Lt().shape({value:Lt().string,isRawFilter:Lt().bool}),Or=Lt().shape({id:Lt().string,label:Lt().string,name:Lt().string,availableEntityTypes:Lt().array}),vr=[{label:fe().text("And"),value:"and"},{label:fe().text("Or"),value:"or"},{label:fe().text("And not"),value:"and not"},{label:fe().text("Or not"),value:"or not"}],gr="___!status_code!___",_r=(0,l.when)((0,l.is)(Object),JSON.stringify),Ar=e=>{var t;return(null==e?void 0:e[gr])||(null==e||null===(t=e.originalResponse)||void 0===t?void 0:t.status)},Nr=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([[(0,l.prop)("originalResponse"),(0,l.pipe)((0,l.path)(["originalResponse","status"]),(e=>((e,t)=>{switch(e){case 400:return fe().text("Bad Request");case 403:return fe().text("Forbidden");case 404:return fe().text("Not Found");case 405:return fe().text("Method Not Allowed");case 408:return fe().text("Request Timeout");case 500:return fe().text("Internal Server Error");case 502:return fe().text("Bad Gateway");case 503:return fe().text("Service Unavailable");case 504:return fe().text("Gateway Timeout");default:return t||fe().text("Something went wrong")}})(e,t)))],...n.map((e=>[(0,l.prop)(e),(0,l.pipe)((0,l.prop)(e),_r)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,_r]])(e)},Pr=e=>"AbortError"===e.name,Rr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},Sr=/[\n\r%#()<>?[\\\]^`{}|]/g,wr=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(Sr,encodeURIComponent)}`,Ir=e=>`data:image/gif;base64,${e}`,Ur=e=>{switch(e){case"minutes":return fe().text("minutes");case"hours":return fe().text("hours");case"days":return fe().text("days");case"weeks":return fe().text("weeks");case"months":return fe().text("months");case"years":return fe().text("years");default:return""}};var Cr=r(76665);function Dr(e,t,r,n){if(null==t){const i=`\n Uri is null or undefined.\n getPartInfo parameters when the error occurred:\n 1. name - ${e}\n 2. uri - ${t}\n 3. fullUri - ${r}\n 4. attrType - ${pe(n)?JSON.stringify(n):n}\n `;console.error(i)}const i={name:e,valueUri:r.substr(0,r.indexOf(t)+t.length)};return n&&n.uri&&(i.uri=n.uri.substr(0,n.uri.indexOf(e)+e.length)),i.hasChildren=i.valueUri!==r,i}function jr(e,t){const r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[];for(let i=0;i<r.length;i+=2)n.push(Dr(r[i],r[i+1],e,t));return n}function Lr(e,t,r,n,i,a,o){void 0===a&&(a=0);const s=jr(r,t)[a];if(!s){const s=`\n getInfoByUri(uri, attrType)[nestingLevel] returned undefined.\n getInfoByUri(uri, attrType): ${JSON.stringify(jr(r,t))}\n addAttribute params when error occurred:\n attributes: ${JSON.stringify(e)}\n attrType: ${JSON.stringify(t)}\n uri: ${r}\n value: ${JSON.stringify(n)}\n crosswalks: ${JSON.stringify(i)}\n nestingLevel: ${a}\n index: ${o}\n `;console.error(s)}if(s.hasChildren)return e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]),Lr(e[s.name].find((function(e){return e.uri===s.valueUri})).value,t,r,n,i,a+1,o);{if(e[s.name]||(e[s.name]=[]),null==n)return;const a=e[t.name],l=n,u=n;let c={value:n.refEntity||pe(l.value)&&!Array.isArray(l.value)?l.value:n,uri:r,type:t.uri};if(n.lookupCode){const e=c,t=n;e.value=t.value,e.lookupCode=t.lookupCode,c=e}if(u.refEntity){const e=c;e.refEntity=u.refEntity,e.label=u.label,c=e}if(u.refRelation){const e=c;e.refRelation=u.refRelation,c=e}return i&&(c.crosswalks=i),a.splice(o||0,0,c),n}}function kr(e,t,r,n,i,a){void 0===a&&(a=0);const o=jr(r,t)[a];if(!o){const o=`\n getInfoByUri(uri, attrType)[nestingLevel] returned undefined.\n getInfoByUri(uri, attrType): ${JSON.stringify(jr(r,t))}\n editAttribute params when error occurred:\n attributes: ${JSON.stringify(e)}\n attrType: ${JSON.stringify(t)}\n uri: ${r}\n value: ${JSON.stringify(n)}\n crosswalks: ${JSON.stringify(i)}\n nestingLevel: ${a}\n `;console.error(o)}if(!o.hasChildren){const o=e[t.name];let s,l=o&&o.find((function(e){return e.uri===r}));if(l){if("[object Object]"!==l.value.toString())Fr(n,l),i&&(l.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&o.filter((function(e){return!1===e.ov})).forEach(Fr.bind(null,n));else if(function(e){return void 0!==e.refEntity}(n)){const e=l;e.refRelation=n.refRelation,e.refEntity=n.refEntity,e.value=n.value,e.label=n.label,l=e}else null!==n.value&&void 0!==n.value&&null!==l.value&&"object"==typeof l.value&&(l.value=n.value,l.label=n.label);s=l.value}else s=Lr(e,t,r,n,i,a);return s}{const s=kr(e,o,o.valueUri,{},i,a);kr(s,t,r,n,i,a+1)}}function Fr(e,t){!function(e){return pe(e)}(e)?(t.value=e,t.lookupCode&&(t.lookupCode=e)):(t.value=e.value,t.lookupCode=e.lookupCode)}function Mr(e,t,r,n){void 0===n&&(n=0);const i=jr(r)[n];if(!i){const i=`\n getInfoByUri(uri, attrType)[nestingLevel] returned undefined.\n getInfoByUri(uri, attrType): ${JSON.stringify(jr(r,t))}\n removeAttribute params when error occurred:\n attributes: ${JSON.stringify(e)}\n attrType: ${JSON.stringify(t)}\n uri: ${r}\n nestingLevel: ${n}\n `;console.error(i)}if(i.hasChildren){const a=(e[i.name]||[]).find((function(e){return e.uri===i.valueUri}));a&&Mr(a.value,t,r,n+1)}else{const n=e[t.name];n&&(n.forEach((function(e,t){e.uri===r&&n.splice(t,1)})),0===n.length&&delete e[t.name])}}function xr(e,t){e.roles=t||[]}function $r(e,t){e.tags=t||[]}function Vr(e,t){e.startDate=t}function Gr(e,t){e.endDate=t}var Br=r(37164);const Wr="1Tempo4rary",Yr="1Tepmo4Rel",qr=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),Hr=(0,Br.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",16),Jr=()=>`${Hr()}${Date.now()}`,Kr=()=>`1Tempo4DCR${Jr()}`,Qr=e=>`${e}/uri$$${Jr()}`,Xr=e=>()=>Qr(e),zr=(e,t)=>{const r=qr(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return Qr(n)},Zr=e=>e&&e.includes("uri$$"),en=Xr("entities"),tn=Xr("relations"),rn=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),nn=(0,l.startsWith)("relations/"),an=(0,l.startsWith)("entities/"),on=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),sn=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),ln=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),un=(0,l.pipe)((0,l.split)("/"),l.head),cn=(0,l.pipe)((0,l.split)("/"),l.last),pn=e=>e.split(".").slice(0,2).join("."),dn=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},yn=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),fn=(e,t)=>{const r=e.split("/"),n=t.split("/");return 2===r.length?t:[n,r.slice(2,3),r.slice(3).map(((e,t)=>t%2?r[2]:e))].flat().slice(0,-1).join("/")},Tn=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},En=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),mn=e=>{const t=e.startsWith("configuration/")?3:2;return e.split("/").length===t},hn=e=>5===e.split("/").length,bn=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},On=e=>e.replace(/uri\$\$/g,Wr),vn=e=>null==e?void 0:e.startsWith("changeRequests/"),gn=e=>vn(e)&&e.includes("/changes/"),_n=e=>e.split("/changes/")[1],An=(0,l.prop)("referencedEntityTypeURI"),Nn=(0,l.prop)("relationshipTypeURI"),Pn=(0,l.prop)("referencedAttributeURIs"),Rn=(0,l.curry)(((e,t)=>(0,l.pipe)(Pn,(0,l.filter)((0,l.startsWith)(e)))(t))),Sn=Rn("configuration/relationTypes"),wn=Rn("configuration/entityTypes"),In=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),Un=(0,l.filter)(In),Cn=(e,t)=>!t||t.some((t=>ln(e.uri,t)));function Dn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jn=e=>(0,l.allPass)([(0,l.propSatisfies)((0,l.anyPass)([l.isNil,$n,on]),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",mt.TYPE_STRING)])(e),Ln=(0,l.has)("values"),kn=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(mt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(mt.TYPE_LOOKUP)],[Ln,(0,l.always)(mt.TYPE_ENUM)],[jn,(0,l.always)(mt.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",mt.TYPE_BOOLEAN),(0,l.always)(mt.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),Fn=(0,l.pipe)((e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Dn(e,t,r[t])}))}return e}({},e,{type:kn(e)})),(0,l.pick)(["type","values","lookupCode","uri","name","dependentLookupCode","singleValue"])),Mn=e=>!!e&&(!!e.autoGenerated&&e.type!==mt.TYPE_NESTED||!!e.parentAutoGenerated),xn=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),$n=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.startsWith)("configuration/"),l.not),Vn=e=>xn(e)?"analyticsAttributes":"attributes",Gn=(0,l.propEq)("hidden",!0),Bn=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("type")),(0,l.equals)(e))(t))),Wn=Bn(mt.TYPE_NESTED),Yn=Bn(mt.TYPE_REFERENCE),qn=Bn(mt.TYPE_IMAGE),Hn=(0,l.either)(Wn,Yn),Jn=(e,t)=>{const r=xn(e)?"analyticsAttributes":"attributes",n=e.split(`/${r}/`);return[r,...Array.isArray(t)?[...(0,l.chain)((0,l.prop)("name"),t),(0,l.last)(n)]:[...n.slice(1)]].join(".")},Kn=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),Qn=(0,l.pipe)(Kn,Boolean),Xn=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),zn=(0,l.both)(Qn,(0,l.pipe)(Kn,("rdm",(0,l.pipe)(un,(0,l.equals)("rdm")))));const Zn=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Vn({uri:t}),i=e=>e.split(`/${n}/`).length,a=(e.entityTypes||[]).concat(e.relationTypes||[]),o=r?a.find((0,l.propEq)("uri",r)):null,s=o?i(o.uri):0,u=(r,i)=>{const o=t.split(`/${n}/`).slice(0,i+1).join(`/${n}/`),s=(0,l.last)(o.split(`/${n}/`)),c=(r?r[n]||ti(e,r)||[]:a).find((e=>{let{uri:t,name:r}=e;return t===o||r===s})),p=c?[c]:[];return c&&o!==t&&p.push(...u(c,i+1)),p},c=u(o,s),p=c.length===i(t)-s;return p?c:[]},ei=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Zn(e,t,r);return n.length?(0,l.last)(n):null},ti=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;return(0,l.cond)([[(0,l.has)("analyticsAttributes"),(0,l.prop)("analyticsAttributes")],[(0,l.anyPass)([(0,l.propEq)("type",mt.TYPE_NESTED),(0,l.propEq)("type",mt.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(Pn,(0,l.map)((t=>ei(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},ri=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;const r=ti(e,t);return r&&Yn(t)?Un(r):r},ni=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],ii=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],ai=e=>ni.includes(e),oi=e=>ii.includes(e),si=[mt.TYPE_INT,mt.TYPE_LONG,mt.TYPE_NUMBER,mt.TYPE_FLOAT,mt.TYPE_DOUBLE,mt.TYPE_COUNT],li=e=>si.includes(e),ui=e=>[mt.TYPE_FLOAT,mt.TYPE_DOUBLE].includes(e),ci=[mt.TYPE_BOOLEAN,mt.TYPE_BOOLEAN_RADIO,mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],pi=e=>ci.includes(e),di=[mt.TYPE_URL,mt.TYPE_BLOG_URL,mt.TYPE_IMAGE_URL],yi=e=>di.includes(e),fi=Bn(mt.TYPE_EMAIL),Ti=e=>mt.TYPE_SSN===e;var Ei,mi=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(Ei||(Ei={}));const hi=(0,l.curry)(((e,t,r)=>{var n;const i=e===Ei.READ?["ROLE_UI_ALL","ROLE_UI_ALL_READONLY"]:["ROLE_UI_ALL"],a=null===(n=r[e])||void 0===n?void 0:n.roles;return!a||a.concat(i).some((e=>t.includes(e)))})),bi=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Oi=(0,l.curry)(((e,t)=>(0,l.pipe)(bi(e),(0,l.prop)("extendsTypeURI"))(t))),vi=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Oi(e,r)));return n(r)})),gi=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Oi(e,n);return r})),_i=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?_i(e,bi(e,t.extendsTypeURI),r):void 0,Ai=(e,t)=>{const r=t.map(gi(e));return(r.length?r.reduce(l.intersection):[])[0]},Ni=(e,t)=>_i(e,"string"==typeof t?bi(e,t):t,"typeImage"),Pi=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&vi(e,t,n.uri)?r.concat(n.uri):r),[]);function Ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Si=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),wi=(0,l.pipe)(Si,(0,l.propOr)("","label")),Ii=(0,l.curry)(((e,t)=>{const r=Si(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Ui=(0,l.curry)(((e,t,r)=>{const[n,i]=Ii(e,r);return vi(e,n,t)||vi(e,i,t)})),Ci=(0,l.pipe)((0,l.propOr)([],"relationTypes"),(0,l.reduce)(((e,t)=>{let{uri:r,label:n}=t;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ri(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Di=function(){let{reversedContextLabels:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},r=r=>n=>{let{label:i}=n;const a=r===(e?Se.OUT:Se.IN)?"startObject":"endObject",{directionalContext:o}=n[a];return"directed"===n.direction&&1===(0,l.propOr)(0,"length",o)&&(i+=` (${o[0].labelPattern})`),!(i in t)&&(t[i]=!0,!0)},n=r(Se.IN),i=r(Se.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},ji=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),Li=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Li(e,Si(e,t.extendsTypeURI),r):void 0;var ki;!function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE",e.INITIATE_CHANGE_REQUEST="INITIATE_CHANGE_REQUEST",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(ki||(ki={}));const Fi=(0,l.curry)(((e,t)=>e.every((e=>Mi(e,t))))),Mi=(0,l.curry)(((e,t)=>{const r=Mn(t);return xi(e,t)&&(e===ki.READ||!r)})),xi=(e,t)=>!t||!t.access||t.access.includes(e),$i=(0,l.curry)(((e,t,r)=>Mi(ki.READ,r)&&(Ft(t)?Mi(ki.INITIATE_CHANGE_REQUEST,r):Mi(e,r)))),Vi=$i(ki.CREATE),Gi=$i(ki.DELETE),Bi=$i(ki.UPDATE),Wi=Fi([ki.CREATE,ki.MERGE,ki.READ,ki.UPDATE]),Yi=Fi([ki.UPDATE,ki.READ,ki.CREATE]),qi=Fi([ki.UPDATE,ki.READ]),Hi=Fi([ki.DELETE,ki.UPDATE,ki.READ]),Ji=(0,l.curry)(((e,t,r)=>e[r]||e[((e,t)=>(0,l.pipe)((0,l.propOr)([],"matchGroups"),(0,l.find)((0,l.propEq)("uri",t)),(0,l.defaultTo)({}),(0,l.prop)("type"))(e))(t,r)]||e["*"])),Ki=(e,t,r)=>(0,l.pipe)((0,l.map)(Ji(e,t)),(0,l.filter)(l.identity))(r),Qi=(e,t,r)=>{const n=Ki(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Mi(ki.MERGE,r)},Xi=(0,l.curry)(((e,t,r,n)=>{const i=Si(e,n),[a,o]=Ii(e,n);return i&&Mi(ki.CREATE,i)&&vi(e,a,t.type)&&vi(e,o,r.type)})),zi=(e,t,r,n,i)=>{const a=bi(e,n.type),o=Ki(t,a,r).map((e=>{let{createRelation:t}=e;return t})).filter(l.identity);return o.some((t=>{let{inRelations:r=[],outRelations:a=[]}=t;return r.some(Xi(e,n,i))||a.some(Xi(e,i,n))}))},Zi=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=bi(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Qi(o,i,a),canAddRelation:zi(e,o,i,r,n),canMark:Mi(ki.UPDATE,a)&&Mi(ki.READ,a)}},ea=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>Zi(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),ta=xn,ra=(0,l.complement)(ta),na=Mi(ki.READ),ia=e=>{let{attributeType:t,mode:r}=e;return ra(t)&&Vi(r,t)&&!Gn(t)},aa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=Zr(r.uri),o=Bi(n),s=Vi(n);return(0,l.cond)([[ta,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},oa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=Zr(r.uri),s=Bi(n),u=Gi(n),c=la(ki.UPDATE,n,a,r),p=la(ki.DELETE,n,a,r);return(0,l.cond)([[ta,l.F],[(0,l.always)(o),l.T],[(0,l.always)(i),(0,l.allPass)([u,p])],[l.T,(0,l.allPass)([s,u,c,p])]])(t)},sa=(0,l.curry)(((e,t,r,n)=>{const i="Reference"!==n.type&&ti(t,n);return!i||!(0,l.pipe)((0,l.unless)(Array.isArray,l.of),(0,l.map)((0,l.prop)("value")))(r).some((r=>i.filter((e=>r&&!!r[e.name])).some((n=>!xi(e,n)||!sa(e,t,r[n.name],n)))))})),la=(0,l.curry)(((e,t,r,n,i)=>Ft(t)?sa(ki.INITIATE_CHANGE_REQUEST,r,n,i):sa(e,r,n,i))),ua=(0,l.both)((0,l.complement)(Gn),na),ca="SuperUser",pa="allTenants",da=[pa,"allCustomers"],ya=e=>{let{allowedPermissionsNames:t,permissionsNames:r,permissionsConfig:n,superUserEnvironments:i}=e;return t.map((e=>{switch(e){case r.NON_SECURED:return l.T;case r.SECURED:return e=>void 0!==e.userPermissions||void 0!==(null==e?void 0:e.roles);case r.ADMIN:return(e=>t=>((null==t?void 0:t.roles)||[]).includes(e))(r.ADMIN);default:return(t=n[e])?(e,r)=>{let{params:n}=r;return((e,t,r,n)=>{const i=(0,l.path)(["userPermissions","permissions"],e)||{};return Object.keys(i).filter((e=>{const t=e.split(":"),[n]=t;return n===r.serviceId||n===ca})).filter((e=>{const t=e.split(":"),[i,a=""]=t;let o=a.split(".");return o=(0,l.endsWith)(["*"],o)?o.slice(0,-1):o,(0,l.startsWith)(o,r.resourcePath)||((e,t,r)=>{if(e===ca){const e=r?da.concat(r.map((e=>`allTenants.${e}`))):da,n=r&&t[0]===pa?t.slice(0,2):t.slice(0,1);return e.map((e=>e.split("."))).some((e=>(0,l.startsWith)(n,e)))}})(i,o,n)})).some((e=>{const n=i[e];return r.privileges.every((e=>{const r=n[e],i=Array.isArray(r);return t?Array.isArray(r)&&r.some((e=>t=>t===e||"SuperUser:*"===t||t.startsWith("SuperUser:allTenants"))(t)):i}))}))})(e,n.tenant,t,i)}:l.F}var t}))},fa={NON_SECURED:"NON_SECURED",SECURED:"SECURED",ADMIN:"ROLE_ADMIN",CAN_EXPORT:"CAN_EXPORT",CAN_EXPORT_ACTIVITIES:"CAN_EXPORT_ACTIVITIES",CAN_IMPORT_ENTITIES_FROM_DT:"CAN_IMPORT_ENTITIES_FROM_DT",CAN_READ_ENTITIES_FROM_DT:"CAN_READ_ENTITIES_FROM_DT",CAN_START_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_START_PROCESS_INSTANCE_SEARCH_QUERY",CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY",CAN_CREATE_ENVIRONMENT_CONFIG_JAR:"CAN_CREATE_ENVIRONMENT_CONFIG_JAR",CAN_CREATE_CONFIG_JAR:"CAN_CREATE_CONFIG_JAR",CAN_VIEW_ENVIRONMENT_CONFIG_JAR:"CAN_VIEW_ENVIRONMENT_CONFIG_JAR",CAN_VIEW_CONFIG_JAR:"CAN_VIEW_CONFIG_JAR",CAN_MANAGE_WORKFLOW_DEFINITION:"CAN_MANAGE_WORKFLOW_DEFINITION",CAN_VIEW_WORKFLOW_DEFINITION:"CAN_VIEW_WORKFLOW_DEFINITION",CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION:"CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION",CAN_UPDATE_WORKFLOW_DATA_TASK:"CAN_UPDATE_WORKFLOW_DATA_TASK",CAN_READ_WORKFLOW_DATA_TASK:"CAN_READ_WORKFLOW_DATA_TASK",CAN_CONFIG_ENVIRONMENT_REGISTER:"CAN_CONFIG_ENVIRONMENT_REGISTER",CAN_UPDATE_PROCESS_INSTANCE:"CAN_UPDATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS:"CAN_EXECUTE_WORKFLOW_JOBS",CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE:"CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA:"CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA",CAN_VIEW_WORKFLOW_JOBS:"CAN_VIEW_WORKFLOW_JOBS",CAN_MAKE_BULK_UPDATE:"CAN_MAKE_BULK_UPDATE",CAN_OPEN_DATA_LOADER_EXECUTE:"CAN_OPEN_DATA_LOADER_EXECUTE",CAN_OPEN_DATA_LOADER_READ:"CAN_OPEN_DATA_LOADER_READ",CAN_BULK_DELETE_PROFILES:"CAN_BULK_DELETE_PROFILES",CAN_READ_MDM_DATA_ENTITIES:"CAN_READ_MDM_DATA_ENTITIES",IS_FREEMIUM_ADMIN:"IS_FREEMIUM_ADMIN",CAN_READ_DVF:"CAN_READ_DVF",CAN_READ_PREFERENCES:"CAN_READ_PREFERENCES",CAN_UPDATE_PREFERENCES:"CAN_UPDATE_PREFERENCES",CAN_CREATE_PREFERENCES:"CAN_CREATE_PREFERENCES",CAN_DELETE_PREFERENCES:"CAN_DELETE_PREFERENCES"},Ta={[fa.CAN_DELETE_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["DELETE"]},[fa.CAN_CREATE_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["CREATE"]},[fa.CAN_UPDATE_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["UPDATE"]},[fa.CAN_READ_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["READ"]},[fa.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[fa.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[fa.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[fa.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[fa.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[fa.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[fa.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[fa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[fa.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[fa.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[fa.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[fa.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[fa.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[fa.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[fa.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[fa.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[fa.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[fa.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[fa.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[fa.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[fa.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[fa.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[fa.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[fa.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[fa.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Ea=(0,l.curry)(((e,t,r)=>ya({allowedPermissionsNames:e,permissionsNames:fa,permissionsConfig:Ta}).some((e=>e(t,{params:{tenant:r}}))))),ma=Ea([fa.CAN_EXPORT]),ha=Ea([fa.CAN_EXPORT_ACTIVITIES]),ba=Ea([fa.CAN_IMPORT_ENTITIES_FROM_DT]),Oa=Ea([fa.CAN_READ_ENTITIES_FROM_DT]),va=Ea([fa.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),ga=Ea([fa.CAN_UPDATE_PROCESS_INSTANCE]),_a=Ea([fa.CAN_VIEW_WORKFLOW_DEFINITION]),Aa=Ea([fa.CAN_CONFIG_ENVIRONMENT_REGISTER]),Na=Ea([fa.CAN_UPDATE_WORKFLOW_DATA_TASK]),Pa=Ea([fa.CAN_READ_WORKFLOW_DATA_TASK]),Ra=Ea([fa.CAN_MANAGE_WORKFLOW_DEFINITION]),Sa=Ea([fa.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),wa=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),Ia=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Ua=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),Ca=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Da=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS]),ja=Ea([fa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),La=Ea([fa.CAN_CREATE_CONFIG_JAR]),ka=Ea([fa.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),Fa=Ea([fa.CAN_VIEW_CONFIG_JAR]),Ma=Ea([fa.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),xa=Ea([fa.CAN_VIEW_WORKFLOW_JOBS]),$a=Ea([fa.CAN_MAKE_BULK_UPDATE]),Va=Ea([fa.CAN_OPEN_DATA_LOADER_EXECUTE,fa.CAN_OPEN_DATA_LOADER_READ]),Ga=Ea([fa.CAN_BULK_DELETE_PROFILES]),Ba=Ea([fa.CAN_READ_MDM_DATA_ENTITIES]),Wa=Ea([fa.CAN_READ_DVF]),Ya=Ea([fa.IS_FREEMIUM_ADMIN]),qa=(0,l.reject)(Gn),Ha=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),qa,(0,l.filter)(e))(t),Ja=(0,l.curry)(((e,t)=>Ha((t=>ia({attributeType:t,mode:e})),t))),Ka=(0,l.curry)(((e,t)=>Ha((t=>ia({attributeType:t,mode:e})||ua(t)),t))),Qa=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(ua)),Xa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Xa(e)])))),za=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(ua),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...za(e)])))),Za=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Za(e)])))),eo=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.filter)(ua),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Za(e)])))),to=(0,l.pipe)(bi,(0,l.converge)(l.concat,[za,Za]));function ro(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){no(e,t,r[t])}))}return e}function no(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const io=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,io(e)))},t))),ao=e=>{var t;return ro({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},oo=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),so=(0,l.when)(oo,(0,l.dissoc)("values")),lo=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return ro({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["lookupCode"]),{dependentLookupCode:t})})),uo=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},co=(0,mi.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Xa,t).concat((0,l.chain)(Xa,r)).some(uo)})),po=e=>{let t=!1;const r=io((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?ro({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},yo=e=>{const t=co(e),r=(0,l.map)((e=>io((0,l.pipe)(so,(0,l.when)((0,l.always)(e),lo))))(t)),n=(0,l.map)(ao),i=(0,l.map)(po);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},fo=e=>t=>((t||[]).forEach((t=>{((null==t?void 0:t.attributes)||[]).forEach(e)})),t),To=e=>t=>{t.name&&!t.name.includes("/")||e.push(`Attribute name '${t.name}' is incorrect. Attribute uri is '${t.uri}'`),cn(t.uri)!==t.name&&e.push(`Attribute name '${t.name}' is not the same as last uri part of '${t.uri}'`)},Eo=e=>{const t=[];return(0,l.evolve)({entityTypes:fo(To(t)),relationTypes:fo(To(t))},e),t},mo=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),ho=(0,l.prop)("relationshipTypeURIs"),bo=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(Oo(e,t)))||[]})),Oo=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(Ui(e,t))},vo=(e,t)=>(0,l.pipe)(mo,(0,l.defaultTo)({}),ho,(0,l.defaultTo)([]),(0,l.chain)(Ii(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(bi(e)))(e,t),go=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),_o=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),Ao=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _o((0,l.complement)(go))(e)},No=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _o(go)(e)},Po=(0,l.pipe)(bi,(0,l.propOr)([],"matchGroups")),Ro=(e,t,r)=>(0,l.pipe)(Po,(0,l.find)((0,l.propEq)("uri",r)))(e,t),So=(0,l.curry)(((e,t,r)=>(0,l.pipe)(Ro,(0,l.propOr)(r,"label"))(e,t,r))),wo=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Po,(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),(0,l.includes)(l.__,r))))(e,t),i=(0,l.pipe)((0,l.map)((0,l.prop)("uri")),(0,l.without)(l.__,r),(0,l.map)((e=>({uri:e,label:e}))))(n);return[...n,...i]})),Io=e=>(0,l.partition)(go,e),Uo=(0,l.includes)(l.__,["and","or","not"]),Co=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),Do=(0,l.includes)(l.__,["equals","notEquals","in"]),jo=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return Uo(t)?jo(r):Co(t)?r.filter(on):Do(t)?r.map((0,l.prop)("uri")).filter(on):[]})),l.uniq),Lo=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(jo),l.uniq),ko=(0,l.pipe)(Po,Lo),Fo=(0,l.pipe)(wo,Lo),Mo=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},xo=(0,l.pipe)(Mo,za),$o=(e,t)=>(e.interactionTypes||[]).filter(((e,t)=>r=>{let{memberTypes:n}=r;return n.some(((e,t)=>r=>{let{objectTypeURI:n}=r;return n===t||vi(e,n,t)})(e,t))})(e,t)),Vo=e=>!!e.required,Go=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=(0,l.cond)([[on,bi(e)],[sn,Si(e)]])(t);return Bo(e,a,r,n,i)},Bo=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=e=>e.uri&&on(e.uri)&&3===e.uri.split("/").length;return!t||t.hidden&&!a(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!Mn(e)&&n(e,i))).flatMap((t=>{const a=t.required?[t]:[];if(r){let o;if(t.type===mt.TYPE_REFERENCE){if(i.some(Yn))return console.warn(`Misconfiguration - reference attribute ${t.uri} can be defined only as entity type first level attribute`),a;const s=Nn(t),l=Pn(t);o=Go(e,s,r,n,[...i,t]).filter((e=>l.some(ln(e.uri))))}else t.attributes&&(o=Bo(e,t,r,n,[...i,t]));o&&a.push(...o)}return a})):t.type===mt.TYPE_REFERENCE?Go(e,Nn(t),r,n,[...i,t]):[]},Wo=e=>{const t=(0,l.pipe)((0,l.pick)(["dataLabelPattern","dataTooltipPattern","secondaryLabelPattern"]),l.values,(0,l.filter)(l.identity))(e);return(0,l.filter)((0,l.anyPass)([e=>{const r=`{${e.name}.`,n=`{${e.name}}`;return(0,l.any)((0,l.anyPass)([(0,l.includes)(n),(0,l.includes)(r)]),t)},t=>(e.businessCardAttributeURIs||[]).includes(t.uri),Vo]),e.attributes||[])},Yo=(e,t)=>{const r=wn(e);return(0,l.pipe)((0,l.filter)((e=>r.includes(e.uri))),(0,l.sort)((n=r,(e,t)=>n.indexOf(e.uri)-n.indexOf(t.uri))))(t.attributes||[]);var n},qo=(0,l.curry)(((e,t)=>{const r=(t,n)=>{if(Array.isArray(n))return n.map((e=>r(t,e)));if(n&&"object"==typeof n){const e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=r(t,n[t]));return e}return"string"==typeof n&&e.includes(t)?fe().text(n):n};return r(null,t)})),Ho=["label","description","abbreviation","caption","toolTip"],Jo=e=>qo(Ho,e),Ko=(0,l.mergeRight)({attributeTypes:[],categoryTypes:[],changeRequestTypes:[],entityTypes:[],graphTypes:[],groupTypes:[],interactionTypes:[],relationTypes:[],roles:[],sources:[],survivorshipStrategies:[]}),Qo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=cn(t);return r.find((e=>{let{uri:t}=e;return cn(t)===n}))})),Xo=(0,l.curry)(((e,t)=>{const r=cn(t);return(0,l.pipe)(Qo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),zo=e=>{let{sources:t}=e;return(null==t?void 0:t.find((0,l.propEq)("uri","configuration/sources/Reltio")))?t:null==t?void 0:t.concat({uri:"configuration/sources/Reltio",label:"Reltio",icon:"images/source/reltio.png",abbreviation:"Reltio"})},Zo=(e,t)=>{let{sources:r=[]}=e;return r.find((e=>{let{uri:r,label:n}=e;return r===t||n===t||r.substring(r.lastIndexOf("/")+1)===t}))},es=(0,l.curry)(((e,t)=>{let{roles:r=[]}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),ts=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=bi(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function rs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ns(e,t,r[t])}))}return e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const is=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["attributes"];const i=n.reduce(((e,r)=>e.concat(t[r]||[])),[]);return as(i,e,t,r,n)},as=function(e,t,r){var n;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["attributes"];return te.fromNull(e&&e.length?e:null===(n=ti(t,r))||void 0===n?void 0:n.filter((0,l.complement)(Yn))).map((e=>e.map((e=>{const r=is(t,e,i,a);return r.length?rs({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(Hn),(0,l.prop)("children"))).filter(ua).filter(i).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},os=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return is(e,t,r,["attributes","analyticsAttributes"])},ss=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return is(e,t,r,["attributes"])},ls=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return is(e,t,r,["analyticsAttributes"])},us=e=>e.children?e.children.flatMap(us):e,cs=e=>e.children?[e,...e.children.flatMap(cs)]:e,ps=(0,l.curry)(((e,t)=>{let{groupTypes:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),ds=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return cn(r)===e})))),ys=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),ds("LUD")),(0,l.defaultTo)(r))(t||[])},fs=(e,t)=>{let{survivorshipStrategies:r}=e;return ds(t,r)},Ts=(0,l.allPass)([(0,l.complement)(l.isNil),Mi(ki.READ)]),Es=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Mi(ki.READ)]),ms=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),(0,l.anyPass)([Mi(ki.CREATE),Mi(ki.INITIATE_CHANGE_REQUEST)])]),hs=(0,l.curryN)(2,(0,l.pipe)(bi,Es)),bs=(0,l.curryN)(2,(0,l.pipe)(Si,Ts)),Os=e=>{let{ov:t}=e;return!1!==t},vs=(e,t)=>((e,t)=>yi(e.type)&&se(t))(e,t)||((e,t)=>fi(e.type)&&le(t))(e,t),gs=e=>t=>(0,l.cond)([[l.isNil,(0,l.always)(null)],[(0,l.pipe)((0,l.prop)(e),Array.isArray),(0,l.path)([e,0])],[l.T,(0,l.prop)(e)]])(t),_s=gs("refEntity"),As=gs("refRelation"),Ns=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],Ps=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},Rs=(0,l.prop)("objectURI"),Ss=(0,l.prop)("objectURI"),ws=(0,l.prop)("type"),Is=(0,l.pipe)(_s,(0,l.defaultTo)({}),Rs),Us=(0,l.pipe)(As,(0,l.defaultTo)({}),Ss),Cs=(0,l.pipe)(_s,(0,l.defaultTo)({}),ws),Ds=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type,uri:e.uri,value:e.value})));return(e||[]).concat(r)},js=(0,l.evolve)({refEntity:ie,refRelation:ie});function Ls(e,t,r,n){const i=Zn(e,r),a=bi(e,t.type)||Si(e,t.type);if(0===i.length)return null;const o=Vn(r);let s=[t],u=1;i[0].uri!==t.type&&(u=0);let c=null;const p=n?[]:null;let d=null;for(let e=u;e<i.length;++e){const t=e===i.length-1,r=i[e];let u=[];if(!Cn(r,d)){c=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const c=s.value||s[o]||{};let y=[];r.startObject&&r.endObject||(0,l.both)(mn,sn)(r.uri)?(y=((null==a?void 0:a.attributes)||[]).filter((e=>Nn(e)===r.uri||An(e)===r.uri)),d=y.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(y.push(r),d=null),y.forEach((a=>{const o=c[a.name];o&&(u=u.concat(o)),n&&t&&p.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=u),t&&(c=s)}return p||c}const ks=(e,t)=>{const[r,n,...i]=t.split("/"),a=(e[r]||[]).find((e=>{let{uri:t}=e;return t.endsWith("/"+n)})),o=i.join("/");return o&&a?ks(a.value,o):a},Fs=(0,l.curry)(((e,t)=>{if(!t.startsWith(e.uri))return;const[r,...n]=t.slice(e.uri.length+1).split("/"),i=n.join("/");return ks(e[r],i)}));function Ms(e){return(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value"])],[l.T,(0,l.prop)("value")]])(e)}const xs=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","ov"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","ov"])],[l.T,(0,l.pick)(["value","ov"])]]),$s=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","uri"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","uri"])],[l.T,(0,l.pick)(["value","uri"])]]),Vs=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.when)((()=>i.length>0),(0,l.pipe)((0,l.map)((0,l.prop)("value")),(0,l.map)(Vs(e,i)))))(r)})),Gs=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Gs(e)),e)(t))),Bs=(e,t)=>(0,l.curry)(((r,n)=>(0,l.pipe)(Vs(e,r),Gs(t))(n))),Ws=Bs(null,Ms),Ys=Bs(Os,Ms),qs=Bs(null,xs),Hs=Bs(Os,xs),Js=Bs(Os,$s),Ks=(e,t,r)=>{var n,i,a;return e.uri===t?null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=Fs(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},Qs=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Is,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Xs=(e,t)=>{const r=bn(t),n=(0,l.pipe)((0,l.split)("/"),(0,l.dropLast)(1),l.last)(t);return Ks(e,r,n)},zs=Object.values(gt),Zs=(0,l.includes)(l.__,zs),el=e=>zs.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function tl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rl(e,t,r[t])}))}return e}function rl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nl=(e,t)=>`${e}_${t}`,il=[Ct.matches.name,Ct.matchRules.name],al=(0,l.values)(At).map((e=>e.name)),ol=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,al)))),sl=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,il)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>nl(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),ll=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,ol(r),sl(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(nl(`dtPotentialMatches.${t.name}`,"")))))(Ct)},ul=(0,l.propEq)("uri",Ct.type.uri),cl=e=>(0,l.values)(Ut).some((0,l.propEq)("uri",null==e?void 0:e.uri)),pl=(0,l.propEq)("uri",wt.sourceSystems.uri),dl=Object.values(_t),yl=(0,l.includes)(l.__,dl),fl=e=>{let{entity:t,attributeType:r,value:n}=e;return tl({},t,{[r.uri]:void 0===n?r.defaultValue:n})},Tl=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},El=e=>{let{entity:t,attributeType:r,value:n}=e;return tl({},t,{[r.uri]:n})},ml=(0,l.propEq)("uri",_t.roles.uri),hl=(0,l.propEq)("uri",_t.tags.uri);function bl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ol(e,t,r[t])}))}return e}function Ol(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vl=e=>{let{parentUri:t,attributeType:r}=e;return bl({uri:zr(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[(0,l.either)(Hn,qn),(0,l.always)({value:{}})],[Qn,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),ai)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},gl=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ja(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),Xn,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=vl({parentUri:r,attributeType:e}),s=ri(n,e);s&&(a.value=gl({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||Xn(e))&&(o[t]=[a])}return o},_l=e=>{let{entity:t,metadata:r,mode:n,attrTypeFilter:i}=e;return Go(r,t.type,!0,i).reduce(((e,t)=>{const i=t.name,a=bn(t.uri);return(a===e.type?[{parentUri:e.uri,attributes:e.attributes}]:(Ls(r,e,a)||[]).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,a)=>{let{parentUri:o,attributes:s}=a;if(!s[i]||0===s[i].length){let i=Pl({entity:e,attributeType:t,parentUri:o,index:0});if(Hn(t)){const e=ri(r,t);i=Al({attributeType:t,subAttributes:e,metadata:r,mode:n,parentUri:o},i)}return i}return e}),e)}),t)},Al=(0,l.curry)(((e,t)=>{let{attributeType:r,subAttributes:n,metadata:i,mode:a,parentUri:o}=e;const s=Ls(i,t,r.uri).find((e=>{let{uri:t}=e;return ln(t,o)})),l=bl({},s,{value:gl({attributeTypes:n,parentUri:s.uri,mode:a,metadata:i})});return Sl({entity:t,attributeType:r,uri:s.uri,value:l})})),Nl=(0,l.curry)(((e,t)=>{let{metadata:r,attributeTypes:n,parentUri:i,mode:a}=e;const o=n.filter((e=>{let{name:r}=e;return!t[r]})),s=(0,l.mapObjIndexed)(((e,t)=>{const{type:i,attributes:o}=n.find((e=>t===e.name));return e.map((e=>{const{value:t,uri:n}=e;return i===mt.TYPE_NESTED?bl({},e,{value:Nl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return bl({},s(t),gl({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),Pl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;if(qn(r))return(0,l.evolve)({attributes:e=>bl({},e,{[r.name]:e[r.name]||[]})})(t);const u=vl({parentUri:n,attributeType:r}),c=Ms(u);return(0,Cr.ZP)(t,(e=>{Lr(e.attributes||e.value,r,u.uri,void 0!==o?o:c,a,s,i)}))},Rl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Cr.ZP)(t,(e=>{Lr(e.attributes||e.value,r,n.uri,Ms(n),a,o,i)}))},Sl=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Cr.ZP)(t,(e=>{kr(e.attributes||e.value,r,n,i,a,o)}))},wl=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Cr.ZP)(t,(e=>{Mr(e.attributes||e.value,r,n,i)}))},Il=e=>""===e,Ul=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([Il,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([Il,l.isNil]),"value"),l.T],[(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity")),l.T],[l.T,l.F]]),Cl=(0,l.reject)(Ul),Dl=e=>{let{deleteEmptyComplex:t,valueTransformer:r=l.identity}=e;return(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.map)((0,l.pipe)(r,(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(e=>Dl({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),Cl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},jl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Dl({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),js),deleteEmptyComplex:e})},Ll=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(jl(e),(0,l.reject)(l.isEmpty))},kl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Zs(r)?fl({entity:e,attributeType:r}):Pl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),Fl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Zs(r)?El({entity:e,attributeType:r,value:i}):Sl({entity:e,attributeType:r,uri:n,value:i})})),Ml=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Zs(r)?Tl({entity:e,attributeType:r}):wl({entity:e,attributeType:r,uri:n})})),xl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},$l="UrlThumbnail",Vl="CdnUrlThumbnail",Gl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(Os):(0,l.head)(n);return e&&e.value}return null})(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Bl=Gl(["CdnUrl","Url"],!0),Wl=Gl(["CdnUrlPreview","UrlPreview"],!0),Yl=Gl([Vl,$l],!0),ql=Gl([Vl,$l],!1),Hl=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[$n,(0,l.always)(t)],[(0,l.both)(xn,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=$n(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Zs(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ae)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Jl=(e,t,r)=>{const n=Qa(e),i=(0,l.any)(r?l.T:Os);return Hl(n,t,i)},Kl=(e,t,r,n,i,a)=>{const o=Zr(null==r?void 0:r.uri)?Ja(t,e):Ka(t,e);return Hl(o,r,((e,o)=>{const s=ia({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:Os,e)||$n(o)&&(0,l.has)(o.uri,r)||qn(o)&&(0,l.has)(o.name,r.attributes)||(null==a?void 0:a.includes(o.uri))}))};let Ql;const Xl=e=>{Ql=e};function zl(e,t){return Ql(e,t)}const Zl=e=>(t,r)=>new Promise(((n,i)=>{e(t,r,(e=>{n(e)}),((e,t)=>{i((0,l.when)((0,l.is)(String),(0,l.always)({errorMessage:e,errorCode:t}))(e))}),null)})),eu=50,tu=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=eu,offset:a=0,sortByDisplayName:o=!0,sortOrder:s=Fe.asc}=e;return zl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a,sortByDisplayName:o,sortOrder:s}),headers:{"Content-Type":"application/json"}})},ru=(0,l.once)((()=>zl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),nu=e=>zl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),iu=(e,t)=>zl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),au=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),ou=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),au),su=(0,l.pipe)((0,l.reject)(E),ou),lu=e=>te.fromNull(me[e]).map(fe().text).orSome(""),uu=(0,l.curry)(((e,t)=>`${e}_${t}`)),cu=(0,l.split)("_"),pu=(0,l.includes)("_"),du=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),yu=(0,l.curry)(((e,t)=>e.some(du(t)))),fu=yu([Te.IN_RANGE,Te.COUNT_RANGE,Te.WITHIN]),Tu=yu([Te.EXISTS,Te.MISSING_VALUE]),Eu=(0,l.cond)([[Tu,(0,l.always)(0)],[fu,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),mu=(0,l.complement)(Tu),hu=yu([Te.HAS_ALL,Te.EQUALS,Te.NOT_EQUALS]),bu=yu([Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE,Te.COUNT_RANGE]),Ou=yu([Te.IN_FILE,Te.NOT_IN_FILE]),vu=e=>{switch(e){case Te.COUNT_EQUALS:return Te.EQUALS;case Te.COUNT_NOT_EQUALS:return Te.NOT_EQUALS;case Te.COUNT_LT:return Te.LT;case Te.COUNT_LTE:return Te.LTE;case Te.COUNT_GT:return Te.GT;case Te.COUNT_GTE:return Te.GTE;case Te.COUNT_RANGE:return Te.IN_RANGE}},gu=yu([Te.ON,Te.BEFORE,Te.AFTER,Te.WITHIN,Te.NOT_EQUALS]),_u=yu([Te.WITHIN]),Au=[[Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE],[Te.NOT_IN_FILE,Te.IN_FILE],[Te.EQUALS,Te.NOT_EQUALS,Te.HAS_ALL],[Te.LT,Te.LTE,Te.GT,Te.GTE],[Te.MISSING_VALUE,Te.EXISTS],[Te.COUNT_RANGE],[Te.IN_RANGE],[Te.STARTS_WITH,Te.CONTAINS],[Te.FULL_TEXT],[Te.ON,Te.BEFORE,Te.AFTER,Te.NOT_EQUALS],[Te.WITHIN]],Nu=(e,t)=>Au.some((r=>r.includes(e)&&r.includes(t))),Pu=(0,l.pipe)(l.omit,l.values),Ru={OPTIONS_FOR_STRING:Pu(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_DATE:[Te.ON,Te.BEFORE,Te.AFTER,Te.WITHIN,Te.NOT_EQUALS,Te.MISSING_VALUE,Te.EXISTS,Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE,Te.COUNT_RANGE,Te.IN_FILE,Te.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:Pu(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_BLOB:Pu(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_NUMBER:Pu(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_LOOKUP:Pu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],Te),OPTIONS_FOR_ENUM:Pu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_ID:[Te.EQUALS,Te.NOT_EQUALS,Te.IN_FILE,Te.NOT_IN_FILE],OPTIONS_FOR_COUNT:[Te.EQUALS,Te.NOT_EQUALS,Te.LT,Te.LTE,Te.GT,Te.GTE,Te.IN_RANGE],OPTIONS_FOR_COMPLEX:[Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE,Te.COUNT_RANGE,Te.EXISTS,Te.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[Te.EQUALS,Te.NOT_EQUALS,Te.EXISTS,Te.MISSING_VALUE]},Su=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case mt.TYPE_TYPEAHEAD:case mt.TYPE_STRING:case mt.TYPE_PASSWORD:case mt.TYPE_TEXT:case mt.TYPE_CIK_ID:case mt.TYPE_URL:case mt.TYPE_BLOG_URL:case mt.TYPE_IMAGE_URL:case mt.TYPE_EMAIL:return Ru.OPTIONS_FOR_STRING;case mt.TYPE_LOOKUP:case mt.TYPE_DEPENDENT_LOOKUP:return Ru.OPTIONS_FOR_LOOKUP;case mt.TYPE_ENUM:return Ru.OPTIONS_FOR_ENUM;case mt.TYPE_DATE:case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_TIMESTAMP:case mt.TYPE_LOCAL_DATE:return Ru.OPTIONS_FOR_DATE;case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:return Ru.OPTIONS_FOR_BOOLEAN;case mt.TYPE_BLOB:return Ru.OPTIONS_FOR_BLOB;case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_NUMBER:return Ru.OPTIONS_FOR_NUMBER;case mt.TYPE_ENTITY_ID:return Ru.OPTIONS_FOR_ID;case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[Te.EQUALS];case mt.TYPE_COUNT:return Ru.OPTIONS_FOR_COUNT;case mt.TYPE_NESTED:case mt.TYPE_REFERENCE:case mt.TYPE_IMAGE:return Ru.OPTIONS_FOR_COMPLEX;default:return Ru.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(bu,n):n},wu=e=>[xe.and,xe.andNot].includes(e),Iu=e=>[xe.or,xe.orNot].includes(e),Uu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),Iu)),Cu=(Du=[xe.and],e=>e.slice(0,-1).every((e=>Du.includes(e.operator))));var Du;const ju=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),Lu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),ku=e=>`(${e})`,Fu=e=>{const t=[],r={"{":"}","[":"]","(":")"},n=(0,l.invertObj)(r);for(let i=0;i<e.length;i++){const a=e[i];if(r[a])t.push(a);else if(n[a]&&r[t.pop()]!==a)return!1}return 0===t.length},Mu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[xe.or,xe.orNot],n=t?[xe.and,xe.andNot,...r]:r,i=n.map((e=>` ${e} `)).some((t=>e.includes(t))),a=e.startsWith("not"),o="("===(0,l.head)(e)&&")"===(0,l.last)(e)&&Fu(e.slice(1,-1));return!i&&!a||o?e:ku(e)},xu="and",$u=class{constructor(){this.clauses=[]}addClause(e){return e&&(this.clauses=this.clauses.concat(e)),this}build(){return this.clauses.join(" and ")}orBuild(){return`(${this.clauses.join(" or ")})`}buildWithOperators(e){return this.clauses.reduce(((t,r,n)=>{const i=0===t.length,a=(0,l.propOr)(xu,n,e),o=(e=>[xe.andNot,xe.orNot].includes(e))(a)?Mu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},Vu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),Gu=e=>t=>Array.isArray(t)?t.map(Gu(e)).toString():(e=>"object"==typeof e&&"lookupCode"in e)(t)?t.lookupCode:(0,l.when)((0,l.always)(!e),l.trim)(t.toString()),Bu=Gu(!0),Wu=Gu(!1),Yu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),qu=e=>`'${e}'`,Hu=e=>`"${e}"`,Ju=e=>(0,l.pipe)((0,l.map)(e),(0,l.join)(" or ")),Ku=(0,l.pipe)(Bu,Yu),Qu=(0,l.pipe)(Wu,Yu),Xu=(0,l.pipe)(Qu,qu),zu=(0,l.pipe)(Ku,qu),Zu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(fu(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),ec=(e,t)=>bu(t)?{type:mt.TYPE_INT}:Ou(t)?{type:mt.TYPE_FILE}:gu(t)&&!_u(t)&&oi(e.type)?{type:mt.TYPE_LOCAL_DATE}:e,tc=Object.values(ge),rc=e=>!Object.values(ge).includes(e),nc=e=>tc.includes(e),ic=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;return fe().text(t[e])},ac=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.values(Oe),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;return e.map((e=>({value:e,get label(){return ic(e,t)}})))},oc=e=>{const t=f()().startOf("minute");switch(e){case Oe.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case Oe.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case Oe.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case Oe.LAST_6MONTHS:return[f()(t).subtract(6,"months").valueOf(),t.valueOf()];case Oe.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()];case ve.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];default:return e}},sc=e=>{let[t,r]=e;return[f()(t).valueOf(),f()(r).endOf("date").valueOf()]},lc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oc;return(0,l.is)(String,e)?t(e):sc(e)};let uc;!function(e){e.CurrentUser="currentUser"}(uc||(uc={}));const cc={},pc=(e,t)=>{cc[e]=t},dc=e=>cc[e];function yc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fc(e,t,r[t])}))}return e}function fc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Tc=e=>["tags"].includes(e),Ec=e=>e.split("{CurrentUser}").join(dc(uc.CurrentUser)||""),mc=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),hc=(0,l.curry)(((e,t,r)=>{const n=r.map((0,l.cond)([[(0,l.always)(fu(e)||t.endsWith(".count")),Qu],[(0,l.always)(Tc(t)),zu],[l.T,Xu]])).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),bc=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Oc=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Eu(t);return(0,l.pipe)(bc(i),(0,l.map)(hc(t,r)),mc(" or "))(n)},vc=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Xu).join(",")})`},gc=e=>`*${e}*`,_c=e=>`URL:${e}`,Ac=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Nc=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===Te.IN_FILE?r:`not ${r}`},Pc=(e,t)=>[w(e,t),I(e,t)],Rc=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!Sc(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case Te.ON:return yc({},e,n?{filter:Te.EQUALS}:{filter:Te.IN_RANGE,values:[Pc(i,n)]});case Te.BEFORE:return yc({},e,{filter:Te.LTE,values:[[I(i,n)]]});case Te.AFTER:return yc({},e,{filter:Te.GTE,values:[[w(i,n)]]});case Te.WITHIN:return yc({},e,{filter:Te.IN_RANGE,values:[oc(i)]})}}return e}),Oc),Sc=(0,l.propSatisfies)(oi,"type"),wc=[[(0,l.prop)("rawFilter"),(0,l.pipe)((0,l.prop)("rawFilter"),Ec)],[(0,l.propEq)("filter",Te.HAS_ALL),(0,l.pipe)((e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Oc({filter:Te.EQUALS,fieldName:t,values:[r]}))),new $u).build())),mc(" or "))(r)}),Ec)],[(0,l.propEq)("filter",Te.CONTAINS),(0,l.pipe)((e=>{let{filter:t,fieldName:r,values:n}=e;return Oc({fieldName:r,filter:t,values:n.map((0,l.pipe)(Wu,gc))})}),Ec)],[(0,l.propEq)("filter",Te.EQUALS),(0,l.pipe)((e=>{const{fieldName:t,values:r}=e;return"type"===t?Oc(yc({},e,{values:(0,l.flatten)(r)})):Ac(r)?vc(yc({},e,{filter:"listEquals"})):Oc(e)}),Ec)],[(0,l.propEq)("filter",Te.NOT_EQUALS),(0,l.pipe)((e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Eu(t);return(0,l.pipe)(bc(i),(0,l.map)(hc(t,r)),mc(" and "))(n)})(yc({},e,{values:(0,l.flatten)(e.values)})):Sc(e)?(e=>{const{values:t}=e,r=!Sc(e),[n]=t;return(new $u).addClause(Oc(yc({},e,{filter:Te.LT,values:[w(n,r)]}))).addClause(Oc(yc({},e,{filter:Te.GT,values:[I(n,r)]}))).orBuild()})(e):Ac(t)?vc(yc({},e,{filter:"not listEquals"})):Oc(e)}),Ec)],[(0,l.propSatisfies)(Ou,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Oc({fieldName:r,filter:Nc(t,r),values:n.map((0,l.prop)("link")).map(_c)})}],[(0,l.propSatisfies)(bu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Oc({fieldName:`${r}.count`,values:n,filter:vu(t)})}],[(0,l.propSatisfies)(gu,"filter"),Rc],[(0,l.propEq)("fieldName","geoPolygon"),e=>{let{fieldName:t,values:[r]}=e;const n=(0,l.pipe)((0,l.map)((e=>{let[t,r]=e;return`${t},${r}`})),(0,l.join)(";"))(r);return hc(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return hc(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,(0,l.pipe)(Oc,Ec)]],Ic=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!mu(e)||Cc(e,r))},Uc=(e,t)=>Array.isArray(t)?Cc(e,t):e===Te.WITHIN?nc(t)||Number.isInteger(t):!(0,l.isNil)(t)&&Wu(t).length>0,Cc=(e,t)=>t&&t.length>0&&t.every((t=>Uc(e,t)));function Dc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jc=["relevanceScores"],Lc=e=>{let{fieldName:t=""}=e;const r=t.split(".");if(jc.includes(r[0]))return r[0];const n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},kc=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Fc=(e,t,r)=>"children"===e?xc(r,[...t][0],!0):r,Mc=(e,t,r)=>"values"===e?[...r,...t]:r,xc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.findIndex((0,l.propEq)("fieldName",t.fieldName));if(n>=0){const i=e[n];if("children"in i&&"children"in t)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Fc,t),e);if(!r&&hu(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Mc,t),e)}return(0,l.append)(t,e)},$c=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Lc(e),r=e=>e.fieldName===t?e:r({fieldName:kc(e),children:[e]});return r(e)})(t);return xc(e,r)}),[]),Vc=e=>e&&e.length>1&&!e.some((e=>{let{fieldName:t}=e;return null==t?void 0:t.startsWith("parent.")}))&&!e.every((0,l.has)("rawFilter")),Gc=e=>{let[t]=e;return t.children?Gc(t.children):t.operator},Bc=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=Gc(t)===xe.andNot,a=n(t,!1),o=i?`not ${Mu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Gc(r)||xu} ${s})`}function n(i){let a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.reduce(((i,o)=>i.addClause((0,l.cond)([[(0,l.has)("children"),e=>{let{children:i}=e;return a&&Vc(i)&&!t?r(i):n(i,a)}],...e])(o))),new $u).buildWithOperators(i.map((0,l.prop)("operator")))}return n},Wc=(0,l.pipe)((0,l.propOr)("","filter"),pu),Yc=(0,l.map)((0,l.when)(Wc,(e=>{const[t,r]=cu(e.filter);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Dc(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),qc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(Ic),Yc,$c,Bc([...e,...wc],t))},Hc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),Jc=[Te.ON,Te.BEFORE,Te.AFTER,Te.WITHIN,Te.NOT_EQUALS,Te.MISSING_VALUE,Te.EXISTS],Kc=[Te.EQUALS,Te.NOT_EQUALS,Te.STARTS_WITH,Te.MISSING_VALUE,Te.HAS_ALL,Te.FULL_TEXT,Te.EXISTS],Qc=[Te.EQUALS,Te.NOT_EQUALS,Te.LT,Te.LTE,Te.GT,Te.GTE,Te.IN_RANGE],Xc=(e,t)=>{const r=Fn(e);return(e=>{switch(e){case gt.startDate.name:case gt.endDate.name:case At.dueDate.name:case Rt.createdTime.name:case Rt.updatedTime.name:case wt.reltioLoadDate.name:case wt.createDate.name:case wt.updateDate.name:case wt.deleteDate.name:case wt.publishDate.name:return Jc;case St.matches.name:case wt.count.name:return Qc;case At.workflow.name:case At.assignee.name:case At.step.name:case Nt.commenter.name:case Rt.createdBy.name:case Rt.updatedBy.name:case wt.sourceSystems.name:case wt.value.name:return Kc;default:return null}})(t)||Su(r)},zc=[Te.EQUALS,Te.NOT_EQUALS,Te.CONTAINS,Te.STARTS_WITH,Te.MISSING_VALUE,Te.HAS_ALL,Te.IN_RANGE,Te.WITHIN,Te.EXISTS,Te.ON],Zc=(0,l.pipe)(Xc,(0,l.filter)((0,l.includes)(l.__,zc))),ep=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(Os);if(a&&a[0])if(n.length>0&&a[0].value)r=ep(a[0].value,[n.join(".")])[0].value;else if("label"in a[0]&&"string"==typeof a[0].label)r=a[0].label;else if(Object.prototype.hasOwnProperty.call(a[0],"label"))r="";else{var o;r=null!==(o=a[0].value)&&void 0!==o?o:""}return{key:t,value:r}}),""),tp=(e,t)=>{const r=new RegExp("{[^}]*}","g");let n,i=[];for(;null!=(n=r.exec(t));)i.push(n[0]);i=i.map((function(e){return e.substring(1,e.length-1)}));const a=ep(e.attributes||e.value,i);let o;return a.every((function(e){return void 0===e.value}))?o="":(o=t,o=o.replace(/\[[^\]]*]/g,(e=>{const t=e.match(/\{[^}]*}/g);return t?t.some((function(e){return e=e.substring(1,e.length-1).trim(),a.some((function(t){return t.key===e&&void 0===t.value}))}))?"":e.substring(1,e.length-1):e})),a.forEach((e=>{var t;o=o.replace("{"+e.key+"}",null!==(t=e.value)&&void 0!==t?t:"")}))),o},rp=/[,\s]*$/,np=e=>{const t=fe().text(Pe);if(!e)return t;const r=e.replace(rp,"");return""===r.toString().trim()?t:r},ip=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},ap=(e,t,r)=>{if("string"==typeof t)return t;if("Reference"!==r.type&&"Nested"!==r.type&&"Image"!==r.type)return"";if("Reference"===r.type){const n=ip(e,r.referencedEntityTypeURI);if(n)return tp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return tp({attributes:t||{}},r.dataLabelPattern);return""},op=e=>{let{uiPath:t,uri:r}=e;return`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},sp=e=>{let{uiPath:t,value:r,uri:n}=e;return`${t}#p~com.reltio.plugins.pivoting.default.DefaultPivotingPerspective_ps~pivoting_a~${encodeURIComponent(n)}_v~${encodeURIComponent(r)}`},lp=e=>{let{uiPath:t,tag:r,entityUri:n}=e;return`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},up=(0,l.curry)(((e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"")),cp=e=>(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),Yl,(0,l.prop)("value")))(e),pp=(e,t,r)=>{const n=(e=>(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),cp)(e))(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(Fs(e),cp)))(e))(r)||((e,t)=>{const r=(e=>{const t=t=>`${e.uri}/attributes/${t}`,r=(e=e||{}).imageAttributeURIs||[];return(0,l.uniq)([t("ImageGallery"),...r,t("Image"),t("ImageLinks")])})(bi(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>Ls(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,cp))(r)})(e,r)||Ni(e,r.type);return up(t,n)};function dp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yp(e,t,r[t])}))}return e}function yp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fp="DTSS/",Tp=e=>fp+e.dataTenant+"/"+e.uri,Ep=e=>(0,l.replace)(new RegExp("^DTSS/.+?/"),"",e),mp=e=>!(!e||!e.dataTenant),hp=e=>(0,l.startsWith)(fp,e),bp=e=>(0,l.pipe)((0,l.ifElse)(hp,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null)))(e),Op=e=>(0,l.ifElse)(mp,Tp,(0,l.prop)("uri"))(e),vp=e=>{return e&&e.uri?e.dataTenant?Tp(e):(t=e.uri,(0,l.replace)(new RegExp("^entities/"),"",t)):"";var t},gp=e=>(0,l.curry)(((t,r)=>(bi(t,r.type)||{})[e]||"")),_p=gp("label"),Ap=gp("typeGraphIcon"),Np=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=bi(e,t.type)||{},n=(r.attributes||[]).reduce(((e,t)=>(e[t.uri]=t,e[t.name]=t,e)),{});return t.attributes&&r.businessCardAttributeURIs?r.businessCardAttributeURIs.map((r=>{const i=n[r];if(!i)return null;const a=t.attributes[i.name];if(!a)return null;const o=Array.isArray(a)?a.find(Os)||"":a,s=o,l=o,u=null!=s.label?(s.relationshipLabel?s.relationshipLabel+", ":"")+s.label:l.value;return{text:ap(e,u,i),uri:o.uri}})).filter(l.identity):[]},Pp=(e,t)=>(0,l.pipe)(Np,(0,l.map)((0,l.prop)("text")),(0,l.join)(", "))(e,t),Rp=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,Sp=e=>(0,l.propOr)([],"matchRules",e),wp=(e,t,r,n)=>{var i,a,o;return t&&r?dp({},r.aEntity,{attributes:null!==(i=null==n?void 0:n.attributes)&&void 0!==i?i:{},roles:null!==(a=null==n?void 0:n.roles)&&void 0!==a?a:[],tags:null!==(o=null==n?void 0:n.tags)&&void 0!==o?o:[]}):e},Ip=(e,t,r)=>t&&r?r.aEntity:e,Up=e=>(0,l.evolve)({attributes:Ll(!0)})(e),Cp=(0,l.pipe)(Up,(0,l.props)(["attributes","startDate","endDate","roles","tags"]),(0,l.all)(E)),Dp=(0,l.curry)(((e,t)=>t?dp({},t,{dataTenant:e}):{dataTenant:e}));function jp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Lp(e,t,r[t])}))}return e}function Lp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kp=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s,(()=>E())),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+au(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;let T,E=l.identity;const m=()=>!e||f()||T?T||Promise.resolve():(T=new Promise((e=>{E=e})),Promise.resolve());return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f,getDcrUriAwait:m}},Fp=e=>!pe(e.value),Mp=e=>{const t=(t,n)=>i=>{if(!Fp(i)){var a,o;const s=`${n}/${null!==(a=i.refEntity)&&void 0!==a&&a.objectURI?cn(i.refEntity.objectURI):Kr()}`;let u;const c=e.objectsInfo[null===(o=i.refEntity)||void 0===o?void 0:o.objectURI];return c&&(u=c.label,c.isExist||(i.refEntity.objectURI=`${e.uri}/changes/${i.refEntity.objectURI}`)),jp({},i,{label:u,uri:s,value:(0,l.fromPairs)((0,l.map)(r(t,s),(0,l.toPairs)(i.value)))})}return jp({},i,{uri:`${n}/${Kr()}`})},r=(e,r)=>n=>{let[i,a]=n;return[i,(0,l.map)(t(`${e}/attributes/${i}`,`${r}/${i}`),a)]};return(0,l.evolve)({changes:(0,l.map)((0,l.map)((0,l.when)((0,l.propEq)("type",dt.CREATE_ENTITY),(0,l.evolve)({newValue:e=>{const{uri:t,type:n}=e;return(0,l.evolve)({attributes:(0,l.pipe)(l.toPairs,(0,l.map)(r(n,`${t}/attributes`)),l.fromPairs)},e)}}))))},e)};function xp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){$p(e,t,r[t])}))}return e}function $p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Vp=e=>{const t=Object.keys(e.changes).reduce(((e,t)=>(e[t]=en(),e)),{}),r=(r,i)=>a=>{if(!Fp(a)){var o;const s=Qr(i);let u={};const c=e.objectsInfo[null===(o=a.refEntity)||void 0===o?void 0:o.objectURI];return c&&(u={refEntity:xp({},a.refEntity,{objectURI:t[a.refEntity.objectURI]||a.refEntity.objectURI,type:c.type}),label:c.label}),xp({},a,u,{uri:s,value:(0,l.fromPairs)((0,l.map)(n(r,s),(0,l.toPairs)(a.value)))})}return xp({},a,{uri:Qr(i)})},n=(e,t)=>n=>{let[i,a]=n;return[i,(0,l.map)(r(`${e}/attributes/${i}`,`${t}/${i}`),a)]};return{tempEntities:(0,l.pipe)((0,l.prop)("changes"),(0,l.map)((0,l.pipe)((0,l.map)((0,l.ifElse)((0,l.propEq)("type",dt.CREATE_ENTITY),(0,l.pipe)((0,l.evolve)({newValue:r=>{const{uri:i,type:a}=r,o=e.objectsInfo[i];return(0,l.evolve)({attributes:(0,l.pipe)(l.toPairs,(0,l.map)(n(a,`${t[i]}/attributes`)),l.fromPairs)},xp({},r,{uri:t[i],label:null==o?void 0:o.label,secondaryLabel:null==o?void 0:o.secondaryLabel}))}}),(0,l.prop)("newValue")),(0,l.always)(null))),(0,l.reject)(l.isNil))),l.values,l.flatten)(e),entitiesUrisMap:t}},Gp="relation",Bp=(0,l.always)([Gp,"relationUri"]),Wp=(0,l.always)([Gp,"relationType"]),Yp=(0,l.always)([Gp,"object"]),qp=(0,l.always)([Gp,"direction"]),Hp=(0,l.always)([Gp,"object","attributes"]),Jp=(0,l.always)(["entity","entityUri"]),Kp=(0,l.always)([Gp,"startDate"]),Qp=(0,l.always)([Gp,"endDate"]),Xp=()=>{const e={newUriMap:{}};return{getUri:t=>(0,l.pathOr)(t,["newUriMap",t],e),addUriFromCreateRequest:t=>r=>{var n;return null!=r&&null!==(n=r[0])&&void 0!==n&&n.successful&&((t,r)=>{e.newUriMap=(0,l.assoc)(t,r,e.newUriMap)})(t,r[0].object.uri),r},hasNewUri:()=>!(0,l.isEmpty)(e.newUriMap)}};function zp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Zp(e,t,r[t])}))}return e}function Zp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ed=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:Xe.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},td=e=>{let{relationUri:t}=e;return{type:Xe.DELETE_RELATION,parameters:{relationUri:t}}},rd=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:Xe.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},nd=e=>{let{oldRelation:t,newRelation:r}=e;return{type:Xe.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},id=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:Xe.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},ad=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pathEq)(["parameters","relation","uri"],e),l.T],[(0,l.pathEq)(["parameters","relationUri"],e),l.T],[(0,l.pathEq)(["parameters","oldRelation","uri"],e),l.T],[(0,l.pathEq)(["parameters","newRelation","uri"],e),l.T],[l.T,l.F]])(t))),od=e=>e.type===Xe.DELETE_RELATION,sd=e=>e.type===Xe.CREATE_RELATION,ld=e=>e.type===Xe.REPOINT_RELATION,ud=e=>e.type===Xe.UPDATE_RELATION,cd=async e=>{const t=[];for(const r of e){const e=await r();t.push(e);const n=Array.isArray(e)&&e.find((0,l.has)("errors"));if(n)throw n.errors}return t.flat()},pd=e=>{let{type:t,parameters:r,dcrProcessor:n,relationUriProcessor:i}=e;const{enhanceUriWithDCR:a,updateDCRUriFromResponse:o}=n,s=e=>(o(e),e);switch(t){case Xe.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:o,attributes:l,startDate:u,endDate:c}=t;return vT({startEntityUri:e,endEntityUri:n,relationType:o,attributes:l,startDate:u,endDate:c,uriPreprocessor:a}).then(s).then(i.addUriFromCreateRequest(t.uri))};case Xe.DELETE_RELATION:return()=>{const{relationUri:e}=r;return OT(e,a).then(s)};case Xe.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return NT(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(s)};case Xe.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return gT({oldRelation:e,newRelation:t,uriPreprocessor:a}).then(s)};case Xe.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:a,isReversed:o}=r,{uri:s}=a,u=[td({relationUri:s}),ed({parentUri:o?e:t,relation:a,entityUri:o?t:e})];return(0,l.pipe)((0,l.map)(yd(n,i)),(0,l.map)(pd),cd)(u)}}},dd=e=>t=>()=>e().then(t),yd=(e,t)=>r=>zp({dcrProcessor:e,relationUriProcessor:t},r),fd=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=kp({alwaysCreateDCR:e,dcrUri:t}),n=Xp();return{commandExecutor:e=>(0,l.pipe)(l.flatten,(0,l.map)(yd(r,n)),(0,l.map)(pd),(0,l.map)(dd(r.getDcrUriAwait)),cd)(e),dcrProcessor:r,relationUriProcessor:n}},Td=e=>t=>(0,l.map)((t=>zp({},t,{parameters:(0,l.evolve)({parentUri:Dh(e),entityUri:Dh(e),newEntityUri:Dh(e)},t.parameters)})),t),Ed=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},md=(e,t)=>{const r=e.filter(sd).find(ad(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>ud(o)&&ad(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!ld(o)||!ad(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(Ed({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},hd=(e,t)=>{const r=e.filter(ld).filter(ad(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!ud(i)||!ad(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(Ed({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},bd=(e,t)=>{const r=e.filter(od).filter(ad(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!ad(t,e)))},Od=(e,t)=>{const r=e.filter(ud).filter(ad(t));let n=null;const i=e.filter((e=>!r.includes(e)||!ud(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(Ed({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},vd=e=>{const t=e.filter(od).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(bd,e)},gd=e=>{const t=e.filter(sd).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(md,e)},_d=e=>{const t=e.filter(ld).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(hd,e)},Ad=e=>{const t=e.filter(ud).map((e=>{let{parameters:{newRelation:{uri:t}}}=e;return t}));return(0,l.pipe)((0,l.filter)((e=>(0,l.count)((0,l.equals)(e),t)>1)),l.uniq,(0,l.reduce)(Od,e))(t)},Nd=e=>(0,l.pipe)(vd,gd,_d,Ad)(e);function Pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Rd(e,t,r[t])}))}return e}function Rd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Sd=e=>Pd({},(0,l.path)(Yp(),e),{startDate:(0,l.path)(Kp(),e),endDate:(0,l.path)(Qp(),e)}),wd=(e,t)=>(0,l.pipe)((0,l.path)(Jp()),Dh(t))(e),Id=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=wd(e,r),i=(0,l.path)(qp(),e)===ze.IN,a=e.parentEntityUri||n;return ed({parentUri:i?t:a,relation:Sd(e),entityUri:i?a:t})})),...o.map((t=>{const i=wd(t,r),a=(0,l.path)(qp(),t)===ze.IN,o=i!==(0,l.pipe)((0,l.path)(Yp()),a?sy:ly)(t),s=py(e,(0,l.path)(Bp(),t)),u=t.parentEntityUri||n,c=Dh(r,i);return o?id({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(Yp(),t),isReversed:!1}):nd({oldRelation:(0,l.path)(Yp(),s),newRelation:Sd(t)})})),...i.map((e=>td({relationUri:e}))),...s.map((e=>rd({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},Ud=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return Pd({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),Cd=(0,l.has)("dataTenant"),Dd=(0,l.ifElse)(Cd,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),jd=(e,t)=>(0,l.pipe)(Si,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(zs),qa)(e,t);function Ld(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kd(e,t,r[t])}))}return e}function kd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fd=e=>(0,l.prop)("uri",e),Md=e=>Fd(e)?e.uri:e,xd=e=>t=>Md(t)===e,$d=(0,l.curry)(((e,t)=>{const r=(n,i)=>{var a;let o=Md(i),s=!1;o.startsWith("!")&&(o=o.slice(1),s=!0);const u=e[o]&&Mi(ki.READ,e[o]),c=n.find(xd(o))||!u?n:n.concat(Fd(i)?Ld({},i,{uri:o}):null!==(a=t.find(xd(o)))&&void 0!==a?a:o);return s?c:(0,l.keys)(e).reduce(((t,n)=>e[n].extendsTypeURI!==o||t.find(xd(n))?t:r(t,n)),c)};return t.reduce(r,[])})),Vd=(0,l.curry)(((e,t)=>{const r=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r.reduce(((r,n)=>{const i=Md(n),a=(0,l.path)([i,t,"objectTypeUri"],e);return!a||r.find(xd(a))?r:r.concat(a)}),[])};return Ld({},t,{entityTypes:[...r("startObject",t.inRelations),...r("endObject",t.outRelations)]})})),Gd=(0,l.indexBy)((0,l.prop)("uri")),Bd=(0,l.curry)(((e,t)=>{const r=Gd(e.relationTypes),n=Gd(e.entityTypes),i=e=>(0,l.evolve)({inRelations:$d(r),outRelations:$d(r),entityTypes:$d(n),nextEntry:i},e);return(0,l.pipe)((0,l.unless)((0,l.either)((0,l.prop)("nextEntry"),(0,l.prop)("entityTypes")),Vd(r)),i)(t)})),Wd=(e,t)=>(0,l.evolve)({content:Bd(e)},t),Yd=(0,l.path)(Bp()),qd=(0,l.path)(Hp()),Hd=(0,l.path)(Jp()),Jd=(0,l.path)(Yp()),Kd=(0,l.path)(qp()),Qd=(e,t)=>(0,l.pipe)((0,l.when)((0,l.always)(t),(0,l.pick)(t)),l.values,(0,l.map)((0,l.props)(["relationToAdd","relationsToEdit"])),l.flatten,(0,l.reject)(l.isNil))(e),Xd=e=>[e,"relationsToEdit"],zd=e=>[e,"relationToAdd"],Zd=(e,t)=>(0,l.path)([t,"drafts"],e),ey=(e,t)=>(0,l.pathOr)([],Xd(t),e),ty=(e,t)=>(0,l.path)(zd(t),e),ry=(e,t)=>(0,l.concat)(ey(e,t),[ty(e,t)]),ny=(e,t,r)=>{const n=ry(e,t),i=n.findIndex((0,l.pathEq)(["relation","relationUri"],r));return(0,l.path)([i,"initial","modifiedEntity"],n)||null},iy=(e,t,r)=>{const n=ry(e,t),i=n.findIndex((0,l.pathEq)(["relation","relationUri"],r));return(0,l.path)([i,"initial","connection"],n)},ay=e=>{let{type:{uri:t,label:r},direction:n}=e;return e=>{const i=e.relationUri;return(0,l.pipe)((0,l.assoc)("relationType",t),(0,l.assoc)("relationLabel",r),(0,l.assoc)("object",{type:t,attributes:{},uri:i}),(0,l.assoc)("direction",n))(e)}},oy=(e,t,r)=>{const n=tp(t,e.dataLabelPattern),i=(0,l.lensProp)("entity");return(0,l.over)(i,(0,l.evolve)({entityLabel:(0,l.always)(n),object:{label:(0,l.always)(n)}}),r)},sy=(0,l.path)(["startObject","objectURI"]),ly=(0,l.path)(["endObject","objectURI"]),uy=(0,l.path)(["startObject","objectTypeURI"]),cy=(0,l.path)(["endObject","objectTypeURI"]),py=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(Bp()),(0,l.equals)(t))(r))return r;if(r.connections){const e=py(r.connections,t);if(e)return e}}},dy=(0,l.pipe)(py,(0,l.path)(Yp())),yy=(0,l.allPass)([(0,l.pipe)((0,l.path)(Jp()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(Wp()),(0,l.complement)(E))]),fy=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:tn()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=my({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=Ty(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?ay(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},Ty=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===1?e.length?{type:e[0],direction:Se.IN}:{type:t[0],direction:Se.OUT}:null},Ey=e=>e.uri||e,my=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&Vi(i,t)&&Bi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===Se.IN?"startObject":"endObject",{directionalContext:i}=t[n];return"directed"===t.direction&&1===(0,l.propOr)(0,"length",i)&&(r+=` (${i[0].labelPattern})`),!(r in o)&&(o[r]=!0,!0)}return!1},u=e=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],bi(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],bi(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(Ey,Si(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Se.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Se.OUT)),(0,l.map)(u))},t)||{}},hy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Di({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ii(e,n.uri);return n&&(!t||vi(e,i,t))&&(!r||vi(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],bi(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],bi(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(Ts,r));return{inRelations:(0,l.pipe)((0,l.filter)(a(e,null,t)),(0,l.filter)(n),(0,l.map)(o))(s),outRelations:(0,l.pipe)((0,l.filter)(a(e,t,null)),(0,l.filter)(i),(0,l.map)(o))(s)}},by=(0,l.curry)(((e,t,r,n,i)=>{const a=vi(n,l.__,t.type),o=e?cy:uy,s=vi(n,l.__,r.type),u=e?uy:cy;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),Oy=(e,t,r)=>{const n=e?cy:uy,i=(0,l.pipe)((0,l.map)(n),l.uniq)(r);return(0,l.pipe)((0,l.filter)((e=>{let{uri:r}=e;return i.some(vi(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function vy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gy=e=>{let{type:t,attributeType:r,attributeTypeUri:n,parentUri:i,uri:a,message:o,source:s}=e;return{type:t,uri:a,attributeTypeUri:n,attributeType:r,parentUri:i,message:o,source:s}},_y=e=>!e.deactivated,Ay=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},Ny=e=>Ay(e)+e.message,Py=(0,l.unless)(l.isNil,(0,l.prop)("message")),Ry=(0,l.unless)(l.isNil,(0,l.prop)("type")),Sy=(0,l.curry)(((e,t)=>ln(t.parentUri,e))),wy=(0,l.curry)(((e,t)=>t.parentUri===e)),Iy=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),ln(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(Pn,(0,l.any)(ln(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),Uy=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),Cy=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),Dy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([Vy,_y,Sy(e),Iy(t),(0,l.complement)(Cy(e,t.uri))]))(r)},jy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([Vy,_y,wy(e),Uy(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",we.missed))]))(r);return n&&n.message||""},Ly=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===we.missed))},ky=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_y,(0,l.propEq)("type",we.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(Bp(),e))]))(t)},Fy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_y,(0,l.propEq)("type",we.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},My=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([_y,Sy(t)]))(r)},xy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_y,(0,l.propEq)("type",we.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},$y=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?Wh(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case je.attributeValue:{const e=a;if(Wn(a))return tp(o,e.dataLabelPattern);if(Yn(a)){const t=o,i=Is(t),a=An(e),s=bi(n,a);return Zr(i)?tp(r[i],s.dataLabelPattern):t.label}return""}case je.tempEntity:return tp(o,a.dataLabelPattern);case je.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=bi(n,null==e?void 0:e.entityType);return`${np(i&&Zr(i)?tp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||wi(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vy(e,t,r[t])}))}return e}({},e,{label:np(t)})}))},Vy=e=>!e.severity||e.severity===Ue.ERROR,Gy=(e,t,r)=>(0,l.allPass)([(0,l.pipe)((0,l.prop)("uri"),E),(0,l.propEq)("parentUri",t),(0,l.propEq)("attributeTypeUri",r)])(e),By=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case mt.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(By(n))}));case mt.TYPE_REFERENCE:return!!_s(t);case mt.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),Wy=(e,t)=>e.every((0,l.complement)(By(t))),Yy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Go(e,t.type||t.relationType,!0,r);return n.reduce(((r,n)=>{const i=Ls(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!Os(e.parent))))).forEach((e=>{Wy(e.attrValues,n)&&r.push(gy({type:we.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:fe().text("Attribute is required"),source:Ie.local}))})),r}),[])},qy=(0,l.curry)(((e,t,r)=>Ls(e,t,r,!1))),Hy=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),bi(e),(0,l.prop)("attributes"),(0,l.defaultTo)([]),(0,l.reject)(Gn),(0,l.filter)(Yn),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(qy(e,t)));return(0,l.pipe)(r,(0,l.reject)(Is),(0,l.map)((e=>{let{uri:r}=e;return gy({type:we.missedRefEntity,uri:"",attributeTypeUri:fn(r,t.type),parentUri:r,message:fe().text("Entity is required"),source:Ie.local})})))(t)},Jy=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Is,Zr)).flatMap((n=>{const i=Is(n),a=t[i],o=ei(e,fn(n.uri,r.type));return Ky(e,t,o,a)})),Ky=(e,t,r,n)=>{const i=Pn(r),a=i.map((t=>ei(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",mt.TYPE_REFERENCE))).flatMap(Sn).concat(i);return Qy(e,t,n,(e=>a.some(ln(e.uri))))},Qy=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=Yy(e,r,n),a=Hy(e,r),o=Jy(e,t,r);return[...i,...a,...o]},Xy=(e,t)=>({attributes:{[e.name]:[t]},type:Tn(e.uri),uri:Tn(t.uri)}),zy=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Xy(t,r),a=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(r[0]||e).uri;return t.uri===n};return Qy(e,n,i,a)},Zy=(e,t)=>{const r=(0,l.path)(Yp(),t)||{};return Yy(e,r)},ef=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(Jp()),(0,l.ifElse)(Zr,(e=>t[e]),(0,l.always)(null)))(r),i=Zy(e,r),a=(e=>(0,l.path)(Jp(),e)?[]:[gy({type:we.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(Wp(),e),parentUri:(0,l.path)(Bp(),e),message:fe().text("Entity is required"),source:Ie.local})])(r),o=((e,t,r)=>r?Qy(e,t,r):[])(e,t,n);return[...i,...a,...o]},tf=e=>(0,l.path)(["entity","uri"],e)?[]:[gy({type:we.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:fe().text("Entity is required"),source:Ie.local})],rf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=Yy(e,r),i=tf(t);return[...n,...i]};function nf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const af=(e,t)=>{var r,n;const i=on(t)?bi(e,t):Si(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||co(e)},of=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),sf=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(of(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},lf=(e,t)=>(0,l.when)((0,l.prop)("refEntity"),(0,l.pipe)((0,l.when)((0,l.allPass)([(0,l.prop)("refRelation"),(0,l.always)("INSERT_ATTRIBUTE"===t),(0,l.pipe)(Us,Zr,l.not)]),(e=>{const t=(0,l.pipe)(Us,cn)(e);return sf((e=>e.replace(t,t+Yr)))(e)})),(0,l.when)((0,l.pipe)(Is,Zr),(t=>{const r=Is(t),n=e[r],i=n&&cf(n,e);return null!=i&&i.attributes?(0,l.evolve)({value:e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nf(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),uf=(e,t,r,n)=>vb(hb((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),Ab((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e,n).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(lf(r,e.type)),(0,l.map)(sf(On))))})(e))).concat(Ih(e,t)),cf=(e,t)=>(0,l.evolve)({attributes:Dl({valueTransformer:(0,l.pipe)(js,lf(t),of(On)),deleteEmptyComplex:!0}),uri:On})(e),pf=(e,t,r)=>e.flatMap((e=>{const{startObject:n,endObject:i}=((e,t)=>{const r=Kd(e)===ze.IN,n=e.entity,i=n&&{type:n.entityType,objectURI:On(n.entityUri||"")},a={type:t.type,objectURI:On(t.uri)};return{startObject:r?i:a,endObject:r?a:i}})(e,t),a=(0,l.pipe)(Jd,(0,l.pick)(["attributes","uri","type"]),(0,l.evolve)({attributes:Dl({valueTransformer:of(On),deleteEmptyComplex:!0}),uri:On}),(0,l.assoc)("startObject",n),(0,l.assoc)("endObject",i))(e),o=Hd(e),s=Zr(o)?cf(r[o],r):null;return s?[a,s]:[a]}));function df(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yf(e,t,r[t])}))}return e}function yf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ff=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(Wr,"g"),"uri$$$$").replace(new RegExp(Yr,"g"),""))),Tf=e=>(0,l.pipe)((0,l.evolve)({objectUri:ff,objectParentUri:ff}),(e=>{return df({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?we.missed:we.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&bn(e.objectUri),uri:e.objectUri,source:Ie.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),Ef=(e,t)=>(0,l.map)((0,l.pipe)(Tf,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=$y(t,s),p=null!=c&&c.length?c.slice(0,-1):$y(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&ei(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===je.attributeValue&&(a=e.valueType)}return a})(o,c,e);return df({},e,{attributeType:d,attributeTypeUri:null==d?void 0:d.uri,uri:c&&(null===(r=(0,l.last)(c))||void 0===r||null===(n=r.value)||void 0===n?void 0:n.uri)||s,parentUri:p&&(null===(i=(0,l.last)(p))||void 0===i||null===(a=i.value)||void 0===a?void 0:a.uri)||u,path:s?c:p})}),(e=>{let{entitiesMap:t,metadata:r}=e;return e=>{const{uri:n,parentUri:i,path:a,attributeTypeUri:o}=e;if(!n&&null!=a&&a.length&&i&&hn(i)){const n=(0,l.last)(a),i=n.valueType;if(Yn(i)&&wn(i).includes(o)){const i=Is(n.value),o=i&&Zr(i)?t[i]:null;return o?df({},e,{parentUri:o.uri,path:a.concat({type:je.tempEntity,value:o,valueType:bi(r,o.type),label:""})}):e}}return e}})(t)))(e),mf=e=>{if(e.type===De.AGO||e.type===De.WITHIN){const[t,r]=e.period;return"Number"===(0,l.type)(t)&&"String"===(0,l.type)(r)&&t>0}if(e.type===De.BETWEEN){const[t,r]=e.period;return t instanceof Date&&r instanceof Date}};var hf=r(51095);const bf=[],Of=r.n(hf)()(l.identity,((e,t)=>{let{parentUri:r}=t;return r}),((e,t)=>{let{attributeType:r}=t;return r}),((e,t,r)=>{const n=Dy(t,r,e);return 0===n.length?bf:n}))(((e,t)=>{let{parentUri:r,attributeType:n}=t;return`${r}-${n.uri}`})),vf=(e,t,r)=>Of(e,{parentUri:t,attributeType:r}),gf=e=>`equals(user, '${Yu(e)}')`,_f=e=>`equals(items.delta.sources, '${e.abbreviation}')`,Af=e=>`equals(items.objectType, '${e.uri}')`,Nf=e=>{const{period:t,type:r}=e;if(!mf(e))return"";switch(r){case De.WITHIN:return`gte(timestamp, ${Z(t)})`;case De.AGO:return`lte(timestamp, ${Z(t)})`;case De.BETWEEN:{const[e,r]=t;return`range(timestamp, ${e.valueOf()}, ${f()(r).endOf("date").valueOf()})`}default:return""}},Pf=e=>[`equals(items.objectUri, '${e}')`,`equals(items.startObjectUri, '${e}')`,`equals(items.endObjectUri, '${e}')`].join(" or "),Rf=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),Sf=e=>{let{query:t,body:r}=e;return t=Rf(t),zl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},wf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e];r&&n.push({filter:"containsWordStartingWith",fieldName:"attributes",values:[r]});const i={filter:(0,l.pipe)(qc(),Hc(t.globalFilter))(n),activeness:t.activityFilter||Ne.ACTIVE_ONLY,options:t.searchOptions};return(0,l.reject)(E,i)},If=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return zl("/entities/_total",{method:"POST",body:JSON.stringify(wf(e,t,r))})},Uf=e=>zl("/entities/_total",{method:"POST",body:JSON.stringify(Object.fromEntries(new URLSearchParams(e).entries()))}),Cf=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(Es),(0,l.map)((0,l.prop)("uri")))(e),i={filter:Te.EQUALS,fieldName:"type",values:n},a=r.isRawFilter?{rawFilter:t}:{filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(qc(),Hc(r.globalFilter))([i,a]),s=(0,l.reject)(E,{filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||Ne.ACTIVE_ONLY,max:r.max||4,options:r.searchByOv?"searchByOv":""});return zl("/entities/_typeAheadSearch",{method:"POST",body:JSON.stringify(s)})},Df=(0,l.pipe)((0,l.reject)(l.isNil),ou),jf=e=>{let{fieldName:t,searchParams:r=[],options:n={}}=e;const{globalFilter:i,activityFilter:a,searchOptions:o,max:s,pageNo:u}=n,c=(0,l.pipe)(qc(),Hc(i))(r),p=Df({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return Sf({query:p,body:d})},Lf=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return jf({fieldName:t,searchParams:i,options:n})};function kf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ff="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Mf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e,{filter:"containsWordStartingWith",fieldName:"attributes",values:[r]}],i=(0,l.reject)(E,{filter:(0,l.pipe)(qc(),Hc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Ff,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null,options:t.searchOptions});return i},xf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=Mf(e,t,r);return zl("/entities/_search",{method:"POST",body:JSON.stringify(n)})},$f=e=>qf(e,{select:"secondaryLabel"}),Vf=(e,t)=>{const{select:r=Ff,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),zl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Gf=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),Zr)),Bf=e=>{const{parentUri:t,attributeTypeUri:r,values:n=[],offset:i,defaultMaxValues:a,tenant:o,apiPath:s,searchQuery:u,filters:c=[],sorting:p,options:d="ovOnly"}=e,y=n.length,f=Gf(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Jn(r),m={attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(qc(),Hc(d.globalFilter))(h);return b&&(m.filter=b),p&&(m.sort=p.field,m.order=p.order),zl(`${s}/api/${o}/${t}/_object`,{method:"POST",body:JSON.stringify(m)})},Wf=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Yf={options:"sendHidden,addRefAttrUriToCrosswalk"},qf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yf;return zl(`/${e}${su(t)}`)},Hf=(e,t)=>qf(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kf(e,t,r[t])}))}return e}({},Yf,{explicitSurvivorshipGroup:t})),Jf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",body:JSON.stringify([e])},n=t("/entities");return zl(n,r)},Kf=e=>zl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Qf=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return zl(`/${e}/_clone${su({executeLCA:!1,valuesToCopy:r})}`,n)},Xf=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return zl(`/entities/_events/_total${ou({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},zf=(e,t)=>zl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",body:t}),Zf=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return zl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",body:JSON.stringify(r)})},eT=e=>qf(e,{select:"updatedTime"}),tT=e=>{let{entityUri:t,offset:r,max:n,filter:i,sort:a,order:o}=e;const s={offset:r,max:n,filter:i,sort:a,order:o};return zl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),ou)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},rT=e=>{const t=new FormData;return t.append("file",e),zl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=Nr(e,fe().text("Can't upload file"));return Promise.reject(t)}))},nT=e=>{let{containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,countResults:s=!1,findPublic:l=!0,includes:u,startsWith:c}=e;return zl(`/personal/findSavedSearches${ou({countResults:s,findPublic:l})}`,{method:"POST",body:JSON.stringify({containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,includes:u,startsWith:c}),headers:{"Content-Type":"application/json"}})},iT=e=>zl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),aT=e=>zl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),oT=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return zl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},sT=e=>{let{uri:t}=e;return zl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},lT=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),oT)(e),uT=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),oT)(e);function cT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pT=["max","offset","filter"],dT=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:dT(e)},t):function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cT(e,t,r[t])}))}return e}({},t,(0,l.pick)(pT,e)))),yT=e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Me.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Me.ALL,e)))return!1},fT=(0,l.omit)(["activeness"]),TT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=yT(t),{searchByOv:i}=r;t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(dT(e),(0,l.omit)(pT))(e))),fT,(0,l.omit)(["labels"])))(t);const a={limitCreditsConsumption:!0,activeness_enabled:n,options:i?"searchByOv":void 0},o=`/${e}/_connections${su(a)}`,s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)};return{url:o,options:s}},ET=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),mT=(0,l.reject)(l.isNil),hT=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),bT=e=>zl(hT(e),{method:"GET",headers:{"Content-Type":"application/json"}}),OT=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,hT);return zl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},vT=e=>{let{startEntityUri:t,endEntityUri:r,relationType:n,attributes:i,startDate:a,endDate:o,uriPreprocessor:s=l.identity}=e;const u={type:n,startObject:{objectURI:t},endObject:{objectURI:r},attributes:i?Ll()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(mT,ae,JSON.stringify);return zl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},gT=e=>{let{oldRelation:t,newRelation:r,uriPreprocessor:n=l.identity}=e;const i=(0,l.prop)("attributes"),a=(0,l.pipe)((0,l.prop)("uri"),(0,l.concat)(l.__,"/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk"),hT,n),o=hb(i(t),i(r),!1).concat(Ob(t,r));return zl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},_T=(e,t,r)=>{const{url:n,options:i}=TT(e,t,r);return zl(n,i).then(ET)},AT=(e,t)=>zl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),NT=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===Se.IN?a.inRelations=[n]:a.outRelations=[n],zl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},PT=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return zl(`${t}/recentSearches${su({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},RT=e=>zl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),ST=e=>{let{environment:t,tenant:r,createdDate:n}=e;return zl(`/recentSearches${su({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function wT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){IT(e,t,r[t])}))}return e}function IT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const UT={select:"label,secondaryLabel,name,type,startDate,endDate"},CT=(0,l.reject)(l.isNil),DT=(0,l.pipe)(CT,ou),jT=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i,signal:a}=e;const o=wT({},UT,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return zl(`/${t}/_tree${DT(o)}`,{method:"GET",headers:{"Content-Type":"application/json"},signal:a})},LT=e=>{let{uri:t,graphUri:r}=e;const n=wT({},UT,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return zl(`/${t}/_parents${DT(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},kT=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s,signal:l}=e;const u=wT({},UT,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return zl(`/${t}/_hops${DT(u)}`,{method:"GET",headers:{"Content-Type":"application/json"},signal:l})};function FT(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const MT=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},xT="/activities",$T=e=>{let{label:t,description:r}=e;return zl(xT,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:MT()}})};var VT;!function(e){e.userSearch="USER_SEARCH",e.profileView="USER_PROFILE_VIEW"}(VT||(VT={}));const GT=e=>{const t=su(e);return zl(xT+t,{method:"GET"})},BT=e=>zl(`/activities/_total${su(e)}`,{method:"GET"}),WT=e=>{const{entityUri:t}=e,r=FT(e,["entityUri"]);return zl(`/${t}/_activities${su(r)}`,{method:"GET"})},YT=e=>{const{entityUri:t}=e,r=FT(e,["entityUri"]);return zl(`/${t}/_activities/_total${su(r)}`,{method:"GET"})};function qT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){HT(e,t,r[t])}))}return e}function HT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const JT=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},KT=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return zl(JT({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},QT=e=>{let{workflowPath:t,url:r,tenant:n,method:i,data:a,headers:o}=e,s=r;return r.includes("http:")||r.includes("https:")||(s=JT({url:r,workflowPath:t,tenant:n})),zl(s,{method:i||"GET",body:JSON.stringify(a),headers:qT({"Content-Type":"application/json"},null!=o?o:{})})},XT=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=JT({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return zl(e,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(n)})}));return(0,l.pipe)((e=>e.map((t=>[e[0],t])).slice(1)),(0,l.map)(s(o,r)),(e=>Promise.all(e)),(0,l.andThen)(l.last))(n)},zT=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=JT({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?qT({},l,{comment:o}):l;return zl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},ZT=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=JT({url:`/tasks${s?su(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(qT({objectURIs:[i]},(0,l.reject)(E,a)))};return zl(u,qT({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},eE=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return zl(JT({url:"/tasks",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)({assignee:i,max:a,offset:o})})},tE=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return zl(JT({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(qT({max:a,offset:o},i))})},rE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return zl(JT({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},nE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return zl(JT({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},iE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},aE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return zl(JT({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},oE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},sE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},lE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},uE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a,processInstanceComment:o}=e;return zl(JT({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a,processInstanceComment:o})})},cE=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return zl(JT({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},pE=e=>{let{entityUri:t,max:r,deep:n,sort:i,order:a,activeness:o,filter:s,markMatchedValues:u,sources:c,rules:p}=e;const d={max:r,deep:n,filter:s,markMatchedValues:u,sort:i,order:a,activeness:o,sources:c,rules:p};return zl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),ou)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},dE=e=>{let{entityUri:t,max:r,sort:n,order:i,activeness:a,filter:o}=e;const s={max:r,filter:o,sort:n,order:i,activeness:a};return zl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),ou)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},yE=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return zl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},fE=(e,t,r)=>Promise.all(t.map((async t=>await zl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),TE=async(e,t)=>await fE(e,t,"NOT"),EE=async(e,t)=>await fE(e,t,"MATCH"),mE=async(e,t)=>await Promise.all(t.map((async t=>await zl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function hE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){bE(e,t,r[t])}))}return e}function bE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OE(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const vE=3e4,gE=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return zl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},_E=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return GE({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}})},AE=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return GE({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}})},NE=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return zl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},PE=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{dataTenant:a,uri:o}=n;return Promise.all(i.map((e=>{let{uri:n}=e;return NE({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},RE=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(mp,i);return Promise.all([s.length?yE(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return NE({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},SE=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return r.map((0,l.assoc)("matchRule",t))})),(0,l.reduce)(((e,t)=>{let{matchRule:r}=t,n=OE(t,["matchRule"]);const i=e.findIndex((e=>{let{object:{uri:t}}=e;return n.uri===t}));return-1===i?e.concat({object:n,matchRules:[r]}):(0,l.adjust)(i,(0,l.evolve)({matchRules:(0,l.append)(r)}),e)}),[])),wE=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),SE),IE=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return zl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(wE)},UE=e=>t=>{let{dtssPath:r,dataTenants:n=[],customerTenant:i,entity:a}=t;return Promise.all(n.map((t=>{let{id:n}=t;return e({dtssPath:r,dataTenant:n,customerTenant:i,entity:a}).then((0,l.map)((0,l.assocPath)(["object","dataTenant"],n))).catch((e=>(console.log(e),[])))}))).then(l.flatten)},CE=UE((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return zl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json",SearchMetadata:"AUTO"},body:JSON.stringify([{uri:a,type:o}])}).then(wE)})),DE=UE((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return zl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),jE=(e,t)=>{let{dtssPath:r,dataTenants:n=[],entity:i,customerTenant:a,dtssRequest:o}=e;return function(){if(r&&n&&n.length){const e=o({dtssPath:r,dataTenants:n,entity:i,customerTenant:a});return Promise.all([t(...arguments),e]).then(l.flatten)}return t(...arguments)}},LE=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return zl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},kE=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{dataTenant:o,uri:s}=i;return Promise.all(a.map((t=>{let{uri:i}=t;return LE(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},FE=kE("NOT"),ME=kE("MATCH"),xE=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(mp,a);return Promise.all([fE(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return LE(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},$E=xE("NOT"),VE=xE("MATCH");function GE(e){let{requestProvider:t=zl,url:r,options:n,dataTenant:i,customerTenant:a,dtssPath:o}=e;r=o.endsWith("/")&&r.startsWith("/")?r.slice(1):r;const s=n||{},{headers:l}=s;return t(`${o}${r}`,hE({},OE(s,["headers"]),{headers:hE({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const BE=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;const s=function(e){const t=Mf(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:"");return`/entities${su(t)}`}(t,r,n);return GE({url:s,dataTenant:i,customerTenant:a,dtssPath:o})},WE=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return GE({url:"/entities/_total",dataTenant:i,customerTenant:a,dtssPath:o,options:{method:"POST",body:JSON.stringify(wf(t,r,n))}})},YE=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a,options:o}=e;const{searchByOv:s}=o,{options:u}=TT(t,r);return GE({url:`entities/_connections/_getConnections${su({dataEntityUri:t,options:s?"searchByOv":void 0})}`,options:u,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(ET,(0,l.map)((0,l.evolve)({connections:(0,l.map)((0,l.pipe)((0,l.assocPath)(["entity","dataTenant"],n),(0,l.assocPath)(["relation","dataTenant"],n)))}))))},qE=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return GE({url:`${Wf(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},HE=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return zl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},JE=e=>{let{dtssPath:t,tenant:r}=e;return zl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET",timeout:vE})},KE=e=>{let{dtssPath:t,customerTenant:r}=e;return zl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r},timeout:vE})},QE=e=>{let{dtssPath:t,tenants:r}=e;return zl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET",timeout:vE})},XE=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return GE({url:Wf(t),dataTenant:r,customerTenant:n,dtssPath:i})},zE=()=>zl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function ZE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){em(e,t,r[t])}))}return e}function em(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tm=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=ZE({},n,{ordered:"true",orderBy:"LastName,FirstName",from:0,max:100},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,["select"]));return zl(`${t}/api/${r}/graph/search${su({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},rm=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return zl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:ZE({},n,i),headers:{"Content-Type":"application/json"}})},nm=(e,t)=>`${e}/${t}/comments`,im=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return zl(`${nm(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},am=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return zl(`${nm(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},om=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return zl(nm(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},sm=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return zl(`${nm(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},lm=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return zl(`${nm(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},um=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return zl(`${nm(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},cm=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return zl(`${nm(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},pm=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return zl(`${nm(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},dm=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=su({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return zl(`${nm(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function ym(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fm(e,t,r[t])}))}return e}function fm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Tm=e=>{let{tenant:t,servicesPath:r}=e;return zl(`${r}/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Em="graphExport",mm=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await vm({servicesPath:e,tenant:t,environment:r,namespace:Em,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(ym({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await vm({servicesPath:e,tenant:t,environment:r,namespace:Em,options:ym({method:"PUT"},o)})}catch(e){s=null}return s||(s=await vm({servicesPath:e,tenant:t,environment:r,namespace:Em,options:ym({method:"POST"},o)})),s},hm=e=>{let{servicesPath:t,key:r}=e;return zl(`${t}/settings${su({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},bm=e=>{let{servicesPath:t}=e;return zl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Om=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return zl(`${n}/plugins${su({tenant:t,user:r})}`,{method:"GET"})},vm=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return zl(`${n}/configService${su({tenant:t,environment:r,namespace:a,projection:o})}`,i)},gm=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return vm({tenant:t,environment:r,servicesPath:n,options:{method:"GET"}})},_m=e=>{let{servicesPath:t,stateHash:r}=e;return zl(`${t}/searchLink?key=${r}`,{method:"GET"})},Am=e=>{let{imageServicePath:t,environment:r,tenant:n,image:i}=e;const a=new FormData;return"string"==typeof i?(a.append("sourceUrl",i),a.append("upload","false")):a.append("file",i),zl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Nm=e=>zl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Pm=e=>{let{exportPath:t,tenant:r,options:n}=e;return zl(`${t}/${r}/activities${su(n)}`,{method:"POST"})};function Rm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Sm(e,t,r[t])}))}return e}function Sm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wm=e=>{const{entityUri:t}=e;return zl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Im=e=>{let{entityUri:t,crosswalk:r}=e;return zl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},Um=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return zl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[Rm({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),Rm({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},Cm=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return zl(`/${r}/_${n}${su({contributorURI:t})}`,{method:"POST"})},Dm=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return zl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},jm=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return zl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Lm=e=>{let{entityUri:t,crosswalkId:r}=e;return zl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function km(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fm(e,t,r[t])}))}return e}function Fm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mm=e=>{let{attributes:t=[],metrics:r=[]}=e;const n=r.length,i=t.length*n;return i>10?10:i},xm=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i,searchByOv:a}=e;const o=km({},n===Qe.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{}),s=ou(km({},n===Qe.ATTRIBUTE_TYPE?{numberOfThreads:Mm({attributes:r,metrics:i})||1}:{},a?{options:"searchByOv"}:{}));return zl(`/entityType/${cn(t)}/dataQuality/${n}${s}`,{method:"POST",body:JSON.stringify(o)})},$m=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return zl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${cn(n)}`,{method:"GET",headers:{env:i}})},Vm=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=Qe.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u,anomaly:c}=e;const p={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u,anomaly:c};return zl(`${t}/${r}/entityType/${cn(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(p)})},Gm=e=>{let{tenant:t,apiPath:r}=e;return zl(`${r}/permissions/${t}`,{method:"GET"})},Bm=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return zl(`/${t}${su({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Wm=e=>{let{attributeUri:t,value:r}=e;return zl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},Ym=e=>{let{attributeUri:t,value:r}=e;return zl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},qm=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return zl(`/${t}${su({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},Hm=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=su({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=Ll()([[{value:a}]]);return zl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Jm=e=>{let{entityUri:t,attributeName:r,value:n}=e;return zl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},Km=e=>{let{entityUri:t,attributeName:r}=e;return zl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function Qm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xm=e=>{let{entityUri:t}=e;return zl(`/${t}/_historicURIs`,{method:"GET"})},zm=e=>{let{entityUri:t,historicUris:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["entityUri","historicUris"]);return zl(`/${t}/_changesWithTotal${su(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Qm(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},Zm=(e,t)=>zl(`/${e}/_previousChange${su({timestamp:t})}`,{method:"GET"}),eh=(e,t)=>zl(`/${e}${su({time:t})}`,{method:"GET"});function th(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rh(e,t,r[t])}))}return e}function rh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nh=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a,noRetry:o}=e;const s=r||"GET";let l;return"GET"!==s&&(l=pe(n)?JSON.stringify(n):n),zl(t,{method:s,body:l,headers:th({"Content-Type":"application/json"},null!=i?i:{}),noRetry:o,noRequestProcessor:a})},ih=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=su({options:a.join(","),severity:o.join(",")});return zl(`${t}/validate/${i}/entity/${vp({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},ah=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return zl(`${t}/validate/${n}/entity${su({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},oh=e=>{let{validationServicePath:t,body:r,tenant:n,options:i=[],severity:a=[]}=e;return zl(`${t}/validate/${n}/relations${su({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},sh=e=>{let{tenant:t,apiPath:r}=e;return zl(`${r}/tenants/${t}/name`,{method:"GET"})},lh=e=>{let{tenant:t,apiPath:r}=e;return zl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},uh=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return zl(`${a}/preferences${su({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},ch=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a,value:o}=e,s={name:t,tenant:r,environment:n,user:i,values:[JSON.stringify(o)]};return zl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},ph=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return zl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},dh=e=>{const{servicesPath:t}=e;return zl(`${t}/getTokenForWorker`,{method:"GET"})},yh=e=>{let{entityType:t,attributeType:r,metrics:n,isTimeseries:i,period:a,dataLevel:o,type:s="text/csv",exportDQPath:l,tenant:u,dataType:c}=e;return zl(`${l}`,{method:"POST",headers:{"Content-Type":"application/json"},body:{entityType:t,attributeType:r,metrics:n,dataLevel:o,type:s,period:a,isTimeseries:i,tenant:u,dataType:c}})};var fh=r(47485);const Th=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=en(),s={attributes:gl({attributeTypes:n,parentUri:o,metadata:i,mode:a}),uri:o,type:t,timestamp:Date.now()};return r?function(e,t,r){const n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[]).find((e=>!e.lookupCode&&!e.dependentLookupCode&&"String"===e.type));if(n){const i=Ls(r,e,n.uri)[0];return i&&i.value?Sl({entity:e,attributeType:n,uri:i.uri,value:t}):Pl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},Eh=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Is),(0,l.filter)(Zr),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),mh=(0,l.curry)(((e,t)=>{const r=Eh(e=e||{},t=t||{});return r.concat((0,l.chain)(mh(e),r))})),hh=(0,l.curry)(((e,t)=>(0,l.pipe)(de,(0,l.filter)(e))(t))),bh=hh((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),Oh=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),Zr)),vh=e=>(0,l.pipe)(bh,Oh(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),gh=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(bh,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),_h=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),Zr),(0,l.omit)(["uri","timestamp"])),Ah=(0,l.pipe)(_h,Up),Nh=async(e,t,r)=>{if(!e)return null;const n=vh(e);if(n.length>0)for(const r of n)e=gh(r,t[r],e);const i=await Jf(Ah(e),null==r?void 0:r.enhanceUriWithDCR),a=(e=>(0,l.path)([0,"errors"],e))(i);if(a)throw a;if((0,l.has)("changes",i))return null==r||r.updateDCRUriFromResponse(i),((e,t)=>(0,l.pipe)((0,l.prop)("changes"),l.keys,(0,l.find)((e=>!(0,l.values)(t).includes(e))))(e))(i,t);const o=(e=>(0,l.pathOr)(e,[0,"object"],e))(i);return o.uri},Ph=async(e,t,r)=>{const n=Sh(e,t),i={};for(const t of n)i[t]=await Nh(e[t],i,r);return i},Rh=(0,l.curry)(((e,t)=>{const r=fh.Node(t);return vh(e[t]).forEach((t=>{const n=Rh(e,t);r.addEdge(n)})),r})),Sh=(e,t)=>(0,l.pipe)((0,l.map)(Rh(e)),(0,l.map)(fh.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),wh=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(_h))})),Ih=(e,t)=>[...Nb(e.tags||[],t.tags||[]),...Pb(e.roles||[],t.roles||[]),...bb(e,t),...Ob(e,t)],Uh=(e,t,r)=>[...vb(hb((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),Ab((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e,r),...Ih(e,t)],Ch=(0,l.pipe)(((e,t)=>{const r=(0,l.toPairs)(e);return(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)((e=>r.reduce(((e,t)=>{let[r,n]=t;return gh(r,n,e)}),e))))}),t)}),wh),Dh=(0,l.curry)(((e,t)=>(0,l.when)(Zr,(0,l.propOr)(l.__,t,e),t)));function jh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Lh(e,t,r[t])}))}return e}function Lh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kh=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return jh({},t,{[r]:{parents:n,children:i}})},Fh=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return jh({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},Mh=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t[e],a=Eh(t,i),o=kh({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>Mh(n.uri,t,[e],r)),o)},xh=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.reduce(((e,n)=>{const i=(0,l.path)(Bp(),n),a=t?Fh({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(Jp(),n),s=Zr(o)?[o]:[],u=kh({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>Mh(t,r,[i],e)),u)}),n)},$h=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return xh(r,e,t,Mh(e,t))},Vh=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return $h(t,r,n);if(nn(e)){const t=py(n,e);return t&&xh([t],null,r)}return r[e]?Mh(e,r):void 0},Gh=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>Gh(e,t))))},Bh=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>Bh(e,t))))},Wh=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=rn(t),u=$h(r,n,i),c=((e,t,r)=>{let{entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[];let s;for(let e=0;e<t.length;e++){const u=t[e],c=t[e+1]||r;if(nn(c)){if(s=py(i,c),!s)return null;o.push({type:je.relationConnection,value:s,valueType:Si(a,(0,l.path)(Wp(),s))});continue}if(nn(u)){const e=n[c];if(!e)return null;o.push({type:je.tempEntity,value:e,valueType:bi(a,e.type)});continue}const p=n[u],d=Qs(p,c),y=n[c];if(!d||!y)return null;o.push({type:je.attributeValue,value:d,valueType:ei(a,fn(d.uri,p.type))}),o.push({type:je.tempEntity,value:y,valueType:bi(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},Bh(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=nn(s),d=p?dy(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Si(a,d.type):bi(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:ti(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:je.tempEntity,value:T,valueType:bi(a,T.type)}),o.push({type:je.attributeValue,value:s,valueType:E}),m=s.value;const l=Is(s);T=l&&Zr(l)?n[l]:null}}return o},Yh=e=>e.every((e=>{let{type:t}=e;return[je.attributeValue,je.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===je.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null;let qh;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(qh||(qh={}));const Hh={[qh.insertAttribute]:{color:"#599E0E"},[qh.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[qh.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},Jh=e=>{switch(e){case"UPDATE_ATTRIBUTE":return qh.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return qh.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return qh.deleteAttribute;default:return""}},Kh="/",Qh=(0,l.pipe)((0,l.split)(Kh),(0,l.propSatisfies)((0,l.lte)(2),"length")),Xh=(0,l.pipe)((0,l.split)(Kh),(0,l.slice)(0,-2),(0,l.join)(Kh)),zh=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.has)(e),(0,l.prop)(e)],[()=>Qh(e),zh(Xh(e))]])(t))),Zh=e=>(0,l.pipe)(l.keys,(0,l.any)((0,l.startsWith)(e+Kh))),eb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=zh(e,t);return(0,l.isNil)(r)?Zh(e)(t)?"UPDATE_ATTRIBUTE":"":r},tb=function(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==n||null===(r=n[e])||void 0===r?void 0:r[t]},rb=e=>{let t=[];var r;return e&&(t.push({uri:e.uri,crosswalks:e.crosswalks,merges:e.merges}),null===(r=e.merges)||void 0===r||r.forEach((e=>{e.losers.forEach((e=>{t=t.concat(rb(e))}))}))),t},nb=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(sb,t),(0,l.propOr)([],"crosswalks",e))),e),ib=(e,t)=>{let r=e.crosswalks||[];var n;return t||null===(n=e.merges)||void 0===n||n.forEach((e=>{var t;null===(t=e.losers)||void 0===t||t.forEach((e=>{r=r.concat(ib(e))}))})),r},ab=e=>{let t=0;var r;return e?(null===(r=e.merges)||void 0===r||r.forEach((e=>{var r;null===(r=e.losers)||void 0===r||r.forEach((e=>{const r=ab(e);r>t&&(t=r)}))})),t+1):t},ob=(e,t)=>{if(Zr(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},sb=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},lb=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},ub=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},cb=(e,t)=>{const r=t.reduce(((e,t)=>(e["configuration/sources/"+t.name]=t,e)),{}),n=t.reduce(((e,t)=>(e[t.id]=t,e)),{});return(0,l.pipe)((0,l.map)((e=>{var t,i;if(r[e.type])return r[e.type];const a=null===(t=e.crosswalkExternalInfo)||void 0===t||null===(i=t.dtssInfo)||void 0===i?void 0:i.tenantId;return a&&n[a]?n[a]:void 0})),(0,l.reject)(l.isNil),l.uniq,(0,l.ifElse)((e=>{let{length:t}=e;return 1===t}),l.head,(()=>{})))(e)},pb=(0,l.eqBy)(sb),db=(0,l.pipe)((0,l.propOr)({},"attributes"),l.values,l.flatten,(0,l.filter)((0,l.has)("refRelation")),(0,l.chain)((e=>(0,l.pipe)(As,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e))));function yb(e){return e&&void 0!==e.uri}let fb;function Tb(e){return function(t,r){const n=[];return a=r,!(i=t)&&!a||!(!i||!a)&&i.length===a.length&&i.every((function(e,t){return e===a[t]}))||n.push({type:e,newValue:r}),n;var i,a}}function Eb(e){return void 0!==e.refEntity}function mb(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function hb(e,t,r){const n=[];for(const a in e)if(e.hasOwnProperty(a)){if("paging"===a)continue;const p=e[a];if(void 0===t[a])for(const e in p)p.hasOwnProperty(e)&&n.push(...o(p[e]));else for(const e in p)if(p.hasOwnProperty(e)){const f=p[e],T=y(f,t[a]);void 0===T?n.push(...o(f)):f.value===T.value||f.lookupCode&&f.lookupCode===T.lookupCode?f.ignored!==T.ignored&&n.push(...s(T)):null==T.value||""===T.value?n.push(...o(f)):"Nested"===d(f)?f.ignored!==T.ignored&&(0,l.equals)(f.value,T.value)?n.push(...s(T)):n.push(...hb(f.value,T.value,r)):"Reference"===d(f)?mb(f,T)?n.push(...hb(f.value,T.value,r)):(n.push(...o(f)),n.push(c([T]))):""!==T.value&&(!1===T.ov?n.push(...u(T)):n.push(...(i=T,[{type:fb.UPDATE_ATTRIBUTE,uri:i.uri,newValue:{value:i.lookupCode||i.value}}])))}}var i;for(const r in t)if(t.hasOwnProperty(r)){if("paging"===r)continue;let i=(t[r]||[]).filter((function(t){return void 0===y(t,e[r])}));i=a((0,l.clone)(i)),i.length&&n.push(c(i))}return n;function a(e){return e?e.map((function(e){let t;if(e){const r=e.value;return null!=r&&(pe(r)?Object.keys(r).forEach((function(e){const n=a(r[e]);n.length>0?r[e]=n:delete r[e],t||(t=0!==n.length)})):t=null!=r&&""!==r),t||e.lookupCode||e.refEntity?e:null}})).filter((function(e){return null!=e})):[]}function o(e){return[{type:fb.DELETE_ATTRIBUTE,uri:e.uri}]}function s(e){return e&&(e.ignored?function(e){return[{type:fb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:fb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!1}}]}(e))}function u(e){const t=e.uri.lastIndexOf("/"),r=e.uri.substr(0,t);return[{type:fb._UPDATE_NON_OV_ATTRIBUTE,uri:e.uri,typeUri:r,value:e.lookupCode||e.value}]}function c(e){let t=e[0].uri;const n=t.lastIndexOf("/");return t=t.substr(0,n),{type:fb.INSERT_ATTRIBUTE,uri:t,newValue:e.map((function(e){let t;const n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),p(n.value),Eb(e)&&(e.refEntity&&(t=e.refEntity,Array.isArray(t)&&(t=t[0]),n.refEntity=t),e.refRelation&&(t=e.refRelation,Array.isArray(t)&&(t=t[0]),r||delete t.objectURI,n.refRelation=t)),n}))}}function p(e){if(null!==e&&"[object Object]"===e.toString())for(const t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,p(e.value)}))}function d(e){const t=e.value;if(pe(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function y(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function bb(e,t){const r=[];var n,i;return e.defaultProfilePic!==t.defaultProfilePic?r.push({type:fb.UPDATE_PROFILE_PIC_BY_URI,newValue:{value:t.defaultProfilePic}}):(n=e.defaultProfilePicValue)===(i=t.defaultProfilePicValue)||yb(n)&&yb(i)&&n.uri===i.uri||r.push({type:fb.UPDATE_PROFILE_PIC_BY_URL,newValue:{value:t.defaultProfilePicValue}}),r}function Ob(e,t){const r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:fb.UPDATE_START_DATE,newValue:{value:n}});const i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:fb.UPDATE_END_DATE,newValue:{value:i}}),r;function a(e,t){let r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function vb(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i="configuration/sources/Reltio",a="configuration/sources/ReltioCleanser";function o(e,t){return e.crosswalk={type:t.type,value:t.value},e}function s(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}function l(e){return e.removeIt=!0}const u=e.map((function(e){if(e.crosswalk)return[e];const s=gb(t,e.uri),l=s.filter((function(e){return e.type===i})),u=s.filter((function(e){return e.type!==i}));let c=[];switch(e.type){case fb.INSERT_ATTRIBUTE:c.push(e);break;case fb._UPDATE_NON_OV_ATTRIBUTE:c=c.concat(s.map((function(t){return o(e,t)})));break;case fb.DELETE_ATTRIBUTE:(u.length||0==l.length)&&c.push({type:fb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!0}}),c=c.concat(l.map((function(t){return o({type:fb.DELETE_ATTRIBUTE,uri:e.uri},t)})));break;case fb.UPDATE_ATTRIBUTE:{const s=u.some((e=>{let{type:t}=e;return t===a}))&&r?_b(r,t,e.uri):null;if(s||l.length){if(l.length)c=c.concat(l.map((function(t){return o({type:fb.UPDATE_ATTRIBUTE,uri:e.uri,newValue:e.newValue},t)})));else if(s){const r=gb(t,s.uri).filter((e=>{let{type:t}=e;return t===i}));c=c.concat(r.map((t=>o({type:fb.UPDATE_ATTRIBUTE,uri:s.uri,newValue:e.newValue},t))))}}else c.push({type:fb.INSERT_ATTRIBUTE,uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0});u.length&&n&&c.push({type:fb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!0}});break}}return c}));let c=u.flat();const p=s(c,"typeUri");for(const e in p){if("undefined"===e)continue;const t=p[e],r=c.filter((function(e){return e.type!==fb._UPDATE_NON_OV_ATTRIBUTE})).filter((function(t){return t.uri.substr(0,t.uri.lastIndexOf("/"))===e||"INSERT_ATTRIBUTE"===t.type&&t.uri===e})),n=t.find((function(e){const{crosswalk:t}=e;return t&&t.type===i}));!r.find((function(e){return"UPDATE_ATTRIBUTE"===e.type}))&&n&&(c.push({type:fb.UPDATE_ATTRIBUTE,uri:n.uri,newValue:{value:n.value},crosswalk:n.crosswalk}),r.forEach(l)),t.forEach(l)}return c=c.filter((function(e){return!e.removeIt})),c.forEach((function(e){delete e.insteadOfUpdate})),c}!function(e){e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_TAGS="UPDATE_TAGS",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e._UPDATE_NON_OV_ATTRIBUTE="_UPDATE_NON_OV_ATTRIBUTE"}(fb||(fb={}));const gb=(e,t)=>e.filter((function(e){return 1===(e.attributes||e.attributeURIs||[]).filter((function(e){return e===t})).length})),_b=(e,t,r)=>(0,l.pipe)(Xs,(0,l.defaultTo)([]),(0,l.reject)((0,l.propEq)("uri",r)),(0,l.ifElse)((0,l.allPass)([e=>1===e.length,e=>{let[r]=e;return ob(t,r)},e=>{let[t]=e;return!Os(t)}]),(0,l.prop)(0),(0,l.always)(null)))(e,r);function Ab(e,t){t=t||[];for(const r in e)if(e.hasOwnProperty(r)){const n=e[r];for(let e=0;e<n.length;e++){const r=n[e];if(Eb(r)&&r.refRelation){const e=r.refRelation[0]||r.refRelation;if(e.crosswalks){const r=e.crosswalks.filter((function(e){return e.attributes||e.attributeURIs}));for(let e=0;e<r.length;e++){let n=!0;for(let i=0;i<t.length;i++)if(t[i].type===r[e].type&&t[i].value===r[e].value){t[i].attributes=t[i].attributes||t[i].attributeURIs,t[i].attributes=t[i].attributes.concat(r[e].attributes||r[e].attributeURIs),t[i].attributes=Object.keys(t[i].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[i].attributeURIs,n=!1;break}n&&t.push(r[e])}}}}}return t}function Nb(e,t){return Tb(fb.UPDATE_TAGS).call(this,e,t)}function Pb(e,t){return Tb(fb.UPDATE_ROLES).call(this,e,t)}function Rb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Sb(e,t,r[t])}))}return e}function Sb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wb=()=>{const e=(t,r)=>{if(t&&r)if(Array.isArray(t))for(let n=0;n<t.length;n++)r(n,t[n]),e(t[n],r);else if(pe(t))for(const n in t)r(n,t[n]),e(t[n],r)},t=(e,t,r)=>n=>{const i=-1!==n.uri.lastIndexOf("/")?n.uri.substring(0,n.uri.lastIndexOf("/")):"";e[i]||(e[i]=[]),e[i].push(n.type),t[n.uri]=n.type,"IGNORE_ATTRIBUTE"===n.type&&r.push(n.uri)},r=function(e,t,r){const n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf(fb.IGNORE_ATTRIBUTE)&&-1!==e[t].indexOf(fb.INSERT_ATTRIBUTE)}));return Object.keys(t).filter((function(e){const t=-1!==e.lastIndexOf("/")?e.substring(0,e.lastIndexOf("/")):null;return-1!==i.indexOf(t)})).forEach((function(e){-1!==r.indexOf(e)&&n.push(e),t[e]=fb.UPDATE_ATTRIBUTE})),{appearance:t,ignored:n}},n=function(e,t){if(Array.isArray(t)){let r=[];const i=e||[];return i.some((function(e){return e.uri}))?r=((e,t)=>{const r=e.map((e=>e.uri)),i=e.map((e=>{const r=(a=t.find((function(t){return t.uri===e.uri}))||{},(i=e)&&a&&i.ignored!==a.ignored&&(delete i.ignored,delete a.ignored,i.ov=!0,a.ov=!0),{a:i,b:a});var i,a;return n(r.a,r.b)})),a=t.filter((e=>!r.includes(e.uri)));return i.concat(a)})(i,t):(r=r.concat(i),t.forEach((function(t,a){void 0===r[a]?r[a]=t:pe(t)?r[a]=n(e[a],t):-1===i.indexOf(t)&&r.push(t)}))),r}{const r={};return pe(e)&&Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(i){pe(t[i])&&e[i]?r[i]=n(e[i],t[i]):r[i]=t[i]})),r}},i=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=JSON.parse(JSON.stringify(i)),s=JSON.parse(JSON.stringify(a)),l=n(i,a),u={},c={},p=[],d=t(c,u,p);hb(l,s).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value?Rb({},e,{type:"UNDO_IGNORE_ATTRIBUTE"}):e})).forEach((function(e){d(e)})),hb(l,o).map((function(e){return"DELETE_ATTRIBUTE"===e.type?Rb({},e,{type:"INSERT_ATTRIBUTE"}):"IGNORE_ATTRIBUTE"===e.type?Rb({},e,{type:e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"}):e})).forEach((function(e){d(e)}));const y=r(c,u,p);return e(l,(function(e,t){t&&-1!==y.ignored.indexOf(t.uri)&&(t.ignored=!0,delete t.ov)})),{attributes:l,appearance:y.appearance}},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=(0,l.difference)(t,e),n=(0,l.difference)(e,t),i=n.concat(t),a=(e,t)=>(0,l.pipe)((0,l.map)((t=>[t,e])),l.fromPairs)(t),o=Rb({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:i,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?i(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[o,s]=a(e?e.roles:[],t.roles),[l,u]=a(e?e.tags:[],t.tags);return{attributes:r,appearance:Rb({},n,{roles:s,tags:u}),roles:o,tags:l}}}},Ib=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?Ib(t.value):[]];return e.concat(r)}),[])),Ub=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,Cb=e=>e?[Op(e)]:[],Db=e=>{const t=[...Ib((null==e?void 0:e.attributes)||[]),...Ib((null==e?void 0:e.analyticsAttributes)||[])];return e?[...Cb(e),...t]:[]},jb=(e,t)=>[e,...t.map((t=>Ub(e,t)))],Lb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return Dd(t)}))},kb=(e,t)=>{switch(e){case Le.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case Le.ENTITY_ATTRIBUTE:case Le.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[Tn(t)]})(t);case Le.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case Le.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,Op({uri:n,dataTenant:i}),r]})(t)}},Fb=e=>(0,l.pipe)(l.values,(0,l.map)((0,l.map)((0,l.pipe)((0,l.prop)("replies"),l.inc))),(0,l.map)(l.sum),l.sum)(e),Mb=(0,l.curry)(((e,t)=>{const r=Mo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(Mb(e,r.extendsTypeURI)):n})),xb=(0,l.curry)(((e,t)=>(0,l.reduce)(((t,r)=>(0,l.assoc)(r,((e,t)=>(0,l.path)(["members",t],e))(e,r),t)),{},t))),$b=(e,t)=>(0,l.pipe)((0,l.prop)("type"),Mb(e),xb(t))(t),Vb=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};var Gb,Bb=r(29504);function Wb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.PotentialMatches="potentialMatches",e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(Gb||(Gb={}));const Yb={},qb={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},potentialMatches:{colors:["#fec92f","#ee4272","#6d9a35","#555962","#2d9ecf"]},random1:{colors:["#fccde5","#ff9acc","#81b2d3","#f8b6b8","#bd81be","#82c55c","#c4e3f1","#7f939e","#ffee91","#fec92f","#ee4272","#2d9ecf","#c4c0e1","#7accca","#cdc393","#f69785","#f0ecc7","#9fd6bf","#6d9a35","#afbc26","#12959f","#aacf99","#056b97","#eab710","#b4d36a","#70bede","#f57f27","#7a843b","#cfd0d2","#555962","#b71137","#ffdc0e","#bea68c","#5f3566"]},spectreYellowCyan:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#7accca","#12959f"]},spectreBlueBrown:{granularity:3,colors:["#c4e3f1","#70bede","#81b2d3","#2d9ecf","#056b97","#aacf99","#b4de6a","#82c55c","#6d9a35","#afbc26","#7a843b","#cfd0d2","#7f939e","#555962","#f0ecc7","#cfc393","#bea68c"]},charts:{colors:["#0072ce","#c4ce00","#ce5c00","#4bafff","#f97061","#9e7ed3","#c34980","#c4ce00","#669977","#ffe16f","#4896df","#40cfbb","#9bc66a","#ce5c00","#4bafff","#f085f2","#bea68c"]},crosswalks:{colors:["#86f2f9","#cae815","#f8a4a4","#fd63c0","#b6c5ec","#8fe98e","#ff9c72","#84cbf3","#a8f384","#d9ffa8","#ace1ff"]}},Hb=e=>{if(!Yb[e]){const t=qb[e]||qb.random0;Yb[e]=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Wb(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return Yb[e]},Jb=(0,l.curry)(((e,t)=>{const r=Hb(e);return r.idToColor[t]||(r.idToColor[t]=(e=>{const t=e.counter,r=e.granularity||1;return e.counter+=r,e.counter>=e.colors.length&&(++e.granularityCounter>=r&&(e.granularityCounter=0),e.counter=e.granularityCounter),e.colors[t]})(r)),r.idToColor[t]})),Kb=e=>Jb(Gb.Charts,e),Qb=()=>Hb(Gb.PotentialMatches).colors,Xb=e=>Jb(Gb.Random1,e),zb=e=>(0,Bb.getColor)(e)?"#FFFFFF":"#212121";var Zb=r(73116);const eO=Array.from({length:100},((e,t)=>t/100)),tO=e=>{const t=Number(e.replace(/\D/g,""))||0;let r=3735928559^t,n=1103547991^t;for(let t,i=0;i<e.length;i++)t=e.charCodeAt(i),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},rO={},nO=new Zb.Z({hash:tO,saturation:eO.slice(15,71),lightness:eO.slice(50,90)}),iO=new Zb.Z({hash:tO,saturation:eO.slice(46,89),lightness:eO.slice(44,58)}),aO=(0,l.curry)(((e,t,r)=>{t in rO||(rO[t]={});const n=rO[t];r in n||(n[r]=((e,t)=>{const r=String(tO(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),oO=aO(nO,"crosswalks"),sO=aO(nO,"sources"),lO=aO(nO,"contributors"),uO=aO(nO,"dataValidationFunctions"),cO=aO(iO,"entities");function pO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){dO(e,t,r[t])}))}return e}function dO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const yO=(0,l.has)("items"),fO=e=>0===e,TO=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.min(Math.max(e,t),r)},EO=e=>e.reduce(((e,t)=>e+t.width),0),mO=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),hO=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),bO=e=>e.reduce(((e,t)=>e+t.height),0),OO=e=>(0,l.is)(String,e)&&e.includes("%"),vO=(0,l.has)("spacer"),gO=(e,t)=>Math.max(Math.round(parseFloat(t)/100*e),1),_O=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(yO(t)?_O(t):t)),[]),AO=(e,t)=>{const r=[...t];for(;(0,l.sum)(r)>e;){const e=Math.max(...r);if(1===e)break;const t=r.indexOf(e);r[t]--}return r},NO=e=>({id:e.layout}),PO=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NO;const i=(e,t,r,n)=>{let{width:i}=e;const a=t.items.some((e=>e.flex));let o;if(a){const[e,n]=(0,l.partition)((0,l.propIs)(Number,"flex"),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("flex"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/(a+n.length))),u=Math.max(s/Math.max((0,l.length)(n),1),1),c=(e,t,r)=>Math.max(Math.round(t/r*e),1);o=r.flex?c(i,r.flex,a+n.length):u}else{const[e,n]=(0,l.partition)((0,l.both)((0,l.propIs)(String,"width"),(0,l.pipe)((0,l.propOr)("","width"),(0,l.includes)("%"))),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("width"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/100)),u=Math.max(s/Math.max((0,l.length)(n),1),1);o=OO(r.width)?gO(i,r.width):u}return TO(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return TO(n,t,r)},o=(e,t)=>yO(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.map((a=>i(t,r,a,yO(a)?n(a.layout):e(a.view)))),s=AO(t.width,o),u=r.items.reduce(((r,n,i)=>{const o=s[i],u=fO(i)?t.x:(0,l.last)(r).x+(0,l.propOr)(o,"width",(0,l.last)(r));if(yO(n))return r.concat(p(pO({},t,{x:u,width:o}),n));{const i=e(n.view);return r.push(pO({y:t.y,x:u,height:a(i),width:o},i)),r}}),[]);return{x:t.x,y:t.y,width:EO(u),height:mO(u),items:u}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=yO(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=fO(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(yO(i))return r.concat(p(pO({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(pO({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?TO(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?TO(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:hO(i),height:bO(i),items:i}},c=(t,r)=>{const n=(e,t,r,n)=>fO(r)?e.y:(0,l.last)(t).y+((0,l.last)(t).height||n),i=(t,r,i,o)=>{const s=e(i),l=t.width,u=a(s),c=n(t,r,o,u);return pO({},s,{x:t.x,y:c,width:l,height:u})},o=(e,t)=>{const r=t.reduce(((t,r,a)=>{if("string"==typeof r)t.push(i(e,t,r,a));else if("object"==typeof r){const o=Math.max(Math.round(e.width/2),1),s=AO(e.width,[o,o]),u=pO({},e,{width:s[0]}),c=pO({},e,{x:e.x+s[0],width:s[1]}),p=(0,l.has)("left",r)&&i(u,t,r.left,a),d=(0,l.has)("right",r)&&i(c,t,r.right,a),y=(0,l.propOr)(0,"height"),f=Math.max(y(p),y(d));t.push(pO({},e,{y:n(e,t,a,f),height:f,items:(0,l.filter)(l.identity,[p,d])}))}return t}),[]);return pO({},e,{height:bO(r),items:r})},s=o(t,(0,l.propOr)([],"top",r)),u=Math.round(.66*t.width),c=(0,l.isEmpty)(s)?t.y:t.y+s.height,p=o(pO({},t,{y:c,width:u}),(0,l.propOr)([],"center",r)),d=o({x:t.x+u,y:c,width:t.width-u},(0,l.propOr)([],"right",r)),y=s.height+Math.max(p.height,d.height),f=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return pO({},t,{height:y,items:(0,l.reject)(f,[s,p,d])})},p=(e,t)=>{const r=pO({},t,{items:(0,l.reject)(vO,t.items)});switch(r.layout){case"scroll":return o(e,r);case"hbox":return s(e,r);case"vbox":return u(e,r);default:return null}},d=(0,l.propEq)("layout","profile",t),y={x:0,y:0,width:r.columns},f=d?c(y,t):p(y,t);return _O(f)},RO=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),SO=[tt.FilteredEntitiesViewFacet,tt.ActivitiesViewFacet,tt.ProfileStatsFacet,tt.FilteredSavedSearchesFacet],wO=(e,t)=>e.map((e=>{let{height:r=0,minHeight:n=0}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["height","minHeight"]);const a=t.find((e=>e.id===i.id)),o=SO.includes(a.component)?8:4;return pO({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function IO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){UO(e,t,r[t])}))}return e}function UO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const CO={BarChart:et.BAR,BarChartGrouped:et.BAR,BarChartHorizontal:et.BAR,LineChart:et.LINE,Map:et.MAP,Pie:et.PIE},DO=(e,t)=>En(e)?dn(e,t):e,jO=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=CO[r];return IO({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},LO=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return IO({findPublic:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,["findShared"]))},kO=(e,t,r)=>{const n=(e=>e&&ae(e).map((e=>{const{type:t,value:r}=e;return IO({},e,{value:[he.IN,he.NOT_IN,Te.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:be(t),fieldName:r,values:n?ae(n):void 0}})))(e);return t&&En(t)||!r?n:(n||[]).concat((i=r,{filter:Te.EQUALS,fieldName:"type",values:[i]}));var i},FO=["https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/world.countries.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/usa_prefix_latlng.topo.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/us-10m.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/zips-us-topo.json"],MO={"com.reltio.plugins.dashboard.BarChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:DO(n,r),filters:kO(a,n,r),chartType:et.BAR,component:tt.DashboardFacet,title:i}},"com.reltio.plugins.dashboard.BubbleChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:DO(n,r),filters:kO(a,n,r),chartType:et.BUBBLE,component:tt.DashboardFacet,title:i}},"com.reltio.plugins.ui.CustomActionView":e=>{let{id:t,caption:r,canRead:n,url:i}=e;return{id:t,url:i,canRead:n,title:r,component:tt.CustomActionViewFacet}},"com.reltio.plugins.dashboard.FacetChartView":e=>{let{id:t,firstDimension:r,useEntityType:n,caption:i,filter:a,count:o,orderType:s,options:l,canRead:u}=e;const c=ae(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return IO({id:t,count:o,canRead:u,orderType:s,attributeUri:DO(r,p),filters:kO(a,r,p),component:tt.DashboardFacet,title:i,showOthers:!0},jO(l))},"com.reltio.plugins.dashboard.MapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,mapType:l,canRead:u}=e;return{id:t,count:o,canRead:u,orderType:s,attributeUri:DO(n,r),filters:kO(a,n,r),chartType:et.MAP,component:tt.DashboardFacet,title:i,geoUrl:FO[l||0],projection:"geoMercator"}},"com.reltio.plugins.dashboard.SimpleMapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,map:s,canRead:l,options:u}=e;return IO({id:t,count:o,canRead:l,attributeUri:DO(n,r),filters:kO(a,n,r),component:tt.DashboardFacet,title:i,geoUrl:s,chartType:et.MAP,projection:"geoMercator"},jO(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:tt.ProfileStatsFacet,title:n}},"com.reltio.plugins.dashboard.FilteredSavedSearchesView":e=>{let{id:t,caption:r,max:n,options:i,canRead:a}=e;return{id:t,canRead:a,options:LO(i),component:tt.FilteredSavedSearchesFacet,title:r,max:n}},"com.reltio.plugins.dashboard.FilteredEntitiesView":e=>{let{id:t,caption:r,filter:n,max:i,entity:a,canRead:o}=e;return{id:t,canRead:o,filters:kO(n,null,a),component:tt.FilteredEntitiesViewFacet,title:r,max:i}},"com.reltio.plugins.dashboard.MatchedEntitiesView":e=>{let{id:t,caption:r,max:n,canRead:i}=e;return{id:t,canRead:i,filters:[{filter:Te.GTE,fieldName:"matches",values:["1"]}],component:tt.FilteredEntitiesViewFacet,title:r,max:n}},"com.reltio.plugins.dashboard.EntitiesByTypeView":e=>{let{id:t,caption:r,orderType:n="reversedCount",inheritChildren:i,hideEmpty:a,canRead:o}=e;return{id:t,canRead:o,component:tt.EntitiesByTypeViewFacet,orderType:n,inheritChildren:i,hideEmpty:a,title:r}},"com.reltio.plugins.dashboard.EntitiesByTagView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:et.CLOUD,component:tt.DashboardFacet,attributeUri:"tags"}},"com.reltio.plugins.dashboard.EntitiesByRoleView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:et.TREE,component:tt.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:tt.NotificationInboxFacet,title:n||fe().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:tt.ActivitiesViewFacet,title:n||fe().text("Activity log")}}},xO=e=>({id:e,height:10}),$O=(0,l.pipe)((0,l.map)((e=>{const t=MO[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),VO=e=>{if("0.1"===e.version){const t=$O(e.views),r=PO(xO,e.layout,{columns:4});return{id:e.id,margin:0,layout:RO(r,t),views:t}}return e},GO=e=>(0,l.cond)([[(0,l.propEq)("layout","profile"),(0,l.pipe)((0,l.pick)(["center","right","top"]),l.values,l.flatten,(0,l.map)((0,l.when)((0,l.is)(Object),l.values)),l.flatten)],[(0,l.has)("view"),(0,l.pipe)((0,l.prop)("view"),ae)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>GO(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function BO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){WO(e,t,r[t])}))}return e}function WO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const YO=BO({},rt,{OldMap:"com.reltio.plugins.entity.EntityMapView",OldTree:"com.reltio.plugins.entity.TreeView"}),qO=e=>e,HO={[YO.Attributes]:qO,[YO.HierarchyTree]:qO,[YO.HierarchyPaths]:qO,[YO.RelationsTable]:qO,[YO.Relations]:e=>BO({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[YO.SingleAttribute]:qO,[YO.Custom]:qO,[YO.AttributeTable]:qO,[YO.Map]:qO,[YO.OldTree]:e=>BO({},e,{class:rt.HierarchyTree}),[YO.OldMap]:e=>BO({},e,{class:rt.Map}),[YO.ImageAttribute]:qO,[YO.PotentialMatches]:qO},JO=(0,l.pipe)((0,l.map)((e=>{const t=HO[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),KO=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===rt.Map?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),QO=(e,t)=>(t||[]).map((t=>BO({},t,KO(e,t.id)))),XO=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return BO({},t,{layout:QO(t.views,e.newLayout)});if("0.1"===e.version){const r=JO(e.views),n=PO(KO(r),e.layout,{columns:3});return BO({},t,{layout:RO(n,r),views:r})}return e},zO=(e,t)=>e.class===t||e["react-class"]===t,ZO=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(zO(t,rt.Attributes))if(t.includeUris)e.includeUris.push(...t.includeUris);else{const r=t.excludeUris||[];e.excludeUris=e.excludeUris?(0,l.intersection)(e.excludeUris,r):r}return(zO(t,rt.SingleAttribute)||zO(t,rt.AttributeTable))&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const i=(n[0]||e).uri;return r&&!r.some(ln(i))||t.some(ln(i))}},ev=(e,t)=>e.filter((e=>t.some((t=>zO(e,t))))).map((e=>{let{id:t}=e;return t})),tv=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},rv=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),nv=e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e),iv=e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.configuration.Authoring"))),(0,l.reject)(l.isNil),l.head)(e);function av(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ov(e,t,r[t])}))}return e}function ov(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sv=(0,l.curry)(((e,t)=>GO(t).map((t=>(0,l.pipe)((0,l.map)((e=>tv(e,t))),(0,l.reject)(l.isNil),l.head)(e))).filter(l.identity))),lv=(0,l.either)((0,l.propEq)("label","D&B Connector"),(0,l.propEq)("label","D&B Connector")),uv=(0,l.propEq)("class",rt.Custom),cv=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},pv=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];let i;const a=(0,l.pipe)(iv,(0,l.path)(["entityTypes",n]))(e);if("2.0"===r&&t.newLayout){const{newLayout:r}=t,o=QO(t.views,r);return i=(0,l.when)((0,l.pipe)(l.head,(0,l.is)(String)),(0,l.pipe)((0,l.map)((t=>(0,l.pipe)((0,l.map)((e=>tv(e,t))),(0,l.reject)(l.isNil),l.head)(e))),(0,l.reject)(l.isNil),(e=>[{id:"common",views:e}])))(t.sidePanelViews),(0,l.pipe)((0,l.pick)(["views","profileBand","workflow","frozen"]),(0,l.mergeRight)({entityType:n,layout:o,sidePanelViews:i}),(0,l.assoc)("authoring",a),(0,l.reject)(l.isNil))(t)}const o=sv(e,t.layout);i=((e,t)=>{if(t.side){var r;const n=(0,l.pipe)((0,l.chain)((e=>tv(e,t.side))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("layout"))(e),[i,a]=(0,l.partition)(lv,null!==(r=null==n?void 0:n.items)&&void 0!==r?r:[]),o=(0,l.pipe)(sv(e),(0,l.filter)(uv))(av({},n,{items:i})),s=[{id:"common",views:sv(e,av({},n,{items:a}))}];return o.length>0&&s.push({id:"D&B",views:o}),s}})(e,t);const s=(e=>(0,l.pipe)((0,l.chain)((e=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.entity.side.WorkflowsView"===e.class))})(e))),l.head,(0,l.unless)(l.isNil,(0,l.pick)(["showClosedTasks","assignee","processTypes"])))(e))(e),u=XO(av({},t,{views:o,version:"0.1"})),c=(0,l.pipe)(nv,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:u.views,layout:u.layout,sidePanelViews:i,profileBand:c,workflow:s,authoring:a})},dv=(e,t)=>{if("scroll"===t.layout.layout){const r=sv(e,t.layout),n=VO(av({},t,{views:r,version:"0.1"}));return{class:at.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:at.Dashboard,views:t.views,layout:t.layout,id:t.id}},yv=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel,showTimeSeries:r.showTimeSeries,showOVSwitcher:r.showOVSwitcher,showErrorBands:r.showErrorBands,showExportButton:r.showExportButton}},fv=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Tv=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},Ev=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},mv=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},hv=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions}},bv=(e,t)=>{const r=sv(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=rv(e,"com.reltio.plugins.search.toolbar.component").filter((e=>"com.reltio.plugins.ui.CustomActionButtonView"===e.class&&e.processType));return null==t?void 0:t.processType})(e)};return{class:at.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"],tabs:r.tabs}},Ov=(e,t)=>({class:at.Graph,id:t.id}),vv=(e,t)=>{const r=sv(e,t.layout)[0];return{class:at.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},gv=e=>t=>!!(0,l.intersection)(e,t).length,_v=(0,l.cond)([[gv(["com.reltio.plugins.dashboard.BarChartView","com.reltio.plugins.dashboard.BubbleChartView","com.reltio.plugins.ui.CustomActionView","com.reltio.plugins.dashboard.FacetChartView","com.reltio.plugins.dashboard.MapView","com.reltio.plugins.dashboard.SimpleMapView","com.reltio.plugins.dashboard.ProfileStatsView","com.reltio.plugins.dashboard.FilteredSavedSearchesView","com.reltio.plugins.dashboard.FilteredEntitiesView","com.reltio.plugins.dashboard.EntitiesByTypeView","com.reltio.plugins.dashboard.EntitiesByTagView","com.reltio.plugins.dashboard.EntitiesByRoleView","com.reltio.plugins.inbox.NotificationInboxView","com.reltio.plugins.activities.ActivitiesView","com.reltio.plugins.react.ReactDashboardView"]),()=>dv],[gv(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>yv],[gv(["com.reltio.plugins.graph.GraphView"]),()=>Ov],[gv(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>fv],[gv(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Tv],[gv(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Ev],[gv(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>mv],[gv(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>hv],[gv(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>bv],[gv(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>vv],[l.T,()=>(0,l.always)(void 0)]]),Av=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(cv),(0,l.map)((t=>pv(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand","workflow","frozen","authoring"])))(e);return{class:at.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:ot.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:ot.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n||"com.reltio.plugins.newDashboard.NewDashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>tv(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",at.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>tv(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;if(i.entityPerspectiveId)return((e,t,r)=>{const n=pv(e,r),i=(0,l.pipe)((0,l.propOr)([],"entity-types"),(0,l.map)((e=>[e,n])),l.fromPairs)(t);return{class:at.NestedProfile,id:t.id,entityTypes:i}})(t,e,i);const a=GO(i.layout),o=(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>a.includes(e.id)))})),(0,l.pluck)("class"),(0,l.reject)(l.isNil))(t);return _v(o)(t,i)};function Nv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Pv(e,t,r[t])}))}return e}function Pv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rv=e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&"com.reltio.plugins.ui.first_level_action"===e.type&&!e.parent))},Sv="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var wv;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(wv||(wv={}));const Iv={[at.DQDashboard]:`${Sv}DqDashboard.svg`,[at.Dashboard]:`${Sv}Dashboard.svg`,[at.Graph]:`${Sv}Graph.svg`,[at.RelationshipSearch]:`${Sv}GraphSearch.svg`,[at.Interactions]:`${Sv}Interactions.svg`,[at.PotentialMatches]:`${Sv}PotentialMatches.svg`,[at.Profile]:`${Sv}Profile.svg`,[at.NestedProfile]:`${Sv}Profile.svg`,[at.ProfileActivityLog]:`${Sv}ActivityLog.svg`,[at.Relationships]:`${Sv}Relationships.svg`,[at.Sources]:`${Sv}Crosswalk.svg`,[at.Search]:`${Sv}Search.svg`,[wv.DashboardGroup]:`${Sv}DashboardGroup.svg`,[wv.ProfileGroup]:`${Sv}ProfileGroup.svg`,[wv.SearchGroup]:`${Sv}SearchGroup.svg`,DEFAULT:`${Sv}Default.svg`},Uv=e=>Iv[null==e?void 0:e.class]||Iv.DEFAULT,Cv=(0,l.pipe)((0,l.pluck)("screen"),(0,l.filter)((0,l.anyPass)([(0,l.propEq)("class",at.NestedProfile)])),(0,l.groupBy)((0,l.prop)("class")),(0,l.map)((e=>e.map(((e,t)=>Nv({},e,{nestedRoute:`${t+1}`})))))),Dv=(e,t)=>{var r;return(null===(r=e[t.class])||void 0===r?void 0:r.find((0,l.propEq)("id",t.id)))||t},jv=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Iv[wv.ProfileGroup]:null,Lv=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Iv[at.Dashboard]||t===Iv[at.DQDashboard]})),(0,l.always)(Iv[wv.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Iv[at.Search]||t===Iv[at.RelationshipSearch]})),(0,l.always)(Iv[wv.SearchGroup])],[l.T,()=>null]])(e),kv=e=>(0,l.pipe)((0,l.chain)(Rv),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>{const r=(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>Nv({},e,{entityTypes:e["entity-types"],screen:Av(e,t)}))),(0,l.filter)((e=>e.screen)))(t),n=Cv(r);return(0,l.map)((e=>{let{label:t,screen:r,canRead:i,entityTypes:a}=e;return{label:t,icon:Uv(r),screen:Dv(n,r),canRead:i,entityTypes:a}}))(r)})(t,e),n=Av(t,e);return{label:t.label,icon:jv(t)||Lv(r)||Uv(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function Fv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mv=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},xv=e=>({id:e,height:10}),$v=e=>{const t=(e=>(0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["attribute-types"]))}))(e))(e),r=(e=>(0,l.pipe)((0,l.chain)(Mv),(0,l.pluck)("pivotingAttributes"),l.flatten)(e))(e);return((e,t)=>{const r=(e=>(e||[]).find((0,l.propEq)("attribute-types","*")))(t);return(0,l.pipe)((0,l.reduce)(((e,n)=>{const i=((e,t)=>e.find((e=>Array.isArray(e["attribute-types"])&&e["attribute-types"].includes(t.uri))))(t,n)||r;return null!=i&&i.id&&(e[i.id]||(e[i.id]={extension:i,attributeTypes:[]}),e[i.id].attributeTypes.push(n)),e}),{}),l.values)(e)})(r,t).map((t=>{let{extension:r,attributeTypes:n}=t;const i=((e,t)=>{if("scroll"===t.layout.layout){const r=$O(((e,t)=>{const r=GO(t);return(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>r.includes(e.id)))})),(0,l.filter)((e=>{let{views:t}=e;return t})),(0,l.map)((e=>{let{views:t,id:r}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fv(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=PO(xv,t.layout,{columns:4});return{views:r,layout:RO(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function Vv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Gv(e,t,r[t])}))}return e}function Gv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bv(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const Wv=(0,l.curry)(((e,t)=>(0,l.pipe)((e=>((e,t)=>(e||[]).find((e=>"com.reltio.plugins.ui.Activator"===e.activator)))(e)),(0,l.prop)(e))(t))),Yv=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,qv=(0,l.unless)((e=>!!e&&(e.startsWith("http:")||e.startsWith("https:"))),(0,l.always)(null)),Hv=(0,l.pipe)(Wv("top-logo"),qv),Jv=(0,l.prop)("showLookupCode"),Kv=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),{validateReadMode:o,validateRelations:s}=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["validateReadMode","validateRelations"]))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propSatisfies)((0,l.either)(pe,(0,l.equals)("none")),"format")),(0,l.map)((e=>{let{format:t}=e;if("none"===t)return{thousandSeparator:""};const{groupSeparator:r,digitsAfterDecimalSeparator:n}=t;return Vv({thousandSeparator:r,decimalScale:n},Bv(t,["groupSeparator","digitsAfterDecimalSeparator"]))})))(e))(e),p=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(e=>{let{workflowPath:t,enabled:r}=e;return{enabled:r,path:t}}))(e))(e),d=(e=>(0,l.pipe)(Wv("default-perspective"),(0,l.ifElse)(Yv,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),y=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.AttributesSorting"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("strategy"))(e))(e),f=(e=>(0,l.pipe)((e=>rv(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.map)((e=>{let{action:t}=e;return Vv({},t,Bv(e,["action"]))})))(e))(e),T=(e=>Wv("checkUser",e))(e),m=(e=>Wv("checkIdle",e))(e),h=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),b=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e),O=void 0===(v=Jv(b))||v;var v;const g=null===(t=nv(e))||void 0===t?void 0:t.showEntityId,_=(e=>Wv("preview",e))(e),A=Hv(e),N=(e=>Wv("showAttributeDescription",e))(e),P=(e=>Wv("topBackgroundColor",e))(e),R=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.framework.util.DateMask"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(e=>{let{dateMask:t,dateTimeMask:r}=e;return{dateMask:t,dateTimeMask:r}}),(0,l.reject)(l.isNil))(e))(e),S=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.network.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["id","point"]))(e))(e),w=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.search.dev.SearchView"))),(0,l.reject)(l.isNil),l.head,(0,l.path)(["options","showSearchByOv"]))(e))(e),I=0===Object.keys(R).length?void 0:R,U=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.ProfileCheckUpdate"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.omit)(["id","point"]))(e))(e),C=(e=>(0,l.pipe)((0,l.map)((e=>tv(e,"com.reltio.plugins.ui.configuration.AIAssistant"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.omit)(["id","point"]))(e))(e);return{i18n:u,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:O},validate:{levels:a,validateReadMode:o,validateRelations:s},masks:I,requestProvider:S,attributePresentations:c,attributesSorting:y,workflow:p,defaultRoute:d,customScripts:f,checkUser:T,checkIdle:m,showSearchByOv:w,showSwitchToClassic:h,showEntityId:g,preview:_,logo:A,showAttributeDescription:N,headerColor:P,profileCheckUpdate:U,aiAssistant:C}},Qv=e=>({layout:kv(e),pivoting:$v(e),properties:Kv(e)});function Xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){zv(e,t,r[t])}))}return e}function zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Zv=e=>{let{views:t,layout:r}=e;const n={};let i=!1;const a=t.map((e=>{if(n[e.id]){const t=`${e.id}_${(0,Br.x0)()}`;return n[e.id].push(t),i=!0,Xv({},e,{id:t})}return n[e.id]=[e.id],e})),o={},s=r&&i?r.map((e=>null==o[e.id]?(o[e.id]=0,e):(o[e.id]++,Xv({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}};function eg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){tg(e,t,r[t])}))}return e}function tg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let rg={};const ng=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=ee(`${r.id}: ${r.action.files.join('","')}`);if(E(rg[a])){try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}rg=eg({},rg,{[a]:eg({},rg[a]||{},{worker:i})})}else i=rg[a].worker,rg[a].innerText&&t({task:{action:ct.SET_HTML,params:{html:rg[a].innerText}},worker:i,config:r}),i.removeEventListener("message",rg[a].onWorkerMessage);return i&&(rg[a].onWorkerMessage=e=>{if("loaded"!==e.data.action){const n=JSON.parse(e.data);t({task:n,worker:i,config:r}),"setHtml"!==n.action||n.params.id||(rg[a].innerText=n.params.html)}},i.addEventListener("message",rg[a].onWorkerMessage)),i},ig=(0,l.curry)(((e,t)=>!e||!e.availableEntityTypes||!t||e.availableEntityTypes.includes(t))),ag=(0,l.flip)(ig);var og=r(83926);const sg=(e,t)=>{let r;try{r=t(e)}catch(t){return e}return"number"==typeof e?r.toNumber():r.toString()};function lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ug(e,t,r[t])}))}return e}function ug(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cg={[Tt.percent]:{valueConverters:{in:e=>sg(e,(e=>new og.Decimal(e).mul(1e4).floor().div(100))),out:e=>sg(e,(e=>new og.Decimal(e).mul(100).floor().div(1e4)))}}},pg=(0,l.curry)(((e,t)=>{var r,n;return((null===(r=cg[e])||void 0===r||null===(n=r.valueConverters)||void 0===n?void 0:n.in)||l.identity)(t)})),dg=(0,l.curry)(((e,t)=>{var r,n;return((null===(r=cg[e])||void 0===r||null===(n=r.valueConverters)||void 0===n?void 0:n.out)||l.identity)(t)})),yg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const{uri:n,name:i}=e||{},a=!n||$n(e)?i:n;return t[a]||t[Re]||Tg(r)},fg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{[St.relevanceScore.name]:lg({},yg(St.relevanceScore,e,t),{strategy:Tt.percent})}},Tg=(0,mi.Z)((e=>{var t;e=null===(t=e)||void 0===t?void 0:t.replace(/_/g,"-");const r=new Intl.NumberFormat(e).formatToParts(1000000.1),n=e=>{var t;return null===(t=r.find((t=>{let{type:r}=t;return r===e})))||void 0===t?void 0:t.value};return{thousandSeparator:n("group"),decimalSeparator:n("decimal"),groupSize:("integer",(null===(i=r.filter((e=>{let{type:t}=e;return"integer"===t})).map((e=>{let{value:t}=e;return t})).sort(((e,t)=>t.length-e.length)))||void 0===i?void 0:i[0])||"000").length};var i})),Eg=(e,t)=>{const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a="",groupSize:o=3,decimalScale:s,strategy:l}=e;t=pg(l,t);const u=null!=s?new og.Decimal(t).toFixed(s):t,[c,p]=u.split("."),d=new RegExp(`\\B(?=(\\d{${o}})+(?!\\d))`,"g"),y=c.replace(d,r),f=null==p?void 0:p.replace(/(0|\.)+$/,"");return i+y+(f?n+f:"")+a};let mg;const hg=()=>mg,bg={setLocale:e=>{mg=e},getLocale:hg,number:e=>((e,t)=>{const r=String(t);try{const t=Tg(e);return Eg(t,r)}catch(e){return console.warn("Number localization error"),r}})(hg(),e),applyFormatToNumber:Eg},Og=(0,l.curry)(((e,t)=>null==t?"":("string"!=typeof t&&(t=String(t)),e&&t?bg.applyFormatToNumber(e,t):(!e&&t&&(t=bg.number(t)),t)))),vg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?fe().number(e,"0,0.0a").toUpperCase():fe().number(e,"0,0"):""},gg=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let _g=!0;const Ag=e=>_g=e,Ng=(e,t)=>e!==t&&t?_g&&e?`${t} (${e})`:t:e,Pg=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Rg=(e,t,r)=>{const n=Pg(e,t,r);return Ng(r,n)},Sg=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),wg=(0,l.complement)(Sg),Ig=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),Ug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.pipe)((0,l.reduce)(((e,t)=>t.reduce(((e,t)=>{let{type:r,codeValues:n}=t;return e[r]={type:r,codeValues:(0,l.uniq)([...(0,l.pathOr)([],[r,"codeValues"],e),...n])},e}),e)),{}),l.values)(t)},Cg=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(wg(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),Dg=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=i?J(i):"L",s=a?X(a):"L LTS";switch(n.type){case mt.TYPE_NUMBER:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_COUNT:{const e=yg(n,r,bg.getLocale());return t&&Og(e,t)}case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isEmpty)(t)?"":(t=t,(0,l.isNil)(t)?t:ce(t)?fe().text("Yes"):fe().text("No"));case mt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=P(Number(t)).getTime()),(t=t)&&(nc(t)?ic(t):fe().date(t,o));case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_LOCAL_DATE:return(t=t)&&(nc(t)?ic(t):fe().date(t,o));case mt.TYPE_TIMESTAMP:return(t=t)&&(nc(t)?ic(t):fe().date(isNaN(t)?t:Number(t),s));case mt.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case mt.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case mt.TYPE_DOLLAR:return t=t,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?Ng((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}}));r(72342);const jg={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},success:{main:"#3B873E"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)",hint:"rgba(0,0,0,0.38)"},divider:"rgba(0,0,0,0.38)"},components:{MuiButton:{defaultProps:{color:"inherit"}},MuiTooltip:{defaultProps:{disableInteractive:!0}},MuiTab:{styleOverrides:{root:{maxWidth:"264px"}}},MuiDialogTitle:{styleOverrides:{root:{"&&+.MuiDialogContent-root":{paddingTop:"13px"}}}},MuiFilledInput:{styleOverrides:{root:{lineHeight:"1.1876em",backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},input:{"&.MuiSelect-select":{minHeight:"1.1876em"}}}},MuiTablePagination:{styleOverrides:{select:{"&.MuiInputBase-input":{minHeight:"1.1876em"}}}},MuiInputBase:{styleOverrides:{root:{"& .MuiInputAdornment-root":{color:"rgba(0,0,0,0.87)"}},input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"},"&.Mui-disabled":{WebkitTextFillColor:"inherit"}}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:"rgba(0, 0, 0, 0.08)","&.Mui-focusVisible":{backgroundColor:"rgba(0, 0, 0, 0.08)"},"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.08)"}}}}}},breakpoints:{values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},tooltip:{borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.54)"},inactiveBackground:"repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #e9e9e9 15px, #e9e9e9 16px)",inactiveSelectedBackground:"repeating-linear-gradient(45deg, #DBE9F4, #DBE9F4 14px, #CCDAE5 15px, #CCDAE5 16px)",inactiveSelectedHoverBackground:"repeating-linear-gradient(45deg, #D4E2ED, #D4E2ED 14px, #C6D4DF 15px, #C6D4DF 16px)",inactiveHoverBackground:"repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 14px, #e2e2e2 15px, #e2e2e2 16px)",inactive:{opacity:.7},basicView:{boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",borderRadius:"3px",backgroundColor:"#FFFFFF"},suggested:"rgb(237, 246, 251)"};function Lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kg(e,t,r[t])}))}return e}function kg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const Mg=e=>(t,r)=>{const{timeout:n}=r,i=Fg(r,["timeout"]);if(AbortController&&n){const r=new AbortController,a=setTimeout((()=>r.abort()),n);return e(t,Lg({},i,{signal:r.signal})).finally((()=>{clearTimeout(a)}))}return e(t,i)},xg=e=>{const t=e=>{switch(e){case 429:case 502:case 503:case 504:return 4;default:return 0}},r=e=>{const t=Math.random()+1;return new Promise((r=>{const n=Math.min(Math.round(1e3*Math.exp(e)*t),2e4);setTimeout(r,n)}))};return(n,i)=>{const{noRetry:a}=i,o=Fg(i,["noRetry"]),s=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,o).then((e=>{const n=t(e.status);return!a&&n>0&&i<n?r(i).then((()=>s(i+1))):e}))};return s()}},$g=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=Lg({},JSON.parse(t),{[gr]:e.status})}catch(n){r={errorMessage:t,errorCode:e.status,originalResponse:e}}throw r})))),Vg=e=>{const{onRequest:t,onResponse:r,addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}=(()=>{const e={onRequest:[],onResponse:[]};return{onRequest:t=>{const{url:r,options:n,abort:i,resolve:a}=t,o=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e,resolve:a})),t.next);o(r,n)},onResponse:t=>{const{response:r,abort:n,url:i,options:a}=t,o=e.onResponse.reduce(((e,t)=>r=>r instanceof Response?t({response:r,abort:n,next:e,url:i,options:a}):e(r)),t.next);o(r)},addRequestInterceptor:t=>{e.onRequest.push(t)},addResponseInterceptor:t=>{e.onResponse.push(t)},removeRequestInterceptor:t=>{const r=e.onRequest.indexOf(t);e.onRequest.splice(r,1)},removeResponseInterceptor:t=>{const r=e.onResponse.indexOf(t);e.onResponse.splice(r,1)}}})(),s={},u=(0,l.pipe)(Mg,(e=>{const t={},r={};return n=>{var i,a;const o=null!==(i=e.attemptsThreshold)&&void 0!==i?i:10,s=null!==(a=e.attemptsTimeWindowSize)&&void 0!==a?a:5e3;return(i,a)=>{const l=(e=>{const[t]=e.split("?");return t.split("/")[2]})(i),u=t[l],c=()=>Promise.reject({errorMessage:`service ${l} was disabled (authorization issues)`});if(u)return c();if(r[l]){const e=r[l].length;if(e>o){const n=e-o-1;if(r[l][e-1]-r[l][n]<=s)return t[l]=!0,c();r[l]=r[l].slice(n)}}return n(i,a).then((t=>{var n;return!e.excludedServices||null!==(n=e.excludedServices)&&void 0!==n&&n.includes(l)||(401===t.status?(r[l]||(r[l]=[]),u||r[l].push(Date.now())):r[l]&&t.ok&&(r[l].length=0)),t}))}}})(s),(e=>{let t=null;return r=>(n,i)=>{const a=()=>r(n,i),o=()=>{var e;return null===(e=t)||void 0===e?void 0:e.then(a)};return o()||a().then((r=>401===r.status?(t||(t=e().then((()=>{t=null}))),o()):r))}})(e),xg,$g);let c=0,p=[];return{request:(e,n)=>{const i=u(fetch);if(null!=n&&n.noRequestProcessor)return i(e,n);const a=()=>{const a=r?(e,t)=>i(e,t).then((n=>new Promise(((i,a)=>{r({response:n,next:e=>{i(e)},abort:a,url:e,options:t})})))):i;return t?new Promise(((r,i)=>{t({url:e,options:n,next:(e,t)=>{r(a(e,t))},resolve:e=>{r(e)},abort:i})})):a(e,n)};if(c){const{delayedRequest:e,resolver:t}=(e=>{let t;const r=new Promise((e=>{t=()=>{e(null)}})).then((()=>e()));return{delayedRequest:r,resolver:t}})(a);return p.push(t),e}return a()},addRequestInterceptor:n,addResponseInterceptor:i,setRequestProviderConfiguration:e=>{Object.assign(s,e)},startInterceptorInit:()=>{c+=1},finishInterceptorInit:()=>{c=Math.max(c-1,0),0===c&&(p.forEach((e=>e())),p=[])},removeRequestInterceptor:a,removeResponseInterceptor:o}},Gg="__metadata",Bg=(e=>{const t=[Gg,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),Wg=(0,l.set)(Bg),Yg=(0,l.view)(Bg),qg=Wg(Ae.NEW),Hg=Wg(Ae.REMOVED),Jg=Wg(Ae.EDITED),Kg=Wg(Ae.IGNORED),Qg=(0,l.pipe)(Yg,(0,l.equals)(Ae.REMOVED)),Xg=(0,l.pipe)(Yg,(0,l.equals)(Ae.NEW)),zg=(0,l.pipe)(Yg,(0,l.equals)(Ae.EDITED)),Zg=(0,l.pipe)(Yg,(0,l.complement)(l.isNil)),e_=(0,l.pipe)(Yg,(0,l.equals)(Ae.IGNORED)),t_=(0,l.omit)([Gg]),r_=(e,t)=>e===Gg?void 0:t;function n_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i_=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e(t))return r.concat(t);if(t&&t.children)for(const n of t.children){const i=i_(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},a_=(e,t)=>i_((0,l.propEq)("nodeId",t),e),o_=(e,t)=>i_((0,l.pathEq)(["entity","uri"],t),e),s_=(e,t)=>{const r=a_(e,t);return r.length>1?r[r.length-2]:null},l_=(e,t)=>{const r=a_(e,t);return r.length>0?r[r.length-1]:null},u_=(e,t)=>{let{parent:r,childrenProcessing:n=(e=>e),nodeProcessing:i=(e=>e)}=t;return(e=i(e,r)).children&&(e.children=n(e.children.map((t=>u_(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},c_=()=>{},p_=(e,t)=>{let{parent:r,nodeProcessing:n=c_}=t;n(e,r),e.children&&e.children.forEach((t=>p_(t,{parent:e,nodeProcessing:n})))},d_=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case We.addingParent:var i,a,o,s;return{entityUri:n?null===(i=r.entity)||void 0===i?void 0:i.uri:null===(a=t.relatedEntity)||void 0===a?void 0:a.uri,relation:r.relation,parentEntityUri:n?null===(o=t.relatedEntity)||void 0===o?void 0:o.uri:null===(s=r.entity)||void 0===s?void 0:s.uri};case We.addingChild:var l,u,c,p;return{entityUri:n?null===(l=t.relatedEntity)||void 0===l?void 0:l.uri:null===(u=r.entity)||void 0===u?void 0:u.uri,relation:r.relation,parentEntityUri:n?null===(c=r.entity)||void 0===c?void 0:c.uri:null===(p=t.relatedEntity)||void 0===p?void 0:p.uri};case We.editing:{var d,y,f,T;const e={oldRelation:t.relation,newRelation:r.relation,isReversed:n},i=null===(d=r.entity)||void 0===d?void 0:d.uri,a=null===(y=t.relatedEntity)||void 0===y?void 0:y.uri;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){n_(e,t,r[t])}))}return e}({},e,(null===(f=t.entity)||void 0===f?void 0:f.uri)===(null===(T=r.entity)||void 0===T?void 0:T.uri)?{}:{entityUri:i,newEntityUri:a})}}},y_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];return Object.values(e).forEach((e=>{const r=e.root;r&&p_(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===We.addingChild||r.editingMode===We.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=d_({node:r,connection:n,isReversed:i}),s=ed({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===We.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=d_({node:r,isReversed:i,connection:n}),l=s?id({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):nd({oldRelation:e,newRelation:a});t.push(l)}}})})),t},f_=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=f_(r,t);if(e)return e}return!1},T_=(0,l.curry)(((e,t)=>{const r=(0,l.map)(T_(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),E_=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>f_(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:T_(e,n.root)}}));return(0,l.pipe)(r,n)(t)},m_={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},h_={asc:"asc",desc:"desc"},b_=m_.entityLabel,O_=h_.asc,v_=(0,l.always)(0),g_=e=>{let{sortField:t=b_,sortOrder:r=O_,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case m_.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return MP.strings.sort(t,a,o)})(n,r);case m_.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return MP.strings.sort(e,i,a)})(r);default:return v_}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},__=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(h_)),l.identity,(0,l.always)(O_))),A_=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(m_)),l.identity,(0,l.always)(b_)));var N_=r(91104);let P_;const R_=(e,t)=>(P_||(P_=N_.createClient({key:t})),new Promise((t=>{P_.geocode({address:e},((e,r)=>{e&&(console.warn(e),t(null));const{results:n}=r.json,i=(0,l.pathOr)(null,[0,"geometry","location"],n);t(i||null)}))}))),S_=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},w_=(e,t)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(Os).flatMap((e=>{let r;return e.type==t&&(r=[S_(e)]),(0,l.is)(Object,e.value)&&(r=(r||[]).concat(w_(e.value,t))),r})),I_=e=>e&&e.length>0,U_=(e,t)=>[].concat(e&&e.attributes?w_(e.attributes,t):[]).filter(l.identity);function C_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const D_=(e,t,r,n,i,a)=>{if(e&&e.type){const t=bi(r,e.type);n&&(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){C_(e,t,r[t])}))}return e}({},e,{attributes:{[i]:[n]}}));const a=(t.geoLocationAttributes||[]).map((t=>{return r=U_(e,t.latitude),n=U_(e,t.longitude),I_(r)&&I_(n)&&(0,l.zipWith)(((e,t)=>({lat:Number(e),lng:Number(t)})),r,n);var r,n})).filter(l.identity);if(a.length>0)return Promise.resolve(a[0])}const o=t.GeoLocation;if(o){const e=o.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(I_(t)&&t[0].value&&I_(r)&&r[0].value)return{id:e.uri,lat:Number(t[0].value),lng:Number(r[0].value)}})).filter(l.identity);if(e.length>0)return Promise.resolve(e)}return n&&n.label?R_(n.label,a).catch((()=>null)):Promise.resolve(null)},j_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n={},i=(0,l.flatten)(t.map((t=>{return"configuration/entityTypes/Location"===t.type?{id:t.uri,label:t.label,entity:t,pointSource:t.attributes}:(n[t.type]=n[t.type]||((null===(r=bi(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>[e,t.attributes[e]])).filter((e=>{let[,t]=e;return t})).flatMap((e=>{let[r,n]=e;return n.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e,name:r})))})));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s,name:u}=t;return D_(a,o,e,s,u,r).then((e=>!e&&a.label&&""!==a.label?R_(a.label,r).catch((()=>null)):e)).then((e=>ae(e).filter(l.identity).map((e=>({id:e.id||n,label:i,entity:a,point:e}))))).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},L_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Promise.resolve((0,l.pipe)((0,l.chain)((t=>{const r=bi(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(ei(e,r.latitude,t.type)&&ei(e,r.longitude,t.type)){const e=U_(t,r.latitude),n=U_(t,r.longitude),i=(e,r)=>({id:`${t.uri}_nested_${e}_${r}`,entity:t,label:t.label,point:{lat:Number(e),lng:Number(r)}});return(0,l.zipWith)(i,e,n)}}))})),(0,l.filter)(l.identity),(0,l.uniqBy)((0,l.prop)("id")))(t))},k_=(e,t,r)=>Promise.all([L_(e,t),j_(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lng===e.point.lng))))]}));function F_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){M_(e,t,r[t])}))}return e}function M_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const x_=(e,t)=>t.values.map(So(e,t.entityTypeUri)),$_=(e,t,r)=>ll(t.fieldName,r)||ei(e,dn(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),V_=(e,t)=>{const r=(0,l.propOr)([],"values",t),n=(0,l.path)([t.attrType.lookupCode],e);return(0,l.map)((e=>{const t=(0,l.prop)(e,n);return t?Ng(e,t):e}),r)},G_=(0,l.path)(["attrType","label"]),B_=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>F_({},e,{[t]:!0})),{});e[r]=e[r]?F_({},e[r],n):n}return e}),{}),W_=(0,l.pipe)((0,l.prop)("values"),E),Y_=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",Ct.type.name)),q_=e=>e.type===K_.NUMERIC_RANGE_FACET,H_=e=>e.type===K_.DATE_RANGE_FACET,J_=(0,l.either)(q_,H_),K_={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},Q_=e=>{switch(null==e?void 0:e.name){case Ct.type.name:return K_.ENTITY_TYPE_FACET;case Ct.createdBy.name:case Ct.updatedBy.name:case Ct.sourceSystems.name:case Ct.tags.name:case Ct.roles.name:case Ct.matchRules.name:case Ct.MLRecommendedMatch.name:return K_.WITH_DROPDOWN_CHECKBOXES_FACET;case Ct.createdTime.name:case Ct.updatedTime.name:case Ct.startDate.name:case Ct.endDate.name:return K_.DATE_RANGE_FACET;case Ct.matches.name:case Ct.matchScore.name:return K_.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return K_.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return K_.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return K_.DATE_RANGE_FACET;default:return K_.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},X_=(0,l.pipe)($_,Q_),z_=(0,l.pipe)((0,l.path)(["attrType","type"]),pi),Z_=(0,l.cond)([[q_,(0,l.always)(Te.IN_RANGE)],[H_,(0,l.always)(Te.WITHIN)],[(0,l.allPass)([z_,e=>e.values.length>=2]),(0,l.always)(Te.EXISTS)],[l.T,(0,l.always)(Te.EQUALS)]]),eA=(0,l.cond)([[H_,(0,l.prop)("values")],[q_,(0,l.prop)("values")],[z_,e=>1===e.values.length?e.values.map(ce):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]),tA=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(ge),rA=e=>(e=>tA.reduce(((e,t)=>{const r=new RegExp(`'{0,1}${encodeURIComponent("${")}${t}${encodeURIComponent("}")}'{0,1}`,"g"),n=new RegExp(`'{0,1}${encodeURIComponent("${")}now${encodeURIComponent("}")}'{0,1}`,"g"),[i,a]=oc(t);return e.replace(r,i).replace(n,a)}),e))(e),nA=(0,l.curry)(((e,t)=>{const r=new URL(e),[,n]=r.pathname.split("/");return"nui"===n?`${e}search?state=${t}`:`${e}#p~com.reltio.plugins.search.SearchPerspective_s~${t}`})),iA={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},aA=e=>[iA.geoPolygon,iA.onMapMove].includes(e),oA=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},sA=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},lA=(e,t)=>aA(e)?t.map(oA):[sA(t)],uA=e=>aA(e)?fe().text("Geo Polygon"):fe().text("Geo Location"),cA=e=>{switch(e){case iA.geoLocation:return"geoLocation";case iA.geoPolygon:case iA.onMapMove:return"geoPolygon"}},pA={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},dA=e=>fe().text(e),yA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[Te.EQUALS]:"=",[Te.NOT_EQUALS]:"≠",[Te.STARTS_WITH]:"*",[Te.MISSING_VALUE]:fe().text("missing value"),[Te.HAS_ALL]:fe().text("has all"),[Te.IN_RANGE]:fe().text("in range"),[Te.FULL_TEXT]:fe().text("full text"),[Te.EXISTS]:fe().text("exists"),[Te.COUNT_EQUALS]:`${fe().text("count")} =`,[Te.COUNT_NOT_EQUALS]:`${fe().text("count")} ≠`,[Te.COUNT_LT]:`${fe().text("count")} <`,[Te.COUNT_LTE]:`${fe().text("count")} <=`,[Te.COUNT_GT]:`${fe().text("count")} >`,[Te.COUNT_RANGE]:fe().text("count range"),[Te.LT]:"<",[Te.LTE]:"<=",[Te.GT]:">",[Te.GTE]:">=",[Te.IN_FILE]:fe().text("in file"),[Te.NOT_IN_FILE]:fe().text("not in file"),[Te.CONTAINS]:"~",[Ee.LIST_EQUALS]:"=",[Ee.NOT_LIST_EQUALS]:"≠",[Ee.LIST_EQUALS_CASE_SENSITIVE]:"=",[Ee.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||fe().text(e.toLowerCase())},fA=e=>({type:pA.operator,text:e}),TA=e=>({type:pA.operator,text:dA(e)}),EA=e=>({type:pA.attributeLabel,text:e}),mA=e=>({type:pA.specialAttributeLabel,text:e}),hA=e=>({type:pA.attributeFilter,text:yA(e)}),bA=e=>({type:pA.attributeValue,text:e}),OA=e=>({type:pA.entityTypeLabel,text:e}),vA=()=>({type:pA.space,text:" "}),gA=()=>({type:pA.bracket,text:"("}),_A=()=>({type:pA.bracket,text:")"}),AA=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),NA=(0,l.curry)(((e,t)=>t.map(AA(e)))),PA=(0,l.curry)(((e,t,r)=>[e,...r,t])),RA=PA(gA(),_A()),SA=PA(vA(),vA()),wA=(0,l.curry)(((e,t)=>[e,...t])),IA=e=>wA(OA(e)),UA=e=>wA(OA(`${e}: `)),CA=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=Uu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=wu(s),a=Iu(s);!r&&t&&n&&(i.push(gA()),r=!0),i.push(o),r&&a&&(i.push(_A()),r=!1);const l=e?TA(s):fA(s);i.push(...SA([l]))}else i.push(o),r&&(i.push(_A()),r=!1)}return i}},DA=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),jA=(0,l.pipe)(CA({localizable:!1}),DA),LA=function(e){let{data:{title:t,pathToTitle:r}}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},kA=e=>{let{data:t,values:r,filter:n}=e;return t&&Ic({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},FA=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(kA)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),MA=(0,l.pipe)((0,l.chain)((0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)((e=>(e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.attrType)&&Qn(e.data.attrType)})(e)&&[Te.HAS_ALL,Te.EQUALS,Te.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:Kn((0,l.path)(["data","attrType"],e)),codeValues:(0,l.flatten)((0,l.propOr)([],"values",e))}))),(0,l.filter)((e=>{let{codeValues:t}=e;return t.length>0})))),Ug),xA=(e,t)=>(0,l.pipe)(MA,Cg(t))(e),$A=(0,l.pathEq)(["data","fieldName"],Ct.type.name),VA=(0,l.path)(["data","entityTypeUri"]),GA=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),BA=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(hs(e)),attributes:(0,l.filter)((0,l.pipe)(VA,(0,l.anyPass)([l.isNil,hs(e),r=>{const n=(t.entityTypes||[]).filter(hs(e));return(n.length>1?Ai(e,n):null)===r&&!!bi(e,r)}])))})(t))))),WA=e=>(0,l.pipe)((0,l.prop)("filter"),Eu,(0,l.equals)(e)),YA=(0,l.curry)(((e,t,r,n,i,a)=>{const o=ll(n.fieldName)||n.attrType,s=ec(o,i),u=Dg({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>Qn(s),()=>(0,l.is)(Object,a)&&a.lookupCode?Ng(a.lookupCode,a.value):Rg(r,Kn(o),a)],[()=>cl(s),()=>So(e,n.entityTypeUri,a)],[()=>pl(s),()=>Xo(e,a)],[()=>ml(s),()=>es(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>li(c)||pi(c)),Hu),bA)()})),qA=(e,t,r,n)=>{const i=YA(e,t,r,n.data,n.filter);return(0,l.cond)([[WA(0),(0,l.always)([])],[(0,l.both)(WA(2),(2,(0,l.pipe)((0,l.prop)("values"),l.flatten,l.length,(0,l.equals)(2)))),e=>{let{values:t}=e;const[r,n]=(0,l.flatten)(t);return[vA(),i(r),{type:pA.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[vA(),...(0,l.pipe)(l.flatten,(0,l.map)(i),NA({type:pA.punctuationMark,text:", "}))(t)]}]])(n)},HA=(e,t)=>{const r=!!ll(e.data.fieldName);return(0,l.pipe)(LA,r?mA:EA)(e,t)},JA=(e,t,r,n,i)=>[HA(n,i),vA(),hA(n.filter),...qA(e,t,r,n)],KA=(0,l.addIndex)(l.map),QA=(0,l.propEq)("length",1),XA=(0,l.propSatisfies)((0,l.lt)(1),"length"),zA=(0,l.complement)(l.isEmpty),ZA=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(ju,(0,l.filter)(kA),Lu,(0,l.map)((n=>({operand:JA(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,CA()))(n)},eN=(0,l.pipe)(ZA,l.flatten),tN=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>_p(e,{type:t}))).join(", ");return r?t(r):l.identity},u=ZA(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(IA),(0,l.pipe)(s(UA),(0,l.unless)((()=>QA(u)||i),RA)))(u)},rN=(e,t,r,n)=>(0,l.pipe)(ju,(0,l.filter)(FA),Lu,KA(((n,i,a)=>({operand:tN(e,t,r,n,QA(a)),operator:n.operator}))),CA(),l.flatten)(n),nN=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),CA(),l.flatten),iN=e=>{let{searchType:t,values:[r]}=e;return lA(t,r).join(", ")},aN=(e,t,r,n,i,a)=>{const o=(e=>e?[mA(e.isRawFilter?fe().text("Raw filter"):fe().text("Search")),...SA([hA(Te.EQUALS)]),bA(`"${e.value}"`)]:[])(i),s=(e=>e?[mA(uA(e.searchType)),vA(),bA(iN(e))]:[])(a),u=(0,l.pipe)(rN,(0,l.when)((e=>XA(e)&&(zA(o)||zA(s))),RA))(e,t,r,n);return nN([o,s,u])},oN=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),sN=(0,l.pipe)(aN,oN),lN=(0,l.has)("attributes"),uN=Array.isArray,cN=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),pN=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=dN(e,t,r,a,i);return(0,l.when)((0,l.always)((0,l.complement)(l.isNil)(o)),(0,l.pipe)((0,l.when)((0,l.always)((0,l.not)(cN(a))),RA),(0,l.concat)(SA([fA(o)]))))(s)},dN=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return lN(n)?pN(e,t,r,n,i):uN(n)?n.reduce(((n,a)=>n.concat(dN(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(SA([fA(n.operator)])))(JA(e,t,r,n,i))},yN=(e,t,r,n,i)=>(0,l.pipe)(dN,l.flatten)(e,t,r,n,i);function fN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){TN(e,t,r[t])}))}return e}function TN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const EN=(0,l.complement)($A),mN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)($A),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(VA),(0,l.reject)(l.isNil),l.uniq)(e),n=0===r.length,i=1===r.length&&(0===t.length||(0,l.equals)(r,t));return{entityTypesFromSpecialAttributes:t,entityTypesFromAttributes:r,areOnlySpecialAttributes:n,areAttributesFromOneEntityType:i}},hN=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=mN(t);return(r||n)&&Cu(t)},bN=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(hN)),n=e.filter((e=>{let{attributes:t=[]}=e;return t.length>0}));if(0===r.length||1===r.length&&1===n.length||t.push("Can't convert more than one complex transition advanced search group"),e.some((e=>(e.attributes||[]).filter($A).some((0,l.propEq)("filter",Te.NOT_EQUALS))))&&t.push("Can't convert advanced search group with 'Type' attribute and 'not equals' filter."),t.length)throw t;return e}),(0,l.reduce)(((e,t)=>e.concat((e=>{const t=[],r=e.attributes||[],{entityTypesFromSpecialAttributes:n,entityTypesFromAttributes:i}=mN(r);if(hN(e))t.push(fN({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(EN)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)($A,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(VA,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(EN),entityTypes:n,operator:i?a:e.operator,id:(0,Br.x0)()}}));t.push(...n)}var a;return t})(t))),[]))),ON={[Te.EQUALS]:Te.ON,[Te.IN_RANGE]:Te.WITHIN,[Te.GTE]:Te.AFTER,[Te.GT]:Te.AFTER,[Te.LTE]:Te.BEFORE,[Te.LT]:Te.BEFORE},vN=(0,l.curry)((e=>ON[e]||e)),gN=(0,l.curry)(((e,t)=>{switch(e){case Te.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case Te.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),_N=(0,l.pipe)((0,l.path)(["data","attrType","type"]),ai),AN=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>fN({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return _N(e)?(0,l.evolve)({filter:vN,values:gN(t)},e):e}))})))})),NN=(0,l.evolve)({values:(0,l.when)((0,l.pipe)((0,l.prop)(0),rc),(0,l.map)(oc))}),PN=(0,l.map)((0,l.cond)([[_N,NN],[l.T,l.identity]])),RN=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),bN,BA(t),(0,l.map)((0,l.evolve)({attributes:(0,l.pipe)((0,l.map)((0,l.evolve)({data:e(t,n,i)})),(0,l.reject)((0,l.propSatisfies)(l.isNil,"data")),PN)})),AN,(0,l.reject)(GA))(r)));function SN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wN(e,t,r[t])}))}return e}function wN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const IN=(e,t)=>({data:{uri:En(e.fieldName)?dn(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||Z_(e),id:(0,Br.x0)(),values:eA(e)}),UN=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=ll(a,t,r)||ei(e,i);if(!s)return null;if($n(s))return SN({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=_p(e,{type:o}),i=(Zn(e,dn(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return SN({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),CN=(0,l.curry)(((e,t,r,n)=>RN(UN,e,n,t,r)));function DN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){jN(e,t,r[t])}))}return e}function jN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const LN=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},kN=e=>"rdmLookups.not.resolved"===e?Ct.notResolved.name:e,FN=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===he.NOT_IN_RANGE?Te.IN_RANGE:be(a),u=kN(n),c=ll(u)||ei(e,i),p=(0,l.cond)([[()=>Ou(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>DN({},e,{filename:gg(e)}))))],[()=>pi(null==c?void 0:c.type),(0,l.map)(ce)],[e=>hu(s)&&!Array.isArray(e[0])&&!ai(null==c?void 0:c.type),oe],[l.T,l.identity]])(o);return{id:(0,Br.x0)(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===he.NOT_IN_RANGE?"and not":"and",filter:s,values:p}})),MN=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(FN(e,Ai(e,i)));return[{id:(0,Br.x0)(),operator:"or",attributes:a,entityTypes:i}]})),xN=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),$N=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([xN("from"),xN("to")]),(0,l.pipe)((0,l.pick)(["from","to"]),l.values)],[(0,l.pipe)((0,l.prop)("rangeSelection"),E,l.not),(0,l.pipe)((0,l.prop)("rangeSelection"),(0,l.pick)(["start","end"]),l.values)],[l.T,()=>[]]]),VN=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return DN({},r,{values:$N(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?nl(e.fieldName,n):e.fieldName})},GN=(e,t)=>{if((0,l.has)("children")(e)){const r=VN(e,t);return e.children.reduce(((e,n)=>(e.push(GN(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return VN(e,t)},BN=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(VN(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(DN({fieldName:e.fieldName},VN(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(GN,l.flatten)],[l.T,VN]]),WN=(0,l.pipe)((0,l.map)(BN),l.flatten),YN=e=>{if(e.every((e=>Array.isArray(e))))return e;if(2===e.length)return[e.map((e=>Number(e)))];if(1===e.length){const t=Number(e[0]);return[[t,t]]}return e},qN=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=MN(e,a),[u]=((e,t)=>{if(!t)return[];const[r,n]=(0,l.pipe)((0,l.reject)((e=>"tenants"===e.fieldName)),(0,l.partition)((e=>"type"===e.fieldName)))(t),i=(0,l.chain)((0,l.propOr)([],"values"),r);return[{attributes:WN(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>DN({},t,{type:X_(e,t)}))).map((e=>DN({},e,{values:J_(e)?YN(e.values):e.values}))).map((e=>{let{filter:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["filter"]);return IN(r,t)})),operator:"or",id:(0,Br.x0)(),entityTypes:i}]})(e,i),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.pipe)(l.keys,(0,l.map)((t=>({[kN(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[DN({},u,{entityTypes:null!=c&&c.type?(0,l.uniq)([...u.entityTypes,...s.entityTypes]):[],attributes:[...u.attributes,...s.attributes].filter((e=>{let{data:{fieldName:t}}=e;return c[t]}))})];return CN(e,t,r,p)},HN=(e,t,r,n)=>{try{return"2.0"==n.version?((e,t,r,n)=>{const{advanced:i=[],facets:a={}}=n,o=i.some((e=>{let{attributes:t,entityTypes:r=[]}=e;return t.length||r.length}))?i:((e,t)=>{const[[r={}],n]=(0,l.pipe)(l.values,(0,l.reject)(W_),(0,l.partition)(Y_))(t),i=n.map((t=>SN({},t,{type:X_(e,t)}))).map((e=>IN(e))),a=r.values||[];return[{attributes:i,operator:"or",id:(0,Br.x0)(),entityTypes:a}]})(e,a);return CN(e,t,r,o)})(e,t,r,n):qN(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},JN=e=>"2.0"===e.version?e.keyword:LN(e);var KN=r(97698);const QN=e=>e.activityFilter,XN=(0,l.pathOr)("",["globalFilter","query"]),zN=e=>e.searchOptions,ZN=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)(zN,(0,l.omit)(t),(0,l.filter)(l.identity),l.keys,(0,l.join)(","))(e)},eP=(0,KN.createSelector)(ZN,QN,XN,((e,t,r)=>({searchOptions:e,activityFilter:t,globalFilter:r}))),tP=e=>(0,l.pathEq)(["object","uri"],e),rP=(e,t)=>(0,l.pipe)((0,l.find)(tP(e)),(0,l.prop)("object"))(t),nP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=(0,l.pipe)((0,l.find)((0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),tP(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=rP(r.match,t)||n[r.match];return i?{label:np((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return Ro(e,i.type,t)||{label:t,uri:t}}))}:null};return(0,l.pipe)((0,l.defaultTo)([]),(0,l.when)((0,l.complement)(l.isEmpty),(0,l.map)(a)),(0,l.reject)(l.isNil))(i)},iP=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),aP=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),oP=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[],negativeRules:a=[]}=t;const o=(0,l.propOr)({},n,r);return{label:np((0,l.prop)("label",o)),matchRules:i.concat(a).map((function(t){return Ro(e,o.type,t)||{label:t,uri:t}}))}})))(t),sP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.map)((0,l.prop)("shortestTransitiveMatchPath")),l.flatten,(0,l.filter)(l.identity),(0,l.map)((0,l.prop)("match")),l.uniq);return t(e)},lP=(0,l.path)(["object","uri"]),uP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.find((e=>{let{uri:r}=e;return r===t}))},cP=e=>void 0!==(null==e?void 0:e.relevance),pP=e=>cP(e)?100*e.relevance+"%":"";function dP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yP(e,t,r[t])}))}return e}function yP(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fP=(e,t)=>!!e[t],TP=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},EP=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return 0===t.length&&e?e:(0,l.uniqBy)(r,[...t,...e||[]])},mP=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return dP({},t,{[r.uri]:dP({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:EP(null==o?void 0:o.parents,n),children:EP(null==o?void 0:o.children,i),values:EP(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},hP=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=bi(r,t)||Si(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return ss(r,n,i).flatMap(us).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>ei(r,e))).filter(l.identity).filter((0,l.prop)("dependentLookupCode"));return(e=>{let{structure:t,parentAttrType:r,childrenAttrTypes:n}=e;const i=n.map((0,l.prop)("uri")),a=mP({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>mP({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},bP=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!Zr(e.uri)&&on(e.type)&&on(t)&&!t.startsWith(e.type))(n,t))return e;const i=Ls(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(Os),(0,l.map)(TP))(i);return mP({structure:e,attrType:e[t].attrType,values:a})}),t)},OP=e=>{let{structure:t,attributeValue:r}=e;if((0,l.is)(Object,r.value))return Object.values(r.value).reduce(((e,t)=>{const r=t.some((e=>{let{value:t}=e;return(0,l.is)(Object,t)})),n=t.some((t=>{let{type:r}=t;return fP(e,r)}));return r||n?t.filter(Os).reduce(((e,t)=>OP({structure:e,attributeValue:t})),e):e}),t);{const e=r;return fP(t,e.type)?mP({structure:t,attrType:t[e.type].attrType,values:[TP(e)]}):t}},vP=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?dP({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},gP=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=Ls(i,n,r)||[];return a.length?mP({structure:t,attrType:t[r].attrType,values:a.filter(Os).map(TP)}):t},_P=(e,t,r)=>{const n=rn(e),i=rn(t);return n===i?((e,t)=>{const r=bn(t),n=bn(e);return ln(n,r)||((e,t)=>mn(e)&&!mn(t)&&ln(t,e))(n,r)})(e,t):!(!r||!hn(t))&&Gh(r,i).includes(n)},AP=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},NP=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?$h(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return _P(r,t,o)}))},PP=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>PP(e,t,r)))))},RP=(e,t,r,n,i)=>{let{uri:a,value:o}=r;const{uri:s,defaultValue:l}=e,u=((e,t)=>{var r;return null==e||null===(r=e[t])||void 0===r?void 0:r.isTouched})(i,a),c=AP(n,s)||!!l&&!u,p=a!==t&&c;return{type:s,uri:a,lookupValue:o,autopopulate:p,useDefaultValue:p&&!u}},SP=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s,editorsState:l}=e;const u=t[r],c=rn(n),p=Vh(c,o,i,a),d=PP("children",t,u),y=PP("parents",t,u),f=d.flatMap((e=>PP("parents",t,e))).filter((e=>![...y,u,...d].includes(e))),T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return _P(t,n,p)})).map((t=>RP(e.attrType,n,t,s,l)))));if(!T.length)return[];const E=y.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return _P(n,t,p)||rn(t)!==c&&_P(t,n,p)})).map((t=>RP(e.attrType,n,t,s,l))))),m=f.flatMap((e=>{const r=PP("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return T.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&_P(n,t,p)}))})).map((t=>RP(e.attrType,n,t,s,l)))}));return[...u.values.filter((e=>{let{uri:t}=e;return _P(t,n,p)})).map((e=>RP(u.attrType,n,e,s,l))),...E,...m,...T]},wP=(e,t)=>e.structure[t],IP=(e,t)=>e.editors[t],UP=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=Dg({attributePresentations:r,dataTypeDefinition:t}),a=(0,l.pipe)((e=>{const t={};for(const r of e){const[e,n]=Object.entries(r)[0];t[e]=Array.isArray(n)?n.map((e=>({value:e,ov:!0}))):[{value:n,ov:!0}]}return{value:t}}),(e=>tp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[Wn,()=>a(n)],[Qn,()=>(e=>{const r=o(e),n=Kn(t);return nu([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Rg(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},CP=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:Te.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(DP(r,t)):i.push(jP([t],r)),i},DP=(e,t)=>{const r=Vn(e),n=t=>(e[r]||[]).find((e=>e.uri===t||e.uri.endsWith(`/${t}`)));return t.reduce(((e,t)=>{for(const r in t){const i=n(r),a=Wn(i)?DP(i,t[r]):[jP(t[r],i)];return e.push(...a),e}}),[])},jP=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Jn(t.uri),filter:t.type===mt.TYPE_BLOB?Te.FULL_TEXT:Te.EQUALS,values:e}:{fieldName:Jn(t.uri),filter:Te.MISSING_VALUE},LP=(e,t)=>(0,l.equals)(JSON.parse(JSON.stringify(e)),JSON.parse(JSON.stringify(t))),kP=new class{constructor(){this.comparators=void 0,this.comparators={}}register(e,t){this.comparators[e]=t}get(e){var t;return null!==(t=this.comparators[e])&&void 0!==t?t:LP}},FP={AttributesDiff:o,AttributesEditor:a,HistoryManager:s},MP={Colors:r(29504),DependencyManager:r(47485),strings:n,dates:i}},29504:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getColor:()=>i});var n=[[255,235,238,0],[255,205,210,0],[239,154,154,0],[229,115,115,0],[239,83,80,1],[244,67,54,1],[229,57,53,1],[211,47,47,1],[198,40,40,1],[183,28,28,1],[255,138,128,0],[255,82,82,1],[255,23,68,1],[213,0,0,1],[252,228,236,0],[248,187,208,0],[244,143,177,0],[240,98,146,1],[236,64,122,1],[233,30,99,1],[216,27,96,1],[194,24,91,1],[173,20,87,1],[136,14,79,1],[255,128,171,0],[255,64,129,1],[245,0,87,1],[197,17,98,1],[243,229,245,0],[225,190,231,0],[206,147,216,0],[186,104,200,1],[171,71,188,1],[156,39,176,1],[142,36,170,1],[123,31,162,1],[106,27,154,1],[74,20,140,1],[234,128,252,0],[224,64,251,1],[213,0,249,1],[170,0,255,1],[237,231,246,0],[209,196,233,0],[179,157,219,0],[149,117,205,1],[126,87,194,1],[103,58,183,1],[94,53,177,1],[81,45,168,1],[69,39,160,1],[49,27,146,1],[179,136,255,0],[124,77,255,1],[101,31,255,1],[98,0,234,1],[232,234,246,0],[197,202,233,0],[159,168,218,0],[121,134,203,1],[92,107,192,1],[63,81,181,1],[57,73,171,1],[48,63,159,1],[40,53,147,1],[26,35,126,1],[140,158,255,0],[83,109,254,1],[61,90,254,1],[48,79,254,1],[227,242,253,0],[187,222,251,0],[144,202,249,0],[100,181,246,0],[66,165,245,0],[33,150,243,1],[30,136,229,1],[25,118,210,1],[21,101,192,1],[13,71,161,1],[130,177,255,0],[68,138,255,1],[41,121,255,1],[41,98,255,1],[225,245,254,0],[179,229,252,0],[129,212,250,0],[79,195,247,0],[41,182,246,0],[3,169,244,0],[3,155,229,1],[2,136,209,1],[2,119,189,1],[1,87,155,1],[128,216,255,0],[64,196,255,0],[0,176,255,0],[0,145,234,1],[224,247,250,0],[178,235,242,0],[128,222,234,0],[77,208,225,0],[38,198,218,0],[0,188,212,0],[0,172,193,0],[0,151,167,1],[0,131,143,1],[0,96,100,1],[132,255,255,0],[24,255,255,0],[0,229,255,0],[0,184,212,0],[224,242,241,0],[178,223,219,0],[128,203,196,0],[77,182,172,0],[38,166,154,0],[0,150,136,1],[0,137,123,1],[0,121,107,1],[0,105,92,1],[0,77,64,1],[167,255,235,0],[100,255,218,0],[29,233,182,0],[0,191,165,0],[232,245,233,0],[200,230,201,0],[165,214,167,0],[129,199,132,0],[102,187,106,0],[76,175,80,0],[67,160,71,1],[56,142,60,1],[46,125,50,1],[27,94,32,1],[185,246,202,0],[105,240,174,0],[0,230,118,0],[0,200,83,0],[241,248,233,0],[220,237,200,0],[197,225,165,0],[174,213,129,0],[156,204,101,0],[139,195,74,0],[124,179,66,0],[104,159,56,1],[85,139,47,1],[51,105,30,1],[204,255,144,0],[178,255,89,0],[118,255,3,0],[100,221,23,0],[249,251,231,0],[240,244,195,0],[230,238,156,0],[220,231,117,0],[212,225,87,0],[205,220,57,0],[192,202,51,0],[175,180,43,0],[158,157,36,0],[130,119,23,1],[244,255,129,0],[238,255,65,0],[198,255,0,0],[174,234,0,0],[255,253,231,0],[255,249,196,0],[255,245,157,0],[255,241,118,0],[255,238,88,0],[255,235,59,0],[253,216,53,0],[251,192,45,0],[249,168,37,0],[245,127,23,0],[255,255,141,0],[255,255,0,0],[255,234,0,0],[255,214,0,0],[255,248,225,0],[255,236,179,0],[255,224,130,0],[255,213,79,0],[255,202,40,0],[255,193,7,0],[255,179,0,0],[255,160,0,0],[255,143,0,0],[255,111,0,0],[255,229,127,0],[255,215,64,0],[255,196,0,0],[255,171,0,0],[255,243,224,0],[255,224,178,0],[255,204,128,0],[255,183,77,0],[255,167,38,0],[255,152,0,0],[251,140,0,0],[245,124,0,0],[239,108,0,1],[230,81,0,1],[255,209,128,0],[255,171,64,0],[255,145,0,0],[255,109,0,0],[251,233,231,0],[255,204,188,0],[255,171,145,0],[255,138,101,0],[255,112,67,0],[255,87,34,1],[244,81,30,1],[230,74,25,1],[216,67,21,1],[191,54,12,1],[255,158,128,0],[255,110,64,0],[255,61,0,1],[221,44,0,1],[239,235,233,0],[215,204,200,0],[188,170,164,0],[161,136,127,1],[141,110,99,1],[121,85,72,1],[109,76,65,1],[93,64,55,1],[78,52,46,1],[62,39,35,1],[250,250,250,0],[245,245,245,0],[238,238,238,0],[224,224,224,0],[189,189,189,0],[158,158,158,0],[117,117,117,1],[97,97,97,1],[66,66,66,1],[33,33,33,1],[236,239,241,0],[207,216,220,0],[176,190,197,0],[144,164,174,0],[120,144,156,1],[96,125,139,1],[84,110,122,1],[69,90,100,1],[55,71,79,1],[38,50,56,1],[0,0,0,1],[255,255,255,0]];function i(e){var t,r=null,i=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];return n.forEach((function(e){var n=Math.abs(i[0]-e[0])+Math.abs(i[1]-e[1])+Math.abs(i[2]-e[2]);(null===r||n<r)&&(r=n,t=e)})),t?t[3]:0}},47485:(e,t,r)=>{"use strict";function n(e){var t=[];return{getInfo:function(){return e},getEdges:function(){return t},removeEdge:function(e){var r=t.indexOf(e);t.splice(r,1)},addEdge:function(e){t.push(e)}}}function i(e,t){t(e),e.getEdges().forEach((function(e){i(e,t)}))}function a(e){var t=[];return e.getEdges().forEach((function(e){t.push.apply(t,a(e))})),t.push(e),t}function o(e,t){var r=null;if(e.getInfo()===t)return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=o(n[i],t));i++);return r}function s(e,t){var r=null;if(e.getEdges().some((function(e){return e.getInfo()===t})))return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=s(n[i],t));i++);return r}r.r(t),r.d(t,{Node:()=>n,resolve:()=>i,findNode:()=>o,findParentNode:()=>s,getDependencyOrder:()=>a})},33196:()=>{},38087:()=>{},74854:()=>{},66602:()=>{}}]);
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e15270dc-0762-4b9d-952f-3d39ec176642",e._sentryDebugIdIdentifier="sentry-dbid-e15270dc-0762-4b9d-952f-3d39ec176642")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1664"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3854],{31421:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>zs,IL3:()=>VT,PY2:()=>gt,Ng6:()=>Me,YJ7:()=>Ne,NlI:()=>Ee,XYV:()=>ge,Xt7:()=>Ce,wfT:()=>lr,EMD:()=>Xt,HAc:()=>je,PEf:()=>Rt,oA3:()=>Qt,$XE:()=>et,eWf:()=>Nt,q7e:()=>Le,KVe:()=>ur,WVQ:()=>Ei,oZZ:()=>Er,bNA:()=>mr,Rjq:()=>hr,G39:()=>wt,W0P:()=>ct,X1H:()=>st,hdG:()=>yt,ws7:()=>ft,VI$:()=>dt,yn8:()=>Qe,N0y:()=>Ke,dZX:()=>tt,bQt:()=>Or,oS0:()=>mt,KfU:()=>De,bZE:()=>Oe,Nsj:()=>Se,psV:()=>Ae,xPW:()=>_t,pyR:()=>nr,p8l:()=>Zt,Wkf:()=>Ue,zHr:()=>Ie,NIO:()=>we,$26:()=>Q_,s9T:()=>He,MEy:()=>$u,j5E:()=>Te,vAw:()=>Kt,NMQ:()=>Jt,eVu:()=>uc,YGb:()=>ut,Z9$:()=>nt,Y1q:()=>Hh,RgZ:()=>er,Qy0:()=>br,Q26:()=>Re,pYu:()=>Yt,wIJ:()=>aA,GFH:()=>$e,Ury:()=>It,S91:()=>Ut,wSh:()=>te,BDP:()=>ki,pGS:()=>rr,ARY:()=>ht,XGc:()=>sr,fO_:()=>kt,wwy:()=>We,h_8:()=>Dt,_XL:()=>Pe,j2V:()=>cr,dMV:()=>ar,xYD:()=>Tt,OXy:()=>bt,BXd:()=>Xe,KM9:()=>Fe,lXI:()=>at,C68:()=>St,Yj_:()=>Ye,D25:()=>Ge,ZIY:()=>rt,Tl4:()=>dA,lwr:()=>Pt,NkU:()=>pr,Rtp:()=>or,YGx:()=>ze,uTS:()=>ir,MCv:()=>ke,IYE:()=>zt,PiC:()=>Tr,MVv:()=>pt,Q_m:()=>gr,h_m:()=>ot,DUe:()=>ve,tJI:()=>xe,fDt:()=>Ve,cNQ:()=>dr,SwE:()=>qt,ZHR:()=>fr,PYu:()=>lt,lD1:()=>Ct,lVm:()=>Ze,vnX:()=>O_,$x5:()=>v_,_R1:()=>h_,wUm:()=>b_,dC6:()=>Je,MBD:()=>Be,GmF:()=>fa,cKm:()=>it,iP_:()=>At,NVC:()=>qe,tPT:()=>Pl,tZe:()=>iE,kRE:()=>Um,psB:()=>Cm,X0$:()=>Nl,$vY:()=>Al,zE1:()=>kl,Wm5:()=>fl,vyX:()=>Hc,wLZ:()=>Rl,W4V:()=>ue,EtK:()=>Ds,ayi:()=>_l,asT:()=>vP,kGs:()=>gb,RLE:()=>dg,ewt:()=>ay,O_f:()=>Cu,sOy:()=>ln,kP7:()=>pg,Tde:()=>Jn,LMI:()=>wc,skb:()=>tN,sPt:()=>Oc,sH1:()=>vc,lPZ:()=>Nf,bG8:()=>Af,_LJ:()=>Pf,RPM:()=>gy,h27:()=>$c,Uqd:()=>qc,xG:()=>fN,Z2f:()=>Ug,fgW:()=>LA,I69:()=>oN,ZxB:()=>lN,dwd:()=>_f,F$g:()=>gf,mdt:()=>Mb,Qbq:()=>ob,rny:()=>Xi,UEY:()=>La,Q0T:()=>ja,Lyr:()=>Ga,sBn:()=>Da,itK:()=>wa,H9$:()=>Ca,KPc:()=>Ua,zos:()=>Ia,ELQ:()=>Ba,dZs:()=>ba,Cz4:()=>ha,z_L:()=>$a,fGe:()=>ma,iuF:()=>Ra,Wib:()=>Sa,Hn0:()=>Va,obS:()=>Wa,E$L:()=>Oa,XUh:()=>Pa,Qp_:()=>Aa,_jk:()=>va,sKE:()=>ga,WmG:()=>Na,QKx:()=>Ma,Oik:()=>Fa,s0A:()=>_a,o9m:()=>ka,MCd:()=>xa,RsS:()=>Vc,tGK:()=>iu,lIv:()=>Fl,mqZ:()=>xi,Vg3:()=>ia,mkC:()=>Yi,xv5:()=>oa,a14:()=>Hi,yv0:()=>aa,Zm0:()=>qi,Nxd:()=>Wi,$mM:()=>na,ifj:()=>hi,NWi:()=>e_,xr3:()=>Zg,wNf:()=>mu,iJH:()=>t_,KB$:()=>pP,d89:()=>Vi,Edd:()=>Gi,Z5t:()=>Bi,uGe:()=>Mi,UoR:()=>Fi,xvW:()=>zg,$qe:()=>Xg,yPM:()=>Ea,$cp:()=>Ll,vKJ:()=>Dl,VtG:()=>Qf,AID:()=>Ch,B1H:()=>lP,b7X:()=>nb,$uE:()=>Nb,keo:()=>ab,C_p:()=>uf,G27:()=>BO,O8b:()=>wf,JA0:()=>bm,b3T:()=>vb,oC6:()=>bb,_Zs:()=>Ob,epC:()=>Rb,YYG:()=>Pb,f_2:()=>vm,w3l:()=>MN,QHB:()=>GO,Jso:()=>YN,RXH:()=>RO,Vr9:()=>zO,lMm:()=>Xv,BlA:()=>DP,fmQ:()=>Ns,yRD:()=>NN,NcL:()=>Ef,QK6:()=>Rr,ymd:()=>$T,JV_:()=>Jm,XiW:()=>fd,Yrx:()=>om,BiY:()=>kp,GPx:()=>gl,gjI:()=>vl,vlo:()=>fy,E_P:()=>Cb,aAL:()=>RT,NBq:()=>Ps,wp9:()=>Fb,DsR:()=>vT,MPc:()=>ed,gWE:()=>td,DT_:()=>rd,ipn:()=>id,ORg:()=>Ci,_wz:()=>nd,RYR:()=>Id,PP2:()=>pm,wS7:()=>Gg,cBQ:()=>aT,pBq:()=>Eh,DsO:()=>re,X78:()=>Qm,xZs:()=>Wm,hp4:()=>Pm,YFy:()=>lm,Gmt:()=>km,K$w:()=>Lm,DSj:()=>ST,Mfr:()=>um,k9j:()=>sT,EjS:()=>Z,ww$:()=>Sl,WVU:()=>jm,hxF:()=>El,n6p:()=>Mp,E7G:()=>Dp,nwO:()=>MP,Mzk:()=>Zf,aFF:()=>db,HRH:()=>Yu,EZK:()=>ap,Kxm:()=>tp,Z9i:()=>$y,CrF:()=>Rm,Oz9:()=>fh,DNd:()=>qa,vUy:()=>PP,lJh:()=>Qu,zHo:()=>Xu,UO$:()=>gh,zeJ:()=>ei,dLR:()=>Fs,JQy:()=>Ks,XtP:()=>Ls,Ug0:()=>Ai,fa7:()=>dy,A1W:()=>ib,sw:()=>ip,nv3:()=>u_,JgD:()=>l_,SkP:()=>Qs,SAs:()=>hh,i5L:()=>Xs,PWK:()=>Qo,IM5:()=>ks,Aup:()=>XO,Mfk:()=>eg,HQx:()=>cs,oN$:()=>us,mB6:()=>jg,p6d:()=>U,o0x:()=>D,ufS:()=>vg,k7L:()=>gg,ped:()=>dP,mrB:()=>C,OuZ:()=>op,ncP:()=>tn,FQ2:()=>sp,W$R:()=>lp,JOV:()=>Kr,Zmi:()=>Qr,hm5:()=>zr,ECL:()=>su,vPL:()=>up,qmL:()=>qh,hPi:()=>yh,hXd:()=>Zi,OCS:()=>ea,p2l:()=>el,qF1:()=>GT,_X$:()=>BT,$1R:()=>XN,bzh:()=>Vb,k66:()=>os,kiP:()=>vo,pSg:()=>de,Z$v:()=>Qd,kz_:()=>Tm,H_U:()=>ls,t9e:()=>Za,j2$:()=>aE,PFL:()=>Fn,aJ3:()=>V_,To9:()=>Kn,ADq:()=>Ly,UUb:()=>Dy,tQX:()=>jy,xy8:()=>Vn,EUG:()=>ti,AFK:()=>fn,X3M:()=>Zn,WN0:()=>ss,kDl:()=>Ms,uDV:()=>Yh,IhQ:()=>Ws,pfb:()=>qs,R$r:()=>Ub,w80:()=>Fo,Pfu:()=>Xa,Gtj:()=>Kl,fyF:()=>Jl,kkq:()=>as,u5q:()=>rn,O$n:()=>Np,ptG:()=>Pp,b7z:()=>vf,f4_:()=>Qb,uap:()=>Kb,d7q:()=>am,liG:()=>dm,$oF:()=>im,avf:()=>Jp,DiQ:()=>Hp,cfX:()=>qp,vD3:()=>Qp,Qrb:()=>Yp,EJQ:()=>Kp,HWy:()=>Wp,gjS:()=>Dd,y6v:()=>Bp,JUW:()=>gm,GtP:()=>uO,_kX:()=>Ja,u1e:()=>Ka,sJj:()=>ub,CJp:()=>sO,uKF:()=>lb,wo0:()=>Im,s5:()=>Zo,cwx:()=>zo,Y6b:()=>JE,TTx:()=>$m,UtR:()=>KE,HaQ:()=>Vm,E6I:()=>Nm,Won:()=>XE,vTU:()=>qE,Nsy:()=>Tp,KMQ:()=>pb,Do$:()=>bp,CSV:()=>nl,TMe:()=>QE,l1V:()=>ec,RHh:()=>lc,VQ1:()=>oc,cGG:()=>ac,z7d:()=>Ty,Xaq:()=>ys,_2w:()=>UP,Sj8:()=>wP,PJj:()=>tu,me4:()=>IP,k3T:()=>Pi,PjQ:()=>ji,qjb:()=>Zd,s7l:()=>Wf,jLA:()=>cO,BoX:()=>ri,GGR:()=>cy,j5q:()=>ly,DnY:()=>Vf,RY5:()=>xh,Px$:()=>Ud,KPC:()=>aP,NIY:()=>Xf,HvW:()=>qf,Fof:()=>to,BXy:()=>Hf,fX:()=>pO,BTI:()=>vp,uie:()=>pp,q27:()=>Sp,vrC:()=>dv,fAQ:()=>eh,XkT:()=>$f,lrH:()=>th,nt9:()=>bi,XH8:()=>Ap,XH2:()=>Ni,jFi:()=>_p,qhs:()=>ko,GBJ:()=>eT,wwR:()=>Op,Uk3:()=>Tn,yV:()=>Hd,$Rg:()=>_n,ev7:()=>uP,RB9:()=>hm,iFp:()=>Ay,e$p:()=>Py,PcX:()=>Ry,SpP:()=>Ny,R6_:()=>B_,CY1:()=>X_,Ajk:()=>Lf,Yiz:()=>jf,FK9:()=>Sf,UOo:()=>_g,uug:()=>Eu,P$2:()=>eA,XS2:()=>lu,Hyb:()=>Su,d3Y:()=>Xc,Klp:()=>Zc,WxZ:()=>tA,Gzu:()=>Zu,ZOr:()=>xf,uqV:()=>BE,Pm4:()=>ie,hWO:()=>pn,nHA:()=>Zb,nVD:()=>Vh,_tF:()=>dc,jrj:()=>zN,nDj:()=>tP,dED:()=>rm,P2h:()=>tm,jrr:()=>mo,mmY:()=>bo,T6O:()=>ps,h6J:()=>tE,hM2:()=>JN,XR6:()=>ee,jmz:()=>Wh,IHt:()=>Bh,NZI:()=>xy,wdF:()=>zm,YNv:()=>rb,IFm:()=>tb,o_F:()=>Kh,kgP:()=>Zm,ZYI:()=>kT,QXK:()=>Wl,efz:()=>Yl,Q5d:()=>Bl,Ysv:()=>ql,UWq:()=>hy,ocC:()=>my,io3:()=>gi,XS1:()=>iy,IK$:()=>ny,Sbt:()=>xo,roS:()=>Mo,Ww1:()=>$o,QaS:()=>tT,wsP:()=>Ur,ERZ:()=>kN,CL1:()=>KN,idV:()=>np,nIW:()=>cn,x7Y:()=>A,fjE:()=>W_,sG0:()=>Pg,tV7:()=>ru,g8o:()=>cA,Qy:()=>uA,t2P:()=>$_,KbW:()=>Po,wId:()=>So,TAC:()=>cP,LS0:()=>wo,bFH:()=>IE,Rgl:()=>CE,fW1:()=>Gb,GFW:()=>Gm,Ywp:()=>f_,pg:()=>dE,WSA:()=>DE,ffJ:()=>fg,gEI:()=>Eg,fed:()=>qN,tT_:()=>Ys,BgZ:()=>Hs,xIV:()=>Js,KbL:()=>Bf,JBA:()=>bn,aNC:()=>s_,RFJ:()=>LT,Zeh:()=>vh,OT5:()=>y_,mC3:()=>xl,kR6:()=>CP,gFw:()=>Xb,NVY:()=>Lb,k6v:()=>WT,FEC:()=>YT,L5S:()=>Db,Ob5:()=>wp,KUV:()=>Ip,dvH:()=>jb,V3i:()=>tv,VD3:()=>_i,mm2:()=>ic,rou:()=>uh,_Zp:()=>eo,izH:()=>Qa,DK$:()=>za,KMp:()=>PT,c31:()=>Pn,mbo:()=>Fy,gT8:()=>wn,CZ8:()=>_s,uGi:()=>ws,Poc:()=>An,_9k:()=>Cs,ZTM:()=>Rs,bwT:()=>Is,tF$:()=>Sn,o96:()=>As,M4S:()=>Us,_vs:()=>bT,Ff:()=>qd,xF8:()=>jd,PUO:()=>yb,CNu:()=>Kd,ATu:()=>ky,j1S:()=>Ii,X1R:()=>Jd,GWB:()=>ty,VFB:()=>zd,V3K:()=>Si,Lmx:()=>wi,oSN:()=>Li,ZaZ:()=>Nn,w1L:()=>Yd,n_1:()=>YE,N6e:()=>_T,IwQ:()=>ey,GWs:()=>Xd,SxO:()=>ho,w3p:()=>kb,xU7:()=>Nr,hAq:()=>Ar,Y_p:()=>Bo,$k6:()=>Go,Gdl:()=>Sg,U6P:()=>Rg,OwB:()=>G_,hTh:()=>Gh,xqc:()=>es,JvE:()=>ts,i29:()=>Lc,dzT:()=>Ki,uPS:()=>iT,cZV:()=>nT,n3B:()=>GA,e6O:()=>kA,s7j:()=>iA,j$Q:()=>_m,$op:()=>ZN,PeS:()=>Xy,kW2:()=>lO,tH7:()=>Xo,Yxg:()=>ll,bOT:()=>Tg,MaZ:()=>uy,nqN:()=>sy,$wt:()=>eP,jWj:()=>Oy,o_J:()=>fs,yW4:()=>rE,uT0:()=>ZT,C82:()=>eE,Jkk:()=>Vp,_we:()=>ry,bsH:()=>zb,u9Z:()=>lh,LCU:()=>Bm,J$m:()=>WE,j_Q:()=>If,OaI:()=>Uf,wB1:()=>sP,SP6:()=>pE,ZYr:()=>iP,IMU:()=>jT,FoU:()=>Om,DVz:()=>Dg,mxe:()=>$A,FHr:()=>bh,D1g:()=>ch,VO3:()=>N_,de5:()=>A_,Uw1:()=>Ir,J6q:()=>My,XCe:()=>co,fbl:()=>T_,Ir:()=>Ao,XQO:()=>No,QXb:()=>_E,zXF:()=>Jh,P8_:()=>qm,iiD:()=>NT,MOC:()=>AE,WF:()=>gE,xE1:()=>Di,idW:()=>bP,QWZ:()=>ig,YL3:()=>zf,NW9:()=>Og,D_E:()=>Pr,Fn9:()=>T,j2U:()=>Zs,MpE:()=>Cn,kQw:()=>xn,mfm:()=>wu,vZp:()=>En,Wah:()=>Gy,E8K:()=>TP,VSb:()=>vs,vr_:()=>Mn,Vmh:()=>NP,FgW:()=>ev,oDv:()=>Es,fGG:()=>ag,kuw:()=>hs,eHk:()=>by,Tt2:()=>Ts,pQZ:()=>bs,oZ7:()=>og,T6Y:()=>pi,VRd:()=>vn,_26:()=>Nu,YkM:()=>Hn,J6y:()=>pu,njU:()=>bu,TBP:()=>ms,IT0:()=>Vy,x_:()=>cb,FP6:()=>gn,biM:()=>mp,TMl:()=>hp,Vkd:()=>gu,WiY:()=>J_,_zi:()=>_u,RZp:()=>mf,J6D:()=>nc,Lt4:()=>ai,QEi:()=>Xn,whI:()=>Mt,KIu:()=>$t,JhM:()=>le,C_0:()=>fi,lzc:()=>Cp,qIF:()=>BA,O27:()=>E,aBi:()=>Rp,xOX:()=>yl,EdS:()=>on,WgC:()=>an,eEv:()=>Ln,A4t:()=>Ou,YOQ:()=>hn,Wos:()=>ui,jWr:()=>Ya,Or$:()=>qn,lhE:()=>vi,CwH:()=>Qn,pzC:()=>cl,ymH:()=>hu,QZu:()=>Wn,rYH:()=>H_,FVt:()=>li,Kn2:()=>pe,jgw:()=>Iu,Qgr:()=>rc,OXP:()=>Os,nsY:()=>Iy,vyG:()=>Sy,lS4:()=>zn,g5f:()=>K_,fp6:()=>fu,Uty:()=>ua,YkG:()=>Yn,xdS:()=>In,kMF:()=>ad,$NE:()=>sn,bC9:()=>nn,Ian:()=>Ui,KVV:()=>sb,q9e:()=>Vo,iIf:()=>wg,ian:()=>ml,m6e:()=>Ti,OFd:()=>pl,kqr:()=>$n,fnZ:()=>Ft,VFZ:()=>hl,ZiX:()=>Zr,j5n:()=>oi,zkt:()=>N,Pcm:()=>oP,QDV:()=>ul,M5u:()=>q_,laD:()=>VA,mtq:()=>jn,CtB:()=>Ig,CBv:()=>se,I0t:()=>yi,u1G:()=>yy,gk1:()=>MA,Bgb:()=>FA,uzs:()=>xt,v0l:()=>mc,Zqp:()=>zE,j0k:()=>Jo,l22:()=>kP,tCm:()=>yn,gmx:()=>uu,mOr:()=>Vu,TwZ:()=>pA,GyU:()=>c_,zGm:()=>TE,bMg:()=>FE,EyD:()=>Kg,FQA:()=>Qg,fZN:()=>$E,xsF:()=>Hg,Lxg:()=>Jg,O3l:()=>uT,Wni:()=>lT,wRx:()=>n_,OxG:()=>RE,Jwg:()=>NE,uJQ:()=>PE,qWg:()=>Cg,i96:()=>yE,NPd:()=>Ju,MrZ:()=>Ko,zhn:()=>r_,G8q:()=>vr,Jct:()=>Nd,A9Y:()=>ne,Y5F:()=>SN,gxP:()=>ce,c$P:()=>cu,M7o:()=>Yc,BBN:()=>yo,fS6:()=>Wd,ZBU:()=>z,UkJ:()=>Io,xkv:()=>Ym,z$M:()=>OP,KAm:()=>mm,lCl:()=>Dh,D9R:()=>pf,rkF:()=>cf,IU6:()=>cE,RGr:()=>h,aYu:()=>m,ije:()=>Zl,Buf:()=>AT,YLu:()=>zl,ct9:()=>Yo,XkY:()=>ME,T5R:()=>EE,uQS:()=>VE,wcJ:()=>Wo,d$I:()=>wl,rSp:()=>Ep,Sx:()=>Kf,Ilm:()=>Ml,Ki6:()=>Tl,VGk:()=>OT,sFD:()=>SO,eWN:()=>gP,dWE:()=>nA,Lkd:()=>Td,aDL:()=>_h,yaA:()=>GE,lOh:()=>dh,DBr:()=>F_,hK$:()=>nu,uKH:()=>yg,TZ_:()=>uE,CMB:()=>WA,FU8:()=>Jf,J$p:()=>Rh,b5s:()=>Ph,h2W:()=>dn,SL_:()=>ih,oUH:()=>QT,ck9:()=>mE,RAb:()=>pc,nL:()=>Ng,k$p:()=>IO,Xs0:()=>Xl,u7I:()=>ph,rxg:()=>ju,bji:()=>Lu,oCZ:()=>af,MjG:()=>__,FuV:()=>KT,$ju:()=>zT,t6d:()=>XT,m5F:()=>wr,sx:()=>_P,rSc:()=>Lg,U10:()=>Cf,L8n:()=>Dm,R9X:()=>HE,rj2:()=>Km,_C4:()=>oE,tCj:()=>Hm,uAg:()=>sm,wx9:()=>oy,KF3:()=>sE,ax9:()=>lE,HH7:()=>gT,ufV:()=>cm,_6y:()=>oT,XTh:()=>m_,AJo:()=>rT,Ixr:()=>Am,oss:()=>FP,P6Y:()=>xP,q5j:()=>zy,Bd_:()=>ef,xkB:()=>Zy,W41:()=>oh,WkI:()=>ah,sSE:()=>Qy,GMd:()=>Ic,jtL:()=>Uc,Bxm:()=>rf,zWh:()=>Eo,AlY:()=>sh,FVh:()=>Yy,inb:()=>d_,U_T:()=>jE,FTe:()=>oe,VGB:()=>ae,tM8:()=>ku,Wfe:()=>Hu,Ls5:()=>qu,$bd:()=>Mu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>_,durationToTimestamp:()=>Z,formatDate:()=>U,formatDateTime:()=>D,formatTime:()=>C,getEndOfDay:()=>I,getLocaleFormat:()=>A,getMomentFormatFromDateMask:()=>J,getMomentFormatFromDateTimeMask:()=>X,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>w,isDateInRange:()=>v,isToday:()=>N,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>g,parseTimestamp:()=>z,toLocalDate:()=>P,toUtcDate:()=>R});var a={};r.r(a),r.d(a,{addAttribute:()=>Lr,editAttribute:()=>kr,editEndDate:()=>Gr,editRoles:()=>xr,editStartDate:()=>Vr,editTags:()=>$r,removeAttribute:()=>Mr});var o={};r.r(o),r.d(o,{EventType:()=>Tb,applyCrosswalks:()=>gb,collectCrosswalksFromAttributes:()=>Nb,compareActivenessAttributes:()=>vb,compareAttributes:()=>bb,compareImages:()=>Ob,compareRoles:()=>Rb,compareTags:()=>Pb});var s={};r.r(s),r.d(s,{createHistoryManager:()=>Ib});var l=r(50914);const u=e=>"string"==typeof e&&"function"==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,c=(e,t)=>(t=(u(t)||"").toLowerCase(),(e=(u(e)||"").toLowerCase()).includes(t)),p=(0,l.curry)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n="asc"===e.toLowerCase();return t=t.toLowerCase(),r=r.toLowerCase(),t<r?n?-1:1:t>r?n?1:-1:0})),d=(0,l.replace)(/(\r\n|\n|\r)/gm,"");var y=r(95038),f=r.n(y);const T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{startDate:t,endDate:r}=e,n=Date.now();return!(r&&r<n||t&&t>n)},E=(0,l.anyPass)([l.isEmpty,l.isNil]),m=e=>()=>new Promise(e),h=e=>Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e}))).catch((e=>({status:"rejected",reason:e})))))),b=e=>e&&e.isValid(),O=(0,l.either)(b,l.isNil),v=(e,t)=>r=>!!(0,l.isNil)(r)||f()(r).isBetween(e,t,"days","[]"),g=e=>e&&e.toDate(),_=e=>(e&&e.setHours(0,0,0,0),e),A=()=>`${f().localeData().longDateFormat("L")} ${f().localeData().longDateFormat("LTS")}`,N=e=>f()(e).isSame(Date.now(),"day"),P=e=>{const t=new Date(e),r=new Date("2023-01-05");return r.setFullYear(t.getUTCFullYear()),r.setMonth(t.getUTCMonth()),r.setDate(t.getUTCDate()),r.setHours(t.getUTCHours()),r.setMinutes(t.getUTCMinutes()),r.setSeconds(t.getUTCSeconds()),r.setMilliseconds(t.getUTCMilliseconds()),r},R=e=>{const t=new Date(e),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());return new Date(r)},S=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),w=S("startOf"),I=S("endOf"),U=e=>f()(e).format(f().localeData().longDateFormat("L")),C=e=>f()(e).format(f().localeData().longDateFormat("LTS")),D=e=>`${U(e)} ${C(e)}`,j=(0,l.equals)("9"),L=(0,l.equals)("99"),k=(0,l.equals)("9999"),F=(0,l.test)(/^[az][az][az]$/),M=(0,l.test)(/^[az][az][az][az]$/),x=(0,l.test)(/^9+$/),$=(0,l.test)(/^[9az]+$/),V=(0,l.cond)([[j,(0,l.always)("M")],[L,(0,l.always)("MM")],[F,(0,l.always)("MMM")],[M,(0,l.always)("MMMM")],[$,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),G=(0,l.cond)([[j,(0,l.always)("D")],[L,(0,l.always)("DD")],[$,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),B=(0,l.cond)([[j,(0,l.always)("y")],[L,(0,l.always)("YY")],[k,(0,l.always)("YYYY")],[x,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),W=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),j),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),L),(0,l.always)("hh")],[j,(0,l.always)("H")],[L,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),Y=(0,l.cond)([[j,(0,l.always)("m")],[L,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),q=(0,l.cond)([[j,(0,l.always)("s")],[L,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),H=/([9az]+)([^9az]+)*/g,J=e=>{const t=[...e.toLowerCase().matchAll(H)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t);return(0,l.join)("",[V(e),r,G(n),i,B(a),o])}return e},K=/(9+)([^9]+)*/g,Q=e=>{const t=[...e.toLowerCase().matchAll(K)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[W(e,s),r,Y(n),i,a?q(a):"",o]),c=s?" A":"",p=(0,l.pipe)(l.init,(0,l.append)(c));return(0,l.pipe)((0,l.when)((0,l.always)(s),p),(0,l.join)(""))(u)}return e},X=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${J(t)} ${Q(r)}`},z=e=>{const t=Number(e);return Number.isNaN(t)?e:t},Z=e=>{const[t,r]=e;return f()().subtract(t,r).valueOf()},ee=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt(0))).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0";class te{constructor(e){this.value=void 0,this.value=e}isNone(){return(0,l.isNil)(this.value)}extract(){return this.value}orSome(e){return(0,l.isNil)(this.value)?e:this.value}map(e){return(0,l.isNil)(this.value)?te.None():te.Some(e(this.value))}static Some(e){return new te(e)}static None(){return new te(null)}static fromFalsy(e){return e?te.Some(e):te.None()}static fromNull(e){return(e=>null==e)(e)?te.None():te.Some(e)}static fromUndefined(e){return void 0===e?te.None():te.Some(e)}static fromEmpty(e){return E(e)?te.None():te.Some(e)}}const re=(e,t)=>{let r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];const o=()=>{e.apply(this,i),r=null};r&&clearTimeout(r),r=setTimeout(o,t)}},ne=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},ie=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ae=e=>Array.isArray(e)?e:[e],oe=e=>[e],se=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),le=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),ue=e=>le(e=e||"")?`mailto:${e}`:!e.includes("://")&&(e.toLowerCase().startsWith("www.")||e.split(".").length>2)?`http://${e}`:e,ce=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),pe=e=>null!=e&&["object","function"].includes(typeof e),de=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),pe(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t};var ye=r(2507),fe=r.n(ye);const Te={EQUALS:"equals",NOT_EQUALS:"not equals",EXISTS:"exists",FULL_TEXT:"fullText",HAS_ALL:"hasAll",MISSING_VALUE:"missing",IN_RANGE:"range",LT:"lt",LTE:"lte",GT:"gt",GTE:"gte",STARTS_WITH:"startsWith",COUNT_EQUALS:"count.equals",COUNT_NOT_EQUALS:"count.not.equals",COUNT_LT:"count.less",COUNT_LTE:"count.less.or.equals",COUNT_GT:"count.greater",COUNT_GTE:"count.greater.or.equals",COUNT_RANGE:"count.range",IN_FILE:"in.file",NOT_IN_FILE:"not.in.file",CONTAINS:"contains",ON:"on",BEFORE:"before",AFTER:"after",WITHIN:"within"},Ee={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},me={[Te.EQUALS]:"equals",[Te.NOT_EQUALS]:"not",[Te.STARTS_WITH]:"starts with",[Te.MISSING_VALUE]:"missing value",[Te.IN_RANGE]:"in range",[Te.HAS_ALL]:"has all",[Te.FULL_TEXT]:"full text",[Te.EXISTS]:"exists",[Te.COUNT_EQUALS]:"count equals",[Te.COUNT_NOT_EQUALS]:"count not equal",[Te.COUNT_LT]:"count less",[Te.COUNT_LTE]:"count less or equal",[Te.COUNT_GT]:"count greater",[Te.COUNT_GTE]:"count greater or equal",[Te.COUNT_RANGE]:"count in range",[Te.LT]:"less than",[Te.LTE]:"less than or equal",[Te.GT]:"greater than",[Te.GTE]:"greater than or equal",[Te.IN_FILE]:"in file",[Te.NOT_IN_FILE]:"not in file",[Te.CONTAINS]:"contains",[Te.ON]:"on",[Te.BEFORE]:"before",[Te.AFTER]:"after",[Te.WITHIN]:"within"};var he;!function(e){e.IN="in",e.NOT_IN="notIn",e.NOT_IN_RANGE="not range"}(he||(he={}));const be=e=>({[he.IN]:Te.EQUALS,[he.NOT_IN]:Te.NOT_EQUALS}[e]||e);var Oe,ve;!function(e){e.LAST_DAY="lastDay",e.LAST_WEEK="lastWeek",e.LAST_MONTH="lastMonth",e.LAST_6MONTHS="last6Months",e.LAST_YEAR="lastYear",e.PICK_DATE="pickDate"}(Oe||(Oe={})),function(e){e.LAST_3DAYS="last3Days"}(ve||(ve={}));const ge=["LAST_DAY","LAST_3DAYS","LAST_WEEK","LAST_MONTH","LAST_6MONTHS","LAST_YEAR","PICK_DATE"].reduce(((e,t)=>(e[t]=Oe[t]||ve[t],e)),{}),_e={[Oe.LAST_DAY]:"Last 24 hours",[ve.LAST_3DAYS]:"Last 3 days",[Oe.LAST_WEEK]:"Last 7 days",[Oe.LAST_MONTH]:"Last month",[Oe.LAST_6MONTHS]:"Last 6 months",[Oe.LAST_YEAR]:"Last year",[Oe.PICK_DATE]:"Pick date"},Ae={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},Ne={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Pe="<No label>",Re="__number";var Se;let we,Ie,Ue,Ce,De,je,Le,ke,Fe,Me,xe,$e,Ve,Ge,Be,We,Ye,qe,He,Je,Ke,Qe,Xe,ze,Ze,et,tt,rt,nt,it,at,ot,st,lt,ut,ct,pt,dt,yt,ft,Tt;var Et;!function(e){e.IN="in",e.OUT="out"}(Se||(Se={})),function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(we||(we={})),function(e){e.local="local",e.validationService="validationService"}(Ie||(Ie={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(Ue||(Ue={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(Ce||(Ce={})),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(De||(De={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(je||(je={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(Le||(Le={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(ke||(ke={})),function(e){e.asc="asc",e.desc="desc"}(Fe||(Fe={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Me||(Me={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(xe||(xe={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}($e||($e={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Ve||(Ve={})),function(e){e.PROFILE="profile",e.MAP="map"}(Ge||(Ge={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(Be||(Be={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(We||(We={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(Ye||(Ye={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(qe||(qe={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(He||(He={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(Je||(Je={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(Ke||(Ke={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(Qe||(Qe={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(Xe||(Xe={})),function(e){e.IN="in",e.OUT="out"}(ze||(ze={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(Ze||(Ze={})),function(e){e.BAR="bar",e.DONUT="donut",e.PIE="pie",e.TREE="tree",e.TABLE="table",e.BUBBLE="bubble",e.LINE="line",e.MAP="map",e.CLOUD="cloud"}(et||(et={})),function(e){e.ActivitiesViewFacet="ActivitiesViewFacet",e.CustomActionViewFacet="CustomActionViewFacet",e.DashboardFacet="DashboardFacet",e.EntitiesByTypeViewFacet="EntitiesByTypeViewFacet",e.FilteredSavedSearchesFacet="FilteredSavedSearchesFacet",e.FilteredEntitiesViewFacet="FilteredEntitiesViewFacet",e.NotificationInboxFacet="NotificationInboxFacet",e.ProfileStatsFacet="ProfileStatsFacet"}(tt||(tt={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttribute="com.reltio.plugins.entity.attributes.SingleAttributeView",e.AttributeTable="com.reltio.plugins.entity.attributes.AttributeTableView",e.Custom="com.reltio.plugins.ui.CustomActionView",e.Map="com.reltio.plugins.react.EntityMapView",e.ImageAttribute="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatches="com.reltio.plugins.entity.PotentialMatchesView"}(rt||(rt={})),function(e){e.Current="Current",e.Previous="Previous"}(nt||(nt={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(it||(it={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.NestedProfile="NestedProfileView",e.Search="SearchView",e.Tags="Tags",e.Pivoting="Pivoting",e.DCRReview="DCRReview",e.Authoring="Authoring"}(at||(at={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(ot||(ot={})),function(e){e.NEW="new",e.CLASSIC="classic"}(st||(st={})),function(e){e.ASC_BY_NAME="ascByName"}(lt||(lt={})),function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy",e.DIRECTED_NETWORK="Directed Network",e.TREE="Tree"}(ut||(ut={})),function(e){e.SET_HTML="setHtml",e.SHOW_POPUP="showPopup",e.HIDE_POPUP="hidePopup",e.LOG="log",e.SET_VISIBILITY="setVisibility",e.MESSAGE="message",e.SET_ENABLED="setEnabled",e.SET_TOOLTIP="setToolTip",e.SET_LABEL="setLabel",e.SET_HEIGHT="setHeight",e.SET_WIDTH="setWidth",e.RETURN_PROCESSED_API_RESPONSE="returnProcessedApiResponse",e.RETURN_PROCESSED_API_REQUEST="returnProcessedApiRequest",e.REQUEST="request",e.EVENT="event"}(ct||(ct={})),function(e){e.WORKFLOW="workflow",e.WORKFLOW_START_PROCESS_FROM_QUERY="workflow/startProcessFromQuery",e.API="api",e.GET_ENTITY_URI="getEntityUri",e.GET_ENTITY="getEntity",e.GET_API_PATH="getApiPath",e.WORKFLOW_GET_WORKFLOW_PATH="workflow/getWorkflowPath",e.GET_SEARCH_QUERY="getSearchQuery",e.GET_TENANT="getTenant",e.GET_USER="getUser",e.GET_PERSPECTIVE="getPerspective",e.SET_PERSPECTIVE="setPerspective",e.SET_ENTITY_URI="setEntityUri",e.ALERT="alert",e.CONFIRM="confirm",e.PROMPT="prompt",e.OPEN_WINDOW="openWindow",e.GET_CONFIGURATION="getConfiguration",e.GET_UI_CONFIGURATION="getUiConfiguration",e.OPEN_SEARCH="openSearch",e.WORKFLOW_CHECK_PERMISSION="workflow/checkPermission",e.RELOAD_PAGE="reloadPage"}(pt||(pt={})),function(e){e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.PIN_ATTRIBUTE="PIN_ATTRIBUTE",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e.CREATE_ENTITY="CREATE_ENTITY",e.CREATE_RELATIONSHIP="CREATE_RELATIONSHIP",e.UPDATE_TAGS="UPDATE_TAGS",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.DELETE_RELATIONSHIP="DELETE_RELATIONSHIP"}(dt||(dt={})),function(e){e.AWAITING_REVIEW="AWAITING_REVIEW",e.APPLIED="APPLIED",e.REJECTED="REJECTED"}(yt||(yt={})),function(e){e.ADDED="added",e.EDITED="edited",e.DELETED="deleted",e.PINNED="pinned",e.IGNORED="ignored",e.PIN_DELETED="pin_deleted",e.IGNORE_DELETED="ignore_deleted"}(ft||(ft={})),function(e){e.percent="percent"}(Tt||(Tt={})),function(e){e.TYPE_STRING="String",e.TYPE_TEXT="Text",e.TYPE_PASSWORD="Password",e.TYPE_LONG="Long",e.TYPE_INT="Int",e.TYPE_DOLLAR="Dollar",e.TYPE_FLOAT="Float",e.TYPE_DOUBLE="Double",e.TYPE_NUMBER="Number",e.TYPE_BOOLEAN="Boolean",e.TYPE_BOOLEAN_RADIO="Boolean_Radio",e.TYPE_DATE="Date",e.TYPE_TIMESTAMP="Timestamp",e.TYPE_ACTIVENESS_DATE="ActivenessDate",e.TYPE_LOCAL_DATE="LocalDate",e.TYPE_BLOB="Blob",e.TYPE_ENUM="Enum",e.TYPE_CIK_ID="cik id",e.TYPE_LOOKUP="Lookup",e.TYPE_TYPEAHEAD="Typeahead",e.TYPE_URL="URL",e.TYPE_BLOG_URL="Blog URL",e.TYPE_IMAGE_URL="Image URL",e.TYPE_EMAIL="Email",e.TYPE_DEPENDENT_LOOKUP="DependentLookup",e.TYPE_ENTITY_ID="EntityId",e.TYPE_RDM_LOOKUPS_NOT_RESOLVED="RdmLookupsNotResolved",e.TYPE_COUNT="Count",e.TYPE_FILE="File",e.TYPE_SELECT="Select",e.TYPE_NESTED="Nested",e.TYPE_REFERENCE="Reference",e.TYPE_IMAGE="Image",e.TYPE_SSN="SSN"}(Et||(Et={}));const mt=Et;let ht,bt;function Ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vt(e,t,r[t])}))}return e}function vt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(ht||(ht={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(bt||(bt={}));const gt={startDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return fe().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return fe().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},_t=Ot({id:{type:mt.TYPE_ENTITY_ID,get label(){return fe().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},gt,{roles:{type:mt.TYPE_STRING,get label(){return fe().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:mt.TYPE_STRING,get label(){return fe().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),At={workflow:{type:mt.TYPE_STRING,get label(){return fe().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:mt.TYPE_STRING,get label(){return fe().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:mt.TYPE_STRING,get label(){return fe().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},Nt={commenter:{type:mt.TYPE_STRING,get label(){return fe().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Pt={notResolved:{type:mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return fe().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Rt={createdBy:{type:mt.TYPE_STRING,get label(){return fe().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:mt.TYPE_STRING,get label(){return fe().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},St={matches:{type:mt.TYPE_COUNT,get label(){return fe().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:mt.TYPE_COUNT,get label(){return fe().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0},relevanceScore:{type:mt.TYPE_FLOAT,get label(){return fe().text("Relevance scores")},uri:"relevanceScore",name:"relevanceScores.relevance",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchAction:{type:mt.TYPE_STRING,get label(){return fe().text("Match action")},uri:"matchAction",name:"relevanceScores.actionLabel",singleValue:!0,hideForDataTenant:!0,faceted:!0}},wt={sourceSystems:{type:mt.TYPE_STRING,get label(){return fe().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:mt.TYPE_STRING,get label(){return fe().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:mt.TYPE_INT,get label(){return fe().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:mt.TYPE_TIMESTAMP,get label(){return fe().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:mt.TYPE_STRING,get label(){return fe().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let It;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(It||(It={}));const Ut={[It.matchRules]:{type:mt.TYPE_STRING,get label(){return fe().text("Match Rules")},uri:It.matchRules,name:It.matchRules,faceted:!0,hideForDataTenant:!0},[It.MLRecommendedMatch]:{type:mt.TYPE_STRING,get label(){return fe().text("Match IQ")},uri:It.MLRecommendedMatch,name:It.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},Ct=Ot({},_t,At,Nt,Pt,Rt,St,wt,Ut,{type:{type:mt.TYPE_STRING,get label(){return fe().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),Dt="NOT_MATCH";var jt=r(13980),Lt=r.n(jt);const kt={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Ft=(0,l.equals)(kt.SUGGESTING),Mt=(0,l.equals)(kt.EDITING),xt=(0,l.equals)(kt.VIEWING),$t=(0,l.either)(Mt,Ft);function Vt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Gt(e,t,r[t])}))}return e}function Gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bt=Lt().oneOf(["mobile","tablet","desktop"]),Wt=Lt().shape({deviceTypes:Lt().oneOfType([Bt,Lt().arrayOf(Bt)]),roles:Lt().arrayOf(Lt().string)}),Yt=Lt().shape({value:Lt().string,lookupCode:Lt().string}),qt=Lt().shape({displayName:Lt().string,parent:Lt().string}),Ht=Lt().oneOfType([Lt().string,Lt().number,Lt().bool,Yt]),Jt=Lt().oneOfType([Ht,Lt().arrayOf(Ht)]),Kt=Lt().shape({fieldName:Lt().string,values:Lt().arrayOf(Jt),filter:Lt().string,type:Lt().string}),Qt=Lt().shape({minValue:Lt().number,maxValue:Lt().number}),Xt=Lt().shape({label:Lt().string,name:Lt().string,description:Lt().string,type:Lt().string,hidden:Lt().bool,faceted:Lt().bool,searchable:Lt().bool,uri:Lt().string,access:Lt().arrayOf(Lt().string),cardinality:Qt}),zt=Lt().shape({label:Lt().string,uri:Lt().string,typeColor:Lt().string,direction:Lt().string,startObject:Lt().object,endObject:Lt().object}),Zt=Lt().shape({typeColor:Lt().string,typeIcon:Lt().string,typeImage:Lt().string,label:Lt().string,uri:Lt().string,attributes:Lt().arrayOf(Xt)}),er=Lt().shape({uri:Lt().string,label:Lt().string,memberTypes:Lt().array,extendsTypeUri:Lt().string,attributes:Lt().arrayOf(Xt)}),tr=Lt().shape({uri:Lt().string,label:Lt().string,extendsTypeUri:Lt().string,relationshipTypeURIs:Lt().arrayOf(Lt().string)}),rr=Lt().shape({uri:Lt().string,description:Lt().string,label:Lt().string,schemaVersion:Lt().string,entityTypes:Lt().arrayOf(Zt),roles:Lt().arrayOf(Lt().object),groupTypes:Lt().arrayOf(Lt().object),relationTypes:Lt().arrayOf(zt),graphTypes:Lt().arrayOf(tr),interactionTypes:Lt().arrayOf(er),sources:Lt().arrayOf(Lt().object)}),nr=Lt().shape({uri:Lt().string,type:Lt().string}),ir=Lt().shape({uri:Lt().string,type:Lt().string}),ar=Lt().shape({value:Lt().object,ov:Lt().bool,type:Lt().string,uri:Lt().string}),or=Lt().shape({refEntity:Lt().oneOfType([Lt().array,Lt().object]),refRelation:Lt().oneOfType([Lt().array,Lt().object]),value:Lt().object,ov:Lt().bool,type:Lt().string,uri:Lt().string}),sr=Lt().oneOf((0,l.values)(kt)),lr=Lt().shape({type:Lt().oneOf(Object.values(we)).isRequired,attributeTypeUri:Lt().string.isRequired,parentUri:Lt().string.isRequired,uri:Lt().string,message:Lt().string}),ur={attributeType:Xt,showEmptyEditors:Lt().bool,lazy:Lt().bool,mode:sr,metadata:rr,ownError:lr,errors:Lt().arrayOf(lr),crosswalks:Lt().array,onAddAttributes:Lt().func,onAddOneMore:Lt().func,onDeleteAttribute:Lt().func,onChangeAttribute:Lt().func,additionalControlsRenderer:Lt().func,hideDeleteButton:Lt().bool,showNonOv:Lt().bool,state:Lt().oneOf(["deleted","edited"]),expanded:Lt().bool},cr=Vt({attributeValue:ar},ur),pr=Vt({attributeValue:or},ur),dr=Lt().shape({value:Lt().oneOfType([Lt().string,Lt().bool,Lt().number]),ov:Lt().bool,type:Lt().string,uri:Lt().string,lookupCode:Lt().string,lookupRawValue:Lt().string}),yr=Lt().shape({inRelations:Lt().arrayOf(Lt().oneOfType([Lt().object,Lt().string])),outRelations:Lt().arrayOf(Lt().oneOfType([Lt().object,Lt().string])),groups:Lt().arrayOf(Lt().string),entityTypes:Lt().arrayOf(Lt().string),nextEntry:Lt().object}),fr=Lt().oneOf(["asc","desc"]),Tr=Lt().shape({id:Lt().string,content:yr,allowOnlyCreateNew:Lt().bool,sortColumn:Lt().string,sortOrder:fr,"text-empty":Lt().string,max:Lt().number,icon:Lt().string,caption:Lt().string,canCreate:Wt,canRead:Wt,canUpdate:Wt,canDelete:Wt,editingEnabled:Lt().bool}),Er=Lt().shape({entityUri:Lt().string,entityType:Lt().string,entityLabel:Lt().string,object:nr}),mr=Lt().shape({relationUri:Lt().string,relationType:Lt().string,relationLabel:Lt().string,direction:Lt().string,object:ir}),hr=Lt().shape({entity:Er,relation:mr}),br=Lt().shape({value:Lt().string,isRawFilter:Lt().bool}),Or=Lt().shape({id:Lt().string,label:Lt().string,name:Lt().string,availableEntityTypes:Lt().array}),vr=[{label:fe().text("And"),value:"and"},{label:fe().text("Or"),value:"or"},{label:fe().text("And not"),value:"and not"},{label:fe().text("Or not"),value:"or not"}],gr="___!status_code!___",_r=(0,l.when)((0,l.is)(Object),JSON.stringify),Ar=e=>{var t;return(null==e?void 0:e[gr])||(null==e||null===(t=e.originalResponse)||void 0===t?void 0:t.status)},Nr=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([[(0,l.prop)("originalResponse"),(0,l.pipe)((0,l.path)(["originalResponse","status"]),(e=>((e,t)=>{switch(e){case 400:return fe().text("Bad Request");case 403:return fe().text("Forbidden");case 404:return fe().text("Not Found");case 405:return fe().text("Method Not Allowed");case 408:return fe().text("Request Timeout");case 500:return fe().text("Internal Server Error");case 502:return fe().text("Bad Gateway");case 503:return fe().text("Service Unavailable");case 504:return fe().text("Gateway Timeout");default:return t||fe().text("Something went wrong")}})(e,t)))],...n.map((e=>[(0,l.prop)(e),(0,l.pipe)((0,l.prop)(e),_r)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,_r]])(e)},Pr=e=>"AbortError"===e.name,Rr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},Sr=/[\n\r%#()<>?[\\\]^`{}|]/g,wr=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(Sr,encodeURIComponent)}`,Ir=e=>`data:image/gif;base64,${e}`,Ur=e=>{switch(e){case"minutes":return fe().text("minutes");case"hours":return fe().text("hours");case"days":return fe().text("days");case"weeks":return fe().text("weeks");case"months":return fe().text("months");case"years":return fe().text("years");default:return""}};var Cr=r(76665);function Dr(e,t,r,n){if(null==t){const i=`\n Uri is null or undefined.\n getPartInfo parameters when the error occurred:\n 1. name - ${e}\n 2. uri - ${t}\n 3. fullUri - ${r}\n 4. attrType - ${pe(n)?JSON.stringify(n):n}\n `;console.error(i)}const i={name:e,valueUri:r.substr(0,r.indexOf(t)+t.length)};return n&&n.uri&&(i.uri=n.uri.substr(0,n.uri.indexOf(e)+e.length)),i.hasChildren=i.valueUri!==r,i}function jr(e,t){const r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[];for(let i=0;i<r.length;i+=2)n.push(Dr(r[i],r[i+1],e,t));return n}function Lr(e,t,r,n,i,a,o){void 0===a&&(a=0);const s=jr(r,t)[a];if(!s){const s=`\n getInfoByUri(uri, attrType)[nestingLevel] returned undefined.\n getInfoByUri(uri, attrType): ${JSON.stringify(jr(r,t))}\n addAttribute params when error occurred:\n attributes: ${JSON.stringify(e)}\n attrType: ${JSON.stringify(t)}\n uri: ${r}\n value: ${JSON.stringify(n)}\n crosswalks: ${JSON.stringify(i)}\n nestingLevel: ${a}\n index: ${o}\n `;console.error(s)}if(s.hasChildren)return e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]),Lr(e[s.name].find((function(e){return e.uri===s.valueUri})).value,t,r,n,i,a+1,o);{if(e[s.name]||(e[s.name]=[]),null==n)return;const a=e[t.name],l=n,u=n;let c={value:n.refEntity||pe(l.value)&&!Array.isArray(l.value)?l.value:n,uri:r,type:t.uri};if(n.lookupCode){const e=c,t=n;e.value=t.value,e.lookupCode=t.lookupCode,c=e}if(u.refEntity){const e=c;e.refEntity=u.refEntity,e.label=u.label,c=e}if(u.refRelation){const e=c;e.refRelation=u.refRelation,c=e}return i&&(c.crosswalks=i),a.splice(o||0,0,c),n}}function kr(e,t,r,n,i,a){void 0===a&&(a=0);const o=jr(r,t)[a];if(!o){const o=`\n getInfoByUri(uri, attrType)[nestingLevel] returned undefined.\n getInfoByUri(uri, attrType): ${JSON.stringify(jr(r,t))}\n editAttribute params when error occurred:\n attributes: ${JSON.stringify(e)}\n attrType: ${JSON.stringify(t)}\n uri: ${r}\n value: ${JSON.stringify(n)}\n crosswalks: ${JSON.stringify(i)}\n nestingLevel: ${a}\n `;console.error(o)}if(!o.hasChildren){const o=e[t.name];let s,l=o&&o.find((function(e){return e.uri===r}));if(l){if("[object Object]"!==l.value.toString())Fr(n,l),i&&(l.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&o.filter((function(e){return!1===e.ov})).forEach(Fr.bind(null,n));else if(function(e){return void 0!==e.refEntity}(n)){const e=l;e.refRelation=n.refRelation,e.refEntity=n.refEntity,e.value=n.value,e.label=n.label,l=e}else null!==n.value&&void 0!==n.value&&null!==l.value&&"object"==typeof l.value&&(l.value=n.value,l.label=n.label);s=l.value}else s=Lr(e,t,r,n,i,a);return s}{const s=kr(e,o,o.valueUri,{},i,a);kr(s,t,r,n,i,a+1)}}function Fr(e,t){!function(e){return pe(e)}(e)?(t.value=e,t.lookupCode&&(t.lookupCode=e)):(t.value=e.value,t.lookupCode=e.lookupCode)}function Mr(e,t,r,n){void 0===n&&(n=0);const i=jr(r)[n];if(!i){const i=`\n getInfoByUri(uri, attrType)[nestingLevel] returned undefined.\n getInfoByUri(uri, attrType): ${JSON.stringify(jr(r,t))}\n removeAttribute params when error occurred:\n attributes: ${JSON.stringify(e)}\n attrType: ${JSON.stringify(t)}\n uri: ${r}\n nestingLevel: ${n}\n `;console.error(i)}if(i.hasChildren){const a=(e[i.name]||[]).find((function(e){return e.uri===i.valueUri}));a&&Mr(a.value,t,r,n+1)}else{const n=e[t.name];n&&(n.forEach((function(e,t){e.uri===r&&n.splice(t,1)})),0===n.length&&delete e[t.name])}}function xr(e,t){e.roles=t||[]}function $r(e,t){e.tags=t||[]}function Vr(e,t){e.startDate=t}function Gr(e,t){e.endDate=t}var Br=r(37164);const Wr="1Tempo4rary",Yr="1Tepmo4Rel",qr=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),Hr=(0,Br.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",16),Jr=()=>`${Hr()}${Date.now()}`,Kr=()=>`1Tempo4DCR${Jr()}`,Qr=e=>`${e}/uri$$${Jr()}`,Xr=e=>()=>Qr(e),zr=(e,t)=>{const r=qr(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return Qr(n)},Zr=e=>e&&e.includes("uri$$"),en=Xr("entities"),tn=Xr("relations"),rn=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),nn=(0,l.startsWith)("relations/"),an=(0,l.startsWith)("entities/"),on=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),sn=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),ln=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),un=(0,l.pipe)((0,l.split)("/"),l.head),cn=(0,l.pipe)((0,l.split)("/"),l.last),pn=e=>e.split(".").slice(0,2).join("."),dn=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},yn=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),fn=(e,t)=>{const r=e.split("/"),n=t.split("/");return 2===r.length?t:[n,r.slice(2,3),r.slice(3).map(((e,t)=>t%2?r[2]:e))].flat().slice(0,-1).join("/")},Tn=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},En=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),mn=e=>{const t=e.startsWith("configuration/")?3:2;return e.split("/").length===t},hn=e=>5===e.split("/").length,bn=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},On=e=>e.replace(/uri\$\$/g,Wr),vn=e=>null==e?void 0:e.startsWith("changeRequests/"),gn=e=>vn(e)&&e.includes("/changes/"),_n=e=>e.split("/changes/")[1],An=(0,l.prop)("referencedEntityTypeURI"),Nn=(0,l.prop)("relationshipTypeURI"),Pn=(0,l.prop)("referencedAttributeURIs"),Rn=(0,l.curry)(((e,t)=>(0,l.pipe)(Pn,(0,l.filter)((0,l.startsWith)(e)))(t))),Sn=Rn("configuration/relationTypes"),wn=Rn("configuration/entityTypes"),In=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),Un=(0,l.filter)(In),Cn=(e,t)=>!t||t.some((t=>ln(e.uri,t)));function Dn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jn=e=>(0,l.allPass)([(0,l.propSatisfies)((0,l.anyPass)([l.isNil,$n,on]),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",mt.TYPE_STRING)])(e),Ln=(0,l.has)("values"),kn=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(mt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(mt.TYPE_LOOKUP)],[Ln,(0,l.always)(mt.TYPE_ENUM)],[jn,(0,l.always)(mt.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",mt.TYPE_BOOLEAN),(0,l.always)(mt.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),Fn=(0,l.pipe)((e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Dn(e,t,r[t])}))}return e}({},e,{type:kn(e)})),(0,l.pick)(["type","values","lookupCode","uri","name","dependentLookupCode","singleValue"])),Mn=e=>!!e&&(!!e.autoGenerated&&e.type!==mt.TYPE_NESTED||!!e.parentAutoGenerated),xn=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),$n=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.startsWith)("configuration/"),l.not),Vn=e=>xn(e)?"analyticsAttributes":"attributes",Gn=(0,l.propEq)("hidden",!0),Bn=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("type")),(0,l.equals)(e))(t))),Wn=Bn(mt.TYPE_NESTED),Yn=Bn(mt.TYPE_REFERENCE),qn=Bn(mt.TYPE_IMAGE),Hn=(0,l.either)(Wn,Yn),Jn=(e,t)=>{const r=xn(e)?"analyticsAttributes":"attributes",n=e.split(`/${r}/`);return[r,...Array.isArray(t)?[...(0,l.chain)((0,l.prop)("name"),t),(0,l.last)(n)]:[...n.slice(1)]].join(".")},Kn=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),Qn=(0,l.pipe)(Kn,Boolean),Xn=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),zn=(0,l.both)(Qn,(0,l.pipe)(Kn,("rdm",(0,l.pipe)(un,(0,l.equals)("rdm")))));const Zn=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Vn({uri:t}),i=e=>e.split(`/${n}/`).length,a=(e.entityTypes||[]).concat(e.relationTypes||[]),o=r?a.find((0,l.propEq)("uri",r)):null,s=o?i(o.uri):0,u=(r,i)=>{const o=t.split(`/${n}/`).slice(0,i+1).join(`/${n}/`),s=(0,l.last)(o.split(`/${n}/`)),c=(r?r[n]||ti(e,r)||[]:a).find((e=>{let{uri:t,name:r}=e;return t===o||r===s})),p=c?[c]:[];return c&&o!==t&&p.push(...u(c,i+1)),p},c=u(o,s),p=c.length===i(t)-s;return p?c:[]},ei=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Zn(e,t,r);return n.length?(0,l.last)(n):null},ti=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;return(0,l.cond)([[(0,l.has)("analyticsAttributes"),(0,l.prop)("analyticsAttributes")],[(0,l.anyPass)([(0,l.propEq)("type",mt.TYPE_NESTED),(0,l.propEq)("type",mt.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(Pn,(0,l.map)((t=>ei(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},ri=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;const r=ti(e,t);return r&&Yn(t)?Un(r):r},ni=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],ii=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],ai=e=>ni.includes(e),oi=e=>ii.includes(e),si=[mt.TYPE_INT,mt.TYPE_LONG,mt.TYPE_NUMBER,mt.TYPE_FLOAT,mt.TYPE_DOUBLE,mt.TYPE_COUNT],li=e=>si.includes(e),ui=e=>[mt.TYPE_FLOAT,mt.TYPE_DOUBLE].includes(e),ci=[mt.TYPE_BOOLEAN,mt.TYPE_BOOLEAN_RADIO,mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],pi=e=>ci.includes(e),di=[mt.TYPE_URL,mt.TYPE_BLOG_URL,mt.TYPE_IMAGE_URL],yi=e=>di.includes(e),fi=Bn(mt.TYPE_EMAIL),Ti=e=>mt.TYPE_SSN===e;var Ei,mi=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(Ei||(Ei={}));const hi=(0,l.curry)(((e,t,r)=>{var n;const i=e===Ei.READ?["ROLE_UI_ALL","ROLE_UI_ALL_READONLY"]:["ROLE_UI_ALL"],a=null===(n=r[e])||void 0===n?void 0:n.roles;return!a||a.concat(i).some((e=>t.includes(e)))})),bi=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Oi=(0,l.curry)(((e,t)=>(0,l.pipe)(bi(e),(0,l.prop)("extendsTypeURI"))(t))),vi=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Oi(e,r)));return n(r)})),gi=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Oi(e,n);return r})),_i=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?_i(e,bi(e,t.extendsTypeURI),r):void 0,Ai=(e,t)=>{const r=t.map(gi(e));return(r.length?r.reduce(l.intersection):[])[0]},Ni=(e,t)=>_i(e,"string"==typeof t?bi(e,t):t,"typeImage"),Pi=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&vi(e,t,n.uri)?r.concat(n.uri):r),[]);function Ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Si=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),wi=(0,l.pipe)(Si,(0,l.propOr)("","label")),Ii=(0,l.curry)(((e,t)=>{const r=Si(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Ui=(0,l.curry)(((e,t,r)=>{const[n,i]=Ii(e,r);return vi(e,n,t)||vi(e,i,t)})),Ci=(0,l.pipe)((0,l.propOr)([],"relationTypes"),(0,l.reduce)(((e,t)=>{let{uri:r,label:n}=t;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ri(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Di=function(){let{reversedContextLabels:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},r=r=>n=>{let{label:i}=n;const a=r===(e?Se.OUT:Se.IN)?"startObject":"endObject",{directionalContext:o}=n[a];return"directed"===n.direction&&1===(0,l.propOr)(0,"length",o)&&(i+=` (${o[0].labelPattern})`),!(i in t)&&(t[i]=!0,!0)},n=r(Se.IN),i=r(Se.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},ji=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),Li=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Li(e,Si(e,t.extendsTypeURI),r):void 0;var ki;!function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE",e.INITIATE_CHANGE_REQUEST="INITIATE_CHANGE_REQUEST",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(ki||(ki={}));const Fi=(0,l.curry)(((e,t)=>e.every((e=>Mi(e,t))))),Mi=(0,l.curry)(((e,t)=>{const r=Mn(t);return xi(e,t)&&(e===ki.READ||!r)})),xi=(e,t)=>!t||!t.access||t.access.includes(e),$i=(0,l.curry)(((e,t,r)=>Mi(ki.READ,r)&&(Ft(t)?Mi(ki.INITIATE_CHANGE_REQUEST,r):Mi(e,r)))),Vi=$i(ki.CREATE),Gi=$i(ki.DELETE),Bi=$i(ki.UPDATE),Wi=Fi([ki.CREATE,ki.MERGE,ki.READ,ki.UPDATE]),Yi=Fi([ki.UPDATE,ki.READ,ki.CREATE]),qi=Fi([ki.UPDATE,ki.READ]),Hi=Fi([ki.DELETE,ki.UPDATE,ki.READ]),Ji=(0,l.curry)(((e,t,r)=>e[r]||e[((e,t)=>(0,l.pipe)((0,l.propOr)([],"matchGroups"),(0,l.find)((0,l.propEq)("uri",t)),(0,l.defaultTo)({}),(0,l.prop)("type"))(e))(t,r)]||e["*"])),Ki=(e,t,r)=>(0,l.pipe)((0,l.map)(Ji(e,t)),(0,l.filter)(l.identity))(r),Qi=(e,t,r)=>{const n=Ki(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Mi(ki.MERGE,r)},Xi=(0,l.curry)(((e,t,r,n)=>{const i=Si(e,n),[a,o]=Ii(e,n);return i&&Mi(ki.CREATE,i)&&vi(e,a,t.type)&&vi(e,o,r.type)})),zi=(e,t,r,n,i)=>{const a=bi(e,n.type),o=Ki(t,a,r).map((e=>{let{createRelation:t}=e;return t})).filter(l.identity);return o.some((t=>{let{inRelations:r=[],outRelations:a=[]}=t;return r.some(Xi(e,n,i))||a.some(Xi(e,i,n))}))},Zi=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=bi(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Qi(o,i,a),canAddRelation:zi(e,o,i,r,n),canMark:Mi(ki.UPDATE,a)&&Mi(ki.READ,a)}},ea=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>Zi(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),ta=xn,ra=(0,l.complement)(ta),na=Mi(ki.READ),ia=e=>{let{attributeType:t,mode:r}=e;return ra(t)&&Vi(r,t)&&!Gn(t)},aa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=Zr(r.uri),o=Bi(n),s=Vi(n);return(0,l.cond)([[ta,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},oa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=Zr(r.uri),s=Bi(n),u=Gi(n),c=la(ki.UPDATE,n,a,r),p=la(ki.DELETE,n,a,r);return(0,l.cond)([[ta,l.F],[(0,l.always)(o),l.T],[(0,l.always)(i),(0,l.allPass)([u,p])],[l.T,(0,l.allPass)([s,u,c,p])]])(t)},sa=(0,l.curry)(((e,t,r,n)=>{const i="Reference"!==n.type&&ti(t,n);return!i||!(0,l.pipe)((0,l.unless)(Array.isArray,l.of),(0,l.map)((0,l.prop)("value")))(r).some((r=>i.filter((e=>r&&!!r[e.name])).some((n=>!xi(e,n)||!sa(e,t,r[n.name],n)))))})),la=(0,l.curry)(((e,t,r,n,i)=>Ft(t)?sa(ki.INITIATE_CHANGE_REQUEST,r,n,i):sa(e,r,n,i))),ua=(0,l.both)((0,l.complement)(Gn),na),ca="SuperUser",pa="allTenants",da=[pa,"allCustomers"],ya=e=>{let{allowedPermissionsNames:t,permissionsNames:r,permissionsConfig:n,superUserEnvironments:i}=e;return t.map((e=>{switch(e){case r.NON_SECURED:return l.T;case r.SECURED:return e=>void 0!==e.userPermissions||void 0!==(null==e?void 0:e.roles);case r.ADMIN:return(e=>t=>((null==t?void 0:t.roles)||[]).includes(e))(r.ADMIN);default:return(t=n[e])?(e,r)=>{let{params:n}=r;return((e,t,r,n)=>{const i=(0,l.path)(["userPermissions","permissions"],e)||{};return Object.keys(i).filter((e=>{const t=e.split(":"),[n]=t;return n===r.serviceId||n===ca})).filter((e=>{const t=e.split(":"),[i,a=""]=t;let o=a.split(".");return o=(0,l.endsWith)(["*"],o)?o.slice(0,-1):o,(0,l.startsWith)(o,r.resourcePath)||((e,t,r)=>{if(e===ca){const e=r?da.concat(r.map((e=>`allTenants.${e}`))):da,n=r&&t[0]===pa?t.slice(0,2):t.slice(0,1);return e.map((e=>e.split("."))).some((e=>(0,l.startsWith)(n,e)))}})(i,o,n)})).some((e=>{const n=i[e];return r.privileges.every((e=>{const r=n[e],i=Array.isArray(r);return t?Array.isArray(r)&&r.some((e=>t=>t===e||"SuperUser:*"===t||t.startsWith("SuperUser:allTenants"))(t)):i}))}))})(e,n.tenant,t,i)}:l.F}var t}))},fa={NON_SECURED:"NON_SECURED",SECURED:"SECURED",ADMIN:"ROLE_ADMIN",CAN_EXPORT:"CAN_EXPORT",CAN_EXPORT_ACTIVITIES:"CAN_EXPORT_ACTIVITIES",CAN_IMPORT_ENTITIES_FROM_DT:"CAN_IMPORT_ENTITIES_FROM_DT",CAN_READ_ENTITIES_FROM_DT:"CAN_READ_ENTITIES_FROM_DT",CAN_START_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_START_PROCESS_INSTANCE_SEARCH_QUERY",CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY",CAN_CREATE_ENVIRONMENT_CONFIG_JAR:"CAN_CREATE_ENVIRONMENT_CONFIG_JAR",CAN_CREATE_CONFIG_JAR:"CAN_CREATE_CONFIG_JAR",CAN_VIEW_ENVIRONMENT_CONFIG_JAR:"CAN_VIEW_ENVIRONMENT_CONFIG_JAR",CAN_VIEW_CONFIG_JAR:"CAN_VIEW_CONFIG_JAR",CAN_MANAGE_WORKFLOW_DEFINITION:"CAN_MANAGE_WORKFLOW_DEFINITION",CAN_VIEW_WORKFLOW_DEFINITION:"CAN_VIEW_WORKFLOW_DEFINITION",CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION:"CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION",CAN_UPDATE_WORKFLOW_DATA_TASK:"CAN_UPDATE_WORKFLOW_DATA_TASK",CAN_READ_WORKFLOW_DATA_TASK:"CAN_READ_WORKFLOW_DATA_TASK",CAN_CONFIG_ENVIRONMENT_REGISTER:"CAN_CONFIG_ENVIRONMENT_REGISTER",CAN_UPDATE_PROCESS_INSTANCE:"CAN_UPDATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS:"CAN_EXECUTE_WORKFLOW_JOBS",CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE:"CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA:"CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA",CAN_VIEW_WORKFLOW_JOBS:"CAN_VIEW_WORKFLOW_JOBS",CAN_MAKE_BULK_UPDATE:"CAN_MAKE_BULK_UPDATE",CAN_OPEN_DATA_LOADER_EXECUTE:"CAN_OPEN_DATA_LOADER_EXECUTE",CAN_OPEN_DATA_LOADER_READ:"CAN_OPEN_DATA_LOADER_READ",CAN_BULK_DELETE_PROFILES:"CAN_BULK_DELETE_PROFILES",CAN_READ_MDM_DATA_ENTITIES:"CAN_READ_MDM_DATA_ENTITIES",IS_FREEMIUM_ADMIN:"IS_FREEMIUM_ADMIN",CAN_READ_DVF:"CAN_READ_DVF",CAN_READ_PREFERENCES:"CAN_READ_PREFERENCES",CAN_UPDATE_PREFERENCES:"CAN_UPDATE_PREFERENCES",CAN_CREATE_PREFERENCES:"CAN_CREATE_PREFERENCES",CAN_DELETE_PREFERENCES:"CAN_DELETE_PREFERENCES"},Ta={[fa.CAN_DELETE_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["DELETE"]},[fa.CAN_CREATE_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["CREATE"]},[fa.CAN_UPDATE_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["UPDATE"]},[fa.CAN_READ_PREFERENCES]:{serviceId:"MDM",resourcePath:["ui","preferences"],privileges:["READ"]},[fa.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[fa.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[fa.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[fa.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[fa.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[fa.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[fa.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[fa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[fa.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[fa.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[fa.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[fa.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[fa.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[fa.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[fa.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[fa.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[fa.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[fa.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[fa.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[fa.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[fa.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[fa.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[fa.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[fa.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[fa.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[fa.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Ea=(0,l.curry)(((e,t,r)=>ya({allowedPermissionsNames:e,permissionsNames:fa,permissionsConfig:Ta}).some((e=>e(t,{params:{tenant:r}}))))),ma=Ea([fa.CAN_EXPORT]),ha=Ea([fa.CAN_EXPORT_ACTIVITIES]),ba=Ea([fa.CAN_IMPORT_ENTITIES_FROM_DT]),Oa=Ea([fa.CAN_READ_ENTITIES_FROM_DT]),va=Ea([fa.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),ga=Ea([fa.CAN_UPDATE_PROCESS_INSTANCE]),_a=Ea([fa.CAN_VIEW_WORKFLOW_DEFINITION]),Aa=Ea([fa.CAN_CONFIG_ENVIRONMENT_REGISTER]),Na=Ea([fa.CAN_UPDATE_WORKFLOW_DATA_TASK]),Pa=Ea([fa.CAN_READ_WORKFLOW_DATA_TASK]),Ra=Ea([fa.CAN_MANAGE_WORKFLOW_DEFINITION]),Sa=Ea([fa.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),wa=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),Ia=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Ua=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),Ca=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Da=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS]),ja=Ea([fa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),La=Ea([fa.CAN_CREATE_CONFIG_JAR]),ka=Ea([fa.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),Fa=Ea([fa.CAN_VIEW_CONFIG_JAR]),Ma=Ea([fa.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),xa=Ea([fa.CAN_VIEW_WORKFLOW_JOBS]),$a=Ea([fa.CAN_MAKE_BULK_UPDATE]),Va=Ea([fa.CAN_OPEN_DATA_LOADER_EXECUTE,fa.CAN_OPEN_DATA_LOADER_READ]),Ga=Ea([fa.CAN_BULK_DELETE_PROFILES]),Ba=Ea([fa.CAN_READ_MDM_DATA_ENTITIES]),Wa=Ea([fa.CAN_READ_DVF]),Ya=Ea([fa.IS_FREEMIUM_ADMIN]),qa=(0,l.reject)(Gn),Ha=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),qa,(0,l.filter)(e))(t),Ja=(0,l.curry)(((e,t)=>Ha((t=>ia({attributeType:t,mode:e})),t))),Ka=(0,l.curry)(((e,t)=>Ha((t=>ia({attributeType:t,mode:e})||ua(t)),t))),Qa=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(ua)),Xa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Xa(e)])))),za=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(ua),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...za(e)])))),Za=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Za(e)])))),eo=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.filter)(ua),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Za(e)])))),to=(0,l.pipe)(bi,(0,l.converge)(l.concat,[za,Za]));function ro(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){no(e,t,r[t])}))}return e}function no(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const io=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,io(e)))},t))),ao=e=>{var t;return ro({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},oo=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),so=(0,l.when)(oo,(0,l.dissoc)("values")),lo=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return ro({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["lookupCode"]),{dependentLookupCode:t})})),uo=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},co=(0,mi.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Xa,t).concat((0,l.chain)(Xa,r)).some(uo)})),po=e=>{let t=!1;const r=io((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?ro({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},yo=e=>{const t=co(e),r=(0,l.map)((e=>io((0,l.pipe)(so,(0,l.when)((0,l.always)(e),lo))))(t)),n=(0,l.map)(ao),i=(0,l.map)(po);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},fo=e=>t=>((t||[]).forEach((t=>{((null==t?void 0:t.attributes)||[]).forEach(e)})),t),To=e=>t=>{t.name&&!t.name.includes("/")||e.push(`Attribute name '${t.name}' is incorrect. Attribute uri is '${t.uri}'`),cn(t.uri)!==t.name&&e.push(`Attribute name '${t.name}' is not the same as last uri part of '${t.uri}'`)},Eo=e=>{const t=[];return(0,l.evolve)({entityTypes:fo(To(t)),relationTypes:fo(To(t))},e),t},mo=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),ho=(0,l.prop)("relationshipTypeURIs"),bo=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(Oo(e,t)))||[]})),Oo=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(Ui(e,t))},vo=(e,t)=>(0,l.pipe)(mo,(0,l.defaultTo)({}),ho,(0,l.defaultTo)([]),(0,l.chain)(Ii(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(bi(e)))(e,t),go=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),_o=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),Ao=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _o((0,l.complement)(go))(e)},No=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _o(go)(e)},Po=(0,l.pipe)(bi,(0,l.propOr)([],"matchGroups")),Ro=(e,t,r)=>(0,l.pipe)(Po,(0,l.find)((0,l.propEq)("uri",r)))(e,t),So=(0,l.curry)(((e,t,r)=>(0,l.pipe)(Ro,(0,l.propOr)(r,"label"))(e,t,r))),wo=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Po,(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),(0,l.includes)(l.__,r))))(e,t),i=(0,l.pipe)((0,l.map)((0,l.prop)("uri")),(0,l.without)(l.__,r),(0,l.map)((e=>({uri:e,label:e}))))(n);return[...n,...i]})),Io=e=>(0,l.partition)(go,e),Uo=(0,l.includes)(l.__,["and","or","not"]),Co=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),Do=(0,l.includes)(l.__,["equals","notEquals","in"]),jo=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return Uo(t)?jo(r):Co(t)?r.filter(on):Do(t)?r.map((0,l.prop)("uri")).filter(on):[]})),l.uniq),Lo=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(jo),l.uniq),ko=(0,l.pipe)(Po,Lo),Fo=(0,l.pipe)(wo,Lo),Mo=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},xo=(0,l.pipe)(Mo,za),$o=(e,t)=>(e.interactionTypes||[]).filter(((e,t)=>r=>{let{memberTypes:n}=r;return n.some(((e,t)=>r=>{let{objectTypeURI:n}=r;return n===t||vi(e,n,t)})(e,t))})(e,t)),Vo=e=>!!e.required,Go=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=(0,l.cond)([[on,bi(e)],[sn,Si(e)]])(t);return Bo(e,a,r,n,i)},Bo=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=e=>e.uri&&on(e.uri)&&3===e.uri.split("/").length;return!t||t.hidden&&!a(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!Mn(e)&&n(e,i))).flatMap((t=>{const a=t.required?[t]:[];if(r){let o;if(t.type===mt.TYPE_REFERENCE){if(i.some(Yn))return console.warn(`Misconfiguration - reference attribute ${t.uri} can be defined only as entity type first level attribute`),a;const s=Nn(t),l=Pn(t);o=Go(e,s,r,n,[...i,t]).filter((e=>l.some(ln(e.uri))))}else t.attributes&&(o=Bo(e,t,r,n,[...i,t]));o&&a.push(...o)}return a})):t.type===mt.TYPE_REFERENCE?Go(e,Nn(t),r,n,[...i,t]):[]},Wo=e=>{const t=(0,l.pipe)((0,l.pick)(["dataLabelPattern","dataTooltipPattern","secondaryLabelPattern"]),l.values,(0,l.filter)(l.identity))(e);return(0,l.filter)((0,l.anyPass)([e=>{const r=`{${e.name}.`,n=`{${e.name}}`;return(0,l.any)((0,l.anyPass)([(0,l.includes)(n),(0,l.includes)(r)]),t)},t=>(e.businessCardAttributeURIs||[]).includes(t.uri),Vo]),e.attributes||[])},Yo=(e,t)=>{const r=wn(e);return(0,l.pipe)((0,l.filter)((e=>r.includes(e.uri))),(0,l.sort)((n=r,(e,t)=>n.indexOf(e.uri)-n.indexOf(t.uri))))(t.attributes||[]);var n},qo=(0,l.curry)(((e,t)=>{const r=(t,n)=>{if(Array.isArray(n))return n.map((e=>r(t,e)));if(n&&"object"==typeof n){const e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=r(t,n[t]));return e}return"string"==typeof n&&e.includes(t)?fe().text(n):n};return r(null,t)})),Ho=["label","description","abbreviation","caption","toolTip"],Jo=e=>qo(Ho,e),Ko=(0,l.mergeRight)({attributeTypes:[],categoryTypes:[],changeRequestTypes:[],entityTypes:[],graphTypes:[],groupTypes:[],interactionTypes:[],relationTypes:[],roles:[],sources:[],survivorshipStrategies:[]}),Qo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=cn(t);return r.find((e=>{let{uri:t}=e;return cn(t)===n}))})),Xo=(0,l.curry)(((e,t)=>{const r=cn(t);return(0,l.pipe)(Qo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),zo=e=>{let{sources:t}=e;return(null==t?void 0:t.find((0,l.propEq)("uri","configuration/sources/Reltio")))?t:null==t?void 0:t.concat({uri:"configuration/sources/Reltio",label:"Reltio",icon:"images/source/reltio.png",abbreviation:"Reltio"})},Zo=(e,t)=>{let{sources:r=[]}=e;return r.find((e=>{let{uri:r,label:n}=e;return r===t||n===t||r.substring(r.lastIndexOf("/")+1)===t}))},es=(0,l.curry)(((e,t)=>{let{roles:r=[]}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),ts=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=bi(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function rs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ns(e,t,r[t])}))}return e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const is=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["attributes"];const i=n.reduce(((e,r)=>e.concat(t[r]||[])),[]);return as(i,e,t,r,n)},as=function(e,t,r){var n;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["attributes"];return te.fromNull(e&&e.length?e:null===(n=ti(t,r))||void 0===n?void 0:n.filter((0,l.complement)(Yn))).map((e=>e.map((e=>{const r=is(t,e,i,a);return r.length?rs({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(Hn),(0,l.prop)("children"))).filter(ua).filter(i).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},os=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return is(e,t,r,["attributes","analyticsAttributes"])},ss=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return is(e,t,r,["attributes"])},ls=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return is(e,t,r,["analyticsAttributes"])},us=e=>e.children?e.children.flatMap(us):e,cs=e=>e.children?[e,...e.children.flatMap(cs)]:e,ps=(0,l.curry)(((e,t)=>{let{groupTypes:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),ds=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return cn(r)===e})))),ys=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),ds("LUD")),(0,l.defaultTo)(r))(t||[])},fs=(e,t)=>{let{survivorshipStrategies:r}=e;return ds(t,r)},Ts=(0,l.allPass)([(0,l.complement)(l.isNil),Mi(ki.READ)]),Es=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Mi(ki.READ)]),ms=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),(0,l.anyPass)([Mi(ki.CREATE),Mi(ki.INITIATE_CHANGE_REQUEST)])]),hs=(0,l.curryN)(2,(0,l.pipe)(bi,Es)),bs=(0,l.curryN)(2,(0,l.pipe)(Si,Ts)),Os=e=>{let{ov:t}=e;return!1!==t},vs=(e,t)=>((e,t)=>yi(e.type)&&se(t))(e,t)||((e,t)=>fi(e.type)&&le(t))(e,t),gs=e=>t=>(0,l.cond)([[l.isNil,(0,l.always)(null)],[(0,l.pipe)((0,l.prop)(e),Array.isArray),(0,l.path)([e,0])],[l.T,(0,l.prop)(e)]])(t),_s=gs("refEntity"),As=gs("refRelation"),Ns=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],Ps=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},Rs=(0,l.prop)("objectURI"),Ss=(0,l.prop)("objectURI"),ws=(0,l.prop)("type"),Is=(0,l.pipe)(_s,(0,l.defaultTo)({}),Rs),Us=(0,l.pipe)(As,(0,l.defaultTo)({}),Ss),Cs=(0,l.pipe)(_s,(0,l.defaultTo)({}),ws),Ds=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type,uri:e.uri,value:e.value})));return(e||[]).concat(r)},js=(0,l.evolve)({refEntity:ie,refRelation:ie});function Ls(e,t,r,n){const i=Zn(e,r),a=bi(e,t.type)||Si(e,t.type);if(0===i.length)return null;const o=Vn(r);let s=[t],u=1;i[0].uri!==t.type&&(u=0);let c=null;const p=n?[]:null;let d=null;for(let e=u;e<i.length;++e){const t=e===i.length-1,r=i[e];let u=[];if(!Cn(r,d)){c=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const c=s.value||s[o]||{};let y=[];r.startObject&&r.endObject||(0,l.both)(mn,sn)(r.uri)?(y=((null==a?void 0:a.attributes)||[]).filter((e=>Nn(e)===r.uri||An(e)===r.uri)),d=y.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(y.push(r),d=null),y.forEach((a=>{const o=c[a.name];o&&(u=u.concat(o)),n&&t&&p.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=u),t&&(c=s)}return p||c}const ks=(e,t)=>{const[r,n,...i]=t.split("/"),a=(e[r]||[]).find((e=>{let{uri:t}=e;return t.endsWith("/"+n)})),o=i.join("/");return o&&a?ks(a.value,o):a},Fs=(0,l.curry)(((e,t)=>{if(!t.startsWith(e.uri))return;const[r,...n]=t.slice(e.uri.length+1).split("/"),i=n.join("/");return ks(e[r],i)}));function Ms(e){return(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value"])],[l.T,(0,l.prop)("value")]])(e)}const xs=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","ov"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","ov"])],[l.T,(0,l.pick)(["value","ov"])]]),$s=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","uri"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","uri"])],[l.T,(0,l.pick)(["value","uri"])]]),Vs=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.when)((()=>i.length>0),(0,l.pipe)((0,l.map)((0,l.prop)("value")),(0,l.map)(Vs(e,i)))))(r)})),Gs=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Gs(e)),e)(t))),Bs=(e,t)=>(0,l.curry)(((r,n)=>(0,l.pipe)(Vs(e,r),Gs(t))(n))),Ws=Bs(null,Ms),Ys=Bs(Os,Ms),qs=Bs(null,xs),Hs=Bs(Os,xs),Js=Bs(Os,$s),Ks=(e,t,r)=>{var n,i,a;return e.uri===t?null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=Fs(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},Qs=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Is,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Xs=(e,t)=>{const r=bn(t),n=(0,l.pipe)((0,l.split)("/"),(0,l.dropLast)(1),l.last)(t);return Ks(e,r,n)},zs=Object.values(gt),Zs=(0,l.includes)(l.__,zs),el=e=>zs.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function tl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rl(e,t,r[t])}))}return e}function rl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nl=(e,t)=>`${e}_${t}`,il=[Ct.matches.name,Ct.matchRules.name],al=(0,l.values)(At).map((e=>e.name)),ol=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,al)))),sl=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,il)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>nl(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),ll=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,ol(r),sl(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(nl(`dtPotentialMatches.${t.name}`,"")))))(Ct)},ul=(0,l.propEq)("uri",Ct.type.uri),cl=e=>(0,l.values)(Ut).some((0,l.propEq)("uri",null==e?void 0:e.uri)),pl=(0,l.propEq)("uri",wt.sourceSystems.uri),dl=Object.values(_t),yl=(0,l.includes)(l.__,dl),fl=e=>{let{entity:t,attributeType:r,value:n}=e;return tl({},t,{[r.uri]:void 0===n?r.defaultValue:n})},Tl=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},El=e=>{let{entity:t,attributeType:r,value:n}=e;return tl({},t,{[r.uri]:n})},ml=(0,l.propEq)("uri",_t.roles.uri),hl=(0,l.propEq)("uri",_t.tags.uri);function bl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ol(e,t,r[t])}))}return e}function Ol(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vl=e=>{let{parentUri:t,attributeType:r}=e;return bl({uri:zr(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[(0,l.either)(Hn,qn),(0,l.always)({value:{}})],[Qn,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),ai)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},gl=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ja(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),Xn,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=vl({parentUri:r,attributeType:e}),s=ri(n,e);s&&(a.value=gl({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||Xn(e))&&(o[t]=[a])}return o},_l=e=>{let{entity:t,metadata:r,mode:n,attrTypeFilter:i}=e;return Go(r,t.type,!0,i).reduce(((e,t)=>{const i=t.name,a=bn(t.uri);return(a===e.type?[{parentUri:e.uri,attributes:e.attributes}]:(Ls(r,e,a)||[]).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,a)=>{let{parentUri:o,attributes:s}=a;if(!s[i]||0===s[i].length){let i=Pl({entity:e,attributeType:t,parentUri:o,index:0});if(Hn(t)){const e=ri(r,t);i=Al({attributeType:t,subAttributes:e,metadata:r,mode:n,parentUri:o},i)}return i}return e}),e)}),t)},Al=(0,l.curry)(((e,t)=>{let{attributeType:r,subAttributes:n,metadata:i,mode:a,parentUri:o}=e;const s=Ls(i,t,r.uri).find((e=>{let{uri:t}=e;return ln(t,o)})),l=bl({},s,{value:gl({attributeTypes:n,parentUri:s.uri,mode:a,metadata:i})});return Sl({entity:t,attributeType:r,uri:s.uri,value:l})})),Nl=(0,l.curry)(((e,t)=>{let{metadata:r,attributeTypes:n,parentUri:i,mode:a}=e;const o=n.filter((e=>{let{name:r}=e;return!t[r]})),s=(0,l.mapObjIndexed)(((e,t)=>{const{type:i,attributes:o}=n.find((e=>t===e.name));return e.map((e=>{const{value:t,uri:n}=e;return i===mt.TYPE_NESTED?bl({},e,{value:Nl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return bl({},s(t),gl({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),Pl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;if(qn(r))return(0,l.evolve)({attributes:e=>bl({},e,{[r.name]:e[r.name]||[]})})(t);const u=vl({parentUri:n,attributeType:r}),c=Ms(u);return(0,Cr.ZP)(t,(e=>{Lr(e.attributes||e.value,r,u.uri,void 0!==o?o:c,a,s,i)}))},Rl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Cr.ZP)(t,(e=>{Lr(e.attributes||e.value,r,n.uri,Ms(n),a,o,i)}))},Sl=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Cr.ZP)(t,(e=>{kr(e.attributes||e.value,r,n,i,a,o)}))},wl=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Cr.ZP)(t,(e=>{Mr(e.attributes||e.value,r,n,i)}))},Il=e=>""===e,Ul=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([Il,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([Il,l.isNil]),"value"),l.T],[(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity")),l.T],[l.T,l.F]]),Cl=(0,l.reject)(Ul),Dl=e=>{let{deleteEmptyComplex:t,valueTransformer:r=l.identity}=e;return(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.map)((0,l.pipe)(r,(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(e=>Dl({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),Cl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},jl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Dl({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),js),deleteEmptyComplex:e})},Ll=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(jl(e),(0,l.reject)(l.isEmpty))},kl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Zs(r)?fl({entity:e,attributeType:r}):Pl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),Fl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Zs(r)?El({entity:e,attributeType:r,value:i}):Sl({entity:e,attributeType:r,uri:n,value:i})})),Ml=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Zs(r)?Tl({entity:e,attributeType:r}):wl({entity:e,attributeType:r,uri:n})})),xl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},$l="UrlThumbnail",Vl="CdnUrlThumbnail",Gl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(Os):(0,l.head)(n);return e&&e.value}return null})(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Bl=Gl(["CdnUrl","Url"],!0),Wl=Gl(["CdnUrlPreview","UrlPreview"],!0),Yl=Gl([Vl,$l],!0),ql=Gl([Vl,$l],!1),Hl=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[$n,(0,l.always)(t)],[(0,l.both)(xn,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=$n(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Zs(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ae)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Jl=(e,t,r)=>{const n=Qa(e),i=(0,l.any)(r?l.T:Os);return Hl(n,t,i)},Kl=(e,t,r,n,i,a)=>{const o=Zr(null==r?void 0:r.uri)?Ja(t,e):Ka(t,e);return Hl(o,r,((e,o)=>{const s=ia({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:Os,e)||$n(o)&&(0,l.has)(o.uri,r)||qn(o)&&(0,l.has)(o.name,r.attributes)||(null==a?void 0:a.includes(o.uri))}))};let Ql;const Xl=e=>{Ql=e};function zl(e,t){return Ql(e,t)}const Zl=e=>(t,r)=>new Promise(((n,i)=>{e(t,r,(e=>{n(e)}),((e,t)=>{i((0,l.when)((0,l.is)(String),(0,l.always)({errorMessage:e,errorCode:t}))(e))}),null)})),eu=50,tu=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=eu,offset:a=0,sortByDisplayName:o=!0,sortOrder:s=Fe.asc}=e;return zl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a,sortByDisplayName:o,sortOrder:s}),headers:{"Content-Type":"application/json"}})},ru=(0,l.once)((()=>zl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),nu=e=>zl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),iu=(e,t)=>zl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),au=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),ou=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),au),su=(0,l.pipe)((0,l.reject)(E),ou),lu=e=>te.fromNull(me[e]).map(fe().text).orSome(""),uu=(0,l.curry)(((e,t)=>`${e}_${t}`)),cu=(0,l.split)("_"),pu=(0,l.includes)("_"),du=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),yu=(0,l.curry)(((e,t)=>e.some(du(t)))),fu=yu([Te.IN_RANGE,Te.COUNT_RANGE,Te.WITHIN]),Tu=yu([Te.EXISTS,Te.MISSING_VALUE]),Eu=(0,l.cond)([[Tu,(0,l.always)(0)],[fu,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),mu=(0,l.complement)(Tu),hu=yu([Te.HAS_ALL,Te.EQUALS,Te.NOT_EQUALS]),bu=yu([Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE,Te.COUNT_RANGE]),Ou=yu([Te.IN_FILE,Te.NOT_IN_FILE]),vu=e=>{switch(e){case Te.COUNT_EQUALS:return Te.EQUALS;case Te.COUNT_NOT_EQUALS:return Te.NOT_EQUALS;case Te.COUNT_LT:return Te.LT;case Te.COUNT_LTE:return Te.LTE;case Te.COUNT_GT:return Te.GT;case Te.COUNT_GTE:return Te.GTE;case Te.COUNT_RANGE:return Te.IN_RANGE}},gu=yu([Te.ON,Te.BEFORE,Te.AFTER,Te.WITHIN,Te.NOT_EQUALS]),_u=yu([Te.WITHIN]),Au=[[Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE],[Te.NOT_IN_FILE,Te.IN_FILE],[Te.EQUALS,Te.NOT_EQUALS,Te.HAS_ALL],[Te.LT,Te.LTE,Te.GT,Te.GTE],[Te.MISSING_VALUE,Te.EXISTS],[Te.COUNT_RANGE],[Te.IN_RANGE],[Te.STARTS_WITH,Te.CONTAINS],[Te.FULL_TEXT],[Te.ON,Te.BEFORE,Te.AFTER,Te.NOT_EQUALS],[Te.WITHIN]],Nu=(e,t)=>Au.some((r=>r.includes(e)&&r.includes(t))),Pu=(0,l.pipe)(l.omit,l.values),Ru={OPTIONS_FOR_STRING:Pu(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_DATE:[Te.ON,Te.BEFORE,Te.AFTER,Te.WITHIN,Te.NOT_EQUALS,Te.MISSING_VALUE,Te.EXISTS,Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE,Te.COUNT_RANGE,Te.IN_FILE,Te.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:Pu(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_BLOB:Pu(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_NUMBER:Pu(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_LOOKUP:Pu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],Te),OPTIONS_FOR_ENUM:Pu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Te),OPTIONS_FOR_ID:[Te.EQUALS,Te.NOT_EQUALS,Te.IN_FILE,Te.NOT_IN_FILE],OPTIONS_FOR_COUNT:[Te.EQUALS,Te.NOT_EQUALS,Te.LT,Te.LTE,Te.GT,Te.GTE,Te.IN_RANGE],OPTIONS_FOR_COMPLEX:[Te.COUNT_EQUALS,Te.COUNT_NOT_EQUALS,Te.COUNT_LT,Te.COUNT_LTE,Te.COUNT_GT,Te.COUNT_GTE,Te.COUNT_RANGE,Te.EXISTS,Te.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[Te.EQUALS,Te.NOT_EQUALS,Te.EXISTS,Te.MISSING_VALUE]},Su=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case mt.TYPE_TYPEAHEAD:case mt.TYPE_STRING:case mt.TYPE_PASSWORD:case mt.TYPE_TEXT:case mt.TYPE_CIK_ID:case mt.TYPE_URL:case mt.TYPE_BLOG_URL:case mt.TYPE_IMAGE_URL:case mt.TYPE_EMAIL:return Ru.OPTIONS_FOR_STRING;case mt.TYPE_LOOKUP:case mt.TYPE_DEPENDENT_LOOKUP:return Ru.OPTIONS_FOR_LOOKUP;case mt.TYPE_ENUM:return Ru.OPTIONS_FOR_ENUM;case mt.TYPE_DATE:case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_TIMESTAMP:case mt.TYPE_LOCAL_DATE:return Ru.OPTIONS_FOR_DATE;case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:return Ru.OPTIONS_FOR_BOOLEAN;case mt.TYPE_BLOB:return Ru.OPTIONS_FOR_BLOB;case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_NUMBER:return Ru.OPTIONS_FOR_NUMBER;case mt.TYPE_ENTITY_ID:return Ru.OPTIONS_FOR_ID;case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[Te.EQUALS];case mt.TYPE_COUNT:return Ru.OPTIONS_FOR_COUNT;case mt.TYPE_NESTED:case mt.TYPE_REFERENCE:case mt.TYPE_IMAGE:return Ru.OPTIONS_FOR_COMPLEX;default:return Ru.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(bu,n):n},wu=e=>[xe.and,xe.andNot].includes(e),Iu=e=>[xe.or,xe.orNot].includes(e),Uu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),Iu)),Cu=(Du=[xe.and],e=>e.slice(0,-1).every((e=>Du.includes(e.operator))));var Du;const ju=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),Lu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),ku=e=>`(${e})`,Fu=e=>{const t=[],r={"{":"}","[":"]","(":")"},n=(0,l.invertObj)(r);for(let i=0;i<e.length;i++){const a=e[i];if(r[a])t.push(a);else if(n[a]&&r[t.pop()]!==a)return!1}return 0===t.length},Mu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[xe.or,xe.orNot],n=t?[xe.and,xe.andNot,...r]:r,i=n.map((e=>` ${e} `)).some((t=>e.includes(t))),a=e.startsWith("not"),o="("===(0,l.head)(e)&&")"===(0,l.last)(e)&&Fu(e.slice(1,-1));return!i&&!a||o?e:ku(e)},xu="and",$u=class{constructor(){this.clauses=[]}addClause(e){return e&&(this.clauses=this.clauses.concat(e)),this}build(){return this.clauses.join(" and ")}orBuild(){return`(${this.clauses.join(" or ")})`}buildWithOperators(e){return this.clauses.reduce(((t,r,n)=>{const i=0===t.length,a=(0,l.propOr)(xu,n,e),o=(e=>[xe.andNot,xe.orNot].includes(e))(a)?Mu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},Vu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),Gu=e=>t=>Array.isArray(t)?t.map(Gu(e)).toString():(e=>"object"==typeof e&&"lookupCode"in e)(t)?t.lookupCode:(0,l.when)((0,l.always)(!e),l.trim)(t.toString()),Bu=Gu(!0),Wu=Gu(!1),Yu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),qu=e=>`'${e}'`,Hu=e=>`"${e}"`,Ju=e=>(0,l.pipe)((0,l.map)(e),(0,l.join)(" or ")),Ku=(0,l.pipe)(Bu,Yu),Qu=(0,l.pipe)(Wu,Yu),Xu=(0,l.pipe)(Qu,qu),zu=(0,l.pipe)(Ku,qu),Zu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(fu(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),ec=(e,t)=>bu(t)?{type:mt.TYPE_INT}:Ou(t)?{type:mt.TYPE_FILE}:gu(t)&&!_u(t)&&oi(e.type)?{type:mt.TYPE_LOCAL_DATE}:e,tc=Object.values(ge),rc=e=>!Object.values(ge).includes(e),nc=e=>tc.includes(e),ic=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;return fe().text(t[e])},ac=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.values(Oe),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;return e.map((e=>({value:e,get label(){return ic(e,t)}})))},oc=e=>{const t=f()().startOf("minute");switch(e){case Oe.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case Oe.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case Oe.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case Oe.LAST_6MONTHS:return[f()(t).subtract(6,"months").valueOf(),t.valueOf()];case Oe.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()];case ve.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];default:return e}},sc=e=>{let[t,r]=e;return[f()(t).valueOf(),f()(r).endOf("date").valueOf()]},lc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oc;return(0,l.is)(String,e)?t(e):sc(e)};let uc;!function(e){e.CurrentUser="currentUser"}(uc||(uc={}));const cc={},pc=(e,t)=>{cc[e]=t},dc=e=>cc[e];function yc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fc(e,t,r[t])}))}return e}function fc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Tc=e=>["tags"].includes(e),Ec=e=>e.split("{CurrentUser}").join(dc(uc.CurrentUser)||""),mc=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),hc=(0,l.curry)(((e,t,r)=>{const n=r.map((0,l.cond)([[(0,l.always)(fu(e)||t.endsWith(".count")),Qu],[(0,l.always)(Tc(t)),zu],[l.T,Xu]])).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),bc=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Oc=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Eu(t);return(0,l.pipe)(bc(i),(0,l.map)(hc(t,r)),mc(" or "))(n)},vc=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Xu).join(",")})`},gc=e=>`*${e}*`,_c=e=>`URL:${e}`,Ac=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Nc=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===Te.IN_FILE?r:`not ${r}`},Pc=(e,t)=>[w(e,t),I(e,t)],Rc=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!Sc(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case Te.ON:return yc({},e,n?{filter:Te.EQUALS}:{filter:Te.IN_RANGE,values:[Pc(i,n)]});case Te.BEFORE:return yc({},e,{filter:Te.LTE,values:[[I(i,n)]]});case Te.AFTER:return yc({},e,{filter:Te.GTE,values:[[w(i,n)]]});case Te.WITHIN:return yc({},e,{filter:Te.IN_RANGE,values:[oc(i)]})}}return e}),Oc),Sc=(0,l.propSatisfies)(oi,"type"),wc=[[(0,l.prop)("rawFilter"),(0,l.pipe)((0,l.prop)("rawFilter"),Ec)],[(0,l.propEq)("filter",Te.HAS_ALL),(0,l.pipe)((e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Oc({filter:Te.EQUALS,fieldName:t,values:[r]}))),new $u).build())),mc(" or "))(r)}),Ec)],[(0,l.propEq)("filter",Te.CONTAINS),(0,l.pipe)((e=>{let{filter:t,fieldName:r,values:n}=e;return Oc({fieldName:r,filter:t,values:n.map((0,l.pipe)(Wu,gc))})}),Ec)],[(0,l.propEq)("filter",Te.EQUALS),(0,l.pipe)((e=>{const{fieldName:t,values:r}=e;return"type"===t?Oc(yc({},e,{values:(0,l.flatten)(r)})):Ac(r)?vc(yc({},e,{filter:"listEquals"})):Oc(e)}),Ec)],[(0,l.propEq)("filter",Te.NOT_EQUALS),(0,l.pipe)((e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Eu(t);return(0,l.pipe)(bc(i),(0,l.map)(hc(t,r)),mc(" and "))(n)})(yc({},e,{values:(0,l.flatten)(e.values)})):Sc(e)?(e=>{const{values:t}=e,r=!Sc(e),[n]=t;return(new $u).addClause(Oc(yc({},e,{filter:Te.LT,values:[w(n,r)]}))).addClause(Oc(yc({},e,{filter:Te.GT,values:[I(n,r)]}))).orBuild()})(e):Ac(t)?vc(yc({},e,{filter:"not listEquals"})):Oc(e)}),Ec)],[(0,l.propSatisfies)(Ou,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Oc({fieldName:r,filter:Nc(t,r),values:n.map((0,l.prop)("link")).map(_c)})}],[(0,l.propSatisfies)(bu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Oc({fieldName:`${r}.count`,values:n,filter:vu(t)})}],[(0,l.propSatisfies)(gu,"filter"),Rc],[(0,l.propEq)("fieldName","geoPolygon"),e=>{let{fieldName:t,values:[r]}=e;const n=(0,l.pipe)((0,l.map)((e=>{let[t,r]=e;return`${t},${r}`})),(0,l.join)(";"))(r);return hc(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return hc(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,(0,l.pipe)(Oc,Ec)]],Ic=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!mu(e)||Cc(e,r))},Uc=(e,t)=>Array.isArray(t)?Cc(e,t):e===Te.WITHIN?nc(t)||Number.isInteger(t):!(0,l.isNil)(t)&&Wu(t).length>0,Cc=(e,t)=>t&&t.length>0&&t.every((t=>Uc(e,t)));function Dc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jc=["relevanceScores"],Lc=e=>{let{fieldName:t=""}=e;const r=t.split(".");if(jc.includes(r[0]))return r[0];const n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},kc=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Fc=(e,t,r)=>"children"===e?xc(r,[...t][0],!0):r,Mc=(e,t,r)=>"values"===e?[...r,...t]:r,xc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.findIndex((0,l.propEq)("fieldName",t.fieldName));if(n>=0){const i=e[n];if("children"in i&&"children"in t)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Fc,t),e);if(!r&&hu(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Mc,t),e)}return(0,l.append)(t,e)},$c=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Lc(e),r=e=>e.fieldName===t?e:r({fieldName:kc(e),children:[e]});return r(e)})(t);return xc(e,r)}),[]),Vc=e=>e&&e.length>1&&!e.some((e=>{let{fieldName:t}=e;return null==t?void 0:t.startsWith("parent.")}))&&!e.every((0,l.has)("rawFilter")),Gc=e=>{let[t]=e;return t.children?Gc(t.children):t.operator},Bc=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=Gc(t)===xe.andNot,a=n(t,!1),o=i?`not ${Mu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Gc(r)||xu} ${s})`}function n(i){let a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.reduce(((i,o)=>i.addClause((0,l.cond)([[(0,l.has)("children"),e=>{let{children:i}=e;return a&&Vc(i)&&!t?r(i):n(i,a)}],...e])(o))),new $u).buildWithOperators(i.map((0,l.prop)("operator")))}return n},Wc=(0,l.pipe)((0,l.propOr)("","filter"),pu),Yc=(0,l.map)((0,l.when)(Wc,(e=>{const[t,r]=cu(e.filter);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Dc(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),qc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(Ic),Yc,$c,Bc([...e,...wc],t))},Hc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),Jc=[Te.ON,Te.BEFORE,Te.AFTER,Te.WITHIN,Te.NOT_EQUALS,Te.MISSING_VALUE,Te.EXISTS],Kc=[Te.EQUALS,Te.NOT_EQUALS,Te.STARTS_WITH,Te.MISSING_VALUE,Te.HAS_ALL,Te.FULL_TEXT,Te.EXISTS],Qc=[Te.EQUALS,Te.NOT_EQUALS,Te.LT,Te.LTE,Te.GT,Te.GTE,Te.IN_RANGE],Xc=(e,t)=>{const r=Fn(e);return(e=>{switch(e){case gt.startDate.name:case gt.endDate.name:case At.dueDate.name:case Rt.createdTime.name:case Rt.updatedTime.name:case wt.reltioLoadDate.name:case wt.createDate.name:case wt.updateDate.name:case wt.deleteDate.name:case wt.publishDate.name:return Jc;case St.matches.name:case wt.count.name:return Qc;case At.workflow.name:case At.assignee.name:case At.step.name:case Nt.commenter.name:case Rt.createdBy.name:case Rt.updatedBy.name:case wt.sourceSystems.name:case wt.value.name:return Kc;default:return null}})(t)||Su(r)},zc=[Te.EQUALS,Te.NOT_EQUALS,Te.CONTAINS,Te.STARTS_WITH,Te.MISSING_VALUE,Te.HAS_ALL,Te.IN_RANGE,Te.WITHIN,Te.EXISTS,Te.ON],Zc=(0,l.pipe)(Xc,(0,l.filter)((0,l.includes)(l.__,zc))),ep=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(Os);if(a&&a[0])if(n.length>0&&a[0].value)r=ep(a[0].value,[n.join(".")])[0].value;else if("label"in a[0]&&"string"==typeof a[0].label)r=a[0].label;else if(Object.prototype.hasOwnProperty.call(a[0],"label"))r="";else{var o;r=null!==(o=a[0].value)&&void 0!==o?o:""}return{key:t,value:r}}),""),tp=(e,t)=>{const r=new RegExp("{[^}]*}","g");let n,i=[];for(;null!=(n=r.exec(t));)i.push(n[0]);i=i.map((function(e){return e.substring(1,e.length-1)}));const a=ep(e.attributes||e.value,i);let o;return a.every((function(e){return void 0===e.value}))?o="":(o=t,o=o.replace(/\[[^\]]*]/g,(e=>{const t=e.match(/\{[^}]*}/g);return t?t.some((function(e){return e=e.substring(1,e.length-1).trim(),a.some((function(t){return t.key===e&&void 0===t.value}))}))?"":e.substring(1,e.length-1):e})),a.forEach((e=>{var t;o=o.replace("{"+e.key+"}",null!==(t=e.value)&&void 0!==t?t:"")}))),o},rp=/[,\s]*$/,np=e=>{const t=fe().text(Pe);if(!e)return t;const r=e.replace(rp,"");return""===r.toString().trim()?t:r},ip=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},ap=(e,t,r)=>{if("string"==typeof t)return t;if("Reference"!==r.type&&"Nested"!==r.type&&"Image"!==r.type)return"";if("Reference"===r.type){const n=ip(e,r.referencedEntityTypeURI);if(n)return tp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return tp({attributes:t||{}},r.dataLabelPattern);return""},op=e=>{let{uiPath:t,uri:r}=e;return`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},sp=e=>{let{uiPath:t,value:r,uri:n}=e;return`${t}#p~com.reltio.plugins.pivoting.default.DefaultPivotingPerspective_ps~pivoting_a~${encodeURIComponent(n)}_v~${encodeURIComponent(r)}`},lp=e=>{let{uiPath:t,tag:r,entityUri:n}=e;return`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},up=(0,l.curry)(((e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"")),cp=e=>(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),Yl,(0,l.prop)("value")))(e),pp=(e,t,r)=>{const n=(e=>(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),cp)(e))(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(Fs(e),cp)))(e))(r)||((e,t)=>{const r=(e=>{const t=t=>`${e.uri}/attributes/${t}`,r=(e=e||{}).imageAttributeURIs||[];return(0,l.uniq)([t("ImageGallery"),...r,t("Image"),t("ImageLinks")])})(bi(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>Ls(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,cp))(r)})(e,r)||Ni(e,r.type);return up(t,n)};function dp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yp(e,t,r[t])}))}return e}function yp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fp="DTSS/",Tp=e=>fp+e.dataTenant+"/"+e.uri,Ep=e=>(0,l.replace)(new RegExp("^DTSS/.+?/"),"",e),mp=e=>!(!e||!e.dataTenant),hp=e=>(0,l.startsWith)(fp,e),bp=e=>(0,l.pipe)((0,l.ifElse)(hp,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null)))(e),Op=e=>(0,l.ifElse)(mp,Tp,(0,l.prop)("uri"))(e),vp=e=>{return e&&e.uri?e.dataTenant?Tp(e):(t=e.uri,(0,l.replace)(new RegExp("^entities/"),"",t)):"";var t},gp=e=>(0,l.curry)(((t,r)=>(bi(t,r.type)||{})[e]||"")),_p=gp("label"),Ap=gp("typeGraphIcon"),Np=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=bi(e,t.type)||{},n=(r.attributes||[]).reduce(((e,t)=>(e[t.uri]=t,e[t.name]=t,e)),{});return t.attributes&&r.businessCardAttributeURIs?r.businessCardAttributeURIs.map((r=>{const i=n[r];if(!i)return null;const a=t.attributes[i.name];if(!a)return null;const o=Array.isArray(a)?a.find(Os)||"":a,s=o,l=o,u=null!=s.label?(s.relationshipLabel?s.relationshipLabel+", ":"")+s.label:l.value;return{text:ap(e,u,i),uri:o.uri}})).filter(l.identity):[]},Pp=(e,t)=>(0,l.pipe)(Np,(0,l.map)((0,l.prop)("text")),(0,l.join)(", "))(e,t),Rp=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,Sp=e=>(0,l.propOr)([],"matchRules",e),wp=(e,t,r,n)=>{var i,a,o;return t&&r?dp({},r.aEntity,{attributes:null!==(i=null==n?void 0:n.attributes)&&void 0!==i?i:{},roles:null!==(a=null==n?void 0:n.roles)&&void 0!==a?a:[],tags:null!==(o=null==n?void 0:n.tags)&&void 0!==o?o:[]}):e},Ip=(e,t,r)=>t&&r?r.aEntity:e,Up=e=>(0,l.evolve)({attributes:Ll(!0)})(e),Cp=(0,l.pipe)(Up,(0,l.props)(["attributes","startDate","endDate","roles","tags"]),(0,l.all)(E)),Dp=(0,l.curry)(((e,t)=>t?dp({},t,{dataTenant:e}):{dataTenant:e}));function jp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Lp(e,t,r[t])}))}return e}function Lp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kp=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s,(()=>E())),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+au(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;let T,E=l.identity;const m=()=>!e||f()||T?T||Promise.resolve():(T=new Promise((e=>{E=e})),Promise.resolve());return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f,getDcrUriAwait:m}},Fp=e=>!pe(e.value),Mp=e=>{const t=(t,n)=>i=>{if(!Fp(i)){var a,o;const s=`${n}/${null!==(a=i.refEntity)&&void 0!==a&&a.objectURI?cn(i.refEntity.objectURI):Kr()}`;let u;const c=e.objectsInfo[null===(o=i.refEntity)||void 0===o?void 0:o.objectURI];return c&&(u=c.label,c.isExist||(i.refEntity.objectURI=`${e.uri}/changes/${i.refEntity.objectURI}`)),jp({},i,{label:u,uri:s,value:(0,l.fromPairs)((0,l.map)(r(t,s),(0,l.toPairs)(i.value)))})}return jp({},i,{uri:`${n}/${Kr()}`})},r=(e,r)=>n=>{let[i,a]=n;return[i,(0,l.map)(t(`${e}/attributes/${i}`,`${r}/${i}`),a)]};return(0,l.evolve)({changes:(0,l.map)((0,l.map)((0,l.when)((0,l.propEq)("type",dt.CREATE_ENTITY),(0,l.evolve)({newValue:e=>{const{uri:t,type:n}=e;return(0,l.evolve)({attributes:(0,l.pipe)(l.toPairs,(0,l.map)(r(n,`${t}/attributes`)),l.fromPairs)},e)}}))))},e)};function xp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){$p(e,t,r[t])}))}return e}function $p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Vp=e=>{const t=Object.keys(e.changes).reduce(((e,t)=>(e[t]=en(),e)),{}),r=(r,i)=>a=>{if(!Fp(a)){var o;const s=Qr(i);let u={};const c=e.objectsInfo[null===(o=a.refEntity)||void 0===o?void 0:o.objectURI];return c&&(u={refEntity:xp({},a.refEntity,{objectURI:t[a.refEntity.objectURI]||a.refEntity.objectURI,type:c.type}),label:c.label}),xp({},a,u,{uri:s,value:(0,l.fromPairs)((0,l.map)(n(r,s),(0,l.toPairs)(a.value)))})}return xp({},a,{uri:Qr(i)})},n=(e,t)=>n=>{let[i,a]=n;return[i,(0,l.map)(r(`${e}/attributes/${i}`,`${t}/${i}`),a)]};return{tempEntities:(0,l.pipe)((0,l.prop)("changes"),(0,l.map)((0,l.pipe)((0,l.map)((0,l.ifElse)((0,l.propEq)("type",dt.CREATE_ENTITY),(0,l.pipe)((0,l.evolve)({newValue:r=>{const{uri:i,type:a}=r,o=e.objectsInfo[i];return(0,l.evolve)({attributes:(0,l.pipe)(l.toPairs,(0,l.map)(n(a,`${t[i]}/attributes`)),l.fromPairs)},xp({},r,{uri:t[i],label:null==o?void 0:o.label,secondaryLabel:null==o?void 0:o.secondaryLabel}))}}),(0,l.prop)("newValue")),(0,l.always)(null))),(0,l.reject)(l.isNil))),l.values,l.flatten)(e),entitiesUrisMap:t}},Gp="relation",Bp=(0,l.always)([Gp,"relationUri"]),Wp=(0,l.always)([Gp,"relationType"]),Yp=(0,l.always)([Gp,"object"]),qp=(0,l.always)([Gp,"direction"]),Hp=(0,l.always)([Gp,"object","attributes"]),Jp=(0,l.always)(["entity","entityUri"]),Kp=(0,l.always)([Gp,"startDate"]),Qp=(0,l.always)([Gp,"endDate"]),Xp=()=>{const e={newUriMap:{}};return{getUri:t=>(0,l.pathOr)(t,["newUriMap",t],e),addUriFromCreateRequest:t=>r=>{var n;return null!=r&&null!==(n=r[0])&&void 0!==n&&n.successful&&((t,r)=>{e.newUriMap=(0,l.assoc)(t,r,e.newUriMap)})(t,r[0].object.uri),r},hasNewUri:()=>!(0,l.isEmpty)(e.newUriMap)}};function zp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Zp(e,t,r[t])}))}return e}function Zp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ed=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:Xe.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},td=e=>{let{relationUri:t}=e;return{type:Xe.DELETE_RELATION,parameters:{relationUri:t}}},rd=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:Xe.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},nd=e=>{let{oldRelation:t,newRelation:r}=e;return{type:Xe.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},id=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:Xe.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},ad=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pathEq)(["parameters","relation","uri"],e),l.T],[(0,l.pathEq)(["parameters","relationUri"],e),l.T],[(0,l.pathEq)(["parameters","oldRelation","uri"],e),l.T],[(0,l.pathEq)(["parameters","newRelation","uri"],e),l.T],[l.T,l.F]])(t))),od=e=>e.type===Xe.DELETE_RELATION,sd=e=>e.type===Xe.CREATE_RELATION,ld=e=>e.type===Xe.REPOINT_RELATION,ud=e=>e.type===Xe.UPDATE_RELATION,cd=async e=>{const t=[];for(const r of e){const e=await r();t.push(e);const n=Array.isArray(e)&&e.find((0,l.has)("errors"));if(n)throw n.errors}return t.flat()},pd=e=>{let{type:t,parameters:r,dcrProcessor:n,relationUriProcessor:i}=e;const{enhanceUriWithDCR:a,updateDCRUriFromResponse:o}=n,s=e=>(o(e),e);switch(t){case Xe.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:o,attributes:l,startDate:u,endDate:c}=t;return vT({startEntityUri:e,endEntityUri:n,relationType:o,attributes:l,startDate:u,endDate:c,uriPreprocessor:a}).then(s).then(i.addUriFromCreateRequest(t.uri))};case Xe.DELETE_RELATION:return()=>{const{relationUri:e}=r;return OT(e,a).then(s)};case Xe.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return NT(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(s)};case Xe.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return gT({oldRelation:e,newRelation:t,uriPreprocessor:a}).then(s)};case Xe.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:a,isReversed:o}=r,{uri:s}=a,u=[td({relationUri:s}),ed({parentUri:o?e:t,relation:a,entityUri:o?t:e})];return(0,l.pipe)((0,l.map)(yd(n,i)),(0,l.map)(pd),cd)(u)}}},dd=e=>t=>()=>e().then(t),yd=(e,t)=>r=>zp({dcrProcessor:e,relationUriProcessor:t},r),fd=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=kp({alwaysCreateDCR:e,dcrUri:t}),n=Xp();return{commandExecutor:e=>(0,l.pipe)(l.flatten,(0,l.map)(yd(r,n)),(0,l.map)(pd),(0,l.map)(dd(r.getDcrUriAwait)),cd)(e),dcrProcessor:r,relationUriProcessor:n}},Td=e=>t=>(0,l.map)((t=>zp({},t,{parameters:(0,l.evolve)({parentUri:jh(e),entityUri:jh(e),newEntityUri:jh(e)},t.parameters)})),t),Ed=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},md=(e,t)=>{const r=e.filter(sd).find(ad(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>ud(o)&&ad(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!ld(o)||!ad(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(Ed({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},hd=(e,t)=>{const r=e.filter(ld).filter(ad(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!ud(i)||!ad(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(Ed({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},bd=(e,t)=>{const r=e.filter(od).filter(ad(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!ad(t,e)))},Od=(e,t)=>{const r=e.filter(ud).filter(ad(t));let n=null;const i=e.filter((e=>!r.includes(e)||!ud(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(Ed({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},vd=e=>{const t=e.filter(od).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(bd,e)},gd=e=>{const t=e.filter(sd).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(md,e)},_d=e=>{const t=e.filter(ld).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(hd,e)},Ad=e=>{const t=e.filter(ud).map((e=>{let{parameters:{newRelation:{uri:t}}}=e;return t}));return(0,l.pipe)((0,l.filter)((e=>(0,l.count)((0,l.equals)(e),t)>1)),l.uniq,(0,l.reduce)(Od,e))(t)},Nd=e=>(0,l.pipe)(vd,gd,_d,Ad)(e);function Pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Rd(e,t,r[t])}))}return e}function Rd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Sd=e=>Pd({},(0,l.path)(Yp(),e),{startDate:(0,l.path)(Kp(),e),endDate:(0,l.path)(Qp(),e)}),wd=(e,t)=>(0,l.pipe)((0,l.path)(Jp()),jh(t))(e),Id=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=wd(e,r),i=(0,l.path)(qp(),e)===ze.IN,a=e.parentEntityUri||n;return ed({parentUri:i?t:a,relation:Sd(e),entityUri:i?a:t})})),...o.map((t=>{const i=wd(t,r),a=(0,l.path)(qp(),t)===ze.IN,o=i!==(0,l.pipe)((0,l.path)(Yp()),a?sy:ly)(t),s=py(e,(0,l.path)(Bp(),t)),u=t.parentEntityUri||n,c=jh(r,i);return o?id({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(Yp(),t),isReversed:!1}):nd({oldRelation:(0,l.path)(Yp(),s),newRelation:Sd(t)})})),...i.map((e=>td({relationUri:e}))),...s.map((e=>rd({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},Ud=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return Pd({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),Cd=(0,l.has)("dataTenant"),Dd=(0,l.ifElse)(Cd,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),jd=(e,t)=>(0,l.pipe)(Si,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(zs),qa)(e,t);function Ld(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kd(e,t,r[t])}))}return e}function kd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fd=e=>(0,l.prop)("uri",e),Md=e=>Fd(e)?e.uri:e,xd=e=>t=>Md(t)===e,$d=(0,l.curry)(((e,t)=>{const r=(n,i)=>{var a;let o=Md(i),s=!1;o.startsWith("!")&&(o=o.slice(1),s=!0);const u=e[o]&&Mi(ki.READ,e[o]),c=n.find(xd(o))||!u?n:n.concat(Fd(i)?Ld({},i,{uri:o}):null!==(a=t.find(xd(o)))&&void 0!==a?a:o);return s?c:(0,l.keys)(e).reduce(((t,n)=>e[n].extendsTypeURI!==o||t.find(xd(n))?t:r(t,n)),c)};return t.reduce(r,[])})),Vd=(0,l.curry)(((e,t)=>{const r=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r.reduce(((r,n)=>{const i=Md(n),a=(0,l.path)([i,t,"objectTypeUri"],e);return!a||r.find(xd(a))?r:r.concat(a)}),[])};return Ld({},t,{entityTypes:[...r("startObject",t.inRelations),...r("endObject",t.outRelations)]})})),Gd=(0,l.indexBy)((0,l.prop)("uri")),Bd=(0,l.curry)(((e,t)=>{const r=Gd(e.relationTypes),n=Gd(e.entityTypes),i=e=>(0,l.evolve)({inRelations:$d(r),outRelations:$d(r),entityTypes:$d(n),nextEntry:i},e);return(0,l.pipe)((0,l.unless)((0,l.either)((0,l.prop)("nextEntry"),(0,l.prop)("entityTypes")),Vd(r)),i)(t)})),Wd=(e,t)=>(0,l.evolve)({content:Bd(e)},t),Yd=(0,l.path)(Bp()),qd=(0,l.path)(Hp()),Hd=(0,l.path)(Jp()),Jd=(0,l.path)(Yp()),Kd=(0,l.path)(qp()),Qd=(e,t)=>(0,l.pipe)((0,l.when)((0,l.always)(t),(0,l.pick)(t)),l.values,(0,l.map)((0,l.props)(["relationToAdd","relationsToEdit"])),l.flatten,(0,l.reject)(l.isNil))(e),Xd=e=>[e,"relationsToEdit"],zd=e=>[e,"relationToAdd"],Zd=(e,t)=>(0,l.path)([t,"drafts"],e),ey=(e,t)=>(0,l.pathOr)([],Xd(t),e),ty=(e,t)=>(0,l.path)(zd(t),e),ry=(e,t)=>(0,l.concat)(ey(e,t),[ty(e,t)]),ny=(e,t,r)=>{const n=ry(e,t),i=n.findIndex((0,l.pathEq)(["relation","relationUri"],r));return(0,l.path)([i,"initial","modifiedEntity"],n)||null},iy=(e,t,r)=>{const n=ry(e,t),i=n.findIndex((0,l.pathEq)(["relation","relationUri"],r));return(0,l.path)([i,"initial","connection"],n)},ay=e=>{let{type:{uri:t,label:r},direction:n}=e;return e=>{const i=e.relationUri;return(0,l.pipe)((0,l.assoc)("relationType",t),(0,l.assoc)("relationLabel",r),(0,l.assoc)("object",{type:t,attributes:{},uri:i}),(0,l.assoc)("direction",n))(e)}},oy=(e,t,r)=>{const n=tp(t,e.dataLabelPattern),i=(0,l.lensProp)("entity");return(0,l.over)(i,(0,l.evolve)({entityLabel:(0,l.always)(n),object:{label:(0,l.always)(n)}}),r)},sy=(0,l.path)(["startObject","objectURI"]),ly=(0,l.path)(["endObject","objectURI"]),uy=(0,l.path)(["startObject","objectTypeURI"]),cy=(0,l.path)(["endObject","objectTypeURI"]),py=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(Bp()),(0,l.equals)(t))(r))return r;if(r.connections){const e=py(r.connections,t);if(e)return e}}},dy=(0,l.pipe)(py,(0,l.path)(Yp())),yy=(0,l.allPass)([(0,l.pipe)((0,l.path)(Jp()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(Wp()),(0,l.complement)(E))]),fy=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:tn()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=my({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=Ty(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?ay(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},Ty=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===1?e.length?{type:e[0],direction:Se.IN}:{type:t[0],direction:Se.OUT}:null},Ey=e=>e.uri||e,my=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&Vi(i,t)&&Bi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===Se.IN?"startObject":"endObject",{directionalContext:i}=t[n];return"directed"===t.direction&&1===(0,l.propOr)(0,"length",i)&&(r+=` (${i[0].labelPattern})`),!(r in o)&&(o[r]=!0,!0)}return!1},u=e=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],bi(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],bi(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(Ey,Si(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Se.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Se.OUT)),(0,l.map)(u))},t)||{}},hy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Di({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ii(e,n.uri);return n&&(!t||vi(e,i,t))&&(!r||vi(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],bi(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],bi(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(Ts,r));return{inRelations:(0,l.pipe)((0,l.filter)(a(e,null,t)),(0,l.filter)(n),(0,l.map)(o))(s),outRelations:(0,l.pipe)((0,l.filter)(a(e,t,null)),(0,l.filter)(i),(0,l.map)(o))(s)}},by=(0,l.curry)(((e,t,r,n,i)=>{const a=vi(n,l.__,t.type),o=e?cy:uy,s=vi(n,l.__,r.type),u=e?uy:cy;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),Oy=(e,t,r)=>{const n=e?cy:uy,i=(0,l.pipe)((0,l.map)(n),l.uniq)(r);return(0,l.pipe)((0,l.filter)((e=>{let{uri:r}=e;return i.some(vi(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function vy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gy=e=>{let{type:t,attributeType:r,attributeTypeUri:n,parentUri:i,uri:a,message:o,source:s}=e;return{type:t,uri:a,attributeTypeUri:n,attributeType:r,parentUri:i,message:o,source:s}},_y=e=>!e.deactivated,Ay=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},Ny=e=>Ay(e)+e.message,Py=(0,l.unless)(l.isNil,(0,l.prop)("message")),Ry=(0,l.unless)(l.isNil,(0,l.prop)("type")),Sy=(0,l.curry)(((e,t)=>ln(t.parentUri,e))),wy=(0,l.curry)(((e,t)=>t.parentUri===e)),Iy=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),ln(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(Pn,(0,l.any)(ln(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),Uy=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),Cy=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),Dy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([Vy,_y,Sy(e),Iy(t),(0,l.complement)(Cy(e,t.uri))]))(r)},jy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([Vy,_y,wy(e),Uy(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",we.missed))]))(r);return n&&n.message||""},Ly=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===we.missed))},ky=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_y,(0,l.propEq)("type",we.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(Bp(),e))]))(t)},Fy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_y,(0,l.propEq)("type",we.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},My=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([_y,Sy(t)]))(r)},xy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([_y,(0,l.propEq)("type",we.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},$y=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?Yh(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case je.attributeValue:{const e=a;if(Wn(a))return tp(o,e.dataLabelPattern);if(Yn(a)){const t=o,i=Is(t),a=An(e),s=bi(n,a);return Zr(i)?tp(r[i],s.dataLabelPattern):t.label}return""}case je.tempEntity:return tp(o,a.dataLabelPattern);case je.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=bi(n,null==e?void 0:e.entityType);return`${np(i&&Zr(i)?tp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||wi(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vy(e,t,r[t])}))}return e}({},e,{label:np(t)})}))},Vy=e=>!e.severity||e.severity===Ue.ERROR,Gy=(e,t,r)=>(0,l.allPass)([(0,l.pipe)((0,l.prop)("uri"),E),(0,l.propEq)("parentUri",t),(0,l.propEq)("attributeTypeUri",r)])(e),By=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case mt.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(By(n))}));case mt.TYPE_REFERENCE:return!!_s(t);case mt.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),Wy=(e,t)=>e.every((0,l.complement)(By(t))),Yy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Go(e,t.type||t.relationType,!0,r);return n.reduce(((r,n)=>{const i=Ls(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!Os(e.parent))))).forEach((e=>{Wy(e.attrValues,n)&&r.push(gy({type:we.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:fe().text("Attribute is required"),source:Ie.local}))})),r}),[])},qy=(0,l.curry)(((e,t,r)=>Ls(e,t,r,!1))),Hy=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),bi(e),(0,l.prop)("attributes"),(0,l.defaultTo)([]),(0,l.reject)(Gn),(0,l.filter)(Yn),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(qy(e,t)));return(0,l.pipe)(r,(0,l.reject)(Is),(0,l.map)((e=>{let{uri:r}=e;return gy({type:we.missedRefEntity,uri:"",attributeTypeUri:fn(r,t.type),parentUri:r,message:fe().text("Entity is required"),source:Ie.local})})))(t)},Jy=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Is,Zr)).flatMap((n=>{const i=Is(n),a=t[i],o=ei(e,fn(n.uri,r.type));return Ky(e,t,o,a)})),Ky=(e,t,r,n)=>{const i=Pn(r),a=i.map((t=>ei(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",mt.TYPE_REFERENCE))).flatMap(Sn).concat(i);return Qy(e,t,n,(e=>a.some(ln(e.uri))))},Qy=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=Yy(e,r,n),a=Hy(e,r),o=Jy(e,t,r);return[...i,...a,...o]},Xy=(e,t)=>({attributes:{[e.name]:[t]},type:Tn(e.uri),uri:Tn(t.uri)}),zy=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Xy(t,r),a=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(r[0]||e).uri;return t.uri===n};return Qy(e,n,i,a)},Zy=(e,t)=>{const r=(0,l.path)(Yp(),t)||{};return Yy(e,r)},ef=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(Jp()),(0,l.ifElse)(Zr,(e=>t[e]),(0,l.always)(null)))(r),i=Zy(e,r),a=(e=>(0,l.path)(Jp(),e)?[]:[gy({type:we.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(Wp(),e),parentUri:(0,l.path)(Bp(),e),message:fe().text("Entity is required"),source:Ie.local})])(r),o=((e,t,r)=>r?Qy(e,t,r):[])(e,t,n);return[...i,...a,...o]},tf=e=>(0,l.path)(["entity","uri"],e)?[]:[gy({type:we.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:fe().text("Entity is required"),source:Ie.local})],rf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=Yy(e,r),i=tf(t);return[...n,...i]};function nf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const af=(e,t)=>{var r,n;const i=on(t)?bi(e,t):Si(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||co(e)},of=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),sf=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(of(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},lf=(e,t)=>(0,l.when)((0,l.prop)("refEntity"),(0,l.pipe)((0,l.when)((0,l.allPass)([(0,l.prop)("refRelation"),(0,l.always)("INSERT_ATTRIBUTE"===t),(0,l.pipe)(Us,Zr,l.not)]),(e=>{const t=(0,l.pipe)(Us,cn)(e);return sf((e=>e.replace(t,t+Yr)))(e)})),(0,l.when)((0,l.pipe)(Is,Zr),(t=>{const r=Is(t),n=e[r],i=n&&cf(n,e);return null!=i&&i.attributes?(0,l.evolve)({value:e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nf(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),uf=(e,t,r,n)=>gb(bb((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),Nb((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e,n).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(lf(r,e.type)),(0,l.map)(sf(On))))})(e))).concat(Uh(e,t)),cf=(e,t)=>(0,l.evolve)({attributes:Dl({valueTransformer:(0,l.pipe)(js,lf(t),of(On)),deleteEmptyComplex:!0}),uri:On})(e),pf=(e,t,r)=>e.flatMap((e=>{const{startObject:n,endObject:i}=((e,t)=>{const r=Kd(e)===ze.IN,n=e.entity,i=n&&{type:n.entityType,objectURI:On(n.entityUri||"")},a={type:t.type,objectURI:On(t.uri)};return{startObject:r?i:a,endObject:r?a:i}})(e,t),a=(0,l.pipe)(Jd,(0,l.pick)(["attributes","uri","type"]),(0,l.evolve)({attributes:Dl({valueTransformer:of(On),deleteEmptyComplex:!0}),uri:On}),(0,l.assoc)("startObject",n),(0,l.assoc)("endObject",i))(e),o=Hd(e),s=Zr(o)?cf(r[o],r):null;return s?[a,s]:[a]}));function df(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yf(e,t,r[t])}))}return e}function yf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ff=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(Wr,"g"),"uri$$$$").replace(new RegExp(Yr,"g"),""))),Tf=e=>(0,l.pipe)((0,l.evolve)({objectUri:ff,objectParentUri:ff}),(e=>{return df({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?we.missed:we.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&bn(e.objectUri),uri:e.objectUri,source:Ie.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),Ef=(e,t)=>(0,l.map)((0,l.pipe)(Tf,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=$y(t,s),p=null!=c&&c.length?c.slice(0,-1):$y(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&ei(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===je.attributeValue&&(a=e.valueType)}return a})(o,c,e);return df({},e,{attributeType:d,attributeTypeUri:null==d?void 0:d.uri,uri:c&&(null===(r=(0,l.last)(c))||void 0===r||null===(n=r.value)||void 0===n?void 0:n.uri)||s,parentUri:p&&(null===(i=(0,l.last)(p))||void 0===i||null===(a=i.value)||void 0===a?void 0:a.uri)||u,path:s?c:p})}),(e=>{let{entitiesMap:t,metadata:r}=e;return e=>{const{uri:n,parentUri:i,path:a,attributeTypeUri:o}=e;if(!n&&null!=a&&a.length&&i&&hn(i)){const n=(0,l.last)(a),i=n.valueType;if(Yn(i)&&wn(i).includes(o)){const i=Is(n.value),o=i&&Zr(i)?t[i]:null;return o?df({},e,{parentUri:o.uri,path:a.concat({type:je.tempEntity,value:o,valueType:bi(r,o.type),label:""})}):e}}return e}})(t)))(e),mf=e=>{if(e.type===De.AGO||e.type===De.WITHIN){const[t,r]=e.period;return"Number"===(0,l.type)(t)&&"String"===(0,l.type)(r)&&t>0}if(e.type===De.BETWEEN){const[t,r]=e.period;return t instanceof Date&&r instanceof Date}};var hf=r(51095);const bf=[],Of=r.n(hf)()(l.identity,((e,t)=>{let{parentUri:r}=t;return r}),((e,t)=>{let{attributeType:r}=t;return r}),((e,t,r)=>{const n=Dy(t,r,e);return 0===n.length?bf:n}))(((e,t)=>{let{parentUri:r,attributeType:n}=t;return`${r}-${n.uri}`})),vf=(e,t,r)=>Of(e,{parentUri:t,attributeType:r}),gf=e=>`equals(user, '${Yu(e)}')`,_f=e=>`equals(items.delta.sources, '${e.abbreviation}')`,Af=e=>`equals(items.objectType, '${e.uri}')`,Nf=e=>{const{period:t,type:r}=e;if(!mf(e))return"";switch(r){case De.WITHIN:return`gte(timestamp, ${Z(t)})`;case De.AGO:return`lte(timestamp, ${Z(t)})`;case De.BETWEEN:{const[e,r]=t;return`range(timestamp, ${e.valueOf()}, ${f()(r).endOf("date").valueOf()})`}default:return""}},Pf=e=>[`equals(items.objectUri, '${e}')`,`equals(items.startObjectUri, '${e}')`,`equals(items.endObjectUri, '${e}')`].join(" or "),Rf=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),Sf=e=>{let{query:t,body:r}=e;return t=Rf(t),zl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},wf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e];r&&n.push({filter:"containsWordStartingWith",fieldName:"attributes",values:[r]});const i={filter:(0,l.pipe)(qc(),Hc(t.globalFilter))(n),activeness:t.activityFilter||Ne.ACTIVE_ONLY,options:t.searchOptions};return(0,l.reject)(E,i)},If=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return zl("/entities/_total",{method:"POST",body:JSON.stringify(wf(e,t,r))})},Uf=e=>zl("/entities/_total",{method:"POST",body:JSON.stringify(Object.fromEntries(new URLSearchParams(e).entries()))}),Cf=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(Es),(0,l.map)((0,l.prop)("uri")))(e),i={filter:Te.EQUALS,fieldName:"type",values:n},a=r.isRawFilter?{rawFilter:t}:{filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(qc(),Hc(r.globalFilter))([i,a]),s=(0,l.reject)(E,{filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||Ne.ACTIVE_ONLY,max:r.max||4,options:r.searchByOv?"searchByOv":""});return zl("/entities/_typeAheadSearch",{method:"POST",body:JSON.stringify(s)})},Df=(0,l.pipe)((0,l.reject)(l.isNil),ou),jf=e=>{let{fieldName:t,searchParams:r=[],options:n={}}=e;const{globalFilter:i,activityFilter:a,searchOptions:o,max:s,pageNo:u}=n,c=(0,l.pipe)(qc(),Hc(i))(r),p=Df({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return Sf({query:p,body:d})},Lf=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return jf({fieldName:t,searchParams:i,options:n})};function kf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ff="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Mf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e,{filter:"containsWordStartingWith",fieldName:"attributes",values:[r]}],i=(0,l.reject)(E,{filter:(0,l.pipe)(qc(),Hc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Ff,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null,options:t.searchOptions});return i},xf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=Mf(e,t,r);return zl("/entities/_search",{method:"POST",body:JSON.stringify(n)})},$f=e=>qf(e,{select:"secondaryLabel"}),Vf=(e,t)=>{const{select:r=Ff,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),zl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Gf=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),Zr)),Bf=e=>{const{parentUri:t,attributeTypeUri:r,values:n=[],offset:i,defaultMaxValues:a,tenant:o,apiPath:s,searchQuery:u,filters:c=[],sorting:p,options:d="ovOnly"}=e,y=n.length,f=Gf(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Jn(r),m={attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(qc(),Hc(d.globalFilter))(h);return b&&(m.filter=b),p&&(m.sort=p.field,m.order=p.order),zl(`${s}/api/${o}/${t}/_object`,{method:"POST",body:JSON.stringify(m)})},Wf=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Yf={options:"sendHidden,addRefAttrUriToCrosswalk"},qf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yf;return zl(`/${e}${su(t)}`)},Hf=(e,t)=>qf(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kf(e,t,r[t])}))}return e}({},Yf,{explicitSurvivorshipGroup:t})),Jf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",body:JSON.stringify([e])},n=t("/entities");return zl(n,r)},Kf=e=>zl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Qf=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return zl(`/${e}/_clone${su({executeLCA:!1,valuesToCopy:r})}`,n)},Xf=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return zl(`/entities/_events/_total${ou({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},zf=(e,t)=>zl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",body:t}),Zf=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return zl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",body:JSON.stringify(r)})},eT=e=>qf(e,{select:"updatedTime"}),tT=e=>{let{entityUri:t,offset:r,max:n,filter:i,sort:a,order:o}=e;const s={offset:r,max:n,filter:i,sort:a,order:o};return zl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),ou)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},rT=e=>{const t=new FormData;return t.append("file",e),zl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=Nr(e,fe().text("Can't upload file"));return Promise.reject(t)}))},nT=e=>{let{containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,countResults:s=!1,findPublic:l=!0,includes:u,startsWith:c}=e;return zl(`/personal/findSavedSearches${ou({countResults:s,findPublic:l})}`,{method:"POST",body:JSON.stringify({containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,includes:u,startsWith:c}),headers:{"Content-Type":"application/json"}})},iT=e=>zl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),aT=e=>zl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),oT=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return zl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},sT=e=>{let{uri:t}=e;return zl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},lT=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),oT)(e),uT=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),oT)(e);function cT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pT=["max","offset","filter"],dT=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:dT(e)},t):function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cT(e,t,r[t])}))}return e}({},t,(0,l.pick)(pT,e)))),yT=e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Me.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Me.ALL,e)))return!1},fT=(0,l.omit)(["activeness"]),TT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=yT(t),{searchByOv:i}=r;t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(dT(e),(0,l.omit)(pT))(e))),fT,(0,l.omit)(["labels"])))(t);const a={limitCreditsConsumption:!0,activeness_enabled:n,options:i?"searchByOv":void 0},o=`/${e}/_connections${su(a)}`,s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)};return{url:o,options:s}},ET=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),mT=(0,l.reject)(l.isNil),hT=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),bT=e=>zl(hT(e),{method:"GET",headers:{"Content-Type":"application/json"}}),OT=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,hT);return zl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},vT=e=>{let{startEntityUri:t,endEntityUri:r,relationType:n,attributes:i,startDate:a,endDate:o,uriPreprocessor:s=l.identity}=e;const u={type:n,startObject:{objectURI:t},endObject:{objectURI:r},attributes:i?Ll()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(mT,ae,JSON.stringify);return zl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},gT=e=>{let{oldRelation:t,newRelation:r,uriPreprocessor:n=l.identity}=e;const i=(0,l.prop)("attributes"),a=(0,l.pipe)((0,l.prop)("uri"),(0,l.concat)(l.__,"/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk"),hT,n),o=bb(i(t),i(r),!1).concat(vb(t,r));return zl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},_T=(e,t,r)=>{const{url:n,options:i}=TT(e,t,r);return zl(n,i).then(ET)},AT=(e,t)=>zl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),NT=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===Se.IN?a.inRelations=[n]:a.outRelations=[n],zl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},PT=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return zl(`${t}/recentSearches${su({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},RT=e=>zl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),ST=e=>{let{environment:t,tenant:r,createdDate:n}=e;return zl(`/recentSearches${su({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function wT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){IT(e,t,r[t])}))}return e}function IT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const UT={select:"label,secondaryLabel,name,type,startDate,endDate"},CT=(0,l.reject)(l.isNil),DT=(0,l.pipe)(CT,ou),jT=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i,signal:a}=e;const o=wT({},UT,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return zl(`/${t}/_tree${DT(o)}`,{method:"GET",headers:{"Content-Type":"application/json"},signal:a})},LT=e=>{let{uri:t,graphUri:r}=e;const n=wT({},UT,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return zl(`/${t}/_parents${DT(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},kT=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s,signal:l}=e;const u=wT({},UT,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return zl(`/${t}/_hops${DT(u)}`,{method:"GET",headers:{"Content-Type":"application/json"},signal:l})};function FT(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const MT=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},xT="/activities",$T=e=>{let{label:t,description:r}=e;return zl(xT,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:MT()}})};var VT;!function(e){e.userSearch="USER_SEARCH",e.profileView="USER_PROFILE_VIEW"}(VT||(VT={}));const GT=e=>{const t=su(e);return zl(xT+t,{method:"GET"})},BT=e=>zl(`/activities/_total${su(e)}`,{method:"GET"}),WT=e=>{const{entityUri:t}=e,r=FT(e,["entityUri"]);return zl(`/${t}/_activities${su(r)}`,{method:"GET"})},YT=e=>{const{entityUri:t}=e,r=FT(e,["entityUri"]);return zl(`/${t}/_activities/_total${su(r)}`,{method:"GET"})};function qT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){HT(e,t,r[t])}))}return e}function HT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const JT=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},KT=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return zl(JT({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},QT=e=>{let{workflowPath:t,url:r,tenant:n,method:i,data:a,headers:o}=e,s=r;return r.includes("http:")||r.includes("https:")||(s=JT({url:r,workflowPath:t,tenant:n})),zl(s,{method:i||"GET",body:JSON.stringify(a),headers:qT({"Content-Type":"application/json"},null!=o?o:{})})},XT=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=JT({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return zl(e,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(n)})}));return(0,l.pipe)((e=>e.map((t=>[e[0],t])).slice(1)),(0,l.map)(s(o,r)),(e=>Promise.all(e)),(0,l.andThen)(l.last))(n)},zT=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=JT({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?qT({},l,{comment:o}):l;return zl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},ZT=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=JT({url:`/tasks${s?su(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(qT({objectURIs:[i]},(0,l.reject)(E,a)))};return zl(u,qT({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},eE=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return zl(JT({url:"/tasks",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)({assignee:i,max:a,offset:o})})},tE=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return zl(JT({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(qT({max:a,offset:o},i))})},rE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return zl(JT({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},nE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return zl(JT({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},iE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},aE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return zl(JT({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},oE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},sE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},lE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return nE({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},uE=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a,processInstanceComment:o}=e;return zl(JT({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a,processInstanceComment:o})})},cE=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return zl(JT({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},pE=e=>{let{entityUri:t,max:r,deep:n,sort:i,order:a,activeness:o,filter:s,markMatchedValues:u,sources:c,rules:p}=e;const d={max:r,deep:n,filter:s,markMatchedValues:u,sort:i,order:a,activeness:o,sources:c,rules:p};return zl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),ou)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},dE=e=>{let{entityUri:t,max:r,sort:n,order:i,activeness:a,filter:o}=e;const s={max:r,filter:o,sort:n,order:i,activeness:a};return zl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),ou)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},yE=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return zl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},fE=(e,t,r)=>Promise.all(t.map((async t=>await zl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),TE=async(e,t)=>await fE(e,t,"NOT"),EE=async(e,t)=>await fE(e,t,"MATCH"),mE=async(e,t)=>await Promise.all(t.map((async t=>await zl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function hE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){bE(e,t,r[t])}))}return e}function bE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OE(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const vE=3e4,gE=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return zl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},_E=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return GE({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}})},AE=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return GE({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}})},NE=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return zl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},PE=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{dataTenant:a,uri:o}=n;return Promise.all(i.map((e=>{let{uri:n}=e;return NE({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},RE=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(mp,i);return Promise.all([s.length?yE(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return NE({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},SE=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return r.map((0,l.assoc)("matchRule",t))})),(0,l.reduce)(((e,t)=>{let{matchRule:r}=t,n=OE(t,["matchRule"]);const i=e.findIndex((e=>{let{object:{uri:t}}=e;return n.uri===t}));return-1===i?e.concat({object:n,matchRules:[r]}):(0,l.adjust)(i,(0,l.evolve)({matchRules:(0,l.append)(r)}),e)}),[])),wE=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),SE),IE=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return zl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(wE)},UE=e=>t=>{let{dtssPath:r,dataTenants:n=[],customerTenant:i,entity:a}=t;return Promise.all(n.map((t=>{let{id:n}=t;return e({dtssPath:r,dataTenant:n,customerTenant:i,entity:a}).then((0,l.map)((0,l.assocPath)(["object","dataTenant"],n))).catch((e=>(console.log(e),[])))}))).then(l.flatten)},CE=UE((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return zl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json",SearchMetadata:"AUTO"},body:JSON.stringify([{uri:a,type:o}])}).then(wE)})),DE=UE((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return zl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),jE=(e,t)=>{let{dtssPath:r,dataTenants:n=[],entity:i,customerTenant:a,dtssRequest:o}=e;return function(){if(r&&n&&n.length){const e=o({dtssPath:r,dataTenants:n,entity:i,customerTenant:a});return Promise.all([t(...arguments),e]).then(l.flatten)}return t(...arguments)}},LE=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return zl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},kE=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{dataTenant:o,uri:s}=i;return Promise.all(a.map((t=>{let{uri:i}=t;return LE(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},FE=kE("NOT"),ME=kE("MATCH"),xE=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(mp,a);return Promise.all([fE(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return LE(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},$E=xE("NOT"),VE=xE("MATCH");function GE(e){let{requestProvider:t=zl,url:r,options:n,dataTenant:i,customerTenant:a,dtssPath:o}=e;r=o.endsWith("/")&&r.startsWith("/")?r.slice(1):r;const s=n||{},{headers:l}=s;return t(`${o}${r}`,hE({},OE(s,["headers"]),{headers:hE({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const BE=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;const s=function(e){const t=Mf(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:"");return`/entities${su(t)}`}(t,r,n);return GE({url:s,dataTenant:i,customerTenant:a,dtssPath:o})},WE=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return GE({url:"/entities/_total",dataTenant:i,customerTenant:a,dtssPath:o,options:{method:"POST",body:JSON.stringify(wf(t,r,n))}})},YE=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a,options:o}=e;const{searchByOv:s}=o,{options:u}=TT(t,r);return GE({url:`entities/_connections/_getConnections${su({dataEntityUri:t,options:s?"searchByOv":void 0})}`,options:u,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(ET,(0,l.map)((0,l.evolve)({connections:(0,l.map)((0,l.pipe)((0,l.assocPath)(["entity","dataTenant"],n),(0,l.assocPath)(["relation","dataTenant"],n)))}))))},qE=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return GE({url:`${Wf(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},HE=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return zl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},JE=e=>{let{dtssPath:t,tenant:r}=e;return zl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET",timeout:vE})},KE=e=>{let{dtssPath:t,customerTenant:r}=e;return zl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r},timeout:vE})},QE=e=>{let{dtssPath:t,tenants:r}=e;return zl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET",timeout:vE})},XE=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return GE({url:Wf(t),dataTenant:r,customerTenant:n,dtssPath:i})},zE=()=>zl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function ZE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){em(e,t,r[t])}))}return e}function em(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tm=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=ZE({},n,{ordered:"true",orderBy:"LastName,FirstName",from:0,max:100},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,["select"]));return zl(`${t}/api/${r}/graph/search${su({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},rm=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return zl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:ZE({},n,i),headers:{"Content-Type":"application/json"}})},nm=(e,t)=>`${e}/${t}/comments`,im=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return zl(`${nm(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},am=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return zl(`${nm(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},om=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return zl(nm(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},sm=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return zl(`${nm(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},lm=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return zl(`${nm(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},um=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return zl(`${nm(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},cm=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return zl(`${nm(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},pm=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return zl(`${nm(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},dm=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=su({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return zl(`${nm(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function ym(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fm(e,t,r[t])}))}return e}function fm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Tm=e=>{let{tenant:t,servicesPath:r}=e;return zl(`${r}/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Em="graphExport",mm=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await vm({servicesPath:e,tenant:t,environment:r,namespace:Em,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(ym({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await vm({servicesPath:e,tenant:t,environment:r,namespace:Em,options:ym({method:"PUT"},o)})}catch(e){s=null}return s||(s=await vm({servicesPath:e,tenant:t,environment:r,namespace:Em,options:ym({method:"POST"},o)})),s},hm=e=>{let{servicesPath:t,key:r}=e;return zl(`${t}/settings${su({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},bm=e=>{let{servicesPath:t}=e;return zl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Om=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return zl(`${n}/plugins${su({tenant:t,user:r})}`,{method:"GET"})},vm=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return zl(`${n}/configService${su({tenant:t,environment:r,namespace:a,projection:o})}`,i)},gm=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return vm({tenant:t,environment:r,servicesPath:n,options:{method:"GET"}})},_m=e=>{let{servicesPath:t,stateHash:r}=e;return zl(`${t}/searchLink?key=${r}`,{method:"GET"})},Am=e=>{let{imageServicePath:t,environment:r,tenant:n,image:i}=e;const a=new FormData;return"string"==typeof i?(a.append("sourceUrl",i),a.append("upload","false")):a.append("file",i),zl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Nm=e=>zl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Pm=e=>{let{dcrUri:t,changeItemId:r}=e;return zl(`/${t}/changes/${r}`,{method:"DELETE"})},Rm=e=>{let{exportPath:t,tenant:r,options:n}=e;return zl(`${t}/${r}/activities${su(n)}`,{method:"POST"})};function Sm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wm(e,t,r[t])}))}return e}function wm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Im=e=>{const{entityUri:t}=e;return zl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Um=e=>{let{entityUri:t,crosswalk:r}=e;return zl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},Cm=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return zl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[Sm({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),Sm({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},Dm=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return zl(`/${r}/_${n}${su({contributorURI:t})}`,{method:"POST"})},jm=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return zl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Lm=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return zl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},km=e=>{let{entityUri:t,crosswalkId:r}=e;return zl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function Fm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Mm(e,t,r[t])}))}return e}function Mm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xm=e=>{let{attributes:t=[],metrics:r=[]}=e;const n=r.length,i=t.length*n;return i>10?10:i},$m=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i,searchByOv:a}=e;const o=Fm({},n===Qe.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{}),s=ou(Fm({},n===Qe.ATTRIBUTE_TYPE?{numberOfThreads:xm({attributes:r,metrics:i})||1}:{},a?{options:"searchByOv"}:{}));return zl(`/entityType/${cn(t)}/dataQuality/${n}${s}`,{method:"POST",body:JSON.stringify(o)})},Vm=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return zl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${cn(n)}`,{method:"GET",headers:{env:i}})},Gm=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=Qe.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u,anomaly:c}=e;const p={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u,anomaly:c};return zl(`${t}/${r}/entityType/${cn(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(p)})},Bm=e=>{let{tenant:t,apiPath:r}=e;return zl(`${r}/permissions/${t}`,{method:"GET"})},Wm=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return zl(`/${t}${su({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Ym=e=>{let{attributeUri:t,value:r}=e;return zl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},qm=e=>{let{attributeUri:t,value:r}=e;return zl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},Hm=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return zl(`/${t}${su({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},Jm=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=su({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=Ll()([[{value:a}]]);return zl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Km=e=>{let{entityUri:t,attributeName:r,value:n}=e;return zl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},Qm=e=>{let{entityUri:t,attributeName:r}=e;return zl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function Xm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zm=e=>{let{entityUri:t}=e;return zl(`/${t}/_historicURIs`,{method:"GET"})},Zm=e=>{let{entityUri:t,historicUris:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["entityUri","historicUris"]);return zl(`/${t}/_changesWithTotal${su(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Xm(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},eh=(e,t)=>zl(`/${e}/_previousChange${su({timestamp:t})}`,{method:"GET"}),th=(e,t)=>zl(`/${e}${su({time:t})}`,{method:"GET"});function rh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nh(e,t,r[t])}))}return e}function nh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ih=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a,noRetry:o}=e;const s=r||"GET";let l;return"GET"!==s&&(l=pe(n)?JSON.stringify(n):n),zl(t,{method:s,body:l,headers:rh({"Content-Type":"application/json"},null!=i?i:{}),noRetry:o,noRequestProcessor:a})},ah=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=su({options:a.join(","),severity:o.join(",")});return zl(`${t}/validate/${i}/entity/${vp({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},oh=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return zl(`${t}/validate/${n}/entity${su({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},sh=e=>{let{validationServicePath:t,body:r,tenant:n,options:i=[],severity:a=[]}=e;return zl(`${t}/validate/${n}/relations${su({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},lh=e=>{let{tenant:t,apiPath:r}=e;return zl(`${r}/tenants/${t}/name`,{method:"GET"})},uh=e=>{let{tenant:t,apiPath:r}=e;return zl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},ch=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return zl(`${a}/preferences${su({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},ph=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a,value:o}=e,s={name:t,tenant:r,environment:n,user:i,values:[JSON.stringify(o)]};return zl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},dh=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return zl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},yh=e=>{const{servicesPath:t}=e;return zl(`${t}/getTokenForWorker`,{method:"GET"})},fh=e=>{let{entityType:t,attributeType:r,metrics:n,isTimeseries:i,period:a,dataLevel:o,type:s="text/csv",exportDQPath:l,tenant:u,dataType:c}=e;return zl(`${l}`,{method:"POST",headers:{"Content-Type":"application/json"},body:{entityType:t,attributeType:r,metrics:n,dataLevel:o,type:s,period:a,isTimeseries:i,tenant:u,dataType:c}})};var Th=r(47485);const Eh=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=en(),s={attributes:gl({attributeTypes:n,parentUri:o,metadata:i,mode:a}),uri:o,type:t,timestamp:Date.now()};return r?function(e,t,r){const n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[]).find((e=>!e.lookupCode&&!e.dependentLookupCode&&"String"===e.type));if(n){const i=Ls(r,e,n.uri)[0];return i&&i.value?Sl({entity:e,attributeType:n,uri:i.uri,value:t}):Pl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},mh=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Is),(0,l.filter)(Zr),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),hh=(0,l.curry)(((e,t)=>{const r=mh(e=e||{},t=t||{});return r.concat((0,l.chain)(hh(e),r))})),bh=(0,l.curry)(((e,t)=>(0,l.pipe)(de,(0,l.filter)(e))(t))),Oh=bh((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),vh=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),Zr)),gh=e=>(0,l.pipe)(Oh,vh(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),_h=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Oh,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),Ah=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),Zr),(0,l.omit)(["uri","timestamp"])),Nh=(0,l.pipe)(Ah,Up),Ph=async(e,t,r)=>{if(!e)return null;const n=gh(e);if(n.length>0)for(const r of n)e=_h(r,t[r],e);const i=await Jf(Nh(e),null==r?void 0:r.enhanceUriWithDCR),a=(e=>(0,l.path)([0,"errors"],e))(i);if(a)throw a;if((0,l.has)("changes",i))return null==r||r.updateDCRUriFromResponse(i),((e,t)=>(0,l.pipe)((0,l.prop)("changes"),l.keys,(0,l.find)((e=>!(0,l.values)(t).includes(e))))(e))(i,t);const o=(e=>(0,l.pathOr)(e,[0,"object"],e))(i);return o.uri},Rh=async(e,t,r)=>{const n=wh(e,t),i={};for(const t of n)i[t]=await Ph(e[t],i,r);return i},Sh=(0,l.curry)(((e,t)=>{const r=Th.Node(t);return gh(e[t]).forEach((t=>{const n=Sh(e,t);r.addEdge(n)})),r})),wh=(e,t)=>(0,l.pipe)((0,l.map)(Sh(e)),(0,l.map)(Th.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Ih=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Ah))})),Uh=(e,t)=>[...Pb(e.tags||[],t.tags||[]),...Rb(e.roles||[],t.roles||[]),...Ob(e,t),...vb(e,t)],Ch=(e,t,r)=>[...gb(bb((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),Nb((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e,r),...Uh(e,t)],Dh=(0,l.pipe)(((e,t)=>{const r=(0,l.toPairs)(e);return(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)((e=>r.reduce(((e,t)=>{let[r,n]=t;return _h(r,n,e)}),e))))}),t)}),Ih),jh=(0,l.curry)(((e,t)=>(0,l.when)(Zr,(0,l.propOr)(l.__,t,e),t)));function Lh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kh(e,t,r[t])}))}return e}function kh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fh=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return Lh({},t,{[r]:{parents:n,children:i}})},Mh=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return Lh({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},xh=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t[e],a=mh(t,i),o=Fh({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>xh(n.uri,t,[e],r)),o)},$h=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.reduce(((e,n)=>{const i=(0,l.path)(Bp(),n),a=t?Mh({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(Jp(),n),s=Zr(o)?[o]:[],u=Fh({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>xh(t,r,[i],e)),u)}),n)},Vh=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return $h(r,e,t,xh(e,t))},Gh=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return Vh(t,r,n);if(nn(e)){const t=py(n,e);return t&&$h([t],null,r)}return r[e]?xh(e,r):void 0},Bh=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>Bh(e,t))))},Wh=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>Wh(e,t))))},Yh=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=rn(t),u=Vh(r,n,i),c=((e,t,r)=>{let{entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[];let s;for(let e=0;e<t.length;e++){const u=t[e],c=t[e+1]||r;if(nn(c)){if(s=py(i,c),!s)return null;o.push({type:je.relationConnection,value:s,valueType:Si(a,(0,l.path)(Wp(),s))});continue}if(nn(u)){const e=n[c];if(!e)return null;o.push({type:je.tempEntity,value:e,valueType:bi(a,e.type)});continue}const p=n[u],d=Qs(p,c),y=n[c];if(!d||!y)return null;o.push({type:je.attributeValue,value:d,valueType:ei(a,fn(d.uri,p.type))}),o.push({type:je.tempEntity,value:y,valueType:bi(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},Wh(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=nn(s),d=p?dy(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Si(a,d.type):bi(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:ti(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:je.tempEntity,value:T,valueType:bi(a,T.type)}),o.push({type:je.attributeValue,value:s,valueType:E}),m=s.value;const l=Is(s);T=l&&Zr(l)?n[l]:null}}return o},qh=e=>e.every((e=>{let{type:t}=e;return[je.attributeValue,je.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===je.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null;let Hh;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(Hh||(Hh={}));const Jh={[Hh.insertAttribute]:{color:"#599E0E"},[Hh.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[Hh.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},Kh=e=>{switch(e){case"UPDATE_ATTRIBUTE":return Hh.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return Hh.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return Hh.deleteAttribute;default:return""}},Qh="/",Xh=(0,l.pipe)((0,l.split)(Qh),(0,l.propSatisfies)((0,l.lte)(2),"length")),zh=(0,l.pipe)((0,l.split)(Qh),(0,l.slice)(0,-2),(0,l.join)(Qh)),Zh=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.has)(e),(0,l.prop)(e)],[()=>Xh(e),Zh(zh(e))]])(t))),eb=e=>(0,l.pipe)(l.keys,(0,l.any)((0,l.startsWith)(e+Qh))),tb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Zh(e,t);return(0,l.isNil)(r)?eb(e)(t)?"UPDATE_ATTRIBUTE":"":r},rb=function(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==n||null===(r=n[e])||void 0===r?void 0:r[t]},nb=e=>{let t=[];var r;return e&&(t.push({uri:e.uri,crosswalks:e.crosswalks,merges:e.merges}),null===(r=e.merges)||void 0===r||r.forEach((e=>{e.losers.forEach((e=>{t=t.concat(nb(e))}))}))),t},ib=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(lb,t),(0,l.propOr)([],"crosswalks",e))),e),ab=(e,t)=>{let r=e.crosswalks||[];var n;return t||null===(n=e.merges)||void 0===n||n.forEach((e=>{var t;null===(t=e.losers)||void 0===t||t.forEach((e=>{r=r.concat(ab(e))}))})),r},ob=e=>{let t=0;var r;return e?(null===(r=e.merges)||void 0===r||r.forEach((e=>{var r;null===(r=e.losers)||void 0===r||r.forEach((e=>{const r=ob(e);r>t&&(t=r)}))})),t+1):t},sb=(e,t)=>{if(Zr(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},lb=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},ub=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},cb=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},pb=(e,t)=>{const r=t.reduce(((e,t)=>(e["configuration/sources/"+t.name]=t,e)),{}),n=t.reduce(((e,t)=>(e[t.id]=t,e)),{});return(0,l.pipe)((0,l.map)((e=>{var t,i;if(r[e.type])return r[e.type];const a=null===(t=e.crosswalkExternalInfo)||void 0===t||null===(i=t.dtssInfo)||void 0===i?void 0:i.tenantId;return a&&n[a]?n[a]:void 0})),(0,l.reject)(l.isNil),l.uniq,(0,l.ifElse)((e=>{let{length:t}=e;return 1===t}),l.head,(()=>{})))(e)},db=(0,l.eqBy)(lb),yb=(0,l.pipe)((0,l.propOr)({},"attributes"),l.values,l.flatten,(0,l.filter)((0,l.has)("refRelation")),(0,l.chain)((e=>(0,l.pipe)(As,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e))));function fb(e){return e&&void 0!==e.uri}let Tb;function Eb(e){return function(t,r){const n=[];return a=r,!(i=t)&&!a||!(!i||!a)&&i.length===a.length&&i.every((function(e,t){return e===a[t]}))||n.push({type:e,newValue:r}),n;var i,a}}function mb(e){return void 0!==e.refEntity}function hb(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function bb(e,t,r){const n=[];for(const a in e)if(e.hasOwnProperty(a)){if("paging"===a)continue;const p=e[a];if(void 0===t[a])for(const e in p)p.hasOwnProperty(e)&&n.push(...o(p[e]));else for(const e in p)if(p.hasOwnProperty(e)){const f=p[e],T=y(f,t[a]);void 0===T?n.push(...o(f)):f.value===T.value||f.lookupCode&&f.lookupCode===T.lookupCode?f.ignored!==T.ignored&&n.push(...s(T)):null==T.value||""===T.value?n.push(...o(f)):"Nested"===d(f)?f.ignored!==T.ignored&&(0,l.equals)(f.value,T.value)?n.push(...s(T)):n.push(...bb(f.value,T.value,r)):"Reference"===d(f)?hb(f,T)?n.push(...bb(f.value,T.value,r)):(n.push(...o(f)),n.push(c([T]))):""!==T.value&&(!1===T.ov?n.push(...u(T)):n.push(...(i=T,[{type:Tb.UPDATE_ATTRIBUTE,uri:i.uri,newValue:{value:i.lookupCode||i.value}}])))}}var i;for(const r in t)if(t.hasOwnProperty(r)){if("paging"===r)continue;let i=(t[r]||[]).filter((function(t){return void 0===y(t,e[r])}));i=a((0,l.clone)(i)),i.length&&n.push(c(i))}return n;function a(e){return e?e.map((function(e){let t;if(e){const r=e.value;return null!=r&&(pe(r)?Object.keys(r).forEach((function(e){const n=a(r[e]);n.length>0?r[e]=n:delete r[e],t||(t=0!==n.length)})):t=null!=r&&""!==r),t||e.lookupCode||e.refEntity?e:null}})).filter((function(e){return null!=e})):[]}function o(e){return[{type:Tb.DELETE_ATTRIBUTE,uri:e.uri}]}function s(e){return e&&(e.ignored?function(e){return[{type:Tb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:Tb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!1}}]}(e))}function u(e){const t=e.uri.lastIndexOf("/"),r=e.uri.substr(0,t);return[{type:Tb._UPDATE_NON_OV_ATTRIBUTE,uri:e.uri,typeUri:r,value:e.lookupCode||e.value}]}function c(e){let t=e[0].uri;const n=t.lastIndexOf("/");return t=t.substr(0,n),{type:Tb.INSERT_ATTRIBUTE,uri:t,newValue:e.map((function(e){let t;const n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),p(n.value),mb(e)&&(e.refEntity&&(t=e.refEntity,Array.isArray(t)&&(t=t[0]),n.refEntity=t),e.refRelation&&(t=e.refRelation,Array.isArray(t)&&(t=t[0]),r||delete t.objectURI,n.refRelation=t)),n}))}}function p(e){if(null!==e&&"[object Object]"===e.toString())for(const t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,p(e.value)}))}function d(e){const t=e.value;if(pe(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function y(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function Ob(e,t){const r=[];var n,i;return e.defaultProfilePic!==t.defaultProfilePic?r.push({type:Tb.UPDATE_PROFILE_PIC_BY_URI,newValue:{value:t.defaultProfilePic}}):(n=e.defaultProfilePicValue)===(i=t.defaultProfilePicValue)||fb(n)&&fb(i)&&n.uri===i.uri||r.push({type:Tb.UPDATE_PROFILE_PIC_BY_URL,newValue:{value:t.defaultProfilePicValue}}),r}function vb(e,t){const r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:Tb.UPDATE_START_DATE,newValue:{value:n}});const i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:Tb.UPDATE_END_DATE,newValue:{value:i}}),r;function a(e,t){let r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function gb(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i="configuration/sources/Reltio",a="configuration/sources/ReltioCleanser";function o(e,t){return e.crosswalk={type:t.type,value:t.value},e}function s(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}function l(e){return e.removeIt=!0}const u=e.map((function(e){if(e.crosswalk)return[e];const s=_b(t,e.uri),l=s.filter((function(e){return e.type===i})),u=s.filter((function(e){return e.type!==i}));let c=[];switch(e.type){case Tb.INSERT_ATTRIBUTE:c.push(e);break;case Tb._UPDATE_NON_OV_ATTRIBUTE:c=c.concat(s.map((function(t){return o(e,t)})));break;case Tb.DELETE_ATTRIBUTE:(u.length||0==l.length)&&c.push({type:Tb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!0}}),c=c.concat(l.map((function(t){return o({type:Tb.DELETE_ATTRIBUTE,uri:e.uri},t)})));break;case Tb.UPDATE_ATTRIBUTE:{const s=u.some((e=>{let{type:t}=e;return t===a}))&&r?Ab(r,t,e.uri):null;if(s||l.length){if(l.length)c=c.concat(l.map((function(t){return o({type:Tb.UPDATE_ATTRIBUTE,uri:e.uri,newValue:e.newValue},t)})));else if(s){const r=_b(t,s.uri).filter((e=>{let{type:t}=e;return t===i}));c=c.concat(r.map((t=>o({type:Tb.UPDATE_ATTRIBUTE,uri:s.uri,newValue:e.newValue},t))))}}else c.push({type:Tb.INSERT_ATTRIBUTE,uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0});u.length&&n&&c.push({type:Tb.IGNORE_ATTRIBUTE,uri:e.uri,newValue:{value:!0}});break}}return c}));let c=u.flat();const p=s(c,"typeUri");for(const e in p){if("undefined"===e)continue;const t=p[e],r=c.filter((function(e){return e.type!==Tb._UPDATE_NON_OV_ATTRIBUTE})).filter((function(t){return t.uri.substr(0,t.uri.lastIndexOf("/"))===e||"INSERT_ATTRIBUTE"===t.type&&t.uri===e})),n=t.find((function(e){const{crosswalk:t}=e;return t&&t.type===i}));!r.find((function(e){return"UPDATE_ATTRIBUTE"===e.type}))&&n&&(c.push({type:Tb.UPDATE_ATTRIBUTE,uri:n.uri,newValue:{value:n.value},crosswalk:n.crosswalk}),r.forEach(l)),t.forEach(l)}return c=c.filter((function(e){return!e.removeIt})),c.forEach((function(e){delete e.insteadOfUpdate})),c}!function(e){e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_TAGS="UPDATE_TAGS",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e._UPDATE_NON_OV_ATTRIBUTE="_UPDATE_NON_OV_ATTRIBUTE"}(Tb||(Tb={}));const _b=(e,t)=>e.filter((function(e){return 1===(e.attributes||e.attributeURIs||[]).filter((function(e){return e===t})).length})),Ab=(e,t,r)=>(0,l.pipe)(Xs,(0,l.defaultTo)([]),(0,l.reject)((0,l.propEq)("uri",r)),(0,l.ifElse)((0,l.allPass)([e=>1===e.length,e=>{let[r]=e;return sb(t,r)},e=>{let[t]=e;return!Os(t)}]),(0,l.prop)(0),(0,l.always)(null)))(e,r);function Nb(e,t){t=t||[];for(const r in e)if(e.hasOwnProperty(r)){const n=e[r];for(let e=0;e<n.length;e++){const r=n[e];if(mb(r)&&r.refRelation){const e=r.refRelation[0]||r.refRelation;if(e.crosswalks){const r=e.crosswalks.filter((function(e){return e.attributes||e.attributeURIs}));for(let e=0;e<r.length;e++){let n=!0;for(let i=0;i<t.length;i++)if(t[i].type===r[e].type&&t[i].value===r[e].value){t[i].attributes=t[i].attributes||t[i].attributeURIs,t[i].attributes=t[i].attributes.concat(r[e].attributes||r[e].attributeURIs),t[i].attributes=Object.keys(t[i].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[i].attributeURIs,n=!1;break}n&&t.push(r[e])}}}}}return t}function Pb(e,t){return Eb(Tb.UPDATE_TAGS).call(this,e,t)}function Rb(e,t){return Eb(Tb.UPDATE_ROLES).call(this,e,t)}function Sb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){wb(e,t,r[t])}))}return e}function wb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ib=()=>{const e=(t,r)=>{if(t&&r)if(Array.isArray(t))for(let n=0;n<t.length;n++)r(n,t[n]),e(t[n],r);else if(pe(t))for(const n in t)r(n,t[n]),e(t[n],r)},t=(e,t,r)=>n=>{const i=-1!==n.uri.lastIndexOf("/")?n.uri.substring(0,n.uri.lastIndexOf("/")):"";e[i]||(e[i]=[]),e[i].push(n.type),t[n.uri]=n.type,"IGNORE_ATTRIBUTE"===n.type&&r.push(n.uri)},r=function(e,t,r){const n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf(Tb.IGNORE_ATTRIBUTE)&&-1!==e[t].indexOf(Tb.INSERT_ATTRIBUTE)}));return Object.keys(t).filter((function(e){const t=-1!==e.lastIndexOf("/")?e.substring(0,e.lastIndexOf("/")):null;return-1!==i.indexOf(t)})).forEach((function(e){-1!==r.indexOf(e)&&n.push(e),t[e]=Tb.UPDATE_ATTRIBUTE})),{appearance:t,ignored:n}},n=function(e,t){if(Array.isArray(t)){let r=[];const i=e||[];return i.some((function(e){return e.uri}))?r=((e,t)=>{const r=e.map((e=>e.uri)),i=e.map((e=>{const r=(a=t.find((function(t){return t.uri===e.uri}))||{},(i=e)&&a&&i.ignored!==a.ignored&&(delete i.ignored,delete a.ignored,i.ov=!0,a.ov=!0),{a:i,b:a});var i,a;return n(r.a,r.b)})),a=t.filter((e=>!r.includes(e.uri)));return i.concat(a)})(i,t):(r=r.concat(i),t.forEach((function(t,a){void 0===r[a]?r[a]=t:pe(t)?r[a]=n(e[a],t):-1===i.indexOf(t)&&r.push(t)}))),r}{const r={};return pe(e)&&Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(i){pe(t[i])&&e[i]?r[i]=n(e[i],t[i]):r[i]=t[i]})),r}},i=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=JSON.parse(JSON.stringify(i)),s=JSON.parse(JSON.stringify(a)),l=n(i,a),u={},c={},p=[],d=t(c,u,p);bb(l,s).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value?Sb({},e,{type:"UNDO_IGNORE_ATTRIBUTE"}):e})).forEach((function(e){d(e)})),bb(l,o).map((function(e){return"DELETE_ATTRIBUTE"===e.type?Sb({},e,{type:"INSERT_ATTRIBUTE"}):"IGNORE_ATTRIBUTE"===e.type?Sb({},e,{type:e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"}):e})).forEach((function(e){d(e)}));const y=r(c,u,p);return e(l,(function(e,t){t&&-1!==y.ignored.indexOf(t.uri)&&(t.ignored=!0,delete t.ov)})),{attributes:l,appearance:y.appearance}},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=(0,l.difference)(t,e),n=(0,l.difference)(e,t),i=n.concat(t),a=(e,t)=>(0,l.pipe)((0,l.map)((t=>[t,e])),l.fromPairs)(t),o=Sb({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:i,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?i(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[o,s]=a(e?e.roles:[],t.roles),[l,u]=a(e?e.tags:[],t.tags);return{attributes:r,appearance:Sb({},n,{roles:s,tags:u}),roles:o,tags:l}}}},Ub=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?Ub(t.value):[]];return e.concat(r)}),[])),Cb=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,Db=e=>e?[Op(e)]:[],jb=e=>{const t=[...Ub((null==e?void 0:e.attributes)||[]),...Ub((null==e?void 0:e.analyticsAttributes)||[])];return e?[...Db(e),...t]:[]},Lb=(e,t)=>[e,...t.map((t=>Cb(e,t)))],kb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return Dd(t)}))},Fb=(e,t)=>{switch(e){case Le.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case Le.ENTITY_ATTRIBUTE:case Le.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[Tn(t)]})(t);case Le.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case Le.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,Op({uri:n,dataTenant:i}),r]})(t)}},Mb=e=>(0,l.pipe)(l.values,(0,l.map)((0,l.map)((0,l.pipe)((0,l.prop)("replies"),l.inc))),(0,l.map)(l.sum),l.sum)(e),xb=(0,l.curry)(((e,t)=>{const r=Mo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(xb(e,r.extendsTypeURI)):n})),$b=(0,l.curry)(((e,t)=>(0,l.reduce)(((t,r)=>(0,l.assoc)(r,((e,t)=>(0,l.path)(["members",t],e))(e,r),t)),{},t))),Vb=(e,t)=>(0,l.pipe)((0,l.prop)("type"),xb(e),$b(t))(t),Gb=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};var Bb,Wb=r(29504);function Yb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.PotentialMatches="potentialMatches",e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(Bb||(Bb={}));const qb={},Hb={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},potentialMatches:{colors:["#fec92f","#ee4272","#6d9a35","#555962","#2d9ecf"]},random1:{colors:["#fccde5","#ff9acc","#81b2d3","#f8b6b8","#bd81be","#82c55c","#c4e3f1","#7f939e","#ffee91","#fec92f","#ee4272","#2d9ecf","#c4c0e1","#7accca","#cdc393","#f69785","#f0ecc7","#9fd6bf","#6d9a35","#afbc26","#12959f","#aacf99","#056b97","#eab710","#b4d36a","#70bede","#f57f27","#7a843b","#cfd0d2","#555962","#b71137","#ffdc0e","#bea68c","#5f3566"]},spectreYellowCyan:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#7accca","#12959f"]},spectreBlueBrown:{granularity:3,colors:["#c4e3f1","#70bede","#81b2d3","#2d9ecf","#056b97","#aacf99","#b4de6a","#82c55c","#6d9a35","#afbc26","#7a843b","#cfd0d2","#7f939e","#555962","#f0ecc7","#cfc393","#bea68c"]},charts:{colors:["#0072ce","#c4ce00","#ce5c00","#4bafff","#f97061","#9e7ed3","#c34980","#c4ce00","#669977","#ffe16f","#4896df","#40cfbb","#9bc66a","#ce5c00","#4bafff","#f085f2","#bea68c"]},crosswalks:{colors:["#86f2f9","#cae815","#f8a4a4","#fd63c0","#b6c5ec","#8fe98e","#ff9c72","#84cbf3","#a8f384","#d9ffa8","#ace1ff"]}},Jb=e=>{if(!qb[e]){const t=Hb[e]||Hb.random0;qb[e]=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yb(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return qb[e]},Kb=(0,l.curry)(((e,t)=>{const r=Jb(e);return r.idToColor[t]||(r.idToColor[t]=(e=>{const t=e.counter,r=e.granularity||1;return e.counter+=r,e.counter>=e.colors.length&&(++e.granularityCounter>=r&&(e.granularityCounter=0),e.counter=e.granularityCounter),e.colors[t]})(r)),r.idToColor[t]})),Qb=e=>Kb(Bb.Charts,e),Xb=()=>Jb(Bb.PotentialMatches).colors,zb=e=>Kb(Bb.Random1,e),Zb=e=>(0,Wb.getColor)(e)?"#FFFFFF":"#212121";var eO=r(73116);const tO=Array.from({length:100},((e,t)=>t/100)),rO=e=>{const t=Number(e.replace(/\D/g,""))||0;let r=3735928559^t,n=1103547991^t;for(let t,i=0;i<e.length;i++)t=e.charCodeAt(i),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},nO={},iO=new eO.Z({hash:rO,saturation:tO.slice(15,71),lightness:tO.slice(50,90)}),aO=new eO.Z({hash:rO,saturation:tO.slice(46,89),lightness:tO.slice(44,58)}),oO=(0,l.curry)(((e,t,r)=>{t in nO||(nO[t]={});const n=nO[t];r in n||(n[r]=((e,t)=>{const r=String(rO(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),sO=oO(iO,"crosswalks"),lO=oO(iO,"sources"),uO=oO(iO,"contributors"),cO=oO(iO,"dataValidationFunctions"),pO=oO(aO,"entities");function dO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yO(e,t,r[t])}))}return e}function yO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fO=(0,l.has)("items"),TO=e=>0===e,EO=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.min(Math.max(e,t),r)},mO=e=>e.reduce(((e,t)=>e+t.width),0),hO=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),bO=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),OO=e=>e.reduce(((e,t)=>e+t.height),0),vO=e=>(0,l.is)(String,e)&&e.includes("%"),gO=(0,l.has)("spacer"),_O=(e,t)=>Math.max(Math.round(parseFloat(t)/100*e),1),AO=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(fO(t)?AO(t):t)),[]),NO=(e,t)=>{const r=[...t];for(;(0,l.sum)(r)>e;){const e=Math.max(...r);if(1===e)break;const t=r.indexOf(e);r[t]--}return r},PO=e=>({id:e.layout}),RO=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:PO;const i=(e,t,r,n)=>{let{width:i}=e;const a=t.items.some((e=>e.flex));let o;if(a){const[e,n]=(0,l.partition)((0,l.propIs)(Number,"flex"),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("flex"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/(a+n.length))),u=Math.max(s/Math.max((0,l.length)(n),1),1),c=(e,t,r)=>Math.max(Math.round(t/r*e),1);o=r.flex?c(i,r.flex,a+n.length):u}else{const[e,n]=(0,l.partition)((0,l.both)((0,l.propIs)(String,"width"),(0,l.pipe)((0,l.propOr)("","width"),(0,l.includes)("%"))),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("width"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/100)),u=Math.max(s/Math.max((0,l.length)(n),1),1);o=vO(r.width)?_O(i,r.width):u}return EO(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return EO(n,t,r)},o=(e,t)=>fO(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.map((a=>i(t,r,a,fO(a)?n(a.layout):e(a.view)))),s=NO(t.width,o),u=r.items.reduce(((r,n,i)=>{const o=s[i],u=TO(i)?t.x:(0,l.last)(r).x+(0,l.propOr)(o,"width",(0,l.last)(r));if(fO(n))return r.concat(p(dO({},t,{x:u,width:o}),n));{const i=e(n.view);return r.push(dO({y:t.y,x:u,height:a(i),width:o},i)),r}}),[]);return{x:t.x,y:t.y,width:mO(u),height:hO(u),items:u}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=fO(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=TO(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(fO(i))return r.concat(p(dO({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(dO({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?EO(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?EO(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:bO(i),height:OO(i),items:i}},c=(t,r)=>{const n=(e,t,r,n)=>TO(r)?e.y:(0,l.last)(t).y+((0,l.last)(t).height||n),i=(t,r,i,o)=>{const s=e(i),l=t.width,u=a(s),c=n(t,r,o,u);return dO({},s,{x:t.x,y:c,width:l,height:u})},o=(e,t)=>{const r=t.reduce(((t,r,a)=>{if("string"==typeof r)t.push(i(e,t,r,a));else if("object"==typeof r){const o=Math.max(Math.round(e.width/2),1),s=NO(e.width,[o,o]),u=dO({},e,{width:s[0]}),c=dO({},e,{x:e.x+s[0],width:s[1]}),p=(0,l.has)("left",r)&&i(u,t,r.left,a),d=(0,l.has)("right",r)&&i(c,t,r.right,a),y=(0,l.propOr)(0,"height"),f=Math.max(y(p),y(d));t.push(dO({},e,{y:n(e,t,a,f),height:f,items:(0,l.filter)(l.identity,[p,d])}))}return t}),[]);return dO({},e,{height:OO(r),items:r})},s=o(t,(0,l.propOr)([],"top",r)),u=Math.round(.66*t.width),c=(0,l.isEmpty)(s)?t.y:t.y+s.height,p=o(dO({},t,{y:c,width:u}),(0,l.propOr)([],"center",r)),d=o({x:t.x+u,y:c,width:t.width-u},(0,l.propOr)([],"right",r)),y=s.height+Math.max(p.height,d.height),f=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return dO({},t,{height:y,items:(0,l.reject)(f,[s,p,d])})},p=(e,t)=>{const r=dO({},t,{items:(0,l.reject)(gO,t.items)});switch(r.layout){case"scroll":return o(e,r);case"hbox":return s(e,r);case"vbox":return u(e,r);default:return null}},d=(0,l.propEq)("layout","profile",t),y={x:0,y:0,width:r.columns},f=d?c(y,t):p(y,t);return AO(f)},SO=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),wO=[tt.FilteredEntitiesViewFacet,tt.ActivitiesViewFacet,tt.ProfileStatsFacet,tt.FilteredSavedSearchesFacet],IO=(e,t)=>e.map((e=>{let{height:r=0,minHeight:n=0}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["height","minHeight"]);const a=t.find((e=>e.id===i.id)),o=wO.includes(a.component)?8:4;return dO({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function UO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){CO(e,t,r[t])}))}return e}function CO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const DO={BarChart:et.BAR,BarChartGrouped:et.BAR,BarChartHorizontal:et.BAR,LineChart:et.LINE,Map:et.MAP,Pie:et.PIE},jO=(e,t)=>En(e)?dn(e,t):e,LO=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=DO[r];return UO({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},kO=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return UO({findPublic:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,["findShared"]))},FO=(e,t,r)=>{const n=(e=>e&&ae(e).map((e=>{const{type:t,value:r}=e;return UO({},e,{value:[he.IN,he.NOT_IN,Te.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:be(t),fieldName:r,values:n?ae(n):void 0}})))(e);return t&&En(t)||!r?n:(n||[]).concat((i=r,{filter:Te.EQUALS,fieldName:"type",values:[i]}));var i},MO=["https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/world.countries.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/usa_prefix_latlng.topo.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/us-10m.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/zips-us-topo.json"],xO={"com.reltio.plugins.dashboard.BarChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:jO(n,r),filters:FO(a,n,r),chartType:et.BAR,component:tt.DashboardFacet,title:i}},"com.reltio.plugins.dashboard.BubbleChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:jO(n,r),filters:FO(a,n,r),chartType:et.BUBBLE,component:tt.DashboardFacet,title:i}},"com.reltio.plugins.ui.CustomActionView":e=>{let{id:t,caption:r,canRead:n,url:i}=e;return{id:t,url:i,canRead:n,title:r,component:tt.CustomActionViewFacet}},"com.reltio.plugins.dashboard.FacetChartView":e=>{let{id:t,firstDimension:r,useEntityType:n,caption:i,filter:a,count:o,orderType:s,options:l,canRead:u}=e;const c=ae(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return UO({id:t,count:o,canRead:u,orderType:s,attributeUri:jO(r,p),filters:FO(a,r,p),component:tt.DashboardFacet,title:i,showOthers:!0},LO(l))},"com.reltio.plugins.dashboard.MapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,mapType:l,canRead:u}=e;return{id:t,count:o,canRead:u,orderType:s,attributeUri:jO(n,r),filters:FO(a,n,r),chartType:et.MAP,component:tt.DashboardFacet,title:i,geoUrl:MO[l||0],projection:"geoMercator"}},"com.reltio.plugins.dashboard.SimpleMapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,map:s,canRead:l,options:u}=e;return UO({id:t,count:o,canRead:l,attributeUri:jO(n,r),filters:FO(a,n,r),component:tt.DashboardFacet,title:i,geoUrl:s,chartType:et.MAP,projection:"geoMercator"},LO(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:tt.ProfileStatsFacet,title:n}},"com.reltio.plugins.dashboard.FilteredSavedSearchesView":e=>{let{id:t,caption:r,max:n,options:i,canRead:a}=e;return{id:t,canRead:a,options:kO(i),component:tt.FilteredSavedSearchesFacet,title:r,max:n}},"com.reltio.plugins.dashboard.FilteredEntitiesView":e=>{let{id:t,caption:r,filter:n,max:i,entity:a,canRead:o}=e;return{id:t,canRead:o,filters:FO(n,null,a),component:tt.FilteredEntitiesViewFacet,title:r,max:i}},"com.reltio.plugins.dashboard.MatchedEntitiesView":e=>{let{id:t,caption:r,max:n,canRead:i}=e;return{id:t,canRead:i,filters:[{filter:Te.GTE,fieldName:"matches",values:["1"]}],component:tt.FilteredEntitiesViewFacet,title:r,max:n}},"com.reltio.plugins.dashboard.EntitiesByTypeView":e=>{let{id:t,caption:r,orderType:n="reversedCount",inheritChildren:i,hideEmpty:a,canRead:o}=e;return{id:t,canRead:o,component:tt.EntitiesByTypeViewFacet,orderType:n,inheritChildren:i,hideEmpty:a,title:r}},"com.reltio.plugins.dashboard.EntitiesByTagView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:et.CLOUD,component:tt.DashboardFacet,attributeUri:"tags"}},"com.reltio.plugins.dashboard.EntitiesByRoleView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:et.TREE,component:tt.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:tt.NotificationInboxFacet,title:n||fe().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:tt.ActivitiesViewFacet,title:n||fe().text("Activity log")}}},$O=e=>({id:e,height:10}),VO=(0,l.pipe)((0,l.map)((e=>{const t=xO[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),GO=e=>{if("0.1"===e.version){const t=VO(e.views),r=RO($O,e.layout,{columns:4});return{id:e.id,margin:0,layout:SO(r,t),views:t}}return e},BO=e=>(0,l.cond)([[(0,l.propEq)("layout","profile"),(0,l.pipe)((0,l.pick)(["center","right","top"]),l.values,l.flatten,(0,l.map)((0,l.when)((0,l.is)(Object),l.values)),l.flatten)],[(0,l.has)("view"),(0,l.pipe)((0,l.prop)("view"),ae)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>BO(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function WO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){YO(e,t,r[t])}))}return e}function YO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qO=WO({},rt,{OldMap:"com.reltio.plugins.entity.EntityMapView",OldTree:"com.reltio.plugins.entity.TreeView"}),HO=e=>e,JO={[qO.Attributes]:HO,[qO.HierarchyTree]:HO,[qO.HierarchyPaths]:HO,[qO.RelationsTable]:HO,[qO.Relations]:e=>WO({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[qO.SingleAttribute]:HO,[qO.Custom]:HO,[qO.AttributeTable]:HO,[qO.Map]:HO,[qO.OldTree]:e=>WO({},e,{class:rt.HierarchyTree}),[qO.OldMap]:e=>WO({},e,{class:rt.Map}),[qO.ImageAttribute]:HO,[qO.PotentialMatches]:HO},KO=(0,l.pipe)((0,l.map)((e=>{const t=JO[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),QO=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===rt.Map?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),XO=(e,t)=>(t||[]).map((t=>WO({},t,QO(e,t.id)))),zO=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return WO({},t,{layout:XO(t.views,e.newLayout)});if("0.1"===e.version){const r=KO(e.views),n=RO(QO(r),e.layout,{columns:3});return WO({},t,{layout:SO(n,r),views:r})}return e},ZO=(e,t)=>e.class===t||e["react-class"]===t,ev=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(ZO(t,rt.Attributes))if(t.includeUris)e.includeUris.push(...t.includeUris);else{const r=t.excludeUris||[];e.excludeUris=e.excludeUris?(0,l.intersection)(e.excludeUris,r):r}return(ZO(t,rt.SingleAttribute)||ZO(t,rt.AttributeTable))&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const i=(n[0]||e).uri;return r&&!r.some(ln(i))||t.some(ln(i))}},tv=(e,t)=>e.filter((e=>t.some((t=>ZO(e,t))))).map((e=>{let{id:t}=e;return t})),rv=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},nv=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),iv=e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e),av=e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.configuration.Authoring"))),(0,l.reject)(l.isNil),l.head)(e);function ov(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){sv(e,t,r[t])}))}return e}function sv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lv=(0,l.curry)(((e,t)=>BO(t).map((t=>(0,l.pipe)((0,l.map)((e=>rv(e,t))),(0,l.reject)(l.isNil),l.head)(e))).filter(l.identity))),uv=(0,l.either)((0,l.propEq)("label","D&B Connector"),(0,l.propEq)("label","D&B Connector")),cv=(0,l.propEq)("class",rt.Custom),pv=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},dv=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];let i;const a=(0,l.pipe)(av,(0,l.path)(["entityTypes",n]))(e);if("2.0"===r&&t.newLayout){const{newLayout:r}=t,o=XO(t.views,r);return i=(0,l.when)((0,l.pipe)(l.head,(0,l.is)(String)),(0,l.pipe)((0,l.map)((t=>(0,l.pipe)((0,l.map)((e=>rv(e,t))),(0,l.reject)(l.isNil),l.head)(e))),(0,l.reject)(l.isNil),(e=>[{id:"common",views:e}])))(t.sidePanelViews),(0,l.pipe)((0,l.pick)(["views","profileBand","workflow","frozen"]),(0,l.mergeRight)({entityType:n,layout:o,sidePanelViews:i}),(0,l.assoc)("authoring",a),(0,l.reject)(l.isNil))(t)}const o=lv(e,t.layout);i=((e,t)=>{if(t.side){var r;const n=(0,l.pipe)((0,l.chain)((e=>rv(e,t.side))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("layout"))(e),[i,a]=(0,l.partition)(uv,null!==(r=null==n?void 0:n.items)&&void 0!==r?r:[]),o=(0,l.pipe)(lv(e),(0,l.filter)(cv))(ov({},n,{items:i})),s=[{id:"common",views:lv(e,ov({},n,{items:a}))}];return o.length>0&&s.push({id:"D&B",views:o}),s}})(e,t);const s=(e=>(0,l.pipe)((0,l.chain)((e=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.entity.side.WorkflowsView"===e.class))})(e))),l.head,(0,l.unless)(l.isNil,(0,l.pick)(["showClosedTasks","assignee","processTypes"])))(e))(e),u=zO(ov({},t,{views:o,version:"0.1"})),c=(0,l.pipe)(iv,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:u.views,layout:u.layout,sidePanelViews:i,profileBand:c,workflow:s,authoring:a})},yv=(e,t)=>{if("scroll"===t.layout.layout){const r=lv(e,t.layout),n=GO(ov({},t,{views:r,version:"0.1"}));return{class:at.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:at.Dashboard,views:t.views,layout:t.layout,id:t.id}},fv=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel,showTimeSeries:r.showTimeSeries,showOVSwitcher:r.showOVSwitcher,showErrorBands:r.showErrorBands,showExportButton:r.showExportButton}},Tv=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Ev=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},mv=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},hv=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},bv=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions}},Ov=(e,t)=>{const r=lv(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=nv(e,"com.reltio.plugins.search.toolbar.component").filter((e=>"com.reltio.plugins.ui.CustomActionButtonView"===e.class&&e.processType));return null==t?void 0:t.processType})(e)};return{class:at.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"],tabs:r.tabs}},vv=(e,t)=>({class:at.Graph,id:t.id}),gv=(e,t)=>{const r=lv(e,t.layout)[0];return{class:at.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},_v=e=>t=>!!(0,l.intersection)(e,t).length,Av=(0,l.cond)([[_v(["com.reltio.plugins.dashboard.BarChartView","com.reltio.plugins.dashboard.BubbleChartView","com.reltio.plugins.ui.CustomActionView","com.reltio.plugins.dashboard.FacetChartView","com.reltio.plugins.dashboard.MapView","com.reltio.plugins.dashboard.SimpleMapView","com.reltio.plugins.dashboard.ProfileStatsView","com.reltio.plugins.dashboard.FilteredSavedSearchesView","com.reltio.plugins.dashboard.FilteredEntitiesView","com.reltio.plugins.dashboard.EntitiesByTypeView","com.reltio.plugins.dashboard.EntitiesByTagView","com.reltio.plugins.dashboard.EntitiesByRoleView","com.reltio.plugins.inbox.NotificationInboxView","com.reltio.plugins.activities.ActivitiesView","com.reltio.plugins.react.ReactDashboardView"]),()=>yv],[_v(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>fv],[_v(["com.reltio.plugins.graph.GraphView"]),()=>vv],[_v(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>Tv],[_v(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Ev],[_v(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>mv],[_v(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>hv],[_v(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>bv],[_v(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>Ov],[_v(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>gv],[l.T,()=>(0,l.always)(void 0)]]),Nv=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(pv),(0,l.map)((t=>dv(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand","workflow","frozen","authoring"])))(e);return{class:at.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:ot.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:ot.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n||"com.reltio.plugins.newDashboard.NewDashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>rv(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",at.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>rv(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;if(i.entityPerspectiveId)return((e,t,r)=>{const n=dv(e,r),i=(0,l.pipe)((0,l.propOr)([],"entity-types"),(0,l.map)((e=>[e,n])),l.fromPairs)(t);return{class:at.NestedProfile,id:t.id,entityTypes:i}})(t,e,i);const a=BO(i.layout),o=(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>a.includes(e.id)))})),(0,l.pluck)("class"),(0,l.reject)(l.isNil))(t);return Av(o)(t,i)};function Pv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Rv(e,t,r[t])}))}return e}function Rv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Sv=e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&"com.reltio.plugins.ui.first_level_action"===e.type&&!e.parent))},wv="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var Iv;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(Iv||(Iv={}));const Uv={[at.DQDashboard]:`${wv}DqDashboard.svg`,[at.Dashboard]:`${wv}Dashboard.svg`,[at.Graph]:`${wv}Graph.svg`,[at.RelationshipSearch]:`${wv}GraphSearch.svg`,[at.Interactions]:`${wv}Interactions.svg`,[at.PotentialMatches]:`${wv}PotentialMatches.svg`,[at.Profile]:`${wv}Profile.svg`,[at.NestedProfile]:`${wv}Profile.svg`,[at.ProfileActivityLog]:`${wv}ActivityLog.svg`,[at.Relationships]:`${wv}Relationships.svg`,[at.Sources]:`${wv}Crosswalk.svg`,[at.Search]:`${wv}Search.svg`,[Iv.DashboardGroup]:`${wv}DashboardGroup.svg`,[Iv.ProfileGroup]:`${wv}ProfileGroup.svg`,[Iv.SearchGroup]:`${wv}SearchGroup.svg`,DEFAULT:`${wv}Default.svg`},Cv=e=>Uv[null==e?void 0:e.class]||Uv.DEFAULT,Dv=(0,l.pipe)((0,l.pluck)("screen"),(0,l.filter)((0,l.anyPass)([(0,l.propEq)("class",at.NestedProfile)])),(0,l.groupBy)((0,l.prop)("class")),(0,l.map)((e=>e.map(((e,t)=>Pv({},e,{nestedRoute:`${t+1}`})))))),jv=(e,t)=>{var r;return(null===(r=e[t.class])||void 0===r?void 0:r.find((0,l.propEq)("id",t.id)))||t},Lv=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Uv[Iv.ProfileGroup]:null,kv=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Uv[at.Dashboard]||t===Uv[at.DQDashboard]})),(0,l.always)(Uv[Iv.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Uv[at.Search]||t===Uv[at.RelationshipSearch]})),(0,l.always)(Uv[Iv.SearchGroup])],[l.T,()=>null]])(e),Fv=e=>(0,l.pipe)((0,l.chain)(Sv),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>{const r=(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>Pv({},e,{entityTypes:e["entity-types"],screen:Nv(e,t)}))),(0,l.filter)((e=>e.screen)))(t),n=Dv(r);return(0,l.map)((e=>{let{label:t,screen:r,canRead:i,entityTypes:a}=e;return{label:t,icon:Cv(r),screen:jv(n,r),canRead:i,entityTypes:a}}))(r)})(t,e),n=Nv(t,e);return{label:t.label,icon:Lv(t)||kv(r)||Cv(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function Mv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xv=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},$v=e=>({id:e,height:10}),Vv=e=>{const t=(e=>(0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["attribute-types"]))}))(e))(e),r=(e=>(0,l.pipe)((0,l.chain)(xv),(0,l.pluck)("pivotingAttributes"),l.flatten)(e))(e);return((e,t)=>{const r=(e=>(e||[]).find((0,l.propEq)("attribute-types","*")))(t);return(0,l.pipe)((0,l.reduce)(((e,n)=>{const i=((e,t)=>e.find((e=>Array.isArray(e["attribute-types"])&&e["attribute-types"].includes(t.uri))))(t,n)||r;return null!=i&&i.id&&(e[i.id]||(e[i.id]={extension:i,attributeTypes:[]}),e[i.id].attributeTypes.push(n)),e}),{}),l.values)(e)})(r,t).map((t=>{let{extension:r,attributeTypes:n}=t;const i=((e,t)=>{if("scroll"===t.layout.layout){const r=VO(((e,t)=>{const r=BO(t);return(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>r.includes(e.id)))})),(0,l.filter)((e=>{let{views:t}=e;return t})),(0,l.map)((e=>{let{views:t,id:r}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Mv(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=RO($v,t.layout,{columns:4});return{views:r,layout:SO(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function Gv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Bv(e,t,r[t])}))}return e}function Bv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wv(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const Yv=(0,l.curry)(((e,t)=>(0,l.pipe)((e=>((e,t)=>(e||[]).find((e=>"com.reltio.plugins.ui.Activator"===e.activator)))(e)),(0,l.prop)(e))(t))),qv=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,Hv=(0,l.unless)((e=>!!e&&(e.startsWith("http:")||e.startsWith("https:"))),(0,l.always)(null)),Jv=(0,l.pipe)(Yv("top-logo"),Hv),Kv=(0,l.prop)("showLookupCode"),Qv=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),{validateReadMode:o,validateRelations:s}=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["validateReadMode","validateRelations"]))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propSatisfies)((0,l.either)(pe,(0,l.equals)("none")),"format")),(0,l.map)((e=>{let{format:t}=e;if("none"===t)return{thousandSeparator:""};const{groupSeparator:r,digitsAfterDecimalSeparator:n}=t;return Gv({thousandSeparator:r,decimalScale:n},Wv(t,["groupSeparator","digitsAfterDecimalSeparator"]))})))(e))(e),p=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(e=>{let{workflowPath:t,enabled:r}=e;return{enabled:r,path:t}}))(e))(e),d=(e=>(0,l.pipe)(Yv("default-perspective"),(0,l.ifElse)(qv,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),y=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.AttributesSorting"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("strategy"))(e))(e),f=(e=>(0,l.pipe)((e=>nv(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.map)((e=>{let{action:t}=e;return Gv({},t,Wv(e,["action"]))})))(e))(e),T=(e=>Yv("checkUser",e))(e),m=(e=>Yv("checkIdle",e))(e),h=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),b=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e),O=void 0===(v=Kv(b))||v;var v;const g=null===(t=iv(e))||void 0===t?void 0:t.showEntityId,_=(e=>Yv("preview",e))(e),A=Jv(e),N=(e=>Yv("showAttributeDescription",e))(e),P=(e=>Yv("topBackgroundColor",e))(e),R=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.framework.util.DateMask"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(e=>{let{dateMask:t,dateTimeMask:r}=e;return{dateMask:t,dateTimeMask:r}}),(0,l.reject)(l.isNil))(e))(e),S=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.network.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["id","point"]))(e))(e),w=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.search.dev.SearchView"))),(0,l.reject)(l.isNil),l.head,(0,l.path)(["options","showSearchByOv"]))(e))(e),I=0===Object.keys(R).length?void 0:R,U=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.ProfileCheckUpdate"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.omit)(["id","point"]))(e))(e),C=(e=>(0,l.pipe)((0,l.map)((e=>rv(e,"com.reltio.plugins.ui.configuration.AIAssistant"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.omit)(["id","point"]))(e))(e);return{i18n:u,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:O},validate:{levels:a,validateReadMode:o,validateRelations:s},masks:I,requestProvider:S,attributePresentations:c,attributesSorting:y,workflow:p,defaultRoute:d,customScripts:f,checkUser:T,checkIdle:m,showSearchByOv:w,showSwitchToClassic:h,showEntityId:g,preview:_,logo:A,showAttributeDescription:N,headerColor:P,profileCheckUpdate:U,aiAssistant:C}},Xv=e=>({layout:Fv(e),pivoting:Vv(e),properties:Qv(e)});function zv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Zv(e,t,r[t])}))}return e}function Zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const eg=e=>{let{views:t,layout:r}=e;const n={};let i=!1;const a=t.map((e=>{if(n[e.id]){const t=`${e.id}_${(0,Br.x0)()}`;return n[e.id].push(t),i=!0,zv({},e,{id:t})}return n[e.id]=[e.id],e})),o={},s=r&&i?r.map((e=>null==o[e.id]?(o[e.id]=0,e):(o[e.id]++,zv({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}};function tg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rg(e,t,r[t])}))}return e}function rg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let ng={};const ig=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=ee(`${r.id}: ${r.action.files.join('","')}`);if(E(ng[a])){try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}ng=tg({},ng,{[a]:tg({},ng[a]||{},{worker:i})})}else i=ng[a].worker,ng[a].innerText&&t({task:{action:ct.SET_HTML,params:{html:ng[a].innerText}},worker:i,config:r}),i.removeEventListener("message",ng[a].onWorkerMessage);return i&&(ng[a].onWorkerMessage=e=>{if("loaded"!==e.data.action){const n=JSON.parse(e.data);t({task:n,worker:i,config:r}),"setHtml"!==n.action||n.params.id||(ng[a].innerText=n.params.html)}},i.addEventListener("message",ng[a].onWorkerMessage)),i},ag=(0,l.curry)(((e,t)=>!e||!e.availableEntityTypes||!t||e.availableEntityTypes.includes(t))),og=(0,l.flip)(ag);var sg=r(83926);const lg=(e,t)=>{let r;try{r=t(e)}catch(t){return e}return"number"==typeof e?r.toNumber():r.toString()};function ug(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cg(e,t,r[t])}))}return e}function cg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pg={[Tt.percent]:{valueConverters:{in:e=>lg(e,(e=>new sg.Decimal(e).mul(1e4).floor().div(100))),out:e=>lg(e,(e=>new sg.Decimal(e).mul(100).floor().div(1e4)))}}},dg=(0,l.curry)(((e,t)=>{var r,n;return((null===(r=pg[e])||void 0===r||null===(n=r.valueConverters)||void 0===n?void 0:n.in)||l.identity)(t)})),yg=(0,l.curry)(((e,t)=>{var r,n;return((null===(r=pg[e])||void 0===r||null===(n=r.valueConverters)||void 0===n?void 0:n.out)||l.identity)(t)})),fg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const{uri:n,name:i}=e||{},a=!n||$n(e)?i:n;return t[a]||t[Re]||Eg(r)},Tg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{[St.relevanceScore.name]:ug({},fg(St.relevanceScore,e,t),{strategy:Tt.percent})}},Eg=(0,mi.Z)((e=>{var t;e=null===(t=e)||void 0===t?void 0:t.replace(/_/g,"-");const r=new Intl.NumberFormat(e).formatToParts(1000000.1),n=e=>{var t;return null===(t=r.find((t=>{let{type:r}=t;return r===e})))||void 0===t?void 0:t.value};return{thousandSeparator:n("group"),decimalSeparator:n("decimal"),groupSize:("integer",(null===(i=r.filter((e=>{let{type:t}=e;return"integer"===t})).map((e=>{let{value:t}=e;return t})).sort(((e,t)=>t.length-e.length)))||void 0===i?void 0:i[0])||"000").length};var i})),mg=(e,t)=>{const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a="",groupSize:o=3,decimalScale:s,strategy:l}=e;t=dg(l,t);const u=null!=s?new sg.Decimal(t).toFixed(s):t,[c,p]=u.split("."),d=new RegExp(`\\B(?=(\\d{${o}})+(?!\\d))`,"g"),y=c.replace(d,r),f=null==p?void 0:p.replace(/(0|\.)+$/,"");return i+y+(f?n+f:"")+a};let hg;const bg=()=>hg,Og={setLocale:e=>{hg=e},getLocale:bg,number:e=>((e,t)=>{const r=String(t);try{const t=Eg(e);return mg(t,r)}catch(e){return console.warn("Number localization error"),r}})(bg(),e),applyFormatToNumber:mg},vg=(0,l.curry)(((e,t)=>null==t?"":("string"!=typeof t&&(t=String(t)),e&&t?Og.applyFormatToNumber(e,t):(!e&&t&&(t=Og.number(t)),t)))),gg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?fe().number(e,"0,0.0a").toUpperCase():fe().number(e,"0,0"):""},_g=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let Ag=!0;const Ng=e=>Ag=e,Pg=(e,t)=>e!==t&&t?Ag&&e?`${t} (${e})`:t:e,Rg=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Sg=(e,t,r)=>{const n=Rg(e,t,r);return Pg(r,n)},wg=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),Ig=(0,l.complement)(wg),Ug=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),Cg=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.pipe)((0,l.reduce)(((e,t)=>t.reduce(((e,t)=>{let{type:r,codeValues:n}=t;return e[r]={type:r,codeValues:(0,l.uniq)([...(0,l.pathOr)([],[r,"codeValues"],e),...n])},e}),e)),{}),l.values)(t)},Dg=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(Ig(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),jg=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=i?J(i):"L",s=a?X(a):"L LTS";switch(n.type){case mt.TYPE_NUMBER:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_COUNT:{const e=fg(n,r,Og.getLocale());return t&&vg(e,t)}case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isEmpty)(t)?"":(t=t,(0,l.isNil)(t)?t:ce(t)?fe().text("Yes"):fe().text("No"));case mt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=P(Number(t)).getTime()),(t=t)&&(nc(t)?ic(t):fe().date(t,o));case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_LOCAL_DATE:return(t=t)&&(nc(t)?ic(t):fe().date(t,o));case mt.TYPE_TIMESTAMP:return(t=t)&&(nc(t)?ic(t):fe().date(isNaN(t)?t:Number(t),s));case mt.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case mt.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case mt.TYPE_DOLLAR:return t=t,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?Pg((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}}));r(72342);const Lg={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},success:{main:"#3B873E"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)",hint:"rgba(0,0,0,0.38)"},divider:"rgba(0,0,0,0.38)"},components:{MuiButton:{defaultProps:{color:"inherit"}},MuiTooltip:{defaultProps:{disableInteractive:!0}},MuiTab:{styleOverrides:{root:{maxWidth:"264px"}}},MuiDialogTitle:{styleOverrides:{root:{"&&+.MuiDialogContent-root":{paddingTop:"13px"}}}},MuiFilledInput:{styleOverrides:{root:{lineHeight:"1.1876em",backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},input:{"&.MuiSelect-select":{minHeight:"1.1876em"}}}},MuiTablePagination:{styleOverrides:{select:{"&.MuiInputBase-input":{minHeight:"1.1876em"}}}},MuiInputBase:{styleOverrides:{root:{"& .MuiInputAdornment-root":{color:"rgba(0,0,0,0.87)"}},input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"},"&.Mui-disabled":{WebkitTextFillColor:"inherit"}}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:"rgba(0, 0, 0, 0.08)","&.Mui-focusVisible":{backgroundColor:"rgba(0, 0, 0, 0.08)"},"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.08)"}}}}}},breakpoints:{values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},tooltip:{borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.54)"},inactiveBackground:"repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #e9e9e9 15px, #e9e9e9 16px)",inactiveSelectedBackground:"repeating-linear-gradient(45deg, #DBE9F4, #DBE9F4 14px, #CCDAE5 15px, #CCDAE5 16px)",inactiveSelectedHoverBackground:"repeating-linear-gradient(45deg, #D4E2ED, #D4E2ED 14px, #C6D4DF 15px, #C6D4DF 16px)",inactiveHoverBackground:"repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 14px, #e2e2e2 15px, #e2e2e2 16px)",inactive:{opacity:.7},basicView:{boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",borderRadius:"3px",backgroundColor:"#FFFFFF"},suggested:"rgb(237, 246, 251)"};function kg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fg(e,t,r[t])}))}return e}function Fg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const xg=e=>(t,r)=>{const{timeout:n}=r,i=Mg(r,["timeout"]);if(AbortController&&n){const r=new AbortController,a=setTimeout((()=>r.abort()),n);return e(t,kg({},i,{signal:r.signal})).finally((()=>{clearTimeout(a)}))}return e(t,i)},$g=e=>{const t=e=>{switch(e){case 429:case 502:case 503:case 504:return 4;default:return 0}},r=e=>{const t=Math.random()+1;return new Promise((r=>{const n=Math.min(Math.round(1e3*Math.exp(e)*t),2e4);setTimeout(r,n)}))};return(n,i)=>{const{noRetry:a}=i,o=Mg(i,["noRetry"]),s=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,o).then((e=>{const n=t(e.status);return!a&&n>0&&i<n?r(i).then((()=>s(i+1))):e}))};return s()}},Vg=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=kg({},JSON.parse(t),{[gr]:e.status})}catch(n){r={errorMessage:t,errorCode:e.status,originalResponse:e}}throw r})))),Gg=e=>{const{onRequest:t,onResponse:r,addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}=(()=>{const e={onRequest:[],onResponse:[]};return{onRequest:t=>{const{url:r,options:n,abort:i,resolve:a}=t,o=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e,resolve:a})),t.next);o(r,n)},onResponse:t=>{const{response:r,abort:n,url:i,options:a}=t,o=e.onResponse.reduce(((e,t)=>r=>r instanceof Response?t({response:r,abort:n,next:e,url:i,options:a}):e(r)),t.next);o(r)},addRequestInterceptor:t=>{e.onRequest.push(t)},addResponseInterceptor:t=>{e.onResponse.push(t)},removeRequestInterceptor:t=>{const r=e.onRequest.indexOf(t);e.onRequest.splice(r,1)},removeResponseInterceptor:t=>{const r=e.onResponse.indexOf(t);e.onResponse.splice(r,1)}}})(),s={},u=(0,l.pipe)(xg,(e=>{const t={},r={};return n=>{var i,a;const o=null!==(i=e.attemptsThreshold)&&void 0!==i?i:10,s=null!==(a=e.attemptsTimeWindowSize)&&void 0!==a?a:5e3;return(i,a)=>{const l=(e=>{const[t]=e.split("?");return t.split("/")[2]})(i),u=t[l],c=()=>Promise.reject({errorMessage:`service ${l} was disabled (authorization issues)`});if(u)return c();if(r[l]){const e=r[l].length;if(e>o){const n=e-o-1;if(r[l][e-1]-r[l][n]<=s)return t[l]=!0,c();r[l]=r[l].slice(n)}}return n(i,a).then((t=>{var n;return!e.excludedServices||null!==(n=e.excludedServices)&&void 0!==n&&n.includes(l)||(401===t.status?(r[l]||(r[l]=[]),u||r[l].push(Date.now())):r[l]&&t.ok&&(r[l].length=0)),t}))}}})(s),(e=>{let t=null;return r=>(n,i)=>{const a=()=>r(n,i),o=()=>{var e;return null===(e=t)||void 0===e?void 0:e.then(a)};return o()||a().then((r=>401===r.status?(t||(t=e().then((()=>{t=null}))),o()):r))}})(e),$g,Vg);let c=0,p=[];return{request:(e,n)=>{const i=u(fetch);if(null!=n&&n.noRequestProcessor)return i(e,n);const a=()=>{const a=r?(e,t)=>i(e,t).then((n=>new Promise(((i,a)=>{r({response:n,next:e=>{i(e)},abort:a,url:e,options:t})})))):i;return t?new Promise(((r,i)=>{t({url:e,options:n,next:(e,t)=>{r(a(e,t))},resolve:e=>{r(e)},abort:i})})):a(e,n)};if(c){const{delayedRequest:e,resolver:t}=(e=>{let t;const r=new Promise((e=>{t=()=>{e(null)}})).then((()=>e()));return{delayedRequest:r,resolver:t}})(a);return p.push(t),e}return a()},addRequestInterceptor:n,addResponseInterceptor:i,setRequestProviderConfiguration:e=>{Object.assign(s,e)},startInterceptorInit:()=>{c+=1},finishInterceptorInit:()=>{c=Math.max(c-1,0),0===c&&(p.forEach((e=>e())),p=[])},removeRequestInterceptor:a,removeResponseInterceptor:o}},Bg="__metadata",Wg=(e=>{const t=[Bg,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),Yg=(0,l.set)(Wg),qg=(0,l.view)(Wg),Hg=Yg(Ae.NEW),Jg=Yg(Ae.REMOVED),Kg=Yg(Ae.EDITED),Qg=Yg(Ae.IGNORED),Xg=(0,l.pipe)(qg,(0,l.equals)(Ae.REMOVED)),zg=(0,l.pipe)(qg,(0,l.equals)(Ae.NEW)),Zg=(0,l.pipe)(qg,(0,l.equals)(Ae.EDITED)),e_=(0,l.pipe)(qg,(0,l.complement)(l.isNil)),t_=(0,l.pipe)(qg,(0,l.equals)(Ae.IGNORED)),r_=(0,l.omit)([Bg]),n_=(e,t)=>e===Bg?void 0:t;function i_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const a_=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e(t))return r.concat(t);if(t&&t.children)for(const n of t.children){const i=a_(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},o_=(e,t)=>a_((0,l.propEq)("nodeId",t),e),s_=(e,t)=>a_((0,l.pathEq)(["entity","uri"],t),e),l_=(e,t)=>{const r=o_(e,t);return r.length>1?r[r.length-2]:null},u_=(e,t)=>{const r=o_(e,t);return r.length>0?r[r.length-1]:null},c_=(e,t)=>{let{parent:r,childrenProcessing:n=(e=>e),nodeProcessing:i=(e=>e)}=t;return(e=i(e,r)).children&&(e.children=n(e.children.map((t=>c_(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},p_=()=>{},d_=(e,t)=>{let{parent:r,nodeProcessing:n=p_}=t;n(e,r),e.children&&e.children.forEach((t=>d_(t,{parent:e,nodeProcessing:n})))},y_=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case We.addingParent:var i,a,o,s;return{entityUri:n?null===(i=r.entity)||void 0===i?void 0:i.uri:null===(a=t.relatedEntity)||void 0===a?void 0:a.uri,relation:r.relation,parentEntityUri:n?null===(o=t.relatedEntity)||void 0===o?void 0:o.uri:null===(s=r.entity)||void 0===s?void 0:s.uri};case We.addingChild:var l,u,c,p;return{entityUri:n?null===(l=t.relatedEntity)||void 0===l?void 0:l.uri:null===(u=r.entity)||void 0===u?void 0:u.uri,relation:r.relation,parentEntityUri:n?null===(c=r.entity)||void 0===c?void 0:c.uri:null===(p=t.relatedEntity)||void 0===p?void 0:p.uri};case We.editing:{var d,y,f,T;const e={oldRelation:t.relation,newRelation:r.relation,isReversed:n},i=null===(d=r.entity)||void 0===d?void 0:d.uri,a=null===(y=t.relatedEntity)||void 0===y?void 0:y.uri;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i_(e,t,r[t])}))}return e}({},e,(null===(f=t.entity)||void 0===f?void 0:f.uri)===(null===(T=r.entity)||void 0===T?void 0:T.uri)?{}:{entityUri:i,newEntityUri:a})}}},f_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];return Object.values(e).forEach((e=>{const r=e.root;r&&d_(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===We.addingChild||r.editingMode===We.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=y_({node:r,connection:n,isReversed:i}),s=ed({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===We.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=y_({node:r,isReversed:i,connection:n}),l=s?id({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):nd({oldRelation:e,newRelation:a});t.push(l)}}})})),t},T_=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=T_(r,t);if(e)return e}return!1},E_=(0,l.curry)(((e,t)=>{const r=(0,l.map)(E_(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),m_=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>T_(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:E_(e,n.root)}}));return(0,l.pipe)(r,n)(t)},h_={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},b_={asc:"asc",desc:"desc"},O_=h_.entityLabel,v_=b_.asc,g_=(0,l.always)(0),__=e=>{let{sortField:t=O_,sortOrder:r=v_,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case h_.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return xP.strings.sort(t,a,o)})(n,r);case h_.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return xP.strings.sort(e,i,a)})(r);default:return g_}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},A_=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(b_)),l.identity,(0,l.always)(v_))),N_=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(h_)),l.identity,(0,l.always)(O_)));var P_=r(91104);let R_;const S_=(e,t)=>(R_||(R_=P_.createClient({key:t})),new Promise((t=>{R_.geocode({address:e},((e,r)=>{e&&(console.warn(e),t(null));const{results:n}=r.json,i=(0,l.pathOr)(null,[0,"geometry","location"],n);t(i||null)}))}))),w_=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},I_=(e,t)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(Os).flatMap((e=>{let r;return e.type==t&&(r=[w_(e)]),(0,l.is)(Object,e.value)&&(r=(r||[]).concat(I_(e.value,t))),r})),U_=e=>e&&e.length>0,C_=(e,t)=>[].concat(e&&e.attributes?I_(e.attributes,t):[]).filter(l.identity);function D_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const j_=(e,t,r,n,i,a)=>{if(e&&e.type){const t=bi(r,e.type);n&&(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){D_(e,t,r[t])}))}return e}({},e,{attributes:{[i]:[n]}}));const a=(t.geoLocationAttributes||[]).map((t=>{return r=C_(e,t.latitude),n=C_(e,t.longitude),U_(r)&&U_(n)&&(0,l.zipWith)(((e,t)=>({lat:Number(e),lng:Number(t)})),r,n);var r,n})).filter(l.identity);if(a.length>0)return Promise.resolve(a[0])}const o=t.GeoLocation;if(o){const e=o.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(U_(t)&&t[0].value&&U_(r)&&r[0].value)return{id:e.uri,lat:Number(t[0].value),lng:Number(r[0].value)}})).filter(l.identity);if(e.length>0)return Promise.resolve(e)}return n&&n.label?S_(n.label,a).catch((()=>null)):Promise.resolve(null)},L_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n={},i=(0,l.flatten)(t.map((t=>{return"configuration/entityTypes/Location"===t.type?{id:t.uri,label:t.label,entity:t,pointSource:t.attributes}:(n[t.type]=n[t.type]||((null===(r=bi(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>[e,t.attributes[e]])).filter((e=>{let[,t]=e;return t})).flatMap((e=>{let[r,n]=e;return n.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e,name:r})))})));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s,name:u}=t;return j_(a,o,e,s,u,r).then((e=>!e&&a.label&&""!==a.label?S_(a.label,r).catch((()=>null)):e)).then((e=>ae(e).filter(l.identity).map((e=>({id:e.id||n,label:i,entity:a,point:e}))))).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},k_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Promise.resolve((0,l.pipe)((0,l.chain)((t=>{const r=bi(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(ei(e,r.latitude,t.type)&&ei(e,r.longitude,t.type)){const e=C_(t,r.latitude),n=C_(t,r.longitude),i=(e,r)=>({id:`${t.uri}_nested_${e}_${r}`,entity:t,label:t.label,point:{lat:Number(e),lng:Number(r)}});return(0,l.zipWith)(i,e,n)}}))})),(0,l.filter)(l.identity),(0,l.uniqBy)((0,l.prop)("id")))(t))},F_=(e,t,r)=>Promise.all([k_(e,t),L_(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lng===e.point.lng))))]}));function M_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x_(e,t,r[t])}))}return e}function x_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $_=(e,t)=>t.values.map(So(e,t.entityTypeUri)),V_=(e,t,r)=>ll(t.fieldName,r)||ei(e,dn(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),G_=(e,t)=>{const r=(0,l.propOr)([],"values",t),n=(0,l.path)([t.attrType.lookupCode],e);return(0,l.map)((e=>{const t=(0,l.prop)(e,n);return t?Pg(e,t):e}),r)},B_=(0,l.path)(["attrType","label"]),W_=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>M_({},e,{[t]:!0})),{});e[r]=e[r]?M_({},e[r],n):n}return e}),{}),Y_=(0,l.pipe)((0,l.prop)("values"),E),q_=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",Ct.type.name)),H_=e=>e.type===Q_.NUMERIC_RANGE_FACET,J_=e=>e.type===Q_.DATE_RANGE_FACET,K_=(0,l.either)(H_,J_),Q_={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},X_=e=>{switch(null==e?void 0:e.name){case Ct.type.name:return Q_.ENTITY_TYPE_FACET;case Ct.createdBy.name:case Ct.updatedBy.name:case Ct.sourceSystems.name:case Ct.tags.name:case Ct.roles.name:case Ct.matchRules.name:case Ct.MLRecommendedMatch.name:return Q_.WITH_DROPDOWN_CHECKBOXES_FACET;case Ct.createdTime.name:case Ct.updatedTime.name:case Ct.startDate.name:case Ct.endDate.name:return Q_.DATE_RANGE_FACET;case Ct.matches.name:case Ct.matchScore.name:return Q_.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return Q_.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return Q_.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return Q_.DATE_RANGE_FACET;default:return Q_.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},z_=(0,l.pipe)(V_,X_),Z_=(0,l.pipe)((0,l.path)(["attrType","type"]),pi),eA=(0,l.cond)([[H_,(0,l.always)(Te.IN_RANGE)],[J_,(0,l.always)(Te.WITHIN)],[(0,l.allPass)([Z_,e=>e.values.length>=2]),(0,l.always)(Te.EXISTS)],[l.T,(0,l.always)(Te.EQUALS)]]),tA=(0,l.cond)([[J_,(0,l.prop)("values")],[H_,(0,l.prop)("values")],[Z_,e=>1===e.values.length?e.values.map(ce):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]),rA=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(ge),nA=e=>(e=>rA.reduce(((e,t)=>{const r=new RegExp(`'{0,1}${encodeURIComponent("${")}${t}${encodeURIComponent("}")}'{0,1}`,"g"),n=new RegExp(`'{0,1}${encodeURIComponent("${")}now${encodeURIComponent("}")}'{0,1}`,"g"),[i,a]=oc(t);return e.replace(r,i).replace(n,a)}),e))(e),iA=(0,l.curry)(((e,t)=>{const r=new URL(e),[,n]=r.pathname.split("/");return"nui"===n?`${e}search?state=${t}`:`${e}#p~com.reltio.plugins.search.SearchPerspective_s~${t}`})),aA={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},oA=e=>[aA.geoPolygon,aA.onMapMove].includes(e),sA=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},lA=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},uA=(e,t)=>oA(e)?t.map(sA):[lA(t)],cA=e=>oA(e)?fe().text("Geo Polygon"):fe().text("Geo Location"),pA=e=>{switch(e){case aA.geoLocation:return"geoLocation";case aA.geoPolygon:case aA.onMapMove:return"geoPolygon"}},dA={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},yA=e=>fe().text(e),fA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[Te.EQUALS]:"=",[Te.NOT_EQUALS]:"≠",[Te.STARTS_WITH]:"*",[Te.MISSING_VALUE]:fe().text("missing value"),[Te.HAS_ALL]:fe().text("has all"),[Te.IN_RANGE]:fe().text("in range"),[Te.FULL_TEXT]:fe().text("full text"),[Te.EXISTS]:fe().text("exists"),[Te.COUNT_EQUALS]:`${fe().text("count")} =`,[Te.COUNT_NOT_EQUALS]:`${fe().text("count")} ≠`,[Te.COUNT_LT]:`${fe().text("count")} <`,[Te.COUNT_LTE]:`${fe().text("count")} <=`,[Te.COUNT_GT]:`${fe().text("count")} >`,[Te.COUNT_RANGE]:fe().text("count range"),[Te.LT]:"<",[Te.LTE]:"<=",[Te.GT]:">",[Te.GTE]:">=",[Te.IN_FILE]:fe().text("in file"),[Te.NOT_IN_FILE]:fe().text("not in file"),[Te.CONTAINS]:"~",[Ee.LIST_EQUALS]:"=",[Ee.NOT_LIST_EQUALS]:"≠",[Ee.LIST_EQUALS_CASE_SENSITIVE]:"=",[Ee.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||fe().text(e.toLowerCase())},TA=e=>({type:dA.operator,text:e}),EA=e=>({type:dA.operator,text:yA(e)}),mA=e=>({type:dA.attributeLabel,text:e}),hA=e=>({type:dA.specialAttributeLabel,text:e}),bA=e=>({type:dA.attributeFilter,text:fA(e)}),OA=e=>({type:dA.attributeValue,text:e}),vA=e=>({type:dA.entityTypeLabel,text:e}),gA=()=>({type:dA.space,text:" "}),_A=()=>({type:dA.bracket,text:"("}),AA=()=>({type:dA.bracket,text:")"}),NA=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),PA=(0,l.curry)(((e,t)=>t.map(NA(e)))),RA=(0,l.curry)(((e,t,r)=>[e,...r,t])),SA=RA(_A(),AA()),wA=RA(gA(),gA()),IA=(0,l.curry)(((e,t)=>[e,...t])),UA=e=>IA(vA(e)),CA=e=>IA(vA(`${e}: `)),DA=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=Uu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=wu(s),a=Iu(s);!r&&t&&n&&(i.push(_A()),r=!0),i.push(o),r&&a&&(i.push(AA()),r=!1);const l=e?EA(s):TA(s);i.push(...wA([l]))}else i.push(o),r&&(i.push(AA()),r=!1)}return i}},jA=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),LA=(0,l.pipe)(DA({localizable:!1}),jA),kA=function(e){let{data:{title:t,pathToTitle:r}}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},FA=e=>{let{data:t,values:r,filter:n}=e;return t&&Ic({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},MA=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(FA)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),xA=(0,l.pipe)((0,l.chain)((0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)((e=>(e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.attrType)&&Qn(e.data.attrType)})(e)&&[Te.HAS_ALL,Te.EQUALS,Te.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:Kn((0,l.path)(["data","attrType"],e)),codeValues:(0,l.flatten)((0,l.propOr)([],"values",e))}))),(0,l.filter)((e=>{let{codeValues:t}=e;return t.length>0})))),Cg),$A=(e,t)=>(0,l.pipe)(xA,Dg(t))(e),VA=(0,l.pathEq)(["data","fieldName"],Ct.type.name),GA=(0,l.path)(["data","entityTypeUri"]),BA=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),WA=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(hs(e)),attributes:(0,l.filter)((0,l.pipe)(GA,(0,l.anyPass)([l.isNil,hs(e),r=>{const n=(t.entityTypes||[]).filter(hs(e));return(n.length>1?Ai(e,n):null)===r&&!!bi(e,r)}])))})(t))))),YA=e=>(0,l.pipe)((0,l.prop)("filter"),Eu,(0,l.equals)(e)),qA=(0,l.curry)(((e,t,r,n,i,a)=>{const o=ll(n.fieldName)||n.attrType,s=ec(o,i),u=jg({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>Qn(s),()=>(0,l.is)(Object,a)&&a.lookupCode?Pg(a.lookupCode,a.value):Sg(r,Kn(o),a)],[()=>cl(s),()=>So(e,n.entityTypeUri,a)],[()=>pl(s),()=>Xo(e,a)],[()=>ml(s),()=>es(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>li(c)||pi(c)),Hu),OA)()})),HA=(e,t,r,n)=>{const i=qA(e,t,r,n.data,n.filter);return(0,l.cond)([[YA(0),(0,l.always)([])],[(0,l.both)(YA(2),(2,(0,l.pipe)((0,l.prop)("values"),l.flatten,l.length,(0,l.equals)(2)))),e=>{let{values:t}=e;const[r,n]=(0,l.flatten)(t);return[gA(),i(r),{type:dA.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[gA(),...(0,l.pipe)(l.flatten,(0,l.map)(i),PA({type:dA.punctuationMark,text:", "}))(t)]}]])(n)},JA=(e,t)=>{const r=!!ll(e.data.fieldName);return(0,l.pipe)(kA,r?hA:mA)(e,t)},KA=(e,t,r,n,i)=>[JA(n,i),gA(),bA(n.filter),...HA(e,t,r,n)],QA=(0,l.addIndex)(l.map),XA=(0,l.propEq)("length",1),zA=(0,l.propSatisfies)((0,l.lt)(1),"length"),ZA=(0,l.complement)(l.isEmpty),eN=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(ju,(0,l.filter)(FA),Lu,(0,l.map)((n=>({operand:KA(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,DA()))(n)},tN=(0,l.pipe)(eN,l.flatten),rN=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>_p(e,{type:t}))).join(", ");return r?t(r):l.identity},u=eN(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(UA),(0,l.pipe)(s(CA),(0,l.unless)((()=>XA(u)||i),SA)))(u)},nN=(e,t,r,n)=>(0,l.pipe)(ju,(0,l.filter)(MA),Lu,QA(((n,i,a)=>({operand:rN(e,t,r,n,XA(a)),operator:n.operator}))),DA(),l.flatten)(n),iN=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),DA(),l.flatten),aN=e=>{let{searchType:t,values:[r]}=e;return uA(t,r).join(", ")},oN=(e,t,r,n,i,a)=>{const o=(e=>e?[hA(e.isRawFilter?fe().text("Raw filter"):fe().text("Search")),...wA([bA(Te.EQUALS)]),OA(`"${e.value}"`)]:[])(i),s=(e=>e?[hA(cA(e.searchType)),gA(),OA(aN(e))]:[])(a),u=(0,l.pipe)(nN,(0,l.when)((e=>zA(e)&&(ZA(o)||ZA(s))),SA))(e,t,r,n);return iN([o,s,u])},sN=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),lN=(0,l.pipe)(oN,sN),uN=(0,l.has)("attributes"),cN=Array.isArray,pN=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),dN=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=yN(e,t,r,a,i);return(0,l.when)((0,l.always)((0,l.complement)(l.isNil)(o)),(0,l.pipe)((0,l.when)((0,l.always)((0,l.not)(pN(a))),SA),(0,l.concat)(wA([TA(o)]))))(s)},yN=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return uN(n)?dN(e,t,r,n,i):cN(n)?n.reduce(((n,a)=>n.concat(yN(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(wA([TA(n.operator)])))(KA(e,t,r,n,i))},fN=(e,t,r,n,i)=>(0,l.pipe)(yN,l.flatten)(e,t,r,n,i);function TN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){EN(e,t,r[t])}))}return e}function EN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mN=(0,l.complement)(VA),hN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(VA),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(GA),(0,l.reject)(l.isNil),l.uniq)(e),n=0===r.length,i=1===r.length&&(0===t.length||(0,l.equals)(r,t));return{entityTypesFromSpecialAttributes:t,entityTypesFromAttributes:r,areOnlySpecialAttributes:n,areAttributesFromOneEntityType:i}},bN=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=hN(t);return(r||n)&&Cu(t)},ON=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(bN)),n=e.filter((e=>{let{attributes:t=[]}=e;return t.length>0}));if(0===r.length||1===r.length&&1===n.length||t.push("Can't convert more than one complex transition advanced search group"),e.some((e=>(e.attributes||[]).filter(VA).some((0,l.propEq)("filter",Te.NOT_EQUALS))))&&t.push("Can't convert advanced search group with 'Type' attribute and 'not equals' filter."),t.length)throw t;return e}),(0,l.reduce)(((e,t)=>e.concat((e=>{const t=[],r=e.attributes||[],{entityTypesFromSpecialAttributes:n,entityTypesFromAttributes:i}=hN(r);if(bN(e))t.push(TN({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(mN)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(VA,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(GA,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(mN),entityTypes:n,operator:i?a:e.operator,id:(0,Br.x0)()}}));t.push(...n)}var a;return t})(t))),[]))),vN={[Te.EQUALS]:Te.ON,[Te.IN_RANGE]:Te.WITHIN,[Te.GTE]:Te.AFTER,[Te.GT]:Te.AFTER,[Te.LTE]:Te.BEFORE,[Te.LT]:Te.BEFORE},gN=(0,l.curry)((e=>vN[e]||e)),_N=(0,l.curry)(((e,t)=>{switch(e){case Te.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case Te.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),AN=(0,l.pipe)((0,l.path)(["data","attrType","type"]),ai),NN=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>TN({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return AN(e)?(0,l.evolve)({filter:gN,values:_N(t)},e):e}))})))})),PN=(0,l.evolve)({values:(0,l.when)((0,l.pipe)((0,l.prop)(0),rc),(0,l.map)(oc))}),RN=(0,l.map)((0,l.cond)([[AN,PN],[l.T,l.identity]])),SN=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),ON,WA(t),(0,l.map)((0,l.evolve)({attributes:(0,l.pipe)((0,l.map)((0,l.evolve)({data:e(t,n,i)})),(0,l.reject)((0,l.propSatisfies)(l.isNil,"data")),RN)})),NN,(0,l.reject)(BA))(r)));function wN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){IN(e,t,r[t])}))}return e}function IN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const UN=(e,t)=>({data:{uri:En(e.fieldName)?dn(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||eA(e),id:(0,Br.x0)(),values:tA(e)}),CN=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=ll(a,t,r)||ei(e,i);if(!s)return null;if($n(s))return wN({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=_p(e,{type:o}),i=(Zn(e,dn(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return wN({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),DN=(0,l.curry)(((e,t,r,n)=>SN(CN,e,n,t,r)));function jN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){LN(e,t,r[t])}))}return e}function LN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kN=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},FN=e=>"rdmLookups.not.resolved"===e?Ct.notResolved.name:e,MN=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===he.NOT_IN_RANGE?Te.IN_RANGE:be(a),u=FN(n),c=ll(u)||ei(e,i),p=(0,l.cond)([[()=>Ou(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>jN({},e,{filename:_g(e)}))))],[()=>pi(null==c?void 0:c.type),(0,l.map)(ce)],[e=>hu(s)&&!Array.isArray(e[0])&&!ai(null==c?void 0:c.type),oe],[l.T,l.identity]])(o);return{id:(0,Br.x0)(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===he.NOT_IN_RANGE?"and not":"and",filter:s,values:p}})),xN=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(MN(e,Ai(e,i)));return[{id:(0,Br.x0)(),operator:"or",attributes:a,entityTypes:i}]})),$N=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),VN=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([$N("from"),$N("to")]),(0,l.pipe)((0,l.pick)(["from","to"]),l.values)],[(0,l.pipe)((0,l.prop)("rangeSelection"),E,l.not),(0,l.pipe)((0,l.prop)("rangeSelection"),(0,l.pick)(["start","end"]),l.values)],[l.T,()=>[]]]),GN=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return jN({},r,{values:VN(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?nl(e.fieldName,n):e.fieldName})},BN=(e,t)=>{if((0,l.has)("children")(e)){const r=GN(e,t);return e.children.reduce(((e,n)=>(e.push(BN(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return GN(e,t)},WN=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(GN(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(jN({fieldName:e.fieldName},GN(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(BN,l.flatten)],[l.T,GN]]),YN=(0,l.pipe)((0,l.map)(WN),l.flatten),qN=e=>{if(e.every((e=>Array.isArray(e))))return e;if(2===e.length)return[e.map((e=>Number(e)))];if(1===e.length){const t=Number(e[0]);return[[t,t]]}return e},HN=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=xN(e,a),[u]=((e,t)=>{if(!t)return[];const[r,n]=(0,l.pipe)((0,l.reject)((e=>"tenants"===e.fieldName)),(0,l.partition)((e=>"type"===e.fieldName)))(t),i=(0,l.chain)((0,l.propOr)([],"values"),r);return[{attributes:YN(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>jN({},t,{type:z_(e,t)}))).map((e=>jN({},e,{values:K_(e)?qN(e.values):e.values}))).map((e=>{let{filter:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["filter"]);return UN(r,t)})),operator:"or",id:(0,Br.x0)(),entityTypes:i}]})(e,i),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.pipe)(l.keys,(0,l.map)((t=>({[FN(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[jN({},u,{entityTypes:null!=c&&c.type?(0,l.uniq)([...u.entityTypes,...s.entityTypes]):[],attributes:[...u.attributes,...s.attributes].filter((e=>{let{data:{fieldName:t}}=e;return c[t]}))})];return DN(e,t,r,p)},JN=(e,t,r,n)=>{try{return"2.0"==n.version?((e,t,r,n)=>{const{advanced:i=[],facets:a={}}=n,o=i.some((e=>{let{attributes:t,entityTypes:r=[]}=e;return t.length||r.length}))?i:((e,t)=>{const[[r={}],n]=(0,l.pipe)(l.values,(0,l.reject)(Y_),(0,l.partition)(q_))(t),i=n.map((t=>wN({},t,{type:z_(e,t)}))).map((e=>UN(e))),a=r.values||[];return[{attributes:i,operator:"or",id:(0,Br.x0)(),entityTypes:a}]})(e,a);return DN(e,t,r,o)})(e,t,r,n):HN(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},KN=e=>"2.0"===e.version?e.keyword:kN(e);var QN=r(97698);const XN=e=>e.activityFilter,zN=(0,l.pathOr)("",["globalFilter","query"]),ZN=e=>e.searchOptions,eP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)(ZN,(0,l.omit)(t),(0,l.filter)(l.identity),l.keys,(0,l.join)(","))(e)},tP=(0,QN.createSelector)(eP,XN,zN,((e,t,r)=>({searchOptions:e,activityFilter:t,globalFilter:r}))),rP=e=>(0,l.pathEq)(["object","uri"],e),nP=(e,t)=>(0,l.pipe)((0,l.find)(rP(e)),(0,l.prop)("object"))(t),iP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=(0,l.pipe)((0,l.find)((0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),rP(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=nP(r.match,t)||n[r.match];return i?{label:np((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return Ro(e,i.type,t)||{label:t,uri:t}}))}:null};return(0,l.pipe)((0,l.defaultTo)([]),(0,l.when)((0,l.complement)(l.isEmpty),(0,l.map)(a)),(0,l.reject)(l.isNil))(i)},aP=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),oP=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),sP=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[],negativeRules:a=[]}=t;const o=(0,l.propOr)({},n,r);return{label:np((0,l.prop)("label",o)),matchRules:i.concat(a).map((function(t){return Ro(e,o.type,t)||{label:t,uri:t}}))}})))(t),lP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.map)((0,l.prop)("shortestTransitiveMatchPath")),l.flatten,(0,l.filter)(l.identity),(0,l.map)((0,l.prop)("match")),l.uniq);return t(e)},uP=(0,l.path)(["object","uri"]),cP=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.find((e=>{let{uri:r}=e;return r===t}))},pP=e=>void 0!==(null==e?void 0:e.relevance),dP=e=>pP(e)?100*e.relevance+"%":"";function yP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fP(e,t,r[t])}))}return e}function fP(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const TP=(e,t)=>!!e[t],EP=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},mP=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return 0===t.length&&e?e:(0,l.uniqBy)(r,[...t,...e||[]])},hP=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return yP({},t,{[r.uri]:yP({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:mP(null==o?void 0:o.parents,n),children:mP(null==o?void 0:o.children,i),values:mP(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},bP=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=bi(r,t)||Si(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return ss(r,n,i).flatMap(us).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>ei(r,e))).filter(l.identity).filter((0,l.prop)("dependentLookupCode"));return(e=>{let{structure:t,parentAttrType:r,childrenAttrTypes:n}=e;const i=n.map((0,l.prop)("uri")),a=hP({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>hP({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},OP=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!Zr(e.uri)&&on(e.type)&&on(t)&&!t.startsWith(e.type))(n,t))return e;const i=Ls(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(Os),(0,l.map)(EP))(i);return hP({structure:e,attrType:e[t].attrType,values:a})}),t)},vP=e=>{let{structure:t,attributeValue:r}=e;if((0,l.is)(Object,r.value))return Object.values(r.value).reduce(((e,t)=>{const r=t.some((e=>{let{value:t}=e;return(0,l.is)(Object,t)})),n=t.some((t=>{let{type:r}=t;return TP(e,r)}));return r||n?t.filter(Os).reduce(((e,t)=>vP({structure:e,attributeValue:t})),e):e}),t);{const e=r;return TP(t,e.type)?hP({structure:t,attrType:t[e.type].attrType,values:[EP(e)]}):t}},gP=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?yP({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},_P=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=Ls(i,n,r)||[];return a.length?hP({structure:t,attrType:t[r].attrType,values:a.filter(Os).map(EP)}):t},AP=(e,t,r)=>{const n=rn(e),i=rn(t);return n===i?((e,t)=>{const r=bn(t),n=bn(e);return ln(n,r)||((e,t)=>mn(e)&&!mn(t)&&ln(t,e))(n,r)})(e,t):!(!r||!hn(t))&&Bh(r,i).includes(n)},NP=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},PP=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?Vh(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return AP(r,t,o)}))},RP=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>RP(e,t,r)))))},SP=(e,t,r,n,i)=>{let{uri:a,value:o}=r;const{uri:s,defaultValue:l}=e,u=((e,t)=>{var r;return null==e||null===(r=e[t])||void 0===r?void 0:r.isTouched})(i,a),c=NP(n,s)||!!l&&!u,p=a!==t&&c;return{type:s,uri:a,lookupValue:o,autopopulate:p,useDefaultValue:p&&!u}},wP=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s,editorsState:l}=e;const u=t[r],c=rn(n),p=Gh(c,o,i,a),d=RP("children",t,u),y=RP("parents",t,u),f=d.flatMap((e=>RP("parents",t,e))).filter((e=>![...y,u,...d].includes(e))),T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return AP(t,n,p)})).map((t=>SP(e.attrType,n,t,s,l)))));if(!T.length)return[];const E=y.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return AP(n,t,p)||rn(t)!==c&&AP(t,n,p)})).map((t=>SP(e.attrType,n,t,s,l))))),m=f.flatMap((e=>{const r=RP("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return T.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&AP(n,t,p)}))})).map((t=>SP(e.attrType,n,t,s,l)))}));return[...u.values.filter((e=>{let{uri:t}=e;return AP(t,n,p)})).map((e=>SP(u.attrType,n,e,s,l))),...E,...m,...T]},IP=(e,t)=>e.structure[t],UP=(e,t)=>e.editors[t],CP=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=jg({attributePresentations:r,dataTypeDefinition:t}),a=(0,l.pipe)((e=>{const t={};for(const r of e){const[e,n]=Object.entries(r)[0];t[e]=Array.isArray(n)?n.map((e=>({value:e,ov:!0}))):[{value:n,ov:!0}]}return{value:t}}),(e=>tp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[Wn,()=>a(n)],[Qn,()=>(e=>{const r=o(e),n=Kn(t);return nu([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Sg(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},DP=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:Te.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(jP(r,t)):i.push(LP([t],r)),i},jP=(e,t)=>{const r=Vn(e),n=t=>(e[r]||[]).find((e=>e.uri===t||e.uri.endsWith(`/${t}`)));return t.reduce(((e,t)=>{for(const r in t){const i=n(r),a=Wn(i)?jP(i,t[r]):[LP(t[r],i)];return e.push(...a),e}}),[])},LP=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Jn(t.uri),filter:t.type===mt.TYPE_BLOB?Te.FULL_TEXT:Te.EQUALS,values:e}:{fieldName:Jn(t.uri),filter:Te.MISSING_VALUE},kP=(e,t)=>(0,l.equals)(JSON.parse(JSON.stringify(e)),JSON.parse(JSON.stringify(t))),FP=new class{constructor(){this.comparators=void 0,this.comparators={}}register(e,t){this.comparators[e]=t}get(e){var t;return null!==(t=this.comparators[e])&&void 0!==t?t:kP}},MP={AttributesDiff:o,AttributesEditor:a,HistoryManager:s},xP={Colors:r(29504),DependencyManager:r(47485),strings:n,dates:i}},29504:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getColor:()=>i});var n=[[255,235,238,0],[255,205,210,0],[239,154,154,0],[229,115,115,0],[239,83,80,1],[244,67,54,1],[229,57,53,1],[211,47,47,1],[198,40,40,1],[183,28,28,1],[255,138,128,0],[255,82,82,1],[255,23,68,1],[213,0,0,1],[252,228,236,0],[248,187,208,0],[244,143,177,0],[240,98,146,1],[236,64,122,1],[233,30,99,1],[216,27,96,1],[194,24,91,1],[173,20,87,1],[136,14,79,1],[255,128,171,0],[255,64,129,1],[245,0,87,1],[197,17,98,1],[243,229,245,0],[225,190,231,0],[206,147,216,0],[186,104,200,1],[171,71,188,1],[156,39,176,1],[142,36,170,1],[123,31,162,1],[106,27,154,1],[74,20,140,1],[234,128,252,0],[224,64,251,1],[213,0,249,1],[170,0,255,1],[237,231,246,0],[209,196,233,0],[179,157,219,0],[149,117,205,1],[126,87,194,1],[103,58,183,1],[94,53,177,1],[81,45,168,1],[69,39,160,1],[49,27,146,1],[179,136,255,0],[124,77,255,1],[101,31,255,1],[98,0,234,1],[232,234,246,0],[197,202,233,0],[159,168,218,0],[121,134,203,1],[92,107,192,1],[63,81,181,1],[57,73,171,1],[48,63,159,1],[40,53,147,1],[26,35,126,1],[140,158,255,0],[83,109,254,1],[61,90,254,1],[48,79,254,1],[227,242,253,0],[187,222,251,0],[144,202,249,0],[100,181,246,0],[66,165,245,0],[33,150,243,1],[30,136,229,1],[25,118,210,1],[21,101,192,1],[13,71,161,1],[130,177,255,0],[68,138,255,1],[41,121,255,1],[41,98,255,1],[225,245,254,0],[179,229,252,0],[129,212,250,0],[79,195,247,0],[41,182,246,0],[3,169,244,0],[3,155,229,1],[2,136,209,1],[2,119,189,1],[1,87,155,1],[128,216,255,0],[64,196,255,0],[0,176,255,0],[0,145,234,1],[224,247,250,0],[178,235,242,0],[128,222,234,0],[77,208,225,0],[38,198,218,0],[0,188,212,0],[0,172,193,0],[0,151,167,1],[0,131,143,1],[0,96,100,1],[132,255,255,0],[24,255,255,0],[0,229,255,0],[0,184,212,0],[224,242,241,0],[178,223,219,0],[128,203,196,0],[77,182,172,0],[38,166,154,0],[0,150,136,1],[0,137,123,1],[0,121,107,1],[0,105,92,1],[0,77,64,1],[167,255,235,0],[100,255,218,0],[29,233,182,0],[0,191,165,0],[232,245,233,0],[200,230,201,0],[165,214,167,0],[129,199,132,0],[102,187,106,0],[76,175,80,0],[67,160,71,1],[56,142,60,1],[46,125,50,1],[27,94,32,1],[185,246,202,0],[105,240,174,0],[0,230,118,0],[0,200,83,0],[241,248,233,0],[220,237,200,0],[197,225,165,0],[174,213,129,0],[156,204,101,0],[139,195,74,0],[124,179,66,0],[104,159,56,1],[85,139,47,1],[51,105,30,1],[204,255,144,0],[178,255,89,0],[118,255,3,0],[100,221,23,0],[249,251,231,0],[240,244,195,0],[230,238,156,0],[220,231,117,0],[212,225,87,0],[205,220,57,0],[192,202,51,0],[175,180,43,0],[158,157,36,0],[130,119,23,1],[244,255,129,0],[238,255,65,0],[198,255,0,0],[174,234,0,0],[255,253,231,0],[255,249,196,0],[255,245,157,0],[255,241,118,0],[255,238,88,0],[255,235,59,0],[253,216,53,0],[251,192,45,0],[249,168,37,0],[245,127,23,0],[255,255,141,0],[255,255,0,0],[255,234,0,0],[255,214,0,0],[255,248,225,0],[255,236,179,0],[255,224,130,0],[255,213,79,0],[255,202,40,0],[255,193,7,0],[255,179,0,0],[255,160,0,0],[255,143,0,0],[255,111,0,0],[255,229,127,0],[255,215,64,0],[255,196,0,0],[255,171,0,0],[255,243,224,0],[255,224,178,0],[255,204,128,0],[255,183,77,0],[255,167,38,0],[255,152,0,0],[251,140,0,0],[245,124,0,0],[239,108,0,1],[230,81,0,1],[255,209,128,0],[255,171,64,0],[255,145,0,0],[255,109,0,0],[251,233,231,0],[255,204,188,0],[255,171,145,0],[255,138,101,0],[255,112,67,0],[255,87,34,1],[244,81,30,1],[230,74,25,1],[216,67,21,1],[191,54,12,1],[255,158,128,0],[255,110,64,0],[255,61,0,1],[221,44,0,1],[239,235,233,0],[215,204,200,0],[188,170,164,0],[161,136,127,1],[141,110,99,1],[121,85,72,1],[109,76,65,1],[93,64,55,1],[78,52,46,1],[62,39,35,1],[250,250,250,0],[245,245,245,0],[238,238,238,0],[224,224,224,0],[189,189,189,0],[158,158,158,0],[117,117,117,1],[97,97,97,1],[66,66,66,1],[33,33,33,1],[236,239,241,0],[207,216,220,0],[176,190,197,0],[144,164,174,0],[120,144,156,1],[96,125,139,1],[84,110,122,1],[69,90,100,1],[55,71,79,1],[38,50,56,1],[0,0,0,1],[255,255,255,0]];function i(e){var t,r=null,i=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];return n.forEach((function(e){var n=Math.abs(i[0]-e[0])+Math.abs(i[1]-e[1])+Math.abs(i[2]-e[2]);(null===r||n<r)&&(r=n,t=e)})),t?t[3]:0}},47485:(e,t,r)=>{"use strict";function n(e){var t=[];return{getInfo:function(){return e},getEdges:function(){return t},removeEdge:function(e){var r=t.indexOf(e);t.splice(r,1)},addEdge:function(e){t.push(e)}}}function i(e,t){t(e),e.getEdges().forEach((function(e){i(e,t)}))}function a(e){var t=[];return e.getEdges().forEach((function(e){t.push.apply(t,a(e))})),t.push(e),t}function o(e,t){var r=null;if(e.getInfo()===t)return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=o(n[i],t));i++);return r}function s(e,t){var r=null;if(e.getEdges().some((function(e){return e.getInfo()===t})))return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=s(n[i],t));i++);return r}r.r(t),r.d(t,{Node:()=>n,resolve:()=>i,findNode:()=>o,findParentNode:()=>s,getDependencyOrder:()=>a})},33196:()=>{},38087:()=>{},74854:()=>{},66602:()=>{}}]);
|
|
2
2
|
//# sourceMappingURL=3854.js.map
|