@reltio/remotes 1.4.1263 → 1.4.1265

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/2701.js CHANGED
@@ -1,2 +1,2 @@
1
- (self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2701],{57941:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>Vs,PY2:()=>An,Ng6:()=>He,YJ7:()=>mn,NlI:()=>ln,Xt7:()=>We,wfT:()=>si,EMD:()=>Kn,HAc:()=>Ye,PEf:()=>wn,oA3:()=>Qn,$XE:()=>ut,eWf:()=>Rn,q7e:()=>Be,KVe:()=>li,WVQ:()=>$r,oZZ:()=>hi,bNA:()=>bi,Rjq:()=>Oi,G39:()=>Un,W0P:()=>Et,X1H:()=>Tt,yn8:()=>at,N0y:()=>it,dZX:()=>ct,bQt:()=>gi,oS0:()=>bt,lL_:()=>fn,Nsj:()=>bn,psV:()=>En,xPW:()=>Nn,pyR:()=>ti,p8l:()=>Xn,Wkf:()=>Ge,zHr:()=>Ve,NIO:()=>$e,$26:()=>tv,Esk:()=>Wn,s9T:()=>rt,MEy:()=>Nu,j5E:()=>sn,vAw:()=>Hn,NMQ:()=>qn,mNm:()=>Zn,rwv:()=>Ei,s_5:()=>ri,RgZ:()=>zn,unl:()=>mi,Qy0:()=>vi,pYu:()=>Gn,wIJ:()=>Nv,GFH:()=>Ke,Ury:()=>Cn,S91:()=>Ln,p3$:()=>Pi,wSh:()=>Z,BDP:()=>ki,pGS:()=>ei,ARY:()=>Ot,XGc:()=>oi,fO_:()=>Hr,wwy:()=>Ze,h_8:()=>Dn,_XL:()=>hn,j2V:()=>ui,dMV:()=>ii,NBX:()=>g_,OXy:()=>vt,BXd:()=>ot,CJB:()=>di,lXI:()=>yt,nqG:()=>Ai,C68:()=>In,yxQ:()=>_i,Yj_:()=>et,D25:()=>Xe,ZIY:()=>pt,Tl4:()=>Cv,lwr:()=>Sn,NkU:()=>ci,Rtp:()=>ai,YGx:()=>st,uTS:()=>ni,MCv:()=>qe,IYE:()=>Jn,PiC:()=>Ti,MVv:()=>mt,h_m:()=>ft,tJI:()=>Qe,fDt:()=>Je,cNQ:()=>pi,SwE:()=>Yn,ZHR:()=>fi,lD1:()=>jn,lVm:()=>lt,vnX:()=>PO,$x5:()=>RO,_R1:()=>AO,wUm:()=>NO,z7V:()=>Ni,dC6:()=>nt,MBD:()=>ze,GmF:()=>fa,cKm:()=>dt,iP_:()=>Pn,NVC:()=>tt,tPT:()=>fl,tZe:()=>Kp,kRE:()=>Zy,psB:()=>ef,X0$:()=>yl,zE1:()=>Al,Wm5:()=>nl,vyX:()=>Ec,wLZ:()=>Tl,W4V:()=>se,EtK:()=>Ns,Wtd:()=>dl,asT:()=>D_,kGs:()=>ge,ewt:()=>DT,O_f:()=>hu,sOy:()=>Bt,Tde:()=>br,LMI:()=>Zu,skb:()=>vg,sPt:()=>Yu,sH1:()=>Bu,RPM:()=>wE,h27:()=>uc,Uqd:()=>Tc,xG:()=>jg,Z2f:()=>Vb,fgW:()=>tg,I69:()=>Pg,ZxB:()=>Sg,mdt:()=>AE,Qbq:()=>bb,rny:()=>Xi,UEY:()=>Da,Q0T:()=>ja,Lyr:()=>Ga,sBn:()=>La,itK:()=>wa,H9$:()=>Ca,KPc:()=>Ua,zos:()=>Ia,ELQ:()=>Wa,dZs:()=>ba,Cz4:()=>ha,z_L:()=>$a,fGe:()=>ma,iuF:()=>Ra,Wib:()=>Sa,Hn0:()=>Va,obS:()=>Ya,E$L:()=>Oa,XUh:()=>Pa,Qp_:()=>Aa,_jk:()=>va,sKE:()=>ga,WmG:()=>Na,QKx:()=>Ma,Oik:()=>Fa,s0A:()=>_a,o9m:()=>ka,MCd:()=>xa,RsS:()=>cc,tGK:()=>Hl,lIv:()=>Nl,Vg3:()=>ia,mkC:()=>Bi,xv5:()=>oa,a14:()=>Hi,yv0:()=>aa,Zm0:()=>qi,Nxd:()=>Yi,$mM:()=>na,ifj:()=>Gr,NWi:()=>oO,xr3:()=>aO,wNf:()=>nu,iJH:()=>sO,d89:()=>Vi,Edd:()=>Gi,Z5t:()=>Wi,uGe:()=>Mi,UoR:()=>Fi,xvW:()=>iO,$qe:()=>nO,yPM:()=>Ea,$cp:()=>_l,vKJ:()=>vl,VtG:()=>Yc,AID:()=>Jf,B1H:()=>O_,b7X:()=>Eb,$uE:()=>_e,keo:()=>hb,C_p:()=>dm,G27:()=>yh,JA0:()=>Gy,b3T:()=>ve,oC6:()=>be,_Zs:()=>Oe,epC:()=>Ne,YYG:()=>Ae,f_2:()=>Yy,w3l:()=>r_,QHB:()=>dh,Jso:()=>u_,RXH:()=>Xm,Vr9:()=>vh,lMm:()=>cb,BlA:()=>B_,fmQ:()=>ms,yRD:()=>Bg,NcL:()=>hm,QK6:()=>de,ymd:()=>Cp,JV_:()=>Tf,XiW:()=>fT,Yrx:()=>wy,GPx:()=>pl,gjI:()=>cl,vlo:()=>ZT,E_P:()=>bE,aAL:()=>bp,NBq:()=>hs,wp9:()=>_E,DsR:()=>yp,MPc:()=>tT,gWE:()=>rT,DT_:()=>nT,ipn:()=>aT,ORg:()=>Li,_wz:()=>iT,RYR:()=>IT,PP2:()=>jy,wS7:()=>Qb,cBQ:()=>zc,pBq:()=>Df,DsO:()=>ee,X78:()=>mf,xZs:()=>pf,YFy:()=>Uy,Gmt:()=>af,K$w:()=>nf,DSj:()=>Op,Mfr:()=>Cy,k9j:()=>ep,ww$:()=>El,WVU:()=>rf,hxF:()=>al,nwO:()=>Q_,Mzk:()=>Hc,aFF:()=>Nb,HRH:()=>Su,EZK:()=>sd,Kxm:()=>nd,Z9i:()=>HE,CrF:()=>Ky,DNd:()=>qa,vUy:()=>$_,lJh:()=>Uu,zHo:()=>Cu,sEJ:()=>A_,UO$:()=>Vf,zeJ:()=>Nr,dLR:()=>ws,JQy:()=>xs,XtP:()=>Rs,Ug0:()=>nn,A1W:()=>mb,sw:()=>od,nv3:()=>TO,JgD:()=>fO,nve:()=>N_,SkP:()=>$s,SAs:()=>Ff,PWK:()=>Bo,IM5:()=>Ss,Mfk:()=>Tb,mB6:()=>Yb,p6d:()=>w,o0x:()=>U,ufS:()=>Ub,k7L:()=>Cb,mrB:()=>I,ncP:()=>xt,Zmi:()=>jt,hm5:()=>kt,ECL:()=>Br,vPL:()=>cd,qmL:()=>mE,hPi:()=>Lf,hXd:()=>Zi,OCS:()=>ea,p2l:()=>Ws,qF1:()=>Lp,_X$:()=>jp,yj2:()=>vv,bzh:()=>RE,k66:()=>ts,kiP:()=>mo,pSg:()=>ce,kz_:()=>My,H_U:()=>ns,t9e:()=>Za,j2$:()=>Jp,PFL:()=>lr,aJ3:()=>qO,To9:()=>Or,wpo:()=>Id,ADq:()=>GE,UUb:()=>$E,tQX:()=>VE,xy8:()=>dr,EUG:()=>Pr,AFK:()=>Xt,X3M:()=>Ar,WN0:()=>rs,kDl:()=>Is,uDV:()=>EE,IhQ:()=>Ds,pfb:()=>Fs,R$r:()=>hE,w80:()=>Lo,Pfu:()=>Xa,Gtj:()=>Ml,fyF:()=>Fl,kkq:()=>es,u5q:()=>$t,O$n:()=>Sd,ptG:()=>wd,f4_:()=>Nm,uap:()=>Am,d7q:()=>Sy,liG:()=>Dy,$oF:()=>Ry,avf:()=>WT,DiQ:()=>GT,cfX:()=>VT,vD3:()=>BT,Qrb:()=>$T,EJQ:()=>YT,HWy:()=>xT,gjS:()=>LT,y6v:()=>MT,JUW:()=>By,GtP:()=>Dm,_kX:()=>Qa,u1e:()=>Ka,sJj:()=>gb,CJp:()=>Lm,uKF:()=>vb,wo0:()=>zy,s5:()=>Qo,cwx:()=>Ho,Y6b:()=>my,TTx:()=>lf,UtR:()=>hy,HaQ:()=>uf,E6I:()=>Qy,Won:()=>Oy,vTU:()=>Ty,Nsy:()=>hd,KMQ:()=>Ab,Do$:()=>gd,CSV:()=>qs,TMe:()=>by,l1V:()=>ju,VQ1:()=>Mu,z7d:()=>eE,Xaq:()=>os,Sj8:()=>W_,PJj:()=>Yl,k3T:()=>on,PjQ:()=>Di,s7l:()=>xc,jLA:()=>km,GGR:()=>KT,j5q:()=>HT,DnY:()=>kc,RY5:()=>cE,Px$:()=>UT,KPC:()=>m_,NIY:()=>Bc,HvW:()=>Vc,Fof:()=>eo,BTI:()=>Ad,uie:()=>yd,ChB:()=>ld,q27:()=>Cd,vrC:()=>Lh,fAQ:()=>vf,XkT:()=>Dc,lrH:()=>gf,nt9:()=>zr,XH8:()=>Rd,XH2:()=>an,jFi:()=>Pd,qhs:()=>Co,wwR:()=>_d,Uk3:()=>zt,ev7:()=>v_,RB9:()=>Vy,iFp:()=>UE,e$p:()=>LE,PcX:()=>jE,SpP:()=>CE,R6_:()=>QO,CY1:()=>rv,Ajk:()=>Uc,Yiz:()=>Ic,FK9:()=>Ac,UOo:()=>Lb,aTW:()=>sf,uug:()=>ru,P$2:()=>av,XS2:()=>Ql,Hyb:()=>fu,d3Y:()=>Oc,Klp:()=>gc,WxZ:()=>ov,Gzu:()=>Lu,ZOr:()=>jc,uqV:()=>dy,Pm4:()=>re,hWO:()=>Qt,nVD:()=>dE,dED:()=>Ny,P2h:()=>Ay,jrr:()=>yo,mmY:()=>To,T6O:()=>is,h6J:()=>qp,hM2:()=>d_,XR6:()=>X,jmz:()=>TE,IHt:()=>fE,NZI:()=>qE,wdF:()=>bf,kgP:()=>Of,ZYI:()=>Sp,QXK:()=>Ll,efz:()=>jl,Q5d:()=>Cl,Ysv:()=>Dl,UWq:()=>nE,ocC:()=>rE,io3:()=>tn,Sbt:()=>Do,roS:()=>jo,Ww1:()=>ko,QaS:()=>Qc,ERZ:()=>e_,CL1:()=>y_,idV:()=>ad,nIW:()=>Ht,fjE:()=>KO,sG0:()=>kb,tV7:()=>Bl,g8o:()=>Iv,Qy:()=>wv,t2P:()=>BO,KbW:()=>go,wId:()=>Ao,LS0:()=>No,bFH:()=>Zd,Rgl:()=>ty,fW1:()=>bm,GFW:()=>cf,Ywp:()=>OO,pg:()=>kd,WSA:()=>ry,fed:()=>c_,tT_:()=>ks,BgZ:()=>Ms,KbL:()=>Mc,JBA:()=>rr,aNC:()=>yO,RFJ:()=>Rp,Zeh:()=>$f,OT5:()=>bO,mC3:()=>Rl,kR6:()=>Y_,NVY:()=>vE,k6v:()=>Dp,FEC:()=>kp,Ob5:()=>Ld,KUV:()=>jd,dvH:()=>OE,V3i:()=>Ah,VD3:()=>rn,mm2:()=>Fu,rou:()=>wf,izH:()=>Ja,DK$:()=>za,KMp:()=>hp,c31:()=>At,mbo:()=>YE,gT8:()=>Rt,CZ8:()=>Ts,uGi:()=>vs,Poc:()=>gt,_9k:()=>As,ZTM:()=>bs,bwT:()=>gs,tzW:()=>wt,tF$:()=>Pt,o96:()=>Es,M4S:()=>_s,_vs:()=>pp,xF8:()=>jT,HQx:()=>Pb,ATu:()=>WE,j1S:()=>Ui,V3K:()=>wi,Lmx:()=>Ii,ZaZ:()=>_t,n_1:()=>fy,N6e:()=>Tp,SxO:()=>fo,w3p:()=>gE,xU7:()=>pe,Y_p:()=>xo,$k6:()=>Mo,Gdl:()=>Mb,U6P:()=>Fb,OwB:()=>HO,hTh:()=>yE,xqc:()=>Ko,JvE:()=>Jo,i29:()=>ic,dzT:()=>Ki,uPS:()=>Xc,cZV:()=>Jc,n3B:()=>lg,e6O:()=>rg,s7j:()=>Av,j$Q:()=>qy,kW2:()=>jm,tH7:()=>qo,Yxg:()=>Xs,MaZ:()=>QT,nqN:()=>qT,jWj:()=>aE,o_J:()=>ss,hgZ:()=>ud,yW4:()=>Hp,uT0:()=>Yp,C82:()=>Bp,u9Z:()=>Sf,J$m:()=>yy,j_Q:()=>Pc,OaI:()=>Rc,wB1:()=>b_,SP6:()=>Dd,ZYr:()=>E_,IMU:()=>Pp,FoU:()=>Wy,DVz:()=>Wb,mxe:()=>og,FHr:()=>Mf,D1g:()=>If,VO3:()=>UO,de5:()=>IO,Uw1:()=>Te,J6q:()=>BE,XCe:()=>uo,fbl:()=>vO,Ir:()=>Oo,XQO:()=>vo,QXb:()=>qd,P8_:()=>yf,iiD:()=>mp,MOC:()=>Hd,WF:()=>Bd,xE1:()=>ji,idW:()=>L_,QWZ:()=>Ib,YL3:()=>qc,Fn9:()=>T,j2U:()=>Gs,MpE:()=>It,kQw:()=>cr,mfm:()=>Tu,vZp:()=>Zt,E8K:()=>S_,VSb:()=>ys,vr_:()=>ur,Vmh:()=>x_,FgW:()=>_h,oDv:()=>us,kuw:()=>ps,eHk:()=>iE,Tt2:()=>ls,T6Y:()=>Dr,_26:()=>pu,YkM:()=>hr,J6y:()=>Xl,njU:()=>au,TBP:()=>cs,IT0:()=>QE,x_:()=>_b,biM:()=>Od,TMl:()=>vd,Vkd:()=>lu,WiY:()=>ZO,_zi:()=>uu,J6D:()=>ku,Lt4:()=>wr,QEi:()=>gr,whI:()=>Kr,KIu:()=>Xr,JhM:()=>oe,C_0:()=>Mr,qIF:()=>ug,O27:()=>E,aBi:()=>Ud,xOX:()=>rl,EdS:()=>Wt,WgC:()=>Gt,eEv:()=>or,A4t:()=>ou,YOQ:()=>tr,Wos:()=>Lr,jWr:()=>Ba,Or$:()=>mr,lhE:()=>en,CwH:()=>vr,pzC:()=>Zs,ymH:()=>iu,QZu:()=>Tr,rYH:()=>zO,FVt:()=>Cr,Kn2:()=>ue,jgw:()=>Eu,OXP:()=>ds,lS4:()=>_r,g5f:()=>ev,fp6:()=>eu,Uty:()=>ua,YkG:()=>Er,xdS:()=>St,kMF:()=>oT,$NE:()=>Yt,bC9:()=>Vt,Ian:()=>Ci,KVV:()=>Ob,q9e:()=>Fo,iIf:()=>xb,ian:()=>ol,m6e:()=>xr,OFd:()=>el,kqr:()=>pr,fnZ:()=>Qr,VFZ:()=>sl,ZiX:()=>Ft,j5n:()=>Ir,zkt:()=>_,Pcm:()=>h_,QDV:()=>zs,M5u:()=>XO,laD:()=>sg,mtq:()=>ar,CtB:()=>$b,CBv:()=>ae,I0t:()=>Fr,u1G:()=>zT,gk1:()=>ig,Bgb:()=>ng,uzs:()=>Jr,v0l:()=>Vu,Zqp:()=>vy,j0k:()=>Yo,tCm:()=>Jt,gmx:()=>Kl,mOr:()=>Pu,TwZ:()=>Uv,GyU:()=>EO,zGm:()=>xd,bMg:()=>oy,EyD:()=>tO,FQA:()=>rO,fZN:()=>uy,xsF:()=>Zb,Lxg:()=>eO,O3l:()=>rp,Wni:()=>tp,wRx:()=>uO,OxG:()=>Jd,uJQ:()=>Kd,qWg:()=>Gb,i96:()=>Fd,zhn:()=>lO,G8q:()=>Ri,Jct:()=>NT,A9Y:()=>te,Y5F:()=>qg,gxP:()=>le,c$P:()=>Jl,M7o:()=>fc,BBN:()=>po,ZBU:()=>J,UkJ:()=>Po,xkv:()=>df,z$M:()=>j_,KAm:()=>$y,lCl:()=>Xf,rkF:()=>ym,IU6:()=>td,RGr:()=>h,aYu:()=>m,ije:()=>Gl,Buf:()=>Ep,YLu:()=>Vl,ct9:()=>Vo,XkY:()=>sy,T5R:()=>$d,uQS:()=>cy,wcJ:()=>$o,d$I:()=>ml,rSp:()=>bd,Sx:()=>Wc,Ilm:()=>Pl,Ki6:()=>il,VGk:()=>dp,sFD:()=>zm,eWN:()=>k_,dWE:()=>_v,Lkd:()=>TT,aDL:()=>Gf,yaA:()=>py,lOh:()=>Cf,DBr:()=>GO,hK$:()=>ql,TZ_:()=>ed,CMB:()=>cg,FU8:()=>Gc,J$p:()=>qf,b5s:()=>Bf,h2W:()=>Kt,SL_:()=>Nf,oUH:()=>Vp,ck9:()=>Vd,nL:()=>Db,k$p:()=>eh,Xs0:()=>$l,u7I:()=>Uf,rxg:()=>Ou,bji:()=>vu,oCZ:()=>lm,MjG:()=>wO,FuV:()=>$p,$ju:()=>Wp,t6d:()=>Gp,m5F:()=>fe,sx:()=>F_,rSc:()=>Bb,U10:()=>Sc,L8n:()=>tf,R9X:()=>Ey,rj2:()=>Ef,_C4:()=>Xp,tCj:()=>ff,uAg:()=>Iy,wx9:()=>kT,KF3:()=>zp,ax9:()=>Zp,HH7:()=>fp,ufV:()=>Ly,_6y:()=>Zc,XTh:()=>_O,AJo:()=>Kc,Ixr:()=>Hy,P6Y:()=>K_,Bd_:()=>im,xkB:()=>nm,W41:()=>Rf,WkI:()=>Pf,sSE:()=>rm,GMd:()=>ec,Bxm:()=>om,FVh:()=>XE,U_T:()=>ny,FTe:()=>ie,VGB:()=>ne,Wfe:()=>Iu,Ls5:()=>wu,$bd:()=>_u});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:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>R,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>A,toUtcDate:()=>N});var a={};r.r(a),r.d(a,{applyCrosswalks:()=>ge,collectCrosswalksFromAttributes:()=>_e,compareActivenessAttributes:()=>ve,compareAttributes:()=>be,compareImages:()=>Oe,compareRoles:()=>Ne,compareTags:()=>Ae});var o={};r.r(o),r.d(o,{addAttribute:()=>Se,editAttribute:()=>we,editEndDate:()=>De,editRoles:()=>Ce,editStartDate:()=>je,editTags:()=>Le,removeAttribute:()=>Ue});var s={};r.r(s),r.d(s,{createHistoryManager:()=>Me});var l=r(17440);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=>e&&e.toDate(),g=e=>(e&&e.setHours(0,0,0,0),e),_=e=>f()(e).isSame(Date.now(),"day"),A=e=>{const t=new Date(e);return new Date(t.getTime()+60*t.getTimezoneOffset()*1e3)},N=e=>{const t=new Date(e);return new Date(t.getTime()-60*t.getTimezoneOffset()*1e3)},P=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),R=P("startOf"),S=P("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),L=(0,l.equals)("99"),j=(0,l.equals)("9999"),D=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),F=(0,l.test)(/^9+$/),M=(0,l.test)(/^[9az]+$/),x=(0,l.cond)([[C,(0,l.always)("M")],[L,(0,l.always)("MM")],[D,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[M,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[L,(0,l.always)("DD")],[M,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[L,(0,l.always)("YY")],[j,(0,l.always)("YYYY")],[F,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),G=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),C),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),L),(0,l.always)("hh")],[C,(0,l.always)("H")],[L,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),W=(0,l.cond)([[C,(0,l.always)("m")],[L,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),Y=(0,l.cond)([[C,(0,l.always)("s")],[L,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),B=/([9az]+)([^9az]+)*/g,q=e=>{const t=[...e.toLowerCase().matchAll(B)];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)("",[x(e),r,$(n),i,V(a),o])}return e},H=/(9+)([^9]+)*/g,Q=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),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[G(e,s),r,W(n),i,a?Y(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},K=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${q(t)} ${Q(r)}`},J=e=>{const t=Number(e);return Number.isNaN(t)?e:t},X=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt())).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0",z=e=>({isNone:()=>(0,l.isNil)(e),extract:()=>e,orSome:t=>(0,l.isNil)(e)?t:e,map:t=>(0,l.isNil)(e)?Z.None():Z.Some(t(e))}),Z={Some:z,None:()=>z(null),chain:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>t.reduce(((e,t)=>e.map(t)),e)},fromFalsy:function(e){return e?Z.Some(e):Z.None()},fromNull:function(e){return null==e?Z.None():Z.Some(e)},fromUndefined:function(e){return void 0===e?Z.None():Z.Some(e)},fromEmpty:function(e){return E(e)?Z.None():Z.Some(e)}},ee=(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)}},te=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},re=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ne=e=>Array.isArray(e)?e:[e],ie=e=>[e],ae=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),oe=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),se=e=>(e=(e||"").toLowerCase(),oe(e)?`mailto:${e}`:!e.includes("://")&&(e.startsWith("www.")||e.split(".").length>2)?`http://${e}`:e),le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=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)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=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)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;function Ee(e){return e&&void 0!==e.uri}function me(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function he(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 be(e,t,r){var n,i,a,o=[];for(var s in e)if(e.hasOwnProperty(s)){if("paging"===s)continue;var u=e[s];if(void 0===t[s])for(var c in u)u.hasOwnProperty(c)&&o.push.apply(o,m(u[c]));else for(var p in u)if(u.hasOwnProperty(p)){var d=u[p],y=_(d,t[s]);void 0===y?o.push.apply(o,m(d)):d.value===y.value||d.lookupCode&&d.lookupCode===y.lookupCode?d.ignored!==y.ignored&&o.push.apply(o,b(y)):null==y.value||""===y.value?o.push.apply(o,m(d)):"Nested"===g(d)?d.ignored!==y.ignored&&(0,l.equals)(d.value,y.value)?o.push.apply(o,b(y)):o=o.concat(be(d.value,y.value,r)):"Reference"===g(d)?he(d,y)?o.push.apply(o,be(d.value,y.value,r)):(o.push.apply(o,m(d)),o.push(O([y]))):""!==y.value&&(!1===y.ov?o.push.apply(o,(void 0,void 0,i=(n=y).uri.lastIndexOf("/"),a=n.uri.substr(0,i),[{type:"_UPDATE_NON_OV_ATTRIBUTE",uri:n.uri,typeUri:a,value:n.lookupCode||n.value}])):o.push.apply(o,h(y)))}}for(var f in t)if(t.hasOwnProperty(f)){if("paging"===f)continue;var T=(t[f]||[]).filter((function(t){return void 0===_(t,e[f])}));(T=E((0,l.clone)(T))).length&&o.push(O(T))}return o;function E(e){return e?e.map((function(e){var t;if(e){var r=e.value;return null!=r&&(ue(r)?Object.keys(r).forEach((function(e){var n=E(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 m(e){return[{type:"DELETE_ATTRIBUTE",uri:e.uri}]}function h(e){return[{type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:{value:e.lookupCode||e.value}}]}function b(e){return e&&(e.ignored?function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!1}}]}(e))}function O(e){var t=e[0].uri,n=t.lastIndexOf("/"),i={type:"INSERT_ATTRIBUTE",uri:t=t.substr(0,n),newValue:e.map((function(e){var t,n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),v(n.value),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}))};return i}function v(e){if(null!==e&&"[object Object]"===e.toString())for(var t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,v(e.value)}))}function g(e){var t=e.value;if(ue(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function _(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function Oe(e,t){var r,n,i=[];return e.defaultProfilePic!==t.defaultProfilePic?i.push({type:"UPDATE_PROFILE_PIC_BY_URI",newValue:{value:t.defaultProfilePic}}):(r=e.defaultProfilePicValue)===(n=t.defaultProfilePicValue)||Ee(r)&&Ee(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function ve(e,t){var r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:"UPDATE_START_DATE",newValue:{value:n}});var i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:"UPDATE_END_DATE",newValue:{value:i}}),r;function a(e,t){var r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function ge(e,t){var r="configuration/sources/Reltio";function n(e,t){return e.crosswalk={type:t.type,value:t.value},e}function i(e){return e.removeIt=!0}var a=e.map((function(e){if(e.crosswalk)return[e];var i=t.filter((function(t){return 1===(t.attributes||t.attributeURIs||[]).filter((function(t){return t===e.uri})).length})),a=i.filter((function(e){return e.type===r})),o=i.filter((function(e){return e.type!==r})),s=[];switch(e.type){case"INSERT_ATTRIBUTE":s.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":s=s.concat(i.map((function(t){return n(e,t)})));break;case"DELETE_ATTRIBUTE":(o.length||0==a.length)&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),s=s.concat(a.map((function(t){return n({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":a.length?s=s.concat(a.map((function(t){return n({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)}))):s.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0}),o.length&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}})}return s})),o=[].concat.apply([],a),s=function(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}(o,"typeUri");for(var l in s)if("undefined"!==l){var u=s[l],c=o.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===l||"INSERT_ATTRIBUTE"===e.type&&e.uri===l})),p=u.filter((function(e){return e.crosswalk&&e.crosswalk.type===r}))[0];!c.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0]&&p&&(o.push({type:"UPDATE_ATTRIBUTE",uri:p.uri,newValue:{value:p.value},crosswalk:p.crosswalk}),c.forEach(i)),u.forEach(i)}return(o=o.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),o}function _e(e,t){for(var r in t=t||[],e)if(e.hasOwnProperty(r))for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if(a.refRelation){var o=a.refRelation[0]||a.refRelation;if(o.crosswalks)for(var s=o.crosswalks.filter((function(e){return e.attributes||e.attributeURIs})),l=0;l<s.length;l++){for(var u=!0,c=0;c<t.length;c++)if(t[c].type===s[l].type&&t[c].value===s[l].value){t[c].attributes=t[c].attributes||t[c].attributeURIs,t[c].attributes=t[c].attributes.concat(s[l].attributes||s[l].attributeURIs),t[c].attributes=Object.keys(t[c].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[c].attributeURIs,u=!1;break}u&&t.push(s[l])}}}return t}function Ae(e,t){return me("UPDATE_TAGS").call(this,e,t)}function Ne(e,t){return me("UPDATE_ROLES").call(this,e,t)}function Pe(e,t,r,n){var 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 Re(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Pe(r[i],r[i+1],e,t));return n}function Se(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Re(r,t)[a];if(s.hasChildren){e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]);var l=e[s.name].filter((function(e){return e.uri===s.valueUri}))[0];return Se(l.value,t,r,n,i,a+1,o)}var u=e[t.name];if(u||(u=e[t.name]=[]),null!=n){var c={value:n.refEntity?n.value:n,uri:r,type:t.uri};return n.lookupCode&&(c.value=n.value,c.lookupCode=n.lookupCode),n.refEntity&&(c.refEntity=n.refEntity,c.label=n.label),n.refRelation&&(c.refRelation=n.refRelation),i&&(c.crosswalks=i),u.splice(o||0,0,c),n}}function we(e,t,r,n,i,a){void 0===a&&(a=0);var o=Re(r,t)[a];if(!o.hasChildren){var s,l=e[t.name],u=l&&l.filter((function(e){return e.uri===r}))[0];return u?("[object Object]"!==u.value.toString()?(Ie(n,u),i&&(u.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&l.filter((function(e){return!1===e.ov})).forEach(Ie.bind(null,n))):n.refEntity?(u.refRelation=n.refRelation,u.refEntity=n.refEntity,u.value=n.value,u.label=n.label):null!==n.value&&void 0!==n.value&&null!==u.value&&"object"==typeof u.value&&(u.value=n.value,u.label=n.label),s=u.value):s=Se(e,t,r,n,i,a),s}var c=we(e,o,o.valueUri,{},i,a);we(c,t,r,n,i,a+1)}function Ie(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function Ue(e,t,r,n){void 0===n&&(n=0);var i=Re(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&Ue(a.value,t,r,n+1)}else{var o=e[t.name];o&&(o.forEach((function(e,t){e.uri===r&&o.splice(t,1)})),0===o.length&&delete e[t.name])}}function Ce(e,t){e.roles=t||[]}function Le(e,t){e.tags=t||[]}function je(e,t){e.startDate=t||""}function De(e,t){e.endDate=t||""}function ke(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){Fe(e,t,r[t])}))}return e}function Fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Me=function(e){var t=function(e,r,n,i){if(e&&r)if(n||(n=null),i=!!i,Array.isArray(e))for(var a=0;a<e.length;a++)r.call(n,a,e[a],e),i&&t(e[a],r,n,i);else if(ue(e))for(var o in e)r.call(n,o,e[o],e),i&&t(e[o],r,n,i)},r=function(e,t,r){return function(n){var 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)}},n=function(e,t,r){var n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf("IGNORE_ATTRIBUTE")&&-1!==e[t].indexOf("INSERT_ATTRIBUTE")}));return Object.keys(t).filter((function(e){var 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]="UPDATE_ATTRIBUTE"})),{appearance:t,ignored:n}},i=function(e,t){var r=Array.isArray(t),n=r?[]:{};return r?(e=e||[]).some((function(e){return e.uri}))?n=function(e,t){var r=e.map((function(e){return e.uri})),n=e.map((function(e){var r,n,a=(n=t.filter((function(t){return t.uri===e.uri}))[0]||{},(r=e)&&n&&r.ignored!==n.ignored&&(delete r.ignored,delete n.ignored,r.ov=!0,n.ov=!0),{a:r,b:n});return i(a.a,a.b)})),a=t.filter((function(e){return-1===r.indexOf(e.uri)}));return n.concat(a)}(e,t):(n=n.concat(e),t.forEach((function(t,r){void 0===n[r]?n[r]=t:ue(t)?n[r]=i(e[r],t):-1===e.indexOf(t)&&n.push(t)}))):(ue(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(r){ue(t[r])&&e[r]?n[r]=i(e[r],t[r]):n[r]=t[r]}))),n},a=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s=JSON.parse(JSON.stringify(a)),l=JSON.parse(JSON.stringify(o)),u=i(a,o),c={},p={},d=[],y=r(p,c,d);e.compareAttributes(u,l).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value&&(e.type="UNDO_IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)})),e.compareAttributes(u,s).map((function(e){return"DELETE_ATTRIBUTE"===e.type&&(e.type="INSERT_ATTRIBUTE"),"IGNORE_ATTRIBUTE"===e.type&&(e.type=e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)}));var f=n(p,c,d);return t(u,(function(e,t){t&&-1!==this.indexOf(t.uri)&&(t.ignored=!0,delete t.ov,t.hidden=!0)}),f.ignored,!0),{attributes:u,appearance:f.appearance}};const o=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=ke({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:a,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?a(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[i,s]=o(e?e.roles:[],t.roles),[l,u]=o(e?e.tags:[],t.tags);return{attributes:r,appearance:ke({},n,{roles:s,tags:u}),roles:i,tags:l}}}},xe=r(76665);let $e,Ve,Ge,We,Ye,Be,qe,He,Qe,Ke,Je,Xe,ze,Ze,et,tt,rt,nt,it,at,ot,st,lt,ut,ct,pt,dt,yt,ft,Tt,Et,mt;var ht;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}($e||($e={})),function(e){e.local="local",e.validationService="validationService"}(Ve||(Ve={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(Ge||(Ge={})),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"}(We||(We={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(Ye||(Ye={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(Be||(Be={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(qe||(qe={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(He||(He={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(Qe||(Qe={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Ke||(Ke={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Je||(Je={})),function(e){e.PROFILE="profile",e.MAP="map"}(Xe||(Xe={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(ze||(ze={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(Ze||(Ze={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(et||(et={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(tt||(tt={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(rt||(rt={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(nt||(nt={})),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"}(it||(it={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(at||(at={})),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"}(ot||(ot={})),function(e){e.IN="in",e.OUT="out"}(st||(st={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(lt||(lt={})),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"}(ut||(ut={})),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"}(ct||(ct={})),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.SingleAttributeView="com.reltio.plugins.entity.attributes.SingleAttributeView",e.TableAttributeView="com.reltio.plugins.entity.attributes.AttributeTableView",e.CustomView="com.reltio.plugins.ui.CustomActionView",e.MapView="com.reltio.plugins.react.EntityMapView",e.ImageAttributeView="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatchesView="com.reltio.plugins.entity.PotentialMatchesView"}(pt||(pt={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(dt||(dt={})),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.Search="SearchView"}(yt||(yt={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(ft||(ft={})),function(e){e.NEW="new",e.CLASSIC="classic"}(Tt||(Tt={})),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"}(Et||(Et={})),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"}(mt||(mt={})),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"}(ht||(ht={}));const bt=ht;let Ot,vt;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(Ot||(Ot={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(vt||(vt={}));const gt=(0,l.prop)("referencedEntityTypeURI"),_t=(0,l.prop)("relationshipTypeURI"),At=(0,l.prop)("referencedAttributeURIs"),Nt=(0,l.curry)(((e,t)=>(0,l.pipe)(At,(0,l.filter)((0,l.startsWith)(e)))(t))),Pt=Nt("configuration/relationTypes"),Rt=Nt("configuration/entityTypes"),St=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),wt=(0,l.filter)(St),It=(e,t)=>!t||t.some((t=>t===e.uri)),Ut="1Tempo4rary",Ct="1Tepmo4Rel",Lt=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),jt=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,Dt=e=>()=>jt(e),kt=(e,t)=>{const r=Lt(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return jt(n)},Ft=e=>e&&e.includes("uri$$"),Mt=Dt("entities"),xt=Dt("relations"),$t=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),Vt=(0,l.startsWith)("relations/"),Gt=(0,l.startsWith)("entities/"),Wt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Yt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),Bt=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),qt=(0,l.pipe)((0,l.split)("/"),l.head),Ht=(0,l.pipe)((0,l.split)("/"),l.last),Qt=e=>e.split(".").slice(0,2).join("."),Kt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},Jt=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),Xt=(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("/")},zt=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},Zt=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),er=e=>2===e.split("/").length,tr=e=>5===e.split("/").length,rr=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},nr=e=>e.replace(/uri\$\$/g,Ut);function ir(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ar=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,Wt),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",bt.TYPE_STRING)]),or=(0,l.has)("values"),sr=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(bt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(bt.TYPE_LOOKUP)],[or,(0,l.always)(bt.TYPE_ENUM)],[ar,(0,l.always)(bt.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",bt.TYPE_BOOLEAN),(0,l.always)(bt.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),lr=(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){ir(e,t,r[t])}))}return e}({},e,{type:sr(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),ur=e=>!!e&&(!!e.autoGenerated&&e.type!==bt.TYPE_NESTED||!!e.parentAutoGenerated),cr=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),pr=(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),dr=e=>cr(e)?"analyticsAttributes":"attributes",yr=(0,l.propEq)("hidden",!0),fr=(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))),Tr=fr(bt.TYPE_NESTED),Er=fr(bt.TYPE_REFERENCE),mr=fr(bt.TYPE_IMAGE),hr=(0,l.either)(Tr,Er),br=(e,t)=>{const r=cr(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(".")},Or=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),vr=(0,l.pipe)(Or,Boolean),gr=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),_r=(0,l.both)(vr,(0,l.pipe)(Or,("rdm",(0,l.pipe)(qt,(0,l.equals)("rdm")))));const Ar=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=dr({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]||Pr(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:[]},Nr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Ar(e,t,r);return n.length?(0,l.last)(n):null},Pr=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",bt.TYPE_NESTED),(0,l.propEq)("type",bt.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",bt.TYPE_REFERENCE),(0,l.pipe)(At,(0,l.map)((t=>Nr(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},Rr=[bt.TYPE_ACTIVENESS_DATE,bt.TYPE_DATE,bt.TYPE_TIMESTAMP,bt.TYPE_LOCAL_DATE],Sr=[bt.TYPE_ACTIVENESS_DATE,bt.TYPE_TIMESTAMP,bt.TYPE_LOCAL_DATE],wr=e=>Rr.includes(e),Ir=e=>Sr.includes(e),Ur=[bt.TYPE_INT,bt.TYPE_LONG,bt.TYPE_NUMBER,bt.TYPE_FLOAT,bt.TYPE_DOUBLE,bt.TYPE_COUNT],Cr=e=>Ur.includes(e),Lr=e=>[bt.TYPE_FLOAT,bt.TYPE_DOUBLE].includes(e),jr=[bt.TYPE_BOOLEAN,bt.TYPE_BOOLEAN_RADIO,bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Dr=e=>jr.includes(e),kr=[bt.TYPE_URL,bt.TYPE_BLOG_URL,bt.TYPE_IMAGE_URL],Fr=e=>kr.includes(e),Mr=fr(bt.TYPE_EMAIL),xr=e=>bt.TYPE_SSN===e;var $r,Vr=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}($r||($r={}));const Gr=(0,l.curry)(((e,t,r)=>{var n;const i=e===$r.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)))})),Wr=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Yr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),Wr),Br=(0,l.pipe)((0,l.reject)(E),Yr),qr=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),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("?")?"&":"?")+Wr(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;return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f}},Hr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Qr=(0,l.equals)(Hr.SUGGESTING),Kr=(0,l.equals)(Hr.EDITING),Jr=(0,l.equals)(Hr.VIEWING),Xr=(0,l.either)(Kr,Qr),zr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Zr=(0,l.curry)(((e,t)=>(0,l.pipe)(zr(e),(0,l.prop)("extendsTypeURI"))(t))),en=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Zr(e,r)));return n(r)})),tn=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Zr(e,n);return r})),rn=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?rn(e,zr(e,t.extendsTypeURI),r):void 0,nn=(e,t)=>{const r=t.map(tn(e));return(r.length?r.reduce(l.intersection):[])[0]},an=(e,t)=>rn(e,(0,l.is)(Object,t)?t:zr(e,t),"typeImage"),on=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&en(e,t,n.uri)?r.concat(n.uri):r),[]),sn={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"},ln={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},un={[sn.EQUALS]:"equals",[sn.NOT_EQUALS]:"not",[sn.STARTS_WITH]:"starts with",[sn.MISSING_VALUE]:"missing value",[sn.IN_RANGE]:"in range",[sn.HAS_ALL]:"has all",[sn.FULL_TEXT]:"full text",[sn.EXISTS]:"exists",[sn.COUNT_EQUALS]:"count equals",[sn.COUNT_NOT_EQUALS]:"count not equal",[sn.COUNT_LT]:"count less",[sn.COUNT_LTE]:"count less or equal",[sn.COUNT_GT]:"count greater",[sn.COUNT_GTE]:"count greater or equal",[sn.COUNT_RANGE]:"count in range",[sn.LT]:"less than",[sn.LTE]:"less than or equal",[sn.GT]:"greater than",[sn.GTE]:"greater than or equal",[sn.IN_FILE]:"in file",[sn.NOT_IN_FILE]:"not in file",[sn.CONTAINS]:"contains",[sn.ON]:"on",[sn.BEFORE]:"before",[sn.AFTER]:"after",[sn.WITHIN]:"within"},cn="in",pn="notIn",dn="not range",yn=e=>({[cn]:sn.EQUALS,[pn]:sn.NOT_EQUALS}[e]||e),fn={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},Tn={[fn.LAST_DAY]:"Last 24 hours",[fn.LAST_3DAYS]:"Last 3 days",[fn.LAST_WEEK]:"Last week",[fn.LAST_MONTH]:"Last month",[fn.LAST_YEAR]:"Last year",[fn.PICK_DATE]:"Pick date"},En={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},mn={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},hn="<No label>",bn={IN:"in",OUT:"out"};var On=r(87918),vn=r.n(On);function gn(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}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 An={startDate:{type:bt.TYPE_ACTIVENESS_DATE,get label(){return vn().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:bt.TYPE_ACTIVENESS_DATE,get label(){return vn().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},Nn=gn({id:{type:bt.TYPE_ENTITY_ID,get label(){return vn().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},An,{roles:{type:bt.TYPE_STRING,get label(){return vn().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:bt.TYPE_STRING,get label(){return vn().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),Pn={workflow:{type:bt.TYPE_STRING,get label(){return vn().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:bt.TYPE_STRING,get label(){return vn().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:bt.TYPE_STRING,get label(){return vn().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},Rn={commenter:{type:bt.TYPE_STRING,get label(){return vn().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Sn={notResolved:{type:bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return vn().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},wn={createdBy:{type:bt.TYPE_STRING,get label(){return vn().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:bt.TYPE_STRING,get label(){return vn().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},In={matches:{type:bt.TYPE_COUNT,get label(){return vn().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:bt.TYPE_COUNT,get label(){return vn().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},Un={sourceSystems:{type:bt.TYPE_STRING,get label(){return vn().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:bt.TYPE_STRING,get label(){return vn().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:bt.TYPE_INT,get label(){return vn().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:bt.TYPE_TIMESTAMP,get label(){return vn().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:bt.TYPE_STRING,get label(){return vn().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let Cn;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(Cn||(Cn={}));const Ln={[Cn.matchRules]:{type:bt.TYPE_STRING,get label(){return vn().text("Match Rules")},uri:Cn.matchRules,name:Cn.matchRules,faceted:!0,hideForDataTenant:!0},[Cn.MLRecommendedMatch]:{type:bt.TYPE_STRING,get label(){return vn().text("Match IQ")},uri:Cn.MLRecommendedMatch,name:Cn.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},jn=gn({},Nn,Pn,Rn,Sn,wn,In,Un,Ln,{type:{type:bt.TYPE_STRING,get label(){return vn().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),Dn="NOT_MATCH";var kn=r(13980),Fn=r.n(kn);function Mn(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){xn(e,t,r[t])}))}return e}function xn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $n=Fn().oneOf(["mobile","tablet","desktop"]),Vn=Fn().shape({deviceTypes:Fn().oneOfType([$n,Fn().arrayOf($n)]),roles:Fn().arrayOf(Fn().string)}),Gn=Fn().shape({value:Fn().string,lookupCode:Fn().string}),Wn=Fn().shape({link:Fn().string,filename:Fn().string}),Yn=Fn().shape({displayName:Fn().string,parent:Fn().string}),Bn=Fn().oneOfType([Fn().string,Fn().number,Fn().bool,Gn]),qn=Fn().oneOfType([Bn,Fn().arrayOf(Bn)]),Hn=Fn().shape({fieldName:Fn().string,values:Fn().arrayOf(qn),filter:Fn().string,type:Fn().string}),Qn=Fn().shape({minValue:Fn().number,maxValue:Fn().number}),Kn=Fn().shape({label:Fn().string,name:Fn().string,description:Fn().string,type:Fn().string,hidden:Fn().bool,faceted:Fn().bool,searchable:Fn().bool,uri:Fn().string,access:Fn().arrayOf(Fn().string),cardinality:Qn}),Jn=Fn().shape({label:Fn().string,uri:Fn().string,typeColor:Fn().string,direction:Fn().string,startObject:Fn().object,endObject:Fn().object}),Xn=Fn().shape({typeColor:Fn().string,typeIcon:Fn().string,typeImage:Fn().string,label:Fn().string,uri:Fn().string,attributes:Fn().arrayOf(Kn)}),zn=Fn().shape({uri:Fn().string,label:Fn().string,memberTypes:Fn().array,extendsTypeUri:Fn().string,attributes:Fn().arrayOf(Kn)}),Zn=Fn().shape({uri:Fn().string,label:Fn().string,extendsTypeUri:Fn().string,relationshipTypeURIs:Fn().arrayOf(Fn().string)}),ei=Fn().shape({uri:Fn().string,description:Fn().string,label:Fn().string,schemaVersion:Fn().string,entityTypes:Fn().arrayOf(Xn),roles:Fn().arrayOf(Fn().object),groupTypes:Fn().arrayOf(Fn().object),relationTypes:Fn().arrayOf(Jn),graphTypes:Fn().arrayOf(Zn),interactionTypes:Fn().arrayOf(zn),sources:Fn().arrayOf(Fn().object)}),ti=Fn().shape({uri:Fn().string,type:Fn().string}),ri=Fn().shape({uri:Fn().string,attributes:Fn().object,type:Fn().string,timestamp:Fn().number,members:Fn().object}),ni=Fn().shape({uri:Fn().string,type:Fn().string}),ii=Fn().shape({value:Fn().object,ov:Fn().bool,type:Fn().string,uri:Fn().string}),ai=Fn().shape({refEntity:Fn().oneOfType([Fn().array,Fn().object]),refRelation:Fn().oneOfType([Fn().array,Fn().object]),value:Fn().object,ov:Fn().bool,type:Fn().string,uri:Fn().string}),oi=Fn().oneOf((0,l.values)(Hr)),si=Fn().shape({type:Fn().oneOf(Object.values($e)).isRequired,attributeTypeUri:Fn().string.isRequired,parentUri:Fn().string.isRequired,uri:Fn().string,message:Fn().string}),li={attributeType:Kn,showEmptyEditors:Fn().bool,lazy:Fn().bool,mode:oi,metadata:ei,ownError:si,errors:Fn().arrayOf(si),crosswalks:Fn().array,onAddAttributes:Fn().func,onAddOneMore:Fn().func,onDeleteAttribute:Fn().func,onChangeAttribute:Fn().func,additionalControlsRenderer:Fn().func,hideDeleteButton:Fn().bool,showNonOv:Fn().bool,state:Fn().oneOf(["deleted","edited"]),expanded:Fn().bool},ui=Mn({attributeValue:ii},li),ci=Mn({attributeValue:ai},li),pi=Fn().shape({value:Fn().oneOfType([Fn().string,Fn().bool,Fn().number]),ov:Fn().bool,type:Fn().string,uri:Fn().string,lookupCode:Fn().string,lookupRawValue:Fn().string}),di=Fn().shape({totalOvValues:Fn().number,totalValues:Fn().number}),yi=Fn().shape({inRelations:Fn().arrayOf(Fn().oneOfType([Fn().object,Fn().string])),outRelations:Fn().arrayOf(Fn().oneOfType([Fn().object,Fn().string])),groups:Fn().arrayOf(Fn().string),entityTypes:Fn().arrayOf(Fn().string),nextEntry:Fn().object}),fi=Fn().oneOf(["asc","desc"]),Ti=Fn().shape({id:Fn().string,content:yi,allowOnlyCreateNew:Fn().bool,sortColumn:Fn().string,sortOrder:fi,"text-empty":Fn().string,max:Fn().number,icon:Fn().string,caption:Fn().string,canCreate:Vn,canRead:Vn,canUpdate:Vn,canDelete:Vn,editingEnabled:Fn().bool}),Ei=Fn().shape({id:Fn().string,graph:Fn().shape({type:Fn().string,layout:Fn().number,deep:Fn().number,limit:Fn().number,uri:Fn().string,options:Fn().shape({reverseRelations:Fn().bool})}),sortBy:Fn().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:fi,max:Fn().number,icon:Fn().string,caption:Fn().string,canCreate:Vn,canRead:Vn,canUpdate:Vn,canDelete:Vn}),mi=Fn().shape({id:Fn().string,caption:Fn().string,pageSize:Fn().number,icon:Fn().string,canCreate:Vn,canRead:Vn,canUpdate:Vn,canDelete:Vn,attributes:Fn().object}),hi=Fn().shape({entityUri:Fn().string,entityType:Fn().string,entityLabel:Fn().string,object:ti}),bi=Fn().shape({relationUri:Fn().string,relationType:Fn().string,relationLabel:Fn().string,direction:Fn().string,object:ni}),Oi=Fn().shape({entity:hi,relation:bi}),vi=Fn().shape({value:Fn().string,isRawFilter:Fn().bool}),gi=Fn().shape({id:Fn().string,label:Fn().string,name:Fn().string,availableEntityTypes:Fn().array}),_i=Fn().shape({id:Fn().string,allowMergeAll:Fn().bool,matchActions:Fn().object,availableTabs:Fn().arrayOf(Fn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),Ai=Fn().shape({matchRules:Fn().arrayOf(Fn().string),object:ti,shortestTransitiveMatchPath:Fn().arrayOf(Fn().shape({matchRules:Fn().arrayOf(Fn().string),match:Fn().string})),direct:Fn().bool,matchScore:Fn().number}),Ni=Fn().arrayOf(Ai),Pi=Fn().arrayOf(Fn().shape({uri:Fn().string,label:Fn().string})),Ri=[{label:vn().text("And"),value:"and"},{label:vn().text("Or"),value:"or"},{label:vn().text("And not"),value:"and not"},{label:vn().text("Or not"),value:"or not"}];function Si(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wi=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Ii=(0,l.pipe)(wi,(0,l.propOr)("","label")),Ui=(0,l.curry)(((e,t)=>{const r=wi(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Ci=(0,l.curry)(((e,t,r)=>{const[n,i]=Ui(e,r);return en(e,n,t)||en(e,i,t)})),Li=(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){Si(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),ji=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?bn.OUT:bn.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(bn.IN),i=r(bn.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Di=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),ki={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},Fi=(0,l.curry)(((e,t)=>e.every((e=>Mi(e,t))))),Mi=(0,l.curry)(((e,t)=>{const r=ur(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)&&(Qr(t)?Mi(ki.INITIATE_CHANGE_REQUEST,r):Mi(e,r)))),Vi=$i(ki.CREATE),Gi=$i(ki.DELETE),Wi=$i(ki.UPDATE),Yi=Fi([ki.CREATE,ki.MERGE,ki.READ,ki.UPDATE]),Bi=Fi([ki.UPDATE,ki.READ,ki.CREATE]),qi=Fi([ki.UPDATE,ki.READ]),Hi=Fi([ki.DELETE,ki.UPDATE,ki.READ]),Qi=(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)(Qi(e,t)),(0,l.filter)(l.identity))(r),Ji=(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=wi(e,n),[a,o]=Ui(e,n);return i&&Mi(ki.CREATE,i)&&en(e,a,t.type)&&en(e,o,r.type)})),zi=(e,t,r,n,i)=>{const a=zr(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=zr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Ji(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=cr,ra=(0,l.complement)(ta),na=Mi(ki.READ),ia=e=>{let{attributeType:t,mode:r}=e;return ra(t)&&Vi(r,t)&&!yr(t)},aa=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=Ft(r.uri),o=Wi(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=Ft(r.uri),s=Wi(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=Pr(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)=>Qr(t)?sa(ki.INITIATE_CHANGE_REQUEST,r,n,i):sa(e,r,n,i))),ua=(0,l.both)((0,l.complement)(yr),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;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",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"},Ta={[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]),La=Ea([fa.CAN_EXECUTE_WORKFLOW_JOBS]),ja=Ea([fa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),Da=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]),Wa=Ea([fa.CAN_READ_MDM_DATA_ENTITIES]),Ya=Ea([fa.CAN_READ_DVF]),Ba=Ea([fa.IS_FREEMIUM_ADMIN]),qa=(0,l.reject)(yr),Ha=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),qa,(0,l.filter)(e))(t),Qa=(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))),Ja=(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)(zr,(0,l.converge)(l.concat,[za,Za]));function to(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){ro(e,t,r[t])}))}return e}function ro(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const no=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,no(e)))},t))),io=e=>{var t;return to({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},ao=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),oo=(0,l.when)(ao,(0,l.dissoc)("values")),so=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return to({},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})})),lo=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},uo=(0,Vr.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Xa,t).concat((0,l.chain)(Xa,r)).some(lo)})),co=e=>{let t=!1;const r=no((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?to({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},po=e=>{const t=uo(e),r=(0,l.map)((e=>no((0,l.pipe)(oo,(0,l.when)((0,l.always)(e),so))))(t)),n=(0,l.map)(io),i=(0,l.map)(co);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},yo=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),fo=(0,l.prop)("relationshipTypeURIs"),To=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(Eo(e,t)))||[]})),Eo=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(Ci(e,t))},mo=(e,t)=>(0,l.pipe)(yo,(0,l.defaultTo)({}),fo,(0,l.defaultTo)([]),(0,l.chain)(Ui(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(zr(e)))(e,t),ho=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),bo=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),Oo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bo((0,l.complement)(ho))(e)},vo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bo(ho)(e)},go=(0,l.pipe)(zr,(0,l.propOr)([],"matchGroups")),_o=(e,t,r)=>(0,l.pipe)(go,(0,l.find)((0,l.propEq)("uri",r)))(e,t),Ao=(0,l.curry)(((e,t,r)=>(0,l.pipe)(_o,(0,l.propOr)(r,"label"))(e,t,r))),No=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(go,(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]})),Po=e=>(0,l.partition)(ho,e),Ro=(0,l.includes)(l.__,["and","or","not"]),So=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),wo=(0,l.includes)(l.__,["equals","notEquals","in"]),Io=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return Ro(t)?Io(r):So(t)?r.filter(Wt):wo(t)?r.map((0,l.prop)("uri")).filter(Wt):[]})),l.uniq),Uo=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(Io),l.uniq),Co=(0,l.pipe)(go,Uo),Lo=(0,l.pipe)(No,Uo),jo=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},Do=(0,l.pipe)(jo,za),ko=(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||en(e,n,t)})(e,t))})(e,t)),Fo=e=>!!e.required,Mo=(e,t,r)=>{const n=(0,l.cond)([[Wt,zr(e)],[Yt,wi(e)]])(t);return xo(e,n,r)},xo=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&Wt(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!ur(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===bt.TYPE_REFERENCE){const n=_t(t),a=At(t);i=Mo(e,n,r).filter((e=>a.some(Bt(e.uri))))}else t.attributes&&(i=xo(e,t,r));i&&n.push(...i)}return n})):t.type===bt.TYPE_REFERENCE?Mo(e,_t(t),r):[],$o=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),Fo]),e.attributes||[])},Vo=(e,t)=>{const r=Rt(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},Go=(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)?vn().text(n):n};return r(null,t)})),Wo=["label","description","abbreviation","caption","toolTip"],Yo=e=>Go(Wo,e),Bo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Ht(t);return r.find((e=>{let{uri:t}=e;return Ht(t)===n}))})),qo=(0,l.curry)(((e,t)=>{const r=Ht(t);return(0,l.pipe)(Bo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),Ho=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"})},Qo=(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}))},Ko=(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)})),Jo=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=zr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function Xo(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){zo(e,t,r[t])}))}return e}function zo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Zo=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 es(i,e,t,r,n)},es=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]:["attributes"];return Z.fromNull(e&&e.length?e:Pr(t,r)).map((e=>e.map((e=>{const r=Zo(t,e,n,i);return r.length?Xo({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(hr),(0,l.prop)("children"))).filter(ua).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},ts=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Zo(e,t,r,["attributes","analyticsAttributes"])},rs=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Zo(e,t,r,["attributes"])},ns=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Zo(e,t,r,["analyticsAttributes"])},is=(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)})),as=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Ht(r)===e})))),os=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),as("LUD")),(0,l.defaultTo)(r))(t||[])},ss=(e,t)=>{let{survivorshipStrategies:r}=e;return as(t,r)},ls=(0,l.allPass)([(0,l.complement)(l.isNil),Mi(ki.READ)]),us=(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)]),cs=(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)])]),ps=(0,l.curryN)(2,(0,l.pipe)(zr,us)),ds=e=>{let{ov:t}=e;return!1!==t},ys=(e,t)=>((e,t)=>Fr(e.type)&&ae(t))(e,t)||((e,t)=>Mr(e.type)&&oe(t))(e,t),fs=(0,l.curry)(((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))),Ts=fs("refEntity"),Es=fs("refRelation"),ms=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],hs=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},bs=(0,l.prop)("objectURI"),Os=(0,l.prop)("objectURI"),vs=(0,l.prop)("type"),gs=(0,l.pipe)(Ts,(0,l.defaultTo)({}),bs),_s=(0,l.pipe)(Es,(0,l.defaultTo)({}),Os),As=(0,l.pipe)(Ts,(0,l.defaultTo)({}),vs),Ns=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Ps=(0,l.evolve)({refEntity:re,refRelation:re}),Rs=(e,t,r,n)=>{const i=Ar(e,r),a=zr(e,t.type)||wi(e,t.type);if(0===i.length)return null;const o=dr(r);let s=[t],l=1;i[0].uri!==t.type&&(l=0);let u=null;const c=n?[]:null;let p=null;for(let e=l;e<i.length;++e){const t=e===i.length-1,r=i[e];let l=[];if(!It(r,p)){u=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const u=s.value||s[o]||{};let d=[];r.startObject&&r.endObject||r.typeColor?(d=a.attributes.filter((e=>_t(e)===r.uri||gt(e)===r.uri)),p=d.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(d.push(r),p=null),d.forEach((a=>{const o=u[a.name];o&&(l=l.concat(o)),n&&t&&c.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=l),t&&(u=s)}return c||u},Ss=(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?Ss(a.value,o):a},ws=(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 Ss(e[r],i)})),Is=(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")]]),Us=(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"])]]),Cs=(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)(Cs(e,i)))))(r)})),Ls=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Ls(e)),e)(t))),js=(0,l.curry)(((e,t,r,n)=>(0,l.pipe)(Cs(e,r),Ls(t))(n))),Ds=js(null,Is),ks=js(ds,Is),Fs=js(null,Us),Ms=js(ds,Us),xs=(e,t,r)=>{var n,i,a;return e.uri===t?null==e||null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=ws(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},$s=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(gs,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Vs=Object.values(An),Gs=(0,l.includes)(l.__,Vs),Ws=e=>Vs.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function Ys(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){Bs(e,t,r[t])}))}return e}function Bs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qs=(e,t)=>`${e}_${t}`,Hs=[jn.matches.name,jn.matchRules.name],Qs=(0,l.values)(Pn).map((e=>e.name)),Ks=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Qs)))),Js=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Hs)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>qs(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),Xs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Ks(r),Js(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(qs(`dtPotentialMatches.${t.name}`,"")))))(jn)},zs=(0,l.propEq)("uri",jn.type.uri),Zs=e=>(0,l.values)(Ln).some((0,l.propEq)("uri",null==e?void 0:e.uri)),el=(0,l.propEq)("uri",Un.sourceSystems.uri),tl=Object.values(Nn),rl=(0,l.includes)(l.__,tl),nl=e=>{let{entity:t,attributeType:r,value:n}=e;return Ys({},t,{[r.uri]:void 0===n?r.defaultValue:n})},il=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},al=e=>{let{entity:t,attributeType:r,value:n}=e;return Ys({},t,{[r.uri]:n})},ol=(0,l.propEq)("uri",Nn.roles.uri),sl=(0,l.propEq)("uri",Nn.tags.uri);function ll(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){ul(e,t,r[t])}))}return e}function ul(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cl=e=>{let{parentUri:t,attributeType:r}=e;return ll({uri:kt(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[hr,(0,l.always)({value:{}})],[vr,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),wr)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},pl=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Qa(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),gr,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=cl({parentUri:r,attributeType:e});let s=Pr(n,e);s&&(e.type===bt.TYPE_REFERENCE&&(s=wt(s)),a.value=pl({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||gr(e))&&(o[t]=[a])}return o},dl=e=>{let{entity:t,metadata:r}=e;return Mo(r,t.type,!0).filter(gr).reduce(((e,t)=>{const n=t.name,i=rr(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:Rs(r,e,i).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,r)=>{let{parentUri:i,attributes:a}=r;return a[n]&&0!==a[n].length?e:fl({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},yl=(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===bt.TYPE_NESTED?ll({},e,{value:yl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return ll({},s(t),pl({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),fl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=cl({parentUri:n,attributeType:r}),u=Is(l);return(0,xe.ZP)(t,(e=>{Se(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},Tl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,xe.ZP)(t,(e=>{Se(e.attributes||e.value,r,n.uri,Is(n),a,o,i)}))},El=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,xe.ZP)(t,(e=>{we(e.attributes||e.value,r,n,i,a,o)}))},ml=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,xe.ZP)(t,(e=>{Ue(e.attributes||e.value,r,n,i)}))},hl=e=>""===e,bl=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([hl,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([hl,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]]),Ol=(0,l.reject)(bl),vl=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=>vl({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),Ol)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},gl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return vl({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Ps),deleteEmptyComplex:e})},_l=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(gl(e),(0,l.reject)(l.isEmpty))},Al=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Gs(r)?nl({entity:e,attributeType:r}):fl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),Nl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Gs(r)?al({entity:e,attributeType:r,value:i}):El({entity:e,attributeType:r,uri:n,value:i})})),Pl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Gs(r)?il({entity:e,attributeType:r}):ml({entity:e,attributeType:r,uri:n})})),Rl=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)},Sl="UrlThumbnail",wl="CdnUrlThumbnail",Il=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(ds):(0,l.head)(n);return e&&e.value}return null})),Ul=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>Il(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Cl=Ul(["CdnUrl","Url"],!0),Ll=Ul(["CdnUrlPreview","UrlPreview"],!0),jl=Ul([wl,Sl],!0),Dl=Ul([wl,Sl]),kl=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[pr,(0,l.always)(t)],[(0,l.both)(cr,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=pr(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Gs(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ne)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Fl=(e,t,r)=>{const n=Ja(e),i=(0,l.any)(r?l.T:ds);return kl(n,t,i)},Ml=(e,t,r,n,i,a)=>{const o=Ft(null==r?void 0:r.uri)?Qa(t,e):Ka(t,e);return kl(o,r,((e,o)=>{const s=ia({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:ds,e)||pr(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let xl;const $l=e=>{xl=e};function Vl(e,t){return xl(e,t)}const Gl=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)})),Wl=50,Yl=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=Wl,offset:a=0}=e;return Vl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},Bl=(0,l.once)((()=>Vl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),ql=e=>Vl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Hl=(e,t)=>Vl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),Ql=e=>Z.fromNull(un[e]).map(vn().text).orSome(""),Kl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Jl=(0,l.split)("_"),Xl=(0,l.includes)("_"),zl=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),Zl=(0,l.curry)(((e,t)=>e.some(zl(t)))),eu=Zl([sn.IN_RANGE,sn.COUNT_RANGE,sn.WITHIN]),tu=Zl([sn.EXISTS,sn.MISSING_VALUE]),ru=(0,l.cond)([[tu,(0,l.always)(0)],[eu,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),nu=(0,l.complement)(tu),iu=Zl([sn.HAS_ALL,sn.EQUALS,sn.NOT_EQUALS]),au=Zl([sn.COUNT_EQUALS,sn.COUNT_NOT_EQUALS,sn.COUNT_LT,sn.COUNT_LTE,sn.COUNT_GT,sn.COUNT_GTE,sn.COUNT_RANGE]),ou=Zl([sn.IN_FILE,sn.NOT_IN_FILE]),su=e=>{switch(e){case sn.COUNT_EQUALS:return sn.EQUALS;case sn.COUNT_NOT_EQUALS:return sn.NOT_EQUALS;case sn.COUNT_LT:return sn.LT;case sn.COUNT_LTE:return sn.LTE;case sn.COUNT_GT:return sn.GT;case sn.COUNT_GTE:return sn.GTE;case sn.COUNT_RANGE:return sn.IN_RANGE}},lu=Zl([sn.ON,sn.BEFORE,sn.AFTER,sn.WITHIN,sn.NOT_EQUALS]),uu=Zl([sn.WITHIN]),cu=[[sn.COUNT_EQUALS,sn.COUNT_NOT_EQUALS,sn.COUNT_LT,sn.COUNT_LTE,sn.COUNT_GT,sn.COUNT_GTE],[sn.NOT_IN_FILE,sn.IN_FILE],[sn.EQUALS,sn.NOT_EQUALS,sn.HAS_ALL],[sn.LT,sn.LTE,sn.GT,sn.GTE],[sn.MISSING_VALUE,sn.EXISTS],[sn.COUNT_RANGE],[sn.IN_RANGE],[sn.STARTS_WITH,sn.CONTAINS],[sn.FULL_TEXT],[sn.ON,sn.BEFORE,sn.AFTER,sn.NOT_EQUALS],[sn.WITHIN]],pu=(e,t)=>cu.some((r=>r.includes(e)&&r.includes(t))),du=(0,l.pipe)(l.omit,l.values),yu={OPTIONS_FOR_STRING:du(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],sn),OPTIONS_FOR_DATE:[sn.ON,sn.BEFORE,sn.AFTER,sn.WITHIN,sn.NOT_EQUALS,sn.MISSING_VALUE,sn.EXISTS,sn.COUNT_EQUALS,sn.COUNT_NOT_EQUALS,sn.COUNT_LT,sn.COUNT_LTE,sn.COUNT_GT,sn.COUNT_GTE,sn.COUNT_RANGE,sn.IN_FILE,sn.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:du(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],sn),OPTIONS_FOR_BLOB:du(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],sn),OPTIONS_FOR_NUMBER:du(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],sn),OPTIONS_FOR_LOOKUP:du(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],sn),OPTIONS_FOR_ENUM:du(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],sn),OPTIONS_FOR_ID:[sn.EQUALS,sn.NOT_EQUALS,sn.IN_FILE,sn.NOT_IN_FILE],OPTIONS_FOR_COUNT:[sn.EQUALS,sn.NOT_EQUALS,sn.LT,sn.LTE,sn.GT,sn.GTE,sn.IN_RANGE],OPTIONS_FOR_COMPLEX:[sn.COUNT_EQUALS,sn.COUNT_NOT_EQUALS,sn.COUNT_LT,sn.COUNT_LTE,sn.COUNT_GT,sn.COUNT_GTE,sn.COUNT_RANGE,sn.EXISTS,sn.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[sn.EQUALS,sn.NOT_EQUALS,sn.EXISTS,sn.MISSING_VALUE]},fu=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case bt.TYPE_TYPEAHEAD:case bt.TYPE_STRING:case bt.TYPE_PASSWORD:case bt.TYPE_TEXT:case bt.TYPE_CIK_ID:case bt.TYPE_URL:case bt.TYPE_BLOG_URL:case bt.TYPE_IMAGE_URL:case bt.TYPE_EMAIL:return yu.OPTIONS_FOR_STRING;case bt.TYPE_LOOKUP:case bt.TYPE_DEPENDENT_LOOKUP:return yu.OPTIONS_FOR_LOOKUP;case bt.TYPE_ENUM:return yu.OPTIONS_FOR_ENUM;case bt.TYPE_DATE:case bt.TYPE_ACTIVENESS_DATE:case bt.TYPE_TIMESTAMP:case bt.TYPE_LOCAL_DATE:return yu.OPTIONS_FOR_DATE;case bt.TYPE_BOOLEAN:case bt.TYPE_BOOLEAN_RADIO:return yu.OPTIONS_FOR_BOOLEAN;case bt.TYPE_BLOB:return yu.OPTIONS_FOR_BLOB;case bt.TYPE_LONG:case bt.TYPE_INT:case bt.TYPE_FLOAT:case bt.TYPE_DOUBLE:case bt.TYPE_NUMBER:return yu.OPTIONS_FOR_NUMBER;case bt.TYPE_ENTITY_ID:return yu.OPTIONS_FOR_ID;case bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[sn.EQUALS];case bt.TYPE_COUNT:return yu.OPTIONS_FOR_COUNT;case bt.TYPE_NESTED:case bt.TYPE_REFERENCE:case bt.TYPE_IMAGE:return yu.OPTIONS_FOR_COMPLEX;default:return yu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(au,n):n},Tu=e=>[Qe.and,Qe.andNot].includes(e),Eu=e=>[Qe.or,Qe.orNot].includes(e),mu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),Eu)),hu=(bu=[Qe.and],e=>e.slice(0,-1).every((e=>bu.includes(e.operator))));var bu;const Ou=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),vu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),gu=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},_u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[Qe.or,Qe.orNot],n=t?[Qe.and,Qe.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)&&gu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},Au="and",Nu=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)(Au,n,e),o=(e=>[Qe.andNot,Qe.orNot].includes(e))(a)?_u(r):r;return i?o:`${t} ${a} ${o}`}),"")}},Pu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),Ru=e=>Array.isArray(e)?e.map(Ru).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),Su=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),wu=e=>`'${e}'`,Iu=e=>`"${e}"`,Uu=(0,l.pipe)(Ru,Su),Cu=(0,l.pipe)(Uu,wu),Lu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(eu(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),ju=(e,t)=>au(t)?{type:bt.TYPE_INT}:ou(t)?{type:bt.TYPE_FILE}:lu(t)&&!uu(t)&&Ir(e.type)?{type:bt.TYPE_LOCAL_DATE}:e,Du=Object.values(fn),ku=e=>Du.includes(e),Fu=e=>vn().text(Tn[e]),Mu=e=>{const t=f()();switch(e){case fn.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case fn.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case fn.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case fn.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case fn.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function xu(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){$u(e,t,r[t])}))}return e}function $u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Vu=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),Gu=(0,l.curry)(((e,t,r)=>{const n=r.map(eu(e)||t.endsWith(".count")?Uu:Cu).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Wu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Yu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=ru(t);return(0,l.pipe)(Wu(i),(0,l.map)(Gu(t,r)),Vu(" or "))(n)},Bu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Cu).join(",")})`},qu=e=>`*${e}*`,Hu=e=>`URL:${e}`,Qu=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Ku=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===sn.IN_FILE?r:`not ${r}`},Ju=(e,t)=>[R(e,t),S(e,t)],Xu=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!zu(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case sn.ON:return xu({},e,n?{filter:sn.EQUALS}:{filter:sn.IN_RANGE,values:[Ju(i,n)]});case sn.BEFORE:return xu({},e,{filter:sn.LTE,values:[[S(i,n)]]});case sn.AFTER:return xu({},e,{filter:sn.GTE,values:[[R(i,n)]]});case sn.WITHIN:return xu({},e,{filter:sn.IN_RANGE,values:[Mu(i)]})}}return e}),Yu),zu=(0,l.propSatisfies)(Ir,"type"),Zu=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",sn.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Yu({filter:sn.EQUALS,fieldName:t,values:[r]}))),new Nu).build())),Vu(" or "))(r)}],[(0,l.propEq)("filter",sn.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Yu({fieldName:r,filter:t,values:n.map((0,l.pipe)(Ru,qu))})}],[(0,l.propEq)("filter",sn.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Yu(xu({},e,{values:(0,l.flatten)(r)})):Qu(r)?Bu(xu({},e,{filter:"listEquals"})):Yu(e)}],[(0,l.propEq)("filter",sn.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=ru(t);return(0,l.pipe)(Wu(i),(0,l.map)(Gu(t,r)),Vu(" and "))(n)})(xu({},e,{values:(0,l.flatten)(e.values)})):zu(e)?(e=>{const{values:t}=e,r=!zu(e),[n]=t;return(new Nu).addClause(Yu(xu({},e,{filter:sn.LT,values:[R(n,r)]}))).addClause(Yu(xu({},e,{filter:sn.GT,values:[S(n,r)]}))).orBuild()})(e):Qu(t)?Bu(xu({},e,{filter:"not listEquals"})):Yu(e)}],[(0,l.propSatisfies)(ou,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Yu({fieldName:r,filter:Ku(t,r),values:n.map((0,l.prop)("link")).map(Hu)})}],[(0,l.propSatisfies)(au,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Yu({fieldName:`${r}.count`,values:n,filter:su(t)})}],[(0,l.propSatisfies)(lu,"filter"),Xu],[(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 Gu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return Gu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Yu]],ec=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!nu(e)||rc(r))},tc=e=>Array.isArray(e)?rc(e):null!=e&&Ru(e).length>0,rc=e=>e&&e.length>0&&e.every(tc);function nc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ic=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},ac=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),oc=(e,t,r)=>"children"===e?lc(r,[...t][0],!0):r,sc=(e,t,r)=>"values"===e?[...r,...t]:r,lc=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)(oc,t),e);if(!r&&iu(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(sc,t),e)}return(0,l.append)(t,e)},uc=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=ic(e),r=e=>e.fieldName===t?e:r({fieldName:ac(e),children:[e]});return r(e)})(t);return lc(e,r)}),[]),cc=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")),pc=e=>{let[t]=e;return t.children?pc(t.children):t.operator},dc=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=pc(t)===Qe.andNot,a=n(t,!1),o=i?`not ${_u(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${pc(r)||Au} ${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&&cc(i)&&!t?r(i):n(i,a)}],...e])(o))),new Nu).buildWithOperators(i.map((0,l.prop)("operator")))}return n},yc=(0,l.pipe)((0,l.propOr)("","filter"),Xl),fc=(0,l.map)((0,l.when)(yc,(e=>{const[t,r]=Jl(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){nc(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),Tc=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)(ec),fc,uc,dc([...e,...Zu],t))},Ec=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),mc=[sn.ON,sn.BEFORE,sn.AFTER,sn.WITHIN,sn.NOT_EQUALS,sn.MISSING_VALUE,sn.EXISTS],hc=[sn.EQUALS,sn.NOT_EQUALS,sn.STARTS_WITH,sn.MISSING_VALUE,sn.HAS_ALL,sn.FULL_TEXT,sn.EXISTS],bc=[sn.EQUALS,sn.NOT_EQUALS,sn.LT,sn.LTE,sn.GT,sn.GTE,sn.IN_RANGE],Oc=(e,t)=>{const r=lr(e);return(e=>{switch(e){case An.startDate.name:case An.endDate.name:case Pn.dueDate.name:case wn.createdTime.name:case wn.updatedTime.name:case Un.reltioLoadDate.name:case Un.createDate.name:case Un.updateDate.name:case Un.deleteDate.name:case Un.publishDate.name:return mc;case In.matches.name:case Un.count.name:return bc;case Pn.workflow.name:case Pn.assignee.name:case Pn.step.name:case Rn.commenter.name:case wn.createdBy.name:case wn.updatedBy.name:case Un.sourceSystems.name:case Un.value.name:return hc;default:return null}})(t)||fu(r)},vc=[sn.EQUALS,sn.NOT_EQUALS,sn.CONTAINS,sn.STARTS_WITH,sn.MISSING_VALUE,sn.HAS_ALL,sn.IN_RANGE,sn.WITHIN,sn.EXISTS,sn.ON],gc=(0,l.pipe)(Oc,(0,l.filter)((0,l.includes)(l.__,vc))),_c=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),Ac=e=>{let{query:t,body:r}=e;return t=_c(t),Vl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},Nc=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)(Tc(),Ec(t.globalFilter))(n),activeness:t.activityFilter||mn.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Br(i)}`},Pc=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=Nc(e,t,r);return Vl(n)},Rc=e=>Vl(`/entities/_total?${e}`),Sc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(us),(0,l.map)((0,l.prop)("uri")))(e),i={filter:sn.EQUALS,fieldName:"type",values:n},a={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(Tc(),Ec(r.globalFilter))([i,a]),s=Br({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||mn.ACTIVE_ONLY,max:r.max||4});return Vl("/entities/_typeAheadSearch"+s,{method:"GET"})},wc=(0,l.pipe)((0,l.reject)(l.isNil),Yr),Ic=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)(Tc(),Ec(i))(r),p=wc({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return Ac({query:p,body:d})},Uc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return Ic({fieldName:t,searchParams:i,options:n})},Cc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Lc=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={filter:(0,l.pipe)(Tc(),Ec(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Cc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Br(i)}`},jc=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=Lc(e,t,r);return Vl(n)},Dc=e=>Vc(e,{select:"secondaryLabel"}),kc=(e,t)=>{const{select:r=Cc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),Vl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Fc=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),Ft)),Mc=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=Fc(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=br(r),m={method:"POST",data:{attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E}},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(Tc(),Ec(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),Vl(`${s}/api/${o}/${t}/_object`,m)},xc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,$c={options:"sendHidden,addRefAttrUriToCrosswalk"},Vc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$c;return Vl(`/${e}${Br(t)}`)},Gc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",data:[e]},n=t("/entities");return Vl(n,r)},Wc=e=>Vl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Yc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return Vl(`/${e}/_clone${Br({executeLCA:!1,valuesToCopy:r})}`,n)},Bc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return Vl(`/entities/_events/_total${Yr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},qc=(e,t)=>Vl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Hc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return Vl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},Qc=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 Vl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Yr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Kc=e=>{const t=new FormData;return t.append("file",e),Vl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,vn().text("Can't upload file"));return Promise.reject(t)}))},Jc=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 Vl(`/personal/findSavedSearches${Yr({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"}})},Xc=e=>Vl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),zc=e=>Vl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Zc=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return Vl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},ep=e=>{let{uri:t}=e;return Vl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},tp=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),Zc)(e),rp=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),Zc)(e);function np(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ip=["max","offset","filter"],ap=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:ap(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){np(e,t,r[t])}))}return e}({},t,(0,l.pick)(ip,e)))),op=(0,l.omit)(["activeness"]),sp=(e,t)=>{const r=(e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],He.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],He.ALL,e)))return!1})(t);return t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(ap(e),(0,l.omit)(ip))(e))),op,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${Br({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},lp=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),up=(0,l.reject)(l.isNil),cp=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),pp=e=>Vl(cp(e),{method:"GET",headers:{"Content-Type":"application/json"}}),dp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,cp);return Vl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},yp=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?_l()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(up,ne,JSON.stringify);return Vl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},fp=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"),cp,n),o=be(i(t),i(r)).concat(ve(t,r));return Vl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},Tp=(e,t)=>{const{url:r,options:n}=sp(e,t);return Vl(r,n).then(lp)},Ep=(e,t)=>Vl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),mp=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===bn.IN?a.inRelations=[n]:a.outRelations=[n],Vl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},hp=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return Vl(`${t}/recentSearches${Br({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},bp=e=>Vl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Op=e=>{let{environment:t,tenant:r,createdDate:n}=e;return Vl(`/recentSearches${Br({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function vp(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){gp(e,t,r[t])}))}return e}function gp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _p={select:"label,secondaryLabel,name,type,startDate,endDate"},Ap=(0,l.reject)(l.isNil),Np=(0,l.pipe)(Ap,Yr),Pp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=vp({},_p,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return Vl(`/${t}/_tree${Np(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Rp=e=>{let{uri:t,graphUri:r}=e;const n=vp({},_p,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return Vl(`/${t}/_parents${Np(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Sp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=vp({},_p,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return Vl(`/${t}/_hops${Np(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function wp(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 Ip=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},Up="/activities",Cp=e=>{let{label:t,description:r}=e;return Vl(Up,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:Ip()}})},Lp=e=>{const t=Br(e);return Vl(Up+t,{method:"GET"})},jp=e=>Vl(`/activities/_total${Br(e)}`,{method:"GET"}),Dp=e=>{const{entityUri:t}=e,r=wp(e,["entityUri"]);return Vl(`/${t}/_activities${Br(r)}`,{method:"GET"})},kp=e=>{const{entityUri:t}=e,r=wp(e,["entityUri"]);return Vl(`/${t}/_activities/_total${Br(r)}`,{method:"GET"})};function Fp(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){Mp(e,t,r[t])}))}return e}function Mp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},$p=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return Vl(xp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Vp=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=xp({url:r,workflowPath:t,tenant:n})),Vl(s,{method:i||"GET",body:JSON.stringify(a),headers:Fp({"Content-Type":"application/json"},null!=o?o:{})})},Gp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=xp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return Vl(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)},Wp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=xp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Fp({},l,{comment:o}):l;return Vl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},Yp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=xp({url:`/tasks${s?Br(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Fp({objectURIs:[i]},(0,l.reject)(E,a)))};return Vl(u,Fp({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Bp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return Vl(xp({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})})},qp=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return Vl(xp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Fp({max:a,offset:o},i))})},Hp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return Vl(xp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},Qp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return Vl(xp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Kp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return Qp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},Jp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return Vl(xp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Xp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return Qp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},zp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return Qp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},Zp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return Qp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},ed=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return Vl(xp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},td=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return Vl(xp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},rd=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(ds);return a&&a[0]&&(r=n.length>0&&a[0].value?rd(a[0].value,[n.join(".")])[0].value:"string"==typeof a[0].label?a[0].label:Object.prototype.hasOwnProperty.call(a[0],"label")?"":a[0].value||""),{key:t,value:r}}),""),nd=(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=rd(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=>{o=o.replace("{"+e.key+"}",e.value||"")}))),o},id=/[,\s]*$/,ad=e=>{const t=vn().text(hn);if(!e)return t;const r=e.replace(id,"");return""===r.toString().trim()?t:r},od=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},sd=(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=od(e,r.referencedEntityTypeURI);if(n)return nd({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return nd({attributes:t||{}},r.dataLabelPattern);return""},ld=e=>{let{uiPath:t,uri:r}=e;const n=new URL(t),[,i]=n.pathname.split("/");return"nui"===i?`${t}profile?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},ud=e=>{let{uiPath:t,tag:r,entityUri:n}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}tags?entityUri=${encodeURIComponent(n)}&tag=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},cd=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",pd=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),jl,(0,l.prop)("value"))),dd=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),pd),yd=(e,t,r)=>{const n=dd(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(ws(e),pd)))(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")])})(zr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>Rs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,pd))(r)})(e,r)||an(e,r.type);return cd(t,n)};function fd(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){Td(e,t,r[t])}))}return e}function Td(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="DTSS/",md=(0,l.replace)(new RegExp("^entities/"),""),hd=e=>Ed+e.dataTenant+"/"+e.uri,bd=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),Od=e=>!(!e||!e.dataTenant),vd=(0,l.startsWith)(Ed),gd=(0,l.pipe)((0,l.ifElse)(vd,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),_d=(0,l.ifElse)(Od,hd,(0,l.prop)("uri")),Ad=e=>e&&e.uri?e.dataTenant?hd(e):md(e.uri):"",Nd=(0,l.curry)(((e,t,r)=>(zr(t,r.type)||{})[e]||"")),Pd=Nd("label"),Rd=Nd("typeGraphIcon"),Sd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=zr(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;let a=t.attributes[i.name];if(!a)return null;Array.isArray(a)&&(a=a.find(ds)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:sd(e,o,i),uri:a.uri}})).filter(l.identity):[]},wd=(0,l.pipe)(Sd,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),Id=(0,l.curry)(((e,t)=>{if(!t)return[];if(1===e.length){return t[e[0]]||[]}{const r=t[e[0]];return Array.isArray(r)?r.reduce(((t,r)=>{if((0,l.is)(Object,r.value)){const n=Id(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):Id(e.slice(1),r)}})),Ud=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,Cd=e=>(0,l.propOr)([],"matchRules",e),Ld=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?fd({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},jd=(e,t,r)=>t&&r?r.aEntity:e,Dd=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 Vl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Yr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},kd=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 Vl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Yr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Fd=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return Vl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Md=(e,t,r)=>Promise.all(t.map((async t=>await Vl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),xd=async(e,t)=>await Md(e,t,"NOT"),$d=async(e,t)=>await Md(e,t,"MATCH"),Vd=async(e,t)=>await Promise.all(t.map((async t=>await Vl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function Gd(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){Wd(e,t,r[t])}))}return e}function Wd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yd(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 Bd=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return Vl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},qd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return py({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Hd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return py({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Qd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return Vl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Kd=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 Qd({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},Jd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(Od,i);return Promise.all([s.length?Fd(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return Qd({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},Xd=(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=Yd(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)}),[])),zd=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),Xd),Zd=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return Vl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(zd)},ey=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)},ty=ey((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return Vl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(zd)})),ry=ey((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return Vl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),ny=(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)}},iy=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return Vl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},ay=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 iy(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},oy=ay("NOT"),sy=ay("MATCH"),ly=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(Od,a);return Promise.all([Md(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return iy(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},uy=ly("NOT"),cy=ly("MATCH");function py(e){let{requestProvider:t=Vl,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}`,Gd({},Yd(s,["headers"]),{headers:Gd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const dy=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return py({url:Lc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},yy=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return py({url:Nc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},fy=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=sp(t,r);return py({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(lp,(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)))}))))},Ty=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return py({url:`${xc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},Ey=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return Vl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},my=e=>{let{dtssPath:t,tenant:r}=e;return Vl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},hy=e=>{let{dtssPath:t,customerTenant:r}=e;return Vl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},by=e=>{let{dtssPath:t,tenants:r}=e;return Vl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},Oy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return py({url:xc(t),dataTenant:r,customerTenant:n,dtssPath:i})},vy=()=>Vl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function gy(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){_y(e,t,r[t])}))}return e}function _y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ay=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=gy({},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 Vl(`${t}/api/${r}/graph/search${Br({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},Ny=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return Vl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:gy({},n,i),headers:{"Content-Type":"application/json"}})},Py=(e,t)=>`${e}/${t}/comments`,Ry=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return Vl(`${Py(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},Sy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return Vl(`${Py(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},wy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return Vl(Py(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},Iy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return Vl(`${Py(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},Uy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return Vl(`${Py(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Cy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return Vl(`${Py(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ly=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return Vl(`${Py(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},jy=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return Vl(`${Py(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},Dy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Br({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return Vl(`${Py(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function ky(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){Fy(e,t,r[t])}))}return e}function Fy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const My=e=>{let{tenant:t,servicesPath:r}=e;return Vl(`${r}/oauth/proxy${Br({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},xy="graphExport",$y=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await Yy({servicesPath:e,tenant:t,environment:r,namespace:xy,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(ky({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await Yy({servicesPath:e,tenant:t,environment:r,namespace:xy,options:ky({method:"PUT"},o)})}catch(e){s=null}return s||(s=await Yy({servicesPath:e,tenant:t,environment:r,namespace:xy,options:ky({method:"POST"},o)})),s},Vy=e=>{let{servicesPath:t,key:r}=e;return Vl(`${t}/settings${Br({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Gy=e=>{let{servicesPath:t}=e;return Vl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Wy=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return Vl(`${n}/plugins${Br({tenant:t,user:r})}`,{method:"GET"})},Yy=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return Vl(`${n}/configService${Br({tenant:t,environment:r,namespace:a,projection:o})}`,i)},By=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return Yy({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},qy=e=>{let{servicesPath:t,stateHash:r}=e;return Vl(`${t}/searchLink?key=${r}`,{method:"GET"})},Hy=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),Vl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Qy=e=>Vl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Ky=e=>{let{exportPath:t,tenant:r,options:n}=e;return Vl(`${t}/${r}/activities${Br(n)}`,{method:"POST"})};function Jy(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){Xy(e,t,r[t])}))}return e}function Xy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zy=e=>{const{entityUri:t}=e;return Vl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Zy=e=>{let{entityUri:t,crosswalk:r}=e;return Vl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},ef=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return Vl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[Jy({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),Jy({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},tf=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return Vl(`/${r}/_${n}${Br({contributorURI:t})}`,{method:"POST"})},rf=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return Vl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},nf=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return Vl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},af=e=>{let{entityUri:t,crosswalkId:r}=e;return Vl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function of(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sf=e=>{let{entityTypeUri:t}=e;return Vl(`/dataQuality/fillRates${Yr({entityType:Ht(t)})}`,{method:"GET"})},lf=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i}=e;const a=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){of(e,t,r[t])}))}return e}({},n===at.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{});return Vl(`/entityType/${Ht(t)}/dataQuality/${n}`,{method:"POST",body:JSON.stringify(a)})},uf=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return Vl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Ht(n)}`,{method:"GET",headers:{env:i}})},cf=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=at.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u}=e;const c={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u};return Vl(`${t}/${r}/entityType/${Ht(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(c)})},pf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return Vl(`/${t}${Br({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},df=e=>{let{attributeUri:t,value:r}=e;return Vl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},yf=e=>{let{attributeUri:t,value:r}=e;return Vl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},ff=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return Vl(`/${t}${Br({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},Tf=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Br({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=_l()([[{value:a}]]);return Vl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Ef=e=>{let{entityUri:t,attributeName:r,value:n}=e;return Vl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},mf=e=>{let{entityUri:t,attributeName:r}=e;return Vl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function hf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const bf=e=>{let{entityUri:t}=e;return Vl(`/${t}/_historicURIs`,{method:"GET"})},Of=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 Vl(`/${t}/_changesWithTotal${Br(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){hf(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},vf=(e,t)=>Vl(`/${e}/_previousChange${Br({timestamp:t})}`,{method:"GET"}),gf=(e,t)=>Vl(`/${e}${Br({time:t})}`,{method:"GET"});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){Af(e,t,r[t])}))}return e}function Af(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Nf=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a}=e;return Vl(t,_f({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:_f({"Content-Type":"application/json"},null!=i?i:{}),noRequestProcessor:a}))},Pf=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Br({options:a.join(","),severity:o.join(",")});return Vl(`${t}/validate/${i}/entity/${Ad({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},Rf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return Vl(`${t}/validate/${n}/entity${Br({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},Sf=e=>{let{tenant:t,apiPath:r}=e;return Vl(`${r}/tenants/${t}/name`,{method:"GET"})},wf=e=>{let{tenant:t,apiPath:r}=e;return Vl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},If=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return Vl(`${a}/preferences${Br({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Uf=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 Vl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Cf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return Vl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},Lf=e=>{const{servicesPath:t}=e;return Vl(`${t}/getTokenForWorker`,{method:"GET"})};var jf=r(29524);const Df=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=Mt(),s={attributes:pl({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=Rs(r,e,n.uri)[0];return i&&i.value?El({entity:e,attributeType:n,uri:i.uri,value:t}):fl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},kf=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(gs),(0,l.filter)(Ft),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Ff=(0,l.curry)(((e,t)=>{const r=kf(e=e||{},t=t||{});return r.concat((0,l.chain)(Ff(e),r))})),Mf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),xf=Mf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),$f=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),Ft)),Vf=e=>(0,l.pipe)(xf,$f(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),Gf=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(xf,(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})),Wf=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),Ft),(0,l.omit)(["uri","timestamp"])),Yf=(0,l.pipe)(Wf,(0,l.evolve)({attributes:_l(!0)})),Bf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=Vf(i);if(a.length>0)for(const t of a)e=Gf(t,r[t].uri,e);const o=await Gc(Yf(e[t]),null==n?void 0:n.enhanceUriWithDCR),s=(e=>(0,l.path)([0,"errors"],e))(o);if(s)throw s;const u=(e=>(0,l.pathOr)(e,[0,"object"],e))(o);return null==n||n.updateDCRUriFromResponse(u),u},qf=async(e,t,r)=>{const n=Qf(e,t),i={};for(const t of n)i[t]=await Bf(e,t,i,r);return i},Hf=(0,l.curry)(((e,t)=>{const r=jf.Node(t);return Vf(e[t]).forEach((t=>{const n=Hf(e,t);r.addEdge(n)})),r})),Qf=(e,t)=>(0,l.pipe)((0,l.map)(Hf(e)),(0,l.map)(jf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Kf=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Wf))})),Jf=(e,t)=>{const r=Ae(e.tags||[],t.tags||[]),n=Ne(e.roles||[],t.roles||[]),i=Oe(e,t),a=ve(e,t);return[...ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))),...r,...n,...i,...a]},Xf=(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 Gf(r,n,e)}),e))))}),t)}),Kf),zf=(0,l.curry)(((e,t)=>(0,l.when)(Ft,(0,l.propOr)(l.__,t,e),t)));function Zf(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){eT(e,t,r[t])}))}return e}function eT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tT=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:ot.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},rT=e=>{let{relationUri:t}=e;return{type:ot.DELETE_RELATION,parameters:{relationUri:t}}},nT=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:ot.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},iT=e=>{let{oldRelation:t,newRelation:r}=e;return{type:ot.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},aT=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:ot.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},oT=(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))),sT=e=>e.type===ot.DELETE_RELATION,lT=e=>e.type===ot.CREATE_RELATION,uT=e=>e.type===ot.REPOINT_RELATION,cT=e=>e.type===ot.UPDATE_RELATION,pT=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),dT=e=>{let{type:t,parameters:r,dcrProcessor:n}=e;const{enhanceUriWithDCR:i,updateDCRUriFromResponse:a}=n,o=e=>(a(e),e);switch(t){case ot.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:a,attributes:s,startDate:l,endDate:u}=t;return yp({startEntityUri:e,endEntityUri:n,relationType:a,attributes:s,startDate:l,endDate:u,uriPreprocessor:i}).then(o)};case ot.DELETE_RELATION:return()=>{const{relationUri:e}=r;return dp(e,i).then(o)};case ot.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return mp(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case ot.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return fp({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case ot.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[rT({relationUri:o}),tT({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(yT(n)),(0,l.map)(dT),pT)(s)}}},yT=e=>t=>Zf({dcrProcessor:e},t),fT=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=qr({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(yT(r)),(0,l.map)(dT),pT,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},TT=e=>t=>(0,l.map)((t=>Zf({},t,{parameters:(0,l.evolve)({parentUri:zf(e),entityUri:zf(e),newEntityUri:zf(e)},t.parameters)})),t),ET=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},mT=(e,t)=>{const r=e.filter(lT).find(oT(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>cT(o)&&oT(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!uT(o)||!oT(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(ET({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},hT=(e,t)=>{const r=e.filter(uT).filter(oT(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!cT(i)||!oT(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(ET({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},bT=(e,t)=>{const r=e.filter(sT).filter(oT(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!oT(t,e)))},OT=(e,t)=>{const r=e.filter(cT).filter(oT(t));let n=null;const i=e.filter((e=>!r.includes(e)||!cT(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(ET({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},vT=e=>{const t=e.filter(sT).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(bT,e)},gT=e=>{const t=e.filter(lT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(mT,e)},_T=e=>{const t=e.filter(uT).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(hT,e)},AT=e=>{const t=e.filter(cT).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)(OT,e))(t)},NT=e=>(0,l.pipe)(vT,gT,_T,AT)(e);function PT(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){RT(e,t,r[t])}))}return e}function RT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ST=e=>PT({},(0,l.path)($T(),e),{startDate:(0,l.path)(YT(),e),endDate:(0,l.path)(BT(),e)}),wT=(e,t)=>(0,l.pipe)((0,l.path)(WT()),zf(t))(e),IT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=wT(e,r),i=(0,l.path)(VT(),e)===st.IN,a=e.parentEntityUri||n;return tT({parentUri:i?t:a,relation:ST(e),entityUri:i?a:t})})),...o.map((t=>{const i=wT(t,r),a=(0,l.path)(VT(),t)===st.IN,o=i!==(0,l.pipe)((0,l.path)($T()),a?qT:HT)(t),s=JT(e,(0,l.path)(MT(),t)),u=t.parentEntityUri||n,c=zf(r,i);return o?aT({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)($T(),t),isReversed:!1}):iT({oldRelation:(0,l.path)($T(),s),newRelation:ST(t)})})),...i.map((e=>rT({relationUri:e}))),...s.map((e=>nT({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},UT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return PT({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),CT=(0,l.has)("dataTenant"),LT=(0,l.ifElse)(CT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),jT=(e,t)=>(0,l.pipe)(wi,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(Vs),qa)(e,t),DT=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)}},kT=(e,t,r)=>{const n=nd(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)},FT="relation",MT=(0,l.always)([FT,"relationUri"]),xT=(0,l.always)([FT,"relationType"]),$T=(0,l.always)([FT,"object"]),VT=(0,l.always)([FT,"direction"]),GT=(0,l.always)([FT,"object","attributes"]),WT=(0,l.always)(["entity","entityUri"]),YT=(0,l.always)([FT,"startDate"]),BT=(0,l.always)([FT,"endDate"]),qT=(0,l.path)(["startObject","objectURI"]),HT=(0,l.path)(["endObject","objectURI"]),QT=(0,l.path)(["startObject","objectTypeURI"]),KT=(0,l.path)(["endObject","objectTypeURI"]),JT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(MT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=JT(r.connections,t);if(e)return e}}},XT=(0,l.pipe)(JT,(0,l.path)($T())),zT=(0,l.allPass)([(0,l.pipe)((0,l.path)(WT()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(xT()),(0,l.complement)(E))]),ZT=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:xt()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=rE({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=eE(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?DT(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},eE=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:bn.IN}:{type:t[0],direction:bn.OUT}:null},tE=e=>e.uri||e,rE=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&Vi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===bn.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"],zr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],zr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(tE,wi(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(bn.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(bn.OUT)),(0,l.map)(u))},t)||{}},nE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=ji({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ui(e,n.uri);return n&&(!t||en(e,i,t))&&(!r||en(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],zr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],zr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(ls,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)}},iE=(0,l.curry)(((e,t,r,n,i)=>{const a=en(n,l.__,t.type),o=e?KT:QT,s=en(n,l.__,r.type),u=e?QT:KT;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),aE=(e,t,r)=>{const n=e?KT:QT,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(en(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function oE(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){sE(e,t,r[t])}))}return e}function sE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lE=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return oE({},t,{[r]:{parents:n,children:i}})},uE=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return oE({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},cE=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=kf(t,i),o=lE({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>cE(n.uri,t,[e],r)),o)},pE=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)(MT(),n),a=t?uE({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(WT(),n),s=Ft(o)?[o]:[],u=lE({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>cE(t,r,[i],e)),u)}),n)},dE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return pE(r,e,t,cE(e,t))},yE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return dE(t,r,n);if(Vt(e)){const t=JT(n,e);return t&&pE([t],null,r)}return r[e]?cE(e,r):void 0},fE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>fE(e,t))))},TE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>TE(e,t))))},EE=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=$t(t),u=dE(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(Vt(c)){if(s=JT(i,c),!s)return null;o.push({type:Ye.relationConnection,value:s,valueType:wi(a,(0,l.path)(xT(),s))});continue}if(Vt(u)){const e=n[c];if(!e)return null;o.push({type:Ye.tempEntity,value:e,valueType:zr(a,e.type)});continue}const p=n[u],d=$s(p,c),y=n[c];if(!d||!y)return null;o.push({type:Ye.attributeValue,value:d,valueType:Nr(a,Xt(d.uri,p.type))}),o.push({type:Ye.tempEntity,value:y,valueType:zr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},TE(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=Vt(s),d=p?XT(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?wi(a,d.type):zr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:Pr(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:Ye.tempEntity,value:T,valueType:zr(a,T.type)}),o.push({type:Ye.attributeValue,value:s,valueType:E}),m=s.value;const l=gs(s);T=l&&Ft(l)?n[l]:null}}return o},mE=e=>e.every((e=>{let{type:t}=e;return[Ye.attributeValue,Ye.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===Ye.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,hE=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?hE(t.value):[]];return e.concat(r)}),[])),bE=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,OE=e=>{const t=[...hE((null==e?void 0:e.attributes)||[]),...hE((null==e?void 0:e.analyticsAttributes)||[])];return e?[_d(e),...t]:[]},vE=(e,t)=>[e,...t.map((t=>bE(e,t)))],gE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return LT(t)}))},_E=(e,t)=>{switch(e){case Be.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case Be.ENTITY_ATTRIBUTE:case Be.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[zt(t)]})(t);case Be.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case Be.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,_d({uri:n,dataTenant:i}),r]})(t)}},AE=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),NE=(0,l.curry)(((e,t)=>{const r=jo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(NE(e,r.extendsTypeURI)):n})),PE=(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))),RE=(e,t)=>(0,l.pipe)((0,l.prop)("type"),NE(e),PE(t))(t);function SE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wE=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}},IE=e=>!e.deactivated,UE=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},CE=e=>UE(e)+e.message,LE=(0,l.unless)(l.isNil,(0,l.prop)("message")),jE=(0,l.unless)(l.isNil,(0,l.prop)("type")),DE=(0,l.curry)(((e,t)=>Bt(t.parentUri,e))),kE=(0,l.curry)(((e,t)=>t.parentUri===e)),FE=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),Bt(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",bt.TYPE_REFERENCE),(0,l.pipe)(At,(0,l.any)(Bt(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),ME=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),xE=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),$E=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([QE,IE,DE(e),FE(t),(0,l.complement)(xE(e,t.uri))]))(r)},VE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([QE,IE,kE(e),ME(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",$e.missed))]))(r);return n&&n.message||""},GE=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===$e.missed))},WE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([IE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(MT(),e))]))(t)},YE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([IE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},BE=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([IE,DE(t)]))(r)},qE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([IE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},HE=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?EE(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 Ye.attributeValue:{const e=a;if(Tr(a))return nd(o,e.dataLabelPattern);if(Er(a)){const t=o,i=gs(t),a=gt(e),s=zr(n,a);return Ft(i)?nd(r[i],s.dataLabelPattern):t.label}return""}case Ye.tempEntity:return nd(o,a.dataLabelPattern);case Ye.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=zr(n,null==e?void 0:e.entityType);return`${ad(i&&Ft(i)?nd(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||Ii(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){SE(e,t,r[t])}))}return e}({},e,{label:ad(t)})}))},QE=e=>!e.severity||e.severity===Ge.ERROR,KE=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case bt.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(KE(n))}));case bt.TYPE_REFERENCE:return!!Ts(t);case bt.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),JE=(e,t)=>e.every((0,l.complement)(KE(t))),XE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Mo(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=Rs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!ds(e.parent))))).forEach((e=>{JE(e.attrValues,n)&&r.push(wE({type:$e.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:vn().text("Attribute is required"),source:Ve.local}))})),r}),[])},zE=(0,l.curry)(((e,t,r)=>Rs(e,t,r,!1))),ZE=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),zr(e),(0,l.prop)("attributes"),(0,l.reject)(yr),(0,l.filter)(Er),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(zE(e,t)));return(0,l.pipe)(r,(0,l.reject)(gs),(0,l.map)((e=>{let{uri:r}=e;return wE({type:$e.missedRefEntity,uri:"",attributeTypeUri:Xt(r,t.type),parentUri:r,message:vn().text("Entity is required"),source:Ve.local})})))(t)},em=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(gs,Ft)).flatMap((n=>{const i=gs(n),a=t[i],o=Nr(e,Xt(n.uri,r.type));return tm(e,t,o,a)})),tm=(e,t,r,n)=>{const i=At(r),a=i.map((t=>Nr(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",bt.TYPE_REFERENCE))).flatMap(Pt).concat(i);return rm(e,t,n,(e=>a.some(Bt(e.uri))))},rm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=XE(e,r,n),a=ZE(e,r),o=em(e,t,r);return[...i,...a,...o]},nm=(e,t)=>{const r=(0,l.path)($T(),t)||{};return XE(e,r)},im=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(WT()),(0,l.ifElse)(Ft,(e=>t[e]),(0,l.always)(null)))(r),i=nm(e,r),a=(e=>(0,l.path)(WT(),e)?[]:[wE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(xT(),e),parentUri:(0,l.path)(MT(),e),message:vn().text("Entity is required"),source:Ve.local})])(r),o=((e,t,r)=>r?rm(e,t,r):[])(e,t,n);return[...i,...a,...o]},am=e=>(0,l.path)(["entity","uri"],e)?[]:[wE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:vn().text("Entity is required"),source:Ve.local})],om=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=XE(e,r),i=am(t);return[...n,...i]};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 lm=(e,t)=>{var r,n;const i=zr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||uo(e)},um=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),cm=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(um(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},pm=(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)(_s,Ft,l.not)]),(e=>{const t=(0,l.pipe)(_s,Ht)(e);return cm((e=>e.replace(t,t+Ct)))(e)})),(0,l.when)((0,l.pipe)(gs,Ft),(t=>{const r=gs(t),n=e[r],i=n&&ym(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){sm(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),dm=(e,t,r)=>ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))).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)(pm(r,e.type)),(0,l.map)(cm(nr))))})(e))),ym=(e,t)=>(0,l.evolve)({attributes:vl({valueTransformer:(0,l.pipe)(Ps,pm(t),um(nr)),deleteEmptyComplex:!0}),uri:nr})(e);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){Tm(e,t,r[t])}))}return e}function Tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Em=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(Ut,"g"),"uri$$$$").replace(new RegExp(Ct,"g"),""))),mm=e=>(0,l.pipe)((0,l.evolve)({objectUri:Em,objectParentUri:Em}),(e=>{return fm({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?$e.missed:$e.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&rr(e.objectUri),uri:e.objectUri,source:Ve.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),hm=(e,t)=>(0,l.map)((0,l.pipe)(mm,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=HE(t,s),p=null!=c&&c.length?c.slice(0,-1):HE(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&Nr(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===Ye.attributeValue&&(a=e.valueType)}return a})(o,c,e);return fm({},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&&tr(i)){const n=(0,l.last)(a),i=n.valueType;if(Er(i)&&Rt(i).includes(o)){const i=gs(n.value),o=i&&Ft(i)?t[i]:null;return o?fm({},e,{parentUri:o.uri,path:a.concat({type:Ye.tempEntity,value:o,valueType:zr(r,o.type),label:""})}):e}}return e}})(t)))(e),bm=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};function Om(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vm;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(vm||(vm={}));const gm={},_m={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},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"]}},Am=(0,l.curry)(((e,t)=>{const r=(e=>{if(!gm[e]){const t=_m[e]||_m.random0;gm[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){Om(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return gm[e]})(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]})),Nm=e=>Am(vm.Charts,e);var Pm=r(51404),Rm=r.n(Pm);const Sm=Array.from({length:100},((e,t)=>t/100)),wm=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)},Im={},Um=new(Rm())({hash:wm,saturation:Sm.slice(15,71),lightness:Sm.slice(50,90)}),Cm=(0,l.curry)(((e,t,r)=>{t in Im||(Im[t]={});const n=Im[t];r in n||(n[r]=((e,t)=>{const r=String(wm(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),Lm=Cm(Um,"crosswalks"),jm=Cm(Um,"sources"),Dm=Cm(Um,"contributors"),km=Cm(Um,"dataValidationFunctions");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=(0,l.has)("items"),$m=e=>0===e,Vm=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)},Gm=e=>e.reduce(((e,t)=>e+t.width),0),Wm=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Ym=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),Bm=e=>e.reduce(((e,t)=>e+t.height),0),qm=e=>(0,l.is)(String,e)&&e.includes("%"),Hm=e=>Boolean(e.spacer),Qm=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),Km=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(xm(t)?Km(t):t)),[]),Jm=e=>({id:e.layout}),Xm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jm;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.floor(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=qm(r.width)?Qm(i,r.width):u}return Vm(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return Vm(n,t,r)},o=(e,t)=>xm(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.reduce(((o,s,u)=>{const c=i(t,r,s,xm(s)?n(s.layout):e(s.view)),d=$m(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(xm(s))return o.concat(p(Fm({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(Fm({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:Gm(o),height:Wm(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=xm(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=$m(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(xm(i))return r.concat(p(Fm({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(Fm({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?Vm(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?Vm(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Ym(i),height:Bm(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=$m(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return Fm({},o,{x:t.x,y:c,width:s,height:u})},i=(e,t)=>{const r=t.reduce(((t,r,i)=>{if("string"==typeof r)t.push(n(e,t,r,i));else if("object"==typeof r){const a=Math.round(e.width/2),o=Fm({},e,{width:a}),s=Fm({},e,{x:e.x+a,width:a}),u=(0,l.has)("left",r)&&n(o,t,r.left,i),c=(0,l.has)("right",r)&&n(s,t,r.right,i),p=(0,l.propOr)(0,"height"),d=Math.max(p(u),p(c));t.push(Fm({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return Fm({},e,{height:Bm(r),items:r})},o=i(t,(0,l.propOr)([],"top",r)),s=Math.round(.66*t.width),u=(0,l.isEmpty)(o)?t.y:t.y+o.height,c=i(Fm({},t,{y:u,width:s}),(0,l.propOr)([],"center",r)),p=i({x:t.x+s,y:u,width:t.width-s},(0,l.propOr)([],"right",r)),d=o.height+Math.max(c.height,p.height),y=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return Fm({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=Fm({},t,{items:(0,l.reject)(Hm,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 Km(f)},zm=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),Zm=[ct.FilteredEntitiesViewFacet,ct.ActivitiesViewFacet,ct.ProfileStatsFacet,ct.FilteredSavedSearchesFacet],eh=(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=Zm.includes(a.component)?8:4;return Fm({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));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={BarChart:ut.BAR,BarChartGrouped:ut.BAR,BarChartHorizontal:ut.BAR,LineChart:ut.LINE,Map:ut.MAP,Pie:ut.PIE},ih=(e,t)=>Zt(e)?Kt(e,t):e,ah=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=nh[r];return th({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},oh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return th({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"]))},sh=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return th({},e,{value:[cn,pn,sn.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:yn(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Zt(t)||!r?n:(n||[]).concat((i=r,{filter:sn.EQUALS,fieldName:"type",values:[i]}));var i},lh=["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"],uh={"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:ih(n,r),filters:sh(a,n,r),chartType:ut.BAR,component:ct.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:ih(n,r),filters:sh(a,n,r),chartType:ut.BUBBLE,component:ct.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:ct.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=ne(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return th({id:t,count:o,canRead:u,orderType:s,attributeUri:ih(r,p),filters:sh(a,r,p),component:ct.DashboardFacet,title:i,showOthers:!0},ah(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:ih(n,r),filters:sh(a,n,r),chartType:ut.MAP,component:ct.DashboardFacet,title:i,geoUrl:lh[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 th({id:t,count:o,canRead:l,attributeUri:ih(n,r),filters:sh(a,n,r),component:ct.DashboardFacet,title:i,geoUrl:s,chartType:ut.MAP,projection:"geoMercator"},ah(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.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:oh(i),component:ct.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:sh(n,null,a),component:ct.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:sn.GTE,fieldName:"matches",values:["1"]}],component:ct.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:ct.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:ut.CLOUD,component:ct.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:ut.TREE,component:ct.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.NotificationInboxFacet,title:n||vn().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.ActivitiesViewFacet,title:n||vn().text("Activity log")}}},ch=e=>({id:e,height:10}),ph=(0,l.pipe)((0,l.map)((e=>{const t=uh[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),dh=e=>{if("0.1"===e.version){const t=ph(e.views),r=Xm(ch,e.layout,{columns:4});return{id:e.id,margin:0,layout:zm(r,t),views:t}}return e},yh=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"),ne)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>yh(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function fh(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){Th(e,t,r[t])}))}return e}function Th(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Eh=fh({},pt,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),mh=e=>e,hh={[Eh.Attributes]:mh,[Eh.HierarchyTree]:mh,[Eh.HierarchyPaths]:mh,[Eh.RelationsTable]:mh,[Eh.Relations]:e=>fh({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[Eh.SingleAttributeView]:mh,[Eh.CustomView]:mh,[Eh.TableAttributeView]:mh,[Eh.MapView]:mh,[Eh.OldTreeView]:e=>fh({},e,{class:pt.HierarchyTree}),[Eh.OldMapView]:e=>fh({},e,{class:pt.MapView}),[Eh.ImageAttributeView]:mh,[Eh.PotentialMatchesView]:mh},bh=(0,l.pipe)((0,l.map)((e=>{const t=hh[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),Oh=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===pt.MapView?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),vh=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return fh({},t,{layout:e.newLayout});if("0.1"===e.version){const r=bh(e.views),n=Xm(Oh(r),e.layout,{columns:4});return fh({},t,{layout:zm(n,r),views:r})}return e},gh=(e,t)=>e.class===t||e["react-class"]===t,_h=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(gh(t,pt.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 gh(t,pt.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.some(Bt(n))||t.some(Bt(n))}},Ah=(e,t)=>e.filter((e=>t.some((t=>gh(e,t))))).map((e=>{let{id:t}=e;return t})),Nh=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},Ph=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),Rh=(e,t)=>(e||[]).find((e=>e.activator===t)),Sh=e=>(0,l.pipe)((0,l.map)((e=>Nh(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e);function wh(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){Ih(e,t,r[t])}))}return e}function Ih(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Uh=(e,t)=>yh(t).map((t=>(0,l.pipe)((0,l.map)((e=>Nh(e,t))),(0,l.reject)(l.isNil),l.head)(e))),Ch=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Lh=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];if("2.0"===r&&t.newLayout){const{newLayout:e}=t;return(0,l.pipe)((0,l.pick)(["views","sidePanelViews","profileBand"]),(0,l.mergeRight)({entityType:n,layout:e}),(0,l.reject)(l.isNil))(t)}const i=Uh(e,t.layout),a=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>Nh(e,t.side))),(0,l.reject)(l.isNil),l.head)(e);return yh(r.layout||{})}})(e,t),o=vh(wh({},t,{views:i,version:"0.1"})),s=(0,l.pipe)(Sh,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:o.views,layout:o.layout,sidePanelViews:a,profileBand:s})},jh=(e,t)=>{if("scroll"===t.layout.layout){const r=Uh(e,t.layout),n=dh(wh({},t,{views:r,version:"0.1"}));return{class:yt.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:yt.Dashboard,views:t.views,layout:t.layout,id:t.id}},Dh=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},kh=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Fh=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},Mh=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},xh=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},$h=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions,tableViewModeAvailable:r.tableViewModeAvailable}},Vh=(e,t)=>{const r=Uh(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=Ph(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:yt.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"]}},Gh=(e,t)=>({class:yt.Graph,id:t.id}),Wh=(e,t)=>{const r=Uh(e,t.layout)[0];return{class:yt.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},Yh=e=>t=>!!(0,l.intersection)(e,t).length,Bh=(0,l.cond)([[Yh(["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"]),()=>jh],[Yh(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Dh],[Yh(["com.reltio.plugins.graph.GraphView"]),()=>Gh],[Yh(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>kh],[Yh(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Fh],[Yh(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Mh],[Yh(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>xh],[Yh(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>$h],[Yh(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>Vh],[Yh(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>Wh],[l.T,()=>(0,l.always)(void 0)]]),qh=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(Ch),(0,l.map)((t=>Lh(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand"])))(e);return{class:yt.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:ft.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:ft.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){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>Nh(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",yt.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>Nh(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;const a=yh(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 Bh(o)(t,i)},Hh=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))},Qh="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var Kh;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(Kh||(Kh={}));const Jh={[yt.DQDashboard]:`${Qh}DqDashboard.svg`,[yt.Dashboard]:`${Qh}Dashboard.svg`,[yt.Graph]:`${Qh}Graph.svg`,[yt.RelationshipSearch]:`${Qh}GraphSearch.svg`,[yt.Interactions]:`${Qh}Interactions.svg`,[yt.PotentialMatches]:`${Qh}PotentialMatches.svg`,[yt.Profile]:`${Qh}Profile.svg`,[yt.ProfileActivityLog]:`${Qh}ActivityLog.svg`,[yt.Relationships]:`${Qh}Relationships.svg`,[yt.Sources]:`${Qh}Crosswalk.svg`,[yt.Search]:`${Qh}Search.svg`,[Kh.DashboardGroup]:`${Qh}DashboardGroup.svg`,[Kh.ProfileGroup]:`${Qh}ProfileGroup.svg`,[Kh.SearchGroup]:`${Qh}SearchGroup.svg`,DEFAULT:`${Qh}Default.svg`},Xh=e=>Jh[null==e?void 0:e.class]||Jh.DEFAULT,zh=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Jh[Kh.ProfileGroup]:null,Zh=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Jh[yt.Dashboard]||t===Jh[yt.DQDashboard]})),(0,l.always)(Jh[Kh.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Jh[yt.Search]||t===Jh[yt.RelationshipSearch]})),(0,l.always)(Jh[Kh.SearchGroup])],[l.T,()=>null]])(e),eb=e=>(0,l.pipe)((0,l.chain)(Hh),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>(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=>({label:e.label,icon:Xh(qh(e,t)),screen:qh(e,t),canRead:e.canRead,entityTypes:e["entity-types"]}))),(0,l.filter)((e=>e.screen)))(t))(t,e),n=qh(t,e);return{label:t.label,icon:zh(t)||Zh(r)||Xh(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function tb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rb=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},nb=e=>({id:e,height:10}),ib=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)(rb),(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=ph(((e,t)=>{const r=yh(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){tb(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Xm(nb,t.layout,{columns:4});return{views:r,layout:zm(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function ab(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ob=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,sb=e=>(0,l.pipe)((e=>Ph(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.map)((e=>{let{action:t}=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){ab(e,t,r[t])}))}return e}({},t,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,["action"]))})))(e),lb=(0,l.prop)("showLookupCode"),ub=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>Nh(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=>Nh(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=>Nh(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=>Nh(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>Nh(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>Nh(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>Nh(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.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>Nh(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("enabled"))(e))(e),p=(e=>(0,l.pipe)((e=>Rh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("default-perspective"),(0,l.ifElse)(ob,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),d=sb(e),y=(e=>(0,l.pipe)((e=>Rh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkUser"))(e))(e),f=(e=>(0,l.pipe)((e=>Rh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkIdle"))(e))(e),T=(e=>(0,l.pipe)((0,l.map)((e=>Nh(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),E=(e=>(0,l.pipe)((0,l.map)((e=>Nh(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e);var m;return{i18n:s,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:void 0===(m=lb(E))||m},validate:{levels:a,validateReadMode:o},attributePresentations:u,workflow:{enabled:c},defaultRoute:p,customScripts:d,checkUser:y,checkIdle:f,showSwitchToClassic:T,showEntityId:null===(t=Sh(e))||void 0===t?void 0:t.showEntityId}},cb=e=>({layout:eb(e),pivoting:ib(e),properties:ub(e)});var pb=r(58697),db=r.n(pb);function yb(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){fb(e,t,r[t])}))}return e}function fb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Tb=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}_${db()()}`;return n[e.id].push(t),i=!0,yb({},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]++,yb({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}},Eb=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(Eb(e))}))}))),t},mb=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(vb,t),(0,l.propOr)([],"crosswalks",e))),e),hb=(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(hb(e))}))})),r},bb=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=bb(e);r>t&&(t=r)}))})),t+1):t},Ob=(e,t)=>{if(Ft(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},vb=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},gb=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},_b=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},Ab=(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)},Nb=(0,l.eqBy)(vb),Pb=(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)(Es,(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 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}let wb={};const Ib=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=X(r.action.files.join('","'));if(E(wb[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))}wb=Rb({},wb,{[a]:Rb({},wb[a]||{},{worker:i})})}else i=wb[a].worker,wb[a].innerText&&t({task:{action:Et.SET_HTML,params:{html:wb[a].innerText}},worker:i,config:r}),i.removeEventListener("message",wb[a].onWorkerMessage);return i&&(wb[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||(wb[a].innerText=n.params.html)}},i.addEventListener("message",wb[a].onWorkerMessage)),i},Ub=(0,l.curry)(((e,t)=>{if(null==t)return"";if("string"!=typeof t&&(t=String(t)),e&&t){const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a=""}=e,[o,s]=t.split(".");t=i+o.replace(/\B(?=(\d{3})+(?!\d))/g,r)+(s?n+s:"")+a}else!e&&t&&(t=vn().number(t));return t})),Cb=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?vn().number(e,"0,0.0a").toUpperCase():vn().number(e,"0,0"):""},Lb=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let jb=!0;const Db=e=>jb=e,kb=(e,t)=>e!==t&&t?jb&&e?`${t} (${e})`:t:e,Fb=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Mb=(e,t,r)=>{const n=Fb(e,t,r);return kb(r,n)},xb=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),$b=(0,l.complement)(xb),Vb=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),Gb=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)},Wb=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter($b(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),Yb=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=r[n.uri],s=i?q(i):"L",u=a?K(a):"L LTS";switch(n.type){case bt.TYPE_NUMBER:case bt.TYPE_FLOAT:case bt.TYPE_DOUBLE:case bt.TYPE_LONG:case bt.TYPE_INT:case bt.TYPE_COUNT:return t&&Ub(o,t);case bt.TYPE_BOOLEAN:case bt.TYPE_BOOLEAN_RADIO:case bt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isNil)(t)?t:le(t)?vn().text("yes"):vn().text("no");case bt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),t&&(ku(t)?Fu(t):vn().date(t,s));case bt.TYPE_ACTIVENESS_DATE:case bt.TYPE_LOCAL_DATE:return t&&(ku(t)?Fu(t):vn().date(t,s));case bt.TYPE_TIMESTAMP:return t&&(ku(t)?Fu(t):vn().date(isNaN(t)?t:Number(t),u));case bt.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case bt.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case bt.TYPE_DOLLAR:return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?kb((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),Bb={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},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)"},divider:"rgba(0,0,0,0.38)"},overrides:{MuiFilledInput:{root:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}},MuiInputBase:{input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"}}}},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)",transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},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)"},qb=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 a=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,i).then((e=>{const n=t(e.status);return n>0&&o<n?r(o).then((()=>a(o+1))):e}))};return a()}},Hb=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=JSON.parse(t)}catch(n){r={errorMessage:t,errorCode:e.status}}throw r})))),Qb=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}=t,a=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e})),t.next);a(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=(0,l.pipe)((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),qb,Hb);return{request:(e,n)=>{const i=s(fetch),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))},abort:i})})):a(e,n)},addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}},Kb="__metadata",Jb=(e=>{const t=[Kb,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),Xb=(0,l.set)(Jb),zb=(0,l.view)(Jb),Zb=Xb(En.NEW),eO=Xb(En.REMOVED),tO=Xb(En.EDITED),rO=Xb(En.IGNORED),nO=(0,l.pipe)(zb,(0,l.equals)(En.REMOVED)),iO=(0,l.pipe)(zb,(0,l.equals)(En.NEW)),aO=(0,l.pipe)(zb,(0,l.equals)(En.EDITED)),oO=(0,l.pipe)(zb,(0,l.complement)(l.isNil)),sO=(0,l.pipe)(zb,(0,l.equals)(En.IGNORED)),lO=(0,l.omit)([Kb]),uO=(e,t)=>e===Kb?void 0:t;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 pO=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=pO(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},dO=(e,t)=>pO((0,l.propEq)("nodeId",t),e),yO=(e,t)=>pO((0,l.pathEq)(["entity","uri"],t),e),fO=(e,t)=>{const r=dO(e,t);return r.length>1?r[r.length-2]:null},TO=(e,t)=>{const r=dO(e,t);return r.length>0?r[r.length-1]:null},EO=(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=>EO(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},mO=()=>{},hO=(e,t)=>{let{parent:r,nodeProcessing:n=mO}=t;n(e,r),e.children&&e.children.forEach((t=>hO(t,{parent:e,nodeProcessing:n})))},bO=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case Ze.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 Ze.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 Ze.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){cO(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})}}},OO=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&&hO(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===Ze.addingChild||r.editingMode===Ze.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=bO({node:r,connection:n,isReversed:i}),s=tT({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ze.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=bO({node:r,isReversed:i,connection:n}),l=s?aT({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):iT({oldRelation:e,newRelation:a});t.push(l)}}})})),t},vO=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=vO(r,t);if(e)return e}return!1},gO=(0,l.curry)(((e,t)=>{const r=(0,l.map)(gO(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),_O=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>vO(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:gO(e,n.root)}}));return(0,l.pipe)(r,n)(t)},AO={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},NO={asc:"asc",desc:"desc"},PO=AO.entityLabel,RO=NO.asc,SO=(0,l.always)(0),wO=e=>{let{sortField:t=PO,sortOrder:r=RO,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case AO.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return K_.strings.sort(t,a,o)})(n,r);case AO.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return K_.strings.sort(e,i,a)})(r);default:return SO}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},IO=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(NO)),l.identity,(0,l.always)(RO))),UO=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(AO)),l.identity,(0,l.always)(PO)));var CO=r(91104);let LO;const jO=(e,t)=>(LO||(LO=CO.createClient({key:t})),new Promise((t=>{LO.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)}))}))),DO=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},kO=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(ds).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[DO(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(kO(e.value,t,r))),n})),FO=e=>e&&e.length>0,MO=(e,t)=>[].concat(e&&e.attributes?kO(e.attributes,t):[]).filter(l.identity),xO=(e,t,r,n,i)=>{if(e&&e.type){const t=(zr(r,e.type).geoLocationAttributes||[]).map((t=>{return r=MO(e,t.latitude),n=MO(e,t.longitude),FO(r)&&FO(n)&&{lat:Number(r[0]),lng:Number(n[0])};var r,n})).filter(l.identity);if(t.length>0)return Promise.resolve(t[0])}const a=t.GeoLocation;if(a){const e=a.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(FO(t)&&t[0].value&&FO(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?jO(n.label,i).catch((()=>null)):Promise.resolve(null)},$O=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=zr(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=>t.attributes[e])).filter(l.identity).flatMap((e=>e.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e}))))));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s}=t;return xO(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?jO(a.label,r).catch((()=>null)):e)).then((e=>{let t=Array.isArray(e)?e:[e];return e&&t.map((e=>({id:e.id||n,label:i,entity:a,point:e})))})).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},VO=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=zr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(Nr(e,r.latitude,t.type)&&Nr(e,r.longitude,t.type)){const e=MO(t,r.latitude),n=MO(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))},GO=(e,t,r)=>Promise.all([VO(e,t),$O(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.lon===e.point.lon))))]}));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 BO=(e,t)=>t.values.map(Ao(e,t.entityTypeUri)),qO=(e,t,r)=>Xs(t.fieldName,r)||Nr(e,Kt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),HO=(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?kb(e,t):e}),r)},QO=(0,l.path)(["attrType","label"]),KO=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>WO({},e,{[t]:!0})),{});e[r]=e[r]?WO({},e[r],n):n}return e}),{}),JO=(0,l.pipe)((0,l.prop)("values"),E),XO=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",jn.type.name)),zO=e=>e.type===tv.NUMERIC_RANGE_FACET,ZO=e=>e.type===tv.DATE_RANGE_FACET,ev=(0,l.either)(zO,ZO),tv={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},rv=e=>{switch(null==e?void 0:e.name){case jn.type.name:return tv.ENTITY_TYPE_FACET;case jn.createdBy.name:case jn.updatedBy.name:case jn.sourceSystems.name:case jn.tags.name:case jn.roles.name:case jn.matchRules.name:case jn.MLRecommendedMatch.name:return tv.WITH_DROPDOWN_CHECKBOXES_FACET;case jn.createdTime.name:case jn.updatedTime.name:case jn.startDate.name:case jn.endDate.name:return tv.DATE_RANGE_FACET;case jn.matches.name:case jn.matchScore.name:return tv.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return tv.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return tv.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return tv.DATE_RANGE_FACET;default:return tv.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},nv=(0,l.pipe)(qO,rv),iv=(0,l.pipe)((0,l.path)(["attrType","type"]),Dr),av=(0,l.cond)([[zO,(0,l.always)(sn.IN_RANGE)],[ZO,(0,l.always)(sn.WITHIN)],[(0,l.allPass)([iv,e=>e.values.length>=2]),(0,l.always)(sn.EXISTS)],[l.T,(0,l.always)(sn.EQUALS)]]),ov=(0,l.cond)([[ZO,(0,l.prop)("values")],[zO,(0,l.prop)("values")],[iv,e=>1===e.values.length?e.values.map(le):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]);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.pipe)((0,l.path)(["attrType","type"]),wr),uv=(0,l.pipe)((0,l.path)(["attrType","type"]),Cr),cv=(0,l.pipe)((0,l.prop)("attrType"),Zs),pv=(0,l.pipe)((0,l.prop)("attrType"),zs),dv=e=>t=>t.values.map((t=>zr(e,t).label)).join(" , "),yv=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),fv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(vn().number),yv)),(0,l.join)(","))(e.values);return`${QO(e)}: ${t}`},Tv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),yv)),(0,l.join)(","))(e.values);return`${QO(e)}: ${t}`},Ev=e=>t=>`${QO(t)}: ${BO(e,t).join(", ")}`,mv=e=>t=>{const r=HO(e,t);return`${QO(t)}: ${r.join(", ")}`},hv=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[pv,dv(e)],[uv,fv],[lv,Tv],[cv,Ev(e)],[l.T,mv(t)]]),r))),bv=(e,t,r,n)=>(0,l.pipe)(l.values,(0,l.reject)((0,l.pipe)((0,l.prop)("values"),E)),(0,l.map)((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){sv(e,t,r[t])}))}return e}({},t,{attrType:qO(e,t,n)}))),hv(e,r))(t),Ov=new RegExp(`^${vn().text("Search")}`),vv=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...bv(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(Ov,"",u)]},gv=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(fn),_v=e=>(e=>gv.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]=Mu(t);return e.replace(r,i).replace(n,a)}),e))(e),Av=(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}`})),Nv={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},Pv=e=>[Nv.geoPolygon,Nv.onMapMove].includes(e),Rv=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},Sv=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},wv=(e,t)=>Pv(e)?t.map(Rv):[Sv(t)],Iv=e=>Pv(e)?vn().text("Geo Polygon"):vn().text("Geo Location"),Uv=e=>{switch(e){case Nv.geoLocation:return"geoLocation";case Nv.geoPolygon:case Nv.onMapMove:return"geoPolygon"}},Cv={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},Lv=e=>vn().text(e),jv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[sn.EQUALS]:"=",[sn.NOT_EQUALS]:"≠",[sn.STARTS_WITH]:"*",[sn.MISSING_VALUE]:vn().text("missing value"),[sn.HAS_ALL]:vn().text("has all"),[sn.IN_RANGE]:vn().text("in range"),[sn.FULL_TEXT]:vn().text("full text"),[sn.EXISTS]:vn().text("exists"),[sn.COUNT_EQUALS]:`${vn().text("count")} =`,[sn.COUNT_NOT_EQUALS]:`${vn().text("count")} ≠`,[sn.COUNT_LT]:`${vn().text("count")} <`,[sn.COUNT_LTE]:`${vn().text("count")} <=`,[sn.COUNT_GT]:`${vn().text("count")} >`,[sn.COUNT_RANGE]:vn().text("count range"),[sn.LT]:"<",[sn.LTE]:"<=",[sn.GT]:">",[sn.GTE]:">=",[sn.IN_FILE]:vn().text("in file"),[sn.NOT_IN_FILE]:vn().text("not in file"),[sn.CONTAINS]:"~",[ln.LIST_EQUALS]:"=",[ln.NOT_LIST_EQUALS]:"≠",[ln.LIST_EQUALS_CASE_SENSITIVE]:"=",[ln.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||vn().text(e.toLowerCase())},Dv=e=>({type:Cv.operator,text:e}),kv=e=>({type:Cv.operator,text:Lv(e)}),Fv=e=>({type:Cv.attributeLabel,text:e}),Mv=e=>({type:Cv.specialAttributeLabel,text:e}),xv=e=>({type:Cv.attributeFilter,text:jv(e)}),$v=e=>({type:Cv.attributeValue,text:e}),Vv=e=>({type:Cv.entityTypeLabel,text:e}),Gv=()=>({type:Cv.space,text:" "}),Wv=()=>({type:Cv.bracket,text:"("}),Yv=()=>({type:Cv.bracket,text:")"}),Bv=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),qv=(0,l.curry)(((e,t)=>t.map(Bv(e)))),Hv=(0,l.curry)(((e,t,r)=>[e,...r,t])),Qv=Hv(Wv(),Yv()),Kv=Hv(Gv(),Gv()),Jv=(0,l.curry)(((e,t)=>[e,...t])),Xv=e=>Jv(Vv(e)),zv=e=>Jv(Vv(`${e}: `)),Zv=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=mu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=Tu(s),a=Eu(s);!r&&t&&n&&(i.push(Wv()),r=!0),i.push(o),r&&a&&(i.push(Yv()),r=!1);const l=e?kv(s):Dv(s);i.push(...Kv([l]))}else i.push(o),r&&(i.push(Yv()),r=!1)}return i}},eg=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),tg=(0,l.pipe)(Zv({localizable:!1}),eg),rg=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},ng=e=>{let{data:t,values:r,filter:n}=e;return t&&ec({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},ig=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(ng)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),ag=(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)&&vr(e.data.attrType)})(e)&&[sn.HAS_ALL,sn.EQUALS,sn.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:Or((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})))),Gb),og=(e,t)=>(0,l.pipe)(ag,Wb(t))(e),sg=(0,l.pathEq)(["data","fieldName"],jn.type.name),lg=(0,l.path)(["data","entityTypeUri"]),ug=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),cg=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(ps(e)),attributes:(0,l.filter)((0,l.pipe)(lg,(0,l.anyPass)([l.isNil,ps(e),r=>{const n=(t.entityTypes||[]).filter(ps(e));return(n.length>1?nn(e,n):null)===r&&!!zr(e,r)}])))})(t))))),pg=e=>(0,l.pipe)((0,l.prop)("filter"),ru,(0,l.equals)(e)),dg=(0,l.curry)(((e,t,r,n,i,a)=>{const o=Xs(n.fieldName)||n.attrType,s=ju(o,i),u=Yb({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>vr(s),()=>(0,l.is)(Object,a)&&a.lookupCode?kb(a.lookupCode,a.value):Mb(r,Or(o),a)],[()=>Zs(s),()=>Ao(e,n.entityTypeUri,a)],[()=>el(s),()=>qo(e,a)],[()=>ol(s),()=>Ko(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>Cr(c)||Dr(c)),Iu),$v)()})),yg=(e,t,r,n)=>{const i=dg(e,t,r,n.data,n.filter);return(0,l.cond)([[pg(0),(0,l.always)([])],[(0,l.both)(pg(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[Gv(),i(r),{type:Cv.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[Gv(),...(0,l.pipe)(l.flatten,(0,l.map)(i),qv({type:Cv.punctuationMark,text:", "}))(t)]}]])(n)},fg=(e,t)=>{const r=!!Xs(e.data.fieldName);return(0,l.pipe)(rg,r?Mv:Fv)(e,t)},Tg=(e,t,r,n,i)=>[fg(n,i),Gv(),xv(n.filter),...yg(e,t,r,n)],Eg=(0,l.addIndex)(l.map),mg=(0,l.propEq)("length",1),hg=(0,l.propSatisfies)((0,l.lt)(1),"length"),bg=(0,l.complement)(l.isEmpty),Og=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(Ou,(0,l.filter)(ng),vu,(0,l.map)((n=>({operand:Tg(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,Zv()))(n)},vg=(0,l.pipe)(Og,l.flatten),gg=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>Pd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=Og(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(Xv),(0,l.pipe)(s(zv),(0,l.unless)((()=>mg(u)||i),Qv)))(u)},_g=(e,t,r,n)=>(0,l.pipe)(Ou,(0,l.filter)(ig),vu,Eg(((n,i,a)=>({operand:gg(e,t,r,n,mg(a)),operator:n.operator}))),Zv(),l.flatten)(n),Ag=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),Zv(),l.flatten),Ng=e=>{let{searchType:t,values:[r]}=e;return wv(t,r).join(", ")},Pg=(e,t,r,n,i,a)=>{const o=(e=>e?[Mv(e.isRawFilter?vn().text("Raw filter"):vn().text("Search")),...Kv([xv(sn.EQUALS)]),$v(`"${e.value}"`)]:[])(i),s=(e=>e?[Mv(Iv(e.searchType)),Gv(),$v(Ng(e))]:[])(a),u=(0,l.pipe)(_g,(0,l.when)((e=>hg(e)&&(bg(o)||bg(s))),Qv))(e,t,r,n);return Ag([o,s,u])},Rg=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),Sg=(0,l.pipe)(Pg,Rg),wg=(0,l.has)("attributes"),Ig=Array.isArray,Ug=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),Cg=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=Lg(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)(Ug(a))),Qv),(0,l.concat)(Kv([Dv(o)]))))(s)},Lg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return wg(n)?Cg(e,t,r,n,i):Ig(n)?n.reduce(((n,a)=>n.concat(Lg(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(Kv([Dv(n.operator)])))(Tg(e,t,r,n,i))},jg=(e,t,r,n,i)=>(0,l.pipe)(Lg,l.flatten)(e,t,r,n,i);function Dg(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}const Fg=(0,l.complement)(sg),Mg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(sg),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(lg),(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}},xg=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=Mg(t);return(r||n)&&hu(t)},$g=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(xg)),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(sg).some((0,l.propEq)("filter",sn.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}=Mg(r);if(xg(e))t.push(Dg({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(Fg)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(sg,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(lg,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(Fg),entityTypes:n,operator:i?a:e.operator,id:db()()}}));t.push(...n)}var a;return t})(t))),[]))),Vg={[sn.EQUALS]:sn.ON,[sn.IN_RANGE]:sn.WITHIN,[sn.GTE]:sn.AFTER,[sn.GT]:sn.AFTER,[sn.LTE]:sn.BEFORE,[sn.LT]:sn.BEFORE},Gg=(0,l.curry)((e=>Vg[e]||e)),Wg=(0,l.curry)(((e,t)=>{switch(e){case sn.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case sn.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),Yg=(0,l.pipe)((0,l.path)(["data","attrType","type"]),wr),Bg=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>Dg({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return Yg(e)?(0,l.evolve)({filter:Gg,values:Wg(t)},e):e}))})))})),qg=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),$g,cg(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")))})),Bg,(0,l.reject)(ug))(r)));function Hg(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){Qg(e,t,r[t])}))}return e}function Qg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Kg=(e,t)=>({data:{uri:Zt(e.fieldName)?Kt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||av(e),id:db()(),values:ov(e)}),Jg=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=Xs(a,t,r)||Nr(e,i);if(!s)return null;if(pr(s))return Hg({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=Pd(e,{type:o}),i=(Ar(e,Kt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return Hg({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),Xg=(0,l.curry)(((e,t,r,n)=>qg(Jg,e,n,t,r)));function zg(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){Zg(e,t,r[t])}))}return e}function Zg(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_=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},t_=e=>"rdmLookups.not.resolved"===e?jn.notResolved.name:e,r_=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===dn?sn.IN_RANGE:yn(a),u=t_(n),c=Xs(u)||Nr(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=>zg({},e,{filename:Lb(e)}))))],[()=>Dr(null==c?void 0:c.type),(0,l.map)(le)],[e=>iu(s)&&!Array.isArray(e[0])&&!wr(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:db()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===dn?"and not":"and",filter:s,values:p}})),n_=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(r_(e,nn(e,i)));return[{id:db()(),operator:"or",attributes:a,entityTypes:i}]})),i_=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),a_=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([i_("from"),i_("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,()=>[]]]),o_=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return zg({},r,{values:a_(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?qs(e.fieldName,n):e.fieldName})},s_=(e,t)=>{if((0,l.has)("children")(e)){const r=o_(e,t);return e.children.reduce(((e,n)=>(e.push(s_(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return o_(e,t)},l_=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(o_(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(zg({fieldName:e.fieldName},o_(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(s_,l.flatten)],[l.T,o_]]),u_=(0,l.pipe)((0,l.map)(l_),l.flatten),c_=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},p_=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=n_(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:u_(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>zg({},t,{type:nv(e,t)}))).map((e=>zg({},e,{values:ev(e)?c_(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 Kg(r,t)})),operator:"or",id:db()(),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=>({[t_(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[zg({},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 Xg(e,t,r,p)},d_=(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)(JO),(0,l.partition)(XO))(t),i=n.map((t=>Hg({},t,{type:nv(e,t)}))).map((e=>Kg(e))),a=r.values||[];return[{attributes:i,operator:"or",id:db()(),entityTypes:a}]})(e,a);return Xg(e,t,r,o)})(e,t,r,n):p_(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},y_=e=>"2.0"===e.version?e.keyword:e_(e),f_=e=>(0,l.pathEq)(["object","uri"],e),T_=(e,t)=>(0,l.pipe)((0,l.find)(f_(e)),(0,l.prop)("object"))(t),E_=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"),f_(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=T_(r.match,t)||n[r.match];return i?{label:ad((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return _o(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)},m_=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),h_=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),b_=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[]}=t;const a=(0,l.propOr)({},n,r);return{label:ad((0,l.prop)("label",a)),matchRules:i.map((function(t){return _o(e,a.type,t)||{label:t,uri:t}}))}})))(t),O_=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)},v_=(0,l.path)(["object","uri"]),g_=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},__=e=>e.getValue(),A_=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=A_(n[e],t),!r);e++);return r},N_=(e,t)=>{const r=[],n=(0,l.pipe)(__,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(N_,[t]),a);return r.push.apply(r,o),r};function P_(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){R_(e,t,r[t])}))}return e}function R_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const S_=(e,t)=>!!e[t],w_=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},I_=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||[]])},U_=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return P_({},t,{[r.uri]:P_({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:I_(null==o?void 0:o.parents,n),children:I_(null==o?void 0:o.children,i),values:I_(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},C_=e=>e.children?e.children.flatMap(C_):e,L_=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=zr(r,t)||wi(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return rs(r,n,i).flatMap(C_).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>Nr(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=U_({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>U_({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},j_=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!Ft(e.uri)&&Wt(e.type)&&Wt(t)&&!t.startsWith(e.type))(n,t))return e;const i=Rs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(ds),(0,l.map)(w_))(i);return U_({structure:e,attrType:e[t].attrType,values:a})}),t)},D_=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 S_(e,r)}));return r||n?t.filter(ds).reduce(((e,t)=>D_({structure:e,attributeValue:t})),e):e}),t);{const e=r;return S_(t,e.type)?U_({structure:t,attrType:t[e.type].attrType,values:[w_(e)]}):t}},k_=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?P_({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},F_=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=Rs(i,n,r)||[];return a.length?U_({structure:t,attrType:t[r].attrType,values:a.filter(ds).map(w_)}):t},M_=(e,t,r)=>{const n=$t(e),i=$t(t);return n===i?((e,t)=>{const r=rr(t),n=rr(e);return Bt(n,r)||((e,t)=>er(e)&&!er(t)&&Bt(t,e))(n,r)})(e,t):!(!r||!tr(t))&&fE(r,i).includes(n)},x_=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},$_=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?dE(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return M_(r,t,o)}))},V_=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>V_(e,t,r)))))},G_=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&x_(n,e)}},W_=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=$t(n),c=yE(u,o,i,a),p=V_("children",t,l),d=V_("parents",t,l),y=p.flatMap((e=>V_("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return M_(t,n,c)})).map((t=>G_(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return M_(n,t,c)||$t(t)!==u&&M_(t,n,c)})).map((t=>G_(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=V_("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return f.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&M_(n,t,c)}))})).map((t=>G_(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return M_(t,n,c)})).map((e=>G_(r,n,e,s))),...T,...E,...f]},Y_=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=Yb({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=>nd(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[Tr,()=>a(n)],[vr,()=>(e=>{const r=o(e),n=Or(t);return ql([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Mb(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},B_=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:sn.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(q_(r,t)):i.push(H_([t],r)),i},q_=(e,t)=>{const r=dr(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=Tr(i)?q_(i,t[r]):[H_(t[r],i)];return e.push(...a),e}}),[])},H_=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:br(t.uri),filter:t.type===bt.TYPE_BLOB?sn.FULL_TEXT:sn.EQUALS,values:e}:{fieldName:br(t.uri),filter:sn.MISSING_VALUE},Q_={AttributesDiff:a,AttributesEditor:o,HistoryManager:s},K_={Colors:r(33164),DependencyManager:r(29524),strings:n,dates:i}},33164:(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}},29524:(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
+ (self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2701],{57941:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>ws,PY2:()=>en,Ng6:()=>Ae,YJ7:()=>Hr,NlI:()=>Mr,Xt7:()=>Oe,wfT:()=>Mn,EMD:()=>Pn,HAc:()=>ve,PEf:()=>on,oA3:()=>Nn,$XE:()=>$e,eWf:()=>nn,q7e:()=>ge,KVe:()=>xn,WVQ:()=>mr,oZZ:()=>Kn,bNA:()=>Jn,Rjq:()=>Xn,G39:()=>ln,W0P:()=>He,X1H:()=>qe,yn8:()=>ke,N0y:()=>De,dZX:()=>Ve,bQt:()=>Zn,oS0:()=>Je,lL_:()=>Yr,Nsj:()=>Kr,psV:()=>qr,xPW:()=>tn,pyR:()=>Cn,p8l:()=>Sn,Wkf:()=>be,zHr:()=>he,NIO:()=>me,$26:()=>iv,Esk:()=>On,s9T:()=>Le,MEy:()=>yu,j5E:()=>Fr,vAw:()=>An,NMQ:()=>_n,mNm:()=>In,rwv:()=>Hn,s_5:()=>Ln,RgZ:()=>wn,unl:()=>Qn,Qy0:()=>zn,pYu:()=>bn,wIJ:()=>Sv,GFH:()=>Pe,Ury:()=>un,S91:()=>cn,p3$:()=>ni,wSh:()=>Z,BDP:()=>yi,pGS:()=>Un,ARY:()=>Xe,XGc:()=>Fn,fO_:()=>Ar,wwy:()=>Ie,h_8:()=>dn,_XL:()=>Qr,j2V:()=>$n,dMV:()=>Dn,NBX:()=>N_,OXy:()=>ze,BXd:()=>Fe,CJB:()=>Wn,lXI:()=>Ye,nqG:()=>ti,C68:()=>sn,yxQ:()=>ei,Yj_:()=>Ue,D25:()=>Se,ZIY:()=>Ge,Tl4:()=>Dv,lwr:()=>an,NkU:()=>Vn,Rtp:()=>kn,YGx:()=>Me,uTS:()=>jn,MCv:()=>_e,IYE:()=>Rn,PiC:()=>qn,MVv:()=>Qe,h_m:()=>Be,tJI:()=>Ne,fDt:()=>Re,cNQ:()=>Gn,SwE:()=>vn,ZHR:()=>Bn,lD1:()=>pn,lVm:()=>xe,vnX:()=>wO,$x5:()=>IO,_R1:()=>RO,wUm:()=>SO,z7V:()=>ri,dC6:()=>je,MBD:()=>we,GmF:()=>Bi,cKm:()=>We,iP_:()=>rn,NVC:()=>Ce,tPT:()=>rl,tZe:()=>Fp,kRE:()=>Vy,psB:()=>Gy,X0$:()=>tl,zE1:()=>dl,Wm5:()=>Bs,vyX:()=>ic,wLZ:()=>nl,W4V:()=>se,EtK:()=>ds,Wtd:()=>el,asT:()=>M_,kGs:()=>_E,ewt:()=>_T,O_f:()=>ou,sOy:()=>gt,Tde:()=>Jt,LMI:()=>Vu,skb:()=>Ag,sPt:()=>Cu,sH1:()=>Lu,RPM:()=>WE,h27:()=>Xu,Uqd:()=>nc,xG:()=>Fg,Z2f:()=>Yb,fgW:()=>ig,I69:()=>wg,ZxB:()=>Ug,mdt:()=>ME,Qbq:()=>uE,rny:()=>Si,UEY:()=>da,Q0T:()=>pa,Lyr:()=>ba,sBn:()=>ca,itK:()=>oa,H9$:()=>ua,KPc:()=>la,zos:()=>sa,ELQ:()=>Oa,dZs:()=>Ji,Cz4:()=>Ki,z_L:()=>ma,fGe:()=>Qi,iuF:()=>ia,Wib:()=>aa,Hn0:()=>ha,obS:()=>va,E$L:()=>Xi,XUh:()=>na,Qp_:()=>ta,_jk:()=>zi,sKE:()=>Zi,WmG:()=>ra,QKx:()=>Ta,Oik:()=>fa,s0A:()=>ea,o9m:()=>ya,MCd:()=>Ea,RsS:()=>zu,tGK:()=>Dl,lIv:()=>yl,Vg3:()=>Di,mkC:()=>gi,xv5:()=>Fi,a14:()=>Ai,yv0:()=>ki,Zm0:()=>_i,Nxd:()=>vi,$mM:()=>ji,ifj:()=>br,NWi:()=>uO,xr3:()=>lO,wNf:()=>Bl,iJH:()=>cO,d89:()=>hi,Edd:()=>bi,Z5t:()=>Oi,uGe:()=>Ti,UoR:()=>fi,xvW:()=>sO,$qe:()=>oO,yPM:()=>Hi,$cp:()=>pl,vKJ:()=>ul,VtG:()=>Cc,AID:()=>Mf,B1H:()=>__,b7X:()=>oE,$uE:()=>PE,keo:()=>lE,C_p:()=>Pm,G27:()=>Rh,JA0:()=>Iy,b3T:()=>gE,oC6:()=>OE,_Zs:()=>vE,epC:()=>SE,YYG:()=>RE,f_2:()=>Cy,w3l:()=>a_,QHB:()=>Ph,Jso:()=>d_,RXH:()=>ph,Vr9:()=>Dh,lMm:()=>Ab,BlA:()=>Q_,fmQ:()=>is,yRD:()=>Qg,NcL:()=>Cm,QK6:()=>de,ymd:()=>Op,JV_:()=>rf,XiW:()=>rT,Yrx:()=>my,GPx:()=>Zs,gjI:()=>zs,vlo:()=>VT,E_P:()=>LE,aAL:()=>sp,NBq:()=>as,wp9:()=>FE,DsR:()=>tp,MPc:()=>Wf,gWE:()=>Yf,DT_:()=>Bf,ipn:()=>Hf,ORg:()=>ci,_wz:()=>qf,RYR:()=>hT,PP2:()=>gy,wS7:()=>Xb,cBQ:()=>$c,pBq:()=>_f,DsO:()=>ee,X78:()=>af,xZs:()=>zy,YFy:()=>by,Gmt:()=>qy,K$w:()=>By,DSj:()=>lp,Mfr:()=>Oy,k9j:()=>Gc,ww$:()=>il,WVU:()=>Yy,hxF:()=>Hs,nwO:()=>X_,Mzk:()=>Dc,aFF:()=>TE,HRH:()=>Eu,EZK:()=>Kp,Kxm:()=>Bp,Z9i:()=>sm,CrF:()=>Fy,DNd:()=>_a,vUy:()=>W_,lJh:()=>bu,zHo:()=>Ou,sEJ:()=>R_,UO$:()=>wf,zeJ:()=>rr,dLR:()=>Es,JQy:()=>Ps,XtP:()=>fs,Ug0:()=>jr,A1W:()=>sE,sw:()=>Qp,nv3:()=>hO,JgD:()=>mO,nve:()=>S_,SkP:()=>Rs,SAs:()=>Nf,i5L:()=>Ss,PWK:()=>go,IM5:()=>Ts,Mfk:()=>wb,mB6:()=>Hb,p6d:()=>w,o0x:()=>U,ufS:()=>jb,k7L:()=>Db,mrB:()=>I,ncP:()=>Et,Zmi:()=>pt,hm5:()=>yt,ECL:()=>gr,vPL:()=>zp,qmL:()=>aE,hPi:()=>vf,hXd:()=>Ii,OCS:()=>Ui,p2l:()=>Us,qF1:()=>vp,_X$:()=>gp,yj2:()=>Av,bzh:()=>VE,k66:()=>Co,kiP:()=>Ha,pSg:()=>ce,kz_:()=>Py,H_U:()=>jo,t9e:()=>Ia,j2$:()=>Mp,PFL:()=>xt,aJ3:()=>KO,To9:()=>Xt,wpo:()=>hd,ADq:()=>rm,UUb:()=>em,tQX:()=>tm,xy8:()=>Wt,EUG:()=>nr,AFK:()=>St,X3M:()=>tr,WN0:()=>Lo,kDl:()=>ms,uDV:()=>iE,IhQ:()=>gs,pfb:()=>As,R$r:()=>CE,w80:()=>uo,Pfu:()=>Sa,Gtj:()=>Pl,fyF:()=>Nl,kkq:()=>Uo,u5q:()=>mt,O$n:()=>Ed,ptG:()=>md,f4_:()=>xm,uap:()=>Mm,d7q:()=>Ey,liG:()=>_y,$oF:()=>Ty,avf:()=>UT,DiQ:()=>IT,cfX:()=>wT,vD3:()=>LT,Qrb:()=>ST,EJQ:()=>CT,HWy:()=>RT,gjS:()=>vT,y6v:()=>PT,JUW:()=>Ly,GtP:()=>Km,_kX:()=>Na,u1e:()=>Pa,sJj:()=>dE,CJp:()=>Hm,uKF:()=>pE,wo0:()=>$y,s5:()=>No,cwx:()=>Ao,Y6b:()=>ay,TTx:()=>Ky,UtR:()=>oy,HaQ:()=>Jy,E6I:()=>ky,Won:()=>ly,vTU:()=>ny,Nsy:()=>od,KMQ:()=>fE,Do$:()=>cd,CSV:()=>js,TMe:()=>sy,l1V:()=>gu,VQ1:()=>Pu,z7d:()=>GT,Xaq:()=>Fo,Sj8:()=>q_,PJj:()=>Cl,k3T:()=>kr,PjQ:()=>di,s7l:()=>Rc,jLA:()=>Jm,GGR:()=>FT,j5q:()=>DT,DnY:()=>Ac,RY5:()=>zT,Px$:()=>bT,KPC:()=>O_,NIY:()=>Lc,HvW:()=>wc,Fof:()=>Ua,BTI:()=>dd,uie:()=>td,ChB:()=>Jp,q27:()=>Od,vrC:()=>Hh,fAQ:()=>uf,XkT:()=>_c,lrH:()=>cf,nt9:()=>wr,XH8:()=>Td,XH2:()=>Dr,jFi:()=>fd,qhs:()=>lo,wwR:()=>pd,Uk3:()=>wt,ev7:()=>A_,RB9:()=>wy,iFp:()=>BE,e$p:()=>HE,PcX:()=>QE,SpP:()=>qE,R6_:()=>XO,CY1:()=>av,Ajk:()=>bc,Yiz:()=>hc,FK9:()=>dc,UOo:()=>kb,aTW:()=>Qy,uug:()=>Yl,P$2:()=>lv,XS2:()=>kl,Hyb:()=>ru,d3Y:()=>lc,Klp:()=>cc,WxZ:()=>uv,Gzu:()=>vu,ZOr:()=>gc,uqV:()=>ey,Pm4:()=>re,hWO:()=>Nt,nVD:()=>eE,dED:()=>yy,P2h:()=>dy,jrr:()=>Wa,mmY:()=>Ba,T6O:()=>Do,h6J:()=>jp,hM2:()=>T_,XR6:()=>X,jmz:()=>nE,IHt:()=>rE,NZI:()=>om,wdF:()=>sf,kgP:()=>lf,ZYI:()=>Ep,QXK:()=>vl,efz:()=>gl,Q5d:()=>Ol,Ysv:()=>_l,UWq:()=>BT,ocC:()=>YT,io3:()=>Cr,Sbt:()=>po,roS:()=>co,Ww1:()=>yo,QaS:()=>kc,ERZ:()=>n_,CL1:()=>E_,idV:()=>Hp,nIW:()=>At,fjE:()=>zO,sG0:()=>xb,tV7:()=>Ll,g8o:()=>Lv,Qy:()=>Cv,t2P:()=>QO,KbW:()=>za,wId:()=>eo,LS0:()=>to,bFH:()=>Vd,Rgl:()=>Wd,fW1:()=>Lm,GFW:()=>Xy,Ywp:()=>_O,pg:()=>Ad,WSA:()=>Yd,fed:()=>y_,tT_:()=>_s,BgZ:()=>Ns,KbL:()=>Pc,JBA:()=>Lt,aNC:()=>EO,RFJ:()=>Tp,Zeh:()=>Sf,OT5:()=>gO,mC3:()=>Tl,kR6:()=>H_,NVY:()=>DE,k6v:()=>_p,FEC:()=>Ap,Ob5:()=>vd,KUV:()=>gd,dvH:()=>jE,V3i:()=>Mh,VD3:()=>Lr,mm2:()=>Nu,rou:()=>mf,izH:()=>Ra,DK$:()=>wa,KMp:()=>op,c31:()=>tt,mbo:()=>im,gT8:()=>it,CZ8:()=>rs,uGi:()=>ls,Poc:()=>Ze,_9k:()=>ps,ZTM:()=>os,bwT:()=>us,tzW:()=>ot,tF$:()=>nt,o96:()=>ns,M4S:()=>cs,_vs:()=>Zc,xF8:()=>gT,HQx:()=>EE,ATu:()=>nm,j1S:()=>li,V3K:()=>oi,Lmx:()=>si,ZaZ:()=>et,n_1:()=>ry,N6e:()=>np,SxO:()=>Ya,w3p:()=>kE,xU7:()=>pe,Y_p:()=>Eo,$k6:()=>To,Gdl:()=>Vb,U6P:()=>$b,OwB:()=>JO,hTh:()=>tE,xqc:()=>Po,JvE:()=>Ro,i29:()=>qu,dzT:()=>Pi,uPS:()=>xc,cZV:()=>Mc,n3B:()=>pg,e6O:()=>ag,s7j:()=>Rv,j$Q:()=>jy,kW2:()=>Qm,tH7:()=>_o,Yxg:()=>xs,MaZ:()=>kT,nqN:()=>jT,jWj:()=>HT,o_J:()=>Mo,hgZ:()=>Xp,yW4:()=>Dp,uT0:()=>Cp,C82:()=>Lp,u9Z:()=>Ef,J$m:()=>ty,j_Q:()=>fc,OaI:()=>Tc,wB1:()=>g_,SP6:()=>_d,ZYr:()=>b_,IMU:()=>fp,FoU:()=>Uy,DVz:()=>qb,mxe:()=>ug,FHr:()=>Pf,D1g:()=>hf,VO3:()=>jO,de5:()=>LO,Uw1:()=>Te,J6q:()=>am,XCe:()=>$a,fbl:()=>AO,Ir:()=>Ja,XQO:()=>Xa,QXb:()=>jd,P8_:()=>ef,iiD:()=>ap,MOC:()=>Dd,WF:()=>Ld,xE1:()=>pi,idW:()=>k_,QWZ:()=>Lb,YL3:()=>jc,Fn9:()=>T,j2U:()=>Is,MpE:()=>st,kQw:()=>Vt,mfm:()=>nu,vZp:()=>It,E8K:()=>U_,VSb:()=>es,vr_:()=>$t,Vmh:()=>G_,FgW:()=>Fh,oDv:()=>$o,kuw:()=>Go,eHk:()=>qT,Tt2:()=>xo,T6Y:()=>dr,_26:()=>Zl,YkM:()=>Kt,J6y:()=>xl,njU:()=>Hl,TBP:()=>Vo,IT0:()=>lm,x_:()=>yE,biM:()=>ld,TMl:()=>ud,Vkd:()=>Jl,WiY:()=>rv,_zi:()=>Xl,J6D:()=>Au,Lt4:()=>or,QEi:()=>Zt,whI:()=>Pr,KIu:()=>Sr,JhM:()=>oe,C_0:()=>Tr,qIF:()=>dg,O27:()=>E,aBi:()=>bd,xOX:()=>Ys,EdS:()=>Ot,WgC:()=>bt,eEv:()=>Ft,A4t:()=>Ql,YOQ:()=>Ct,Wos:()=>cr,jWr:()=>ga,Or$:()=>Qt,lhE:()=>Ur,CwH:()=>zt,pzC:()=>Vs,ymH:()=>ql,QZu:()=>qt,rYH:()=>tv,FVt:()=>ur,Kn2:()=>ue,jgw:()=>iu,OXP:()=>Zo,lS4:()=>er,g5f:()=>nv,fp6:()=>Gl,Uty:()=>$i,YkG:()=>Ht,xdS:()=>at,kMF:()=>Qf,$NE:()=>vt,bC9:()=>ht,Ian:()=>ui,KVV:()=>cE,q9e:()=>fo,iIf:()=>Gb,ian:()=>Qs,m6e:()=>Er,OFd:()=>Gs,kqr:()=>Gt,fnZ:()=>Nr,VFZ:()=>Ks,ZiX:()=>ft,j5n:()=>sr,zkt:()=>_,Pcm:()=>v_,QDV:()=>$s,M5u:()=>ev,laD:()=>cg,mtq:()=>kt,CtB:()=>Wb,CBv:()=>ae,I0t:()=>fr,u1G:()=>$T,gk1:()=>sg,Bgb:()=>og,uzs:()=>Rr,v0l:()=>wu,Zqp:()=>uy,j0k:()=>vo,tCm:()=>Rt,gmx:()=>Fl,mOr:()=>fu,TwZ:()=>jv,GyU:()=>bO,zGm:()=>Rd,bMg:()=>Qd,EyD:()=>iO,FQA:()=>aO,fZN:()=>Xd,xsF:()=>rO,Lxg:()=>nO,O3l:()=>Yc,Wni:()=>Wc,wRx:()=>dO,OxG:()=>Md,uJQ:()=>Fd,qWg:()=>Bb,i96:()=>Nd,zhn:()=>pO,G8q:()=>ii,Jct:()=>yT,A9Y:()=>te,Y5F:()=>Kg,gxP:()=>le,c$P:()=>Ml,M7o:()=>rc,BBN:()=>Ga,ZBU:()=>J,UkJ:()=>ro,xkv:()=>Zy,z$M:()=>F_,KAm:()=>Sy,lCl:()=>xf,rkF:()=>Rm,IU6:()=>Wp,RGr:()=>h,aYu:()=>m,ije:()=>Il,Buf:()=>ip,YLu:()=>wl,ct9:()=>ho,XkY:()=>Kd,T5R:()=>Sd,uQS:()=>zd,wcJ:()=>mo,d$I:()=>al,rSp:()=>sd,Sx:()=>Uc,Ilm:()=>fl,Ki6:()=>qs,VGk:()=>ep,sFD:()=>dh,eWN:()=>x_,dWE:()=>Pv,Lkd:()=>nT,aDL:()=>If,yaA:()=>Zd,lOh:()=>Of,DBr:()=>BO,hK$:()=>jl,TZ_:()=>Gp,CMB:()=>yg,FU8:()=>Ic,J$p:()=>jf,b5s:()=>Lf,h2W:()=>Pt,SL_:()=>yf,oUH:()=>wp,ck9:()=>wd,nL:()=>Mb,k$p:()=>fh,Xs0:()=>Sl,u7I:()=>bf,rxg:()=>lu,bji:()=>uu,oCZ:()=>gm,MjG:()=>CO,FuV:()=>Sp,$ju:()=>Up,t6d:()=>Ip,m5F:()=>fe,sx:()=>$_,rSc:()=>Qb,U10:()=>Ec,L8n:()=>Wy,R9X:()=>iy,rj2:()=>nf,_C4:()=>xp,tCj:()=>tf,uAg:()=>hy,wx9:()=>AT,KF3:()=>$p,ax9:()=>Vp,HH7:()=>rp,ufV:()=>vy,_6y:()=>Vc,XTh:()=>PO,AJo:()=>Fc,Ixr:()=>Dy,P6Y:()=>z_,Bd_:()=>hm,xkB:()=>mm,W41:()=>Tf,WkI:()=>ff,sSE:()=>Em,GMd:()=>Gu,Bxm:()=>Om,FVh:()=>pm,U_T:()=>Bd,FTe:()=>ie,VGB:()=>ne,Wfe:()=>hu,Ls5:()=>mu,$bd:()=>pu});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:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>R,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>A,toUtcDate:()=>N});var a={};r.r(a),r.d(a,{addAttribute:()=>Bo,editAttribute:()=>qo,editEndDate:()=>zo,editRoles:()=>Ko,editStartDate:()=>Xo,editTags:()=>Jo,removeAttribute:()=>Qo});var o={};r.r(o),r.d(o,{applyCrosswalks:()=>_E,collectCrosswalksFromAttributes:()=>PE,compareActivenessAttributes:()=>gE,compareAttributes:()=>OE,compareImages:()=>vE,compareRoles:()=>SE,compareTags:()=>RE});var s={};r.r(s),r.d(s,{createHistoryManager:()=>UE});var l=r(17440);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=>e&&e.toDate(),g=e=>(e&&e.setHours(0,0,0,0),e),_=e=>f()(e).isSame(Date.now(),"day"),A=e=>{const t=new Date(e);return new Date(t.getTime()+60*t.getTimezoneOffset()*1e3)},N=e=>{const t=new Date(e);return new Date(t.getTime()-60*t.getTimezoneOffset()*1e3)},P=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),R=P("startOf"),S=P("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),L=(0,l.equals)("99"),j=(0,l.equals)("9999"),D=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),F=(0,l.test)(/^9+$/),M=(0,l.test)(/^[9az]+$/),x=(0,l.cond)([[C,(0,l.always)("M")],[L,(0,l.always)("MM")],[D,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[M,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[L,(0,l.always)("DD")],[M,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[L,(0,l.always)("YY")],[j,(0,l.always)("YYYY")],[F,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),G=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),C),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),L),(0,l.always)("hh")],[C,(0,l.always)("H")],[L,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),W=(0,l.cond)([[C,(0,l.always)("m")],[L,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),Y=(0,l.cond)([[C,(0,l.always)("s")],[L,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),B=/([9az]+)([^9az]+)*/g,q=e=>{const t=[...e.toLowerCase().matchAll(B)];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)("",[x(e),r,$(n),i,V(a),o])}return e},H=/(9+)([^9]+)*/g,Q=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),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[G(e,s),r,W(n),i,a?Y(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},K=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${q(t)} ${Q(r)}`},J=e=>{const t=Number(e);return Number.isNaN(t)?e:t},X=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt())).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0",z=e=>({isNone:()=>(0,l.isNil)(e),extract:()=>e,orSome:t=>(0,l.isNil)(e)?t:e,map:t=>(0,l.isNil)(e)?Z.None():Z.Some(t(e))}),Z={Some:z,None:()=>z(null),chain:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>t.reduce(((e,t)=>e.map(t)),e)},fromFalsy:function(e){return e?Z.Some(e):Z.None()},fromNull:function(e){return null==e?Z.None():Z.Some(e)},fromUndefined:function(e){return void 0===e?Z.None():Z.Some(e)},fromEmpty:function(e){return E(e)?Z.None():Z.Some(e)}},ee=(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)}},te=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},re=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ne=e=>Array.isArray(e)?e:[e],ie=e=>[e],ae=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),oe=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),se=e=>(e=(e||"").toLowerCase(),oe(e)?`mailto:${e}`:!e.includes("://")&&(e.startsWith("www.")||e.split(".").length>2)?`http://${e}`:e),le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=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)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=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)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;var Ee=r(76665);let me,he,be,Oe,ve,ge,_e,Ae,Ne,Pe,Re,Se,we,Ie,Ue,Ce,Le,je,De,ke,Fe,Me,xe,$e,Ve,Ge,We,Ye,Be,qe,He,Qe;var Ke;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(me||(me={})),function(e){e.local="local",e.validationService="validationService"}(he||(he={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(be||(be={})),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"}(Oe||(Oe={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(ve||(ve={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(ge||(ge={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(_e||(_e={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Ae||(Ae={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(Ne||(Ne={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Pe||(Pe={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Re||(Re={})),function(e){e.PROFILE="profile",e.MAP="map"}(Se||(Se={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(we||(we={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(Ie||(Ie={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(Ue||(Ue={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(Ce||(Ce={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(Le||(Le={})),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"}(De||(De={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(ke||(ke={})),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"}(Fe||(Fe={})),function(e){e.IN="in",e.OUT="out"}(Me||(Me={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(xe||(xe={})),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"}($e||($e={})),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"}(Ve||(Ve={})),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.SingleAttributeView="com.reltio.plugins.entity.attributes.SingleAttributeView",e.TableAttributeView="com.reltio.plugins.entity.attributes.AttributeTableView",e.CustomView="com.reltio.plugins.ui.CustomActionView",e.MapView="com.reltio.plugins.react.EntityMapView",e.ImageAttributeView="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatchesView="com.reltio.plugins.entity.PotentialMatchesView"}(Ge||(Ge={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(We||(We={})),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.Search="SearchView"}(Ye||(Ye={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(Be||(Be={})),function(e){e.NEW="new",e.CLASSIC="classic"}(qe||(qe={})),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"}(He||(He={})),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"}(Qe||(Qe={})),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"}(Ke||(Ke={}));const Je=Ke;let Xe,ze;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(Xe||(Xe={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(ze||(ze={}));const Ze=(0,l.prop)("referencedEntityTypeURI"),et=(0,l.prop)("relationshipTypeURI"),tt=(0,l.prop)("referencedAttributeURIs"),rt=(0,l.curry)(((e,t)=>(0,l.pipe)(tt,(0,l.filter)((0,l.startsWith)(e)))(t))),nt=rt("configuration/relationTypes"),it=rt("configuration/entityTypes"),at=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),ot=(0,l.filter)(at),st=(e,t)=>!t||t.some((t=>t===e.uri)),lt="1Tempo4rary",ut="1Tepmo4Rel",ct=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),pt=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,dt=e=>()=>pt(e),yt=(e,t)=>{const r=ct(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return pt(n)},ft=e=>e&&e.includes("uri$$"),Tt=dt("entities"),Et=dt("relations"),mt=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),ht=(0,l.startsWith)("relations/"),bt=(0,l.startsWith)("entities/"),Ot=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),vt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),gt=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),_t=(0,l.pipe)((0,l.split)("/"),l.head),At=(0,l.pipe)((0,l.split)("/"),l.last),Nt=e=>e.split(".").slice(0,2).join("."),Pt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},Rt=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),St=(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("/")},wt=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},It=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),Ut=e=>2===e.split("/").length,Ct=e=>5===e.split("/").length,Lt=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},jt=e=>e.replace(/uri\$\$/g,lt);function Dt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kt=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,Ot),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",Je.TYPE_STRING)]),Ft=(0,l.has)("values"),Mt=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(Je.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(Je.TYPE_LOOKUP)],[Ft,(0,l.always)(Je.TYPE_ENUM)],[kt,(0,l.always)(Je.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",Je.TYPE_BOOLEAN),(0,l.always)(Je.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),xt=(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){Dt(e,t,r[t])}))}return e}({},e,{type:Mt(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),$t=e=>!!e&&(!!e.autoGenerated&&e.type!==Je.TYPE_NESTED||!!e.parentAutoGenerated),Vt=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),Gt=(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),Wt=e=>Vt(e)?"analyticsAttributes":"attributes",Yt=(0,l.propEq)("hidden",!0),Bt=(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))),qt=Bt(Je.TYPE_NESTED),Ht=Bt(Je.TYPE_REFERENCE),Qt=Bt(Je.TYPE_IMAGE),Kt=(0,l.either)(qt,Ht),Jt=(e,t)=>{const r=Vt(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(".")},Xt=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),zt=(0,l.pipe)(Xt,Boolean),Zt=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),er=(0,l.both)(zt,(0,l.pipe)(Xt,("rdm",(0,l.pipe)(_t,(0,l.equals)("rdm")))));const tr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Wt({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]||nr(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:[]},rr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=tr(e,t,r);return n.length?(0,l.last)(n):null},nr=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",Je.TYPE_NESTED),(0,l.propEq)("type",Je.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",Je.TYPE_REFERENCE),(0,l.pipe)(tt,(0,l.map)((t=>rr(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},ir=[Je.TYPE_ACTIVENESS_DATE,Je.TYPE_DATE,Je.TYPE_TIMESTAMP,Je.TYPE_LOCAL_DATE],ar=[Je.TYPE_ACTIVENESS_DATE,Je.TYPE_TIMESTAMP,Je.TYPE_LOCAL_DATE],or=e=>ir.includes(e),sr=e=>ar.includes(e),lr=[Je.TYPE_INT,Je.TYPE_LONG,Je.TYPE_NUMBER,Je.TYPE_FLOAT,Je.TYPE_DOUBLE,Je.TYPE_COUNT],ur=e=>lr.includes(e),cr=e=>[Je.TYPE_FLOAT,Je.TYPE_DOUBLE].includes(e),pr=[Je.TYPE_BOOLEAN,Je.TYPE_BOOLEAN_RADIO,Je.TYPE_RDM_LOOKUPS_NOT_RESOLVED],dr=e=>pr.includes(e),yr=[Je.TYPE_URL,Je.TYPE_BLOG_URL,Je.TYPE_IMAGE_URL],fr=e=>yr.includes(e),Tr=Bt(Je.TYPE_EMAIL),Er=e=>Je.TYPE_SSN===e;var mr,hr=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(mr||(mr={}));const br=(0,l.curry)(((e,t,r)=>{var n;const i=e===mr.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)))})),Or=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),vr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),Or),gr=(0,l.pipe)((0,l.reject)(E),vr),_r=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),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("?")?"&":"?")+Or(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;return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f}},Ar={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Nr=(0,l.equals)(Ar.SUGGESTING),Pr=(0,l.equals)(Ar.EDITING),Rr=(0,l.equals)(Ar.VIEWING),Sr=(0,l.either)(Pr,Nr),wr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Ir=(0,l.curry)(((e,t)=>(0,l.pipe)(wr(e),(0,l.prop)("extendsTypeURI"))(t))),Ur=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Ir(e,r)));return n(r)})),Cr=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Ir(e,n);return r})),Lr=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Lr(e,wr(e,t.extendsTypeURI),r):void 0,jr=(e,t)=>{const r=t.map(Cr(e));return(r.length?r.reduce(l.intersection):[])[0]},Dr=(e,t)=>Lr(e,(0,l.is)(Object,t)?t:wr(e,t),"typeImage"),kr=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&Ur(e,t,n.uri)?r.concat(n.uri):r),[]),Fr={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"},Mr={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},xr={[Fr.EQUALS]:"equals",[Fr.NOT_EQUALS]:"not",[Fr.STARTS_WITH]:"starts with",[Fr.MISSING_VALUE]:"missing value",[Fr.IN_RANGE]:"in range",[Fr.HAS_ALL]:"has all",[Fr.FULL_TEXT]:"full text",[Fr.EXISTS]:"exists",[Fr.COUNT_EQUALS]:"count equals",[Fr.COUNT_NOT_EQUALS]:"count not equal",[Fr.COUNT_LT]:"count less",[Fr.COUNT_LTE]:"count less or equal",[Fr.COUNT_GT]:"count greater",[Fr.COUNT_GTE]:"count greater or equal",[Fr.COUNT_RANGE]:"count in range",[Fr.LT]:"less than",[Fr.LTE]:"less than or equal",[Fr.GT]:"greater than",[Fr.GTE]:"greater than or equal",[Fr.IN_FILE]:"in file",[Fr.NOT_IN_FILE]:"not in file",[Fr.CONTAINS]:"contains",[Fr.ON]:"on",[Fr.BEFORE]:"before",[Fr.AFTER]:"after",[Fr.WITHIN]:"within"},$r="in",Vr="notIn",Gr="not range",Wr=e=>({[$r]:Fr.EQUALS,[Vr]:Fr.NOT_EQUALS}[e]||e),Yr={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},Br={[Yr.LAST_DAY]:"Last 24 hours",[Yr.LAST_3DAYS]:"Last 3 days",[Yr.LAST_WEEK]:"Last week",[Yr.LAST_MONTH]:"Last month",[Yr.LAST_YEAR]:"Last year",[Yr.PICK_DATE]:"Pick date"},qr={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},Hr={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Qr="<No label>",Kr={IN:"in",OUT:"out"};var Jr=r(87918),Xr=r.n(Jr);function zr(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){Zr(e,t,r[t])}))}return e}function Zr(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={startDate:{type:Je.TYPE_ACTIVENESS_DATE,get label(){return Xr().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:Je.TYPE_ACTIVENESS_DATE,get label(){return Xr().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},tn=zr({id:{type:Je.TYPE_ENTITY_ID,get label(){return Xr().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},en,{roles:{type:Je.TYPE_STRING,get label(){return Xr().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:Je.TYPE_STRING,get label(){return Xr().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),rn={workflow:{type:Je.TYPE_STRING,get label(){return Xr().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:Je.TYPE_STRING,get label(){return Xr().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:Je.TYPE_STRING,get label(){return Xr().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},nn={commenter:{type:Je.TYPE_STRING,get label(){return Xr().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},an={notResolved:{type:Je.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return Xr().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},on={createdBy:{type:Je.TYPE_STRING,get label(){return Xr().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:Je.TYPE_STRING,get label(){return Xr().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},sn={matches:{type:Je.TYPE_COUNT,get label(){return Xr().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:Je.TYPE_COUNT,get label(){return Xr().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},ln={sourceSystems:{type:Je.TYPE_STRING,get label(){return Xr().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:Je.TYPE_STRING,get label(){return Xr().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:Je.TYPE_INT,get label(){return Xr().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:Je.TYPE_TIMESTAMP,get label(){return Xr().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:Je.TYPE_STRING,get label(){return Xr().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let un;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(un||(un={}));const cn={[un.matchRules]:{type:Je.TYPE_STRING,get label(){return Xr().text("Match Rules")},uri:un.matchRules,name:un.matchRules,faceted:!0,hideForDataTenant:!0},[un.MLRecommendedMatch]:{type:Je.TYPE_STRING,get label(){return Xr().text("Match IQ")},uri:un.MLRecommendedMatch,name:un.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},pn=zr({},tn,rn,nn,an,on,sn,ln,cn,{type:{type:Je.TYPE_STRING,get label(){return Xr().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),dn="NOT_MATCH";var yn=r(13980),fn=r.n(yn);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=fn().oneOf(["mobile","tablet","desktop"]),hn=fn().shape({deviceTypes:fn().oneOfType([mn,fn().arrayOf(mn)]),roles:fn().arrayOf(fn().string)}),bn=fn().shape({value:fn().string,lookupCode:fn().string}),On=fn().shape({link:fn().string,filename:fn().string}),vn=fn().shape({displayName:fn().string,parent:fn().string}),gn=fn().oneOfType([fn().string,fn().number,fn().bool,bn]),_n=fn().oneOfType([gn,fn().arrayOf(gn)]),An=fn().shape({fieldName:fn().string,values:fn().arrayOf(_n),filter:fn().string,type:fn().string}),Nn=fn().shape({minValue:fn().number,maxValue:fn().number}),Pn=fn().shape({label:fn().string,name:fn().string,description:fn().string,type:fn().string,hidden:fn().bool,faceted:fn().bool,searchable:fn().bool,uri:fn().string,access:fn().arrayOf(fn().string),cardinality:Nn}),Rn=fn().shape({label:fn().string,uri:fn().string,typeColor:fn().string,direction:fn().string,startObject:fn().object,endObject:fn().object}),Sn=fn().shape({typeColor:fn().string,typeIcon:fn().string,typeImage:fn().string,label:fn().string,uri:fn().string,attributes:fn().arrayOf(Pn)}),wn=fn().shape({uri:fn().string,label:fn().string,memberTypes:fn().array,extendsTypeUri:fn().string,attributes:fn().arrayOf(Pn)}),In=fn().shape({uri:fn().string,label:fn().string,extendsTypeUri:fn().string,relationshipTypeURIs:fn().arrayOf(fn().string)}),Un=fn().shape({uri:fn().string,description:fn().string,label:fn().string,schemaVersion:fn().string,entityTypes:fn().arrayOf(Sn),roles:fn().arrayOf(fn().object),groupTypes:fn().arrayOf(fn().object),relationTypes:fn().arrayOf(Rn),graphTypes:fn().arrayOf(In),interactionTypes:fn().arrayOf(wn),sources:fn().arrayOf(fn().object)}),Cn=fn().shape({uri:fn().string,type:fn().string}),Ln=fn().shape({uri:fn().string,attributes:fn().object,type:fn().string,timestamp:fn().number,members:fn().object}),jn=fn().shape({uri:fn().string,type:fn().string}),Dn=fn().shape({value:fn().object,ov:fn().bool,type:fn().string,uri:fn().string}),kn=fn().shape({refEntity:fn().oneOfType([fn().array,fn().object]),refRelation:fn().oneOfType([fn().array,fn().object]),value:fn().object,ov:fn().bool,type:fn().string,uri:fn().string}),Fn=fn().oneOf((0,l.values)(Ar)),Mn=fn().shape({type:fn().oneOf(Object.values(me)).isRequired,attributeTypeUri:fn().string.isRequired,parentUri:fn().string.isRequired,uri:fn().string,message:fn().string}),xn={attributeType:Pn,showEmptyEditors:fn().bool,lazy:fn().bool,mode:Fn,metadata:Un,ownError:Mn,errors:fn().arrayOf(Mn),crosswalks:fn().array,onAddAttributes:fn().func,onAddOneMore:fn().func,onDeleteAttribute:fn().func,onChangeAttribute:fn().func,additionalControlsRenderer:fn().func,hideDeleteButton:fn().bool,showNonOv:fn().bool,state:fn().oneOf(["deleted","edited"]),expanded:fn().bool},$n=Tn({attributeValue:Dn},xn),Vn=Tn({attributeValue:kn},xn),Gn=fn().shape({value:fn().oneOfType([fn().string,fn().bool,fn().number]),ov:fn().bool,type:fn().string,uri:fn().string,lookupCode:fn().string,lookupRawValue:fn().string}),Wn=fn().shape({totalOvValues:fn().number,totalValues:fn().number}),Yn=fn().shape({inRelations:fn().arrayOf(fn().oneOfType([fn().object,fn().string])),outRelations:fn().arrayOf(fn().oneOfType([fn().object,fn().string])),groups:fn().arrayOf(fn().string),entityTypes:fn().arrayOf(fn().string),nextEntry:fn().object}),Bn=fn().oneOf(["asc","desc"]),qn=fn().shape({id:fn().string,content:Yn,allowOnlyCreateNew:fn().bool,sortColumn:fn().string,sortOrder:Bn,"text-empty":fn().string,max:fn().number,icon:fn().string,caption:fn().string,canCreate:hn,canRead:hn,canUpdate:hn,canDelete:hn,editingEnabled:fn().bool}),Hn=fn().shape({id:fn().string,graph:fn().shape({type:fn().string,layout:fn().number,deep:fn().number,limit:fn().number,uri:fn().string,options:fn().shape({reverseRelations:fn().bool})}),sortBy:fn().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:Bn,max:fn().number,icon:fn().string,caption:fn().string,canCreate:hn,canRead:hn,canUpdate:hn,canDelete:hn}),Qn=fn().shape({id:fn().string,caption:fn().string,pageSize:fn().number,icon:fn().string,canCreate:hn,canRead:hn,canUpdate:hn,canDelete:hn,attributes:fn().object}),Kn=fn().shape({entityUri:fn().string,entityType:fn().string,entityLabel:fn().string,object:Cn}),Jn=fn().shape({relationUri:fn().string,relationType:fn().string,relationLabel:fn().string,direction:fn().string,object:jn}),Xn=fn().shape({entity:Kn,relation:Jn}),zn=fn().shape({value:fn().string,isRawFilter:fn().bool}),Zn=fn().shape({id:fn().string,label:fn().string,name:fn().string,availableEntityTypes:fn().array}),ei=fn().shape({id:fn().string,allowMergeAll:fn().bool,matchActions:fn().object,availableTabs:fn().arrayOf(fn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),ti=fn().shape({matchRules:fn().arrayOf(fn().string),object:Cn,shortestTransitiveMatchPath:fn().arrayOf(fn().shape({matchRules:fn().arrayOf(fn().string),match:fn().string})),direct:fn().bool,matchScore:fn().number}),ri=fn().arrayOf(ti),ni=fn().arrayOf(fn().shape({uri:fn().string,label:fn().string})),ii=[{label:Xr().text("And"),value:"and"},{label:Xr().text("Or"),value:"or"},{label:Xr().text("And not"),value:"and not"},{label:Xr().text("Or not"),value:"or not"}];function ai(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oi=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),si=(0,l.pipe)(oi,(0,l.propOr)("","label")),li=(0,l.curry)(((e,t)=>{const r=oi(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]=li(e,r);return Ur(e,n,t)||Ur(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){ai(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),pi=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?Kr.OUT:Kr.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(Kr.IN),i=r(Kr.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},di=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),yi={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},fi=(0,l.curry)(((e,t)=>e.every((e=>Ti(e,t))))),Ti=(0,l.curry)(((e,t)=>{const r=$t(t);return Ei(e,t)&&(e===yi.READ||!r)})),Ei=(e,t)=>!t||!t.access||t.access.includes(e),mi=(0,l.curry)(((e,t,r)=>Ti(yi.READ,r)&&(Nr(t)?Ti(yi.INITIATE_CHANGE_REQUEST,r):Ti(e,r)))),hi=mi(yi.CREATE),bi=mi(yi.DELETE),Oi=mi(yi.UPDATE),vi=fi([yi.CREATE,yi.MERGE,yi.READ,yi.UPDATE]),gi=fi([yi.UPDATE,yi.READ,yi.CREATE]),_i=fi([yi.UPDATE,yi.READ]),Ai=fi([yi.DELETE,yi.UPDATE,yi.READ]),Ni=(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["*"])),Pi=(e,t,r)=>(0,l.pipe)((0,l.map)(Ni(e,t)),(0,l.filter)(l.identity))(r),Ri=(e,t,r)=>{const n=Pi(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Ti(yi.MERGE,r)},Si=(0,l.curry)(((e,t,r,n)=>{const i=oi(e,n),[a,o]=li(e,n);return i&&Ti(yi.CREATE,i)&&Ur(e,a,t.type)&&Ur(e,o,r.type)})),wi=(e,t,r,n,i)=>{const a=wr(e,n.type),o=Pi(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(Si(e,n,i))||a.some(Si(e,i,n))}))},Ii=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=wr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Ri(o,i,a),canAddRelation:wi(e,o,i,r,n),canMark:Ti(yi.UPDATE,a)&&Ti(yi.READ,a)}},Ui=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>Ii(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),Ci=Vt,Li=(0,l.complement)(Ci),ji=Ti(yi.READ),Di=e=>{let{attributeType:t,mode:r}=e;return Li(t)&&hi(r,t)&&!Yt(t)},ki=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=ft(r.uri),o=Oi(n),s=hi(n);return(0,l.cond)([[Ci,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},Fi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=ft(r.uri),s=Oi(n),u=bi(n),c=xi(yi.UPDATE,n,a,r),p=xi(yi.DELETE,n,a,r);return(0,l.cond)([[Ci,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)},Mi=(0,l.curry)(((e,t,r,n)=>{const i=nr(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=>!Ei(e,n)||!Mi(e,t,r[n.name],n)))))})),xi=(0,l.curry)(((e,t,r,n,i)=>Nr(t)?Mi(yi.INITIATE_CHANGE_REQUEST,r,n,i):Mi(e,r,n,i))),$i=(0,l.both)((0,l.complement)(Yt),ji),Vi="SuperUser",Gi="allTenants",Wi=[Gi,"allCustomers"],Yi=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;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===Vi})).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===Vi){const e=r?Wi.concat(r.map((e=>`allTenants.${e}`))):Wi,n=r&&t[0]===Gi?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}))},Bi={NON_SECURED:"NON_SECURED",SECURED:"SECURED",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"},qi={[Bi.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[Bi.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[Bi.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[Bi.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[Bi.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[Bi.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[Bi.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[Bi.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[Bi.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[Bi.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[Bi.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[Bi.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[Bi.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[Bi.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[Bi.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[Bi.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[Bi.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[Bi.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[Bi.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[Bi.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[Bi.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[Bi.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[Bi.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[Bi.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[Bi.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[Bi.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[Bi.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[Bi.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[Bi.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[Bi.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},Hi=(0,l.curry)(((e,t,r)=>Yi({allowedPermissionsNames:e,permissionsNames:Bi,permissionsConfig:qi}).some((e=>e(t,{params:{tenant:r}}))))),Qi=Hi([Bi.CAN_EXPORT]),Ki=Hi([Bi.CAN_EXPORT_ACTIVITIES]),Ji=Hi([Bi.CAN_IMPORT_ENTITIES_FROM_DT]),Xi=Hi([Bi.CAN_READ_ENTITIES_FROM_DT]),zi=Hi([Bi.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),Zi=Hi([Bi.CAN_UPDATE_PROCESS_INSTANCE]),ea=Hi([Bi.CAN_VIEW_WORKFLOW_DEFINITION]),ta=Hi([Bi.CAN_CONFIG_ENVIRONMENT_REGISTER]),ra=Hi([Bi.CAN_UPDATE_WORKFLOW_DATA_TASK]),na=Hi([Bi.CAN_READ_WORKFLOW_DATA_TASK]),ia=Hi([Bi.CAN_MANAGE_WORKFLOW_DEFINITION]),aa=Hi([Bi.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),oa=Hi([Bi.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),sa=Hi([Bi.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),la=Hi([Bi.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),ua=Hi([Bi.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),ca=Hi([Bi.CAN_EXECUTE_WORKFLOW_JOBS]),pa=Hi([Bi.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),da=Hi([Bi.CAN_CREATE_CONFIG_JAR]),ya=Hi([Bi.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),fa=Hi([Bi.CAN_VIEW_CONFIG_JAR]),Ta=Hi([Bi.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),Ea=Hi([Bi.CAN_VIEW_WORKFLOW_JOBS]),ma=Hi([Bi.CAN_MAKE_BULK_UPDATE]),ha=Hi([Bi.CAN_OPEN_DATA_LOADER_EXECUTE,Bi.CAN_OPEN_DATA_LOADER_READ]),ba=Hi([Bi.CAN_BULK_DELETE_PROFILES]),Oa=Hi([Bi.CAN_READ_MDM_DATA_ENTITIES]),va=Hi([Bi.CAN_READ_DVF]),ga=Hi([Bi.IS_FREEMIUM_ADMIN]),_a=(0,l.reject)(Yt),Aa=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),_a,(0,l.filter)(e))(t),Na=(0,l.curry)(((e,t)=>Aa((t=>Di({attributeType:t,mode:e})),t))),Pa=(0,l.curry)(((e,t)=>Aa((t=>Di({attributeType:t,mode:e})||$i(t)),t))),Ra=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)($i)),Sa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Sa(e)])))),wa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)($i),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...wa(e)])))),Ia=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Ia(e)])))),Ua=(0,l.pipe)(wr,(0,l.converge)(l.concat,[wa,Ia]));function Ca(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){La(e,t,r[t])}))}return e}function La(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ja=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,ja(e)))},t))),Da=e=>{var t;return Ca({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},ka=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),Fa=(0,l.when)(ka,(0,l.dissoc)("values")),Ma=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return Ca({},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})})),xa=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},$a=(0,hr.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Sa,t).concat((0,l.chain)(Sa,r)).some(xa)})),Va=e=>{let t=!1;const r=ja((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?Ca({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},Ga=e=>{const t=$a(e),r=(0,l.map)((e=>ja((0,l.pipe)(Fa,(0,l.when)((0,l.always)(e),Ma))))(t)),n=(0,l.map)(Da),i=(0,l.map)(Va);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},Wa=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Ya=(0,l.prop)("relationshipTypeURIs"),Ba=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(qa(e,t)))||[]})),qa=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(ui(e,t))},Ha=(e,t)=>(0,l.pipe)(Wa,(0,l.defaultTo)({}),Ya,(0,l.defaultTo)([]),(0,l.chain)(li(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(wr(e)))(e,t),Qa=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),Ka=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),Ja=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ka((0,l.complement)(Qa))(e)},Xa=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ka(Qa)(e)},za=(0,l.pipe)(wr,(0,l.propOr)([],"matchGroups")),Za=(e,t,r)=>(0,l.pipe)(za,(0,l.find)((0,l.propEq)("uri",r)))(e,t),eo=(0,l.curry)(((e,t,r)=>(0,l.pipe)(Za,(0,l.propOr)(r,"label"))(e,t,r))),to=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(za,(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]})),ro=e=>(0,l.partition)(Qa,e),no=(0,l.includes)(l.__,["and","or","not"]),io=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),ao=(0,l.includes)(l.__,["equals","notEquals","in"]),oo=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return no(t)?oo(r):io(t)?r.filter(Ot):ao(t)?r.map((0,l.prop)("uri")).filter(Ot):[]})),l.uniq),so=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(oo),l.uniq),lo=(0,l.pipe)(za,so),uo=(0,l.pipe)(to,so),co=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},po=(0,l.pipe)(co,wa),yo=(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||Ur(e,n,t)})(e,t))})(e,t)),fo=e=>!!e.required,To=(e,t,r)=>{const n=(0,l.cond)([[Ot,wr(e)],[vt,oi(e)]])(t);return Eo(e,n,r)},Eo=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&Ot(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!$t(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===Je.TYPE_REFERENCE){const n=et(t),a=tt(t);i=To(e,n,r).filter((e=>a.some(gt(e.uri))))}else t.attributes&&(i=Eo(e,t,r));i&&n.push(...i)}return n})):t.type===Je.TYPE_REFERENCE?To(e,et(t),r):[],mo=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),fo]),e.attributes||[])},ho=(e,t)=>{const r=it(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},bo=(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)?Xr().text(n):n};return r(null,t)})),Oo=["label","description","abbreviation","caption","toolTip"],vo=e=>bo(Oo,e),go=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=At(t);return r.find((e=>{let{uri:t}=e;return At(t)===n}))})),_o=(0,l.curry)(((e,t)=>{const r=At(t);return(0,l.pipe)(go(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),Ao=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"})},No=(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}))},Po=(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)})),Ro=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=wr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function So(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 Io=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 Uo(i,e,t,r,n)},Uo=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]:["attributes"];return Z.fromNull(e&&e.length?e:nr(t,r)).map((e=>e.map((e=>{const r=Io(t,e,n,i);return r.length?So({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(Kt),(0,l.prop)("children"))).filter($i).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},Co=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Io(e,t,r,["attributes","analyticsAttributes"])},Lo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Io(e,t,r,["attributes"])},jo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Io(e,t,r,["analyticsAttributes"])},Do=(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)})),ko=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return At(r)===e})))),Fo=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),ko("LUD")),(0,l.defaultTo)(r))(t||[])},Mo=(e,t)=>{let{survivorshipStrategies:r}=e;return ko(t,r)},xo=(0,l.allPass)([(0,l.complement)(l.isNil),Ti(yi.READ)]),$o=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Ti(yi.READ)]),Vo=(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)([Ti(yi.CREATE),Ti(yi.INITIATE_CHANGE_REQUEST)])]),Go=(0,l.curryN)(2,(0,l.pipe)(wr,$o));function Wo(e,t,r,n){var 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 Yo(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Wo(r[i],r[i+1],e,t));return n}function Bo(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Yo(r,t)[a];if(s.hasChildren){e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]);var l=e[s.name].filter((function(e){return e.uri===s.valueUri}))[0];return Bo(l.value,t,r,n,i,a+1,o)}var u=e[t.name];if(u||(u=e[t.name]=[]),null!=n){var c={value:n.refEntity?n.value:n,uri:r,type:t.uri};return n.lookupCode&&(c.value=n.value,c.lookupCode=n.lookupCode),n.refEntity&&(c.refEntity=n.refEntity,c.label=n.label),n.refRelation&&(c.refRelation=n.refRelation),i&&(c.crosswalks=i),u.splice(o||0,0,c),n}}function qo(e,t,r,n,i,a){void 0===a&&(a=0);var o=Yo(r,t)[a];if(!o.hasChildren){var s,l=e[t.name],u=l&&l.filter((function(e){return e.uri===r}))[0];return u?("[object Object]"!==u.value.toString()?(Ho(n,u),i&&(u.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&l.filter((function(e){return!1===e.ov})).forEach(Ho.bind(null,n))):n.refEntity?(u.refRelation=n.refRelation,u.refEntity=n.refEntity,u.value=n.value,u.label=n.label):null!==n.value&&void 0!==n.value&&null!==u.value&&"object"==typeof u.value&&(u.value=n.value,u.label=n.label),s=u.value):s=Bo(e,t,r,n,i,a),s}var c=qo(e,o,o.valueUri,{},i,a);qo(c,t,r,n,i,a+1)}function Ho(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function Qo(e,t,r,n){void 0===n&&(n=0);var i=Yo(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&Qo(a.value,t,r,n+1)}else{var o=e[t.name];o&&(o.forEach((function(e,t){e.uri===r&&o.splice(t,1)})),0===o.length&&delete e[t.name])}}function Ko(e,t){e.roles=t||[]}function Jo(e,t){e.tags=t||[]}function Xo(e,t){e.startDate=t||""}function zo(e,t){e.endDate=t||""}const Zo=e=>{let{ov:t}=e;return!1!==t},es=(e,t)=>((e,t)=>fr(e.type)&&ae(t))(e,t)||((e,t)=>Tr(e.type)&&oe(t))(e,t),ts=(0,l.curry)(((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))),rs=ts("refEntity"),ns=ts("refRelation"),is=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],as=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},os=(0,l.prop)("objectURI"),ss=(0,l.prop)("objectURI"),ls=(0,l.prop)("type"),us=(0,l.pipe)(rs,(0,l.defaultTo)({}),os),cs=(0,l.pipe)(ns,(0,l.defaultTo)({}),ss),ps=(0,l.pipe)(rs,(0,l.defaultTo)({}),ls),ds=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},ys=(0,l.evolve)({refEntity:re,refRelation:re}),fs=(e,t,r,n)=>{const i=tr(e,r),a=wr(e,t.type)||oi(e,t.type);if(0===i.length)return null;const o=Wt(r);let s=[t],l=1;i[0].uri!==t.type&&(l=0);let u=null;const c=n?[]:null;let p=null;for(let e=l;e<i.length;++e){const t=e===i.length-1,r=i[e];let l=[];if(!st(r,p)){u=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const u=s.value||s[o]||{};let d=[];r.startObject&&r.endObject||r.typeColor?(d=a.attributes.filter((e=>et(e)===r.uri||Ze(e)===r.uri)),p=d.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(d.push(r),p=null),d.forEach((a=>{const o=u[a.name];o&&(l=l.concat(o)),n&&t&&c.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=l),t&&(u=s)}return c||u},Ts=(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?Ts(a.value,o):a},Es=(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 Ts(e[r],i)})),ms=(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")]]),hs=(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"])]]),bs=(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)(bs(e,i)))))(r)})),Os=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Os(e)),e)(t))),vs=(0,l.curry)(((e,t,r,n)=>(0,l.pipe)(bs(e,r),Os(t))(n))),gs=vs(null,ms),_s=vs(Zo,ms),As=vs(null,hs),Ns=vs(Zo,hs),Ps=(e,t,r)=>{var n,i,a;return e.uri===t?null==e||null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=Es(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},Rs=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(us,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Ss=(e,t)=>{const r=Lt(t),n=(0,l.pipe)((0,l.split)("/"),(0,l.dropLast)(1),l.last)(t);return Ps(e,r,n)},ws=Object.values(en),Is=(0,l.includes)(l.__,ws),Us=e=>ws.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function Cs(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){Ls(e,t,r[t])}))}return e}function Ls(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const js=(e,t)=>`${e}_${t}`,Ds=[pn.matches.name,pn.matchRules.name],ks=(0,l.values)(rn).map((e=>e.name)),Fs=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,ks)))),Ms=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Ds)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>js(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),xs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Fs(r),Ms(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(js(`dtPotentialMatches.${t.name}`,"")))))(pn)},$s=(0,l.propEq)("uri",pn.type.uri),Vs=e=>(0,l.values)(cn).some((0,l.propEq)("uri",null==e?void 0:e.uri)),Gs=(0,l.propEq)("uri",ln.sourceSystems.uri),Ws=Object.values(tn),Ys=(0,l.includes)(l.__,Ws),Bs=e=>{let{entity:t,attributeType:r,value:n}=e;return Cs({},t,{[r.uri]:void 0===n?r.defaultValue:n})},qs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},Hs=e=>{let{entity:t,attributeType:r,value:n}=e;return Cs({},t,{[r.uri]:n})},Qs=(0,l.propEq)("uri",tn.roles.uri),Ks=(0,l.propEq)("uri",tn.tags.uri);function Js(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){Xs(e,t,r[t])}))}return e}function Xs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zs=e=>{let{parentUri:t,attributeType:r}=e;return Js({uri:yt(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[Kt,(0,l.always)({value:{}})],[zt,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),or)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},Zs=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Na(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),Zt,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=zs({parentUri:r,attributeType:e});let s=nr(n,e);s&&(e.type===Je.TYPE_REFERENCE&&(s=ot(s)),a.value=Zs({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||Zt(e))&&(o[t]=[a])}return o},el=e=>{let{entity:t,metadata:r}=e;return To(r,t.type,!0).filter(Zt).reduce(((e,t)=>{const n=t.name,i=Lt(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:fs(r,e,i).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,r)=>{let{parentUri:i,attributes:a}=r;return a[n]&&0!==a[n].length?e:rl({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},tl=(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===Je.TYPE_NESTED?Js({},e,{value:tl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return Js({},s(t),Zs({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),rl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=zs({parentUri:n,attributeType:r}),u=ms(l);return(0,Ee.ZP)(t,(e=>{Bo(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},nl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Ee.ZP)(t,(e=>{Bo(e.attributes||e.value,r,n.uri,ms(n),a,o,i)}))},il=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Ee.ZP)(t,(e=>{qo(e.attributes||e.value,r,n,i,a,o)}))},al=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Ee.ZP)(t,(e=>{Qo(e.attributes||e.value,r,n,i)}))},ol=e=>""===e,sl=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([ol,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([ol,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]]),ll=(0,l.reject)(sl),ul=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=>ul({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),ll)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},cl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ul({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),ys),deleteEmptyComplex:e})},pl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(cl(e),(0,l.reject)(l.isEmpty))},dl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Is(r)?Bs({entity:e,attributeType:r}):rl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),yl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Is(r)?Hs({entity:e,attributeType:r,value:i}):il({entity:e,attributeType:r,uri:n,value:i})})),fl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Is(r)?qs({entity:e,attributeType:r}):al({entity:e,attributeType:r,uri:n})})),Tl=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)},El="UrlThumbnail",ml="CdnUrlThumbnail",hl=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(Zo):(0,l.head)(n);return e&&e.value}return null})),bl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>hl(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Ol=bl(["CdnUrl","Url"],!0),vl=bl(["CdnUrlPreview","UrlPreview"],!0),gl=bl([ml,El],!0),_l=bl([ml,El]),Al=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[Gt,(0,l.always)(t)],[(0,l.both)(Vt,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=Gt(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Is(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ne)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Nl=(e,t,r)=>{const n=Ra(e),i=(0,l.any)(r?l.T:Zo);return Al(n,t,i)},Pl=(e,t,r,n,i,a)=>{const o=ft(null==r?void 0:r.uri)?Na(t,e):Pa(t,e);return Al(o,r,((e,o)=>{const s=Di({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:Zo,e)||Gt(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let Rl;const Sl=e=>{Rl=e};function wl(e,t){return Rl(e,t)}const Il=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)})),Ul=50,Cl=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=Ul,offset:a=0}=e;return wl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},Ll=(0,l.once)((()=>wl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),jl=e=>wl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Dl=(e,t)=>wl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),kl=e=>Z.fromNull(xr[e]).map(Xr().text).orSome(""),Fl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Ml=(0,l.split)("_"),xl=(0,l.includes)("_"),$l=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),Vl=(0,l.curry)(((e,t)=>e.some($l(t)))),Gl=Vl([Fr.IN_RANGE,Fr.COUNT_RANGE,Fr.WITHIN]),Wl=Vl([Fr.EXISTS,Fr.MISSING_VALUE]),Yl=(0,l.cond)([[Wl,(0,l.always)(0)],[Gl,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),Bl=(0,l.complement)(Wl),ql=Vl([Fr.HAS_ALL,Fr.EQUALS,Fr.NOT_EQUALS]),Hl=Vl([Fr.COUNT_EQUALS,Fr.COUNT_NOT_EQUALS,Fr.COUNT_LT,Fr.COUNT_LTE,Fr.COUNT_GT,Fr.COUNT_GTE,Fr.COUNT_RANGE]),Ql=Vl([Fr.IN_FILE,Fr.NOT_IN_FILE]),Kl=e=>{switch(e){case Fr.COUNT_EQUALS:return Fr.EQUALS;case Fr.COUNT_NOT_EQUALS:return Fr.NOT_EQUALS;case Fr.COUNT_LT:return Fr.LT;case Fr.COUNT_LTE:return Fr.LTE;case Fr.COUNT_GT:return Fr.GT;case Fr.COUNT_GTE:return Fr.GTE;case Fr.COUNT_RANGE:return Fr.IN_RANGE}},Jl=Vl([Fr.ON,Fr.BEFORE,Fr.AFTER,Fr.WITHIN,Fr.NOT_EQUALS]),Xl=Vl([Fr.WITHIN]),zl=[[Fr.COUNT_EQUALS,Fr.COUNT_NOT_EQUALS,Fr.COUNT_LT,Fr.COUNT_LTE,Fr.COUNT_GT,Fr.COUNT_GTE],[Fr.NOT_IN_FILE,Fr.IN_FILE],[Fr.EQUALS,Fr.NOT_EQUALS,Fr.HAS_ALL],[Fr.LT,Fr.LTE,Fr.GT,Fr.GTE],[Fr.MISSING_VALUE,Fr.EXISTS],[Fr.COUNT_RANGE],[Fr.IN_RANGE],[Fr.STARTS_WITH,Fr.CONTAINS],[Fr.FULL_TEXT],[Fr.ON,Fr.BEFORE,Fr.AFTER,Fr.NOT_EQUALS],[Fr.WITHIN]],Zl=(e,t)=>zl.some((r=>r.includes(e)&&r.includes(t))),eu=(0,l.pipe)(l.omit,l.values),tu={OPTIONS_FOR_STRING:eu(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Fr),OPTIONS_FOR_DATE:[Fr.ON,Fr.BEFORE,Fr.AFTER,Fr.WITHIN,Fr.NOT_EQUALS,Fr.MISSING_VALUE,Fr.EXISTS,Fr.COUNT_EQUALS,Fr.COUNT_NOT_EQUALS,Fr.COUNT_LT,Fr.COUNT_LTE,Fr.COUNT_GT,Fr.COUNT_GTE,Fr.COUNT_RANGE,Fr.IN_FILE,Fr.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:eu(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],Fr),OPTIONS_FOR_BLOB:eu(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Fr),OPTIONS_FOR_NUMBER:eu(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],Fr),OPTIONS_FOR_LOOKUP:eu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],Fr),OPTIONS_FOR_ENUM:eu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],Fr),OPTIONS_FOR_ID:[Fr.EQUALS,Fr.NOT_EQUALS,Fr.IN_FILE,Fr.NOT_IN_FILE],OPTIONS_FOR_COUNT:[Fr.EQUALS,Fr.NOT_EQUALS,Fr.LT,Fr.LTE,Fr.GT,Fr.GTE,Fr.IN_RANGE],OPTIONS_FOR_COMPLEX:[Fr.COUNT_EQUALS,Fr.COUNT_NOT_EQUALS,Fr.COUNT_LT,Fr.COUNT_LTE,Fr.COUNT_GT,Fr.COUNT_GTE,Fr.COUNT_RANGE,Fr.EXISTS,Fr.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[Fr.EQUALS,Fr.NOT_EQUALS,Fr.EXISTS,Fr.MISSING_VALUE]},ru=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case Je.TYPE_TYPEAHEAD:case Je.TYPE_STRING:case Je.TYPE_PASSWORD:case Je.TYPE_TEXT:case Je.TYPE_CIK_ID:case Je.TYPE_URL:case Je.TYPE_BLOG_URL:case Je.TYPE_IMAGE_URL:case Je.TYPE_EMAIL:return tu.OPTIONS_FOR_STRING;case Je.TYPE_LOOKUP:case Je.TYPE_DEPENDENT_LOOKUP:return tu.OPTIONS_FOR_LOOKUP;case Je.TYPE_ENUM:return tu.OPTIONS_FOR_ENUM;case Je.TYPE_DATE:case Je.TYPE_ACTIVENESS_DATE:case Je.TYPE_TIMESTAMP:case Je.TYPE_LOCAL_DATE:return tu.OPTIONS_FOR_DATE;case Je.TYPE_BOOLEAN:case Je.TYPE_BOOLEAN_RADIO:return tu.OPTIONS_FOR_BOOLEAN;case Je.TYPE_BLOB:return tu.OPTIONS_FOR_BLOB;case Je.TYPE_LONG:case Je.TYPE_INT:case Je.TYPE_FLOAT:case Je.TYPE_DOUBLE:case Je.TYPE_NUMBER:return tu.OPTIONS_FOR_NUMBER;case Je.TYPE_ENTITY_ID:return tu.OPTIONS_FOR_ID;case Je.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[Fr.EQUALS];case Je.TYPE_COUNT:return tu.OPTIONS_FOR_COUNT;case Je.TYPE_NESTED:case Je.TYPE_REFERENCE:case Je.TYPE_IMAGE:return tu.OPTIONS_FOR_COMPLEX;default:return tu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(Hl,n):n},nu=e=>[Ne.and,Ne.andNot].includes(e),iu=e=>[Ne.or,Ne.orNot].includes(e),au=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),iu)),ou=(su=[Ne.and],e=>e.slice(0,-1).every((e=>su.includes(e.operator))));var su;const lu=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),uu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),cu=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},pu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[Ne.or,Ne.orNot],n=t?[Ne.and,Ne.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)&&cu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},du="and",yu=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)(du,n,e),o=(e=>[Ne.andNot,Ne.orNot].includes(e))(a)?pu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},fu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),Tu=e=>Array.isArray(e)?e.map(Tu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),Eu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),mu=e=>`'${e}'`,hu=e=>`"${e}"`,bu=(0,l.pipe)(Tu,Eu),Ou=(0,l.pipe)(bu,mu),vu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Gl(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),gu=(e,t)=>Hl(t)?{type:Je.TYPE_INT}:Ql(t)?{type:Je.TYPE_FILE}:Jl(t)&&!Xl(t)&&sr(e.type)?{type:Je.TYPE_LOCAL_DATE}:e,_u=Object.values(Yr),Au=e=>_u.includes(e),Nu=e=>Xr().text(Br[e]),Pu=e=>{const t=f()();switch(e){case Yr.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case Yr.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case Yr.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case Yr.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case Yr.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function Ru(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){Su(e,t,r[t])}))}return e}function Su(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wu=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),Iu=(0,l.curry)(((e,t,r)=>{const n=r.map(Gl(e)||t.endsWith(".count")?bu:Ou).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Uu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Cu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Yl(t);return(0,l.pipe)(Uu(i),(0,l.map)(Iu(t,r)),wu(" or "))(n)},Lu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Ou).join(",")})`},ju=e=>`*${e}*`,Du=e=>`URL:${e}`,ku=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Fu=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===Fr.IN_FILE?r:`not ${r}`},Mu=(e,t)=>[R(e,t),S(e,t)],xu=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!$u(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case Fr.ON:return Ru({},e,n?{filter:Fr.EQUALS}:{filter:Fr.IN_RANGE,values:[Mu(i,n)]});case Fr.BEFORE:return Ru({},e,{filter:Fr.LTE,values:[[S(i,n)]]});case Fr.AFTER:return Ru({},e,{filter:Fr.GTE,values:[[R(i,n)]]});case Fr.WITHIN:return Ru({},e,{filter:Fr.IN_RANGE,values:[Pu(i)]})}}return e}),Cu),$u=(0,l.propSatisfies)(sr,"type"),Vu=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",Fr.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Cu({filter:Fr.EQUALS,fieldName:t,values:[r]}))),new yu).build())),wu(" or "))(r)}],[(0,l.propEq)("filter",Fr.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Cu({fieldName:r,filter:t,values:n.map((0,l.pipe)(Tu,ju))})}],[(0,l.propEq)("filter",Fr.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Cu(Ru({},e,{values:(0,l.flatten)(r)})):ku(r)?Lu(Ru({},e,{filter:"listEquals"})):Cu(e)}],[(0,l.propEq)("filter",Fr.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Yl(t);return(0,l.pipe)(Uu(i),(0,l.map)(Iu(t,r)),wu(" and "))(n)})(Ru({},e,{values:(0,l.flatten)(e.values)})):$u(e)?(e=>{const{values:t}=e,r=!$u(e),[n]=t;return(new yu).addClause(Cu(Ru({},e,{filter:Fr.LT,values:[R(n,r)]}))).addClause(Cu(Ru({},e,{filter:Fr.GT,values:[S(n,r)]}))).orBuild()})(e):ku(t)?Lu(Ru({},e,{filter:"not listEquals"})):Cu(e)}],[(0,l.propSatisfies)(Ql,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Cu({fieldName:r,filter:Fu(t,r),values:n.map((0,l.prop)("link")).map(Du)})}],[(0,l.propSatisfies)(Hl,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Cu({fieldName:`${r}.count`,values:n,filter:Kl(t)})}],[(0,l.propSatisfies)(Jl,"filter"),xu],[(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 Iu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return Iu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Cu]],Gu=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!Bl(e)||Yu(r))},Wu=e=>Array.isArray(e)?Yu(e):null!=e&&Tu(e).length>0,Yu=e=>e&&e.length>0&&e.every(Wu);function Bu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qu=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},Hu=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Qu=(e,t,r)=>"children"===e?Ju(r,[...t][0],!0):r,Ku=(e,t,r)=>"values"===e?[...r,...t]:r,Ju=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)(Qu,t),e);if(!r&&ql(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Ku,t),e)}return(0,l.append)(t,e)},Xu=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=qu(e),r=e=>e.fieldName===t?e:r({fieldName:Hu(e),children:[e]});return r(e)})(t);return Ju(e,r)}),[]),zu=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")),Zu=e=>{let[t]=e;return t.children?Zu(t.children):t.operator},ec=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=Zu(t)===Ne.andNot,a=n(t,!1),o=i?`not ${pu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Zu(r)||du} ${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&&zu(i)&&!t?r(i):n(i,a)}],...e])(o))),new yu).buildWithOperators(i.map((0,l.prop)("operator")))}return n},tc=(0,l.pipe)((0,l.propOr)("","filter"),xl),rc=(0,l.map)((0,l.when)(tc,(e=>{const[t,r]=Ml(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){Bu(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),nc=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)(Gu),rc,Xu,ec([...e,...Vu],t))},ic=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),ac=[Fr.ON,Fr.BEFORE,Fr.AFTER,Fr.WITHIN,Fr.NOT_EQUALS,Fr.MISSING_VALUE,Fr.EXISTS],oc=[Fr.EQUALS,Fr.NOT_EQUALS,Fr.STARTS_WITH,Fr.MISSING_VALUE,Fr.HAS_ALL,Fr.FULL_TEXT,Fr.EXISTS],sc=[Fr.EQUALS,Fr.NOT_EQUALS,Fr.LT,Fr.LTE,Fr.GT,Fr.GTE,Fr.IN_RANGE],lc=(e,t)=>{const r=xt(e);return(e=>{switch(e){case en.startDate.name:case en.endDate.name:case rn.dueDate.name:case on.createdTime.name:case on.updatedTime.name:case ln.reltioLoadDate.name:case ln.createDate.name:case ln.updateDate.name:case ln.deleteDate.name:case ln.publishDate.name:return ac;case sn.matches.name:case ln.count.name:return sc;case rn.workflow.name:case rn.assignee.name:case rn.step.name:case nn.commenter.name:case on.createdBy.name:case on.updatedBy.name:case ln.sourceSystems.name:case ln.value.name:return oc;default:return null}})(t)||ru(r)},uc=[Fr.EQUALS,Fr.NOT_EQUALS,Fr.CONTAINS,Fr.STARTS_WITH,Fr.MISSING_VALUE,Fr.HAS_ALL,Fr.IN_RANGE,Fr.WITHIN,Fr.EXISTS,Fr.ON],cc=(0,l.pipe)(lc,(0,l.filter)((0,l.includes)(l.__,uc))),pc=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),dc=e=>{let{query:t,body:r}=e;return t=pc(t),wl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},yc=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)(nc(),ic(t.globalFilter))(n),activeness:t.activityFilter||Hr.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${gr(i)}`},fc=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=yc(e,t,r);return wl(n)},Tc=e=>wl(`/entities/_total?${e}`),Ec=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)($o),(0,l.map)((0,l.prop)("uri")))(e),i={filter:Fr.EQUALS,fieldName:"type",values:n},a={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(nc(),ic(r.globalFilter))([i,a]),s=gr({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||Hr.ACTIVE_ONLY,max:r.max||4});return wl("/entities/_typeAheadSearch"+s,{method:"GET"})},mc=(0,l.pipe)((0,l.reject)(l.isNil),vr),hc=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)(nc(),ic(i))(r),p=mc({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return dc({query:p,body:d})},bc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return hc({fieldName:t,searchParams:i,options:n})},Oc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",vc=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={filter:(0,l.pipe)(nc(),ic(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||Oc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${gr(i)}`},gc=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=vc(e,t,r);return wl(n)},_c=e=>wc(e,{select:"secondaryLabel"}),Ac=(e,t)=>{const{select:r=Oc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),wl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Nc=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),ft)),Pc=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=Nc(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Jt(r),m={method:"POST",data:{attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E}},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(nc(),ic(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),wl(`${s}/api/${o}/${t}/_object`,m)},Rc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Sc={options:"sendHidden,addRefAttrUriToCrosswalk"},wc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sc;return wl(`/${e}${gr(t)}`)},Ic=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",data:[e]},n=t("/entities");return wl(n,r)},Uc=e=>wl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Cc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return wl(`/${e}/_clone${gr({executeLCA:!1,valuesToCopy:r})}`,n)},Lc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return wl(`/entities/_events/_total${vr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},jc=(e,t)=>wl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Dc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return wl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},kc=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 wl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),vr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Fc=e=>{const t=new FormData;return t.append("file",e),wl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,Xr().text("Can't upload file"));return Promise.reject(t)}))},Mc=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 wl(`/personal/findSavedSearches${vr({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"}})},xc=e=>wl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),$c=e=>wl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Vc=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return wl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},Gc=e=>{let{uri:t}=e;return wl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Wc=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),Vc)(e),Yc=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),Vc)(e);function Bc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qc=["max","offset","filter"],Hc=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:Hc(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){Bc(e,t,r[t])}))}return e}({},t,(0,l.pick)(qc,e)))),Qc=(0,l.omit)(["activeness"]),Kc=(e,t)=>{const r=(e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Ae.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Ae.ALL,e)))return!1})(t);return t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(Hc(e),(0,l.omit)(qc))(e))),Qc,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${gr({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},Jc=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),Xc=(0,l.reject)(l.isNil),zc=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),Zc=e=>wl(zc(e),{method:"GET",headers:{"Content-Type":"application/json"}}),ep=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,zc);return wl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},tp=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?pl()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(Xc,ne,JSON.stringify);return wl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},rp=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"),zc,n),o=OE(i(t),i(r)).concat(gE(t,r));return wl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},np=(e,t)=>{const{url:r,options:n}=Kc(e,t);return wl(r,n).then(Jc)},ip=(e,t)=>wl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),ap=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===Kr.IN?a.inRelations=[n]:a.outRelations=[n],wl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},op=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return wl(`${t}/recentSearches${gr({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},sp=e=>wl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),lp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return wl(`/recentSearches${gr({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function up(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){cp(e,t,r[t])}))}return e}function cp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pp={select:"label,secondaryLabel,name,type,startDate,endDate"},dp=(0,l.reject)(l.isNil),yp=(0,l.pipe)(dp,vr),fp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=up({},pp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return wl(`/${t}/_tree${yp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Tp=e=>{let{uri:t,graphUri:r}=e;const n=up({},pp,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return wl(`/${t}/_parents${yp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ep=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=up({},pp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return wl(`/${t}/_hops${yp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function mp(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 hp=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},bp="/activities",Op=e=>{let{label:t,description:r}=e;return wl(bp,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:hp()}})},vp=e=>{const t=gr(e);return wl(bp+t,{method:"GET"})},gp=e=>wl(`/activities/_total${gr(e)}`,{method:"GET"}),_p=e=>{const{entityUri:t}=e,r=mp(e,["entityUri"]);return wl(`/${t}/_activities${gr(r)}`,{method:"GET"})},Ap=e=>{const{entityUri:t}=e,r=mp(e,["entityUri"]);return wl(`/${t}/_activities/_total${gr(r)}`,{method:"GET"})};function Np(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){Pp(e,t,r[t])}))}return e}function Pp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Sp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return wl(Rp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},wp=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=Rp({url:r,workflowPath:t,tenant:n})),wl(s,{method:i||"GET",body:JSON.stringify(a),headers:Np({"Content-Type":"application/json"},null!=o?o:{})})},Ip=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Rp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return wl(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)},Up=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Rp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Np({},l,{comment:o}):l;return wl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},Cp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Rp({url:`/tasks${s?gr(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Np({objectURIs:[i]},(0,l.reject)(E,a)))};return wl(u,Np({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Lp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return wl(Rp({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})})},jp=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return wl(Rp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Np({max:a,offset:o},i))})},Dp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return wl(Rp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},kp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return wl(Rp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Fp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return kp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},Mp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return wl(Rp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},xp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return kp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},$p=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return kp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},Vp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return kp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},Gp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return wl(Rp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},Wp=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return wl(Rp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},Yp=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(Zo);return a&&a[0]&&(r=n.length>0&&a[0].value?Yp(a[0].value,[n.join(".")])[0].value:"string"==typeof a[0].label?a[0].label:Object.prototype.hasOwnProperty.call(a[0],"label")?"":a[0].value||""),{key:t,value:r}}),""),Bp=(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=Yp(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=>{o=o.replace("{"+e.key+"}",e.value||"")}))),o},qp=/[,\s]*$/,Hp=e=>{const t=Xr().text(Qr);if(!e)return t;const r=e.replace(qp,"");return""===r.toString().trim()?t:r},Qp=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},Kp=(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=Qp(e,r.referencedEntityTypeURI);if(n)return Bp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Bp({attributes:t||{}},r.dataLabelPattern);return""},Jp=e=>{let{uiPath:t,uri:r}=e;const n=new URL(t),[,i]=n.pathname.split("/");return"nui"===i?`${t}profile?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},Xp=e=>{let{uiPath:t,tag:r,entityUri:n}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}tags?entityUri=${encodeURIComponent(n)}&tag=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},zp=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",Zp=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),gl,(0,l.prop)("value"))),ed=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),Zp),td=(e,t,r)=>{const n=ed(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(Es(e),Zp)))(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")])})(wr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>fs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,Zp))(r)})(e,r)||Dr(e,r.type);return zp(t,n)};function rd(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){nd(e,t,r[t])}))}return e}function nd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const id="DTSS/",ad=(0,l.replace)(new RegExp("^entities/"),""),od=e=>id+e.dataTenant+"/"+e.uri,sd=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),ld=e=>!(!e||!e.dataTenant),ud=(0,l.startsWith)(id),cd=(0,l.pipe)((0,l.ifElse)(ud,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),pd=(0,l.ifElse)(ld,od,(0,l.prop)("uri")),dd=e=>e&&e.uri?e.dataTenant?od(e):ad(e.uri):"",yd=(0,l.curry)(((e,t,r)=>(wr(t,r.type)||{})[e]||"")),fd=yd("label"),Td=yd("typeGraphIcon"),Ed=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=wr(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;let a=t.attributes[i.name];if(!a)return null;Array.isArray(a)&&(a=a.find(Zo)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:Kp(e,o,i),uri:a.uri}})).filter(l.identity):[]},md=(0,l.pipe)(Ed,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),hd=(0,l.curry)(((e,t)=>{if(!t)return[];if(1===e.length){return t[e[0]]||[]}{const r=t[e[0]];return Array.isArray(r)?r.reduce(((t,r)=>{if((0,l.is)(Object,r.value)){const n=hd(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):hd(e.slice(1),r)}})),bd=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,Od=e=>(0,l.propOr)([],"matchRules",e),vd=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?rd({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},gd=(e,t,r)=>t&&r?r.aEntity:e,_d=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 wl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),vr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ad=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 wl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),vr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Nd=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return wl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Pd=(e,t,r)=>Promise.all(t.map((async t=>await wl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),Rd=async(e,t)=>await Pd(e,t,"NOT"),Sd=async(e,t)=>await Pd(e,t,"MATCH"),wd=async(e,t)=>await Promise.all(t.map((async t=>await wl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function Id(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){Ud(e,t,r[t])}))}return e}function Ud(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cd(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 Ld=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return wl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},jd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return Zd({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Dd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return Zd({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},kd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return wl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Fd=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 kd({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},Md=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(ld,i);return Promise.all([s.length?Nd(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return kd({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},xd=(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=Cd(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)}),[])),$d=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),xd),Vd=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return wl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then($d)},Gd=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)},Wd=Gd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return wl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then($d)})),Yd=Gd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return wl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),Bd=(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)}},qd=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return wl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},Hd=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 qd(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},Qd=Hd("NOT"),Kd=Hd("MATCH"),Jd=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(ld,a);return Promise.all([Pd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return qd(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},Xd=Jd("NOT"),zd=Jd("MATCH");function Zd(e){let{requestProvider:t=wl,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}`,Id({},Cd(s,["headers"]),{headers:Id({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const ey=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return Zd({url:vc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ty=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return Zd({url:yc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ry=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=Kc(t,r);return Zd({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(Jc,(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)))}))))},ny=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return Zd({url:`${Rc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},iy=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return wl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},ay=e=>{let{dtssPath:t,tenant:r}=e;return wl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},oy=e=>{let{dtssPath:t,customerTenant:r}=e;return wl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},sy=e=>{let{dtssPath:t,tenants:r}=e;return wl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},ly=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return Zd({url:Rc(t),dataTenant:r,customerTenant:n,dtssPath:i})},uy=()=>wl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function cy(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){py(e,t,r[t])}))}return e}function py(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const dy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=cy({},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 wl(`${t}/api/${r}/graph/search${gr({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},yy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return wl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:cy({},n,i),headers:{"Content-Type":"application/json"}})},fy=(e,t)=>`${e}/${t}/comments`,Ty=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return wl(`${fy(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},Ey=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return wl(`${fy(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},my=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return wl(fy(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},hy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return wl(`${fy(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},by=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return wl(`${fy(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Oy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return wl(`${fy(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},vy=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return wl(`${fy(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},gy=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return wl(`${fy(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},_y=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=gr({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return wl(`${fy(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Ay(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){Ny(e,t,r[t])}))}return e}function Ny(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Py=e=>{let{tenant:t,servicesPath:r}=e;return wl(`${r}/oauth/proxy${gr({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ry="graphExport",Sy=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await Cy({servicesPath:e,tenant:t,environment:r,namespace:Ry,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(Ay({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await Cy({servicesPath:e,tenant:t,environment:r,namespace:Ry,options:Ay({method:"PUT"},o)})}catch(e){s=null}return s||(s=await Cy({servicesPath:e,tenant:t,environment:r,namespace:Ry,options:Ay({method:"POST"},o)})),s},wy=e=>{let{servicesPath:t,key:r}=e;return wl(`${t}/settings${gr({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Iy=e=>{let{servicesPath:t}=e;return wl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Uy=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return wl(`${n}/plugins${gr({tenant:t,user:r})}`,{method:"GET"})},Cy=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return wl(`${n}/configService${gr({tenant:t,environment:r,namespace:a,projection:o})}`,i)},Ly=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return Cy({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},jy=e=>{let{servicesPath:t,stateHash:r}=e;return wl(`${t}/searchLink?key=${r}`,{method:"GET"})},Dy=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),wl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},ky=e=>wl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Fy=e=>{let{exportPath:t,tenant:r,options:n}=e;return wl(`${t}/${r}/activities${gr(n)}`,{method:"POST"})};function My(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){xy(e,t,r[t])}))}return e}function xy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $y=e=>{const{entityUri:t}=e;return wl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Vy=e=>{let{entityUri:t,crosswalk:r}=e;return wl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},Gy=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return wl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[My({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),My({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},Wy=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return wl(`/${r}/_${n}${gr({contributorURI:t})}`,{method:"POST"})},Yy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return wl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},By=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return wl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},qy=e=>{let{entityUri:t,crosswalkId:r}=e;return wl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function Hy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qy=e=>{let{entityTypeUri:t}=e;return wl(`/dataQuality/fillRates${vr({entityType:At(t)})}`,{method:"GET"})},Ky=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i}=e;const a=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){Hy(e,t,r[t])}))}return e}({},n===ke.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{});return wl(`/entityType/${At(t)}/dataQuality/${n}`,{method:"POST",body:JSON.stringify(a)})},Jy=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return wl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${At(n)}`,{method:"GET",headers:{env:i}})},Xy=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=ke.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u}=e;const c={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u};return wl(`${t}/${r}/entityType/${At(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(c)})},zy=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return wl(`/${t}${gr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Zy=e=>{let{attributeUri:t,value:r}=e;return wl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},ef=e=>{let{attributeUri:t,value:r}=e;return wl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},tf=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return wl(`/${t}${gr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},rf=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=gr({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=pl()([[{value:a}]]);return wl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},nf=e=>{let{entityUri:t,attributeName:r,value:n}=e;return wl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},af=e=>{let{entityUri:t,attributeName:r}=e;return wl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function of(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sf=e=>{let{entityUri:t}=e;return wl(`/${t}/_historicURIs`,{method:"GET"})},lf=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 wl(`/${t}/_changesWithTotal${gr(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){of(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},uf=(e,t)=>wl(`/${e}/_previousChange${gr({timestamp:t})}`,{method:"GET"}),cf=(e,t)=>wl(`/${e}${gr({time:t})}`,{method:"GET"});function pf(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){df(e,t,r[t])}))}return e}function df(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const yf=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a}=e;return wl(t,pf({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:pf({"Content-Type":"application/json"},null!=i?i:{}),noRequestProcessor:a}))},ff=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=gr({options:a.join(","),severity:o.join(",")});return wl(`${t}/validate/${i}/entity/${dd({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},Tf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return wl(`${t}/validate/${n}/entity${gr({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},Ef=e=>{let{tenant:t,apiPath:r}=e;return wl(`${r}/tenants/${t}/name`,{method:"GET"})},mf=e=>{let{tenant:t,apiPath:r}=e;return wl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},hf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return wl(`${a}/preferences${gr({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},bf=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 wl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Of=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return wl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},vf=e=>{const{servicesPath:t}=e;return wl(`${t}/getTokenForWorker`,{method:"GET"})};var gf=r(29524);const _f=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=Tt(),s={attributes:Zs({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=fs(r,e,n.uri)[0];return i&&i.value?il({entity:e,attributeType:n,uri:i.uri,value:t}):rl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},Af=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(us),(0,l.filter)(ft),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Nf=(0,l.curry)(((e,t)=>{const r=Af(e=e||{},t=t||{});return r.concat((0,l.chain)(Nf(e),r))})),Pf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),Rf=Pf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),Sf=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),ft)),wf=e=>(0,l.pipe)(Rf,Sf(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),If=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Rf,(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})),Uf=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),ft),(0,l.omit)(["uri","timestamp"])),Cf=(0,l.pipe)(Uf,(0,l.evolve)({attributes:pl(!0)})),Lf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=wf(i);if(a.length>0)for(const t of a)e=If(t,r[t].uri,e);const o=await Ic(Cf(e[t]),null==n?void 0:n.enhanceUriWithDCR),s=(e=>(0,l.path)([0,"errors"],e))(o);if(s)throw s;const u=(e=>(0,l.pathOr)(e,[0,"object"],e))(o);return null==n||n.updateDCRUriFromResponse(u),u},jf=async(e,t,r)=>{const n=kf(e,t),i={};for(const t of n)i[t]=await Lf(e,t,i,r);return i},Df=(0,l.curry)(((e,t)=>{const r=gf.Node(t);return wf(e[t]).forEach((t=>{const n=Df(e,t);r.addEdge(n)})),r})),kf=(e,t)=>(0,l.pipe)((0,l.map)(Df(e)),(0,l.map)(gf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Ff=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Uf))})),Mf=(e,t)=>{const r=RE(e.tags||[],t.tags||[]),n=SE(e.roles||[],t.roles||[]),i=vE(e,t),a=gE(e,t);return[..._E(OE((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),PE((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e),...r,...n,...i,...a]},xf=(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 If(r,n,e)}),e))))}),t)}),Ff),$f=(0,l.curry)(((e,t)=>(0,l.when)(ft,(0,l.propOr)(l.__,t,e),t)));function Vf(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){Gf(e,t,r[t])}))}return e}function Gf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Wf=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:Fe.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Yf=e=>{let{relationUri:t}=e;return{type:Fe.DELETE_RELATION,parameters:{relationUri:t}}},Bf=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:Fe.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},qf=e=>{let{oldRelation:t,newRelation:r}=e;return{type:Fe.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},Hf=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:Fe.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},Qf=(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))),Kf=e=>e.type===Fe.DELETE_RELATION,Jf=e=>e.type===Fe.CREATE_RELATION,Xf=e=>e.type===Fe.REPOINT_RELATION,zf=e=>e.type===Fe.UPDATE_RELATION,Zf=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),eT=e=>{let{type:t,parameters:r,dcrProcessor:n}=e;const{enhanceUriWithDCR:i,updateDCRUriFromResponse:a}=n,o=e=>(a(e),e);switch(t){case Fe.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:a,attributes:s,startDate:l,endDate:u}=t;return tp({startEntityUri:e,endEntityUri:n,relationType:a,attributes:s,startDate:l,endDate:u,uriPreprocessor:i}).then(o)};case Fe.DELETE_RELATION:return()=>{const{relationUri:e}=r;return ep(e,i).then(o)};case Fe.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return ap(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case Fe.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return rp({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case Fe.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[Yf({relationUri:o}),Wf({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(tT(n)),(0,l.map)(eT),Zf)(s)}}},tT=e=>t=>Vf({dcrProcessor:e},t),rT=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=_r({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(tT(r)),(0,l.map)(eT),Zf,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},nT=e=>t=>(0,l.map)((t=>Vf({},t,{parameters:(0,l.evolve)({parentUri:$f(e),entityUri:$f(e),newEntityUri:$f(e)},t.parameters)})),t),iT=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},aT=(e,t)=>{const r=e.filter(Jf).find(Qf(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>zf(o)&&Qf(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!Xf(o)||!Qf(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(iT({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},oT=(e,t)=>{const r=e.filter(Xf).filter(Qf(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!zf(i)||!Qf(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(iT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},sT=(e,t)=>{const r=e.filter(Kf).filter(Qf(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!Qf(t,e)))},lT=(e,t)=>{const r=e.filter(zf).filter(Qf(t));let n=null;const i=e.filter((e=>!r.includes(e)||!zf(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(iT({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},uT=e=>{const t=e.filter(Kf).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(sT,e)},cT=e=>{const t=e.filter(Jf).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(aT,e)},pT=e=>{const t=e.filter(Xf).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(oT,e)},dT=e=>{const t=e.filter(zf).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)(lT,e))(t)},yT=e=>(0,l.pipe)(uT,cT,pT,dT)(e);function fT(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){TT(e,t,r[t])}))}return e}function TT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ET=e=>fT({},(0,l.path)(ST(),e),{startDate:(0,l.path)(CT(),e),endDate:(0,l.path)(LT(),e)}),mT=(e,t)=>(0,l.pipe)((0,l.path)(UT()),$f(t))(e),hT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=mT(e,r),i=(0,l.path)(wT(),e)===Me.IN,a=e.parentEntityUri||n;return Wf({parentUri:i?t:a,relation:ET(e),entityUri:i?a:t})})),...o.map((t=>{const i=mT(t,r),a=(0,l.path)(wT(),t)===Me.IN,o=i!==(0,l.pipe)((0,l.path)(ST()),a?jT:DT)(t),s=MT(e,(0,l.path)(PT(),t)),u=t.parentEntityUri||n,c=$f(r,i);return o?Hf({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(ST(),t),isReversed:!1}):qf({oldRelation:(0,l.path)(ST(),s),newRelation:ET(t)})})),...i.map((e=>Yf({relationUri:e}))),...s.map((e=>Bf({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},bT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return fT({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),OT=(0,l.has)("dataTenant"),vT=(0,l.ifElse)(OT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),gT=(e,t)=>(0,l.pipe)(oi,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(ws),_a)(e,t),_T=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)}},AT=(e,t,r)=>{const n=Bp(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)},NT="relation",PT=(0,l.always)([NT,"relationUri"]),RT=(0,l.always)([NT,"relationType"]),ST=(0,l.always)([NT,"object"]),wT=(0,l.always)([NT,"direction"]),IT=(0,l.always)([NT,"object","attributes"]),UT=(0,l.always)(["entity","entityUri"]),CT=(0,l.always)([NT,"startDate"]),LT=(0,l.always)([NT,"endDate"]),jT=(0,l.path)(["startObject","objectURI"]),DT=(0,l.path)(["endObject","objectURI"]),kT=(0,l.path)(["startObject","objectTypeURI"]),FT=(0,l.path)(["endObject","objectTypeURI"]),MT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(PT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=MT(r.connections,t);if(e)return e}}},xT=(0,l.pipe)(MT,(0,l.path)(ST())),$T=(0,l.allPass)([(0,l.pipe)((0,l.path)(UT()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(RT()),(0,l.complement)(E))]),VT=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:Et()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=YT({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=GT(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?_T(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},GT=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:Kr.IN}:{type:t[0],direction:Kr.OUT}:null},WT=e=>e.uri||e,YT=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&hi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===Kr.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"],wr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],wr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(WT,oi(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Kr.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Kr.OUT)),(0,l.map)(u))},t)||{}},BT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=pi({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=li(e,n.uri);return n&&(!t||Ur(e,i,t))&&(!r||Ur(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],wr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],wr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(xo,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)}},qT=(0,l.curry)(((e,t,r,n,i)=>{const a=Ur(n,l.__,t.type),o=e?FT:kT,s=Ur(n,l.__,r.type),u=e?kT:FT;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),HT=(e,t,r)=>{const n=e?FT:kT,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(Ur(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};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){KT(e,t,r[t])}))}return e}function KT(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{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return QT({},t,{[r]:{parents:n,children:i}})},XT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return QT({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},zT=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=Af(t,i),o=JT({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>zT(n.uri,t,[e],r)),o)},ZT=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)(PT(),n),a=t?XT({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(UT(),n),s=ft(o)?[o]:[],u=JT({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>zT(t,r,[i],e)),u)}),n)},eE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ZT(r,e,t,zT(e,t))},tE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return eE(t,r,n);if(ht(e)){const t=MT(n,e);return t&&ZT([t],null,r)}return r[e]?zT(e,r):void 0},rE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>rE(e,t))))},nE=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>nE(e,t))))},iE=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=mt(t),u=eE(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(ht(c)){if(s=MT(i,c),!s)return null;o.push({type:ve.relationConnection,value:s,valueType:oi(a,(0,l.path)(RT(),s))});continue}if(ht(u)){const e=n[c];if(!e)return null;o.push({type:ve.tempEntity,value:e,valueType:wr(a,e.type)});continue}const p=n[u],d=Rs(p,c),y=n[c];if(!d||!y)return null;o.push({type:ve.attributeValue,value:d,valueType:rr(a,St(d.uri,p.type))}),o.push({type:ve.tempEntity,value:y,valueType:wr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},nE(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=ht(s),d=p?xT(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?oi(a,d.type):wr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:nr(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:ve.tempEntity,value:T,valueType:wr(a,T.type)}),o.push({type:ve.attributeValue,value:s,valueType:E}),m=s.value;const l=us(s);T=l&&ft(l)?n[l]:null}}return o},aE=e=>e.every((e=>{let{type:t}=e;return[ve.attributeValue,ve.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===ve.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,oE=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(oE(e))}))}))),t},sE=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(pE,t),(0,l.propOr)([],"crosswalks",e))),e),lE=(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(lE(e))}))})),r},uE=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=uE(e);r>t&&(t=r)}))})),t+1):t},cE=(e,t)=>{if(ft(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},pE=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},dE=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},yE=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},fE=(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)},TE=(0,l.eqBy)(pE),EE=(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)(ns,(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 mE(e){return e&&void 0!==e.uri}function hE(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function bE(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 OE(e,t,r){var n,i,a,o=[];for(var s in e)if(e.hasOwnProperty(s)){if("paging"===s)continue;var u=e[s];if(void 0===t[s])for(var c in u)u.hasOwnProperty(c)&&o.push.apply(o,m(u[c]));else for(var p in u)if(u.hasOwnProperty(p)){var d=u[p],y=_(d,t[s]);void 0===y?o.push.apply(o,m(d)):d.value===y.value||d.lookupCode&&d.lookupCode===y.lookupCode?d.ignored!==y.ignored&&o.push.apply(o,b(y)):null==y.value||""===y.value?o.push.apply(o,m(d)):"Nested"===g(d)?d.ignored!==y.ignored&&(0,l.equals)(d.value,y.value)?o.push.apply(o,b(y)):o=o.concat(OE(d.value,y.value,r)):"Reference"===g(d)?bE(d,y)?o.push.apply(o,OE(d.value,y.value,r)):(o.push.apply(o,m(d)),o.push(O([y]))):""!==y.value&&(!1===y.ov?o.push.apply(o,(void 0,void 0,i=(n=y).uri.lastIndexOf("/"),a=n.uri.substr(0,i),[{type:"_UPDATE_NON_OV_ATTRIBUTE",uri:n.uri,typeUri:a,value:n.lookupCode||n.value}])):o.push.apply(o,h(y)))}}for(var f in t)if(t.hasOwnProperty(f)){if("paging"===f)continue;var T=(t[f]||[]).filter((function(t){return void 0===_(t,e[f])}));(T=E((0,l.clone)(T))).length&&o.push(O(T))}return o;function E(e){return e?e.map((function(e){var t;if(e){var r=e.value;return null!=r&&(ue(r)?Object.keys(r).forEach((function(e){var n=E(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 m(e){return[{type:"DELETE_ATTRIBUTE",uri:e.uri}]}function h(e){return[{type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:{value:e.lookupCode||e.value}}]}function b(e){return e&&(e.ignored?function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!1}}]}(e))}function O(e){var t=e[0].uri,n=t.lastIndexOf("/"),i={type:"INSERT_ATTRIBUTE",uri:t=t.substr(0,n),newValue:e.map((function(e){var t,n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),v(n.value),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}))};return i}function v(e){if(null!==e&&"[object Object]"===e.toString())for(var t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,v(e.value)}))}function g(e){var t=e.value;if(ue(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function _(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function vE(e,t){var r,n,i=[];return e.defaultProfilePic!==t.defaultProfilePic?i.push({type:"UPDATE_PROFILE_PIC_BY_URI",newValue:{value:t.defaultProfilePic}}):(r=e.defaultProfilePicValue)===(n=t.defaultProfilePicValue)||mE(r)&&mE(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function gE(e,t){var r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:"UPDATE_START_DATE",newValue:{value:n}});var i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:"UPDATE_END_DATE",newValue:{value:i}}),r;function a(e,t){var r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function _E(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var n="configuration/sources/Reltio",i="configuration/sources/ReltioCleanser";function a(e,t){return e.crosswalk={type:t.type,value:t.value},e}function o(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}function s(e){return e.removeIt=!0}var l=e.map((function(e){if(e.crosswalk)return[e];var o=AE(t,e.uri),s=o.filter((function(e){return e.type===n})),l=o.filter((function(e){return e.type!==n})),u=[];switch(e.type){case"INSERT_ATTRIBUTE":u.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":u=u.concat(o.map((function(t){return a(e,t)})));break;case"DELETE_ATTRIBUTE":(l.length||0==s.length)&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),u=u.concat(s.map((function(t){return a({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":{const o=l.some((e=>{let{type:t}=e;return t===i}))&&r?NE(r,t,e.uri):null;if(o||s.length){if(s.length)u=u.concat(s.map((function(t){return a({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)})));else if(o){var c=AE(t,o.uri).filter((e=>{let{type:t}=e;return t===n}));u=u.concat(c.map((t=>a({type:"UPDATE_ATTRIBUTE",uri:o.uri,newValue:e.newValue},t))))}}else u.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0});l.length&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}});break}}return u})),u=[].concat.apply([],l),c=o(u,"typeUri");for(var p in c)if("undefined"!==p){var d=c[p],y=u.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===p||"INSERT_ATTRIBUTE"===e.type&&e.uri===p})),f=d.filter((function(e){return e.crosswalk&&e.crosswalk.type===n}))[0],T=y.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0];!T&&f&&(u.push({type:"UPDATE_ATTRIBUTE",uri:f.uri,newValue:{value:f.value},crosswalk:f.crosswalk}),y.forEach(s)),d.forEach(s)}return(u=u.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),u}const AE=(e,t)=>e.filter((function(e){return 1===(e.attributes||e.attributeURIs||[]).filter((function(e){return e===t})).length})),NE=(e,t,r)=>(0,l.pipe)(Ss,(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 cE(t,r)},e=>{let[t]=e;return!Zo(t)}]),(0,l.prop)(0),(0,l.always)(null)))(e,r);function PE(e,t){for(var r in t=t||[],e)if(e.hasOwnProperty(r))for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if(a.refRelation){var o=a.refRelation[0]||a.refRelation;if(o.crosswalks)for(var s=o.crosswalks.filter((function(e){return e.attributes||e.attributeURIs})),l=0;l<s.length;l++){for(var u=!0,c=0;c<t.length;c++)if(t[c].type===s[l].type&&t[c].value===s[l].value){t[c].attributes=t[c].attributes||t[c].attributeURIs,t[c].attributes=t[c].attributes.concat(s[l].attributes||s[l].attributeURIs),t[c].attributes=Object.keys(t[c].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[c].attributeURIs,u=!1;break}u&&t.push(s[l])}}}return t}function RE(e,t){return hE("UPDATE_TAGS").call(this,e,t)}function SE(e,t){return hE("UPDATE_ROLES").call(this,e,t)}function wE(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){IE(e,t,r[t])}))}return e}function IE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var UE=function(e){var t=function(e,r,n,i){if(e&&r)if(n||(n=null),i=!!i,Array.isArray(e))for(var a=0;a<e.length;a++)r.call(n,a,e[a],e),i&&t(e[a],r,n,i);else if(ue(e))for(var o in e)r.call(n,o,e[o],e),i&&t(e[o],r,n,i)},r=function(e,t,r){return function(n){var 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)}},n=function(e,t,r){var n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf("IGNORE_ATTRIBUTE")&&-1!==e[t].indexOf("INSERT_ATTRIBUTE")}));return Object.keys(t).filter((function(e){var 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]="UPDATE_ATTRIBUTE"})),{appearance:t,ignored:n}},i=function(e,t){var r=Array.isArray(t),n=r?[]:{};return r?(e=e||[]).some((function(e){return e.uri}))?n=function(e,t){var r=e.map((function(e){return e.uri})),n=e.map((function(e){var r,n,a=(n=t.filter((function(t){return t.uri===e.uri}))[0]||{},(r=e)&&n&&r.ignored!==n.ignored&&(delete r.ignored,delete n.ignored,r.ov=!0,n.ov=!0),{a:r,b:n});return i(a.a,a.b)})),a=t.filter((function(e){return-1===r.indexOf(e.uri)}));return n.concat(a)}(e,t):(n=n.concat(e),t.forEach((function(t,r){void 0===n[r]?n[r]=t:ue(t)?n[r]=i(e[r],t):-1===e.indexOf(t)&&n.push(t)}))):(ue(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(r){ue(t[r])&&e[r]?n[r]=i(e[r],t[r]):n[r]=t[r]}))),n},a=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s=JSON.parse(JSON.stringify(a)),l=JSON.parse(JSON.stringify(o)),u=i(a,o),c={},p={},d=[],y=r(p,c,d);e.compareAttributes(u,l).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value&&(e.type="UNDO_IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)})),e.compareAttributes(u,s).map((function(e){return"DELETE_ATTRIBUTE"===e.type&&(e.type="INSERT_ATTRIBUTE"),"IGNORE_ATTRIBUTE"===e.type&&(e.type=e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)}));var f=n(p,c,d);return t(u,(function(e,t){t&&-1!==this.indexOf(t.uri)&&(t.ignored=!0,delete t.ov,t.hidden=!0)}),f.ignored,!0),{attributes:u,appearance:f.appearance}};const o=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=wE({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:a,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?a(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[i,s]=o(e?e.roles:[],t.roles),[l,u]=o(e?e.tags:[],t.tags);return{attributes:r,appearance:wE({},n,{roles:s,tags:u}),roles:i,tags:l}}}};const CE=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?CE(t.value):[]];return e.concat(r)}),[])),LE=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,jE=e=>{const t=[...CE((null==e?void 0:e.attributes)||[]),...CE((null==e?void 0:e.analyticsAttributes)||[])];return e?[pd(e),...t]:[]},DE=(e,t)=>[e,...t.map((t=>LE(e,t)))],kE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return vT(t)}))},FE=(e,t)=>{switch(e){case ge.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case ge.ENTITY_ATTRIBUTE:case ge.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[wt(t)]})(t);case ge.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case ge.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,pd({uri:n,dataTenant:i}),r]})(t)}},ME=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),xE=(0,l.curry)(((e,t)=>{const r=co(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(xE(e,r.extendsTypeURI)):n})),$E=(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))),VE=(e,t)=>(0,l.pipe)((0,l.prop)("type"),xE(e),$E(t))(t);function GE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const WE=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}},YE=e=>!e.deactivated,BE=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},qE=e=>BE(e)+e.message,HE=(0,l.unless)(l.isNil,(0,l.prop)("message")),QE=(0,l.unless)(l.isNil,(0,l.prop)("type")),KE=(0,l.curry)(((e,t)=>gt(t.parentUri,e))),JE=(0,l.curry)(((e,t)=>t.parentUri===e)),XE=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),gt(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",Je.TYPE_REFERENCE),(0,l.pipe)(tt,(0,l.any)(gt(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),zE=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),ZE=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),em=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([lm,YE,KE(e),XE(t),(0,l.complement)(ZE(e,t.uri))]))(r)},tm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([lm,YE,JE(e),zE(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",me.missed))]))(r);return n&&n.message||""},rm=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===me.missed))},nm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([YE,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(PT(),e))]))(t)},im=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([YE,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},am=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([YE,KE(t)]))(r)},om=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([YE,(0,l.propEq)("type",me.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},sm=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?iE(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 ve.attributeValue:{const e=a;if(qt(a))return Bp(o,e.dataLabelPattern);if(Ht(a)){const t=o,i=us(t),a=Ze(e),s=wr(n,a);return ft(i)?Bp(r[i],s.dataLabelPattern):t.label}return""}case ve.tempEntity:return Bp(o,a.dataLabelPattern);case ve.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=wr(n,null==e?void 0:e.entityType);return`${Hp(i&&ft(i)?Bp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||si(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){GE(e,t,r[t])}))}return e}({},e,{label:Hp(t)})}))},lm=e=>!e.severity||e.severity===be.ERROR,um=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case Je.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(um(n))}));case Je.TYPE_REFERENCE:return!!rs(t);case Je.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),cm=(e,t)=>e.every((0,l.complement)(um(t))),pm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=To(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=fs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!Zo(e.parent))))).forEach((e=>{cm(e.attrValues,n)&&r.push(WE({type:me.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:Xr().text("Attribute is required"),source:he.local}))})),r}),[])},dm=(0,l.curry)(((e,t,r)=>fs(e,t,r,!1))),ym=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),wr(e),(0,l.prop)("attributes"),(0,l.reject)(Yt),(0,l.filter)(Ht),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(dm(e,t)));return(0,l.pipe)(r,(0,l.reject)(us),(0,l.map)((e=>{let{uri:r}=e;return WE({type:me.missedRefEntity,uri:"",attributeTypeUri:St(r,t.type),parentUri:r,message:Xr().text("Entity is required"),source:he.local})})))(t)},fm=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(us,ft)).flatMap((n=>{const i=us(n),a=t[i],o=rr(e,St(n.uri,r.type));return Tm(e,t,o,a)})),Tm=(e,t,r,n)=>{const i=tt(r),a=i.map((t=>rr(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",Je.TYPE_REFERENCE))).flatMap(nt).concat(i);return Em(e,t,n,(e=>a.some(gt(e.uri))))},Em=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=pm(e,r,n),a=ym(e,r),o=fm(e,t,r);return[...i,...a,...o]},mm=(e,t)=>{const r=(0,l.path)(ST(),t)||{};return pm(e,r)},hm=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(UT()),(0,l.ifElse)(ft,(e=>t[e]),(0,l.always)(null)))(r),i=mm(e,r),a=(e=>(0,l.path)(UT(),e)?[]:[WE({type:me.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(RT(),e),parentUri:(0,l.path)(PT(),e),message:Xr().text("Entity is required"),source:he.local})])(r),o=((e,t,r)=>r?Em(e,t,r):[])(e,t,n);return[...i,...a,...o]},bm=e=>(0,l.path)(["entity","uri"],e)?[]:[WE({type:me.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:Xr().text("Entity is required"),source:he.local})],Om=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=pm(e,r),i=bm(t);return[...n,...i]};function vm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gm=(e,t)=>{var r,n;const i=wr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||$a(e)},_m=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),Am=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(_m(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},Nm=(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)(cs,ft,l.not)]),(e=>{const t=(0,l.pipe)(cs,At)(e);return Am((e=>e.replace(t,t+ut)))(e)})),(0,l.when)((0,l.pipe)(us,ft),(t=>{const r=us(t),n=e[r],i=n&&Rm(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){vm(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),Pm=(e,t,r)=>_E(OE((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),PE((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e).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)(Nm(r,e.type)),(0,l.map)(Am(jt))))})(e))),Rm=(e,t)=>(0,l.evolve)({attributes:ul({valueTransformer:(0,l.pipe)(ys,Nm(t),_m(jt)),deleteEmptyComplex:!0}),uri:jt})(e);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=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(lt,"g"),"uri$$$$").replace(new RegExp(ut,"g"),""))),Um=e=>(0,l.pipe)((0,l.evolve)({objectUri:Im,objectParentUri:Im}),(e=>{return Sm({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?me.missed:me.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&Lt(e.objectUri),uri:e.objectUri,source:he.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),Cm=(e,t)=>(0,l.map)((0,l.pipe)(Um,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=sm(t,s),p=null!=c&&c.length?c.slice(0,-1):sm(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&rr(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===ve.attributeValue&&(a=e.valueType)}return a})(o,c,e);return Sm({},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&&Ct(i)){const n=(0,l.last)(a),i=n.valueType;if(Ht(i)&&it(i).includes(o)){const i=us(n.value),o=i&&ft(i)?t[i]:null;return o?Sm({},e,{parentUri:o.uri,path:a.concat({type:ve.tempEntity,value:o,valueType:wr(r,o.type),label:""})}):e}}return e}})(t)))(e),Lm=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};function jm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Dm;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(Dm||(Dm={}));const km={},Fm={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},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"]}},Mm=(0,l.curry)(((e,t)=>{const r=(e=>{if(!km[e]){const t=Fm[e]||Fm.random0;km[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){jm(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return km[e]})(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]})),xm=e=>Mm(Dm.Charts,e);var $m=r(51404),Vm=r.n($m);const Gm=Array.from({length:100},((e,t)=>t/100)),Wm=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)},Ym={},Bm=new(Vm())({hash:Wm,saturation:Gm.slice(15,71),lightness:Gm.slice(50,90)}),qm=(0,l.curry)(((e,t,r)=>{t in Ym||(Ym[t]={});const n=Ym[t];r in n||(n[r]=((e,t)=>{const r=String(Wm(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),Hm=qm(Bm,"crosswalks"),Qm=qm(Bm,"sources"),Km=qm(Bm,"contributors"),Jm=qm(Bm,"dataValidationFunctions");function Xm(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){zm(e,t,r[t])}))}return e}function zm(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=(0,l.has)("items"),eh=e=>0===e,th=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)},rh=e=>e.reduce(((e,t)=>e+t.width),0),nh=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),ih=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),ah=e=>e.reduce(((e,t)=>e+t.height),0),oh=e=>(0,l.is)(String,e)&&e.includes("%"),sh=e=>Boolean(e.spacer),lh=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),uh=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(Zm(t)?uh(t):t)),[]),ch=e=>({id:e.layout}),ph=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ch;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.floor(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=oh(r.width)?lh(i,r.width):u}return th(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return th(n,t,r)},o=(e,t)=>Zm(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.reduce(((o,s,u)=>{const c=i(t,r,s,Zm(s)?n(s.layout):e(s.view)),d=eh(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(Zm(s))return o.concat(p(Xm({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(Xm({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:rh(o),height:nh(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=Zm(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=eh(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(Zm(i))return r.concat(p(Xm({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(Xm({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?th(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?th(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:ih(i),height:ah(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=eh(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return Xm({},o,{x:t.x,y:c,width:s,height:u})},i=(e,t)=>{const r=t.reduce(((t,r,i)=>{if("string"==typeof r)t.push(n(e,t,r,i));else if("object"==typeof r){const a=Math.round(e.width/2),o=Xm({},e,{width:a}),s=Xm({},e,{x:e.x+a,width:a}),u=(0,l.has)("left",r)&&n(o,t,r.left,i),c=(0,l.has)("right",r)&&n(s,t,r.right,i),p=(0,l.propOr)(0,"height"),d=Math.max(p(u),p(c));t.push(Xm({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return Xm({},e,{height:ah(r),items:r})},o=i(t,(0,l.propOr)([],"top",r)),s=Math.round(.66*t.width),u=(0,l.isEmpty)(o)?t.y:t.y+o.height,c=i(Xm({},t,{y:u,width:s}),(0,l.propOr)([],"center",r)),p=i({x:t.x+s,y:u,width:t.width-s},(0,l.propOr)([],"right",r)),d=o.height+Math.max(c.height,p.height),y=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return Xm({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=Xm({},t,{items:(0,l.reject)(sh,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 uh(f)},dh=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),yh=[Ve.FilteredEntitiesViewFacet,Ve.ActivitiesViewFacet,Ve.ProfileStatsFacet,Ve.FilteredSavedSearchesFacet],fh=(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=yh.includes(a.component)?8:4;return Xm({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));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){Eh(e,t,r[t])}))}return e}function Eh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mh={BarChart:$e.BAR,BarChartGrouped:$e.BAR,BarChartHorizontal:$e.BAR,LineChart:$e.LINE,Map:$e.MAP,Pie:$e.PIE},hh=(e,t)=>It(e)?Pt(e,t):e,bh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=mh[r];return Th({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},Oh=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return Th({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"]))},vh=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return Th({},e,{value:[$r,Vr,Fr.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:Wr(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&It(t)||!r?n:(n||[]).concat((i=r,{filter:Fr.EQUALS,fieldName:"type",values:[i]}));var i},gh=["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"],_h={"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:hh(n,r),filters:vh(a,n,r),chartType:$e.BAR,component:Ve.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:hh(n,r),filters:vh(a,n,r),chartType:$e.BUBBLE,component:Ve.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:Ve.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=ne(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return Th({id:t,count:o,canRead:u,orderType:s,attributeUri:hh(r,p),filters:vh(a,r,p),component:Ve.DashboardFacet,title:i,showOthers:!0},bh(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:hh(n,r),filters:vh(a,n,r),chartType:$e.MAP,component:Ve.DashboardFacet,title:i,geoUrl:gh[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 Th({id:t,count:o,canRead:l,attributeUri:hh(n,r),filters:vh(a,n,r),component:Ve.DashboardFacet,title:i,geoUrl:s,chartType:$e.MAP,projection:"geoMercator"},bh(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ve.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:Oh(i),component:Ve.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:vh(n,null,a),component:Ve.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:Fr.GTE,fieldName:"matches",values:["1"]}],component:Ve.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:Ve.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:$e.CLOUD,component:Ve.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:$e.TREE,component:Ve.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ve.NotificationInboxFacet,title:n||Xr().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ve.ActivitiesViewFacet,title:n||Xr().text("Activity log")}}},Ah=e=>({id:e,height:10}),Nh=(0,l.pipe)((0,l.map)((e=>{const t=_h[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),Ph=e=>{if("0.1"===e.version){const t=Nh(e.views),r=ph(Ah,e.layout,{columns:4});return{id:e.id,margin:0,layout:dh(r,t),views:t}}return e},Rh=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"),ne)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>Rh(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function Sh(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){wh(e,t,r[t])}))}return e}function wh(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=Sh({},Ge,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),Uh=e=>e,Ch={[Ih.Attributes]:Uh,[Ih.HierarchyTree]:Uh,[Ih.HierarchyPaths]:Uh,[Ih.RelationsTable]:Uh,[Ih.Relations]:e=>Sh({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[Ih.SingleAttributeView]:Uh,[Ih.CustomView]:Uh,[Ih.TableAttributeView]:Uh,[Ih.MapView]:Uh,[Ih.OldTreeView]:e=>Sh({},e,{class:Ge.HierarchyTree}),[Ih.OldMapView]:e=>Sh({},e,{class:Ge.MapView}),[Ih.ImageAttributeView]:Uh,[Ih.PotentialMatchesView]:Uh},Lh=(0,l.pipe)((0,l.map)((e=>{const t=Ch[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),jh=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===Ge.MapView?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),Dh=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return Sh({},t,{layout:e.newLayout});if("0.1"===e.version){const r=Lh(e.views),n=ph(jh(r),e.layout,{columns:4});return Sh({},t,{layout:dh(n,r),views:r})}return e},kh=(e,t)=>e.class===t||e["react-class"]===t,Fh=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(kh(t,Ge.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 kh(t,Ge.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.some(gt(n))||t.some(gt(n))}},Mh=(e,t)=>e.filter((e=>t.some((t=>kh(e,t))))).map((e=>{let{id:t}=e;return t})),xh=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},$h=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),Vh=(e,t)=>(e||[]).find((e=>e.activator===t)),Gh=e=>(0,l.pipe)((0,l.map)((e=>xh(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e);function Wh(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){Yh(e,t,r[t])}))}return e}function Yh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bh=(e,t)=>Rh(t).map((t=>(0,l.pipe)((0,l.map)((e=>xh(e,t))),(0,l.reject)(l.isNil),l.head)(e))),qh=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Hh=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];if("2.0"===r&&t.newLayout){const{newLayout:e}=t;return(0,l.pipe)((0,l.pick)(["views","sidePanelViews","profileBand"]),(0,l.mergeRight)({entityType:n,layout:e}),(0,l.reject)(l.isNil))(t)}const i=Bh(e,t.layout),a=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>xh(e,t.side))),(0,l.reject)(l.isNil),l.head)(e);return Rh(r.layout||{})}})(e,t),o=Dh(Wh({},t,{views:i,version:"0.1"})),s=(0,l.pipe)(Gh,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:o.views,layout:o.layout,sidePanelViews:a,profileBand:s})},Qh=(e,t)=>{if("scroll"===t.layout.layout){const r=Bh(e,t.layout),n=Ph(Wh({},t,{views:r,version:"0.1"}));return{class:Ye.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:Ye.Dashboard,views:t.views,layout:t.layout,id:t.id}},Kh=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},Jh=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Xh=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},zh=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Zh=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},eb=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions,tableViewModeAvailable:r.tableViewModeAvailable}},tb=(e,t)=>{const r=Bh(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=$h(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:Ye.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"]}},rb=(e,t)=>({class:Ye.Graph,id:t.id}),nb=(e,t)=>{const r=Bh(e,t.layout)[0];return{class:Ye.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},ib=e=>t=>!!(0,l.intersection)(e,t).length,ab=(0,l.cond)([[ib(["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"]),()=>Qh],[ib(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Kh],[ib(["com.reltio.plugins.graph.GraphView"]),()=>rb],[ib(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>Jh],[ib(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Xh],[ib(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>zh],[ib(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>Zh],[ib(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>eb],[ib(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>tb],[ib(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>nb],[l.T,()=>(0,l.always)(void 0)]]),ob=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(qh),(0,l.map)((t=>Hh(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand"])))(e);return{class:Ye.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:Be.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:Be.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){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>xh(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",Ye.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>xh(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;const a=Rh(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 ab(o)(t,i)},sb=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))},lb="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var ub;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(ub||(ub={}));const cb={[Ye.DQDashboard]:`${lb}DqDashboard.svg`,[Ye.Dashboard]:`${lb}Dashboard.svg`,[Ye.Graph]:`${lb}Graph.svg`,[Ye.RelationshipSearch]:`${lb}GraphSearch.svg`,[Ye.Interactions]:`${lb}Interactions.svg`,[Ye.PotentialMatches]:`${lb}PotentialMatches.svg`,[Ye.Profile]:`${lb}Profile.svg`,[Ye.ProfileActivityLog]:`${lb}ActivityLog.svg`,[Ye.Relationships]:`${lb}Relationships.svg`,[Ye.Sources]:`${lb}Crosswalk.svg`,[Ye.Search]:`${lb}Search.svg`,[ub.DashboardGroup]:`${lb}DashboardGroup.svg`,[ub.ProfileGroup]:`${lb}ProfileGroup.svg`,[ub.SearchGroup]:`${lb}SearchGroup.svg`,DEFAULT:`${lb}Default.svg`},pb=e=>cb[null==e?void 0:e.class]||cb.DEFAULT,db=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?cb[ub.ProfileGroup]:null,yb=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===cb[Ye.Dashboard]||t===cb[Ye.DQDashboard]})),(0,l.always)(cb[ub.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===cb[Ye.Search]||t===cb[Ye.RelationshipSearch]})),(0,l.always)(cb[ub.SearchGroup])],[l.T,()=>null]])(e),fb=e=>(0,l.pipe)((0,l.chain)(sb),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>(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=>({label:e.label,icon:pb(ob(e,t)),screen:ob(e,t),canRead:e.canRead,entityTypes:e["entity-types"]}))),(0,l.filter)((e=>e.screen)))(t))(t,e),n=ob(t,e);return{label:t.label,icon:db(t)||yb(r)||pb(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function Tb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Eb=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},mb=e=>({id:e,height:10}),hb=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)(Eb),(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=Nh(((e,t)=>{const r=Rh(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){Tb(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=ph(mb,t.layout,{columns:4});return{views:r,layout:dh(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function bb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ob=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,vb=e=>(0,l.pipe)((e=>$h(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.map)((e=>{let{action:t}=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){bb(e,t,r[t])}))}return e}({},t,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,["action"]))})))(e),gb=(0,l.prop)("showLookupCode"),_b=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>xh(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=>xh(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=>xh(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=>xh(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>xh(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>xh(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>xh(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.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>xh(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("enabled"))(e))(e),p=(e=>(0,l.pipe)((e=>Vh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("default-perspective"),(0,l.ifElse)(Ob,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),d=vb(e),y=(e=>(0,l.pipe)((e=>Vh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkUser"))(e))(e),f=(e=>(0,l.pipe)((e=>Vh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkIdle"))(e))(e),T=(e=>(0,l.pipe)((0,l.map)((e=>xh(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),E=(e=>(0,l.pipe)((0,l.map)((e=>xh(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e);var m;return{i18n:s,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:void 0===(m=gb(E))||m},validate:{levels:a,validateReadMode:o},attributePresentations:u,workflow:{enabled:c},defaultRoute:p,customScripts:d,checkUser:y,checkIdle:f,showSwitchToClassic:T,showEntityId:null===(t=Gh(e))||void 0===t?void 0:t.showEntityId}},Ab=e=>({layout:fb(e),pivoting:hb(e),properties:_b(e)});var Nb=r(58697),Pb=r.n(Nb);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=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}_${Pb()()}`;return n[e.id].push(t),i=!0,Rb({},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]++,Rb({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}};function Ib(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){Ub(e,t,r[t])}))}return e}function Ub(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let Cb={};const Lb=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=X(r.action.files.join('","'));if(E(Cb[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))}Cb=Ib({},Cb,{[a]:Ib({},Cb[a]||{},{worker:i})})}else i=Cb[a].worker,Cb[a].innerText&&t({task:{action:He.SET_HTML,params:{html:Cb[a].innerText}},worker:i,config:r}),i.removeEventListener("message",Cb[a].onWorkerMessage);return i&&(Cb[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||(Cb[a].innerText=n.params.html)}},i.addEventListener("message",Cb[a].onWorkerMessage)),i},jb=(0,l.curry)(((e,t)=>{if(null==t)return"";if("string"!=typeof t&&(t=String(t)),e&&t){const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a=""}=e,[o,s]=t.split(".");t=i+o.replace(/\B(?=(\d{3})+(?!\d))/g,r)+(s?n+s:"")+a}else!e&&t&&(t=Xr().number(t));return t})),Db=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?Xr().number(e,"0,0.0a").toUpperCase():Xr().number(e,"0,0"):""},kb=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let Fb=!0;const Mb=e=>Fb=e,xb=(e,t)=>e!==t&&t?Fb&&e?`${t} (${e})`:t:e,$b=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Vb=(e,t,r)=>{const n=$b(e,t,r);return xb(r,n)},Gb=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),Wb=(0,l.complement)(Gb),Yb=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),Bb=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)},qb=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(Wb(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),Hb=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=r[n.uri],s=i?q(i):"L",u=a?K(a):"L LTS";switch(n.type){case Je.TYPE_NUMBER:case Je.TYPE_FLOAT:case Je.TYPE_DOUBLE:case Je.TYPE_LONG:case Je.TYPE_INT:case Je.TYPE_COUNT:return t&&jb(o,t);case Je.TYPE_BOOLEAN:case Je.TYPE_BOOLEAN_RADIO:case Je.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isNil)(t)?t:le(t)?Xr().text("yes"):Xr().text("no");case Je.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),t&&(Au(t)?Nu(t):Xr().date(t,s));case Je.TYPE_ACTIVENESS_DATE:case Je.TYPE_LOCAL_DATE:return t&&(Au(t)?Nu(t):Xr().date(t,s));case Je.TYPE_TIMESTAMP:return t&&(Au(t)?Nu(t):Xr().date(isNaN(t)?t:Number(t),u));case Je.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case Je.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case Je.TYPE_DOLLAR:return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?xb((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),Qb={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},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)"},divider:"rgba(0,0,0,0.38)"},overrides:{MuiFilledInput:{root:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}},MuiInputBase:{input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"}}}},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)",transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},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)"},Kb=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 a=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,i).then((e=>{const n=t(e.status);return n>0&&o<n?r(o).then((()=>a(o+1))):e}))};return a()}},Jb=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=JSON.parse(t)}catch(n){r={errorMessage:t,errorCode:e.status}}throw r})))),Xb=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}=t,a=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e})),t.next);a(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=(0,l.pipe)((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),Kb,Jb);return{request:(e,n)=>{const i=s(fetch),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))},abort:i})})):a(e,n)},addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}},zb="__metadata",Zb=(e=>{const t=[zb,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),eO=(0,l.set)(Zb),tO=(0,l.view)(Zb),rO=eO(qr.NEW),nO=eO(qr.REMOVED),iO=eO(qr.EDITED),aO=eO(qr.IGNORED),oO=(0,l.pipe)(tO,(0,l.equals)(qr.REMOVED)),sO=(0,l.pipe)(tO,(0,l.equals)(qr.NEW)),lO=(0,l.pipe)(tO,(0,l.equals)(qr.EDITED)),uO=(0,l.pipe)(tO,(0,l.complement)(l.isNil)),cO=(0,l.pipe)(tO,(0,l.equals)(qr.IGNORED)),pO=(0,l.omit)([zb]),dO=(e,t)=>e===zb?void 0:t;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=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=fO(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},TO=(e,t)=>fO((0,l.propEq)("nodeId",t),e),EO=(e,t)=>fO((0,l.pathEq)(["entity","uri"],t),e),mO=(e,t)=>{const r=TO(e,t);return r.length>1?r[r.length-2]:null},hO=(e,t)=>{const r=TO(e,t);return r.length>0?r[r.length-1]:null},bO=(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=>bO(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},OO=()=>{},vO=(e,t)=>{let{parent:r,nodeProcessing:n=OO}=t;n(e,r),e.children&&e.children.forEach((t=>vO(t,{parent:e,nodeProcessing:n})))},gO=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case Ie.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 Ie.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 Ie.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){yO(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})}}},_O=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&&vO(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===Ie.addingChild||r.editingMode===Ie.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=gO({node:r,connection:n,isReversed:i}),s=Wf({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ie.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=gO({node:r,isReversed:i,connection:n}),l=s?Hf({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):qf({oldRelation:e,newRelation:a});t.push(l)}}})})),t},AO=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=AO(r,t);if(e)return e}return!1},NO=(0,l.curry)(((e,t)=>{const r=(0,l.map)(NO(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),PO=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>AO(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:NO(e,n.root)}}));return(0,l.pipe)(r,n)(t)},RO={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},SO={asc:"asc",desc:"desc"},wO=RO.entityLabel,IO=SO.asc,UO=(0,l.always)(0),CO=e=>{let{sortField:t=wO,sortOrder:r=IO,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case RO.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return z_.strings.sort(t,a,o)})(n,r);case RO.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return z_.strings.sort(e,i,a)})(r);default:return UO}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},LO=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(SO)),l.identity,(0,l.always)(IO))),jO=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(RO)),l.identity,(0,l.always)(wO)));var DO=r(91104);let kO;const FO=(e,t)=>(kO||(kO=DO.createClient({key:t})),new Promise((t=>{kO.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)}))}))),MO=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},xO=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(Zo).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[MO(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(xO(e.value,t,r))),n})),$O=e=>e&&e.length>0,VO=(e,t)=>[].concat(e&&e.attributes?xO(e.attributes,t):[]).filter(l.identity),GO=(e,t,r,n,i)=>{if(e&&e.type){const t=(wr(r,e.type).geoLocationAttributes||[]).map((t=>{return r=VO(e,t.latitude),n=VO(e,t.longitude),$O(r)&&$O(n)&&{lat:Number(r[0]),lng:Number(n[0])};var r,n})).filter(l.identity);if(t.length>0)return Promise.resolve(t[0])}const a=t.GeoLocation;if(a){const e=a.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if($O(t)&&t[0].value&&$O(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?FO(n.label,i).catch((()=>null)):Promise.resolve(null)},WO=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=wr(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=>t.attributes[e])).filter(l.identity).flatMap((e=>e.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e}))))));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s}=t;return GO(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?FO(a.label,r).catch((()=>null)):e)).then((e=>{let t=Array.isArray(e)?e:[e];return e&&t.map((e=>({id:e.id||n,label:i,entity:a,point:e})))})).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},YO=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=wr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(rr(e,r.latitude,t.type)&&rr(e,r.longitude,t.type)){const e=VO(t,r.latitude),n=VO(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))},BO=(e,t,r)=>Promise.all([YO(e,t),WO(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.lon===e.point.lon))))]}));function qO(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){HO(e,t,r[t])}))}return e}function HO(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=(e,t)=>t.values.map(eo(e,t.entityTypeUri)),KO=(e,t,r)=>xs(t.fieldName,r)||rr(e,Pt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),JO=(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?xb(e,t):e}),r)},XO=(0,l.path)(["attrType","label"]),zO=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>qO({},e,{[t]:!0})),{});e[r]=e[r]?qO({},e[r],n):n}return e}),{}),ZO=(0,l.pipe)((0,l.prop)("values"),E),ev=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",pn.type.name)),tv=e=>e.type===iv.NUMERIC_RANGE_FACET,rv=e=>e.type===iv.DATE_RANGE_FACET,nv=(0,l.either)(tv,rv),iv={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},av=e=>{switch(null==e?void 0:e.name){case pn.type.name:return iv.ENTITY_TYPE_FACET;case pn.createdBy.name:case pn.updatedBy.name:case pn.sourceSystems.name:case pn.tags.name:case pn.roles.name:case pn.matchRules.name:case pn.MLRecommendedMatch.name:return iv.WITH_DROPDOWN_CHECKBOXES_FACET;case pn.createdTime.name:case pn.updatedTime.name:case pn.startDate.name:case pn.endDate.name:return iv.DATE_RANGE_FACET;case pn.matches.name:case pn.matchScore.name:return iv.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return iv.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return iv.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return iv.DATE_RANGE_FACET;default:return iv.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},ov=(0,l.pipe)(KO,av),sv=(0,l.pipe)((0,l.path)(["attrType","type"]),dr),lv=(0,l.cond)([[tv,(0,l.always)(Fr.IN_RANGE)],[rv,(0,l.always)(Fr.WITHIN)],[(0,l.allPass)([sv,e=>e.values.length>=2]),(0,l.always)(Fr.EXISTS)],[l.T,(0,l.always)(Fr.EQUALS)]]),uv=(0,l.cond)([[rv,(0,l.prop)("values")],[tv,(0,l.prop)("values")],[sv,e=>1===e.values.length?e.values.map(le):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]);function cv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pv=(0,l.pipe)((0,l.path)(["attrType","type"]),or),dv=(0,l.pipe)((0,l.path)(["attrType","type"]),ur),yv=(0,l.pipe)((0,l.prop)("attrType"),Vs),fv=(0,l.pipe)((0,l.prop)("attrType"),$s),Tv=e=>t=>t.values.map((t=>wr(e,t).label)).join(" , "),Ev=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),mv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(Xr().number),Ev)),(0,l.join)(","))(e.values);return`${XO(e)}: ${t}`},hv=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),Ev)),(0,l.join)(","))(e.values);return`${XO(e)}: ${t}`},bv=e=>t=>`${XO(t)}: ${QO(e,t).join(", ")}`,Ov=e=>t=>{const r=JO(e,t);return`${XO(t)}: ${r.join(", ")}`},vv=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[fv,Tv(e)],[dv,mv],[pv,hv],[yv,bv(e)],[l.T,Ov(t)]]),r))),gv=(e,t,r,n)=>(0,l.pipe)(l.values,(0,l.reject)((0,l.pipe)((0,l.prop)("values"),E)),(0,l.map)((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){cv(e,t,r[t])}))}return e}({},t,{attrType:KO(e,t,n)}))),vv(e,r))(t),_v=new RegExp(`^${Xr().text("Search")}`),Av=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...gv(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(_v,"",u)]},Nv=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(Yr),Pv=e=>(e=>Nv.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]=Pu(t);return e.replace(r,i).replace(n,a)}),e))(e),Rv=(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}`})),Sv={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},wv=e=>[Sv.geoPolygon,Sv.onMapMove].includes(e),Iv=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},Uv=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},Cv=(e,t)=>wv(e)?t.map(Iv):[Uv(t)],Lv=e=>wv(e)?Xr().text("Geo Polygon"):Xr().text("Geo Location"),jv=e=>{switch(e){case Sv.geoLocation:return"geoLocation";case Sv.geoPolygon:case Sv.onMapMove:return"geoPolygon"}},Dv={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},kv=e=>Xr().text(e),Fv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[Fr.EQUALS]:"=",[Fr.NOT_EQUALS]:"≠",[Fr.STARTS_WITH]:"*",[Fr.MISSING_VALUE]:Xr().text("missing value"),[Fr.HAS_ALL]:Xr().text("has all"),[Fr.IN_RANGE]:Xr().text("in range"),[Fr.FULL_TEXT]:Xr().text("full text"),[Fr.EXISTS]:Xr().text("exists"),[Fr.COUNT_EQUALS]:`${Xr().text("count")} =`,[Fr.COUNT_NOT_EQUALS]:`${Xr().text("count")} ≠`,[Fr.COUNT_LT]:`${Xr().text("count")} <`,[Fr.COUNT_LTE]:`${Xr().text("count")} <=`,[Fr.COUNT_GT]:`${Xr().text("count")} >`,[Fr.COUNT_RANGE]:Xr().text("count range"),[Fr.LT]:"<",[Fr.LTE]:"<=",[Fr.GT]:">",[Fr.GTE]:">=",[Fr.IN_FILE]:Xr().text("in file"),[Fr.NOT_IN_FILE]:Xr().text("not in file"),[Fr.CONTAINS]:"~",[Mr.LIST_EQUALS]:"=",[Mr.NOT_LIST_EQUALS]:"≠",[Mr.LIST_EQUALS_CASE_SENSITIVE]:"=",[Mr.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||Xr().text(e.toLowerCase())},Mv=e=>({type:Dv.operator,text:e}),xv=e=>({type:Dv.operator,text:kv(e)}),$v=e=>({type:Dv.attributeLabel,text:e}),Vv=e=>({type:Dv.specialAttributeLabel,text:e}),Gv=e=>({type:Dv.attributeFilter,text:Fv(e)}),Wv=e=>({type:Dv.attributeValue,text:e}),Yv=e=>({type:Dv.entityTypeLabel,text:e}),Bv=()=>({type:Dv.space,text:" "}),qv=()=>({type:Dv.bracket,text:"("}),Hv=()=>({type:Dv.bracket,text:")"}),Qv=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),Kv=(0,l.curry)(((e,t)=>t.map(Qv(e)))),Jv=(0,l.curry)(((e,t,r)=>[e,...r,t])),Xv=Jv(qv(),Hv()),zv=Jv(Bv(),Bv()),Zv=(0,l.curry)(((e,t)=>[e,...t])),eg=e=>Zv(Yv(e)),tg=e=>Zv(Yv(`${e}: `)),rg=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=au(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=nu(s),a=iu(s);!r&&t&&n&&(i.push(qv()),r=!0),i.push(o),r&&a&&(i.push(Hv()),r=!1);const l=e?xv(s):Mv(s);i.push(...zv([l]))}else i.push(o),r&&(i.push(Hv()),r=!1)}return i}},ng=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),ig=(0,l.pipe)(rg({localizable:!1}),ng),ag=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},og=e=>{let{data:t,values:r,filter:n}=e;return t&&Gu({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},sg=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(og)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),lg=(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)&&zt(e.data.attrType)})(e)&&[Fr.HAS_ALL,Fr.EQUALS,Fr.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:Xt((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})))),Bb),ug=(e,t)=>(0,l.pipe)(lg,qb(t))(e),cg=(0,l.pathEq)(["data","fieldName"],pn.type.name),pg=(0,l.path)(["data","entityTypeUri"]),dg=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),yg=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(Go(e)),attributes:(0,l.filter)((0,l.pipe)(pg,(0,l.anyPass)([l.isNil,Go(e),r=>{const n=(t.entityTypes||[]).filter(Go(e));return(n.length>1?jr(e,n):null)===r&&!!wr(e,r)}])))})(t))))),fg=e=>(0,l.pipe)((0,l.prop)("filter"),Yl,(0,l.equals)(e)),Tg=(0,l.curry)(((e,t,r,n,i,a)=>{const o=xs(n.fieldName)||n.attrType,s=gu(o,i),u=Hb({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>zt(s),()=>(0,l.is)(Object,a)&&a.lookupCode?xb(a.lookupCode,a.value):Vb(r,Xt(o),a)],[()=>Vs(s),()=>eo(e,n.entityTypeUri,a)],[()=>Gs(s),()=>_o(e,a)],[()=>Qs(s),()=>Po(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>ur(c)||dr(c)),hu),Wv)()})),Eg=(e,t,r,n)=>{const i=Tg(e,t,r,n.data,n.filter);return(0,l.cond)([[fg(0),(0,l.always)([])],[(0,l.both)(fg(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[Bv(),i(r),{type:Dv.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[Bv(),...(0,l.pipe)(l.flatten,(0,l.map)(i),Kv({type:Dv.punctuationMark,text:", "}))(t)]}]])(n)},mg=(e,t)=>{const r=!!xs(e.data.fieldName);return(0,l.pipe)(ag,r?Vv:$v)(e,t)},hg=(e,t,r,n,i)=>[mg(n,i),Bv(),Gv(n.filter),...Eg(e,t,r,n)],bg=(0,l.addIndex)(l.map),Og=(0,l.propEq)("length",1),vg=(0,l.propSatisfies)((0,l.lt)(1),"length"),gg=(0,l.complement)(l.isEmpty),_g=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(lu,(0,l.filter)(og),uu,(0,l.map)((n=>({operand:hg(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,rg()))(n)},Ag=(0,l.pipe)(_g,l.flatten),Ng=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>fd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=_g(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(eg),(0,l.pipe)(s(tg),(0,l.unless)((()=>Og(u)||i),Xv)))(u)},Pg=(e,t,r,n)=>(0,l.pipe)(lu,(0,l.filter)(sg),uu,bg(((n,i,a)=>({operand:Ng(e,t,r,n,Og(a)),operator:n.operator}))),rg(),l.flatten)(n),Rg=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),rg(),l.flatten),Sg=e=>{let{searchType:t,values:[r]}=e;return Cv(t,r).join(", ")},wg=(e,t,r,n,i,a)=>{const o=(e=>e?[Vv(e.isRawFilter?Xr().text("Raw filter"):Xr().text("Search")),...zv([Gv(Fr.EQUALS)]),Wv(`"${e.value}"`)]:[])(i),s=(e=>e?[Vv(Lv(e.searchType)),Bv(),Wv(Sg(e))]:[])(a),u=(0,l.pipe)(Pg,(0,l.when)((e=>vg(e)&&(gg(o)||gg(s))),Xv))(e,t,r,n);return Rg([o,s,u])},Ig=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),Ug=(0,l.pipe)(wg,Ig),Cg=(0,l.has)("attributes"),Lg=Array.isArray,jg=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),Dg=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=kg(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)(jg(a))),Xv),(0,l.concat)(zv([Mv(o)]))))(s)},kg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return Cg(n)?Dg(e,t,r,n,i):Lg(n)?n.reduce(((n,a)=>n.concat(kg(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(zv([Mv(n.operator)])))(hg(e,t,r,n,i))},Fg=(e,t,r,n,i)=>(0,l.pipe)(kg,l.flatten)(e,t,r,n,i);function Mg(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){xg(e,t,r[t])}))}return e}function xg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $g=(0,l.complement)(cg),Vg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(cg),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(pg),(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}},Gg=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=Vg(t);return(r||n)&&ou(t)},Wg=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(Gg)),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(cg).some((0,l.propEq)("filter",Fr.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}=Vg(r);if(Gg(e))t.push(Mg({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter($g)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(cg,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(pg,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter($g),entityTypes:n,operator:i?a:e.operator,id:Pb()()}}));t.push(...n)}var a;return t})(t))),[]))),Yg={[Fr.EQUALS]:Fr.ON,[Fr.IN_RANGE]:Fr.WITHIN,[Fr.GTE]:Fr.AFTER,[Fr.GT]:Fr.AFTER,[Fr.LTE]:Fr.BEFORE,[Fr.LT]:Fr.BEFORE},Bg=(0,l.curry)((e=>Yg[e]||e)),qg=(0,l.curry)(((e,t)=>{switch(e){case Fr.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case Fr.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),Hg=(0,l.pipe)((0,l.path)(["data","attrType","type"]),or),Qg=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>Mg({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return Hg(e)?(0,l.evolve)({filter:Bg,values:qg(t)},e):e}))})))})),Kg=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),Wg,yg(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")))})),Qg,(0,l.reject)(dg))(r)));function Jg(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){Xg(e,t,r[t])}))}return e}function Xg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zg=(e,t)=>({data:{uri:It(e.fieldName)?Pt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||lv(e),id:Pb()(),values:uv(e)}),Zg=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=xs(a,t,r)||rr(e,i);if(!s)return null;if(Gt(s))return Jg({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=fd(e,{type:o}),i=(tr(e,Pt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return Jg({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),e_=(0,l.curry)(((e,t,r,n)=>Kg(Zg,e,n,t,r)));function t_(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){r_(e,t,r[t])}))}return e}function r_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const n_=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},i_=e=>"rdmLookups.not.resolved"===e?pn.notResolved.name:e,a_=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===Gr?Fr.IN_RANGE:Wr(a),u=i_(n),c=xs(u)||rr(e,i),p=(0,l.cond)([[()=>Ql(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>t_({},e,{filename:kb(e)}))))],[()=>dr(null==c?void 0:c.type),(0,l.map)(le)],[e=>ql(s)&&!Array.isArray(e[0])&&!or(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:Pb()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===Gr?"and not":"and",filter:s,values:p}})),o_=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(a_(e,jr(e,i)));return[{id:Pb()(),operator:"or",attributes:a,entityTypes:i}]})),s_=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),l_=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([s_("from"),s_("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,()=>[]]]),u_=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return t_({},r,{values:l_(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?js(e.fieldName,n):e.fieldName})},c_=(e,t)=>{if((0,l.has)("children")(e)){const r=u_(e,t);return e.children.reduce(((e,n)=>(e.push(c_(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return u_(e,t)},p_=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(u_(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(t_({fieldName:e.fieldName},u_(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(c_,l.flatten)],[l.T,u_]]),d_=(0,l.pipe)((0,l.map)(p_),l.flatten),y_=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},f_=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=o_(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:d_(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>t_({},t,{type:ov(e,t)}))).map((e=>t_({},e,{values:nv(e)?y_(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 zg(r,t)})),operator:"or",id:Pb()(),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=>({[i_(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[t_({},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 e_(e,t,r,p)},T_=(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)(ZO),(0,l.partition)(ev))(t),i=n.map((t=>Jg({},t,{type:ov(e,t)}))).map((e=>zg(e))),a=r.values||[];return[{attributes:i,operator:"or",id:Pb()(),entityTypes:a}]})(e,a);return e_(e,t,r,o)})(e,t,r,n):f_(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},E_=e=>"2.0"===e.version?e.keyword:n_(e),m_=e=>(0,l.pathEq)(["object","uri"],e),h_=(e,t)=>(0,l.pipe)((0,l.find)(m_(e)),(0,l.prop)("object"))(t),b_=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"),m_(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=h_(r.match,t)||n[r.match];return i?{label:Hp((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return Za(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)},O_=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),v_=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),g_=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[]}=t;const a=(0,l.propOr)({},n,r);return{label:Hp((0,l.prop)("label",a)),matchRules:i.map((function(t){return Za(e,a.type,t)||{label:t,uri:t}}))}})))(t),__=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)},A_=(0,l.path)(["object","uri"]),N_=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},P_=e=>e.getValue(),R_=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=R_(n[e],t),!r);e++);return r},S_=(e,t)=>{const r=[],n=(0,l.pipe)(P_,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(S_,[t]),a);return r.push.apply(r,o),r};function w_(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}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 U_=(e,t)=>!!e[t],C_=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},L_=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||[]])},j_=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return w_({},t,{[r.uri]:w_({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:L_(null==o?void 0:o.parents,n),children:L_(null==o?void 0:o.children,i),values:L_(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},D_=e=>e.children?e.children.flatMap(D_):e,k_=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=wr(r,t)||oi(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Lo(r,n,i).flatMap(D_).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>rr(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=j_({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>j_({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},F_=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!ft(e.uri)&&Ot(e.type)&&Ot(t)&&!t.startsWith(e.type))(n,t))return e;const i=fs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(Zo),(0,l.map)(C_))(i);return j_({structure:e,attrType:e[t].attrType,values:a})}),t)},M_=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 U_(e,r)}));return r||n?t.filter(Zo).reduce(((e,t)=>M_({structure:e,attributeValue:t})),e):e}),t);{const e=r;return U_(t,e.type)?j_({structure:t,attrType:t[e.type].attrType,values:[C_(e)]}):t}},x_=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?w_({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},$_=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=fs(i,n,r)||[];return a.length?j_({structure:t,attrType:t[r].attrType,values:a.filter(Zo).map(C_)}):t},V_=(e,t,r)=>{const n=mt(e),i=mt(t);return n===i?((e,t)=>{const r=Lt(t),n=Lt(e);return gt(n,r)||((e,t)=>Ut(e)&&!Ut(t)&&gt(t,e))(n,r)})(e,t):!(!r||!Ct(t))&&rE(r,i).includes(n)},G_=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},W_=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?eE(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return V_(r,t,o)}))},Y_=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>Y_(e,t,r)))))},B_=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&G_(n,e)}},q_=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=mt(n),c=tE(u,o,i,a),p=Y_("children",t,l),d=Y_("parents",t,l),y=p.flatMap((e=>Y_("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return V_(t,n,c)})).map((t=>B_(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return V_(n,t,c)||mt(t)!==u&&V_(t,n,c)})).map((t=>B_(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=Y_("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return f.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&V_(n,t,c)}))})).map((t=>B_(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return V_(t,n,c)})).map((e=>B_(r,n,e,s))),...T,...E,...f]},H_=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=Hb({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=>Bp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[qt,()=>a(n)],[zt,()=>(e=>{const r=o(e),n=Xt(t);return jl([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Vb(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},Q_=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:Fr.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(K_(r,t)):i.push(J_([t],r)),i},K_=(e,t)=>{const r=Wt(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=qt(i)?K_(i,t[r]):[J_(t[r],i)];return e.push(...a),e}}),[])},J_=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Jt(t.uri),filter:t.type===Je.TYPE_BLOB?Fr.FULL_TEXT:Fr.EQUALS,values:e}:{fieldName:Jt(t.uri),filter:Fr.MISSING_VALUE},X_={AttributesDiff:o,AttributesEditor:a,HistoryManager:s},z_={Colors:r(33164),DependencyManager:r(29524),strings:n,dates:i}},33164:(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}},29524:(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=2701.js.map